/* ============================================================
   OKTRA — AI systems consulting. Dark, technical, calm.
   Type: Space Grotesk (display/body) + JetBrains Mono (chrome)
   ============================================================ */

:root {
  /* surfaces */
  --bg:        #08090b;
  --bg-2:      #0c0d10;
  --bg-3:      #101115;
  --surface:   #131419;
  --surface-2: #181a20;

  /* lines */
  --line:        rgba(255,255,255,0.08);
  --line-2:      rgba(255,255,255,0.13);
  --line-strong: rgba(255,255,255,0.22);

  /* ink */
  --fg:       #ECEDF1;
  --fg-2:     #B7B9C3;
  --muted:    #8A8C97;
  --dim:      #5A5D69;
  --faint:    #34363F;

  /* accent (tweakable) */
  --accent:      #1f9d63;
  --accent-2:    #45b683;
  --accent-ink:  #ffffff;
  --accent-soft: color-mix(in oklab, var(--accent) 16%, transparent);
  --accent-line: color-mix(in oklab, var(--accent) 40%, transparent);
  --accent-glow: color-mix(in oklab, var(--accent) 55%, transparent);

  /* type */
  --font-head: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-body: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* motion */
  --motion: 1;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* layout */
  --container: 1240px;
  --pad: clamp(20px, 5vw, 64px);
  --nav-h: 76px;

  /* radius */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-pill: 999px;

  /* glass */
  --glass:   color-mix(in oklab, var(--surface) 52%, transparent);
  --glass-2: color-mix(in oklab, var(--surface-2) 60%, transparent);
  --glass-hi: color-mix(in oklab, #fff 6%, transparent);
  --blur: blur(18px) saturate(1.35);

  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-feature-settings: 'ss01' 1, 'ss02' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }

/* headlines use the display face; body inherits --font-body */
h1, h2, h3, h4, .big-quote, .faq-q { font-family: var(--font-head); }

/* serif theme renders lighter & airier so it reads editorial, not faux-bold */
:root[data-font="Editorial"] h1,
:root[data-font="Editorial"] h2,
:root[data-font="Editorial"] h3,
:root[data-font="Editorial"] h4,
:root[data-font="Editorial"] .big-quote,
:root[data-font="Editorial"] .faq-q { font-weight: 400; letter-spacing: -0.012em; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { display: block; max-width: 100%; }

/* film grain + vignette over everything dark */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(120% 80% at 50% -10%, transparent 55%, rgba(0,0,0,0.5) 100%);
  mix-blend-mode: normal;
}

#root { position: relative; z-index: 2; }

/* ---------- shared layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section {
  position: relative;
  padding-block: clamp(80px, 12vh, 160px);
}

/* eyebrow / mono labels */
.mono {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.04em;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-2);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent-line);
}
.eyebrow.no-rule::before { display: none; }

.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin-bottom: clamp(48px, 7vh, 92px);
}
.section-head h2 {
  font-size: clamp(34px, 5.2vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 500;
  margin: 0;
  max-width: 18ch;
  text-wrap: balance;
}
.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.55;
  max-width: 52ch;
}

/* ---------- buttons ---------- */
.btn {
  --bh: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--bh);
  padding: 0 24px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  transition: transform .5s var(--ease), background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
  white-space: nowrap;
}
.btn .label { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 10px; }
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 20%, color-mix(in oklab, #fff 35%, transparent) 50%, transparent 80%);
  transform: translateX(-130%);
  transition: transform .8s var(--ease);
}
.btn-primary:hover::after { transform: translateX(130%); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line-2);
}
.btn-ghost:hover { border-color: var(--line-strong); background: rgba(255,255,255,0.03); transform: translateY(-2px); }
.btn .arrow { transition: transform .4s var(--ease); }
.btn:hover .arrow { transform: translate(3px,-3px); }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 60;
  display: flex;
  align-items: center;
  transition: background .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-bottom-color: var(--line-2);
  box-shadow: 0 10px 40px -24px rgba(0,0,0,0.9);
}
.nav .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--fg);
}
.brand .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulse calc(2.6s / var(--motion)) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--accent-glow); }
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
  transition: color .25s;
  position: relative;
}
.nav-links a:hover { color: var(--fg); }
.nav-right { display: flex; align-items: center; gap: 18px; }
@media (max-width: 860px) {
  .nav-links { display: none; }
}

