/* ==========================================================================
   AICHILL.OS — stylesheet
   Design system: lab logbook / old OS / meme page / crypto microsite
   ========================================================================== */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=IBM+Plex+Mono:wght@400;500;600;700&display=swap');

/* ---- Tokens ---- */
:root {
  --ink: #11110F;
  --paper: #E8E2D3;
  --chill: #D8FF3E;
  --alert: #FF5C35;
  --steel: #949997;

  --ink-70: rgba(17, 17, 15, 0.7);
  --ink-40: rgba(17, 17, 15, 0.4);
  --paper-80: rgba(232, 226, 211, 0.8);
  --paper-50: rgba(232, 226, 211, 0.5);
  --paper-15: rgba(232, 226, 211, 0.15);
  --paper-08: rgba(232, 226, 211, 0.08);
  --chill-15: rgba(216, 255, 62, 0.15);
  --alert-15: rgba(255, 92, 53, 0.18);

  --font-display: 'Archivo Black', 'Arial Black', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  --border-hair: 1px solid var(--paper-15);
  --border-chill: 1px solid var(--chill);
  --radius-s: 4px;
  --radius-m: 10px;

  --gap-section: clamp(64px, 10vw, 140px);
  --pad-inline: clamp(20px, 5vw, 64px);
  --max-w: 1240px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 150ms;
  --dur-med: 320ms;
}

/* ---- Reset ---- */
* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }

::selection { background: var(--chill); color: var(--ink); }

/* Visible focus states everywhere */
:focus-visible {
  outline: 2px solid var(--chill);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 500;
  background: var(--chill);
  color: var(--ink);
  padding: 10px 16px;
  font-weight: 700;
  border-radius: var(--radius-s);
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: 12px; }

/* Halftone background layer, used sparingly */
.halftone-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--paper-08) 1px, transparent 1px);
  background-size: 14px 14px;
  pointer-events: none;
}

/* Container */
.wrap {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad-inline);
}

/* ==========================================================================
   Boot sequence
   ========================================================================== */
#boot {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--ink);
  color: var(--chill);
  font-family: var(--font-mono);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: var(--pad-inline);
  transition: opacity 420ms var(--ease-out), visibility 420ms var(--ease-out);
}
#boot[hidden] { opacity: 0; visibility: hidden; pointer-events: none; }
#boot::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(216, 255, 62, 0.025) 3px,
    rgba(216, 255, 62, 0.025) 4px
  );
  pointer-events: none;
}
#boot-lines {
  max-width: 640px;
  font-size: clamp(13px, 2.6vw, 16px);
}
#boot-lines div {
  opacity: 0;
  white-space: pre-wrap;
  margin-bottom: 6px;
}
#boot-lines div.show { opacity: 1; }
#boot-lines .err { color: var(--alert); }
#boot-lines .ok { color: var(--paper); }
#boot-cursor {
  display: inline-block;
  width: 9px; height: 16px;
  background: var(--chill);
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
  vertical-align: middle;
}
.boot-skip {
  position: absolute;
  bottom: var(--pad-inline);
  right: var(--pad-inline);
  background: transparent;
  border: var(--border-chill);
  color: var(--chill);
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 1px;
  border-radius: var(--radius-s);
  transition: background var(--dur-fast), color var(--dur-fast);
}
.boot-skip:hover, .boot-skip:focus-visible { background: var(--chill); color: var(--ink); }

@keyframes blink { 50% { opacity: 0; } }

/* ==========================================================================
   Nav
   ========================================================================== */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--chill);
  z-index: 300;
  transition: width 80ms linear;
}

header.site-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(17, 17, 15, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: var(--border-hair);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.5px;
  color: var(--paper);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--chill);
  box-shadow: 0 0 8px var(--chill);
  animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a:not(.btn) {
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--steel);
  position: relative;
  padding-bottom: 4px;
  transition: color var(--dur-fast);
}
.nav-links a:not(.btn):hover,
.nav-links a:not(.btn):focus-visible { color: var(--chill); }
.nav-links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--chill);
  transition: right var(--dur-med) var(--ease-out);
}
.nav-links a:not(.btn):hover::after,
.nav-links a:not(.btn):focus-visible::after { right: 0; }

