@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/instrumentserif-400-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/instrumentserif-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/inter-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/jetbrainsmono-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/spacegrotesk-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/spacegrotesk-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ═══════════════════════════════════════════
   Kaanha Tech — design system
   ═══════════════════════════════════════════ */

:root {
  /* Color */
  --ink-950: #0A0B0E;
  --ink-900: #101218;
  --ink-800: #181B23;
  --line: rgba(235, 232, 225, 0.12);
  --text-primary: #EBE8E1;
  --text-muted: #9A9890;
  --accent-indigo: #7A88FF; /* ≥4.5:1 as small text on --ink-800 */
  --accent-gold: #D9A441;
  --steel: #6E7687;
  --light-bg: #F4F2ED;
  --light-text: #14161C;
  --light-muted: #5A5D66;
  --light-line: rgba(20, 22, 28, 0.14);

  /* Type */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --fs-display: clamp(2.8rem, 7vw, 6.5rem);
  --fs-h2: clamp(2rem, 4.5vw, 3.5rem);
  --fs-h3: clamp(1.4rem, 2.5vw, 1.9rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.875rem;
  --fs-label: 0.75rem;

  /* Layout */
  --container: 1320px;
  --gutter: 24px;
  --radius-s: 4px;
  --radius-m: 8px;
  --radius-l: 12px;
  --section-pad: clamp(96px, 12vw, 192px);
}

/* ── Reset & base ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.lenis { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--ink-950);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0 0 0.5em; }
h1 { font-size: var(--fs-display); line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); line-height: 1.1; letter-spacing: -0.015em; }
h3 { font-size: var(--fs-h3); line-height: 1.2; font-weight: 500; }
p { margin: 0 0 1em; max-width: 68ch; }
a { color: inherit; }
ul, ol, dl, blockquote, figure { margin: 0; padding: 0; }
li { list-style: none; }
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; }

:focus-visible {
  outline: 2px solid var(--accent-indigo);
  outline-offset: 3px;
  border-radius: 2px;
}
.section--light :focus-visible { outline-color: var(--light-text); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.skip-link {
  position: fixed; top: -100px; left: 16px; z-index: 200;
  background: var(--accent-gold); color: var(--ink-950);
  padding: 12px 20px; border-radius: var(--radius-m);
  font-family: var(--font-display); font-weight: 500; text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

/* Grain overlay */
.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%;
  background: var(--accent-gold); transform: scaleX(0); transform-origin: left;
  z-index: 150;
}

/* ── Layout primitives ────────────────────── */
.container {
  width: 100%; max-width: var(--container);
  margin-inline: auto; padding-inline: var(--gutter);
}
.container--narrow { max-width: 900px; }
.section { padding-block: var(--section-pad); position: relative; }
.section--light { background: var(--light-bg); color: var(--light-text); }
.section--light p { color: var(--light-text); }
.section--light .section__lead, .section--light .eyebrow { color: var(--light-muted); }
.section--light .eyebrow { color: #8A6316; } /* ≥4.5:1 on --light-bg at 12px */
.section__lead { font-size: 1.25rem; line-height: 1.6; color: var(--text-muted); max-width: 58ch; }
.section__cta { margin-top: 64px; }

.eyebrow {
  font-family: var(--font-mono); font-size: var(--fs-label);
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent-gold); margin-bottom: 24px;
}
.eyebrow--card { margin-bottom: 16px; }

.card__num {
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: 0.08em; color: var(--text-muted); display: block; margin-bottom: 12px;
}

/* Reveal gating: CSS transitions driven by one IntersectionObserver (html.anim set by JS) */
html.anim [data-reveal] {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
html.anim [data-reveal].in { opacity: 1; transform: none; }
html.anim [data-reveal-lines] .line {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.19, 1, 0.22, 1), transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
  transition-delay: calc(var(--i, 0) * 0.12s);
}
html.anim [data-reveal-lines].in .line { opacity: 1; transform: none; }
[data-reveal-lines] .line { display: block; }
h2 [data-reveal-lines] { display: inline; }
h2 .line { display: inline-block; margin-right: 0.25em; }
.hero__title .line, .mission__statement .line { display: block; margin-right: 0; }

