/* ============================================================
   base.css — tokens, reset, shared type and controls
   ============================================================ */

/* Registering --p as a real number makes it safe inside calc()
   on every engine, and gives it a defined initial value if JS
   never runs. */
@property --p {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

:root {
  /* palette — pulled from the footage: deep sky, cloud white, shadow */
  /* Monochrome by decision, not by omission: the sky footage is the only
     colour on the page, so nothing in the interface competes with it. */
  --night:  #14171b;
  --paper:  #ffffff;
  --ink:    #0c1014;
  --slate:  #5c6672;
  --rule:   #e4e7eb;

  /* dark-panel equivalents */
  --night-raised: #1b1f25;
  --night-rule:   #2c333c;
  --night-slate:  #8c97a4;

  /* geometry */
  --gut: 20px;                       /* frame inset, matches the mockup */
  --r:   30px;                       /* card radius */
  --pad: clamp(28px, 5vw, 80px);     /* inner horizontal padding */

  /* type */
  /* Two families. Archivo carries narrative and product copy; the mono is
     reserved for structural information, labels and timestamps. */
  --display: "Archivo", system-ui, -apple-system, sans-serif;
  --body:    "Archivo", system-ui, -apple-system, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* scroll progress, 0 → 1. Written by js/hero.js */
  --p: 0;
}

@media (max-width: 720px) {
  :root { --gut: 12px; --r: 22px; --pad: 22px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;                /* never a sideways scroll on a phone */
}

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

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}
.panel--dark :focus-visible,
.site-foot :focus-visible { outline-color: #fff; }

/* ---------- shared type ---------- */

.mono {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 500;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 15px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  touch-action: manipulation;
}
.btn:hover { background: var(--slate); border-color: var(--slate); }
.btn:active { transform: translateY(1px); }

.btn__compact { display: none; }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn--ghost:hover {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.mark {
  display: block;
  width: 1em;
  height: 1em;
  flex: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
