/* Values measured from the Canva original at a 1425px-wide canvas;
   sizes scale with the viewport the way Canva sections do. */

/* The Zetafonts faces from the Canva design (personal-use licence). */
@font-face {
  font-family: "Zeta Display";
  src: url("assets/fonts/display-400.woff") format("woff");
  font-weight: 100 500;
  font-display: swap;
}

@font-face {
  font-family: "Zeta Display";
  src: url("assets/fonts/display-700.woff") format("woff");
  font-weight: 600 900;
  font-display: swap;
}

@font-face {
  font-family: "Body Text";
  src: url("assets/fonts/body-text-400.woff") format("woff");
  font-weight: 100 500;
  font-display: swap;
}

@font-face {
  font-family: "Body Text";
  src: url("assets/fonts/body-text-700.woff") format("woff");
  font-weight: 600 900;
  font-display: swap;
}

@font-face {
  font-family: "Vanilla Personal";
  src: url("assets/fonts/script-400.ttf") format("truetype");
  font-display: swap;
}

:root {
  --cream: #efe9e1;
  --ink: #000;
  --ink-soft: #303030;
  --wine: #520909;
  --teal: #51abb2;
  --khaki: #a5956e;
  --sky: #bccfd5;
  --button-text: #303030;
  --sand: #e2d9cc;
  --mustard: #e3c46f;
  --sage: #a3b892;
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* Headings and buttons: Canva's ultra-wide grotesque. */
  --display: "Zeta Display", system-ui, sans-serif;
  /* Running caps and interface text. */
  --sans: "Body Text", system-ui, sans-serif;
  /* Canva's script is a commercial Måns Grebäck face; Water Brush is the closest free match. */
  --script: "Vanilla Personal", cursive;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

p, h1, h2, figure, blockquote { margin: 0; font-weight: 400; }

button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }

/* While the opening overlay is up, the invitation underneath doesn't scroll. */
.is-locked, .is-locked body { overflow: hidden; }

.caps {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
}

/* A hairline stroke brings Water Brush up to the weight of Canva's script. */
.script { font-family: var(--script); -webkit-text-stroke: .012em currentColor; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.button {
  display: inline-block;
  min-width: clamp(160px, 18.1vw, 290px);
  min-height: 48px;
  padding: .45em 1em;
  border: 0;
  background: var(--khaki);
  color: var(--button-text);
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(16px, 1.57vw, 24px);
  line-height: 1.37;
  text-transform: uppercase;
  text-decoration: none;
  transition: filter .2s, transform .25s var(--ease);
}

@media (hover: hover) {
  .button:hover { filter: brightness(1.08); transform: translateY(-2px); }
}

/* Canva's grain sits over every flat colour section. */
.textured { position: relative; isolation: isolate; }

.textured::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("assets/texture.webp") center / max(100%, 1024px) repeat;
  opacity: .5;
  pointer-events: none;
}

/* ---------- Engagement film ---------- */

.film {
  display: grid;
  place-items: center;
  padding: 5.4vw 16px;
  background: var(--cream);
}

.film__frame {
  position: relative;
  width: min(43.1vw, 760px);
}

.film__video {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #ccc;
  cursor: pointer;
}

/* Top corner: the captions are burnt into the bottom half of the film. */
.film__replay {
  position: absolute;
  top: 12px;
  left: 12px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: rgba(239, 233, 225, .88);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  animation: rise .6s var(--ease) both;
}

.film__replay::before { content: "↻"; margin-right: 8px; }

/* Appears under the film once it has played through. */
.film__next {
  margin-top: clamp(20px, 2.5vw, 36px);
  animation: rise .6s var(--ease) both;
}

.film__next::after { content: " ↓"; }

/* ---------- Details ---------- */

.details {
  display: grid;
  grid-template-columns: 35.6% 1fr;
  gap: 5%;
  padding: 0 2.1vw;
  background: var(--wine);
  color: var(--cream);
}

.details.textured::before { opacity: .08; }

.details__media { align-self: start; }

.details__video {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #ccc;
}

.details__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.9vw;
  padding: 0 4% 3vw;
  text-align: center;
}