/* ── Buttons ──────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 500; font-size: 1rem;
  text-decoration: none; border-radius: 999px; cursor: pointer;
  padding: 14px 28px; border: 1px solid transparent;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s, border-color 0.25s, color 0.25s;
}
.btn--primary {
  background: var(--accent-gold); color: var(--ink-950);
}
.btn--primary::after { content: "→"; transition: transform 0.25s; }
.btn--primary:hover { transform: translateY(-2px); background: #E4B458; }
.btn--primary:hover::after { transform: translateX(4px); }
.btn--ghost {
  border-color: var(--line); color: var(--text-primary); background: transparent;
}
.btn--ghost:hover { border-color: var(--text-muted); transform: translateY(-2px); }
.section--light .btn--ghost { border-color: var(--light-line); color: var(--light-text); }

/* ── Navigation ───────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 40px;
  padding: 16px var(--gutter);
  background: color-mix(in srgb, var(--ink-950) 90%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  transition: background 0.35s, color 0.35s, border-color 0.35s;
}
.nav--on-light {
  background: color-mix(in srgb, var(--light-bg) 88%, transparent);
  color: var(--light-text);
  border-bottom-color: var(--light-line);
}
.nav__brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.125rem;
  text-decoration: none; letter-spacing: -0.01em;
}
.nav__brand img { width: 44px; height: 25px; }
.nav__links { display: flex; gap: 28px; margin-left: auto; }
.nav__links a {
  text-decoration: none; font-size: var(--fs-small);
  font-family: var(--font-display); font-weight: 500;
  color: inherit; opacity: 0.8; transition: opacity 0.2s;
}
.nav__links a:hover { opacity: 1; }
.nav__cta { padding: 10px 20px; font-size: var(--fs-small); }
.nav__burger { display: none; }

.mobile-menu {
  position: fixed; inset: 0; z-index: 99;
  background: var(--ink-950);
  padding: 100px var(--gutter) 40px;
}
.mobile-menu nav { display: flex; flex-direction: column; gap: 8px; }
.mobile-menu a {
  font-family: var(--font-display); font-weight: 500; font-size: 1.75rem;
  text-decoration: none; padding: 12px 0; color: var(--text-primary);
}
.mobile-menu .btn { font-size: 1.1rem; margin-top: 24px; justify-content: center; }

/* ── Hero ─────────────────────────────────── */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
}
.hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,11,14,0.55) 0%, rgba(10,11,14,0.35) 45%, rgba(10,11,14,0.85) 100%);
}
.hero__content { position: relative; z-index: 2; padding-top: 96px; }
.hero__title { max-width: 16ch; }
.hero__title em { color: var(--accent-gold); }
.hero__sub { font-size: 1.25rem; color: var(--text-primary); opacity: 0.85; max-width: 52ch; margin-top: 8px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }
.hero__scroll {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: var(--fs-label);
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted);
}
.hero__scroll-line {
  width: 1px; height: 40px; background: var(--text-muted);
  animation: scrollPulse 2.2s ease-in-out infinite; transform-origin: top;
}
@keyframes scrollPulse {
  0% { transform: scaleY(0); opacity: 0; }
  40% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(20px); opacity: 0; }
}

/* ── Credibility strip ────────────────────── */
.strip {
  border-block: 1px solid var(--line);
  padding-block: 20px; overflow: hidden;
  background: var(--ink-900);
}
.strip__track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.strip:hover .strip__track { animation-play-state: paused; }
.strip__list { display: flex; }
.strip__list li {
  font-family: var(--font-mono); font-size: var(--fs-small);
  color: var(--text-muted); white-space: nowrap; padding-right: 24px;
}
.strip__list li::after { content: "·"; color: var(--accent-gold); margin-left: 24px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── Problem ──────────────────────────────── */
.problem__diagram {
  width: 100%; max-width: 720px; margin: 56px 0;
  color: var(--steel);
}
.problem__diagram .pd__x { stroke: var(--accent-gold); }
.problem__diagram .pd__labels text { font-family: var(--font-mono); fill: var(--text-muted); }
.problem__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin-top: 24px;
}
.card {
  background: var(--ink-800); border: 1px solid var(--line);
  border-radius: var(--radius-l); padding: 32px;
  transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
}
.card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border-color: rgba(235, 232, 225, 0.22);
}
.card h3 { font-size: 1.2rem; margin-bottom: 12px; }
.card p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 0.6em; }
.card p:last-of-type { margin-bottom: 0; }

