/* Fiesta · idea: "a Filipino town fiesta on one page" · each section is a bright colour block, banderitas sway across every seam, content sits on tilted sticker cards that pop in · display Fredoka (rounded, bold) · body Nunito · hero: the celebrant's name as a giant poster with polaroids and a date stamp scattered around it */
/* waive: dress-code swatches are the host's own colours, set inline from content.json */

/* ── Palettes: data-palette on <html> picks one. Add a palette by copying a block. ── */
:root,
[data-palette="default"] {
  /* colour blocks: mango, gumamela, dagat, orange, calamansi, ube */
  --b1: oklch(88% 0.15 92);
  --b2: oklch(82% 0.11 0);
  --b3: oklch(84% 0.1 195);
  --b4: oklch(83% 0.13 65);
  --b5: oklch(87% 0.14 128);
  --b6: oklch(83% 0.08 300);
  --ink: oklch(23% 0.06 310);
  --ink-soft: oklch(33% 0.06 310);
  --paper: oklch(98.5% 0.012 90);
  --on-paper: oklch(23% 0.06 310);
  --on-paper-soft: oklch(42% 0.05 310);
  --line: oklch(23% 0.06 310);
  --accent: oklch(52% 0.2 18);
  --accent-hover: oklch(45% 0.19 18);
  --on-accent: oklch(98.5% 0.012 90);
  --pop: oklch(66% 0.2 12);
  --h-shadow: oklch(98.5% 0.012 90);
  --ribbon: oklch(23% 0.06 310);
  --on-ribbon: oklch(88% 0.15 92);
  --star: oklch(72% 0.17 10);
  --deep: oklch(23% 0.06 310);
  --on-deep: oklch(98.5% 0.012 90);
  --on-deep-soft: oklch(84% 0.04 310);
  --shade: oklch(15% 0.04 310);
  --f1: oklch(60% 0.21 25);
  --f2: oklch(86% 0.17 92);
  --f3: oklch(57% 0.16 250);
  --f4: oklch(70% 0.17 145);
  --f5: oklch(63% 0.2 345);
}
[data-palette="pastel"] {
  --b1: oklch(94% 0.07 95);
  --b2: oklch(92% 0.045 0);
  --b3: oklch(93% 0.04 195);
  --b4: oklch(92% 0.055 60);
  --b5: oklch(93% 0.06 135);
  --b6: oklch(91% 0.045 300);
  --ink: oklch(30% 0.05 285);
  --ink-soft: oklch(40% 0.05 285);
  --paper: oklch(99.2% 0.005 90);
  --on-paper: oklch(30% 0.05 285);
  --on-paper-soft: oklch(45% 0.04 285);
  --line: oklch(40% 0.05 285);
  --accent: oklch(50% 0.13 345);
  --accent-hover: oklch(44% 0.12 345);
  --on-accent: oklch(99.2% 0.005 90);
  --pop: oklch(80% 0.1 345);
  --h-shadow: oklch(99.2% 0.005 90);
  --ribbon: oklch(85% 0.075 345);
  --on-ribbon: oklch(30% 0.05 285);
  --star: oklch(99.2% 0.005 90);
  --deep: oklch(33% 0.05 285);
  --on-deep: oklch(99% 0.005 90);
  --on-deep-soft: oklch(86% 0.03 285);
  --shade: oklch(20% 0.04 285);
  --f1: oklch(80% 0.1 20);
  --f2: oklch(91% 0.1 95);
  --f3: oklch(80% 0.08 240);
  --f4: oklch(85% 0.1 150);
  --f5: oklch(80% 0.09 310);
}
[data-palette="night"] {
  --b1: oklch(30% 0.1 295);
  --b2: oklch(31% 0.11 350);
  --b3: oklch(31% 0.07 225);
  --b4: oklch(30% 0.09 30);
  --b5: oklch(31% 0.07 165);
  --b6: oklch(27% 0.07 265);
  --ink: oklch(97% 0.02 90);
  --ink-soft: oklch(87% 0.04 90);
  --paper: oklch(97% 0.015 90);
  --on-paper: oklch(22% 0.06 295);
  --on-paper-soft: oklch(40% 0.05 295);
  --line: oklch(87% 0.17 95);
  --accent: oklch(70% 0.2 350);
  --accent-hover: oklch(76% 0.17 350);
  --on-accent: oklch(18% 0.05 295);
  --pop: oklch(66% 0.22 350);
  --h-shadow: oklch(60% 0.22 350);
  --ribbon: oklch(87% 0.17 95);
  --on-ribbon: oklch(20% 0.06 295);
  --star: oklch(60% 0.23 350);
  --deep: oklch(17% 0.04 295);
  --on-deep: oklch(97% 0.015 90);
  --on-deep-soft: oklch(84% 0.04 90);
  --shade: oklch(10% 0.03 295);
  --f1: oklch(70% 0.22 25);
  --f2: oklch(88% 0.17 95);
  --f3: oklch(72% 0.15 220);
  --f4: oklch(80% 0.19 145);
  --f5: oklch(70% 0.22 340);
}

