/* ==========================================================================
   Quailworks — site styles
   ========================================================================== */

@font-face { font-family: 'Geist'; src: url('../fonts/geist-latin.woff2') format('woff2'); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('../fonts/geist-mono-latin.woff2') format('woff2'); font-weight: 400 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('../fonts/instrument-serif-latin.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('../fonts/instrument-serif-italic-latin.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --bg: #F5F4EF;
  --bg-2: #EDEBE4;
  --surface: #FBFAF7;
  --ink: #0F0F0D;
  --ink-2: #3B3A36;
  --ink-3: #6B6A64;
  --line: #DCD9D0;
  --line-2: #C6C3B9;
  --accent: #FF4F00;
  --accent-ink: #C23A00;
  --night: #0E0E0C;
  --night-2: #151512;
  --night-3: #1D1D19;
  --night-line: #2D2C28;
  --night-text: #F2F1EC;
  --night-muted: #9D9B93;
  --accent-night: #FF6A26;
  --ok: #4CC38A;

  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1280px;
  --pad: 56px;
  --section-y: 128px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; }
::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 6px; font-size: 14px; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Frame: hairline rails + crosshair markers ───────────────────────── */
.section { border-top: 1px solid var(--line); position: relative; overflow-x: clip; }
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
  position: relative;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.section > .wrap { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.section > .wrap::before,
.section > .wrap::after {
  content: '';
  position: absolute;
  top: -6px;
  width: 11px;
  height: 11px;
  background:
    linear-gradient(var(--ink-3), var(--ink-3)) center / 1px 100% no-repeat,
    linear-gradient(var(--ink-3), var(--ink-3)) center / 100% 1px no-repeat;
}
.section > .wrap::before { left: -6px; }
.section > .wrap::after { right: -6px; }

.dark { background: var(--night); color: var(--night-text); border-top-color: var(--night-line); }
.dark .wrap { border-color: var(--night-line); }
.dark > .wrap::before, .dark > .wrap::after {
  background:
    linear-gradient(var(--night-muted), var(--night-muted)) center / 1px 100% no-repeat,
    linear-gradient(var(--night-muted), var(--night-muted)) center / 100% 1px no-repeat;
}
.tint { background: var(--bg-2); }

/* ── Type ────────────────────────────────────────────────────────────── */
.label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.label::before { content: ''; width: 7px; height: 7px; background: var(--accent); }
.dark .label { color: var(--accent-night); }
.dark .label::before { background: var(--accent-night); }

.display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.98;
}
.display em { font-style: italic; }
.display .dot { color: var(--accent); }
.dark .display .dot { color: var(--accent-night); }
.muted-em em { color: var(--ink-3); }
.dark .muted-em em { color: var(--night-muted); }

.h2 { font-size: clamp(42px, 5.4vw, 76px); }
.lede { font-size: 19px; line-height: 1.55; color: var(--ink-2); }
.dark .lede { color: var(--night-muted); }

.section-head {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 72px;
}
.section-head .h2 { margin-top: 22px; }
.section-head .lede { font-size: 17.5px; max-width: 470px; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s var(--ease);
}
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink:hover { background: #2A2A26; }
.btn-ink .arr { color: var(--accent); }
.btn-line { border-color: var(--line-2); color: var(--ink); }
.btn-line:hover { border-color: var(--ink); }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: #FF6A26; }
.btn-ghost-dark { border-color: var(--night-line); color: var(--night-text); }
.btn-ghost-dark:hover { border-color: var(--night-muted); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }

/* ── Nav ─────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(245, 244, 239, .82);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.brand svg { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 34px; }
.nav-links a { font-size: 14px; color: var(--ink-2); transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.menu-btn { display: none; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; place-items: center; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 16px; height: 1.5px; background: var(--ink); position: relative; transition: transform .25s var(--ease), background .2s; }
.menu-btn span::before, .menu-btn span::after { content: ''; position: absolute; left: 0; }
.menu-btn span::before { top: -5px; }
.menu-btn span::after { top: 5px; }
.nav.open .menu-btn span { background: transparent; }
.nav.open .menu-btn span::before { transform: translateY(5px) rotate(45deg); }
.nav.open .menu-btn span::after { transform: translateY(-5px) rotate(-45deg); }
.mobile-menu { display: none; }

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero { border-top: none; }
.hero > .wrap { padding-top: 104px; padding-bottom: 0; }
.hero > .wrap::before, .hero > .wrap::after { display: none; }
.hero-top { display: grid; grid-template-columns: 7fr 5fr; gap: 56px; align-items: end; }
.hero h1 { font-size: clamp(64px, 9.6vw, 148px); margin-top: 30px; }
.hero-side { padding-bottom: 14px; }
.hero-side .lede { max-width: 440px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 72px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 10px; }
.hero-meta span::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--line-2); }
.hero-meta span:first-child::before { background: var(--accent); }

/* ── Console (hero visual) ───────────────────────────────────────────── */
.console-wrap { padding: 8px 0 72px; }
.console {
  background: var(--night);
  color: var(--night-text);
  border-radius: 14px;
  border: 1px solid #000;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .04) inset,
    0 40px 80px -40px rgba(15, 15, 13, .55),
    0 18px 30px -18px rgba(15, 15, 13, .3);
  overflow: hidden;
  font-size: 13px;
}
.console-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 46px;
  padding: 0 18px;
  border-bottom: 1px solid var(--night-line);
  background: var(--night-2);
}
.dots { display: flex; gap: 7px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #2E2D29; }
.console-title { font-family: var(--mono); font-size: 12px; color: var(--night-muted); }
.console-title b { color: var(--night-text); font-weight: 500; }
.console-status { justify-self: end; display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px; color: var(--night-muted); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(76, 195, 138, .5); animation: pulse 2.2s infinite; }

.console-grid { display: grid; grid-template-columns: 1.05fr 1.15fr 1fr; min-height: 430px; }
.pane { padding: 18px 20px 20px; min-width: 0; }
.pane + .pane { border-left: 1px solid var(--night-line); }
.pane-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--night-muted);
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--night-line);
}
.pane-head .pill { color: var(--night-text); letter-spacing: .02em; text-transform: none; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* signals */
.signals { display: flex; flex-direction: column; gap: 8px; }
.sig {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  padding: 12px 14px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: var(--night-2);
  transition: border-color .4s ease, background .4s ease, opacity .4s ease;
}
.sig.active { border-color: rgba(255, 106, 38, .55); background: var(--night-3); }
.sig.enter { animation: sigIn .6s var(--ease) both; }
.sig-type { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-night); }
.sig-time { font-family: var(--mono); font-size: 10.5px; color: var(--night-muted); text-align: right; }
.sig-text { grid-column: 1 / -1; color: #DAD8D0; font-size: 13px; line-height: 1.45; }
.sig-text b { color: #fff; font-weight: 500; }
.sig:not(.active) { opacity: .62; }

/* account */
.acct-name { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.acct-meta { font-family: var(--mono); font-size: 11.5px; color: var(--night-muted); margin-top: 6px; }
.tier { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: rgba(255, 106, 38, .14); color: var(--accent-night); font-size: 11px; letter-spacing: .04em; text-transform: none; }
.scores { margin: 22px 0 22px; display: grid; gap: 12px; }
.score { display: grid; grid-template-columns: 72px 1fr 28px; align-items: center; gap: 12px; font-size: 12.5px; color: var(--night-muted); }
.score b { color: var(--night-text); font-weight: 500; font-family: var(--mono); font-size: 12px; text-align: right; }
.bar { height: 5px; border-radius: 4px; background: #262521; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #FF4F00, #FF8A4C); transition: width .9s var(--ease); }
.score:nth-child(1) .bar i { width: 92%; }
.score:nth-child(2) .bar i { width: 81%; }
.score:nth-child(3) .bar i { width: 88%; }
.sub-head { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--night-muted); padding-top: 16px; border-top: 1px solid var(--night-line); margin-bottom: 10px; }
.people { display: grid; gap: 4px; }
.person { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; padding: 7px 0; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #2A2925; display: grid; place-items: center; font-size: 11px; font-weight: 500; color: #CFCCC3; }
.person b { display: block; font-weight: 500; font-size: 13px; color: var(--night-text); line-height: 1.3; }
.person small { display: block; font-size: 12px; color: var(--night-muted); line-height: 1.3; }
.verified { font-family: var(--mono); font-size: 10.5px; color: var(--ok); white-space: nowrap; }

/* actions */
.actions { display: grid; gap: 2px; }
.act { display: grid; grid-template-columns: 20px 1fr; gap: 12px; padding: 9px 0; align-items: start; color: #CFCCC3; font-size: 13px; line-height: 1.45; opacity: .35; transition: opacity .35s ease; }
.act.done { opacity: 1; }
.check { width: 18px; height: 18px; border-radius: 50%; border: 1px solid #3A3934; display: grid; place-items: center; margin-top: 1px; transition: background .3s ease, border-color .3s ease; }
.check svg { width: 10px; height: 10px; opacity: 0; transition: opacity .3s ease; }
.act.done .check { background: rgba(76, 195, 138, .14); border-color: rgba(76, 195, 138, .6); }
.act.done .check svg { opacity: 1; }
.act span b { color: #fff; font-weight: 500; }
.console-caption { margin-top: 14px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); text-align: right; }

/* ── Stack grid ──────────────────────────────────────────────────────── */
.stack > .wrap { padding-top: 64px; padding-bottom: 64px; }
.stack-head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin-bottom: 28px; }
.stack-head p { font-size: 15px; color: var(--ink-3); }
.stack-grid { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.stack-grid li {
  display: grid;
  place-items: center;
  height: 84px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink-2);
  transition: background .25s ease, color .25s ease;
}
.stack-grid li:hover { background: var(--surface); color: var(--ink); }

/* ── Gap (problem) ───────────────────────────────────────────────────── */
.gap-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 72px; align-items: start; }
.statement { font-family: var(--serif); font-size: clamp(36px, 4.2vw, 58px); line-height: 1.08; letter-spacing: -0.015em; margin-top: 22px; }
.statement em { color: var(--ink-3); }
.gap-list li { padding: 26px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 40px 1fr; gap: 8px; }
.gap-list li:first-child { border-top: 1px solid var(--ink); }
.gap-list .n { font-family: var(--mono); font-size: 12px; color: var(--accent-ink); padding-top: 4px; }
.gap-list h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 6px; }
.gap-list p { color: var(--ink-2); font-size: 15.5px; }

/* ── Services ────────────────────────────────────────────────────────── */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.svc { padding: 40px 36px 12px 0; display: flex; flex-direction: column; }
.svc + .svc { padding-left: 36px; border-left: 1px solid var(--line); }
.svc-top { display: flex; justify-content: space-between; align-items: center; }
.svc-n { font-family: var(--mono); font-size: 12px; color: var(--accent-ink); letter-spacing: .06em; text-transform: uppercase; }
.svc-icon { width: 44px; height: 44px; color: var(--ink); }
.svc h3 { font-family: var(--serif); font-size: 38px; line-height: 1.04; letter-spacing: -0.015em; margin: 40px 0 14px; }
.svc > p { color: var(--ink-2); font-size: 15.5px; margin-bottom: 28px; min-height: 50px; }
.svc ul { border-top: 1px solid var(--line); }
.svc li { display: grid; grid-template-columns: 22px 1fr; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--ink); }
.svc li::before { content: ''; width: 6px; height: 6px; margin-top: 8px; border: 1px solid var(--ink-3); }

/* ── Engine (dark) ───────────────────────────────────────────────────── */
.engine-sec { background-image: linear-gradient(var(--night-line) 1px, transparent 1px); background-size: 100% 0; }
.flow { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--night-line); border-bottom: 1px solid var(--night-line); position: relative; }
.flow-track { position: absolute; left: 0; right: 0; top: 52px; height: 1px; background: var(--night-line); overflow: hidden; }
.flow-track::after { content: ''; position: absolute; top: 0; left: -30%; width: 30%; height: 1px; background: linear-gradient(90deg, transparent, var(--accent-night), transparent); animation: travel 3.6s linear infinite; }
.stage { padding: 32px 28px 36px; position: relative; }
.stage + .stage { border-left: 1px solid var(--night-line); }
.stage:first-child { padding-left: 0; }
.node { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #3B3A35; background: var(--night); display: grid; place-items: center; font-family: var(--mono); font-size: 12px; color: var(--accent-night); position: relative; z-index: 1; }
.stage h3 { font-family: var(--serif); font-size: 34px; margin: 28px 0 10px; letter-spacing: -0.01em; }
.stage p { color: var(--night-muted); font-size: 15px; }
.runs { margin-top: 20px; padding-top: 14px; border-top: 1px dashed var(--night-line); font-family: var(--mono); font-size: 11.5px; color: #D6D3CA; line-height: 1.6; }
.runs span { display: block; color: var(--night-muted); text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px; }
.loop-note { display: flex; align-items: center; gap: 14px; margin-top: 28px; font-family: var(--mono); font-size: 12px; color: var(--night-muted); }
.loop-note svg { width: 34px; height: 18px; color: var(--accent-night); flex-shrink: 0; }

/* ── Blueprints ──────────────────────────────────────────────────────── */
.bp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.bp { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 36px; display: flex; flex-direction: column; transition: border-color .25s ease, transform .3s var(--ease); }
.bp:hover { border-color: var(--line-2); }
.bp-top { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 12px; color: var(--ink-3); letter-spacing: .04em; }
.bp-top .code { color: var(--accent-ink); font-weight: 500; }
.bp h3 { font-family: var(--serif); font-size: 40px; line-height: 1.02; letter-spacing: -0.015em; margin: 28px 0 12px; }
.bp > p { color: var(--ink-2); font-size: 15.5px; max-width: 470px; }
.spec { margin-top: 28px; border-top: 1px solid var(--line); }
.spec div { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.spec dt { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding-top: 2px; }
.spec dd { font-size: 14.5px; color: var(--ink); }
.note { margin-top: 24px; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }

/* ── Process ─────────────────────────────────────────────────────────── */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.timeline::before { content: ''; position: absolute; left: 0; right: 0; top: 9px; height: 1px; background: var(--line-2); }
.phase { padding-right: 32px; position: relative; }
.phase-dot { width: 19px; height: 19px; border-radius: 50%; border: 1px solid var(--ink); background: var(--bg); position: relative; }
.phase:first-child .phase-dot { background: var(--accent); border-color: var(--accent); }
.phase .when { display: block; margin-top: 28px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); }
.phase h3 { font-family: var(--serif); font-size: 34px; letter-spacing: -0.01em; margin: 10px 0 12px; }
.phase p { color: var(--ink-2); font-size: 15.5px; }
.deliv { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink); }
.deliv span { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px; }

/* ── Why ─────────────────────────────────────────────────────────────── */
.why-grid { display: grid; grid-template-columns: 6fr 6fr; gap: 88px; align-items: start; }
.why-grid .statement { font-size: clamp(36px, 4vw, 54px); }
.why-copy { margin-top: 28px; color: var(--ink-2); font-size: 17px; max-width: 480px; }
.principles li { display: grid; grid-template-columns: 52px 1fr; padding: 26px 0; border-bottom: 1px solid var(--line); }
.principles li:first-child { border-top: 1px solid var(--ink); }
.principles .n { font-family: var(--mono); font-size: 12px; color: var(--accent-ink); padding-top: 4px; }
.principles h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 6px; }
.principles p { color: var(--ink-2); font-size: 15.5px; }

/* ── Enterprise ──────────────────────────────────────────────────────── */
.ent-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--night-line); border-left: 1px solid var(--night-line); }
.ent { padding: 36px 32px 40px; border-right: 1px solid var(--night-line); border-bottom: 1px solid var(--night-line); }
.ent svg { width: 28px; height: 28px; color: var(--accent-night); }
.ent h3 { font-size: 18px; font-weight: 500; letter-spacing: -0.015em; margin: 28px 0 8px; color: var(--night-text); }
.ent p { color: var(--night-muted); font-size: 15px; }