/* ── Mission ──────────────────────────────── */
.mission__statement {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(1.8rem, 4.2vw, 3.2rem); line-height: 1.25;
  max-width: 24ch; margin-bottom: 40px; color: var(--light-text);
}
.mission__statement em { color: #A3771E; }

/* ── Pillars ──────────────────────────────── */
.pillars__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 64px;
}
.pillar {
  background: var(--ink-900); border: 1px solid var(--line);
  border-radius: var(--radius-l); padding: 40px 32px;
  display: flex; flex-direction: column; gap: 4px;
}
.pillar h3 { font-size: 1.35rem; }
.pillar__meta { font-size: 0.95rem; color: var(--text-muted); }
.pillar__meta strong { color: var(--text-primary); font-weight: 500; }
.taglist { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.taglist li {
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: 0.02em; color: var(--text-muted);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 12px;
}

/* ── Method ───────────────────────────────── */
.method__intro { max-width: 760px; }
.method__contrast {
  font-size: 1.35rem; line-height: 1.5; margin-top: 24px;
  border-left: 2px solid var(--accent-gold); padding-left: 24px;
}
.method__contrast em { color: var(--accent-gold); }
.media {
  border-radius: var(--radius-l); overflow: hidden; margin-block: 64px;
  border: 1px solid var(--line);
}
.media video { width: 100%; }
.method__track-wrap { overflow: hidden; }
.method__track {
  display: grid; gap: 16px; counter-reset: step;
}
.method-step {
  background: var(--ink-900); border: 1px solid var(--line);
  border-radius: var(--radius-l); padding: 28px;
}
.method-step h3 { font-size: 1.15rem; margin-bottom: 8px; }
.method-step p { font-size: 0.95rem; color: var(--text-muted); margin: 0; }

/* Desktop pinned horizontal track (applied by JS) */
.method--pinned .method__track {
  display: flex; gap: 20px; width: max-content;
}
.method--pinned .method-step { width: 360px; flex-shrink: 0; }

/* ── Lifecycle stepper ────────────────────── */
.stepper { margin-top: 56px; border-top: 1px solid var(--line); }
.stepper__item { border-bottom: 1px solid var(--line); }
.stepper__item h3 { margin: 0; }
.stepper__btn {
  width: 100%; display: flex; align-items: baseline; gap: 24px;
  background: none; border: 0; color: var(--text-primary);
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem); text-align: left;
  padding: 28px 8px; cursor: pointer;
}
.stepper__btn .card__num { margin: 0; min-width: 90px; }
.stepper__btn::after {
  content: "+"; margin-left: auto; font-family: var(--font-mono);
  color: var(--accent-gold); transition: transform 0.3s;
}
.stepper__btn[aria-expanded="true"]::after { transform: rotate(45deg); }
.stepper__panel { padding: 0 8px 36px calc(90px + 32px); }
.stepper__panel dl {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 20px;
}
.stepper__panel dt {
  font-family: var(--font-mono); font-size: var(--fs-label);
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-gold);
  margin-bottom: 6px;
}
.stepper__panel dd { margin: 0; font-size: 0.95rem; color: var(--text-muted); }
.lifecycle__formats {
  margin-top: 48px; font-size: 0.95rem; color: var(--text-muted); max-width: none;
}
.lifecycle__formats strong { color: var(--text-primary); font-weight: 500; }

/* ── Story ────────────────────────────────── */
.story__body p { font-size: 1.15rem; line-height: 1.7; }
.story__quote {
  border-left: 2px solid var(--accent-gold);
  padding-left: 28px; margin-block: 40px;
}
.story__quote p {
  font-family: var(--font-serif); font-size: clamp(1.4rem, 2.8vw, 2rem);
  line-height: 1.4; color: var(--text-primary); margin: 0;
}

/* ── Solutions ────────────────────────────── */
.solutions__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 64px;
}
.card--solution { display: flex; flex-direction: column; }
.card--solution p strong { color: var(--text-primary); font-weight: 500; }
.card__systems {
  font-family: var(--font-mono); font-size: var(--fs-label);
  color: var(--text-muted); margin-top: auto; padding-top: 16px;
}
.card__link {
  font-family: var(--font-display); font-weight: 500; font-size: var(--fs-small);
  color: var(--accent-indigo); text-decoration: none; margin-top: 8px;
  display: inline-block; padding-block: 4px; /* ≥24px target (WCAG 2.5.8) */
}
.card__link:hover { text-decoration: underline; }