.details__text .caps {
  max-width: 560px;
  font-family: var(--sans);
  font-size: clamp(13px, 1.15vw, 19px);
  font-weight: 700;
  line-height: 1.34;
}

.details__barn {
  width: min(100%, 690px);
  height: auto;
  margin-bottom: 1vw;
}

.details__sign {
  font-size: clamp(32px, 2.7vw, 46px);
  line-height: 1.39;
}

.details__sign b { font-weight: 400; }

/* The one fact guests must leave with, so it gets the biggest type in the section. */
.details__date {
  display: grid;
  justify-items: center;
  gap: .35em;
  padding: 1.1em 0 0;
  border-top: 1px solid color-mix(in srgb, var(--cream) 40%, transparent);
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
}

.details__weekday,
.details__place { font-size: clamp(13px, 1.05vw, 17px); letter-spacing: .2em; }

.details__day {
  font-size: clamp(34px, 3.6vw, 60px);
  line-height: 1.05;
  letter-spacing: .04em;
}

/* ---------- Gallery ---------- */

.gallery {
  padding: 0 2.1vw calc(40px + env(safe-area-inset-bottom));
  background: var(--sky);
}

.gallery__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery__list li { overflow: hidden; }

.gallery__list img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #a9bec5;
  transition: transform .6s ease;
}

@media (hover: hover) {
  .gallery__list li:hover img { transform: scale(1.03); }
}

/* Collage positions measured from the Canva layout at 1425px wide. */
@media (min-width: 721px) {
  .gallery__list { position: relative; height: 53.8vw; }

  .gallery__list li {
    position: absolute;
    width: 19.8vw;
    aspect-ratio: 283 / 331;
  }

  .gallery__list li:nth-child(1) { left: 0;       top: 9vw; }
  .gallery__list .gallery__wide  { left: 35.9vw;  top: 6.5vw; width: 24vw; aspect-ratio: 3 / 2; }
  .gallery__list li:nth-child(3) { left: 73.3vw;  top: 5.5vw; }
  .gallery__list li:nth-child(4) { left: 22.5vw;  top: 27vw; }
  .gallery__list li:nth-child(5) { left: 47.9vw;  top: 32.2vw; aspect-ratio: 283 / 308; }
}

/* ---------- RSVP ---------- */

.rsvp {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 12px;
  min-height: clamp(240px, 24vw, 400px);
  padding: clamp(40px, 4.5vw, 72px) 16px;
  background: var(--sky);
  text-align: center;
}

.gallery.textured::before, .rsvp.textured::before { opacity: .3; }

.rsvp__title { font-size: clamp(22px, 1.85vw, 30px); letter-spacing: .06em; }
.rsvp__intro { font-size: 16px; }

.rsvp__form,
.rsvp__coming {
  display: grid;
  gap: 20px;
}

.rsvp__form {
  width: min(100%, 560px);
  margin-top: 16px;
  text-align: left;
}

.rsvp__coming { margin: 0; padding: 0; border: 0; }

.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; }

.field__label {
  padding: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--cream);
  color: var(--ink);
  /* 16px keeps iOS from zooming in on focus. */
  font: inherit;
  font-size: 16px;
}

.field textarea { resize: vertical; }