.nav-icons { display: flex; align-items: center; gap: 14px; }
.icon-link {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: var(--border-hair);
  border-radius: var(--radius-s);
  color: var(--paper);
  transition: border-color var(--dur-fast), color var(--dur-fast);
}
.icon-link:hover, .icon-link:focus-visible { border-color: var(--chill); color: var(--chill); }
.icon-link svg { width: 16px; height: 16px; }

.menu-toggle {
  display: none;
  background: transparent;
  border: var(--border-hair);
  border-radius: var(--radius-s);
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--paper);
}
.menu-toggle svg { width: 20px; height: 20px; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  padding: 13px 24px;
  border-radius: var(--radius-s);
  border: 1.5px solid transparent;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast), box-shadow var(--dur-fast);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--chill);
  color: var(--ink);
}
.btn-primary:hover, .btn-primary:focus-visible {
  box-shadow: 0 0 0 3px var(--chill-15);
}

.btn-outline {
  background: transparent;
  color: var(--paper);
  border-color: var(--paper-15);
}
.btn-outline:hover, .btn-outline:focus-visible {
  border-color: var(--chill);
  color: var(--chill);
}

.btn-ghost {
  background: transparent;
  color: var(--steel);
  border-color: transparent;
  padding: 8px 14px;
  font-size: 12px;
}
.btn-ghost:hover, .btn-ghost:focus-visible { color: var(--chill); }

.btn-alert {
  background: var(--alert);
  color: var(--ink);
}
.btn-alert:hover, .btn-alert:focus-visible { box-shadow: 0 0 0 3px var(--alert-15); }

.btn-lg { padding: 17px 32px; font-size: 14px; }
.btn-block { width: 100%; }

/* ==========================================================================
   Diagnostic panel — the recurring "lab" container
   ========================================================================== */
.panel {
  position: relative;
  border: var(--border-hair);
  border-radius: var(--radius-m);
  background: var(--paper-08);
}
.panel::before, .panel::after,
.panel-tick-tl, .panel-tick-br { content: none; }

.panel-tick {
  position: absolute;
  width: 14px; height: 14px;
  pointer-events: none;
}
.panel-tick.tl { top: -1px; left: -1px; border-top: 2px solid var(--chill); border-left: 2px solid var(--chill); }
.panel-tick.tr { top: -1px; right: -1px; border-top: 2px solid var(--chill); border-right: 2px solid var(--chill); }
.panel-tick.bl { bottom: -1px; left: -1px; border-bottom: 2px solid var(--chill); border-left: 2px solid var(--chill); }
.panel-tick.br { bottom: -1px; right: -1px; border-bottom: 2px solid var(--chill); border-right: 2px solid var(--chill); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--steel);
  font-weight: 600;
}
.eyebrow .dash { width: 18px; height: 1px; background: var(--steel); display: inline-block; }

.section-heading {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.04;
  color: var(--paper);
  letter-spacing: -0.5px;
}

section { padding-block: var(--gap-section); position: relative; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 640ms var(--ease-out), transform 640ms var(--ease-out); }
.reveal.in-view { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
#hero { padding-top: clamp(48px, 8vw, 88px); padding-bottom: 0; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero-copy .eyebrow { margin-bottom: 22px; }
.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(46px, 7.4vw, 92px);
  line-height: 0.96;
  letter-spacing: -1.5px;
  color: var(--paper);
  margin-bottom: 20px;
}
.hero-title .line2 { color: var(--chill); }

.ticker-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  border: var(--border-chill);
  color: var(--chill);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  padding: 8px 16px;
  border-radius: var(--radius-s);
  margin-bottom: 26px;
}
.ticker-badge svg { width: 12px; height: 12px; }

.hero-statement {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.25;
  color: var(--paper);
  margin-bottom: 18px;
  max-width: 22ch;
}

.hero-desc {
  color: var(--steel);
  font-size: 15px;
  line-height: 1.7;
  max-width: 46ch;
  margin-bottom: 32px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }

