/* ============================================================
   FORESHOCK — design system
   Instrument panel meets editorial. Dark-mode primary.
   Accent: signal amber. Type: Space Grotesk + IBM Plex Mono.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* ---- surfaces (near-black, cool charcoal) ---- */
  --bg:        #0a0d10;
  --bg-2:      #0c1014;
  --surface:   #10151a;
  --surface-2: #151c22;
  --surface-3: #1a232a;

  /* ---- lines ---- */
  --border:        rgba(233, 240, 244, 0.08);
  --border-strong: rgba(233, 240, 244, 0.16);
  --grid:          rgba(233, 240, 244, 0.035);

  /* ---- text ---- */
  --text:  #e9eef1;
  --muted: #97a3aa;
  --dim:   #5d6970;
  --faint: #3c454b;

  /* ---- accent: signal amber ---- */
  --accent:     #ffb22e;
  --accent-hi:  #ffc869;
  --accent-deep:#c4810f;
  --accent-ink: #1c1402;          /* text on amber fills */
  --accent-glow: rgba(255, 178, 46, 0.16);
  --accent-rgb: 255, 178, 46;

  /* ---- type ---- */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Space Grotesk', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;

  /* ---- geometry ---- */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;
  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 64px);

  /* ---- motion ---- */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ============================================================ reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* faint instrument grid behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 120% 90% at 50% 0%, #000 30%, transparent 90%);
}

/* ============================================================ layout */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 1;
}
.section { padding-block: clamp(72px, 11vw, 140px); position: relative; }
.section--tight { padding-block: clamp(48px, 7vw, 88px); }
.divider { height: 1px; background: var(--border); border: 0; }

/* ============================================================ type */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  text-wrap: balance;
}
.h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.04; letter-spacing: -0.025em; text-wrap: balance; }
.h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
.h3 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.2; letter-spacing: -0.01em; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--muted); line-height: 1.5; text-wrap: pretty; }
p { text-wrap: pretty; }
.prose-muted { color: var(--muted); }

/* mono instrument label */
.label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}
.label--accent { color: var(--accent); }
.mono { font-family: var(--font-mono); }

/* eyebrow: index + label, e.g. "01 / SAMPLE" */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .idx { color: var(--accent); }
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--accent);
  display: inline-block;
}

/* ============================================================ buttons */
.btn {
  --pad-y: 0.72em;
  --pad-x: 1.25em;
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: var(--pad-y) var(--pad-x);
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  transition: background .18s var(--ease), border-color .18s var(--ease),
              color .18s var(--ease), transform .12s var(--ease), box-shadow .18s var(--ease);
  white-space: nowrap;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.btn--primary:hover {
  background: var(--accent-hi);
  box-shadow: 0 0 0 1px var(--accent-hi), 0 8px 30px -10px var(--accent-glow);
}
.btn--ghost {
  border-color: var(--border-strong);
  color: var(--text);
  background: transparent;
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--link {
  padding: 0; color: var(--muted); border-radius: 0;
}
.btn--link:hover { color: var(--accent); }
.btn--lg { --pad-y: 0.95em; --pad-x: 1.6em; font-size: 0.9rem; }
.btn--sm { --pad-y: 0.5em; --pad-x: 0.9em; font-size: 0.74rem; }
.btn .arrow { transition: transform .18s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ============================================================ badges / chips */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.4em 0.7em;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
}
.badge--accent { color: var(--accent); border-color: rgba(var(--accent-rgb), 0.4); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.badge--accent .dot { box-shadow: 0 0 8px var(--accent); animation: pulse-dot 2.6s var(--ease) infinite; }
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .badge--accent .dot { animation: none; } }

/* ============================================================ cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(22px, 3vw, 34px);
  position: relative;
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.card--hover:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.card__num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}

/* corner ticks — instrument framing */
.ticked { position: relative; }
.ticked::before, .ticked::after {
  content: "";
  position: absolute;
  width: 8px; height: 8px;
  border-color: var(--border-strong);
  border-style: solid;
  border-width: 0;
}
.ticked::before { top: -1px; left: -1px; border-top-width: 1px; border-left-width: 1px; border-top-color: var(--accent); border-left-color: var(--accent); }
.ticked::after  { bottom: -1px; right: -1px; border-bottom-width: 1px; border-right-width: 1px; }

/* ============================================================ nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}
.nav__link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  transition: color .16s var(--ease);
  position: relative;
}
.nav__link:hover { color: var(--text); }
.nav__link.is-active { color: var(--text); }
.nav__sep { width: 1px; height: 20px; background: var(--border); }
.nav__burger { display: none; }

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__burger { display: inline-flex; margin-left: auto; }
  .nav__links.is-open {
    display: flex;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px var(--gutter) 24px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
  }
  .nav__links.is-open .nav__sep { display: none; }
  .nav__links.is-open .nav__link { padding: 8px 0; font-size: 0.95rem; }
}

/* ============================================================ footer */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  position: relative;
  z-index: 1;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 40px 32px;
  padding-block: clamp(48px, 7vw, 80px);
}
.footer__col h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 16px;
  font-weight: 500;
}
.footer__col a {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  padding: 5px 0;
  transition: color .16s var(--ease);
}
.footer__col a:hover { color: var(--accent); }
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-block: 24px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--dim);
}
.footer__social { display: flex; gap: 14px; }
.footer__social a {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--muted);
  transition: all .16s var(--ease);
}
.footer__social a:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 860px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer__brand-col { grid-column: 1 / -1; }
}

/* ============================================================ logo */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 1.18rem;
  color: var(--text);
}
.logo svg { overflow: visible; }
.logo__trace { stroke: var(--accent); }

/* ============================================================ get-started modal */
.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 70%, #000);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease);
}
.modal-scrim.is-open { opacity: 1; pointer-events: auto; }
.modal {
  width: min(480px, 100%);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  padding: clamp(28px, 4vw, 40px);
  transform: translateY(12px) scale(0.98);
  transition: transform .28s var(--ease);
  position: relative;
  overflow: hidden;
}
.modal-scrim.is-open .modal { transform: none; }
.modal__close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; display: grid; place-items: center;
  color: var(--dim); border-radius: var(--r-sm);
  transition: all .16s var(--ease);
}
.modal__close:hover { color: var(--text); background: var(--surface-2); }
.field { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.field label { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  padding: 0.8em 0.9em;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  transition: border-color .16s var(--ease);
}
.input:focus { outline: none; border-color: var(--accent); }
.input::placeholder { color: var(--faint); }

/* ============================================================ misc utilities */
.stack > * + * { margin-top: var(--stack, 1rem); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.accent { color: var(--accent); }
.center { text-align: center; }
.hairline-top { border-top: 1px solid var(--border); }
.fade-mask-r { mask-image: linear-gradient(90deg, #000 70%, transparent); }

/* reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
