:root {
  --bg: #fff8f1;
  --card: rgba(255,255,255,0.74);
  --text: #241b1b;
  --muted: #7d6464;
  --accent: #d76b79;
  --accent-dark: #b84f5f;
  --soft: #f5d8dd;
  --shadow: 0 24px 70px rgba(89, 50, 50, 0.13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 5%, #ffe0e8 0, transparent 30%),
    radial-gradient(circle at 90% 20%, #ffe9c7 0, transparent 26%),
    var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  z-index: 10;
}

.section {
  min-height: 100svh;
  padding: 72px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
  margin: 0 auto;
}

.hero {
  text-align: center;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .75rem;
  font-weight: 800;
}

h1, h2 {
  font-family: "Playfair Display", Georgia, serif;
  line-height: .96;
  letter-spacing: -.04em;
  margin: 0 0 18px;
}

h1 { font-size: clamp(3.4rem, 17vw, 7rem); }
h2 { font-size: clamp(2.35rem, 11vw, 4.5rem); }

p {
  font-size: 1.08rem;
  line-height: 1.7;
  margin: 0 0 16px;
}

.hero-text {
  max-width: 420px;
  color: var(--muted);
}

.start-button, button {
  border: 0;
  border-radius: 999px;
  background: var(--text);
  color: white;
  padding: 15px 22px;
  font-weight: 800;
  font-size: .98rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(36,27,27,.18);
}

.start-button { margin-top: 16px; }
button:active, .start-button:active { transform: scale(.98); }

.story-card, .quiz, .collage-section, .closing, .kenya {
  border-radius: 34px;
  margin-block: 28px;
  min-height: auto;
  background: var(--card);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.8);
}

.image-frame {
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  overflow: hidden;
  margin-bottom: 28px;
  background: linear-gradient(135deg, #f8d3da, #ffe8c7);
  box-shadow: 0 18px 50px rgba(89, 50, 50, 0.18);
}

img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-note {
  font-size: .82rem;
  color: var(--muted);
  padding-top: 4px;
}

.quiz input {
  width: 100%;
  border: 1px solid rgba(36,27,27,.12);
  background: rgba(255,255,255,.7);
  border-radius: 999px;
  padding: 16px 18px;
  font-size: 1rem;
  margin: 10px 0 12px;
  outline: none;
}

.quiz input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(215,107,121,.16);
}

.quiz > button { width: 100%; }

.choice-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.choice-grid button {
  width: 100%;
  text-align: left;
  background: white;
  color: var(--text);
  border: 1px solid rgba(36,27,27,.09);
  box-shadow: none;
}

.choice-grid button:hover { border-color: var(--accent); }

.feedback {
  min-height: 28px;
  margin-top: 16px;
  font-weight: 800;
  color: var(--accent-dark);
}

.success-message {
  margin-top: 14px;
  padding: 18px;
  border-radius: 22px;
  background: #fff0f3;
  color: var(--text);
  font-weight: 800;
  line-height: 1.6;
}

.hidden { display: none; }

.collage {
  display: grid;
  gap: 10px;
  margin: 20px 0 8px;
}

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

.collage img {
  min-height: 210px;
  border-radius: 24px;
  background: linear-gradient(135deg, #f8d3da, #ffe8c7);
  box-shadow: 0 12px 30px rgba(89, 50, 50, 0.12);
}

.closing {
  text-align: center;
  background: linear-gradient(135deg, rgba(255,255,255,.85), rgba(255,225,231,.8));
}

.kenya {
  text-align: center;
  align-items: center;
}

.loader-heart {
  font-size: 3.5rem;
  color: var(--accent);
  animation: pulse 1.2s infinite ease-in-out;
  margin-bottom: 14px;
}

.countdown {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.countdown div {
  background: white;
  border-radius: 24px;
  padding: 18px 10px;
  box-shadow: 0 12px 32px rgba(89, 50, 50, 0.1);
}

.countdown span {
  display: block;
  font-size: 2rem;
  font-weight: 900;
}

.countdown small {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .68rem;
}

.reveal {
  opacity: 0;
  transform: translateY(32px) scale(.985);
  filter: blur(8px);
  transition: opacity .8s ease, transform .8s ease, filter .8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: .75; }
  50% { transform: scale(1.18); opacity: 1; }
}

@media (min-width: 680px) {
  .section { padding: 96px 28px; }
  .collage.two { grid-template-columns: 1fr 1fr; }
  .choice-grid { grid-template-columns: 1fr 1fr; }
  .countdown { grid-template-columns: repeat(4, 1fr); }
}

.story-locked {
  display: none !important;
}

.quiz:not(.unlocked)::after {
  content: "Answer this one to keep going ↓";
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 800;
  text-align: center;
}

.scroll-hint {
  position: fixed;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 30px rgba(89, 50, 50, 0.14);
  backdrop-filter: blur(12px);
  color: var(--accent);
  font-weight: 900;
  letter-spacing: .04em;
  transition: opacity .25s ease, transform .25s ease;
  animation: scrollHintBounce 1.4s infinite ease-in-out;
}

.scroll-hint span {
  writing-mode: vertical-rl;
  text-transform: uppercase;
  font-size: .68rem;
}

.scroll-hint strong {
  font-size: 1.1rem;
  line-height: 1;
}

.scroll-hint.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(12px);
}

@keyframes scrollHintBounce {
  0%, 100% { margin-top: 0; }
  50% { margin-top: 8px; }
}