.ca-warning {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--alert);
  border: 1px solid var(--alert);
  background: var(--alert-15);
  padding: 8px 12px;
  border-radius: var(--radius-s);
  letter-spacing: 0.3px;
}
.ca-warning svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Mascot diagnostic frame */
.mascot-frame-wrap { perspective: 1000px; }
.mascot-frame {
  position: relative;
  border: var(--border-hair);
  border-radius: var(--radius-m);
  background: linear-gradient(160deg, var(--paper-08), transparent 60%);
  padding: 20px;
  transition: transform 90ms linear;
  transform-style: preserve-3d;
  will-change: transform;
}
.mascot-frame img {
  border-radius: var(--radius-s);
  max-height: 62vh;
  width: auto;
  max-width: 100%;
  margin-inline: auto;
}

.diag-label {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--chill);
  background: var(--ink);
  border: var(--border-hair);
  padding: 5px 9px;
  border-radius: var(--radius-s);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.diag-label .blip {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--chill);
  animation: pulse-dot 1.8s ease-in-out infinite;
}
.diag-label.l1 { top: 6%; left: -6%; }
.diag-label.l2 { top: 18%; right: -8%; }
.diag-label.l3 { bottom: 30%; left: -10%; }
.diag-label.l4 { bottom: 16%; right: -6%; }
.diag-label.l5 { top: 42%; left: -12%; }
.diag-label.l6 { top: 50%; right: -10%; }

@media (max-width: 880px) {
  .diag-label { position: static; margin: 4px 6px 0 0; }
  .mascot-diag-labels { display: flex; flex-wrap: wrap; margin-top: 16px; }
}
@media (min-width: 881px) {
  .mascot-diag-labels { position: absolute; inset: 0; pointer-events: none; }
}

/* Marquee strip */
.marquee {
  border-top: var(--border-hair);
  border-bottom: var(--border-hair);
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
  margin-top: clamp(40px, 6vw, 72px);
  padding-block: 12px;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 22s linear infinite;
}
.marquee-track span {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  padding-inline: 18px;
  white-space: nowrap;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; overflow-x: auto; } }

/* ==========================================================================
   Origin / lore
   ========================================================================== */
.origin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
  margin-top: 40px;
}
.lore-copy p { margin-bottom: 18px; color: var(--paper-80); font-size: 15px; line-height: 1.75; }
.lore-copy .lore-punch {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(22px, 3vw, 30px);
  color: var(--chill);
  margin-top: 26px;
}

.terminal {
  background: var(--ink);
  border: var(--border-hair);
  border-radius: var(--radius-m);
  overflow: hidden;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: var(--border-hair);
  background: var(--paper-08);
}
.terminal-bar .tdot { width: 9px; height: 9px; border-radius: 50%; }
.terminal-bar .tdot.a { background: var(--alert); }
.terminal-bar .tdot.b { background: var(--chill); }
.terminal-bar .tdot.c { background: var(--steel); }
.terminal-bar span.tname {
  margin-left: 8px;
  font-size: 11px;
  color: var(--steel);
  letter-spacing: 1px;
}
.terminal-body { padding: 20px; min-height: 220px; font-size: 13.5px; }
.terminal-body .tline { color: var(--paper-80); opacity: 0; margin-bottom: 8px; transform: translateX(-6px); transition: opacity 320ms var(--ease-out), transform 320ms var(--ease-out); }
.terminal-body .tline.show { opacity: 1; transform: translateX(0); }
.terminal-body .tline.ok { color: var(--chill); font-weight: 600; }
.terminal-body .tline .tag { color: var(--steel); }

/* ==========================================================================
   Stress Lab
   ========================================================================== */
#stress-lab { position: relative; }
.lab-intro { max-width: 60ch; margin-top: 18px; color: var(--steel); font-size: 15px; line-height: 1.7; }

.stress-console {
  margin-top: 44px;
  border: var(--border-hair);
  border-radius: var(--radius-m);
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 30% 0%, var(--paper-08), transparent 60%);
}
.stress-console-inner { position: relative; z-index: 2; padding: clamp(24px, 4vw, 48px); }

