/* ============================================================
   Cortexis — tokens
   ============================================================ */
:root {
  --void: #080d12;
  --panel: #0d141c;
  --panel-2: #131c26;
  --cyan: #58d9e7;
  --blue: #258cad;
  --silver: #cbd4db;
  --ink: #eef3f5;
  --muted: #87939e;
  --line: rgba(203, 212, 219, 0.12);

  --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, monospace;

  --wrap: 1140px;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Full-screen interactive opening */
.hero {
  min-height: min(850px, calc(100svh - 72px));
  height: calc(100svh - 72px);
  padding: 0;
  background: #070b10;
}
.hero::before {
  z-index: 0;
  background:
    radial-gradient(
      ellipse at 50% 54%,
      rgba(21, 94, 120, 0.2),
      transparent 48%
    ),
    linear-gradient(180deg, rgba(8, 13, 18, 0.1), #080d12 100%);
  pointer-events: none;
}
#constellation {
  z-index: 1;
  opacity: 1;
  pointer-events: none;
}
.hero-drive {
  position: relative;
  z-index: 2;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
}
.drive-grid {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(88, 217, 231, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 217, 231, 0.08) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(transparent, #000 32%, #000 80%, transparent);
  transform: perspective(700px) rotateX(60deg) scale(1.8) translateY(23%);
  transform-origin: 50% 75%;
}
.drive-sweep {
  position: absolute;
  inset: -20% -10%;
  opacity: 0.44;
  background: repeating-linear-gradient(
    112deg,
    transparent 0 14%,
    rgba(36, 143, 177, 0.09) 14.1%,
    transparent 14.25% 28%
  );
  mask-image: radial-gradient(ellipse at 50% 55%, #000, transparent 68%);
  transform: translate(var(--drive-x, 0), var(--drive-y, 0));
  transition: transform 0.35s ease-out;
}
.hero-inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}
.hero-copy {
  position: relative;
  z-index: 2;
  width: min(680px, 70%);
  padding-top: 0;
  transform: translate(var(--drive-x, 0), var(--drive-y, 0));
  transition: transform 0.35s ease-out;
}
.hero .eyebrow {
  background: rgba(8, 13, 18, 0.68);
}
.hero-title {
  max-width: none;
  font-size: clamp(46px, 7vw, 92px);
  line-height: 0.99;
  letter-spacing: -0.055em;
  margin: 0 0 24px;
}
.hero .grad-text {
  text-decoration: none;
  color: var(--cyan);
  text-shadow: 0 0 34px rgba(88, 217, 231, 0.19);
}
.hero-sub {
  max-width: 44ch;
  font-size: clamp(16px, 1.55vw, 20px);
  color: #b4c1ca;
  margin-bottom: 32px;
}
.drive-start {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font: 600 15px var(--font-body);
  letter-spacing: 0.01em;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.drive-start-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(88, 217, 231, 0.55);
  border-radius: 50%;
  color: var(--cyan);
  font-size: 19px;
  transition:
    background 0.2s,
    transform 0.2s;
}
.drive-start:hover .drive-start-icon {
  background: rgba(88, 217, 231, 0.13);
  transform: translate(2px, -2px);
}
.drive-caption {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 34px;
  display: flex;
  justify-content: space-between;
  color: rgba(203, 212, 219, 0.58);
  font: 10px var(--font-mono);
  letter-spacing: 0.11em;
}
.caption-mobile {
  display: none;
}
.drive-scroll {
  position: absolute;
  bottom: 28px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: rgba(203, 212, 219, 0.6);
  font: 11px var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.drive-scroll span {
  width: 26px;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}
.drive-index {
  position: absolute;
  right: 24px;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(203, 212, 219, 0.54);
  font: 11px var(--font-mono);
}
.drive-index i {
  width: 56px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), rgba(203, 212, 219, 0.2));
}
@media (max-width: 700px) {
  .hero {
    min-height: calc(100svh - 64px);
    height: calc(100svh - 64px);
  }
  .hero-inner {
    align-items: center;
  }
  .hero-copy {
    width: 100%;
    padding: 0 4px;
  }
  .hero-title {
    font-size: clamp(43px, 12vw, 66px);
  }
  .hero-sub {
    max-width: 34ch;
  }
  .drive-caption {
    top: auto;
    bottom: 54px;
    left: 20px;
    right: 20px;
    justify-content: center;
    text-align: center;
    font-size: 8px;
  }
  .drive-caption span:first-child {
    display: none;
  }
  .drive-caption span:last-child {
    display: block;
  }
  .caption-desktop {
    display: none;
  }
  .caption-mobile {
    display: inline;
  }
  .drive-scroll {
    left: 20px;
    bottom: 20px;
  }
  .drive-index {
    right: 20px;
    bottom: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .drive-sweep,
  .hero-copy {
    transition: none;
  }
}

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
p {
  margin: 0 0 1em;
  color: var(--silver);
}
a {
  color: inherit;
}
img,
svg {
  display: block;
  max-width: 100%;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--cyan);
  color: var(--void);
  padding: 10px 16px;
  z-index: 999;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--silver);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px 7px 12px;
  margin-bottom: 18px;
}
.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px 1px rgba(70, 214, 232, 0.55);
  flex-shrink: 0;
}

