/*
 * Technicore landing — shared design tokens + base styles
 * System fonts, cream palette, dark only when truly required.
 */

/* ── Tokens ────────────────────────────────────────────── */
:root {
  --black: #0f131a;
  --cream: #fffaf6;
  --mint: #dff2f3;
  --sand: #e9e2d2;
  --grey: #bbbcc4;
  --divider-light: rgba(15, 19, 26, 0.10);
  --divider-dark: rgba(255, 250, 246, 0.08);
  --muted-light: rgba(15, 19, 26, 0.55);
  --muted-strong-light: rgba(15, 19, 26, 0.70);
  --muted-faint-light: rgba(15, 19, 26, 0.40);
  --muted-dark: rgba(255, 250, 246, 0.55);
  --muted-strong-dark: rgba(255, 250, 246, 0.65);
  --muted-faint-dark: rgba(255, 250, 246, 0.35);

  --font-system: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;

  --wrap-max: 1200px;
  --gutter: 40px;
  --gutter-mobile: 24px;
}

/* ── Reset / base ──────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--black);
  font-family: var(--font-system);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ── Layout primitives ─────────────────────────────────── */
.wrap {
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* All sections default to cream. Use .section-dark only on hero / required dark areas. */
.section {
  padding: 160px 0 140px;
  border-top: 1px solid var(--divider-light);
}

.section-dark {
  background: var(--black);
  color: var(--cream);
  border-top-color: var(--divider-dark);
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-bottom: 48px;
  opacity: 0.5;
  color: var(--black);
}
.section-dark .section-label { color: var(--cream); }

/* ── Type scale ────────────────────────────────────────── */
.t-display {                /* hero CTA-scale */
  font-size: clamp(80px, 14vw, 200px);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.85;
}
.t-headline {               /* section h2 */
  font-size: clamp(36px, 6vw, 80px);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.04em;
}
.t-headline-italic {        /* hive-style emphasis */
  font-size: clamp(48px, 8vw, 120px);
  font-weight: 900;
  font-style: italic;
  line-height: 0.88;
  letter-spacing: -0.05em;
}
.t-subhead {                /* large body lead */
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.t-medium {                 /* mid-scale callout */
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.t-stat {                   /* stat numbers */
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}
.t-stat-big {               /* TAM-scale */
  font-size: clamp(64px, 9vw, 140px);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.88;
}
.t-stat-huge {              /* problem big number */
  font-size: clamp(100px, 14vw, 200px);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.85;
}
.t-body {
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  color: var(--muted-light);
}
.t-body-tight {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted-light);
}
.t-small {
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted-light);
}
.t-stat-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-faint-light);
  line-height: 1.5;
}
.t-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted-faint-light);
}

.section-dark .t-body,
.section-dark .t-body-tight,
.section-dark .t-small { color: var(--muted-dark); }
.section-dark .t-stat-label,
.section-dark .t-eyebrow { color: var(--muted-faint-dark); }

/* ── Pull quote ────────────────────────────────────────── */
.pull-quote {
  border-left: 2px solid var(--black);
  padding: 8px 0 8px 32px;
}
.pull-quote p {
  font-size: clamp(18px, 2.2vw, 26px);
  font-style: italic;
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--muted-strong-light);
  max-width: 820px;
}
.pull-quote.light { border-left-color: rgba(255, 250, 246, 0.3); }
.pull-quote.light p { color: var(--muted-strong-dark); }

/* ── Stat row (3-col with hairlines) ───────────────────── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--divider-light);
}
.section-dark .stat-row { border-top-color: var(--divider-dark); }

.stat-cell {
  padding: 40px 40px 40px 0;
  border-right: 1px solid var(--divider-light);
}
.stat-cell:nth-child(2) { padding-left: 40px; }
.stat-cell:last-child { border-right: none; padding-right: 0; padding-left: 40px; }
.section-dark .stat-cell { border-right-color: var(--divider-dark); }

.stat-number {
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--black);
  margin-bottom: 12px;
}
.section-dark .stat-number { color: var(--cream); }

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 18px 48px;
  border: 1px solid var(--black);
  background: transparent;
  color: var(--black);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn:hover { background: var(--black); color: var(--cream); }
.btn-light {
  border-color: rgba(255, 250, 246, 0.35);
  color: var(--cream);
}
.btn-light:hover { background: var(--cream); color: var(--black); border-color: var(--cream); }

/* ── Reveal on scroll ──────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Cross-page nav (top of every page after auth) ─────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 250, 246, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--divider-light);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.nav-brand {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--black);
}
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-light);
  transition: color 0.2s ease;
}
.nav-links a:hover,
.nav-links a.active { color: var(--black); }

/* ── Auth-gate hide-flash (paired with inline <style>html{visibility:hidden}</style>) ─ */
html.auth-ready { visibility: visible; }

/* ── Sr-only utility ───────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ── Reduced motion ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ── Mobile ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .wrap { padding: 0 var(--gutter-mobile); }
  .section { padding: 100px 0 80px; }
  .stat-row { grid-template-columns: 1fr; }
  .stat-cell {
    border-right: none;
    border-bottom: 1px solid var(--divider-light);
    padding: 32px 0;
  }
  .stat-cell:nth-child(2) { padding-left: 0; }
  .stat-cell:last-child { border-bottom: none; padding-left: 0; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 11px; }
}

/* ── Reveal/counter init helper (loaded by every page) ─ */