/* ── Use cases ────────────────────────────── */
.usecases__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 64px;
}
.usecases__grid li {
  border: 1px solid var(--line); border-radius: var(--radius-l);
  padding: 24px; background: var(--ink-900);
}
.usecases__grid h3 { font-size: 1.05rem; margin: 12px 0 8px; }
.usecases__grid p { font-size: 0.9rem; color: var(--text-muted); margin: 0; }
.tag {
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: 0.04em; color: var(--accent-gold);
}

/* ── Work ─────────────────────────────────── */
.work__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 64px;
}
p.badge { /* p. keeps it above the `.card p` muted override */
  display: inline-block; font-family: var(--font-mono); font-size: var(--fs-label);
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent-indigo); border: 1px solid color-mix(in srgb, var(--accent-indigo) 40%, transparent);
  border-radius: 999px; padding: 4px 12px; margin-bottom: 20px;
}
.card__shot {
  margin: 0 -32px 20px; overflow: hidden;
  border-block: 1px solid var(--line);
}
.card__shot img {
  width: 100%; height: auto; display: block;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.card--work:hover .card__shot img { transform: scale(1.03); }
.work__meta div { margin-bottom: 14px; }
.work__meta dt {
  font-family: var(--font-mono); font-size: var(--fs-label);
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted);
  margin-bottom: 4px;
}
.work__meta dd { margin: 0; font-size: 0.95rem; color: var(--text-muted); }

/* ── Architecture ─────────────────────────── */
.arch {
  width: 100%; max-width: 760px; margin: 64px auto 0; display: block;
}
.arch__layer rect {
  fill: var(--ink-800); stroke: var(--line); stroke-width: 1;
  transition: stroke 0.25s, fill 0.25s;
}
.arch__layer text {
  fill: var(--text-muted); font-family: var(--font-mono); font-size: 13px;
  text-anchor: middle; transition: fill 0.25s;
}
.arch__layer { cursor: pointer; }
.arch__layer:hover rect, .arch__layer:focus rect, .arch__layer.is-active rect {
  stroke: var(--accent-indigo); fill: #1B1F2E;
}
.arch__layer:hover text, .arch__layer:focus text, .arch__layer.is-active text {
  fill: var(--text-primary);
}
.arch__layer--gold rect { stroke: color-mix(in srgb, var(--accent-gold) 55%, transparent); }
.arch__layer--gold text { fill: var(--accent-gold); }
.arch__layer--gold:hover rect, .arch__layer--gold:focus rect { stroke: var(--accent-gold); fill: #221D12; }
.arch__layer--frame rect { fill: transparent; }
.arch-line { stroke: var(--steel); }
.arch-line--gold { stroke: var(--accent-gold); }
.arch-line--side { stroke-dasharray: 3 5; }
.arch__caption {
  text-align: center; font-family: var(--font-mono); font-size: var(--fs-small);
  color: var(--text-muted); margin: 24px auto 0; max-width: 60ch; min-height: 3em;
}
.techmatrix {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 32px; margin-top: 80px;
}
.techmatrix__title {
  font-size: 0.95rem; font-family: var(--font-mono); font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-gold);
  margin-bottom: 16px;
}
.techmatrix__note {
  margin-top: 40px; font-size: var(--fs-small); color: var(--text-muted); max-width: none;
}

/* ── Security ─────────────────────────────── */
.security__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 64px;
}
.security__grid li {
  border: 1px solid var(--light-line); border-radius: var(--radius-l);
  padding: 28px; background: #FFFFFF;
}
.security__grid h3 { font-size: 1.05rem; margin-bottom: 8px; color: var(--light-text); }
.security__grid p { font-size: 0.92rem; color: var(--light-muted); margin: 0; }

/* ── Contact / final CTA ──────────────────── */
.contact { overflow: hidden; }
.contact__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.contact__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,11,14,0.92) 0%, rgba(10,11,14,0.82) 100%);
}
.contact__inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start;
}
.contact__alt { font-size: var(--fs-small); color: var(--text-muted); }

