/* =============================================================================
   page.css
   Reading this as: identity-extraction specimen for a designer comparing
   visual systems, with a dark poster language, leaning toward native CSS +
   the extracted grok.bot kit (not Tailwind SaaS, not React).

   Mode: redesign-overhaul. Preserve kit token NAMES and IA. Overhaul the
   visual language to kill AI-tells.

   Dials: VARIANCE 8 / MOTION 5 / DENSITY 3
   Existing extract was ~6 / 3 / 3. Overhaul is +2 variance, +2 motion,
   density match.

   Motion 5 = fluid CSS (transform/opacity, cubic-bezier(0.16,1,0.3,1)).
   No GSAP. No window.addEventListener('scroll'). Honor reduced-motion.

   Dual mode skipped: brand insists dark-only. No light theme.
   Tailwind/React declined because the brief is a static kit specimen.
   One accent for the whole page: --acid #d8ff3e. Violet is atmosphere-only.
   Shape rule: all-soft 16px (see system.css).
   ============================================================================= */

/* Grain lives on a fixed layer. Never on a scrolling container. */
.atmosphere::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: url("images/paper-graphite.jpg") center / cover;
  opacity: 0.22;
  mix-blend-mode: overlay;
}

.skip {
  position: absolute;
  left: var(--space-2);
  top: var(--space-2);
  z-index: 20;
  padding: 8px 12px;
  background: var(--acid);
  color: var(--on-acid);
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: translateY(-160%);
}
.skip:focus { transform: none; }

/* First viewport = nav + hero. Hero itself is not h-screen. */
.mast {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.page-nav {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.page-nav .type-meta {
  margin: 0;
  text-align: right;
}

.page-hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(240px, 0.95fr);
  align-items: stretch;
  gap: 0 6vw;
  padding-top: 40px; /* under pt-24 */
  padding-bottom: 32px;
  min-height: 0;
}
.hero-copy {
  align-self: end;
  padding-bottom: 6vh;
  max-width: 11em;
}
.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(52px, 7.2vw, 96px);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.08em;
}
.hero-lede {
  max-width: 22ch;
  margin: 18px 0 0;
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.04em;
  color: var(--note);
}
.hero-lede em {
  color: var(--acid);
  font-style: italic;
  padding-bottom: 2px;
}

.hero-visual {
  position: relative;
  min-height: 0;
}
.hero-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-soft);
}
.hero-visual .artifact {
  position: absolute;
  left: -14%;
  bottom: 7%;
}

