/* TunnelGate site — see DESIGN.md. Seven colour tokens, flat surfaces, no scroll motion. */
@font-face {
  font-family: "Plus Jakarta Fallback";
  src: local("Arial");
  size-adjust: 104.3%;
  ascent-override: 93%;
  descent-override: 25%;
  line-gap-override: 0%;
}

:root {
  --paper: #F2F7F9;
  --bone: #D6E7F1;
  --ink: #231F20;
  --ash: #5F6571;
  --signal: #1C75BC;
  --wave: #75BAE6;
  --signal-deep: #165B93;
  --rule: rgba(35, 31, 32, 0.12);
  --sans: "Plus Jakarta Sans", "Plus Jakarta Fallback", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { font-family: var(--sans); background: var(--paper); color: var(--ink); line-height: 1.75; font-size: 16px; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

/* Layout */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.bone { background: var(--bone); }
@media (min-width: 900px) { .wrap { padding: 0 40px; } .section { padding: 112px 0; } }
.cols { display: grid; gap: 48px; }
@media (min-width: 900px) { .cols { grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; } }

/* Type */
.display-xl { font-size: clamp(2rem, 5.6vw, 4.25rem); font-weight: 800; letter-spacing: -0.035em; line-height: 0.95; }
.display-lg { font-size: clamp(1.7rem, 4vw, 3.2rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.05; }
.display-md { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
.lead { font-size: clamp(18px, 2vw, 21px); color: rgba(35, 31, 32, 0.8); max-width: 60ch; }
.body { color: var(--ash); max-width: 65ch; }
.body-tight { color: var(--ash); font-size: 13.5px; line-height: 1.65; }
.label { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ash); margin-bottom: 12px; }
.accent { color: var(--signal); }
code { font-family: var(--mono); font-size: 0.9em; background: rgba(35, 31, 32, 0.07); padding: 1px 5px; }
.head { margin-bottom: 48px; max-width: 760px; }

/* Buttons and links */
.btn { display: inline-flex; align-items: center; padding: 13px 24px; font: 600 15px var(--sans); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.btn-signal { background: var(--signal); color: #fff; }
.btn-signal:hover { background: var(--signal-deep); }
.btn-invert { background: var(--paper); color: var(--ink); }
.btn-invert:hover { background: var(--bone); }
.ulink { font-weight: 600; font-size: 15px; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; transition: color .15s; }
.ulink:hover { color: var(--signal); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 32px; }

/* Surfaces */
.surface { background: #fff; border: 1px solid var(--rule); padding: 28px; }
.surface-ink { background: var(--ink); color: var(--paper); }

/* Skip link and nav */
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--paper); padding: 10px 16px; z-index: 100; font-weight: 600; }
.skip:focus { top: 12px; }
nav { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--rule); }
.nav-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; justify-content: space-between; }
@media (min-width: 900px) { .nav-inner { padding: 0 40px; } }
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; letter-spacing: -0.015em; }
.nav-brand img { width: 26px; height: 26px; }
.nav-links { display: none; gap: 28px; }
@media (min-width: 700px) { .nav-links { display: flex; } }
.nav-links a { font-size: 15px; font-weight: 500; text-decoration: none; color: var(--ash); transition: color .15s; }
.nav-links a:hover { color: var(--signal); }

/* Hero */
.hero { padding: 72px 0 88px; }
.hero-grid { display: grid; gap: 56px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 72px; } .hero { padding: 112px 0 120px; } }
.hero h1 { margin-bottom: 24px; }
.term { font-family: var(--mono); font-size: 13.5px; line-height: 1.9; }
.term-bar { padding: 12px 20px; border-bottom: 1px solid rgba(242, 247, 249, 0.15); font-size: 12px; color: rgba(242, 247, 249, 0.65); }
.term pre { padding: 24px 20px; font: inherit; overflow-x: auto; }
.term .dim { color: rgba(242, 247, 249, 0.65); }
.term .ok { color: var(--wave); }

