/* ============================================================
   Coil preview shell — shared design system for local prototype
   demos. Mirrors the shipped askcoil.com tokens exactly so every
   prototype is pixel-consistent with production. Local only.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Familjen+Grotesk:ital,wght@0,400;0,500;0,600;0,700;1,600;1,700&family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap");

:root {
  /* Night surfaces (hero, showcase, closing band) */
  --night: #0A1322;
  --night-2: #0E1A2D;
  --night-3: #13223A;
  --night-line: rgba(148, 178, 218, 0.16);
  --night-line-soft: rgba(148, 178, 218, 0.08);
  --night-ink: #EAF1F9;
  --night-ink-soft: #9FB2C9;
  --night-ink-muted: #66788F;

  /* Day surfaces */
  --paper: #FAF9F7;
  --paper-soft: #F3F1ED;
  --surface: #FFFFFF;

  --line: #DEE3EA;
  --line-soft: #ECEFF3;
  --line-strong: #B8C2CE;

  --ink: #1A2332;
  --ink-soft: #475467;
  --ink-muted: #8A95A5;

  --blue: #0978E1;          /* functional only: app-accurate phone UI */
  --blue-deep: #0B3F83;     /* blueprint navy, the brand accent */
  --blue-soft: #E3F0FD;

  --coral: #FF766C;         /* rationed AI accent: only where Coil acted */
  --coral-bright: #FF8A81;
  --coral-soft: #FFF0EE;

  --teal: #5BB5A2;
  --sage: #4F7C63;          /* industrial success, not candy */
  --sage-soft: #E0E8E2;
  --green: #137C50;
  --amber: #B7791F;
  --amber-soft: #FEF7E6;
  --red: #C53030;
  --red-soft: #FEF2F2;

  --font-display: 'Familjen Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, monospace;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;

  --shadow-md: 0 2px 10px rgba(26, 35, 50, 0.06);
  --shadow-lg: 0 18px 50px rgba(26, 35, 50, 0.12);
  --shadow-night: 0 24px 70px rgba(2, 8, 20, 0.55);

  --wrap: 1180px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--coral); color: #fff; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; }

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

/* Mono kicker (SEC. NN) used on every section */
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted);
}
.kicker::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: 0.6; }
.kicker .k-num { color: var(--blue-deep); }
.kicker.is-coral, .kicker.is-coral .k-num { color: var(--coral); }

.section-h2 {
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 700; line-height: 1.06; letter-spacing: -0.028em;
  margin: 14px 0 0; text-wrap: balance;
}
.section-sub { margin-top: 16px; max-width: 560px; font-size: 16.5px; color: var(--ink-soft); line-height: 1.65; }

.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 15px; color: var(--blue-deep);
  text-decoration: none; border-bottom: 1px solid transparent; transition: color .18s ease;
}
.text-link svg { transition: transform .22s var(--ease-out); }
.text-link:hover { color: var(--ink); }
.text-link:hover svg { transform: translateX(4px); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 28px; border-radius: 10px; border: 1px solid transparent;
  font-family: var(--font-body); font-size: 15px; font-weight: 600;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .18s var(--ease-out), background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn svg { transition: transform .22s var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }
.btn-coral { background: var(--coral); color: #2A1310; box-shadow: 0 10px 30px rgba(255, 118, 108, 0.32); }
.btn-coral:hover { background: var(--coral-bright); transform: translateY(-2px); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--blue-deep); transform: translateY(-2px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink-soft); background: var(--paper-soft); transform: translateY(-2px); }
.btn-ghost-night { background: transparent; color: var(--night-ink); border-color: var(--night-line); }
.btn-ghost-night:hover { border-color: rgba(148,178,218,0.45); background: rgba(148,178,218,0.07); }
.btn-paper { background: #fff; color: var(--ink); }
.btn-paper:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(0,0,0,0.35); }

/* Grain + reveal */
.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  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.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }

/* Blueprint grid texture helper (engineering-drawing language) */
.blueprint-grid {
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* Local-preview banner so it is never mistaken for production */
.preview-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 7px 16px; font-family: var(--font-mono); font-size: 10.5px;
  font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--night-ink-soft); background: var(--night); border-top: 1px solid var(--night-line);
}
.preview-banner b { color: var(--coral); font-weight: 600; }

/* Reduced motion: kill transitions/animations globally, demos show final state */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