/* ── Type, sizes, motion ── */
:root {
  --font-display: 'Fredoka', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;
  --step--1: 1rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.7rem;
  --step-3: clamp(2.4rem, 6vw, 4.2rem);
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --gap: clamp(1.25rem, 3vw, 2.25rem);
  --sec: clamp(4rem, 9vw, 7rem);
  --border: 3px;
  --off: 6px;
  --radius: 18px;
  --tape: color-mix(in oklch, var(--paper) 62%, transparent);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body { overflow-x: clip; margin: 0; background: var(--deep); color: var(--ink); font-family: var(--font-body); font-size: var(--step-0); line-height: 1.6; }
body.is-locked { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { text-wrap: balance; margin: 0; font-family: var(--font-display); font-weight: 700; line-height: 1.05; overflow-wrap: break-word; min-width: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--line); outline-offset: 4px; transition: none; }
.card :focus-visible, .dlg :focus-visible, .nav :focus-visible, .player :focus-visible { outline-color: var(--accent); }
.amp { font-weight: 500; }
.note { font-style: italic; color: var(--on-paper-soft); }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ── Colour blocks ── */
.c1 { --bg: var(--b1); } .c2 { --bg: var(--b2); } .c3 { --bg: var(--b3); }
.c4 { --bg: var(--b4); } .c5 { --bg: var(--b5); } .c6 { --bg: var(--b6); }
.sec { position: relative; padding-block: calc(var(--sec) + 3rem) var(--sec); background: var(--bg); color: var(--ink); overflow: clip; }
.sec-head { text-align: center; margin: 0 auto clamp(2rem, 5vw, 3.25rem); max-width: 44rem; }
.sec-head h2 { font-size: var(--step-3); color: var(--ink); text-shadow: .05em .05em 0 var(--h-shadow); }

/* ── Stickers: chips, cards, polaroids ── */
.chip {
  display: inline-block; margin: 0 0 1rem; padding: .3rem 1rem; rotate: -2deg;
  background: var(--paper); color: var(--on-paper); border: var(--border) solid var(--line); border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; font-size: var(--step--1); box-shadow: 3px 3px 0 var(--line);
}
.chip-big { font-size: var(--step-1); padding: .35rem 1.3rem; }
.chip-solid { background: var(--accent); color: var(--on-accent); box-shadow: none; border-color: var(--on-paper); }
.card {
  position: relative; display: block; background: var(--paper); color: var(--on-paper);
  border: var(--border) solid var(--line); border-radius: var(--radius); box-shadow: var(--off) var(--off) 0 var(--line);
  padding: clamp(1.25rem, 3vw, 2rem); rotate: var(--r, 0deg); text-align: left;
}
.card h3 { font-size: var(--step-2); color: var(--on-paper); margin-bottom: .5rem; }
.pola {
  position: relative; margin: 0; display: block; padding: .55rem .55rem 2.1rem; background: var(--paper);
  border: var(--border) solid var(--line); border-radius: 8px; box-shadow: var(--off) var(--off) 0 var(--line); rotate: var(--r, 0deg);
}
.pola img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 3px; }
.pola::before { content: ""; position: absolute; z-index: 1; top: -.85rem; left: 50%; width: 4.5rem; height: 1.5rem; translate: -50% 0; rotate: -5deg; background: var(--tape); border: 1px solid color-mix(in oklch, var(--line) 25%, transparent); }
.pop:nth-child(3n+1) { --r: -1.6deg; }
.pop:nth-child(3n+2) { --r: 1.3deg; }
.pop:nth-child(3n) { --r: -.5deg; }

/* hover and focus give stickers a little wiggle */
@keyframes wiggle { 0%, 100% { rotate: var(--r, 0deg); } 25% { rotate: calc(var(--r, 0deg) - 3deg); } 70% { rotate: calc(var(--r, 0deg) + 2.5deg); } }
.card:not(.rsvp-card):hover, .pola:hover, button.card:focus-visible, button.pola:focus-visible, .stamp:hover { animation: wiggle .5s var(--ease); }

