/* For Mia — warm paper, film-first, one page */

:root {
  --paper: #f2efe9;
  --forest: #19271f;
  --lime: #a8bf6e;
  --lime-soft: #dde5c6;
  --ink-soft: #40503f;
  --line: rgba(25, 39, 31, 0.25);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--forest);
  font-family: "Avenir Next", "Avenir Next LT Pro", Avenir, "Helvetica Neue", Arial, sans-serif;
  font-size: 22px;
  line-height: 1.55;
  overflow-x: hidden;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(44px, 9vw, 96px); }
h2 { font-size: clamp(44px, 6.5vw, 64px); }
h3 { font-size: 44px; }

p { margin: 0 0 1em; }

.accent {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
}

a {
  color: var(--forest);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 3px;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--forest);
  outline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.6rem 1.2rem;
  background: var(--forest);
  color: var(--paper);
  border-radius: 999px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: 1rem clamp(20px, 6vw, 80px);
  background: rgba(242, 239, 233, 0.92);
  border-bottom: 1px solid var(--line);
}

.brand {
  margin: 0;
  font-size: 22px;
}

.main-nav {
  display: flex;
  gap: 2rem;
}

.main-nav a {
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover {
  border-bottom-color: var(--lime);
}

/* ---------- layout ---------- */

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(64px, 12vw, 140px) clamp(20px, 6vw, 80px);
}

.hero {
  padding-top: clamp(48px, 9vh, 110px);
}

.kicker {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.intro {
  max-width: 34rem;
  font-size: clamp(22px, 3vw, 28px);
  margin-bottom: 2.5rem;
}

/* ---------- progress ---------- */

.progress {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 2.4rem;
  padding: 0;
  margin: 0 0 2.4rem;
}

.progress li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink-soft);
}

.progress .num {
  width: 2.4rem;
  height: 2.4rem;
  flex: none;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 50%;
  font-size: 22px;
}

.progress li[aria-current="step"] {
  color: var(--forest);
  font-weight: 600;
}

.progress li[aria-current="step"] .num {
  background: var(--lime);
  border-color: var(--forest);
}

/* ---------- main player ---------- */

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0d1712;
  border-radius: 20px;
  overflow: hidden;
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.start-button {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 12px 40px rgba(13, 23, 18, 0.45);
}

.caption {
  margin: 1.2rem 0 1.6rem;
  color: var(--ink-soft);
}

/* ---------- buttons ---------- */

.button {
  display: inline-block;
  padding: 0.8rem 1.9rem;
  border-radius: 999px;
  border: 2px solid var(--forest);
  background: transparent;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--forest);
  color: var(--paper);
}

.button-primary:hover:not(:disabled) {
  background: var(--lime);
  color: var(--forest);
}

.button-ghost:hover:not(:disabled) {
  background: var(--lime-soft);
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

/* ---------- votes ---------- */

.vote .setup {
  max-width: 36rem;
  font-size: clamp(22px, 3vw, 28px);
}

.history {
  color: var(--ink-soft);
  border-left: 4px solid var(--lime);
  padding-left: 1rem;
  margin-bottom: 2rem;
}

.choices {
  display: grid;
  gap: 1rem;
  margin: 2rem 0;
}

@media (min-width: 720px) {
  .choices {
    grid-template-columns: repeat(3, 1fr);
  }
}

.choice {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
  text-align: left;
  padding: 1.4rem 1.6rem;
  min-height: 6.5rem;
  background: transparent;
  border: 2px solid var(--line);
  border-radius: 18px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.choice:hover:not(:disabled) {
  border-color: var(--forest);
  transform: translateY(-2px);
}

.choice[aria-pressed="true"] {
  background: var(--lime);
  border-color: var(--forest);
}

.choice-name {
  font-weight: 600;
}

.choice-sub {
  color: var(--ink-soft);
  font-size: 22px;
}

.choice[aria-pressed="true"] .choice-sub {
  color: var(--forest);
}

.sim-note {
  color: var(--ink-soft);
  margin: 1rem 0 0;
}

/* ---------- results ---------- */

.result {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.counts {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: grid;
  gap: 0.6rem;
}

.counts li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.1rem;
  background: var(--lime-soft);
  border-radius: 12px;
}

.counts li.winner {
  background: var(--lime);
  font-weight: 600;
}

.others {
  margin-top: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 1.4rem;
}

.others summary {
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  padding: 0.4rem 0;
}

.others-note {
  color: var(--ink-soft);
  margin: 0.8rem 0 1rem;
}

.preview-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding-bottom: 0.6rem;
}

/* ---------- loop ---------- */

.ending {
  max-width: 36rem;
  font-size: clamp(24px, 3.4vw, 32px);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  margin-bottom: 2.5rem;
}

.loop-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
  max-width: 34rem;
}