/* ── Engagements ─────────────────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 36px; display: flex; flex-direction: column; }
.plan .meta { font-family: var(--mono); font-size: 12px; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; }
.plan h3 { font-family: var(--serif); font-size: 42px; line-height: 1.02; letter-spacing: -0.015em; margin: 18px 0 12px; }
.plan > p { color: var(--ink-2); font-size: 15.5px; }
.plan ul { margin: 28px 0 32px; flex: 1; border-top: 1px solid var(--line); }
.plan li { display: grid; grid-template-columns: 24px 1fr; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.plan li svg { width: 14px; height: 14px; margin-top: 4px; color: var(--accent-ink); }
.plan.featured { background: var(--night); color: var(--night-text); border-color: var(--night); }
.plan.featured .meta { color: var(--accent-night); }
.plan.featured > p { color: var(--night-muted); }
.plan.featured ul, .plan.featured li { border-color: var(--night-line); }
.plan.featured li svg { color: var(--accent-night); }
.plan .btn { width: 100%; }
.plan-tag { display: inline-flex; margin-left: 10px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 106, 38, .16); color: var(--accent-night); font-size: 10.5px; }

/* ── FAQ ─────────────────────────────────────────────────────────────── */
.faq-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 72px; }
.faq-grid .lede { margin-top: 24px; font-size: 17px; max-width: 380px; }
.faq-grid .lede a { color: var(--ink); border-bottom: 1px solid var(--line-2); }
details { border-bottom: 1px solid var(--line); }
details:first-child { border-top: 1px solid var(--ink); }
summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px 0; font-size: 18px; font-weight: 500; letter-spacing: -0.015em; }
summary::-webkit-details-marker { display: none; }
.pm { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2); position: relative; flex-shrink: 0; transition: background .2s ease, border-color .2s ease; }
.pm::before, .pm::after { content: ''; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; background: var(--ink); transform: translate(-50%, -50%); transition: transform .25s var(--ease); }
.pm::after { transform: translate(-50%, -50%) rotate(90deg); }
details[open] .pm { background: var(--ink); border-color: var(--ink); }
details[open] .pm::before, details[open] .pm::after { background: var(--bg); }
details[open] .pm::after { transform: translate(-50%, -50%) rotate(0deg); }
summary:hover .pm { border-color: var(--ink); }
details p { color: var(--ink-2); padding: 0 56px 26px 0; font-size: 16px; }