/* pop-in: fiesta.js adds .pop-ready to <html>; without it every card is simply visible */
.pop-ready .pop { transition: scale .7s var(--spring), opacity .3s var(--ease); }
.pop-ready .pop:not(.is-in) { scale: .55; opacity: 0; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .55rem 1.5rem;
  border: var(--border) solid var(--line); border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); line-height: 1.1; text-decoration: none;
  box-shadow: 4px 4px 0 var(--line);
  transition: background-color .2s var(--ease), translate .15s var(--ease), box-shadow .15s var(--ease);
}
.btn:hover { background: var(--accent-hover); translate: -2px -2px; box-shadow: 6px 6px 0 var(--line); }
.btn:active { translate: 2px 2px; box-shadow: 1px 1px 0 var(--line); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-ghost { background: var(--paper); color: var(--on-paper); }
.btn-ghost:hover { background: var(--paper); }
.card .btn { border-color: var(--on-paper); box-shadow: 4px 4px 0 var(--on-paper); }
.card .btn:hover { box-shadow: 6px 6px 0 var(--on-paper); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem; }

/* ── Banderitas: flags hang on a sagging string; --n flags fit the width ── */
.bunting { --n: 20; --sag: clamp(1rem, 3vw, 2.2rem); position: absolute; z-index: 2; top: .2rem; left: 0; right: 0; height: calc(var(--sag) + 4.5rem); pointer-events: none; }
.bunting-string { position: absolute; left: 0; top: 0; width: 100%; height: var(--sag); overflow: visible; }
.bunting-string path { fill: none; stroke: var(--line); stroke-width: 2.5; }
.bunting ul { position: absolute; inset: 0; }
.bunting li {
  --t: calc((2 * var(--i) + 1) / var(--n) - 1);
  position: absolute; top: calc(var(--sag) * (1 - var(--t) * var(--t)) - 2px); left: calc((var(--i) + .5) * 100% / var(--n));
  width: min(4rem, calc(100% / var(--n) * .78)); translate: -50% 0;
}
.bunting i {
  display: block; aspect-ratio: 1 / 1.15; transform-origin: 50% 0;
  background: linear-gradient(90deg, var(--fc) 50%, color-mix(in oklch, var(--fc) 84%, var(--shade)) 50%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  animation: sway 3.4s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -.41s);
}
.f1 { --fc: var(--f1); } .f2 { --fc: var(--f2); } .f3 { --fc: var(--f3); } .f4 { --fc: var(--f4); } .f5 { --fc: var(--f5); }
@keyframes sway { from { rotate: -8deg; } to { rotate: 8deg; } }
@media (max-width: 1000px) { .bunting { --n: 14; } .bunting li:nth-child(n+15) { display: none; } }
@media (max-width: 640px) { .bunting { --n: 9; } .bunting li:nth-child(n+10) { display: none; } }

/* ── Marquee ribbon ── */
.ribbon { position: relative; z-index: 3; overflow: hidden; background: var(--ribbon); color: var(--on-ribbon); border-block: var(--border) solid var(--line); padding-block: .75rem; }
.ribbon-tilt { rotate: -1.5deg; margin: -1.5rem -2% -1.5rem; }
.ribbon-tilt + .sec { padding-top: calc(var(--sec) + 4.5rem); }
.ribbon-tilt + .sec .bunting { top: 1.6rem; }
.ribbon-track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.ribbon-set { display: flex; align-items: center; gap: 1.4rem; padding-right: 1.4rem; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.25rem, 2.4vw, 1.8rem); white-space: nowrap; }
.star { flex: none; width: 1.15em; height: 1.15em; background: var(--star); clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
@keyframes marquee { to { translate: -50% 0; } }

/* ── Opening screen: only exists when scripting is on ── */
.intro { display: none; }
.js .intro {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 5rem var(--gutter) 2rem; overflow: hidden;
  background: var(--b2); color: var(--ink); text-align: center; cursor: pointer;
  transition: opacity .8s var(--ease), scale .8s var(--ease);
}
.js .intro.is-leaving { opacity: 0; scale: 1.12; pointer-events: none; }
.intro .bunting { --sag: clamp(1.4rem, 4vw, 3rem); }
.intro-body { position: relative; display: grid; justify-items: center; }
.intro-pola { width: clamp(8.5rem, 22vw, 11rem); --r: -6deg; margin-bottom: 1.5rem; }
.intro-pola img { aspect-ratio: 1; }
.intro-line { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); margin-bottom: .25rem; }
.intro-name { font-family: var(--font-display); font-weight: 700; font-size: clamp(3.2rem, 11vw, 7.5rem); line-height: .95; margin: 0 0 .5rem; text-shadow: .05em .05em 0 var(--h-shadow); }
.intro-date { font-weight: 700; margin: .5rem 0 1.75rem; }
.intro-btn {
  display: inline-block; padding: .85rem 1.9rem; border: var(--border) solid var(--line); border-radius: 999px; box-shadow: 5px 5px 0 var(--line);
  background: var(--accent); color: var(--on-accent); font-family: var(--font-display); font-weight: 600; font-size: var(--step-2);
  animation: nudge 1.8s var(--ease) infinite;
}
.intro:focus-visible { outline: none; }
.intro:focus-visible .intro-btn { outline: 3px solid var(--line); outline-offset: 5px; }
@keyframes nudge { 0%, 70%, 100% { scale: 1; } 80% { scale: 1.07; } 90% { scale: .98; } }
.confetti { position: fixed; inset: 0; z-index: 110; width: 100%; height: 100%; pointer-events: none; }

