/* =========================================================
   THE WORLD WHEN YOU WERE BORN - style.css
   ========================================================= */

/* CUSTOM PROPERTIES */
:root {
  --bg-void: #080810;
  --bg-surface: #0f0f1a;
  --bg-raised: #1a1a2e;
  --border: rgba(255,255,255,0.08);
  --text-primary: #f0f0f5;
  --text-secondary: #9090a8;
  --text-tertiary: #5a5a72;
  --accent: #a78bfa; /* default, overridden by JS */

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --radius-card: 12px;
  --radius-pill: 99px;
  --transition-base: 200ms ease-out;
}

/* RESET */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.625;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* UTILITIES */
.hidden {
  display: none !important;
}

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

/* =========================================================
   SCREEN 1: LANDING
   ========================================================= */

.screen-landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.landing-inner {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

/* TYPEWRITER */
.typewriter-wrap {
  text-align: center;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.typewriter {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(22px, 4vw, 36px);
  color: var(--text-primary);
  line-height: 1.3;
  text-align: center;
  transition: opacity 300ms ease-in-out;
}

.typewriter.fading {
  opacity: 0;
}

/* NAME FIELD */
.name-field {
  margin-bottom: 16px;
}

.name-input {
  width: 100%;
  max-width: 320px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 12px 20px;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--text-primary);
  text-align: center;
  outline: none;
  transition: border-color var(--transition-base);
}

.name-input::placeholder {
  color: var(--text-tertiary);
}

.name-input:focus {
  border-color: var(--accent);
}

/* INPUT ROW */
.input-row {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  width: 100%;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  position: relative;
}

.input-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

/* YEAR INPUT */
.year-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
  padding: 8px 0 12px;
  width: 100%;
  outline: none;
  transition: border-color var(--transition-base);
  -moz-appearance: textfield;
}

.year-input::-webkit-outer-spin-button,
.year-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.year-input::placeholder {
  color: var(--text-tertiary);
}

.year-input:focus {
  border-bottom-color: var(--accent);
}

.input-error {
  position: absolute;
  bottom: -20px;
  left: 0;
  font-size: 12px;
  color: #ff6b6b;
  line-height: 1;
}

/* COUNTRY SELECT */
.country-select-wrap {
  position: relative;
}

.country-btn {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 20px;
  padding: 8px 0 12px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  transition: border-color var(--transition-base);
  outline: none;
}

.country-btn:focus-visible {
  border-bottom-color: var(--accent);
}

.country-btn[aria-expanded="true"] {
  border-bottom-color: var(--accent);
}

.country-btn[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.chevron {
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: transform 200ms ease;
}

#country-display {
  display: flex;
  align-items: center;
  gap: 10px;
}

.flag {
  font-size: 20px;
  line-height: 1;
}

.country-name {
  font-size: 18px;
  color: var(--text-primary);
}

/* COUNTRY DROPDOWN */
.country-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  z-index: 100;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  max-height: min(300px, 50vh);
  display: flex;
  flex-direction: column;
}

.country-dropdown.hidden {
  display: none !important;
}

.country-search-wrap {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.country-search {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 8px 12px;
  width: 100%;
  outline: none;
  transition: border-color var(--transition-base);
}

.country-search::placeholder {
  color: var(--text-tertiary);
}

.country-search:focus {
  border-color: var(--accent);
}

.country-list {
  list-style: none;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px 0;
  min-height: 0;
}

.country-list::-webkit-scrollbar {
  width: 4px;
}

.country-list::-webkit-scrollbar-track {
  background: transparent;
}

.country-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.country-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 15px;
  color: var(--text-primary);
  transition: background var(--transition-base);
}

.country-option:hover,
.country-option[aria-selected="true"] {
  background: rgba(255,255,255,0.06);
}

.country-option[aria-selected="true"] {
  color: var(--accent);
}

.country-option .flag {
  font-size: 18px;
}

/* SUBMIT BUTTON */
.submit-btn {
  background: var(--accent);
  border: none;
  border-radius: 50%;
  color: var(--bg-void);
  cursor: pointer;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1px;
  transition: opacity 150ms ease, transform 150ms ease;
}

.submit-btn:hover {
  opacity: 0.88;
  transform: scale(1.05);
}

.submit-btn:active {
  transform: scale(0.96);
}

.submit-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* =========================================================
   REVEAL OVERLAY
   ========================================================= */

.reveal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-void);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.reveal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.reveal-year {
  font-family: var(--font-display);
  font-size: clamp(80px, 22vw, 260px);
  font-weight: 400;
  color: var(--accent);
  line-height: 0.9;
  transform: translateY(20px);
  opacity: 0;
  transition: opacity 300ms ease-out, transform 400ms ease-out;
}

