/* base.css: tokens, reset, page column, shared reveal.
   Only the scaffold and smoothing passes edit this file. */

:root {
  --bg: #faf5f5;
  --ink: #060606;
  --body: #434445;
  --mute: #9b9b9b;
  --blue: #3a53ed;
  --blue-light: rgb(44, 111, 255);
  --dot: #cbc9d6;
  --node-ring: #c3c1c1;
  --node-fill: #b4b2b2;
  --case-dot: #a9a7ad;
  --route: #c2c0c0;
  --case-title: #313030;
  --case-desc: #666;
  --row-hover: rgba(23, 22, 15, .035);
  --link-hover: #5c5b5b;
  --link-pill: #f2f0f0;
  --keyline: #fff;
  --veil-rgb: 255, 255, 255;
  --head-blue: #002afb;

  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  /* Owner rule: no mono labels. SF Pro on Apple, Poppins elsewhere. */
  --label: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Poppins", sans-serif;

  --ease: cubic-bezier(.23, 1, .32, 1);
  --ease-av: cubic-bezier(.22, 1, .36, 1);

  --col: min(100% - 48px, 560px);
  --gap: 48px;
  --pad-top: 80px;
  --t0: .1s; /* reveal start; the gate (gate.css) holds reveals until the visitor is in */
}

[data-theme="dark"] {
  --bg: #191817;
  --ink: #f5f3f0;
  --body: #b9b8b6;
  --mute: #7d7c7c;
  --blue: #2c6fff;
  --dot: #39383f;
  --node-ring: #4a4848;
  --node-fill: #565454;
  --case-dot: #5a585e;
  --route: #5e5c5c;
  --case-title: #e8e6e3;
  --case-desc: #a3a2a0;
  --row-hover: rgba(255, 255, 255, .045);
  --link-hover: #d6d4d1;
  --link-pill: #2b2928;
  --keyline: rgba(255, 255, 255, .14);
  --veil-rgb: 25, 24, 23;
}

*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, p, ol, ul, li, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

/* body IS the page column: every section file is a flex child. */
body {
  width: var(--col);
  margin: 0 auto;
  padding: var(--pad-top) 0 168px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap);
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection { background: #1e9e52; color: #fff; }
:focus-visible { outline: 2px solid #1e9e52; outline-offset: 3px; border-radius: 2px; }

@media (max-width: 1219px) {
  :root { --pad-top: 28px; }
  body { padding-top: 0; }
}
@media (max-width: 620px) {
  :root { --pad-top: 3vh; --gap: 40px; }
}

/* Label font helper: caps, weight 500, letter-spaced. */
.label {
  font-family: var(--label);
  font-weight: 500;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Visible slot marker for facts we do not have yet. */
.slot {
  color: var(--blue);
  background: rgba(58, 83, 237, .07);
  border-radius: 4px;
  padding: 0 4px;
}

/* ---------- reveal (shared) ---------- */
@keyframes reveal {
  from { opacity: 0; filter: blur(8px); transform: translateY(-12px) scale(.985); }
  to { opacity: var(--reveal-to, 1); filter: blur(0); transform: none; }
}
.reveal,
.path-curve,
.folio-path {
  animation: reveal .4s var(--ease) backwards;
  animation-delay: calc(var(--t0) + var(--d, 0ms));
}
/* Smoothing: the dotted curve arrives with the plan head (0ms) and the rail with the
   first entry (120ms), so no bare dotted line shows before the blocks it connects. */
.folio-path { --d: 120ms; }

@media (prefers-reduced-motion: reduce) {
  @keyframes reveal { from { opacity: 0; } to { opacity: var(--reveal-to, 1); } }
  .reveal, .path-curve, .folio-path { animation-duration: .2s; animation-timing-function: linear; }
}

/* ---------- smoothing: z-order under the contact bar ---------- */
/* The photo fan, thumbnail fans and logo pairs use z-index for their own card order.
   Their parents were not stacking contexts, so a hovered memory (z 10) painted above the
   fixed contact bar (z 5) while the fan scrolled through the veil. Isolate each group so
   its z-indexes only order its own cards; the bar and veil stay on top of all content. */
.memories, .shots, .tl-logos { isolation: isolate; }

/* smoothing: in dark mode a screenshot card's 1.5px keyline is rgba(255,255,255,.14);
   the light-mode #fff fill behind it showed through as a bright white frame. */
[data-theme="dark"] .shot.has-img { background: var(--bg); }