.grad-text {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(88, 217, 231, 0.55);
  text-decoration-thickness: 2px;
  text-underline-offset: 9px;
}

.section-title {
  font-size: clamp(28px, 3.6vw, 40px);
}
.section-sub {
  color: var(--muted);
  max-width: 46ch;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-primary {
  background: linear-gradient(100deg, var(--cyan), var(--blue));
  color: #051016;
  box-shadow: 0 8px 24px -8px rgba(70, 214, 232, 0.45);
}
.btn-primary:hover {
  box-shadow: 0 10px 30px -6px rgba(70, 214, 232, 0.6);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}
.btn-small {
  padding: 9px 18px;
  font-size: 14px;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 13, 18, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: linear-gradient(var(--blue), var(--cyan));
  opacity: 0.9;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.015em;
}
.brand-mark {
  flex-shrink: 0;
  height: auto;
  filter: saturate(0.88) brightness(0.96);
}

.main-nav {
  display: flex;
  gap: 32px;
}
.main-nav a {
  text-decoration: none;
  color: var(--silver);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.15s ease;
}
.main-nav a:hover {
  color: var(--cyan);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 16px;
  height: 2px;
  background: var(--ink);
  margin: 0 auto;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding: 96px 0 72px;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      48% 60% at 82% 14%,
      rgba(37, 140, 173, 0.13),
      transparent 72%
    ),
    linear-gradient(90deg, rgba(88, 217, 231, 0.035), transparent 38%);
  z-index: -2;
}
#constellation {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.65;
}
.hero-inner {
  position: relative;
  padding-top: 24px;
  padding-bottom: 24px;
}
.hero-title {
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.08;
  margin-bottom: 24px;
  max-width: 17ch;
}
.hero-sub {
  font-size: 18px;
  max-width: 52ch;
  margin-bottom: 36px;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 48px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  list-style: none;
  margin: 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  max-width: 640px;
}
.hero-tags li {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}
.hero-tags li::before {
  content: "◆ ";
  color: var(--cyan);
  font-size: 9px;
}

/* ============================================================
   Divider
   ============================================================ */
.divider {
  padding: 0 0;
}
.divider span {
  display: block;
  height: 1px;
  width: calc(100% - 48px);
  max-width: calc(var(--wrap) - 48px);
  margin: 0 auto;
  background: var(--line);
  position: relative;
}
.divider span::after {
  content: "";
  position: absolute;
  left: 24px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  transform: translateY(-50%);
  box-shadow: 0 0 12px 2px rgba(70, 214, 232, 0.5);
}

/* ============================================================
   Services
   ============================================================ */
