/* ==========================================================================
   Buildastat — Pre-Launch Landing Page
   Brand-aligned styling. Self-contained: brand tokens are baked into :root
   so this deploys standalone (no shared tokens.css in the Pages bundle).
   Mirrors marketing/tokens.css + marketing.css — Anchor teal, Fraunces
   display, Inter body, JetBrains Mono metadata, Signal-lime accent.
   ========================================================================== */

:root {
  /* — Brand color — */
  --color-anchor:      #0F3D3E;
  --color-anchor-2:    #082324;
  --color-anchor-3:    #1A5253;
  --color-anchor-tint: #EAF2F0;
  --color-signal:      #C8F169;
  --color-signal-soft: #E8F8C6;

  /* — Ink / neutrals (anchor-tinted) — */
  --color-ink:        #0B1717;
  --color-ink-2:      #2A3838;
  --color-muted:      #5F7374;
  --color-muted-2:    #8A9899;
  --color-hairline:   #E4ECEB;
  --color-hairline-2: #F0F4F3;
  --color-paper:      #FAFCFB;
  --color-paper-2:    #F4F8F7;
  --color-surface:    #FFFFFF;
  --color-danger:     #B91C1C;
  --color-danger-tint:#FEE7E5;

  /* — Type — */
  --font-display: 'Spectral', Georgia, 'Times New Roman', serif;
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', 'Consolas', monospace;

  --fs-caption: 11px;
  --fs-meta:    12px;
  --fs-body-sm: 13px;
  --fs-body:    15px;
  --fs-body-lg: 17px;
  --fs-h6:      18px;
  --fs-h5:      22px;
  --fs-h4:      28px;
  --fs-h3:      36px;
  --fs-h2:      48px;
  --fs-h1:      64px;

  --tracking-display: -0.025em;
  --tracking-tight:   -0.018em;
  --tracking-wide:     0.04em;
  --tracking-wider:    0.08em;
  --tracking-widest:   0.16em;

  --lh-display: 1.04;
  --lh-tight:   1.1;
  --lh-snug:    1.3;
  --lh-body:    1.55;
  --lh-loose:   1.7;

  --fw-regular: 400;  --fw-medium: 500;  --fw-semibold: 600;  --fw-bold: 700;

  /* — Spacing — */
  --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px; --space-5:20px;
  --space-6:24px; --space-8:32px; --space-10:40px; --space-12:48px; --space-16:64px;
  --space-20:80px; --space-24:96px;

  /* — Radius — */
  --radius-1:4px; --radius-2:8px; --radius-3:12px; --radius-4:16px; --radius-pill:999px;

  /* — Depth — */
  --shadow-1: 0 1px 2px rgba(15,61,62,0.06);
  --shadow-2: 0 8px 24px -12px rgba(15,61,62,0.18);
  --shadow-3: 0 24px 48px -16px rgba(15,61,62,0.25);
  --shadow-focus: 0 0 0 3px rgba(15,61,62,0.18);
  --shadow-focus-signal: 0 0 0 3px rgba(200,241,105,0.45);
  --shadow-focus-danger: 0 0 0 3px rgba(185,28,28,0.20);

  /* — Motion — */
  --ease: cubic-bezier(0.4,0,0.2,1);
  --transition-fast: 120ms var(--ease);
  --transition-base: 200ms var(--ease);

  --container: 1080px;
  --content:   720px;
  --edge:      var(--space-8);
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-ink-2);
  background: var(--color-paper);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01','cv11';
}

::selection { background: var(--color-signal); color: var(--color-anchor); }

a { color: var(--color-anchor); text-decoration: none; }

:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: var(--radius-1); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--edge);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   Dark band (hero + footer) — anchor surface, light text
   -------------------------------------------------------------------------- */
.band-dark {
  background: var(--color-anchor);
  color: #fff;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: relative;
  z-index: 2;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: #fff;
  font-family: var(--font-sans);
  font-weight: var(--fw-bold);
  font-size: var(--fs-h6);
  letter-spacing: var(--tracking-tight);
}
.logo:hover { text-decoration: none; }
.logo__mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: var(--color-signal);
  color: var(--color-anchor);
  border-radius: var(--radius-2);
  box-shadow: var(--shadow-1);
}
.logo__mark svg { width: 17px; height: 17px; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-signal);
  background: rgba(200,241,105,0.10);
  border: 1px solid rgba(200,241,105,0.28);
  border-radius: var(--radius-pill);
  padding: var(--space-2) var(--space-3);
  white-space: nowrap;
}
.status-badge::before {
  content: "";
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--color-signal);
  box-shadow: 0 0 0 0 rgba(200,241,105,0.6);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(200,241,105,0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(200,241,105,0); }
  100% { box-shadow: 0 0 0 0 rgba(200,241,105,0); }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  z-index: 2;
  padding-top: var(--space-20);
  padding-bottom: var(--space-24);
  max-width: 880px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-signal);
  margin-bottom: var(--space-6);
}
.eyebrow__dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--color-signal);
}

.hero__headline {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 58px);
  font-weight: var(--fw-medium);
  line-height: var(--lh-display);
  letter-spacing: var(--tracking-display);
  color: #fff;
  text-wrap: balance;
  margin-bottom: var(--space-6);
}
.hero__headline em {
  font-style: italic;
  font-weight: var(--fw-regular);
  color: var(--color-signal);
}