/* ── Nav: a sticker pill that shows after the hero ── */
.nav {
  position: fixed; z-index: 50; top: .75rem; left: 50%; translate: -50% -160%; display: flex; align-items: center; gap: .5rem;
  max-width: calc(100% - 1.5rem); padding: .35rem .4rem .35rem 1rem; background: var(--paper); color: var(--on-paper);
  border: var(--border) solid var(--line); border-radius: 999px; box-shadow: 4px 4px 0 var(--line);
  transition: translate .45s var(--spring);
}
.nav.is-shown { translate: -50% 0; }
.nav-mark { font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); text-decoration: none; white-space: nowrap; }
.nav ul { display: flex; gap: .15rem; overflow-x: auto; scrollbar-width: none; }
.nav a:not(.nav-mark) { display: block; padding: .4rem .8rem; border-radius: 999px; font-family: var(--font-display); font-weight: 600; text-decoration: none; white-space: nowrap; transition: background-color .2s var(--ease), color .2s var(--ease); }
.nav a:not(.nav-mark):hover { background: var(--accent); color: var(--on-accent); }

/* ── Hero: a poster ── */
.hero {
  position: relative; overflow: clip; min-height: max(100svh, 44rem); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem;
  padding: 6.5rem var(--gutter) 3rem; background: var(--bg); color: var(--ink); text-align: center;
}
.hero-head, .hero-foot { position: relative; z-index: 2; max-width: 44rem; }
.hero-name { font-size: clamp(4.2rem, 12vw, 10.5rem); line-height: .9; color: var(--ink); text-shadow: .045em .045em 0 var(--pop); margin-bottom: .1em; }
.hero-name.is-couple { font-size: clamp(3.4rem, 8.6vw, 7.4rem); }
.hero-name.is-couple span { display: block; }
.hero-name.is-couple .amp { font-size: .5em; line-height: 1.2; text-shadow: none; }
.hero-turning { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.8rem, 4vw, 2.9rem); line-height: 1.1; margin: 0 0 .6rem; }
.hero-turning b { display: inline-block; font-size: 1.7em; font-weight: 700; color: var(--accent); text-shadow: .05em .05em 0 var(--line); rotate: -6deg; }
.hero-where { font-weight: 700; font-size: var(--step-1); margin: .5rem 0 0; }
.hero-foot { display: grid; gap: 1.25rem; justify-items: center; }
.hero .btn-ghost { box-shadow: 4px 4px 0 var(--line); }
.countdown { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.countdown > span { display: grid; min-width: 5rem; padding: .35rem .6rem; background: var(--paper); color: var(--on-paper); border: var(--border) solid var(--line); border-radius: 14px; font-weight: 700; font-size: var(--step--1); line-height: 1.2; }
.countdown > span:nth-child(odd) { rotate: -2deg; }
.countdown > span:nth-child(2) { rotate: 2deg; }
.countdown b { font-family: var(--font-display); font-size: var(--step-2); }
.countdown.is-done { font-family: var(--font-display); font-weight: 700; font-size: var(--step-2); }

.hero-scatter { position: relative; width: 100%; max-width: 30rem; height: 24rem; z-index: 1; }
.hp { position: absolute; width: 46%; }
.hp img { object-position: var(--focus-m, 50% 45%); }
.hp-1 { left: 0; top: 0; --r: -7deg; }
.hp-2 { right: 0; top: 1.5rem; --r: 6deg; }
.hp-3 { left: 27%; top: 42%; width: 40%; --r: 3deg; z-index: 1; }
.stamp {
  position: absolute; z-index: 2; right: 0; bottom: 0; width: 8.5rem; aspect-ratio: 1; margin: 0; rotate: var(--r, -12deg);
  display: grid; place-content: center; text-align: center; color: var(--on-accent); isolation: isolate;
  filter: drop-shadow(4px 4px 0 var(--line)); line-height: 1.05; font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em;
}
.stamp::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent);
  clip-path: polygon(50.0% 0.0%, 54.9% 6.3%, 61.1% 1.3%, 64.5% 8.5%, 71.7% 5.0%, 73.4% 12.7%, 81.2% 10.9%, 81.1% 18.9%, 89.1% 18.8%, 87.3% 26.6%, 95.0% 28.3%, 91.5% 35.5%, 98.7% 38.9%, 93.7% 45.1%, 100.0% 50.0%, 93.7% 54.9%, 98.7% 61.1%, 91.5% 64.5%, 95.0% 71.7%, 87.3% 73.4%, 89.1% 81.2%, 81.1% 81.1%, 81.2% 89.1%, 73.4% 87.3%, 71.7% 95.0%, 64.5% 91.5%, 61.1% 98.7%, 54.9% 93.7%, 50.0% 100.0%, 45.1% 93.7%, 38.9% 98.7%, 35.5% 91.5%, 28.3% 95.0%, 26.6% 87.3%, 18.8% 89.1%, 18.9% 81.1%, 10.9% 81.2%, 12.7% 73.4%, 5.0% 71.7%, 8.5% 64.5%, 1.3% 61.1%, 6.3% 54.9%, 0.0% 50.0%, 6.3% 45.1%, 1.3% 38.9%, 8.5% 35.5%, 5.0% 28.3%, 12.7% 26.6%, 10.9% 18.8%, 18.9% 18.9%, 18.8% 10.9%, 26.6% 12.7%, 28.3% 5.0%, 35.5% 8.5%, 38.9% 1.3%, 45.1% 6.3%);
}
.stamp::after { content: ""; position: absolute; inset: 13%; z-index: -1; border: 2px dashed var(--on-accent); border-radius: 50%; opacity: .7; }
.stamp b { display: block; font-family: var(--font-display); font-size: 3.1em; line-height: .95; letter-spacing: 0; }