.form {
  background: var(--ink-900); border: 1px solid var(--line);
  border-radius: var(--radius-l); padding: 40px;
}
.form__title { font-size: 1.3rem; margin-bottom: 28px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form__field { margin-bottom: 18px; display: flex; flex-direction: column; }
.form__field label {
  font-family: var(--font-mono); font-size: var(--fs-label);
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); margin-bottom: 8px;
}
.form__optional { text-transform: none; letter-spacing: 0; }
.form__field input, .form__field select, .form__field textarea {
  background: var(--ink-950); border: 1px solid var(--line);
  border-radius: var(--radius-m); color: var(--text-primary);
  font-family: var(--font-body); font-size: 1rem;
  padding: 12px 14px; width: 100%;
  transition: border-color 0.2s;
}
.form__field input:focus, .form__field select:focus, .form__field textarea:focus {
  border-color: var(--accent-indigo); outline: none;
}
.form__field input[aria-invalid="true"], .form__field textarea[aria-invalid="true"] {
  border-color: #C4554D;
}
.form__field textarea { resize: vertical; }
.form__field ::placeholder { color: var(--text-muted); opacity: 1; }
.form__error { color: #E58680; font-size: var(--fs-small); margin: 6px 0 0; }
.form__submit { width: 100%; justify-content: center; margin-top: 8px; }
.form__status { margin-top: 16px; font-size: var(--fs-small); color: var(--accent-gold); min-height: 1.5em; }

/* ── Footer ───────────────────────────────── */
.footer {
  border-top: 1px solid var(--line); padding-block: 80px 40px;
  background: var(--ink-900);
}
.footer__grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px;
}
.footer__brand p { color: var(--text-muted); font-size: 0.95rem; margin-block: 20px 24px; }
.footer__nav { display: flex; flex-direction: column; gap: 12px; }
.footer__nav a, .footer__meta a {
  color: var(--text-muted); text-decoration: none; font-size: var(--fs-small);
  display: inline-block; padding-block: 4px; /* ≥24px target (WCAG 2.5.8) */
}
.footer__nav a:hover, .footer__meta a:hover { color: var(--text-primary); }
.footer__meta p { font-size: var(--fs-small); color: var(--text-muted); margin-bottom: 12px; }
.footer__copy { color: var(--text-muted); margin-top: 32px; }

/* ── Legal pages ──────────────────────────── */
.legal { padding-top: calc(var(--section-pad) / 1.5 + 60px); }
.legal__title { font-size: clamp(2rem, 5vw, 3.2rem); }
.legal__meta {
  font-family: var(--font-mono); font-size: var(--fs-label);
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted);
  margin-bottom: 48px;
}
.legal h2 { font-size: 1.25rem; margin-top: 48px; }
.legal p { color: var(--text-muted); }
.legal a { color: var(--text-primary); }

/* ═══════════════ Responsive ═══════════════ */
@media (max-width: 1279px) {
  .problem__grid, .pillars__grid, .solutions__grid, .work__grid, .security__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .usecases__grid { grid-template-columns: repeat(3, 1fr); }
  .techmatrix { grid-template-columns: repeat(3, 1fr); }
  .contact__inner { grid-template-columns: 1fr; gap: 56px; }
}

@media (max-width: 767px) {
  :root { --gutter: 16px; }
  .nav { gap: 16px; }
  .nav__links, .nav__cta { display: none; }
  .nav__burger {
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
    margin-left: auto; background: none; border: 0; cursor: pointer;
    width: 44px; height: 44px; align-items: center;
  }
  .nav__burger span {
    display: block; width: 24px; height: 2px; background: currentColor;
    transition: transform 0.3s, opacity 0.3s;
  }
  .nav__burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav__burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

  .problem__grid, .pillars__grid, .solutions__grid, .work__grid,
  .security__grid, .usecases__grid { grid-template-columns: 1fr; }
  .techmatrix { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .form { padding: 24px; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
  .stepper__btn { gap: 12px; flex-wrap: wrap; padding-inline: 0; }
  .stepper__btn .card__num { min-width: 0; width: 100%; }
  .stepper__panel { padding-left: 0; }
  .stepper__panel dl { grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .hero__scroll { display: none; }
  .grain { display: none; } /* full-viewport blend is measurable jank on mobile GPUs */
  .nav { backdrop-filter: none; background: var(--ink-950); }
  .section__cta .btn { width: 100%; justify-content: center; }
}

/* ═══════════════ Reduced motion ═══════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .strip__track { animation: none; flex-wrap: wrap; width: auto; }
  .strip__list { flex-wrap: wrap; row-gap: 8px; }
  .strip__list[aria-hidden="true"] { display: none; }
  .hero__scroll-line { animation: none; }
  html.anim [data-reveal],
  html.anim [data-reveal-lines] .line { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