.field select { appearance: none; background: var(--cream) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") right 14px center no-repeat; }

/* Yes / no as two large toggles. */
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.choice label { position: relative; }

.choice input { position: absolute; opacity: 0; pointer-events: none; }

.choice span {
  display: grid;
  place-items: center;
  min-height: 52px;
  padding: 0 12px;
  border: 1px solid var(--ink);
  background: var(--cream);
  font-family: var(--script);
  font-size: 26px;
  -webkit-text-stroke: .012em currentColor;
  text-align: center;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}

.choice input:checked + span { border-color: var(--wine); background: var(--wine); color: var(--cream); }
.choice input:focus-visible + span { outline: 2px solid var(--wine); outline-offset: 3px; }

.rsvp__trap { position: absolute; left: -9999px; }

.rsvp__send { justify-self: center; margin-top: 8px; }
.rsvp__send:disabled { opacity: .6; }

.rsvp__status { min-height: 1.4em; font-size: 15px; font-weight: 700; text-align: center; }

.rsvp__done { display: grid; justify-items: center; gap: 8px; }
.rsvp__done:focus { outline: none; }
.rsvp__thanks { max-width: 18ch; font-size: clamp(36px, 4vw, 56px); line-height: 1.2; }

/* ---------- Footer ---------- */

.footer {
  padding: 40px 16px calc(40px + env(safe-area-inset-bottom));
  background: var(--wine);
  color: var(--cream);
  text-align: center;
}

.footer .script { font-size: clamp(32px, 3.33vw, 48px); line-height: 1.2; }
.footer .caps { margin-top: 6px; font-size: 14px; letter-spacing: .12em; }

/* The games, offered again near the end of the page. */
.footer__replay {
  display: none;
  width: min(100%, 760px);
  margin: 0 auto 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(239, 233, 225, .25);
}

.js .footer__replay { display: block; }

.footer .footer__replay-title { font-size: clamp(40px, 4.2vw, 60px); }

/* Equal columns, so both buttons take the width of the longer label. */
.footer__replay-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  margin: 16px auto 0;
}

.footer__replay-buttons .button { min-width: 0; }

/* ---------- Reveal on scroll ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}

.js .reveal.is-in { opacity: 1; transform: none; }

.gallery__list li:nth-child(3n + 2) { transition-delay: .1s; }
.gallery__list li:nth-child(3n + 3) { transition-delay: .2s; }

/* ---------- Shared controls ---------- */

.pill,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color .25s, color .25s, border-color .25s, transform .25s var(--ease), opacity .25s;
}

.pill {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--button-text);
}

.ghost-button { background: transparent; color: var(--ink); }

@media (hover: hover) {
  .pill:not(:disabled):hover { transform: translateY(-2px); filter: brightness(1.06); }
  .ghost-button:not(:disabled):hover { background: var(--ink); color: var(--cream); }
}

.pill:disabled, .ghost-button:disabled { opacity: .35; }

.text-button {
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  background: none;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: 14px;
}

/* ---------- Language toggle ---------- */

.lang {
  position: fixed;
  z-index: 30;
  top: max(8px, env(safe-area-inset-top));
  right: max(8px, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(239, 233, 225, .82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
}

.lang button {
  min-width: 44px;
  min-height: 40px;
  border: 0;
  background: none;
  opacity: .45;
}

.lang button[aria-pressed="true"] { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Opening experience ---------- */

.experience { display: none; }

.js .experience {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: block;
  overflow: hidden;
  background: var(--cream);
  transition: opacity .7s var(--ease), visibility .7s;
}

.experience.is-leaving { opacity: 0; visibility: hidden; }

.frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
  opacity: 0;
  transform: scale(1);
  /* Fade out first, then quietly reset the zoom. */
  transition: opacity 1.8s ease, transform 0s 1.8s;
}

.frame.is-active {
  opacity: .78;
  transform: scale(1.1);
  transition: opacity 1.8s ease, transform 8s cubic-bezier(.3, .2, .4, 1);
}

.scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(239, 233, 225, .7), rgba(239, 233, 225, 0) 30%,
      rgba(239, 233, 225, 0) 55%, rgba(239, 233, 225, .82));
  transition: background-color .8s;
}

.skip {
  position: absolute;
  z-index: 3;
  top: max(8px, env(safe-area-inset-top));
  left: max(8px, env(safe-area-inset-left));
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(239, 233, 225, .82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
}

.skip::after { content: "→"; margin-left: 6px; }

.stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(64px + env(safe-area-inset-top)) 20px calc(32px + env(safe-area-inset-bottom));
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .8s var(--ease), visibility .8s;
}

.experience[data-stage="intro"] .stage--intro,
.experience[data-stage="picker"] .stage--picker,
.experience[data-stage="connections"] .stage--connections,
.experience[data-stage="whosaid"] .stage--whosaid {
  opacity: 1;
  visibility: visible;
}

/* Intro */

.stage--intro { padding-top: calc(13vh + env(safe-area-inset-top)); }

.intro__eyebrow { font-size: clamp(18px, 1.85vw, 26px); font-weight: 400; letter-spacing: .127em; }