/* scroll progress */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--accent);
  width: 0%;
  z-index: 70;
  box-shadow: 0 0 12px var(--accent-glow);
}

/* side index */
.side-index {
  position: fixed;
  left: clamp(14px, 2.4vw, 30px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 55;
  display: flex;
  flex-direction: column;
  gap: 16px;
  mix-blend-mode: difference;
}
.side-index .si {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #888;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  transition: color .3s;
}
.side-index .si .bar {
  width: 16px; height: 1px; background: #666; transition: width .35s var(--ease), background .35s;
}
.side-index .si.active { color: #fff; }
.side-index .si.active .bar { width: 30px; background: #fff; }
.side-index .si:hover { color: #fff; }
@media (max-width: 1100px) { .side-index { display: none; } }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}
.hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 1;
}
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(90% 70% at 72% 42%, transparent 42%, var(--bg) 96%),
    linear-gradient(to bottom, transparent 70%, var(--bg) 100%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 3; width: 100%; }

.hero-eyebrow { margin-bottom: 30px; }

.hero h1 {
  font-size: clamp(40px, 7.4vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 500;
  margin: 0;
  max-width: 16ch;
}
.hero h1 .accent { color: var(--accent); }
.hero h1 .muted { color: var(--muted); }

/* masked line-rise reveal (JS/transition driven so it survives paused keyframes) */
.reveal-line { display: block; overflow: hidden; }
.reveal-line > span { display: block; transform: translateY(110%); transition: transform 1.05s var(--ease) var(--d, 0ms); }
.reveal-line.is-in > span { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal-line > span { transform: none !important; } }

.hero-sub {
  margin-top: 34px;
  max-width: 56ch;
  font-size: clamp(16px, 1.55vw, 20px);
  line-height: 1.6;
  color: var(--fg-2);
}
.hero-cta {
  margin-top: 42px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-scroll {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.hero-scroll .track { width: 1px; height: 38px; background: var(--line-2); position: relative; overflow: hidden; }
.hero-scroll .track::after { content:""; position:absolute; top:-50%; left:0; width:100%; height:50%; background: var(--accent); animation: scrolldot calc(2s / var(--motion)) var(--ease-in-out) infinite; }
@keyframes scrolldot { 0%{ transform: translateY(-100%);} 100%{ transform: translateY(300%);} }

/* ---------- ticker ---------- */
.ticker {
  border-block: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden;
  position: relative;
}
.ticker-track {
  display: flex;
  gap: 0;
  width: max-content;
  will-change: transform;
}
@keyframes marquee { to { transform: translateX(-50%); } }
.ticker .item {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 20px 34px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fg-2);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.ticker .item .star { color: var(--accent); font-size: 11px; }

/* ---------- reveal system ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal-l { opacity: 0; transform: translateX(-30px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0ms); }
.reveal-l.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-l { opacity: 1 !important; transform: none !important; }
}

/* ---------- services explorer ---------- */
.svc-explorer {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 18px;
  align-items: stretch;
}
.svc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  outline: none;
}
.svc-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  text-align: left;
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 22px 24px;
  cursor: pointer;
  color: var(--fg);
  position: relative;
  overflow: hidden;
  transition: border-color .4s var(--ease), background .4s var(--ease), transform .4s var(--ease), padding-left .4s var(--ease);
}
.svc-row::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .45s var(--ease);
}
.svc-row:hover { border-color: var(--line-2); }
.svc-row.active {
  background: var(--glass-2);
  border-color: var(--accent-line);
  padding-left: 30px;
}
.svc-row.active::before { transform: scaleY(1); }
.svc-row-n { font-size: 12px; color: var(--dim); letter-spacing: 0.1em; transition: color .3s; }
.svc-row.active .svc-row-n { color: var(--accent-2); }
.svc-row-t { font-family: var(--font-head); font-size: clamp(16px, 1.5vw, 19px); font-weight: 500; letter-spacing: -0.01em; }
.svc-row-arrow { color: var(--faint); transition: color .35s, transform .45s var(--ease); }
.svc-row.active .svc-row-arrow { color: var(--accent); transform: translate(2px, -2px); }
.svc-row-open { border-style: dashed; }
.svc-row-open .svc-row-t { color: var(--fg-2); }

/* detail panel */
.svc-detail {
  position: relative;
  background: var(--glass-2);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: clamp(28px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 70px -40px rgba(0,0,0,0.9), inset 0 1px 0 var(--glass-hi);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.svc-detail.in { opacity: 1; transform: none; }
.svc-detail-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.svc-kicker { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-2); padding-top: 6px; }
.svc-schematic { width: 130px; height: 84px; flex: none; opacity: .9; transition: transform .6s var(--ease); }
.svc-detail-title { font-size: clamp(26px, 3.2vw, 40px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.04; margin: 22px 0 14px; max-width: 18ch; }
.svc-detail-desc { color: var(--fg-2); font-size: clamp(15px, 1.4vw, 17px); line-height: 1.6; margin: 0 0 4px; max-width: 50ch; }
.svc-gives { margin-top: 28px; }
.svc-gives-h { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.svc-gives ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 26px; }
.svc-gives li {
  display: flex; align-items: flex-start; gap: 11px;
  font-size: 14.5px; color: var(--fg); line-height: 1.4;
  opacity: 0; transform: translateY(8px);
  transition: opacity .5s var(--ease) var(--gi, 0ms), transform .5s var(--ease) var(--gi, 0ms);
}
.svc-detail.in .svc-gives li { opacity: 1; transform: none; }
.svc-gives .gv-mk { color: var(--accent); flex: none; margin-top: 1px; }
.svc-detail-foot { margin-top: auto; padding-top: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.svc-detail-foot .tags { display: flex; flex-wrap: wrap; gap: 8px; }
.svc-detail-foot .btn { align-self: flex-start; }

@media (max-width: 920px) {
  .svc-explorer { grid-template-columns: 1fr; }
  .svc-gives ul { grid-template-columns: 1fr; }
}

/* ---------- services carousel (mobile) ---------- */
.svc-mobile { display: none; margin-inline: calc(-1 * var(--pad)); }
.svc-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-inline: var(--pad);
  padding-bottom: 4px;
}
.svc-track::-webkit-scrollbar { display: none; }
.svc-slide {
  flex: 0 0 86%;
  max-width: 460px;
  scroll-snap-align: center;
  display: flex;
}
.svc-slide .svc-detail { width: 100%; }
.svc-slide:last-child { margin-right: var(--pad); }
.svc-detail-open { justify-content: flex-start; }

.svc-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-inline: var(--pad);
  margin-top: 20px;
}
.svc-dots { display: flex; align-items: center; gap: 9px; }
.svc-dot { width: 22px; height: 14px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; align-items: center; }
.svc-dot span { display: block; height: 4px; width: 100%; border-radius: var(--r-pill); background: var(--line-strong); transition: background .3s, width .3s; }
.svc-dot.on span { background: var(--accent); }
.svc-swipe { font-size: 11px; color: var(--dim); letter-spacing: 0.08em; white-space: nowrap; }

@media (max-width: 760px) {
  .svc-desktop { display: none; }
  .svc-mobile { display: block; }
}

/* shared pill tag */
.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-2);
  border: 1px solid var(--line-2);
  padding: 5px 11px;
  border-radius: var(--r-pill);
  letter-spacing: 0.02em;
  transition: border-color .3s, color .3s;
}

/* ---------- process ---------- */
.process { background: var(--bg-2); border-block: 1px solid var(--line); }
.steps { display: grid; gap: 14px; }
.step {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 34px;
  align-items: start;
  padding: 34px 36px;
  position: relative;
  overflow: hidden;
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: background .4s var(--ease), border-color .4s var(--ease), transform .4s var(--ease);
}
.step::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .45s var(--ease);
}
.step:hover {
  background: var(--glass-2);
  border-color: var(--accent-line);
  transform: translateY(-3px);
}
.step:hover::before { transform: scaleY(1); }
.step:last-child { border-bottom: 1px solid var(--line); }
.step .st-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-2);
  letter-spacing: 0.1em;
  padding-top: 12px;
  position: relative; z-index: 1;
}
.step .st-body { position: relative; z-index: 1; }
.step .st-meta { position: relative; z-index: 1; }
.step .st-body h3 { font-size: clamp(24px, 3vw, 38px); font-weight: 500; letter-spacing: -0.025em; margin: 0 0 12px; line-height: 1.05; }
.step .st-body p { color: var(--muted); font-size: 16px; line-height: 1.6; margin: 0; max-width: 60ch; }
.step .st-meta { font-family: var(--font-mono); font-size: 12px; color: var(--dim); text-align: right; padding-top: 10px; white-space: nowrap; }
.step:hover .st-num { color: var(--accent); }
.step:hover .st-meta { color: var(--fg-2); }
@media (max-width: 720px) {
  .step { grid-template-columns: 1fr; gap: 12px; padding: 28px 26px; }
  .step .st-meta { text-align: left; }
}

