/* base.css — foundation layer for the One Shot Screen site.
   STRICT MONOCHROME dark glassmorphism. Reset, typography, the .glass extras,
   buttons (the single white-inversion primary + glass/ghost secondaries), nav,
   footer, eyebrows/microlabels, pills/badges, cards, utilities, focus rings, and
   the prefers-reduced-motion block. Every color is a token from tokens.css — no
   hard-coded hue anywhere (only monochrome rgba for incidental shading). */

/* ============================================================
   RESET
   ============================================================ */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px; /* clears the sticky nav on anchor jumps */
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

img,
svg,
video,
canvas { display: block; max-width: 100%; }

svg { fill: none; }

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button { cursor: pointer; background: none; border: none; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; padding: 0; }

code,
kbd,
pre,
.mono { font-family: var(--font-mono); }

:where(b, strong) { font-weight: 600; color: var(--text); }

/* Numbers align: tabular figures wherever digits matter. */
.mono,
.code,
[class*="num"],
[class*="price"] { font-variant-numeric: tabular-nums; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-hero);
  letter-spacing: -0.035em;
  line-height: 1.02;
}

h2 { font-size: var(--fs-h2); letter-spacing: -0.025em; }

h3 { font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.015em; }

p { text-wrap: pretty; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.secondary { color: var(--text-secondary); }
.muted { color: var(--text-muted); }

/* The ".accent" class is a WHITE-EMPHASIS, never a hue — it brightens within an
   otherwise muted line (primary text against secondary). */
.accent {
  color: var(--text);
  font-weight: inherit;
}

/* A struck-through phrase, monochrome — the strike is a muted hairline. */
.strike {
  position: relative;
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-color: var(--text-muted);
  text-decoration-thickness: 2px;
}

/* ============================================================
   EYEBROWS / MICRO-LABELS  (uppercase mono, wide tracking)
   ============================================================ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.eyebrow--center { justify-content: center; }

/* Former "bronze" eyebrow → a hair brighter, still monochrome. */
.eyebrow--bronze { color: var(--text-secondary); }

/* Small uppercase mono tag used inside cards/art. */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--fill-subtle);
  border: 1px solid var(--edge-subtle);
  border-radius: var(--radius-pill);
  padding: 5px 11px;
  line-height: 1;
}

/* ============================================================
   LAYOUT PRIMITIVES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section { padding-block: var(--section-pad); }
.section--tight { padding-block: clamp(72px, 9vh, 120px); }

.center { text-align: center; }

.text-col {
  max-width: var(--maxw-text);
  margin-inline: auto;
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(48px, 7vh, 80px);
}
.section-head.center { margin-inline: auto; }
.section-head > p:last-child {
  color: var(--text-secondary);
  font-size: var(--fs-lead);
  margin-top: var(--space-4);
  line-height: 1.5;
}
.section-head.center > p:last-child { margin-inline: auto; max-width: 580px; }

/* ============================================================
   GLASS EXTRAS  (the .glass + .glass--light recipes live in tokens.css)
   ============================================================ */
.glass { position: relative; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  position: relative;
  background: linear-gradient(
    160deg,
    var(--glass-fill-top) 0%,
    var(--glass-fill-bottom) 100%
  );
  backdrop-filter: blur(var(--glass-blur)) saturate(120%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(120%);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-md);
  box-shadow:
    0 16px 40px var(--glass-shadow),
    inset 0 1px 1px rgba(255, 255, 255, 0.12);
}

.card--pad { padding: clamp(24px, 3.5vw, 40px); }

/* Hover lift + brighter edge — transform/opacity only. */
.card--hover {
  transition:
    transform var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
}
.card--hover:hover,
.card--hover:focus-within {
  transform: translateY(-3px);
  border-color: var(--glass-edge-light);
  box-shadow:
    0 24px 56px var(--glass-shadow),
    inset 0 1px 1px rgba(255, 255, 255, 0.18);
}