.reveal-overlay.active .reveal-year {
  opacity: 1;
  transform: translateY(0);
}

.reveal-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(18px, 3vw, 32px);
  color: var(--text-secondary);
  margin-top: 16px;
  opacity: 0;
  transition: opacity 400ms ease 400ms;
}

.reveal-overlay.active .reveal-sub {
  opacity: 1;
}

/* =========================================================
   SCREEN 2: INFOGRAPHIC
   ========================================================= */

.screen-infographic {
  min-height: 100vh;
}

/* STICKY HEADER */
.info-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 56px;
  background: rgba(8, 8, 16, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  max-width: 100%;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-year {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.header-sep {
  color: var(--text-tertiary);
  font-size: 18px;
}

.header-country {
  font-size: 15px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  padding: 6px 12px;
  transition: color var(--transition-base), border-color var(--transition-base), background var(--transition-base);
  position: relative;
}

.header-btn:hover {
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.04);
}

.header-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* SHARE POPOVER */
.share-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 24px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  z-index: 100;
  min-width: 180px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  overflow: hidden;
}

.share-option {
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  padding: 12px 16px;
  width: 100%;
  text-align: left;
  transition: background var(--transition-base);
}

.share-option:hover {
  background: rgba(255,255,255,0.06);
}

/* =========================================================
   INFOGRAPHIC CONTENT
   ========================================================= */

.info-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ACT / SECTION */
.act {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}

.act:last-child {
  border-bottom: none;
}

.act-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 32px;
  opacity: 0.7;
}

.act-sections {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

/* REVEAL ANIMATION */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 500ms ease-out, transform 500ms ease-out;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* EYEBROW */
.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

/* SECTION HEADLINE */
.section-headline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 28px;
}

/* =========================================================
   PATTERN A - FOCAL NUMBER
   ========================================================= */

.pattern-a {}

.focal-number {
  font-family: var(--font-mono);
  font-size: clamp(56px, 10vw, 120px);
  font-weight: 500;
  color: var(--accent);
  line-height: 0.9;
  letter-spacing: -0.03em;
  display: block;
}

.focal-unit {
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 10px;
  display: block;
}

.focal-context {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 12px;
  max-width: 480px;
}

.comparison-pill {
  display: inline-flex;
  align-items: center;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 16px;
}

/* =========================================================
   PATTERN B - TWO-UP COMPARISON
   ========================================================= */

.pattern-b {}

.two-up {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.two-up-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
}

.two-up-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}

.two-up-label.muted {
  color: var(--text-tertiary);
}

.two-up-value {
  font-family: var(--font-mono);
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.02em;
  display: block;
  margin-bottom: 8px;
}

.two-up-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.two-up-commentary {
  font-size: 14px;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 16px;
  text-align: center;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================================
   PATTERN C - BILLBOARD CARD
   ========================================================= */

.pattern-c {}

.billboard-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px 32px;
}

.billboard-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(24px, 4vw, 36px);
  color: var(--text-primary);
  line-height: 1.15;
  margin-top: 6px;
  margin-bottom: 10px;
}

.billboard-detail {
  font-size: 16px;
  color: var(--text-secondary);
}

/* =========================================================
   PATTERN D - TIMELINE RIBBON
   ========================================================= */

.pattern-d {}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 24px 60px 1fr;
  gap: 0 12px;
  position: relative;
}

.timeline-dot-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4px;
}

.timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.timeline-line {
  width: 1px;
  flex: 1;
  background: var(--border);
  margin-top: 4px;
}

.timeline-item:last-child .timeline-line {
  display: none;
}

.timeline-month {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding-top: 2px;
  line-height: 1.4;
}

.timeline-event {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.5;
  padding-bottom: 28px;
}

/* =========================================================
   PATTERN E - PRICE ROW
   ========================================================= */

.pattern-e {}

.price-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.price-pill {
  background: var(--bg-raised);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 100px;
}

.price-pill-emoji {
  font-size: 24px;
  line-height: 1;
}

.price-pill-value {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
}

.price-pill-today {
  font-size: 11px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  line-height: 1;
}

.price-pill-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
}

/* =========================================================
   PATTERN F - STAT TRIO
   ========================================================= */

.pattern-f {}

.stat-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.stat-item {}

.stat-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.stat-value {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 6px;
}