.intro__names {
  margin: auto 0 0;
  color: var(--ink-soft);
  font-size: clamp(56px, 9.7vw, 150px);
  line-height: 1.15;
}

/* The ampersand is the one wine-coloured, oversized flourish. */
.amp {
  display: inline-block;
  margin: 0 -.06em;
  color: var(--wine);
  font-size: 1.6em;
  line-height: 0;
  vertical-align: -.1em;
}

.intro__enter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: clamp(24px, 4vw, 56px) 0 auto;
}

/* The picker on the landing replaces the corner toggle until a language is chosen. */
.is-locked:has(.experience[data-stage="intro"]) .lang { display: none; }

/* Staggered entrance on first paint. */
.experience[data-stage="intro"] .stage--intro > * { animation: rise 1.2s var(--ease) both; }
.experience[data-stage="intro"] .intro__names { animation-delay: .2s; }
.experience[data-stage="intro"] .intro__enter { animation-delay: .7s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
}

/* Panels */

.panel__title {
  color: var(--wine);
  font-size: clamp(40px, 11vw, 72px);
  line-height: 1.15;
}

.panel__sub {
  max-width: 34ch;
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.5;
}

/* Panels (picker and games) sit on solid cream and scroll if the phone is short. */

.panel {
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--cream);
}

.panel > * { flex-shrink: 0; }

/* Centre the picker when it fits; `safe` falls back to top-aligned on short screens. */
.stage--picker { justify-content: safe center; }

.picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: min(100%, 560px);
  margin: 28px 0 16px;
}

.picker__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 12px 20px;
  border: 1px solid rgba(0, 0, 0, .12);
  background: #f6f2ec;
  text-align: center;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}

@media (hover: hover) {
  .picker__card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(60, 30, 20, .12); }
  .picker__card:hover .picker__grid i:nth-child(odd) { transform: scale(.82); }
}

.picker__name { margin-top: 6px; font-size: 13px; letter-spacing: .12em; }
.picker__desc { font-size: 13px; line-height: 1.4; opacity: .75; }

.picker__grid {
  display: grid;
  grid-template-columns: repeat(3, 14px);
  gap: 4px;
  height: 50px;
  align-content: center;
}

.picker__grid i { width: 14px; height: 14px; background: var(--sand); transition: transform .3s var(--ease); }
.picker__grid i:nth-child(-n + 3) { background: var(--mustard); }
.picker__grid i:nth-child(5) { background: var(--teal); }

.picker__bubbles {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 64px;
  height: 50px;
  justify-content: center;
}