.services,
.process,
.about,
.contact {
  padding: 88px 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
  margin-top: 48px;
}
.services .card-grid .card {
  grid-column: span 2;
}
.services .card-grid .card:nth-child(4) {
  grid-column: 2 / span 2;
}
.services .card-grid .card:nth-child(5) {
  grid-column: 4 / span 2;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.018);
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease;
}
.card:hover {
  border-color: rgba(88, 217, 231, 0.38);
  background: #101923;
  transform: translateY(-3px);
}
.card-icon {
  width: 40px;
  height: 40px;
  color: var(--cyan);
  margin-bottom: 20px;
}
.card h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--ink);
}
.card p {
  font-size: 14.5px;
  color: var(--muted);
  margin: 0;
}

.services .card-grid .card {
  display: flex;
  flex-direction: column;
  min-height: 232px;
}
.services .card-grid .card-link {
  margin-top: auto;
  padding-top: 16px;
}

/* ============================================================
   Page hero (secondary pages, e.g. portfolio)
   ============================================================ */
.page-hero {
  padding: 96px 0 56px;
}
.page-hero .section-sub {
  max-width: 60ch;
}

/* ============================================================
   Portfolio
   ============================================================ */
.portfolio {
  padding: 0 0 88px;
}
.portfolio-grid {
  margin-top: 0;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 360px));
  justify-content: center;
}
.portfolio-card {
  display: flex;
  flex-direction: column;
}
.portfolio-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--cyan);
  margin-bottom: 20px;
}
.portfolio-thumb svg {
  width: 40px;
  height: 40px;
}
.portfolio-thumb-img {
  padding: 0;
  overflow: hidden;
}
.portfolio-thumb-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.35s ease;
}
.portfolio-card:hover .portfolio-thumb-img img {
  transform: scale(1.05);
}
.portfolio-thumb-icon img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 20px;
}
.portfolio-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cyan);
  margin: 0 0 8px;
}
.portfolio-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--ink);
}
.portfolio-card p {
  font-size: 14.5px;
  color: var(--muted);
}
.portfolio-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 4px 0 18px;
  padding: 0;
}
.portfolio-stack li {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--silver);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
}
.portfolio-link {
  margin-top: auto;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  color: var(--cyan);
  width: fit-content;
}
.portfolio-link:hover {
  text-decoration: underline;
}
.portfolio-note {
  margin: 40px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 14.5px;
}
.portfolio-note a {
  color: var(--cyan);
  text-decoration: none;
}
.portfolio-note a:hover {
  text-decoration: underline;
}

/* ============================================================
   Category / secondary page nav
   ============================================================ */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
  margin-bottom: 24px;
  transition: color 0.15s ease;
}
.back-link:hover {
  color: var(--cyan);
}

.card-link {
  display: inline-block;
  margin-top: 16px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  color: var(--cyan);
}
.card-link:hover {
  text-decoration: underline;
}

.contact-cta {
  padding: 88px 0;
}
.contact-cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.contact-cta-inner .section-title {
  margin-bottom: 8px;
}
.contact-cta-inner .section-sub {
  margin: 0;
}

/* ============================================================
   Process path
   ============================================================ */
.process-path {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  position: relative;
}
.process-path::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--line);
}
.process-path::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  width: 1px;
  height: 0%;
  background: linear-gradient(var(--cyan), var(--blue));
  transition: height 1.1s cubic-bezier(0.65, 0, 0.35, 1);
}
.process-path.in-view::after {
  height: 100%;
}

.process-path li {
  position: relative;
  padding: 0 0 40px 40px;
}
.process-path li:last-child {
  padding-bottom: 0;
}
.node-dot {
  position: absolute;
  left: 0;
  top: 4px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--muted);
  transition:
    border-color 0.4s ease,
    box-shadow 0.4s ease,
    background 0.4s ease;
}
.process-path.in-view li .node-dot {
  border-color: var(--cyan);
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(70, 214, 232, 0.15);
}
.process-content h3 {
  font-size: 19px;
  margin-bottom: 6px;
}
.process-content p {
  max-width: 52ch;
  margin: 0;
  color: var(--muted);
}

/* ============================================================
   About
   ============================================================ */