.stat-sub {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* =========================================================
   NOTABLE BIRTHS
   ========================================================= */

.notable-births-list {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(18px, 3vw, 26px);
  color: var(--text-primary);
  line-height: 1.5;
}

.notable-births-list .birth-sep {
  color: var(--text-tertiary);
  margin: 0 6px;
}

/* =========================================================
   TV PREMIERES - SHOW PILLS
   ========================================================= */

.show-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.show-pill {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  transition: border-color var(--transition-base);
}

.show-pill:hover {
  border-color: rgba(255,255,255,0.18);
}

/* =========================================================
   LOADING STATE
   ========================================================= */

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =========================================================
   ERROR STATE
   ========================================================= */

.data-error {
  position: fixed;
  inset: 0;
  background: var(--bg-void);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 24px;
  z-index: 300;
}

.error-message {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(18px, 3vw, 28px);
  color: var(--text-secondary);
  text-align: center;
  max-width: 480px;
  line-height: 1.4;
}

.error-back-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 20px;
  transition: color var(--transition-base), border-color var(--transition-base);
}

.error-back-btn:hover {
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.2);
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 24px;
}

.footer-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-brand {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  color: var(--accent);
}

.footer-copy {
  font-size: 13px;
  color: var(--text-tertiary);
}

.footer-link {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-base);
}

.footer-link:hover {
  color: var(--text-primary);
}

/* =========================================================
   ERA / DECADE THEME OVERRIDES
   Applied to body via JS when infographic is shown.
   Only mood-shifting properties are overridden - layout,
   font stack, and dark base remain intact.
   ========================================================= */

/* 1950s - warm, golden, slightly amber-tinted darkness */
body.era-50s {
  --bg-void:    #0d0b07;
  --bg-surface: #131009;
  --bg-raised:  #1e1a10;
  --border:     rgba(200, 150, 58, 0.12);
  --text-secondary: #9a9080;
  --text-tertiary:  #5e5648;
  --accent:     #c8963a;
  --radius-card: 6px;
}

/* 1960s - cool, mod, crisp with teal clarity */
body.era-60s {
  --bg-void:    #080c10;
  --bg-surface: #0c1118;
  --bg-raised:  #141c24;
  --border:     rgba(0, 137, 123, 0.13);
  --text-secondary: #8898a8;
  --text-tertiary:  #4e6070;
  --accent:     #26a69a;
  --radius-card: 4px;
}

/* 1970s - warm earth tones, amber, organic */
body.era-70s {
  --bg-void:    #0c0a06;
  --bg-surface: #120f08;
  --bg-raised:  #1c170e;
  --border:     rgba(181, 101, 29, 0.13);
  --text-secondary: #988870;
  --text-tertiary:  #5c5040;
  --accent:     #b5651d;
  --radius-card: 8px;
}

/* 1980s - cool near-black with electric purple punch */
body.era-80s {
  --bg-void:    #080810;
  --bg-surface: #0e0e1c;
  --bg-raised:  #161628;
  --border:     rgba(124, 58, 237, 0.15);
  --text-secondary: #8888b0;
  --text-tertiary:  #505070;
  --accent:     #7c3aed;
  --radius-card: 2px;
}

/* 1990s - neutral-dark, grunge undertone, muted green */
body.era-90s {
  --bg-void:    #070909;
  --bg-surface: #0e1010;
  --bg-raised:  #181c1a;
  --border:     rgba(74, 124, 89, 0.12);
  --text-secondary: #858e88;
  --text-tertiary:  #4e5850;
  --accent:     #4a7c59;
  --radius-card: 10px;
}

/* 2000s - clean cool-dark with tech blue */
body.era-00s {
  --bg-void:    #06080d;
  --bg-surface: #0b0e18;
  --bg-raised:  #131826;
  --border:     rgba(30, 64, 175, 0.15);
  --text-secondary: #8090b0;
  --text-tertiary:  #4a5878;
  --accent:     #5b8def;
  --radius-card: 12px;
}

/* =========================================================
   LANDING COLLAPSE ANIMATION
   ========================================================= */

.screen-landing.collapsing {
  animation: collapseScreen 200ms ease-out forwards;
}

@keyframes collapseScreen {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.97);
  }
}

/* =========================================================
   RESPONSIVE - MOBILE
   ========================================================= */

