/* =========================================================================
   SEEDCAT design tokens (locked)
   palette : navy #1B3A5C (ink / blazer)  navy-deep #102943 (borders/shadow)
             cream #F5EFE0 (background)   paper #FBF6E9 (plate face)
             orange #E8823C (accent / CTA)
   type    : Sora (display, nameplate/plaque)  Inter (UI/body)  IBM Plex Mono (CA/numbers)
   spacing : 8 / 16 / 24 / 40 / 64 px
   radius  : 14px cards & plates, 999px pills
   motion  : plaque press (140ms) + confetti burst (~1.1s) + counter tick
   ========================================================================= */

:root {
  --navy: #1B3A5C;
  --navy-deep: #102943;
  --cream: #F5EFE0;
  --paper: #FBF6E9;
  --orange: #E8823C;
  --orange-deep: #C9691F;
  --ink: #16232F;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;

  --radius: 14px;
  --radius-pill: 999px;

  --font-display: 'Sora', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(232,130,60,0.10), transparent 60%),
    var(--cream);
}

img, svg { display: block; max-width: 100%; }

.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;
}

/* ---------- error catcher ---------- */
#error-catcher {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  background: #B4231F;
  color: #FFF6ED;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 10px 16px;
  text-align: center;
}

/* ---------- topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-bottom: 2px solid var(--navy);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: baseline;
  gap: var(--space-1);
  font-size: 18px;
  letter-spacing: 0.01em;
}

.wordmark-sep { color: var(--orange); }

.wordmark-role {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  color: var(--navy);
  opacity: 0.7;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.x-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--navy);
  color: var(--navy);
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.x-link:hover {
  background: var(--navy);
  color: var(--cream);
  transform: translateY(-1px);
}

.buy-btn {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--cream);
  background: var(--orange);
  border: 2px solid var(--orange-deep);
  border-radius: var(--radius-pill);
  padding: 9px 20px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 3px 0 var(--orange-deep);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.buy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 0 var(--orange-deep);
}

.buy-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--orange-deep);
}

/* ---------- stage / hero ---------- */
.stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
}

.hero {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.portrait-frame {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 3px solid var(--navy);
  box-shadow: 0 10px 0 var(--navy-deep);
  background: var(--paper);
}

.portrait {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-bottom: 3px solid var(--navy);
}

.desk-shelf {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2);
  background: linear-gradient(180deg, #8A4A2B, #6E3A21);
}

.nameplate,
.plaque {
  flex: 1;
  border-radius: 8px;
  background: var(--paper);
  border: 2px solid var(--navy);
  box-shadow: 0 3px 0 var(--navy-deep);
  padding: var(--space-1) var(--space-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 78px;
}

.nameplate-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  color: var(--navy);
  letter-spacing: 0.04em;
}

.nameplate-sub {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11px;
  color: var(--navy);
  letter-spacing: 0.06em;
  opacity: 0.85;
}

.nameplate-ca {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--orange-deep);
  letter-spacing: 0.01em;
  word-break: break-all;
}

.plaque {
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: transform 90ms ease, box-shadow 90ms ease;
  position: relative;
}

.plaque:hover { transform: translateY(-1px); }

.plaque:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--navy-deep);
}

.plaque-line1 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11px;
  color: var(--navy);
  letter-spacing: 0.05em;
  opacity: 0.85;
}

.plaque-line2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  color: var(--orange-deep);
  letter-spacing: 0.03em;
}

.plaque-hint {
  margin-top: 4px;
  font-family: var(--font-body);
  font-size: 9px;
  color: var(--navy);
  opacity: 0.55;
}

/* ---------- readouts ---------- */
.readout-row {
  width: 100%;
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.readout-box {
  flex: 1;
  min-width: 140px;
  background: var(--paper);
  border: 2px solid var(--navy);
  border-radius: 10px;
  padding: var(--space-1) var(--space-2);
  text-align: center;
}

.readout-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  opacity: 0.65;
}

.readout-value {
  display: block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--navy);
}

.readout-value.mono {
  font-family: var(--font-mono);
  font-size: 14px;
}

.tagline {
  text-align: center;
  font-size: 14px;
  color: var(--navy);
  opacity: 0.8;
  margin: 0;
  max-width: 46ch;
}

/* ---------- confetti ---------- */
#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 500;
}

/* ---------- footer ---------- */
.footer {
  padding: var(--space-2) var(--space-3);
  text-align: center;
  font-size: 11px;
  color: var(--navy);
  opacity: 0.6;
  border-top: 2px solid var(--navy);
}

.footer-sep { margin: 0 6px; }

@media (prefers-reduced-motion: reduce) {
  .buy-btn, .plaque, .x-link { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 480px) {
  .topbar { padding: var(--space-1) var(--space-2); }
  .wordmark { font-size: 15px; }
  .wordmark-role { display: none; }
  .buy-btn { padding: 8px 14px; font-size: 13px; }

  .desk-shelf { flex-direction: column; }

  .readout-row { flex-direction: column; }
  .readout-box { min-width: 0; }
}

@media (min-width: 1024px) {
  .hero { max-width: 640px; gap: var(--space-4); }
  .tagline { font-size: 15px; }
}