.loop-points li {
  padding-left: 1.4rem;
  position: relative;
}

.loop-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--lime);
}

/* ---------- worlds ---------- */

.worlds .section-note {
  max-width: 38rem;
  margin-bottom: 3rem;
}

.world-grid {
  display: grid;
  gap: 2.5rem;
  margin-bottom: 4rem;
}

@media (min-width: 760px) {
  .world-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
  }
}

.world-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.world-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 16px;
  background: var(--lime-soft);
}

.world-card h3 {
  margin: 0.4rem 0 0;
}

.world-card p {
  margin: 0;
}

.world-card .button {
  margin-top: auto;
  align-self: flex-start;
}

.joke {
  color: var(--ink-soft);
}

.world-pref {
  border-top: 1px solid var(--line);
  padding-top: 3rem;
}

/* ---------- finale ---------- */

.finale p {
  max-width: 38rem;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: clamp(40px, 7vw, 80px) clamp(20px, 6vw, 80px);
  max-width: 1180px;
  margin: 0 auto;
}

.about-demo {
  margin-top: 1.5rem;
}

.about-demo summary {
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
}

/* ---------- preview dialog ---------- */

#preview-dialog {
  width: min(92vw, 960px);
  padding: clamp(1.2rem, 4vw, 2.4rem);
  border: none;
  border-radius: 20px;
  background: var(--paper);
  color: var(--forest);
}

#preview-dialog::backdrop {
  background: rgba(13, 23, 18, 0.66);
}

.dialog-player {
  aspect-ratio: 16 / 9;
  background: #0d1712;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1.4rem;
}

.dialog-player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .button:hover:not(:disabled),
  .choice:hover:not(:disabled) {
    transform: none;
  }
}

/* Final editorial pass: film first, large readable type, one active decision. */
html{scroll-padding-top:110px}h1{font-size:clamp(44px,6vw,76px);font-weight:500;letter-spacing:-.035em}.hero{padding-top:48px;padding-bottom:50px}.hero .kicker{margin-bottom:18px}.intro{max-width:850px;font-size:24px;margin-bottom:24px}.progress{margin-bottom:22px;gap:16px 30px}.film-note{margin:0 0 16px;color:var(--ink-soft)}.section{max-width:1320px}.player-shell{outline:5px solid #d8dcce;outline-offset:5px;margin:12px 0;border:1px solid #ffffff40}.start-button{white-space:nowrap;background:var(--lime);color:var(--forest)}.start-button:hover:not(:disabled){transform:translate(-50%,calc(-50% - 2px))}.counts li{flex-wrap:wrap}.world-card h3{font-size:38px}.all-scenes{padding-top:24px;padding-bottom:24px}.all-scenes summary{cursor:pointer}.all-scenes details[open]>p{margin-top:25px}.story-started .hero>.kicker,.story-started .hero>h1,.story-started .hero>.intro{display:none}.story-started .hero{padding-top:30px}.vote{padding-top:40px}.button,.choice{transition:background .25s cubic-bezier(.22,.8,.22,1),transform .25s cubic-bezier(.22,.8,.22,1)}.result{margin-top:24px;padding-top:24px}.site-header{position:relative}.preview-row{margin-top:20px}#preview-dialog{max-height:92vh;overflow:auto}button,a,summary{touch-action:manipulation}
@media(max-width:767px){.section{padding-left:22px;padding-right:22px}.hero{padding-top:30px}.site-header{padding:20px 22px;gap:16px}.main-nav{gap:20px}.progress{gap:12px;font-size:22px}.progress .num{width:30px;height:30px}.progress li{gap:8px}.world-grid{grid-template-columns:1fr}.button{padding:13px 22px}.counts li{padding:16px}.start-button{font-size:22px;padding:14px 20px}.intro{font-size:22px}.player-shell{border-radius:14px}.world-card h3{font-size:38px}.choices{grid-template-columns:1fr}.choice{padding:22px}.site-header .brand{width:100%}}
@media(prefers-reduced-motion:reduce){.start-button:hover:not(:disabled){transform:translate(-50%,-50%)}.button,.choice{transition:none}}