@media (min-width: 900px) {
  .hero-scatter { position: absolute; inset: 0; max-width: none; height: auto; pointer-events: none; }
  .hero-scatter > * { pointer-events: auto; }
  .hp { width: clamp(11rem, 17vw, 15rem); }
  .hp img { object-position: var(--focus, 50% 45%); }
  .hp-1 { left: 4%; top: 15%; }
  .hp-2 { right: 4%; top: 12%; left: auto; }
  .hp-3 { left: 10%; top: auto; bottom: 6%; width: clamp(10rem, 14vw, 12.5rem); }
  .stamp { right: 8%; bottom: 8%; width: clamp(9rem, 13vw, 11.5rem); font-size: clamp(.85rem, 1.1vw, 1rem); }
}

/* ── You're invited ── */
.invite { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; grid-template-columns: minmax(0, 1fr); max-width: 60rem; }
.invite-pola { width: min(20rem, 80%); justify-self: center; --r: -4deg; }
.invite-card h2 { font-size: var(--step-3); margin-bottom: 1rem; color: var(--on-paper); }
.invite-card { --r: 1.5deg; }
.invite-video { aspect-ratio: 16 / 9; overflow: hidden; }
.invite-video iframe, .invite-video video { width: 100%; height: 100%; border: 0; object-fit: cover; }
@media (min-width: 760px) { .invite { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); } }

/* ── Where and when ── */
.details { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); align-items: start; }
.venue { padding: 0; overflow: hidden; }
.venue-ph { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-bottom: var(--border) solid var(--line); }
.venue-body { padding: 1.25rem 1.5rem 1.6rem; }
.venue-body .chip { margin-bottom: .75rem; }
.venue-time { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); margin: .25rem 0; }
.venue-area { color: var(--on-paper-soft); }
.cal-card .actions { margin-top: 1.25rem; }
.cal-card .btn { font-size: var(--step-0); min-height: 2.75rem; padding-inline: 1.1rem; }
.cal { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: center; font-weight: 700; }
.cal caption { font-family: var(--font-display); font-weight: 700; font-size: var(--step-2); padding-bottom: .6rem; }
.cal th { font-size: .9rem; color: var(--on-paper-soft); padding-bottom: .3rem; }
.cal td { padding: .2rem 0; height: 2.4rem; }
.cal .is-day span { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); border: 2px solid var(--on-paper); rotate: -8deg; }

