:root {
  --bg: #050505;
  --ink: #f4f4f1;
  --muted: #8d8d86;
  --line: rgba(244, 244, 241, 0.55);
  --aim: rgba(244, 244, 241, 0.92);
  --miss: #e23a3a;
  --pad: 20px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

body.is-booting { overflow: hidden; }

.page {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 28px var(--pad) 120px;
  opacity: 0;
  pointer-events: none;
}

body.is-ready .page {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.5s ease;
}

.page[hidden], .cta[hidden] { display: none !important; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mark {
  width: 84px;
  height: auto;
  display: block;
  object-fit: contain;
  border: 0;
}

.kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.intro {
  padding: 36px 0 28px;
  opacity: 0;
}

.intro.is-on {
  opacity: 1;
  transition: opacity 0.5s ease;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: clamp(40px, 12vw, 64px);
  line-height: 0.9;
  font-weight: 600;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  opacity: 0;
}

h1.is-in { opacity: 1; }

.lead {
  margin: 18px 0 0;
  max-width: 34em;
  font-size: 15px;
  line-height: 1.45;
  color: #d7d7d1;
  opacity: 0;
}

.lead.is-in {
  opacity: 1;
  transition: opacity 0.55s ease;
}

.archive {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.cell {
  position: relative;
  min-height: 168px;
  padding: 10px 8px 12px;
  overflow: visible;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.cell:focus-visible {
  outline: 1px solid rgba(244, 244, 241, 0.55);
  outline-offset: -2px;
}

.cell::before,
.cell::after {
  content: "";
  position: absolute;
  background: var(--line);
  transform-origin: left top;
  transform: scaleX(0);
}

.cell::before { top: 0; left: 0; right: 0; height: 1px; }
.cell::after { top: 0; bottom: 0; left: 0; width: 1px; transform: scaleY(0); }

.archive.is-lined .cell::before {
  transform: scaleX(1);
  transition: transform 0.7s ease;
}

.archive.is-lined .cell::after {
  transform: scaleY(1);
  transition: transform 0.85s ease;
}

.edge-r, .edge-b {
  position: absolute;
  background: var(--line);
  transform-origin: left top;
}

.edge-r { top: 0; right: 0; width: 1px; height: 100%; transform: scaleY(0); }
.edge-b { left: 0; bottom: 0; height: 1px; width: 100%; transform: scaleX(0); }

.archive.is-lined .edge-r { transform: scaleY(1); transition: transform 0.85s ease; }
.archive.is-lined .edge-b { transform: scaleX(1); transition: transform 0.7s ease; }

.meta, .spec {
  margin: 0;
  font-size: 9px;
  line-height: 1.35;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta strong, .spec {
  display: block;
  color: var(--ink);
  font-weight: 500;
}

.spec { margin-top: 8px; white-space: pre-line; }

.shot {
  display: block;
  width: 120px;
  height: 120px;
  margin: 6px auto 2px;
  object-fit: contain;
  object-position: center center;
  transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(0.88);
  opacity: 0;
  filter: blur(6px);
  position: relative;
  z-index: 1;
}

.cell.is-in .shot {
  opacity: 1;
  filter: blur(0);
  transform: none;
  transition: opacity 0.75s ease, filter 0.75s ease, transform 0.95s cubic-bezier(0.16, 1, 0.3, 1);
}

.meta, .spec, .name {
  opacity: 0;
  transform: translateY(6px);
  position: relative;
  z-index: 1;
}

.cell.is-in .meta,
.cell.is-in .spec,
.cell.is-in .name {
  opacity: 1;
  transform: none;
  transition: opacity 0.45s ease 0.12s, transform 0.45s ease 0.12s;
}

.name {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.25;
}

.lock {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 120px;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(0.86);
  pointer-events: none;
  opacity: 0;
  z-index: 2;
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cell.is-locked .lock {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.lock-ring {
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(244, 244, 241, 0.35);
  border-radius: 50%;
}

.lock-dot {
  position: absolute;
  left: 50%; top: 50%;
  width: 4px; height: 4px;
  margin: -2px 0 0 -2px;
  background: var(--aim);
  border-radius: 50%;
}

.lock-arm { position: absolute; background: var(--aim); }
.lock-arm.h { left: 8%; right: 8%; top: 50%; height: 1px; transform: translateY(-50%); opacity: 0.55; }
.lock-arm.v { top: 8%; bottom: 8%; left: 50%; width: 1px; transform: translateX(-50%); opacity: 0.55; }

.lock-c {
  position: absolute;
  width: 16px; height: 16px;
  border-color: var(--aim);
  border-style: solid;
}
.lock-c.tl { top: 6%; left: 6%; border-width: 1.5px 0 0 1.5px; }
.lock-c.tr { top: 6%; right: 6%; border-width: 1.5px 1.5px 0 0; }
.lock-c.bl { bottom: 6%; left: 6%; border-width: 0 0 1.5px 1.5px; }
.lock-c.br { bottom: 6%; right: 6%; border-width: 0 1.5px 1.5px 0; }

.cta {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(calc(100% - 32px), 480px);
  display: block;
  text-align: center;
  text-decoration: none;
  color: #050505;
  background: #f4f4f1;
  border-radius: 999px;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
}

body.is-ready .cta:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.45s ease 0.15s;
}

.cta:active { transform: translateX(-50%) scale(0.98); }

/* Boot overlay styles live in intro.css */

@media (min-width: 900px) {
  .page { width: min(100%, 880px); padding-top: 40px; }
  .cell { min-height: 214px; padding: 12px 10px 14px; }
  .shot { width: 160px; height: 160px; }
  .lock { width: 160px; }
  h1 { font-size: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .shot, .meta, .spec, .name, .cell, .archive, .intro, .lock, .page, .cta {
    transition: none !important;
    animation: none !important;
    filter: none !important;
  }
}