/* Steps, lists */
.steps { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { background: var(--paper); padding: 28px; }
.step-num { font-size: 13px; font-weight: 700; color: var(--signal); margin-bottom: 20px; }
.step h3 { margin-bottom: 8px; }
.checks li, .setup-steps li { display: flex; gap: 14px; padding: 18px 0; border-top: 1px solid var(--rule); }
.checks li:last-child, .setup-steps li:last-child { border-bottom: 1px solid var(--rule); }
.checks li > span:first-child, .setup-num { flex: none; width: 28px; height: 28px; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--signal); border: 1px solid var(--signal); border-radius: 50%; }
.checks p, .setup-steps p { color: var(--ash); }
.checks strong, .setup-steps h3 { color: var(--ink); }
.setup-steps h3 { font-size: 1.05rem; margin-bottom: 4px; }
.note { margin-top: 24px; color: var(--ash); }
.note strong { color: var(--ink); }

/* Architecture: flat stack */
.stack { display: grid; gap: 0; }
.stack-box { background: #fff; border: 1px solid var(--ink); padding: 20px 24px; }
.stack-box.ink { background: var(--ink); color: var(--paper); }
.stack-box .label { margin-bottom: 8px; }
.stack-box.ink .label { color: rgba(242, 247, 249, 0.65); }
.stack-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13.5px; font-weight: 600; padding: 4px 12px; border: 1px solid var(--rule); background: var(--paper); }
.stack-box.ink .chip { background: transparent; border-color: rgba(242, 247, 249, 0.3); }
.chip.on { border-color: var(--signal); color: var(--signal); }
.stack-box.ink .chip.on { border-color: var(--wave); color: var(--wave); }
.stack-link { justify-self: center; padding: 6px 0; font-size: 13px; font-weight: 600; color: var(--ash); border-left: 1px solid var(--ink); padding-left: 12px; margin: 0 0 0 24px; justify-self: start; }

/* Features */
.features { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
@media (min-width: 700px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(4, 1fr); } }
.feature { background: var(--paper); padding: 28px; }
.feature svg { width: 28px; height: 28px; color: var(--signal); margin-bottom: 18px; }
.feature h3 { margin-bottom: 8px; font-size: 1.05rem; }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: 20px 0; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--signal); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 22px; color: var(--ash); max-width: 65ch; }

/* CTA, footer */
.cta { padding: 72px 0; }
.cta h2 { margin-bottom: 12px; }
.cta p { color: rgba(242, 247, 249, 0.8); }
.cta .btn { margin-top: 28px; }
footer { border-top: 1px solid var(--rule); padding: 28px 0; font-size: 14px; color: var(--ash); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
.footer-left { display: flex; align-items: center; gap: 10px; }
.footer-left img { width: 20px; height: 20px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--signal); }

/* Motion: hover colour changes only; navigation scroll is native. */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* Doodles: hand-drawn line art, decorative (DESIGN.md §6). Ink lines, signal for the working part. */
.doodle { display: block; width: 100%; height: auto; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; filter: url(#sketch); }
.doodle .f { fill: var(--bone); }
.bone .doodle .f { fill: var(--paper); }
.doodle .acc { stroke: var(--signal); }
.doodle .accf { fill: var(--signal); stroke: var(--signal); }
.surface-ink .doodle { stroke: var(--paper); }
.surface-ink .doodle .f { fill: rgba(242, 247, 249, 0.1); }
.surface-ink .doodle .acc { stroke: var(--wave); }
.surface-ink .doodle .accf { fill: var(--wave); stroke: var(--wave); }
.road { display: none; margin-top: 56px; }
.small { max-width: 200px; margin-top: 40px; }
.mid { max-width: 380px; margin-top: 40px; }
.faq-wrap { display: grid; gap: 40px; }
.cta-grid { display: grid; gap: 40px; align-items: center; }
.side { display: none; }
@media (min-width: 700px) { .road { display: block; } }
@media (min-width: 1000px) {
  .faq-wrap { grid-template-columns: 1fr 300px; gap: 80px; align-items: start; }
  .cta-grid { grid-template-columns: 1fr 320px; }
  .side { display: block; }
}
