:root {
  --bg: #070a0f;
  --surface: rgba(20, 26, 34, 0.48);
  --line: rgba(255, 255, 255, 0.12);
  --muted: #8b97a8;
  --text: #eef3fa;
  --accent: #5eead4;
  --accent-dim: rgba(94, 234, 212, 0.16);
  --glass-blur: 22px;
  --radius: 28px;
  --card-w: min(86vw, 380px);
  --card-gap: max(0px, calc((100vw - var(--card-w)) * 0.06));
  --side-scale: 0.88;
  --side-opacity: 0.55;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
.ambient {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70% 40% at 50% -8%, var(--accent-dim), transparent 60%),
    radial-gradient(40% 30% at 100% 40%, rgba(255,255,255,0.035), transparent 55%),
    linear-gradient(180deg, #0b1018, var(--bg) 50%, #05070b);
}
.top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.85rem 1.2rem;
  padding-top: max(0.85rem, env(safe-area-inset-top));
}
.logo { color: var(--text); text-decoration: none; font-weight: 650; letter-spacing: 0.1em; font-size: 0.8rem; }
.top-meta { margin: 0; color: var(--muted); font-size: 0.75rem; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }

.hero-strip { padding: 0.15rem 1.35rem 0.85rem; text-align: center; }
.eyebrow { margin: 0 0 0.45rem; color: var(--accent); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; }
.hero-strip h1 {
  margin: 0 auto; max-width: 16ch;
  font-size: clamp(1.25rem, 4.4vw, 1.7rem);
  font-weight: 680; letter-spacing: -0.03em; line-height: 1.15; text-wrap: balance;
}

.deck {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--card-gap);
  padding: 0.35rem max(0.75rem, calc(50% - var(--card-w) / 2));
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  cursor: grab;
  outline: none;
}
.deck::-webkit-scrollbar { display: none; }
.deck.is-dragging { cursor: grabbing; scroll-behavior: auto; }

.card {
  flex: 0 0 var(--card-w);
  scroll-snap-align: center;
  scroll-snap-stop: always;
  transform: scale(var(--side-scale));
  opacity: var(--side-opacity);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}
.card.is-active { transform: scale(1); opacity: 1; }

.card-glass {
  display: flex; flex-direction: column; gap: 0.75rem;
  min-height: min(64dvh, 540px);
  padding: 1.25rem 1.1rem 1.15rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 24px 48px rgba(0, 0, 0, 0.45),
    0 0 40px var(--accent-dim);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
}
.index { margin: 0; color: var(--muted); font-size: 0.55rem; letter-spacing: 0.22em; opacity: 0.35; }
.headline {
  margin: 0; font-size: clamp(1.25rem, 4.8vw, 1.55rem);
  font-weight: 680; letter-spacing: -0.03em; line-height: 1.15; text-wrap: balance;
}
.sub { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.45; }

.viz-slot {
  flex: 1;
  min-height: 140px;
  border-radius: 18px;
  overflow: hidden;
  background: transparent;
  display: grid;
  place-items: center;
}
.viz-slot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.pill {
  margin: 0; align-self: flex-start; display: inline-flex;
  padding: 0.28rem 0.7rem; border-radius: 999px; border: 1px solid var(--line);
  color: var(--muted); font-size: 0.62rem; letter-spacing: 0.06em; opacity: 0.75;
  background: rgba(255,255,255,0.03);
}

.dots { display: flex; justify-content: center; gap: 0.38rem; padding: 0.65rem 0 0.2rem; }
.dots button {
  width: 6px; height: 6px; border-radius: 999px; border: 0; padding: 0;
  background: rgba(255,255,255,0.2); cursor: pointer;
}
.dots button[aria-current="true"] { width: 16px; background: var(--accent); }
.hint {
  text-align: center; color: var(--muted); font-size: 0.65rem; letter-spacing: 0.08em;
  opacity: 0.5; padding: 0.25rem 0 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

/* Desktop: wider stage, same interaction language */
@media (min-width: 900px) {
  :root {
    --card-w: min(380px, 34vw);
    --card-gap: 28px;
  }
  .hero-strip { padding-bottom: 1.25rem; }
  .hero-strip h1 { font-size: 1.85rem; }
  .card-glass { min-height: 560px; padding: 1.45rem 1.3rem 1.3rem; }
  .headline { font-size: 1.65rem; }
  .viz-slot { min-height: 200px; }
}
@media (min-width: 1200px) {
  :root { --card-gap: 36px; }
}