.picker__bubbles i { height: 16px; border-radius: 8px 8px 8px 2px; background: #cfe9c4; width: 80%; }
.picker__bubbles i + i { align-self: flex-end; border-radius: 8px 8px 2px 8px; background: #d9daf3; }

/* Connections */

.conn {
  display: grid;
  gap: 8px;
  width: min(100%, 560px);
  margin-top: 20px;
}

.conn__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.conn__tile {
  min-width: 0;
  min-height: 64px;
  padding: 4px;
  border: 0;
  border-radius: 6px;
  background: var(--sand);
  /* Sized so a 10-letter word fits one 4-column tile on a 360px phone. */
  font-size: clamp(9px, 2.6vw, 15px);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.15;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  hyphens: auto;
  transition: background-color .2s, color .2s, transform .2s var(--ease);
}

.conn__tile[aria-pressed="true"] { background: #3d3a36; color: var(--cream); }
.conn__tile:active { transform: scale(.96); }

@media (hover: hover) {
  .conn__tile[aria-pressed="false"]:hover { background: #d8cebf; }
}

.conn__tile.is-shaking { animation: shake .4s ease; }

@keyframes shake {
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.conn__group {
  display: grid;
  place-content: center;
  gap: 2px;
  min-height: 64px;
  padding: 8px;
  border-radius: 6px;
  font-size: 14px;
  animation: rise .6s var(--ease) both;
}

.conn__group .caps { font-size: 13px; letter-spacing: .08em; }
.conn__group--1 { background: var(--mustard); }
.conn__group--2 { background: var(--teal); }
.conn__group--3 { background: var(--sage); }
.conn__group--4 { background: var(--wine); color: var(--cream); }

.conn__msg { min-height: 20px; font-size: 14px; font-weight: 700; }

.conn__mistakes {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.conn__dots { display: flex; gap: 6px; }
.conn__dots i { width: 10px; height: 10px; border-radius: 50%; background: #3d3a36; }

.conn__controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.conn__controls > * { padding: 0 16px; }

.panel__result {
  margin: 12px 0 4px;
  font-size: 16px;
  font-weight: 700;
}

.conn > .pill, .ws > .pill { justify-self: center; margin-top: 8px; }

/* Who said it */

.ws {
  display: grid;
  gap: 16px;
  width: min(100%, 480px);
  margin-top: 20px;
}

.ws__progress {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.ws__dots { display: flex; gap: 6px; }

.ws__dots i {
  width: 12px;
  height: 12px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  transition: background-color .3s;
}

.ws__dots i.is-on { border-color: var(--teal); background: var(--teal); }

.ws__msg {
  padding: 14px;
  border-radius: 14px;
  text-align: left;
}

.ws__msg.is-new { animation: rise .5s var(--ease) both; }

.ws__msg--whatsapp { background: #e9e2d6; }
.ws__msg--teams { background: #e6e6f2; }

.ws__app {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
}

.ws__app time { margin-left: auto; font-weight: 400; opacity: .6; }

.ws__badge {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
}

.ws__msg--whatsapp .ws__badge { background: #25a35a; }
.ws__msg--teams .ws__badge { background: #5b5fc7; border-radius: 5px; }

.ws__bubble {
  display: inline-block;
  max-width: 92%;
  padding: 10px 14px;
  font-size: 17px;
  line-height: 1.4;
}

.ws__msg--whatsapp .ws__bubble { border-radius: 12px 12px 12px 3px; background: #dcf3cf; }
.ws__msg--teams .ws__bubble { border-left: 3px solid #5b5fc7; border-radius: 4px; background: #fff; }

.ws__answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.ws__answer {
  min-height: 56px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: transparent;
  font-family: var(--script);
  font-size: 28px;
  transition: background-color .25s, color .25s, transform .2s var(--ease);
}

@media (hover: hover) {
  .ws__answer:not(:disabled):hover { background: var(--ink); color: var(--cream); }
}

.ws__answer:active { transform: scale(.97); }
.ws__answer:disabled { opacity: .4; }
.ws__answer.is-right { border-color: var(--teal); background: var(--teal); opacity: 1; }
.ws__answer.is-wrong { border-color: var(--wine); background: var(--wine); color: var(--cream); opacity: 1; }

.ws__feedback { min-height: 20px; font-size: 15px; font-weight: 700; }

@media (min-width: 721px) {
  .stage { padding-top: calc(88px + env(safe-area-inset-top)); }
  .picker { gap: 20px; }
  .picker__card { padding: 36px 24px 28px; }
  .conn__tile { min-height: 76px; }
}

/* ---------- Mobile ---------- */

@media (max-width: 720px) {
  /* The film fills the screen while it plays, so the next section stays out of view. */
  .film {
    align-content: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: 32px 16px;
  }

  .film__frame { width: 100%; }

  .details {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 0 16px 40px;
  }

  /* The clip gets the whole screen to itself, centred, before the text scrolls in. */
  .details__media {
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: 16px 0;
  }

  .details__video { width: min(100%, calc((100svh - 32px) * 2 / 3)); }

  .details__text { gap: 20px; padding: 0; }

  /* Swipeable strip instead of the collage on phones. */
  .gallery { padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); }
  .gallery__list img { aspect-ratio: 2 / 3; }

  .gallery__list {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 72%;
    gap: 12px;
    padding: 0 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .gallery__list::-webkit-scrollbar { display: none; }
  .gallery__list li { scroll-snap-align: start; }
}

/* Reduced motion: no zooms, drifts or slides; fades stay short so state changes still read. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
  }

  .gallery__list img,
  .picker__card,
  .pill,
  .conn__tile { transition: none; }

  .frame, .frame.is-active { transform: none; transition: opacity .6s ease; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