.chill-meter-wrap { text-align: center; margin-bottom: 40px; }
.chill-meter-label {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--steel);
  margin-bottom: 10px;
}
.chill-meter-value {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(64px, 12vw, 128px);
  line-height: 1;
  color: var(--chill);
  transition: color 200ms;
}
.chill-meter-value.panic-flash { color: var(--alert); }
.chill-meter-bar {
  width: min(420px, 100%);
  height: 8px;
  border-radius: 4px;
  background: var(--paper-15);
  margin: 18px auto 0;
  overflow: hidden;
  border: var(--border-hair);
}
.chill-meter-fill {
  height: 100%;
  width: 100%;
  background: var(--chill);
  transition: background 200ms;
}
.chill-meter-fill.panic { background: var(--alert); }

.stress-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.stress-btn {
  background: var(--ink);
  border: var(--border-hair);
  border-radius: var(--radius-m);
  padding: 20px 18px;
  color: var(--paper);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-align: left;
  transition: border-color var(--dur-fast), transform var(--dur-fast) var(--ease-out);
  position: relative;
}
.stress-btn::before {
  content: "▸";
  color: var(--alert);
  margin-right: 8px;
}
.stress-btn:hover, .stress-btn:focus-visible { border-color: var(--alert); transform: translateY(-2px); }
.stress-btn:active { transform: translateY(0); }

.max-stress-row { display: flex; justify-content: center; margin-top: 8px; }

.stress-readout {
  margin-top: 28px;
  border: var(--border-hair);
  border-radius: var(--radius-m);
  background: var(--ink);
  padding: 16px 20px;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.stress-readout .prompt-tag { color: var(--chill); font-weight: 700; font-size: 13px; }
.stress-readout p { font-size: 14px; color: var(--paper-80); margin: 0; }

.stress-counters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 28px;
}
.counter-card {
  border: var(--border-hair);
  border-radius: var(--radius-s);
  padding: 16px;
  text-align: center;
}
.counter-card .cval {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 30px;
  color: var(--chill);
}
.counter-card .clabel { font-size: 11px; letter-spacing: 1px; color: var(--steel); margin-top: 4px; }
.counter-card.null-state .cval { color: var(--steel); }

/* Panic mode visuals */
.candle-field {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms;
}
.candle-field.active { opacity: 1; }
.candle {
  position: absolute;
  top: -60px;
  width: 6px;
  background: var(--alert);
  animation: candle-fall linear forwards;
}
@keyframes candle-fall {
  to { transform: translateY(140vh); }
}

.stress-console.panic .stress-console-inner {
  animation: shake 420ms ease-in-out;
}
@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3px, 2px); }
  40% { transform: translate(3px, -2px); }
  60% { transform: translate(-2px, -2px); }
  80% { transform: translate(2px, 2px); }
}

.max-stress-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms, visibility 200ms;
}
.max-stress-overlay.active { opacity: 1; visibility: visible; }
.max-stress-overlay::before {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, var(--alert-15) 0 2px, transparent 2px 14px);
  animation: overlay-shift 1.2s linear infinite;
}
@keyframes overlay-shift { from { background-position: 0 0; } to { background-position: 60px 60px; } }
.max-stress-text {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(32px, 7vw, 72px);
  color: var(--alert);
  text-align: center;
  animation: glitch-text 180ms steps(2) infinite;
}
.max-stress-text.result { color: var(--chill); animation: none; }
@keyframes glitch-text {
  0% { transform: translate(0,0); }
  50% { transform: translate(2px,-1px); }
  100% { transform: translate(-2px,1px); }
}

@media (prefers-reduced-motion: reduce) {
  .stress-console.panic .stress-console-inner { animation: none; }
  .max-stress-text { animation: none; }
  .candle { animation: none; opacity: 0; }
}

/* ==========================================================================
   Ask the model
   ========================================================================== */
.ask-terminal { margin-top: 40px; max-width: 760px; }
.ask-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-top: var(--border-hair);
  background: var(--paper-08);
}
.ask-input-row .prompt-glyph { color: var(--chill); font-weight: 700; }
.ask-input-row input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 14px;
}
.ask-input-row input::placeholder { color: var(--steel); }
.ask-output {
  padding: 20px;
  min-height: 90px;
  font-size: 14px;
  color: var(--chill);
}
.ask-output .cursor-blink {
  display: inline-block;
  width: 8px; height: 14px;
  background: var(--chill);
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
  vertical-align: middle;
}