/* ── Story: a zig-zag of stickers along a dashed line ── */
.zig { position: relative; display: grid; gap: clamp(1.5rem, 4vw, 2.5rem); max-width: 62rem; margin-inline: auto; padding-block: 1rem; }
.zig::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 6px; translate: -50% 0; border-radius: 3px; background: repeating-linear-gradient(var(--line) 0 16px, transparent 16px 28px); }
.zig-item { position: relative; width: calc(50% - 3.5rem); }
.zig-item:nth-child(odd) { justify-self: start; }
.zig-item:nth-child(even) { justify-self: end; }
.zig-year {
  position: absolute; z-index: 1; top: 50%; display: grid; place-items: center; width: 5rem; aspect-ratio: 1; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); border: var(--border) solid var(--line); box-shadow: 3px 3px 0 var(--line);
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; translate: 0 -50%;
}
.zig-item:nth-child(odd) .zig-year { right: -3.5rem; translate: 50% -50%; rotate: 8deg; }
.zig-item:nth-child(even) .zig-year { left: -3.5rem; translate: -50% -50%; rotate: -8deg; }
.zig-card { width: 100%; display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1.1rem; align-items: center; padding: .75rem; font: inherit; }
.zig-ph img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: var(--focus, 50% 40%); border-radius: 10px; border: 2px solid var(--on-paper); }
.zig-text { display: grid; gap: .3rem; }
.zig-title { font-family: var(--font-display); font-weight: 700; font-size: var(--step-2); line-height: 1.1; }
.zig-more { font-weight: 800; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
[data-palette="night"] .zig-more { color: var(--on-paper); }
.story-plain { max-width: 44rem; margin: 2rem auto 0; }
@media (max-width: 760px) {
  .zig::before { left: 2rem; }
  .zig-item, .zig-item:nth-child(even) { width: auto; justify-self: stretch; margin-left: 4.5rem; }
  .zig-item:nth-child(odd) .zig-year, .zig-item:nth-child(even) .zig-year { left: -2.5rem; right: auto; translate: -50% -50%; width: 3.9rem; font-size: 1.05rem; }
  .zig-card { grid-template-columns: 5.5rem minmax(0, 1fr); gap: .8rem; }
  .zig-title { font-size: var(--step-1); }
}

/* ── Entourage (weddings) ── */
.ent { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); align-items: start; }
.ent-card li { margin-bottom: .35rem; }
.ent-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 1rem; }
.role { display: block; font-weight: 800; font-size: .95rem; color: var(--on-paper-soft); }

/* ── Programme: ticket stubs ── */
.sched { display: grid; gap: 1.1rem; max-width: 44rem; margin-inline: auto; }
.sched-item { display: flex; align-items: center; gap: 1.2rem; padding: 1rem 1.25rem; }
.sched-item:nth-child(odd) { margin-right: clamp(0rem, 4vw, 3rem); }
.sched-item:nth-child(even) { margin-left: clamp(0rem, 4vw, 3rem); }
.sched time { flex: none; min-width: 6.5rem; padding: .35rem .8rem; text-align: center; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-family: var(--font-display); font-weight: 600; font-size: var(--step-0); }
.sched b { display: block; font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); line-height: 1.15; }
.sched span { display: block; color: var(--on-paper-soft); }
@media (max-width: 480px) { .sched-item { flex-direction: column; align-items: flex-start; gap: .6rem; } }

/* ── Dress code ── */
.dress { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); align-items: center; }
.dress-pola { max-width: 17rem; justify-self: center; }
.swatches { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 2.5rem; }
.swatches li { display: flex; align-items: center; gap: .5rem; padding: .3rem 1rem .3rem .35rem; background: var(--paper); color: var(--on-paper); border: var(--border) solid var(--line); border-radius: 999px; font-weight: 700; rotate: var(--r, 0deg); }
.swatches i { width: 2rem; height: 2rem; border-radius: 50%; background: var(--swatch); border: 2px solid var(--on-paper); }