@media (max-width: 640px) {
  .input-row {
    flex-direction: column;
    align-items: stretch;
    gap: 32px;
  }

  .submit-btn {
    width: 100%;
    border-radius: 10px;
    height: 52px;
    margin-bottom: 0;
  }

  .info-header {
    padding: 0 16px;
  }

  .header-country .country-name-full {
    display: none;
  }

  .header-btn span {
    display: none;
  }

  .header-btn {
    padding: 6px 10px;
  }

  .info-content {
    padding: 0 16px;
  }

  .act {
    padding: 56px 0;
  }

  .act-sections {
    gap: 48px;
  }

  .two-up {
    grid-template-columns: 1fr;
  }

  .stat-trio {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .price-grid {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .price-grid::-webkit-scrollbar {
    display: none;
  }

  .price-pill {
    flex-shrink: 0;
  }

  .share-popover {
    right: 16px;
  }

  .site-footer {
    padding: 48px 16px;
  }
}

@media (max-width: 400px) {
  .header-sep {
    display: none;
  }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* =========================================================
   COPY SUCCESS TOAST
   ========================================================= */

/* =========================================================
   DATA CTA PANEL
   ========================================================= */

.data-cta {
  max-width: 680px;
  margin: 0 auto 48px;
  padding: 40px 48px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  text-align: center;
}

.data-cta-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.data-cta-headline {
  font-family: var(--font-display);
  font-size: clamp(22px, 4vw, 28px);
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.2;
}

.data-cta-sub {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

.data-cta-btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--accent);
  color: #080810;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity var(--transition-base);
}

.data-cta-btn:hover {
  opacity: 0.85;
}

@media (max-width: 600px) {
  .data-cta {
    padding: 32px 24px;
  }
}

.copy-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 10px 20px;
  font-size: 13px;
  color: var(--text-primary);
  z-index: 500;
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
  white-space: nowrap;
}

.copy-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =========================================================
   FEATURE 3: BIRTH COHORT CALLOUT
   ========================================================= */

.birth-cohort-callout {
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 8px;
}

/* Baby names card */
.baby-names-grid {
  display: flex;
  gap: 40px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.baby-names-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.baby-names-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: 0;
}
.baby-names-list {
  font-size: 16px;
  color: var(--text-primary);
  margin: 0;
  font-weight: 500;
}

/* Country event text */
.country-event-text {
  font-size: 17px;
  color: var(--text-primary);
  margin: 12px 0 0;
  line-height: 1.6;
  max-width: 560px;
}

/* =========================================================
   FEATURE 4: SOCIAL MEDIA TIMELINE
   ========================================================= */

.social-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.social-item {
  display: flex;
  flex-direction: row;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.social-item-name {
  font-weight: 600;
  color: var(--text-primary);
  min-width: 100px;
}

/* =========================================================
   FEATURE 2 + 6: MILESTONE AGES + TEMPORAL SHOCK
   ========================================================= */

.milestone-ages {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-top: 4px;
}

.milestone-ages strong {
  color: var(--text-primary);
  font-weight: 600;
}

.temporal-shock {
  font-style: italic;
  color: var(--accent);
  font-size: 14px;
  text-align: center;
  margin: 16px 0;
}

/* =========================================================
   FEATURE 5: INFOGRAPHIC OUTRO
   ========================================================= */

.infographic-outro {
  max-width: 680px;
  margin: 0 auto 48px;
  padding: 48px;
  text-align: center;
}

.outro-text {
  font-family: var(--font-display);
  font-size: clamp(16px, 2.5vw, 20px);
  line-height: 1.8;
  color: var(--text-secondary);
  font-style: italic;
}

@media (max-width: 640px) {
  .infographic-outro {
    padding: 40px 24px;
  }

  .milestone-ages {
    font-size: 14px;
  }
}

/* =========================================================
   SHARE CARD (downloadable Spotify Wrapped-style image)
   ========================================================= */

.share-card {
  display: none;
  position: fixed;
  top: -9999px;
  left: -9999px;
  width: 540px;
  z-index: -1;
  pointer-events: none;
}

.sc-inner {
  width: 540px;
  padding: 48px 40px 32px;
  background: linear-gradient(160deg, #0a0a14 0%, #12122a 40%, #151428 100%);
  background: linear-gradient(160deg, #0a0a14 0%, #12122a 40%, color-mix(in srgb, var(--sc-accent, #a78bfa) 15%, #0a0a14) 100%);
  border-radius: 24px;
  font-family: 'Inter', system-ui, sans-serif;
  color: #f0f0f5;
}

.sc-header {
  text-align: center;
  margin-bottom: 36px;
}

.sc-flag {
  font-size: 40px;
  margin-bottom: 8px;
}

.sc-year {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 72px;
  font-weight: 400;
  letter-spacing: -2px;
  color: var(--sc-accent, #a78bfa);
  line-height: 1;
  margin-bottom: 8px;
}

.sc-headline {
  font-size: 16px;
  font-weight: 500;
  color: #9090a8;
  letter-spacing: 0.02em;
}

.sc-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.sc-stat {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.sc-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
  padding-top: 2px;
}

.sc-stat-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sc-stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5a5a72;
}

.sc-stat-value {
  font-size: 15px;
  font-weight: 500;
  color: #f0f0f5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sc-events {
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 28px;
}

.sc-event {
  font-size: 13px;
  color: #9090a8;
  line-height: 1.5;
  margin-bottom: 6px;
}

.sc-event:last-child {
  margin-bottom: 0;
}

.sc-footer {
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sc-brand {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--sc-accent, #a78bfa);
  opacity: 0.7;
}