/* ── Contact ─────────────────────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 72px; align-items: start; }
.contact-grid .h2 { font-size: clamp(44px, 5.2vw, 72px); }
.next { margin-top: 44px; border-top: 1px solid var(--night-line); }
.next li { display: grid; grid-template-columns: 44px 1fr; padding: 18px 0; border-bottom: 1px solid var(--night-line); color: var(--night-muted); font-size: 15px; }
.next li b { display: block; color: var(--night-text); font-weight: 500; margin-bottom: 2px; }
.next .n { font-family: var(--mono); font-size: 12px; color: var(--accent-night); padding-top: 3px; }
.direct { margin-top: 28px; font-size: 15px; color: var(--night-muted); }
.direct a { color: var(--night-text); border-bottom: 1px solid var(--night-line); }
.direct a:hover { border-color: var(--night-text); }

.form-card { background: var(--night-2); border: 1px solid var(--night-line); border-radius: 16px; padding: 40px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; color: var(--night-muted); }
.field label i { font-style: normal; color: #6E6C65; }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--night);
  border: 1px solid var(--night-line);
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 15px;
  color: var(--night-text);
  transition: border-color .2s ease, box-shadow .2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--night-muted) 50%), linear-gradient(135deg, var(--night-muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 40px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #5E5C56; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent-night); box-shadow: 0 0 0 3px rgba(255, 106, 38, .18); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 28px; flex-wrap: wrap; }
.form-foot small { font-size: 12.5px; color: var(--night-muted); max-width: 300px; }
.form-foot small a { color: var(--night-text); border-bottom: 1px solid var(--night-line); }
.form-status { margin-top: 20px; font-size: 14.5px; color: var(--night-text); display: none; padding: 14px 16px; border-radius: 10px; background: rgba(76, 195, 138, .1); border: 1px solid rgba(76, 195, 138, .35); }
.form-status.show { display: block; }
.form-status.err { background: rgba(255, 106, 38, .08); border-color: rgba(255, 106, 38, .4); }
.form-status a { color: var(--night-text); border-bottom: 1px solid currentColor; }
button[disabled] { opacity: .6; cursor: progress; }

/* ── Footer ──────────────────────────────────────────────────────────── */
.footer { background: var(--night); color: var(--night-muted); border-top: 1px solid var(--night-line); }
.footer .wrap { border-color: var(--night-line); padding-top: 80px; padding-bottom: 32px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.foot-brand .brand { color: var(--night-text); }
.foot-brand p { margin-top: 16px; font-size: 14.5px; max-width: 300px; }
.foot-col h4 { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: #77756E; margin-bottom: 16px; }
.foot-col li { margin-bottom: 10px; font-size: 14.5px; }
.foot-col a { transition: color .2s; }
.foot-col a:hover { color: var(--night-text); }
.wordmark { font-family: var(--serif); font-size: min(22vw, 318px); line-height: .8; letter-spacing: -0.04em; color: var(--night-text); margin: 88px 0 0; white-space: nowrap; user-select: none; }
.wordmark span { color: var(--accent-night); }
.foot-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 28px; margin-top: 36px; border-top: 1px solid var(--night-line); font-size: 13px; flex-wrap: wrap; }
.foot-bottom a:hover { color: var(--night-text); }

/* ── Legal / simple pages ────────────────────────────────────────────── */
.doc > .wrap { padding-top: 96px; padding-bottom: 112px; }
.doc h1 { font-size: clamp(52px, 7vw, 96px); margin: 22px 0 18px; }
.doc .updated { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.doc-body { max-width: 720px; margin-top: 56px; }
.doc-body h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; margin: 44px 0 12px; }
.doc-body p, .doc-body li { color: var(--ink-2); font-size: 16.5px; line-height: 1.7; }
.doc-body p + p { margin-top: 14px; }
.doc-body ul { list-style: disc; padding-left: 22px; margin-top: 10px; }
.doc-body li + li { margin-top: 6px; }
.doc-body a { color: var(--ink); border-bottom: 1px solid var(--line-2); }

.nf > .wrap { min-height: calc(100vh - 72px); display: flex; flex-direction: column; justify-content: center; padding-top: 80px; padding-bottom: 120px; }
.nf h1 { font-size: clamp(64px, 10vw, 140px); margin: 22px 0 18px; }
.nf .lede { max-width: 480px; }

/* ── Motion ──────────────────────────────────────────────────────────── */
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(76, 195, 138, .5); } 70% { box-shadow: 0 0 0 7px rgba(76, 195, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(76, 195, 138, 0); } }
@keyframes sigIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes travel { from { left: -30%; } to { left: 100%; } }
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .08s; }
.js .reveal.d2 { transition-delay: .16s; }
.js .reveal.d3 { transition-delay: .24s; }
.js .reveal.d4 { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .pulse, .flow-track::after, .sig.enter { animation: none; }
  .bar i, .act, .check, .check svg { transition: none; }
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  :root { --pad: 40px; --section-y: 104px; }
  .nav-links { gap: 24px; }
  .stack-grid { grid-template-columns: repeat(4, 1fr); }
  .flow { grid-template-columns: 1fr; border-bottom: none; }
  .flow-track { display: none; }
  .stage, .stage:first-child { display: grid; grid-template-columns: 40px 1fr; column-gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--night-line); }
  .stage + .stage { border-left: none; }
  .node { grid-row: span 4; }
  .stage h3 { margin-top: 2px; }
  .stage::before { content: ''; position: absolute; left: 19.5px; top: 68px; bottom: 0; width: 1px; background: var(--night-line); }
  .stage:last-child::before { display: none; }
  .ent-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
  .nav-links { display: none; }
  .menu-btn { display: grid; }
  .nav .nav-cta .btn { display: none; }
  .mobile-menu { display: block; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--pad) 24px; visibility: hidden; opacity: 0; transform: translateY(-6px); transition: opacity .2s ease, transform .25s var(--ease), visibility 0s .25s; }
  .nav.open .mobile-menu { visibility: visible; opacity: 1; transform: none; transition: opacity .2s ease, transform .25s var(--ease); }
  .mobile-menu a:not(.btn) { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .mobile-menu .btn { margin-top: 20px; width: 100%; }

  .hero-top, .section-head, .gap-grid, .why-grid, .faq-grid, .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .why-grid, .gap-grid, .contact-grid { gap: 48px; }
  .section-head { margin-bottom: 52px; }
  .hero > .wrap { padding-top: 72px; }
  .hero-side { padding-bottom: 0; }
  .hero-meta { margin-top: 56px; }
  .console-grid { grid-template-columns: 1fr 1fr; }
  .pane-signals { grid-column: 1 / -1; border-bottom: 1px solid var(--night-line); }
  .pane-signals .signals { display: grid; grid-template-columns: 1fr 1fr; }
  .pane-account { border-left: none !important; }
  .services-grid { grid-template-columns: 1fr; }
  .svc, .svc + .svc { padding: 36px 0 12px; border-left: none; }
  .svc + .svc { border-top: 1px solid var(--line); }
  .svc h3 { margin-top: 28px; }
  .svc > p { min-height: 0; }
  .bp-grid, .plans { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr 1fr; row-gap: 48px; }
  .timeline::before { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  :root { --pad: 20px; --section-y: 80px; }
  .wrap { border-left: none; border-right: none; }
  .section > .wrap::before, .section > .wrap::after { display: none; }
  .nav .wrap { height: 64px; }
  .hero > .wrap { padding-top: 52px; }
  .hero h1 { font-size: clamp(58px, 17vw, 84px); }
  .hero-side .lede { font-size: 17.5px; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .hero-meta { margin-top: 44px; gap: 8px 20px; }
  .console-wrap { padding-bottom: 56px; }
  .console-bar { grid-template-columns: auto 1fr; gap: 12px; }
  .console-title { display: none; }
  .console-grid { grid-template-columns: 1fr; min-height: 0; }
  .pane + .pane { border-left: none; border-top: 1px solid var(--night-line); }
  .pane-signals .signals { display: flex; }
  .pane-signals .sig:nth-child(n+3) { display: none; }
  .console-caption { text-align: left; }
  .stack-head { flex-direction: column; gap: 6px; }
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
  .stack-grid li { height: 64px; font-size: 15px; }
  .ent-grid { grid-template-columns: 1fr; }
  .ent { padding: 28px 24px 32px; }
  .bp, .plan { padding: 28px 24px; }
  .bp h3 { font-size: 34px; }
  .spec div { grid-template-columns: 1fr; gap: 2px; }
  .timeline { grid-template-columns: 1fr; row-gap: 40px; }
  .phase { padding: 0 0 0 40px; }
  .phase-dot { position: absolute; left: 0; top: 0; }
  .phase .when { margin-top: 0; }
  .phase::before { content: ''; position: absolute; left: 9px; top: 26px; bottom: -34px; width: 1px; background: var(--line-2); }
  .phase:last-child::before { display: none; }
  .form-card { padding: 28px 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-foot .btn { width: 100%; }
  details p { padding-right: 0; }
  summary { font-size: 17px; }
  .foot-grid { grid-template-columns: 1fr; gap: 32px; }
  .wordmark { margin-top: 64px; }
  .foot-bottom { flex-direction: column; gap: 8px; }
}

/* ── State helpers ───────────────────────────────────────────────────── */
.pane-account > *:not(.pane-head) { transition: opacity .3s ease; }
.pane-account.fading > *:not(.pane-head) { opacity: .12; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--accent-night); }