/* Artifact innards. Notches via CSS mask, transparent, not night-filled. */
.artifact {
  --notch-r: 14px;
  --notch-y: 72%;
  -webkit-mask-image:
    radial-gradient(circle var(--notch-r) at 0 var(--notch-y), transparent 98%, #000),
    radial-gradient(circle var(--notch-r) at 100% var(--notch-y), transparent 98%, #000);
  -webkit-mask-size: 51% 100%, 51% 100%;
  -webkit-mask-position: 0 0, 100% 0;
  -webkit-mask-repeat: no-repeat;
  mask-image:
    radial-gradient(circle var(--notch-r) at 0 var(--notch-y), transparent 98%, #000),
    radial-gradient(circle var(--notch-r) at 100% var(--notch-y), transparent 98%, #000);
  mask-size: 51% 100%, 51% 100%;
  mask-position: 0 0, 100% 0;
  mask-repeat: no-repeat;
}
.artifact-top {
  font: 500 10px/1 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.artifact-title {
  margin: 28px 0 22px;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.08em;
}
.artifact-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  padding-block: 14px;
  border-block: 1px dashed var(--dash-on-acid);
}
.artifact-meta div { display: grid; gap: 5px; }
.artifact-meta small {
  font: 400 9px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.artifact-meta strong {
  font: 800 13px/1 var(--font-display);
}

/* Motion 5: load-in cascade. Transform + opacity only. */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy {
    animation: rise 0.9s var(--ease-out) both;
  }
  .hero-visual img {
    animation: rise-soft 1.05s 0.08s var(--ease-out) both;
  }
  .hero-visual .artifact {
    animation: artifact-in 1.05s 0.18s var(--ease-out) both;
  }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}
@keyframes rise-soft {
  from { opacity: 0; transform: translateY(16px) scale(1.02); }
  to { opacity: 1; transform: none; }
}
@keyframes artifact-in {
  from { opacity: 0; transform: rotate(-5deg) translateY(18px); }
  to { opacity: 1; transform: rotate(-5deg); }
}

/* TURN. Editorial stack, then offset reject. Not a split-header. */
.page-turn {
  position: relative;
  z-index: 1;
  padding-block: var(--space-9) var(--space-8);
  border-top: 1px solid var(--line);
}
.turn-title {
  max-width: 14ch;
  margin: 0 0 var(--space-4);
}
.turn-lead {
  max-width: 34ch;
  margin: 0 0 var(--space-7);
  color: var(--turn-body);
}
.turn-split {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: var(--space-6);
  align-items: start;
}
.turn-keep {
  max-width: 16ch;
  color: var(--ink);
}
.turn-keep .type-display-lg {
  font-size: clamp(36px, 4.6vw, 64px);
  line-height: 1.14;
  letter-spacing: -0.04em;
}
.turn-keep .type-display-lg em {
  color: var(--acid);
  font-style: italic;
  padding-bottom: 0.08em;
}
.turn-leave {
  margin-top: 18vh;
  max-width: 36ch;
  color: var(--turn-body);
}
.turn-leave p { margin: 0 0 14px; }
.turn-leave em {
  color: var(--acid);
  font-style: italic;
}

/* SYSTEM. Featured tiles (unequal) + grouped inventory. */
.system-strip {
  position: relative;
  z-index: 1;
  padding-block: var(--space-8) var(--space-9);
  border-top: 1px solid var(--line);
}
.system-heading {
  max-width: 12ch;
  margin: 0 0 var(--space-6);
}

.token-lead {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: auto auto;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}
.token-lead li {
  list-style: none;
  margin: 0;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-soft);
  background: rgba(8, 9, 11, 0.4);
}
.token-lead .feat-acid {
  grid-row: 1 / 3;
}
.token-lead .swatch { height: 120px; }
.token-lead .feat-acid .swatch { height: 220px; }

.token-groups {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.9fr;
  gap: var(--space-5) var(--space-4);
  margin: 0 0 var(--space-8);
}
.token-groups h3 {
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.token-groups ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.token-groups li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: center;
}

.swatch {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-soft);
  background: var(--swatch);
}
.token-lead .swatch { border-radius: 12px; }
.swatch-acid { border-color: var(--acid); }
.swatch-dark {
  border-color: rgba(255, 255, 255, 0.32);
  background:
    repeating-conic-gradient(rgba(255, 255, 255, 0.1) 0% 25%, transparent 0% 50%)
      0 0 / 10px 10px,
    var(--swatch);
}
.swatch-on-acid {
  position: relative;
  background: var(--acid);
  border-color: var(--line-on-acid);
}
.swatch-on-acid::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 8px;
  background: var(--swatch);
}
.swatch-glow {
  background:
    radial-gradient(circle at 50% 50%, var(--swatch), var(--night) 72%);
  border-color: rgba(255, 255, 255, 0.2);
}
.swatch-elevation {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--night-wash);
}
.swatch-elevation::after {
  content: "";
  width: 28px;
  height: 14px;
  border-radius: 8px;
  background: var(--acid);
  box-shadow: var(--ticket-shadow);
}

.token-groups code,
.token-lead code {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
}
.hex {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.swatch-note {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--fine);
}