/* ---------- principle / the right way ---------- */
.right-way { position: relative; overflow: hidden; }
.right-way .big-quote {
  font-size: clamp(30px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 500;
  max-width: 20ch;
  margin: 0 0 60px;
  text-wrap: balance;
}
.right-way .big-quote .hl { color: var(--accent); }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.principle { background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--line); border-radius: var(--r-md); padding: 32px 30px; min-height: 200px; display: flex; flex-direction: column; transition: background .4s, border-color .4s, transform .4s var(--ease); }
.principle:hover { background: var(--glass-2); border-color: var(--accent-line); transform: translateY(-3px); }
.principle .pnum { font-family: var(--font-mono); font-size: 12px; color: var(--accent-2); letter-spacing: 0.1em; }
.principle h4 { font-size: 20px; font-weight: 500; letter-spacing: -0.01em; margin: 20px 0 12px; }
.principle p { color: var(--muted); font-size: 14.5px; line-height: 1.6; margin: 0; }
@media (max-width: 820px) { .principles { grid-template-columns: 1fr; } }

/* ---------- case studies ---------- */
.cases { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.case {
  position: relative;
  border: 1px solid var(--line);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-radius: var(--r-lg);
  padding: 34px 32px 30px;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color .4s, transform .5s var(--ease), background .4s;
}
.case:hover { border-color: var(--line-strong); transform: translateY(-3px); background: var(--glass-2); }
.case .case-tag {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-2);
  display: inline-flex; align-items: center; gap: 9px;
}
.case h3 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 500; letter-spacing: -0.025em; margin: 22px 0 14px; line-height: 1.1; max-width: 20ch; }
.case p { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0; max-width: 44ch; }
.case .redacted { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.case .rd { height: 12px; border-radius: 2px; background: repeating-linear-gradient(45deg, var(--faint) 0 6px, transparent 6px 12px); }
.case .case-foot {
  margin-top: auto; padding-top: 26px;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--line);
}
.case .locked {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--dim);
  display: inline-flex; align-items: center; gap: 8px; letter-spacing: 0.03em;
}
.case .stat-row { display: flex; gap: 28px; margin-top: 20px; }
.case .stat .v { font-family: var(--font-mono); font-size: clamp(24px,3vw,34px); color: var(--fg); letter-spacing: -0.02em; }
.case .stat .k { font-family: var(--font-mono); font-size: 11px; color: var(--dim); letter-spacing: 0.05em; margin-top: 4px; }
.case .ghost-grid { position: absolute; inset: 0; opacity: .45; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 42px 42px; -webkit-mask-image: linear-gradient(to top left, #000, transparent 62%); mask-image: linear-gradient(to top left, #000, transparent 62%); pointer-events: none; }
@media (max-width: 760px) { .cases { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq-list { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); overflow: hidden; padding-inline: clamp(20px, 3vw, 34px); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 0; }
.faq-q {
  width: 100%; background: none; border: 0; text-align: left; cursor: pointer;
  padding: 30px 0; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  color: var(--fg); font-family: var(--font-head); font-size: clamp(18px, 2.2vw, 25px); font-weight: 500; letter-spacing: -0.02em;
  transition: color .3s;
}
.faq-q:hover { color: var(--accent-2); }
.faq-q .pm { position: relative; width: 18px; height: 18px; flex: none; }
.faq-q .pm::before, .faq-q .pm::after { content:""; position:absolute; background: var(--accent); transition: transform .4s var(--ease), opacity .3s; }
.faq-q .pm::before { left: 0; right: 0; top: 50%; height: 1.5px; transform: translateY(-50%); }
.faq-q .pm::after { top: 0; bottom: 0; left: 50%; width: 1.5px; transform: translateX(-50%); }
.faq-item.open .pm::after { transform: translateX(-50%) scaleY(0); opacity: 0; }
.faq-a { overflow: hidden; max-height: 0; transition: max-height .5s var(--ease); }
.faq-a-inner { padding: 0 0 30px; color: var(--muted); font-size: 16px; line-height: 1.65; max-width: 70ch; }

/* ---------- contact — conversational ---------- */
.contact { background: var(--bg-2); border-top: 1px solid var(--line); }
.cf-head { text-align: center; margin-bottom: 36px; display: grid; justify-items: center; gap: 18px; }
.cf-head h2 { font-size: clamp(32px, 4.6vw, 56px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.02; margin: 0; max-width: 18ch; text-wrap: balance; }

.cf-panel {
  position: relative;
  max-width: 760px;
  margin-inline: auto;
  background: var(--glass-2);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: clamp(26px, 3.4vw, 44px);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 40px 90px -50px rgba(0,0,0,0.95), inset 0 1px 0 var(--glass-hi);
}
.cf-bar { display: flex; align-items: center; gap: 8px; position: relative; z-index: 2; }
.cf-seg { flex: 1; height: 4px; padding: 0; border: 0; background: none; cursor: default; }
.cf-seg span { display: block; height: 4px; border-radius: var(--r-pill); background: var(--line-2); transition: background .45s var(--ease); }
.cf-seg.done { cursor: pointer; }
.cf-seg.done span { background: var(--accent-2); }
.cf-seg.on span { background: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
.cf-count { margin-left: 14px; font-size: 11px; color: var(--dim); letter-spacing: 0.08em; white-space: nowrap; }

.cf-stage { position: relative; z-index: 2; padding-block: clamp(26px, 4vh, 48px); flex: 1; opacity: 0; transform: translateY(10px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.cf-stage.in { opacity: 1; transform: none; }
.cf-q { font-family: var(--font-head); font-size: clamp(24px, 3.2vw, 38px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; margin: 0 0 12px; max-width: 20ch; }
.cf-hint { color: var(--muted); font-size: 15px; line-height: 1.55; margin: 0 0 26px; max-width: 48ch; }

.cf-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.cf-choice {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--font-body); font-size: 15px; color: var(--fg);
  background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-pill);
  padding: 12px 20px; cursor: pointer;
  transition: border-color .25s, background .25s, transform .25s var(--ease);
}
.cf-choice:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.cf-choice-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); transition: background .25s, box-shadow .25s; }
.cf-choice.on { background: var(--accent-soft); border-color: var(--accent); }
.cf-choice.on .cf-choice-dot { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

.cf-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  color: var(--fg);
  font-family: var(--font-head);
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 500;
  letter-spacing: -0.02em;
  padding: 18px 20px;
  outline: none;
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.cf-input::placeholder { color: var(--faint); }
.cf-input:focus { border-color: var(--accent); background: var(--bg-3); box-shadow: 0 0 0 4px var(--accent-soft); }
.cf-textarea { font-size: clamp(16px, 1.7vw, 20px); font-family: var(--font-body); font-weight: 400; line-height: 1.5; min-height: 130px; resize: vertical; }
.cf-err { color: #ff7088; font-size: 12px; min-height: 18px; margin-top: 12px; }

.cf-foot { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 8px; border-top: 1px solid var(--line); margin-top: auto; padding-block-start: 22px; }
.cf-back { background: none; border: 0; color: var(--muted); font-family: var(--font-mono); font-size: 13px; cursor: pointer; transition: color .25s, opacity .25s; }
.cf-back:hover { color: var(--fg); }
.cf-back.hidden { opacity: 0; pointer-events: none; }
.cf-foot-right { display: flex; align-items: center; gap: 16px; }
.cf-enter { font-size: 11px; color: var(--dim); letter-spacing: 0.05em; }

.cf-success { position: relative; z-index: 2; display: grid; gap: 16px; align-content: center; justify-items: start; min-height: 360px; }
.cf-success .ok-mark { width: 50px; height: 50px; border: 1px solid var(--accent); border-radius: 50%; display: grid; place-items: center; color: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.cf-success h3 { font-size: clamp(26px, 3vw, 34px); font-weight: 500; letter-spacing: -0.025em; margin: 0; }
.cf-success p { color: var(--fg-2); font-size: 16px; line-height: 1.6; margin: 0; max-width: 46ch; }

.cf-assure { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 36px; margin-top: 30px; }
.cf-assure span { color: var(--muted); font-size: 13.5px; display: inline-flex; align-items: center; gap: 9px; }
.cf-assure .mono { color: var(--accent-2); font-size: 11px; }

@media (max-width: 560px) {
  .cf-foot { flex-direction: column-reverse; align-items: stretch; gap: 14px; }
  .cf-foot-right { justify-content: space-between; }
  .cf-enter { display: none; }
  .cf-assure { flex-direction: column; align-items: center; gap: 10px; }
}

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 56px; background: var(--bg); }
.footer .wrap { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer .f-brand { display: grid; gap: 16px; max-width: 320px; }
.footer .f-brand .brand { font-size: 22px; }
.footer .f-brand p { color: var(--dim); font-size: 13px; line-height: 1.6; margin: 0; }
.footer .f-cols { display: flex; gap: clamp(36px, 7vw, 90px); flex-wrap: wrap; flex: none; }
.footer .f-col { display: grid; gap: 12px; align-content: start; flex: none; }
.footer .f-col .h { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.footer .f-col a { color: var(--fg-2); font-size: 14px; transition: color .25s; white-space: nowrap; cursor: pointer; }
.footer .f-col a:hover { color: var(--accent-2); }
.footer .f-bottom { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 26px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer .f-bottom span { font-family: var(--font-mono); font-size: 11px; color: var(--dim); letter-spacing: 0.03em; }

/* big background wordmark */
.bg-mark {
  position: absolute; left: 0; right: 0; bottom: -3vw;
  font-family: var(--font-mono); font-weight: 700;
  font-size: 26vw; line-height: .8; letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-2);
  text-align: center;
  pointer-events: none; user-select: none;
  opacity: .6;
}

/* number counter */
.counter { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }

/* utility */
.kbd-hint { font-family: var(--font-mono); font-size: 11px; color: var(--dim); }
.divider-dot { color: var(--faint); }

/* ============================================================
   MOBILE POLISH
   ============================================================ */
@media (max-width: 860px) {
  :root { --nav-h: 64px; }
  .nav-right .btn { --bh: 40px; padding: 0 18px; font-size: 12px; }
  .brand { font-size: 17px; }
}

@media (max-width: 680px) {
  /* tighten vertical rhythm */
  .section { padding-block: clamp(64px, 9vh, 110px); }
  .section-head { margin-bottom: clamp(36px, 6vh, 60px); }

  /* hero */
  .hero h1 { letter-spacing: -0.035em; font-size: clamp(33px, 8.8vw, 46px); }
  .hero-sub { margin-top: 26px; font-size: 16px; }
  .hero-cta { margin-top: 32px; width: 100%; }
  .hero-cta .btn { flex: 1; min-width: 0; }
  .hero-scroll { display: none; }

  /* services explorer */
  .svc-row { padding: 18px 18px; gap: 14px; }
  .svc-row.active { padding-left: 22px; }
  .svc-detail { padding: 24px 22px; }
  .svc-detail-top { flex-direction: column-reverse; align-items: flex-start; gap: 6px; }
  .svc-schematic { width: 96px; height: 60px; align-self: flex-end; margin-top: -6px; }
  .svc-detail-title { font-size: clamp(24px, 7vw, 30px); margin-top: 16px; }
  .svc-detail-foot .btn { width: 100%; }

  /* process */
  .step { padding: 24px 22px; }
  .step .st-num { padding-top: 0; }

  /* contact */
  .cf-panel { padding: 24px 20px; min-height: 0; border-radius: var(--r-md); }
  .cf-q { font-size: clamp(22px, 6.4vw, 28px); }
  .cf-choice { padding: 12px 16px; font-size: 14px; }
  .cf-input { font-size: 20px; padding: 15px 16px; }
  .cf-foot .btn { flex: 1; }

  /* footer */
  .footer .wrap { flex-direction: column; gap: 36px; }
  .footer .f-bottom { flex-direction: column; gap: 10px; }
}

@media (max-width: 420px) {
  .svc-gives ul { gap: 14px; }
  .nav-right .btn { padding: 0 15px; }
}

/* touch devices: neutralize hover-only affordances so cards aren't stuck in hover state */
@media (hover: none) {
  .svc-row:hover { transform: none; }
  .step:hover { transform: none; }
  .case:hover, .principle:hover { transform: none; }
}