/* ── Film, gifts, reminders ── */
.film { padding: .6rem; max-width: 56rem; margin-inline: auto; }
.film iframe, .film video { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; }
.gift-card { max-width: 38rem; margin-inline: auto; text-align: center; --r: -1deg; }
.rem { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); max-width: 60rem; margin-inline: auto; }
.rem li { position: relative; padding-left: 1.75rem; margin-bottom: .6rem; }
.rem li::before { content: ""; position: absolute; left: 0; top: .3em; width: 1.1rem; height: 1.1rem; background: var(--accent); clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.rem-avoid li::before { clip-path: polygon(20% 0, 50% 30%, 80% 0, 100% 20%, 70% 50%, 100% 80%, 80% 100%, 50% 70%, 20% 100%, 0 80%, 30% 50%, 0 20%); width: .9rem; height: .9rem; }
.rem-note { text-align: center; margin-top: 2rem; font-weight: 700; }

/* ── RSVP: big and inviting ── */
.sec-head .rsvp-h { font-size: clamp(3rem, 10vw, 7.5rem); line-height: .95; }
.rsvp-lede { font-size: var(--step-1); font-weight: 700; margin: 1rem 0 0; }
.rsvp-card { max-width: 46rem; margin-inline: auto; --r: -.8deg; padding: clamp(1.5rem, 4vw, 2.5rem); }
.finder label { display: block; font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); margin-bottom: .75rem; }
.finder-row { display: flex; flex-wrap: wrap; gap: .9rem; }
input, select, textarea {
  width: 100%; min-height: 3.2rem; padding: .6rem 1rem; background: var(--paper); color: var(--on-paper);
  border: var(--border) solid var(--on-paper); border-radius: 14px; font-size: var(--step-0);
}
.finder input { flex: 1 1 15rem; width: auto; font-size: var(--step-1); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
input[aria-invalid="true"] { border-color: var(--accent); }
.results { margin-top: 1.25rem; }
.results:empty { display: none; }
.results p { margin-bottom: .6rem; font-weight: 700; }
.results ul { display: grid; gap: .6rem; }
.pick { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 1.1rem; text-align: left; background: var(--paper); color: var(--on-paper); border: var(--border) solid var(--on-paper); border-radius: 14px; box-shadow: 3px 3px 0 var(--on-paper); transition: translate .15s var(--ease), box-shadow .15s var(--ease), background-color .2s var(--ease); }
.pick span { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); }
.pick small { font-size: var(--step--1); color: var(--on-paper-soft); }
.pick:hover { translate: -2px -2px; box-shadow: 5px 5px 0 var(--on-paper); }

/* ── Gallery: a scattered collage ── */
.collage { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 3.5vw, 2.75rem) clamp(1rem, 3vw, 2.25rem); max-width: 62rem; margin-inline: auto; padding-bottom: 2rem; }
.collage li { position: relative; }
.collage li:nth-child(3n+1) { --r: -4deg; translate: 0 .75rem; }
.collage li:nth-child(3n+2) { --r: 3deg; translate: 0 -.5rem; }
.collage li:nth-child(3n) { --r: -1.5deg; translate: 0 1.75rem; }
.collage li:nth-child(4n+2) { --r: 5deg; }
.collage .pola { width: 100%; padding-bottom: 1.6rem; cursor: zoom-in; rotate: var(--r); transition: scale .25s var(--spring); }
.collage li:nth-child(even) .pola img { aspect-ratio: 1; }
.collage .pola:hover, .collage .pola:focus-visible { scale: 1.05; z-index: 2; }
@media (max-width: 640px) { .collage { grid-template-columns: repeat(2, minmax(0, 1fr)); } .collage li:nth-child(3n) { translate: 0 1rem; } }

/* ── Footer ── */
.foot { position: relative; overflow: clip; padding: calc(var(--sec) + 3rem) var(--gutter) calc(var(--sec) * .7); background: var(--deep); color: var(--on-deep); text-align: center; }
.foot-name { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.8rem, 8vw, 5.5rem); line-height: 1; margin-bottom: 1rem; }
.foot p { max-width: 36rem; margin-inline: auto; }
.foot .note { color: var(--on-deep-soft); }
.credit { margin-top: 2.5rem; font-size: var(--step--1); color: var(--on-deep-soft); }
.foot :focus-visible { outline-color: var(--on-deep); }

/* ── Music ── */
.player { position: fixed; right: var(--gutter); bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; flex-direction: row-reverse; align-items: center; gap: .6rem; }
.player[hidden] { display: none; }
.player-btn { width: 3.25rem; height: 3.25rem; border-radius: 50%; border: var(--border) solid var(--line); background: var(--paper); display: grid; place-items: center; box-shadow: 3px 3px 0 var(--line); transition: translate .15s var(--ease); }
.player-btn:hover { translate: -1px -1px; }
.eq { display: flex; align-items: flex-end; gap: 3px; height: 1.1rem; }
.eq i { width: 4px; height: 100%; border-radius: 2px; background: var(--accent); transform-origin: bottom; animation: eq 1s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -.4s; }
.eq i:nth-child(3) { animation-delay: -.7s; }
.player.is-paused .eq i { animation: none; transform: scaleY(.3); }
@keyframes eq { from { transform: scaleY(.25); } to { transform: scaleY(1); } }
.player-now { margin: 0; padding: .35rem .9rem; background: var(--paper); color: var(--on-paper); border: 2px solid var(--line); border-radius: 999px; font-size: var(--step--1); font-weight: 700; max-width: 15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; translate: .5rem 0; transition: opacity .4s var(--ease), translate .4s var(--ease); pointer-events: none; }
.player.is-telling .player-now { opacity: 1; translate: 0 0; }