.hero__positioning {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  color: rgba(255,255,255,0.74);
  line-height: var(--lh-loose);
  max-width: 72ch;
  margin-bottom: var(--space-10);
}

/* Hero decoration — faint stacked strata rising to the right (layers motif) */
.hero-strata {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 46%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 65%);
          mask-image: linear-gradient(90deg, transparent, #000 65%);
}
.hero-strata i {
  position: absolute;
  right: -10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,241,105,0.22));
}
.hero-strata i:nth-child(1){ bottom: 18%; width: 60%; }
.hero-strata i:nth-child(2){ bottom: 30%; width: 72%; }
.hero-strata i:nth-child(3){ bottom: 42%; width: 84%; }
.hero-strata i:nth-child(4){ bottom: 54%; width: 96%; }
.hero-strata i:nth-child(5){ bottom: 66%; width: 78%; }
.hero-strata i:nth-child(6){ bottom: 78%; width: 64%; }

.band-dark::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 96px;
  background: linear-gradient(180deg, transparent, var(--color-paper));
  z-index: 1;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Capture form — sits in the hero, signal-lime button (brand CTA moment)
   -------------------------------------------------------------------------- */
.cta { max-width: 520px; position: relative; }

.capture-form {
  display: flex;
  flex-direction: row;
  gap: var(--space-2);
  align-items: stretch;
}

.capture-form__input {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  color: #fff;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-2);
  padding: 0 var(--space-4);
  height: 48px;
  outline: none;
  transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}
.capture-form__input::placeholder { color: rgba(255,255,255,0.45); }
.capture-form__input:focus {
  border-color: var(--color-signal);
  background: rgba(255,255,255,0.10);
  box-shadow: var(--shadow-focus-signal);
}
.capture-form__input[aria-invalid="true"] {
  border-color: #FF8A8A;
  box-shadow: 0 0 0 3px rgba(255,138,138,0.25);
}

.capture-form__button {
  flex: 0 0 auto;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-tight);
  color: var(--color-anchor);
  background: var(--color-signal);
  border: 1px solid transparent;
  border-radius: var(--radius-2);
  padding: 0 var(--space-6);
  height: 48px;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}
.capture-form__button:hover { box-shadow: var(--shadow-focus-signal); }
.capture-form__button:active { background: #B8DE5E; }
.capture-form__button:focus-visible { box-shadow: var(--shadow-focus-signal); }
.capture-form__button:disabled { opacity: 0.6; cursor: progress; }

.capture-form__expectation {
  margin-top: var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--fs-body-sm);
  color: rgba(255,255,255,0.6);
  line-height: var(--lh-body);
}
.capture-form__expectation-status {
  font-weight: var(--fw-semibold);
  color: rgba(255,255,255,0.85);
}

.capture-form__error {
  display: none;
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--fs-body-sm);
  color: #FFB3B3;
}
.capture-form__error.is-visible { display: block; }

.capture-form__success {
  display: none;
  font-family: var(--font-sans);
  font-size: var(--fs-body-lg);
  color: #fff;
  line-height: var(--lh-body);
  padding: var(--space-4) 0;
  opacity: 0;
  transition: opacity var(--transition-base);
}
.capture-form__success.is-visible { display: block; }
.capture-form__success.is-faded-in { opacity: 1; }

/* --------------------------------------------------------------------------
   Features grid — 2-column tile layout, paper surface
   -------------------------------------------------------------------------- */
.features {
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
}
.features__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-anchor);
  margin-bottom: var(--space-10);
}
.features__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}
.feature-tile {
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-3);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.feature-tile__badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-muted-2);
  background: var(--color-paper-2);
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-pill);
  padding: 2px var(--space-3);
  margin-bottom: var(--space-1);
}
.feature-tile__label {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-h6);
  font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-display);
  line-height: var(--lh-snug);
  color: var(--color-ink);
}
.feature-tile--soon .feature-tile__label { color: var(--color-muted); }
.feature-tile__body {
  font-family: var(--font-sans);
  font-size: var(--fs-body-sm);
  color: var(--color-muted);
  line-height: var(--lh-body);
}

/* --------------------------------------------------------------------------
   Footer — dark anchor-2
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--color-anchor-2);
  color: rgba(255,255,255,0.6);
  padding: var(--space-12) 0;
}
.site-footer__content {
  max-width: var(--container);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: rgba(255,255,255,0.5);
  line-height: var(--lh-body);
}
.site-footer__content > span:first-child {
  font-family: var(--font-sans);
  letter-spacing: 0;
}
.site-footer__link { color: rgba(255,255,255,0.7); }
.site-footer__link:hover { color: var(--color-signal); text-decoration: none; }
.site-footer__separator { color: rgba(255,255,255,0.2); user-select: none; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .site-header__inner { height: 64px; }
  .logo { font-size: var(--fs-body-lg); }
  .hero { padding-top: var(--space-12); padding-bottom: var(--space-20); }
  .hero-strata { display: none; }
  .capture-form { flex-direction: column; }
  .capture-form__button { width: 100%; }
  .features { padding-top: var(--space-16); padding-bottom: var(--space-16); }
  .features__grid { grid-template-columns: 1fr; }
  .site-footer__content { flex-direction: column; align-items: flex-start; gap: var(--space-2); }
  .site-footer__separator { display: none; }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .capture-form__input, .capture-form__button, .capture-form__success { transition: none; }
  .status-badge::before { animation: none; }
}