/* ==========================================================================
   System specs
   ========================================================================== */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--paper-15);
  border: var(--border-hair);
  border-radius: var(--radius-m);
  overflow: hidden;
  margin-top: 36px;
}
.spec-row {
  background: var(--ink);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.spec-row .skey { font-size: 11px; letter-spacing: 1.5px; color: var(--steel); }
.spec-row .sval { font-family: var(--font-mono); font-weight: 700; font-size: 17px; color: var(--paper); }
.spec-row .sval.accent { color: var(--chill); }

.contract-strip {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border: var(--border-hair);
  border-radius: var(--radius-m);
  padding: 16px 20px;
  background: var(--paper-08);
}
.contract-strip .ca-label { font-size: 11px; letter-spacing: 1.5px; color: var(--steel); margin-bottom: 4px; }
.contract-strip .ca-value { font-size: 14px; color: var(--paper); cursor: help; }

/* ==========================================================================
   Meme gallery
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 32px);
  margin-top: 44px;
}
.meme-card {
  border: var(--border-hair);
  border-radius: var(--radius-s);
  background: var(--paper-08);
  padding: 10px;
  cursor: zoom-in;
  transition: transform var(--dur-med) var(--ease-out), border-color var(--dur-fast);
  transform: rotate(var(--rot, 0deg));
}
.meme-card:nth-child(6n+1) { --rot: -2.4deg; }
.meme-card:nth-child(6n+2) { --rot: 1.8deg; }
.meme-card:nth-child(6n+3) { --rot: -1.2deg; }
.meme-card:nth-child(6n+4) { --rot: 2.2deg; }
.meme-card:nth-child(6n+5) { --rot: -1.8deg; }
.meme-card:nth-child(6n+6) { --rot: 1.2deg; }
.meme-card:hover, .meme-card:focus-within { transform: rotate(0deg) translateY(-4px); border-color: var(--chill); }
.meme-card img { border-radius: 2px; aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.meme-card figcaption {
  font-size: 12.5px;
  color: var(--steel);
  padding: 10px 6px 4px;
  text-align: center;
}
.meme-card button {
  all: unset;
  display: block;
  width: 100%;
  cursor: zoom-in;
  border-radius: var(--radius-s);
}
.meme-card button:focus-visible {
  outline: 2px solid var(--chill);
  outline-offset: 3px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 450;
  background: rgba(17, 17, 15, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-med), visibility var(--dur-med);
  padding: var(--pad-inline);
}
.lightbox.active { opacity: 1; visibility: visible; }
.lightbox-content { max-width: 560px; width: 100%; text-align: center; }
.lightbox-content img { border-radius: var(--radius-m); border: var(--border-hair); margin-bottom: 18px; }
.lightbox-caption { font-size: 15px; color: var(--paper); }
.lightbox-controls {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: clamp(10px, 4vw, 40px);
  pointer-events: none;
}
.lightbox-controls > * { pointer-events: auto; }
.lightbox-nav-btn, .lightbox-close {
  background: var(--paper-08);
  border: var(--border-hair);
  color: var(--paper);
  border-radius: var(--radius-s);
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-nav-btn:hover, .lightbox-nav-btn:focus-visible,
.lightbox-close:hover, .lightbox-close:focus-visible { border-color: var(--chill); color: var(--chill); }
.lightbox-close { position: absolute; top: 20px; right: 20px; }
.lightbox-counter { font-size: 12px; color: var(--steel); margin-top: 12px; }

/* ==========================================================================
   How to buy
   ========================================================================== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.step-card {
  border: var(--border-hair);
  border-radius: var(--radius-m);
  padding: 24px;
  position: relative;
}
.step-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 34px;
  color: var(--chill);
  margin-bottom: 10px;
  display: block;
}
.step-title { font-weight: 700; font-size: 14px; letter-spacing: 0.5px; margin-bottom: 8px; color: var(--paper); }
.step-desc { font-size: 14px; color: var(--steel); line-height: 1.6; }

.safety-notice {
  margin-top: 28px;
  border: 1px solid var(--alert);
  background: var(--alert-15);
  border-radius: var(--radius-m);
  padding: 18px 20px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--paper);
}
.safety-notice svg { flex-shrink: 0; width: 20px; height: 20px; color: var(--alert); margin-top: 1px; }

.buy-cta-row { margin-top: 30px; }

/* ==========================================================================
   Final CTA
   ========================================================================== */
#final-cta { position: relative; overflow: visible; text-align: center; }
.final-heading {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(34px, 7vw, 68px);
  line-height: 1.05;
  color: var(--paper);
}
.final-heading .accent { color: var(--alert); }
.final-sub { color: var(--steel); font-size: 16px; margin-top: 18px; }
.final-actions { display: flex; justify-content: center; gap: 16px; margin-top: 34px; flex-wrap: wrap; }

.final-mascot {
  max-width: 260px;
  height: auto;
  margin: 24px auto -160px;
  position: relative;
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5));
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer.site-footer {
  border-top: var(--border-hair);
  padding-top: clamp(120px, 16vw, 200px);
  padding-bottom: 40px;
  position: relative;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 36px;
  border-bottom: var(--border-hair);
}
.footer-brand .logo { margin-bottom: 10px; }
.footer-brand .ftag { color: var(--steel); font-size: 13px; }
.footer-links { display: flex; gap: 32px; flex-wrap: wrap; }
.footer-col h4 { font-size: 11px; letter-spacing: 1.5px; color: var(--steel); margin-bottom: 12px; }
.footer-col a, .footer-col button.reboot-btn {
  display: block;
  font-size: 13px;
  color: var(--paper-80);
  margin-bottom: 8px;
  background: none; border: none; padding: 0; text-align: left;
}
.footer-col a:hover, .footer-col a:focus-visible,
.footer-col button.reboot-btn:hover, .footer-col button.reboot-btn:focus-visible { color: var(--chill); }