/* Emphasized card variant (former "accent" card) — a brighter glass edge, no hue. */
.card--accent {
  background: linear-gradient(
    160deg,
    var(--glass-fill-light-top) 0%,
    var(--glass-fill-light-bottom) 100%
  );
  border-color: var(--glass-edge-light);
  box-shadow:
    0 24px 56px var(--glass-shadow),
    inset 0 1px 1px rgba(255, 255, 255, 0.20);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card { background: rgba(28, 28, 32, 0.92); }
  .card--accent { background: rgba(40, 40, 46, 0.94); }
}

/* ============================================================
   BUTTONS
   - .btn--primary = the ONE solid white-fill inversion per surface
   - .btn--secondary = glass / ghost
   ============================================================ */
.btn {
  --btn-py: 12px;
  --btn-px: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;            /* tap target */
  padding: var(--btn-py) var(--btn-px);
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: var(--fs-small);
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  transition:
    transform var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}
.btn:active { transform: scale(0.98); }

.btn svg { width: 18px; height: 18px; stroke-width: 1.8; }

/* PRIMARY — solid white fill, dark text. The single inversion. */
.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.10), var(--shadow-sm);
}
.btn--primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 12px 32px rgba(255, 255, 255, 0.16), var(--shadow-md);
}
.btn--primary:active { background: var(--accent-press); }

/* SECONDARY — glass / ghost. */
.btn--secondary {
  background: var(--fill-subtle);
  color: var(--text);
  border-color: var(--edge-subtle);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.btn--secondary:hover {
  background: var(--fill-subtle-hover);
  border-color: var(--edge-hover);
}

/* Sizes */
.btn--sm { --btn-py: 9px; --btn-px: 16px; min-height: 40px; font-size: 0.875rem; }
.btn--lg { --btn-py: 15px; --btn-px: 28px; min-height: 52px; font-size: 1rem; }
.btn--block { display: flex; width: 100%; }

/* "soon" tag inside a button — a tiny glass pill, never colored. */
.btn__soon {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(0, 0, 0, 0.16);
  color: var(--on-accent);
  line-height: 1;
  opacity: 0.7;
}
/* When the soon tag sits on a glass (non-inverted) button, flip its shading. */
.btn--secondary .btn__soon {
  background: var(--fill-subtle);
  border-color: var(--edge-subtle);
  color: var(--text-muted);
  opacity: 1;
}

/* ============================================================
   PILLS / BADGES
   ============================================================ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--fill-subtle);
  border: 1px solid var(--edge-subtle);
  color: var(--text-secondary);
  line-height: 1;
}
.pill--mono .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text);        /* status dot — white, not green */
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}
/* Former "bronze" pill → brighter glass emphasis, monochrome. */
.pill--bronze {
  background: linear-gradient(
    135deg,
    var(--glass-fill-light-top),
    var(--glass-fill-light-bottom)
  );
  border-color: var(--glass-edge-light);
  color: var(--text);
}

/* "pro" badge — small glass pill. */
.bento__badge,
.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: var(--fill-subtle);
  border: 1px solid var(--edge-subtle);
  color: var(--text-secondary);
  line-height: 1;
}

/* kbd chips */
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--fill-subtle);
  border: 1px solid var(--edge-subtle);
  border-bottom-width: 2px;
  border-radius: 7px;
  line-height: 1;
}

/* ============================================================
   CHECK MARKS / OK GLYPHS  (monochrome — never green)
   ============================================================ */
.ok,
.ok--accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.ok::before,
.ok--accent::before {
  content: "";
  width: 18px;
  height: 18px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='m5 12 5 5L20 7'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='m5 12 5 5L20 7'/></svg>") center / contain no-repeat;
}
.ok { color: var(--text-secondary); }
.ok--accent { color: var(--text); } /* "accent" = slightly brighter, still white */

