/* Terminus Est Consulting - Design System
   Based on Terminus Est AI brand identity */

:root {
  --bg: #0A0A0A;
  --panel: #121212;
  --line: #262626;
  --fg: #F2F2F0;
  --mute: #A3A3A0;
  --acc: #FF5722;
  --acc-hover: #ff7043;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 Barlow, system-ui, sans-serif;
}

a { color: var(--acc); }
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 3px;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 12px;
  top: 12px;
  background: var(--acc);
  color: #000;
  padding: 8px;
  z-index: 9;
}

/* Typography */
h1, h2, h3 {
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  line-height: 1.02;
  margin: 0 0 .5em;
  letter-spacing: .01em;
}

h1 {
  font-size: clamp(44px, 7vw, 96px);
  font-weight: 800;
}
h1 em {
  font-style: normal;
  color: var(--acc);
}

h2 {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700;
  max-width: 28ch;
}

h3 {
  font-size: 24px;
  font-weight: 600;
}

.eyebrow, .meta {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--acc);
  margin: 0 0 14px;
}
.meta { color: var(--mute); }

.lead {
  font-size: clamp(18px, 1.6vw, 21px);
  color: #D6D6D3;
  max-width: 62ch;
}

/* Navigation */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(10, 10, 10, .92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.navin {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}

.logo {
  display: flex;
  align-items: baseline;
  text-decoration: none;
  font-family: "Barlow Condensed";
  font-weight: 800;
  font-size: 30px;
}
.logo .t { color: var(--acc); }
.logo .e { color: #fff; }
.logo .wm {
  color: var(--fg);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-left: 12px;
}

.top .links {
  display: flex;
  gap: 20px;
  margin-left: auto;
}

.links a {
  color: var(--mute);
  text-decoration: none;
  font-family: "IBM Plex Mono";
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.links a:hover, .links a[aria-current] { color: var(--fg); }

nav.top .links a:nth-child(odd) { color: #FF5722; }
nav.top .links a:nth-child(even) { color: #FFFFFF; }
nav.top .links a { text-underline-offset: 6px; text-decoration-thickness: 2px; }
nav.top .links a:hover, nav.top .links a:focus-visible {
  text-decoration: underline;
  filter: brightness(1.2);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--acc);
  color: #0A0A0A;
  font-family: "Barlow Condensed";
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 18px;
  padding: 14px 26px;
  text-decoration: none;
  border: 1px solid var(--acc);
  cursor: pointer;
}
.btn:hover { background: var(--acc-hover); }
.btn.ghost {
  background: transparent;
  color: var(--fg);
  border-color: #444;
}
.btn.ghost:hover { border-color: var(--acc); }
.btn.sm { font-size: 15px; padding: 9px 16px; }

.actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 30px;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 150px 0 130px;
  min-height: 78vh;
  border-bottom: 1px solid var(--line);
}

.grid-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
                    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: .45;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
}

.radar {
  position: absolute;
  right: -120px;
  top: 50%;
  width: 640px;
  height: 640px;
  transform: translateY(-50%);
  border-radius: 50%;
  border: 1px solid rgba(255, 87, 34, .35);
  background: repeating-radial-gradient(circle, transparent 0 79px, rgba(255, 87, 34, .18) 79px 80px);
}

.radar span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(255, 87, 34, .28), transparent 22%);
  animation: sweep 8s linear infinite;
}

@keyframes sweep {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .radar span { animation: none; }
}

.hero .wrap { position: relative; }

/* Sections */
.sec {
  padding: 90px 0;
  border-bottom: 1px solid var(--line);
}

/* Bento Grid */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 34px;
}
.bento.two { grid-template-columns: repeat(2, 1fr); }
.bento.one { grid-template-columns: 1fr; }
.bento.one + .bento { margin-top: 16px; }

/* Cards */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 30px;
  transition: border-color .2s;
}
.card:hover { border-color: rgba(255, 87, 34, .6); }
.card p { color: #C9C9C6; margin: 0; }
.card h3 { margin-bottom: 12px; }

.card.featured {
  border-color: var(--acc);
  position: relative;
}
.card.featured::before {
  content: "Featured";
  position: absolute;
  top: -1px;
  right: 20px;
  background: var(--acc);
  color: #0A0A0A;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 10px;
}

/* Steps */
.steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 34px;
}
.steps li {
  border-top: 2px solid var(--acc);
  padding-top: 18px;
}
.steps p { color: #C9C9C6; }
.steps .meta {
  display: block;
  margin-bottom: 6px;
}

/* CTA Section */
.cta {
  background: linear-gradient(180deg, #0A0A0A, #140c09);
}
.cta-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}

/* Profile Section */
.profile {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  align-items: start;
  margin-top: 34px;
}
.profile-img {
  width: 100%;
  aspect-ratio: 1;
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mute);
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.profile-content h3 { margin-top: 0; }
.profile-content p { color: #D6D6D3; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 34px;
}
.contact-info p { color: #D6D6D3; margin: 0 0 20px; }
.contact-email {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 18px;
  margin-bottom: 24px;
}

/* Footer */
.foot {
  padding: 50px 0;
}
.footin {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.foot .links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 460px;
}
.foot .meta { margin-top: 8px; }

/* Legal small text */
.small {
  color: var(--mute);
  font-size: 14px;
  max-width: 72ch;
}

/* Highlight line */
.highlight-line {
  border-left: 3px solid var(--acc);
  padding-left: 14px;
  color: var(--mute);
  margin-top: 12px;
  font-size: .95rem;
}

/* Responsive */
@media (max-width: 1100px) {
  .navin {
    flex-wrap: wrap;
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
    row-gap: 10px;
  }
  .top .links {
    order: 3;
    width: 100%;
    margin: 0;
    overflow-x: auto;
    gap: 16px;
  }
  .steps { grid-template-columns: 1fr 1fr; }
  .cta-grid { grid-template-columns: 1fr; gap: 32px; }
  .profile { grid-template-columns: 1fr; gap: 32px; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 760px) {
  .bento, .bento.two, .steps {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 90px 0 80px;
    min-height: auto;
  }
  .radar {
    width: 420px;
    height: 420px;
    right: -200px;
    opacity: .6;
  }
  .sec { padding: 64px 0; }
  .logo .wm { display: none; }
  .wrap { padding: 0 20px; }
  .navin { justify-content: space-between; }
  .nav-cta { gap: 16px; }
  .profile-img { max-width: 200px; }
}

@media (min-width: 1101px) {
  nav.top .nav-cta {
    position: absolute;
    top: 0;
    right: 28px;
    height: 68px;
  }
  nav.top .links {
    margin-right: var(--cta-w, 180px);
  }
}