.footer-disclaimer {
  margin-top: 28px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--steel);
  max-width: 90ch;
}
.footer-meta {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--steel);
  flex-wrap: wrap;
  gap: 8px;
}

/* ==========================================================================
   Toasts
   ========================================================================== */
#toast-region {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  width: min(92vw, 420px);
}
.toast {
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius-s);
  padding: 14px 18px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(12px);
  animation: toast-in 260ms var(--ease-out) forwards, toast-out 260ms var(--ease-out) forwards 2740ms;
  width: 100%;
}
.toast.success::before { content: "✓"; color: #1a7d3a; font-weight: 900; }
.toast.info::before { content: "▸"; color: var(--ink); font-weight: 900; }
@keyframes toast-in { to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-8px); } }

/* ==========================================================================
   Cursor trail (desktop only, opt-in via JS feature detect)
   ========================================================================== */
.trail-char {
  position: fixed;
  pointer-events: none;
  z-index: 50;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--chill);
  opacity: 0.55;
  animation: trail-fade 700ms ease-out forwards;
}
@keyframes trail-fade { to { opacity: 0; transform: translateY(10px); } }

/* ==========================================================================
   Mobile nav drawer
   ========================================================================== */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  padding: var(--pad-inline);
  transform: translateX(100%);
  transition: transform 320ms var(--ease-out);
}
.nav-drawer.open { transform: translateX(0); }
.nav-drawer-top { display: flex; justify-content: flex-end; margin-bottom: 40px; }
.nav-drawer-links { display: flex; flex-direction: column; gap: 24px; }
.nav-drawer-links a {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 28px;
  color: var(--paper);
}
.nav-drawer-links a:hover, .nav-drawer-links a:focus-visible { color: var(--chill); }
.nav-drawer-icons { display: flex; gap: 14px; margin-top: 40px; }
.nav-drawer-cta { margin-top: auto; }

body.menu-open { overflow: hidden; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .mascot-frame-wrap { max-width: 420px; margin-inline: auto; }
  .origin-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav-links, .nav-icons .icon-link, #nav-buy-btn { display: none; }
  .menu-toggle { display: flex; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .specs-grid { grid-template-columns: 1fr; }
  .stress-buttons { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .footer-links { gap: 24px; }
  .final-mascot { max-width: 180px; margin-bottom: -100px; }
}

@media (max-width: 400px) {
  :root { font-size: 15px; }
}
