/* Shared look for scene.express. Loaded by index, gallery, archive, privacy
   and scene. Tokens live here only: no page repeats them.
   Contrast checked against --ground and --surface at 4.5:1 or better.
   The old faint grey #5a5a5f is retired (2.9:1) — use --muted. */

:root {
  --ground: #0b0b0d;
  --surface: #141418;
  --line: #26262c;
  --line-strong: #3a3a42;
  --ink: #f4f4f6;
  --muted: #9a9aa3;
  --accent: #35d3f2;
  --on-accent: #0b0b0d;
  --nav-h: 60px;
  --gutter: max(16px, 3vw);
  --gutter-l: max(16px, 3vw, env(safe-area-inset-left));
  --gutter-r: max(16px, 3vw, env(safe-area-inset-right));
  --measure: 1280px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Layout A is a single column: nothing may push the page sideways at 390px. */
  overflow-x: hidden;
}

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

/* Hover only where there is a pointer that can hover. On a phone an
   unguarded :hover sticks after the tap and the element stays lit. */
@media (hover: hover) {
  a:hover { color: var(--accent); }
}

/* No grey flash on tap, no long-press callout or text selection on the
   things that behave as buttons, and no 300ms wait before a tap registers. */
a, button, label, summary, input, [role="button"] {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
a, button, label, summary, [role="button"] {
  -webkit-touch-callout: none;
}
button, .btn-primary, .btn-secondary, .wordmark, .chip {
  -webkit-user-select: none;
  user-select: none;
}

img { max-width: 100%; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

[hidden] { display: none !important; }

/* Type scale. Archivo carries the display sizes, Inter the prose,
   JetBrains Mono the small labels and capture data. */
.display {
  margin: 0;
  font-family: Archivo, sans-serif;
  font-stretch: 112%;
  font-weight: 800;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.h2 {
  margin: 0;
  font-family: Archivo, sans-serif;
  font-stretch: 108%;
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 34px);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.lede { margin: 0; font-size: 17px; line-height: 1.55; color: var(--muted); }
.dot { color: var(--accent); }

/* ---------- nav: identical on every page ---------- */

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 11px var(--gutter-r) 11px var(--gutter-l);
  padding-top: max(11px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--line);
  background: var(--ground);
}
.site-nav .wordmark {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  /* 44px target without pushing the bar taller than 60px at 390px. */
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.site-nav .wordmark { margin-right: auto; }
.site-nav .nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
  font-size: 14px;
}
/* Below 640px the bar becomes two rows: wordmark and the one primary action
   on the first, the three destinations on the second. Three stacked rows
   (what plain wrapping gives) eats a third of a 390px screen. */
@media (max-width: 640px) {
  .site-nav { gap: 0 16px; }
  .site-nav .nav-links { order: 3; width: 100%; gap: 0 18px; }
  .site-nav > .btn-primary { order: 2; }
  .site-nav .nav-links a { min-height: 40px; }
}
.site-nav .nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
}
.site-nav .nav-links a[aria-current="page"] { color: var(--ink); }
@media (hover: hover) {
  .site-nav .nav-links a:hover { color: var(--ink); }
}
.site-nav .nav-links a.btn-primary { color: var(--on-accent); }

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

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 22px;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  border: 1px solid var(--accent);
}
@media (hover: hover) {
  .btn-primary:hover { color: var(--on-accent); opacity: 0.9; }
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  font-weight: 500;
}
@media (hover: hover) {
  .btn-secondary:hover { color: var(--ink); border-color: var(--ink); }
}

/* ---------- layout helpers ---------- */

.section {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 64px var(--gutter-r) 64px var(--gutter-l);
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  margin-bottom: 24px;
}
.section-head .more {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 14px; color: var(--muted);
}
@media (hover: hover) {
  .section-head .more:hover { color: var(--accent); }
}

/* ---------- scene cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.scene-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s;
}
@media (hover: hover) {
  .scene-card:hover { border-color: var(--line-strong); color: inherit; }
}
.scene-card:active { border-color: var(--line-strong); }
.scene-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #000;
}
.scene-card .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 500;
}
.scene-card .meta .tag { color: var(--muted); font-size: 13px; }

/* ---------- footer ---------- */

.site-footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 36px var(--gutter-r) calc(56px + env(safe-area-inset-bottom)) var(--gutter-l);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 40px;
  font-size: 14px;
  color: var(--muted);
}
.site-footer a { color: var(--muted); }
@media (hover: hover) {
  .site-footer a:hover { color: var(--accent); }
}