.about-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}
.about-text p {
  font-size: 16px;
}
.value-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}
.value-chips li {
  font-size: 13px;
  font-family: var(--font-mono);
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--silver);
}
.about-graphic {
  color: var(--cyan);
  width: 100%;
  height: auto;
}
.about-graphic .graphic-nodes circle {
  fill: var(--cyan);
}
.about-graphic .graphic-nodes circle:nth-child(3n) {
  fill: var(--blue);
}

/* ============================================================
   Contact
   ============================================================ */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 28px;
}
.contact-info a {
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--cyan);
  width: fit-content;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
.contact-info a:hover {
  border-color: var(--cyan);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--muted);
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: var(--void);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 14px;
  resize: vertical;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--cyan);
}
.contact-form button {
  margin-top: 4px;
  justify-content: center;
}
.form-note {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--cyan);
  margin: 0;
  min-height: 1em;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand-footer {
  font-size: 16px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}
.footer-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
}
.footer-nav a:hover {
  color: var(--cyan);
}
.footer-meta {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  font-family: var(--font-mono);
}

/* ============================================================
   Reveal on scroll
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .services .card-grid .card,
  .services .card-grid .card:nth-child(4),
  .services .card-grid .card:nth-child(5) {
    grid-column: auto;
  }
  .about-inner {
    grid-template-columns: 1fr;
  }
  .about-graphic {
    max-width: 280px;
    margin: 0 auto;
  }
  .contact-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .main-nav {
    display: none;
  }
  .header-actions .btn-small {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }

  .site-header.nav-open .main-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    padding: 20px 24px 28px;
    gap: 18px;
    box-shadow: 0 16px 32px -12px rgba(0, 0, 0, 0.6);
  }
  .site-header.nav-open .header-actions .btn-small {
    display: inline-flex;
  }

  .hero {
    padding: 56px 0 48px;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .services,
  .process,
  .about,
  .contact {
    padding: 64px 0;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .page-hero {
    padding: 56px 0 40px;
  }
  .contact-cta-inner {
    text-align: left;
  }
}

/* Keep the interactive opening full-height after the general responsive rules. */
.hero {
  min-height: min(850px, calc(100svh - 72px));
  height: calc(100svh - 72px);
  padding: 0;
  background: #0b1219;
}
.hero::before {
  z-index: 0;
  background:
    radial-gradient(
      ellipse at 68% 45%,
      rgba(23, 90, 112, 0.11),
      transparent 55%
    ),
    linear-gradient(180deg, rgba(11, 18, 25, 0.02), rgba(11, 18, 25, 0.1));
  pointer-events: none;
}
#constellation {
  z-index: 1;
  opacity: 1;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}
.hero-copy {
  width: min(680px, 60%);
}
@media (max-width: 720px) {
  .hero {
    min-height: calc(100svh - 64px);
    height: calc(100svh - 64px);
    padding: 0;
  }
  .hero-copy {
    align-self: flex-start;
    width: 100%;
    padding-top: clamp(38px, 6vh, 56px);
  }
  .hero-title {
    font-size: clamp(40px, 10.5vw, 66px);
  }
  .hero-sub {
    max-width: 33ch;
    font-size: 15px;
  }
  .hero .eyebrow {
    margin-bottom: 12px;
  }
  .drive-start {
    position: relative;
    z-index: 3;
  }
  .drive-scroll {
    z-index: 4;
  }
  .drive-index {
    display: none;
  }
}