/* ============================================================
   CODE BLOCKS  (monochrome "syntax" — vary brightness only, NO color)
   ============================================================ */
.code {
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre;
  overflow-x: auto;
  tab-size: 2;
}
.c-key { color: var(--text); font-weight: 500; }      /* brightest */
.c-str { color: var(--text-secondary); }
.c-num { color: var(--text); }
.c-cmt { color: var(--text-muted); font-style: italic; }
.c-line { display: block; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition:
    background-color var(--dur) var(--ease-out),
    backdrop-filter var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out),
    padding var(--dur) var(--ease-out);
  border-bottom: 1px solid transparent;
  padding-block: 14px;
}
.nav.is-scrolled {
  background: rgba(10, 10, 11, 0.62);
  backdrop-filter: blur(20px) saturate(120%);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  border-bottom-color: var(--line);
  padding-block: 9px;
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.nav__logo { width: 30px; height: 30px; }
.nav__word {
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(2px, 1vw, 10px);
  margin-inline: auto;
}
.nav__links a {
  position: relative;
  padding: 8px 12px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast) var(--ease-out);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
  transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out);
}
.nav__links a:hover { color: var(--text); }
.nav__links a.is-active { color: var(--text); }
.nav__links a.is-active::after { transform: scaleX(1); opacity: 1; }

.nav__cta { display: flex; align-items: center; gap: var(--space-3); flex: none; }

.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  color: var(--text);
  border: 1px solid var(--edge-subtle);
  background: var(--fill-subtle);
}
.nav__toggle svg { width: 22px; height: 22px; }

/* Mobile slide-down panel */
.nav__panel {
  display: none;
  flex-direction: column;
  gap: var(--space-2);
  margin: 12px var(--container-pad) 0;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--glass-fill-light-top), var(--glass-fill-light-bottom));
  backdrop-filter: blur(var(--glass-blur-light)) saturate(130%);
  -webkit-backdrop-filter: blur(var(--glass-blur-light)) saturate(130%);
  border: 1px solid var(--glass-edge-light);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.nav__panel a {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: var(--text-secondary);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.nav__panel a:not(.btn):hover { background: var(--fill-subtle); color: var(--text); }
.nav__panel .btn { margin-top: var(--space-2); }
.nav__panel.is-open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--line);
  padding-block: clamp(56px, 8vh, 96px) var(--space-7);
  margin-top: var(--section-pad);
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: clamp(40px, 6vw, 80px);
}
.footer__brand { max-width: 340px; }
.footer__tag { margin-top: var(--space-4); font-size: var(--fs-small); }
.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__h {
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}
.footer__col a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  transition: color var(--dur-fast) var(--ease-out);
  width: fit-content;
}
.footer__col a:hover { color: var(--text); }
.footer__base {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: clamp(40px, 6vh, 72px);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ============================================================
   ACCESSIBILITY — skip link, sr-only, focus rings, honeypot
   ============================================================ */
.skip-link {
  position: absolute;
  left: 12px;
  top: -120%;
  z-index: 200;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus-visible { top: 12px; }

.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;
}

/* Honeypot — hidden from humans, present for bots. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible { outline-offset: 4px; }

/* Lock scroll while the mobile nav is open. */
body.nav-locked { overflow: hidden; }

/* ============================================================
   SCROLL-REVEAL  (the [data-reveal] system; main.js adds .is-visible)
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  /* No will-change: the reveal is a one-shot transition and main.js unobserves the
     element once visible, so a permanent promoted layer would just hold GPU memory. */
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   GRAIN / WASH  (faint monochrome texture + radial white wash; NO hue)
   ============================================================ */
.grain { position: relative; isolation: isolate; }
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  border-radius: inherit;
}

/* A faint radial white wash placeholder (re-skinned from the old hued glows). */
.wash {
  position: absolute;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.05), transparent 70%);
  filter: blur(8px);
}

/* ============================================================
   REDUCED MOTION  — clean static final states everywhere
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