.type-board {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-6);
  border-top: 1px solid var(--line);
  padding-top: var(--space-6);
}
.type-col h3 {
  margin: 0 0 var(--space-4);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.type-row {
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--line);
}
.type-row:last-child { border-bottom: 0; }
.type-row .role {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fine);
}
.type-row .wordmark,
.type-row .type-display-xl,
.type-row .type-display-lg,
.type-row .type-display-price,
.type-row .type-lede,
.type-row .type-title-sm,
.type-row .type-body-lg,
.type-row .type-kicker,
.type-row .type-meta,
.type-row .type-body { margin: 0; }
.type-row .type-display-lg span {
  display: block;
  color: var(--turn-secondary);
}
.specimen-xl { font-size: clamp(36px, 5vw, 64px); line-height: 0.92; }
.specimen-lg { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.02; }
.specimen-price { font-size: clamp(48px, 6vw, 72px); }
.type-row .type-body,
.type-row .type-body-lg { max-width: 420px; color: var(--note); }
.type-row .type-lede { font-size: clamp(22px, 2.4vw, 32px); margin-top: 0; }

/* INVERT. One Color Block Story. Section 4.11 exception, once. */
.ask-wrap {
  position: relative;
  z-index: 1;
  padding-bottom: var(--space-8);
}
.invert-panel {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: var(--space-6);
  align-items: end;
  padding: var(--space-6);
}
.invert-panel::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -180px;
  width: 380px;
  height: 380px;
  border: 80px solid var(--ring-on-acid);
  border-radius: 50%;
  pointer-events: none;
}
.ask-stat { position: relative; z-index: 1; }
.ask-stat .type-display-price { margin: 0; }
.ask-stat-label {
  margin: 10px 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--eyebrow-on-acid);
}
.ask-outro {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-5);
  padding-bottom: 6px;
}
.ask-outro h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.ask-outro > p {
  max-width: 16ch;
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.04em;
}
.ask-outro em { font-style: italic; }

.tiny-note {
  margin: 18px 0 0;
  color: var(--fine);
  font: 400 10px/1.5 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page-footer {
  position: relative;
  z-index: 1;
  min-height: 110px;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 400 10px/1.5 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.page-footer .wordmark {
  text-transform: none;
  letter-spacing: -0.06em;
}
.page-footer p { margin: 0; }
.page-footer p:nth-of-type(1) { text-align: center; }
.page-footer p:last-child { text-align: right; }

@media (prefers-reduced-motion: no-preference) {
  .page-turn,
  .system-strip,
  .invert-panel {
    animation: rise 0.8s var(--ease-out) both;
    animation-timeline: view();
    animation-range: entry 0% entry 36%;
  }
  .token-lead li,
  .token-groups li {
    transition: transform 0.35s var(--ease-out);
  }
  .token-lead li:hover,
  .token-groups li:hover { transform: translateY(-2px); }
}

@media (prefers-reduced-motion: reduce) {
  .skip,
  .hero-copy,
  .hero-visual img,
  .hero-visual .artifact,
  .page-turn,
  .system-strip,
  .invert-panel,
  .token-lead li,
  .token-groups li { animation: none; transition: none; }
}

@media (max-width: 768px) {
  .page-hero {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-top: 28px;
    padding-bottom: 24px;
  }
  .hero-copy {
    align-self: start;
    padding-bottom: 0;
    max-width: none;
  }
  .hero-visual { height: 38vh; }
  .hero-visual .artifact { left: 12px; bottom: 12px; }
  .turn-split,
  .token-lead,
  .token-groups,
  .type-board,
  .invert-panel { grid-template-columns: 1fr; }
  .token-lead .feat-acid { grid-row: auto; }
  .token-lead .feat-acid .swatch { height: 120px; }
  .turn-leave { margin-top: 28px; }
  .page-footer {
    min-height: 160px;
    grid-template-columns: 1fr auto;
    gap: 20px;
    padding-block: var(--space-4);
  }
  .page-footer p:nth-of-type(1) {
    grid-area: 2 / 1 / auto / 3;
    text-align: left;
  }
}

@media (max-width: 600px) {
  .hero-title { font-size: clamp(44px, 16vw, 64px); }
  .artifact-title { font-size: 28px; margin: 16px 0 12px; }
  .system-strip { padding-block: var(--space-7); }
  .ask-wrap { padding-bottom: 64px; }
  .invert-panel { padding: 28px 22px; min-height: 0; }
  .ask-outro > p { font-size: 22px; }
}

@media (min-width: 769px) {
  .hero-title { white-space: nowrap; }
}