/* Depth layers for the cursor-reactive perspective field */
.drive-grid {
  inset: 38% -18% -35%;
  opacity: 0.4;
  background-size: clamp(44px, 5vw, 82px) clamp(44px, 5vw, 82px);
  mask-image:
    linear-gradient(transparent, #000 24%, #000 72%, transparent),
    radial-gradient(ellipse at 50% 55%, #000 20%, transparent 82%);
  mask-composite: intersect;
  transform: perspective(620px) rotateX(67deg) scale(1.65)
    translate3d(var(--drive-x, 0), var(--drive-y, 0), 0);
  transform-origin: 50% 55%;
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.drive-sweep {
  inset: -28% -18%;
  opacity: 0.34;
  background:
    radial-gradient(
      ellipse at 52% 43%,
      rgba(40, 183, 211, 0.12),
      transparent 48%
    ),
    repeating-linear-gradient(
      112deg,
      transparent 0 18%,
      rgba(36, 143, 177, 0.1) 18.08%,
      transparent 18.22% 36%
    );
  mask-image: radial-gradient(ellipse at 52% 45%, #000, transparent 72%);
  transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.hero-copy {
  width: min(760px, 70%);
}
.drive-start {
  cursor: pointer;
}
.drive-caption,
.drive-scroll,
.drive-index {
  z-index: 3;
}
@media (max-width: 720px) {
  .hero-copy {
    width: 100%;
  }
  .drive-grid {
    inset: 42% -65% -22%;
    opacity: 0.34;
  }
}
@media (prefers-reduced-motion: reduce) {
  .drive-grid,
  .drive-sweep,
  .hero-copy {
    transition: none;
  }
}

/* Full-bleed horizontal hero film, with the original copy above the image. */
body:has(.hero-film) .site-header {
  position: sticky;
  top: 0;
  margin-bottom: -72px;
  background: linear-gradient(180deg, rgba(5, 10, 17, 0.74), transparent);
  border-bottom-color: transparent;
  backdrop-filter: blur(8px);
}
body:has(.hero-film) .hero {
  height: 100svh;
  min-height: 620px;
  padding: 0;
  background: #050b12;
}
body:has(.hero-film) .hero::before {
  z-index: 0;
  background:
    radial-gradient(ellipse at 50% 54%, rgba(13, 68, 96, 0.2), transparent 55%),
    linear-gradient(180deg, #070e17 0%, #050b12 100%);
  pointer-events: none;
}
body:has(.hero-film) #constellation {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 0.72;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 0;
}
.hero-copy {
  position: relative;
  z-index: 3;
  width: min(660px, 54vw);
}
.hero .hero-title {
  max-width: none;
  font-size: clamp(42px, 3.6vw, 66px);
  line-height: 0.99;
  letter-spacing: -0.055em;
}
.hero .hero-sub {
  max-width: 42ch;
}
.hero-film {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.hero-film::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(5, 11, 18, 0.94) 0%,
      rgba(5, 11, 18, 0.76) 29%,
      rgba(5, 11, 18, 0.23) 58%,
      rgba(5, 11, 18, 0.08) 100%
    ),
    linear-gradient(
      0deg,
      rgba(5, 11, 18, 0.46),
      transparent 28%,
      transparent 76%,
      rgba(5, 11, 18, 0.24)
    );
}
.hero-film video {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 44% center;
  opacity: 0.9;
  filter: saturate(0.9) brightness(0.82) contrast(1.08);
}
body:has(.hero-film) .hero-inner {
  z-index: 4;
}
@media (max-width: 1100px) and (min-width: 721px) {
  .hero-copy {
    width: min(580px, 56vw);
  }
  .hero-film video {
    object-position: 48% center;
  }
}
@media (max-width: 720px) {
  body:has(.hero-film) .hero {
    min-height: 100svh;
  }
  .hero-inner {
    align-items: flex-start;
    padding-top: clamp(116px, 16vh, 150px);
    padding-bottom: 30px;
  }
  .hero-copy {
    width: 100%;
  }
  .hero .hero-title {
    font-size: clamp(32px, 8.5vw, 46px);
  }
  .hero .hero-sub {
    max-width: 34ch;
    font-size: 15px;
  }
  .hero-film video {
    object-position: 50% center;
  }
  .hero-film::after {
    background: linear-gradient(
      180deg,
      rgba(5, 11, 18, 0.86) 0%,
      rgba(5, 11, 18, 0.66) 36%,
      rgba(5, 11, 18, 0.16) 75%,
      rgba(5, 11, 18, 0.45) 100%
    );
  }
}