/* ── Dialogs ── */
.dlg { position: fixed; padding: clamp(1.5rem, 4vw, 2.5rem); background: var(--paper); color: var(--on-paper); border: 4px solid var(--line); border-radius: 22px; box-shadow: 10px 10px 0 var(--line); max-width: min(56rem, calc(100% - 2rem)); max-height: calc(100svh - 2rem); overflow: auto; }
.dlg::backdrop { background: color-mix(in oklch, var(--shade) 70%, transparent); }
.dlg[open] { animation: dlgIn .45s var(--spring); }
@keyframes dlgIn { from { opacity: 0; scale: .85; } to { opacity: 1; scale: 1; } }
.dlg h3 { color: var(--on-paper); }
.dlg-close { position: absolute; top: .5rem; right: .6rem; width: 2.75rem; height: 2.75rem; border: 2px solid currentColor; background: var(--paper); color: var(--on-paper); font-size: 1.6rem; line-height: 1; border-radius: 50%; transition: background-color .2s var(--ease), color .2s var(--ease); }
.dlg-close:hover { background: var(--accent); color: var(--on-accent); }
.story-d { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--gap); }
.story-d-ph img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: var(--focus, 50% 40%); border-radius: 12px; border: var(--border) solid var(--on-paper); }
.story-d-year { display: inline-block; padding: .2rem .9rem; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); margin: 0 0 .75rem; }
.story-d h3 { font-size: var(--step-2); margin-bottom: 1rem; }
.story-d-nav { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.story-d-nav .btn { font-size: var(--step-0); border-color: var(--on-paper); box-shadow: 3px 3px 0 var(--on-paper); }
@media (max-width: 700px) { .story-d { grid-template-columns: minmax(0, 1fr); } .story-d-ph img { aspect-ratio: 4 / 3; } }
.dlg-photo { padding: 0; background: var(--shade); max-width: calc(100% - 1rem); }
.dlg-photo img { max-height: calc(100svh - 3rem); width: auto; margin: auto; }
.ph-nav svg { width: 1.4rem; height: 1.4rem; margin: auto; }
.ph-nav { position: absolute; top: 50%; translate: 0 -50%; width: 3rem; height: 3rem; border: 2px solid var(--on-paper); border-radius: 50%; background: var(--paper); color: var(--on-paper); transition: background-color .2s var(--ease), color .2s var(--ease); }
.ph-nav:hover { background: var(--accent); color: var(--on-accent); }
.ph-nav.prev { left: .5rem; } .ph-nav.next { right: .5rem; }
.ph-count { position: absolute; left: 50%; bottom: .5rem; translate: -50% 0; margin: 0; padding: .1rem .7rem; border-radius: 999px; background: var(--paper); color: var(--on-paper); font-size: var(--step--1); font-weight: 700; }
.dlg-gift, .dlg-rsvp { width: min(31rem, calc(100% - 2rem)); text-align: center; }
.dlg-gift h3, .dlg-rsvp h3 { font-size: var(--step-3); margin-bottom: 1rem; }
.qr { width: min(16rem, 100%); margin: 1rem auto; background: var(--paper); padding: .5rem; border: var(--border) solid var(--on-paper); border-radius: 12px; }
.rsvp-who b { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); }
.rsvp-who span { color: var(--on-paper-soft); }
.form { text-align: left; display: grid; gap: 1.1rem; margin-top: 1.25rem; }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: .4rem; }
.form legend, .field label { margin-bottom: .4rem; display: block; font-weight: 800; }
.field { display: grid; }
.field[hidden] { display: none; }
.radio { display: flex; align-items: center; gap: .6rem; cursor: pointer; }
.radio input { min-height: 0; width: 1.25rem; height: 1.25rem; accent-color: var(--accent); }
.form .btn { justify-self: start; border-color: var(--on-paper); box-shadow: 4px 4px 0 var(--on-paper); }
.form-note { margin: 0; font-weight: 700; min-height: 1.5em; }
.rsvp-thanks p { font-size: var(--step-1); }

/* ── Tall screenshot mode (?shot): nothing depends on the viewport height ── */
.is-shot .hero { min-height: 0; height: 820px; }
@media (max-width: 899px) { .is-shot .hero { height: auto; } }

/* ── Reduced motion: no confetti, no sway, no marquee, no pops ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .ribbon-track { flex-wrap: wrap; width: auto; justify-content: center; }
  .ribbon-set + .ribbon-set { display: none; }
  .ribbon-set { white-space: normal; flex-wrap: wrap; justify-content: center; padding-inline: var(--gutter); }
}
