/* =====================================================================
   Party @ The Court
   Full-screen sections with gentle (soft) scroll snapping.
   To turn the snapping off, delete the "scroll-snap-type" line in the
   html rule below. Everything else keeps working.
   ===================================================================== */

:root {
  --court: #0b3a24;
  --court-deep: #082b1b;
  --gold: #f4b52a;
  --gold-hover: #ffd062;
  --chalk: #f6f0df;
  --sage: #a9c4b0;
  --ball: #e4571c;
  --ink: #1a1203;
  --gutter: clamp(16px, 5vw, 40px);
  --display: 'Bowlby One', 'Arial Black', Impact, sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-snap-type: y proximity;   /* soft snap: settles near a screen edge, never forces */
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--court);
  color: var(--chalk);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
}

img { max-width: 100%; }

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

.skip {
  position: absolute;
  left: 8px;
  top: -60px;
  padding: 10px 14px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
  border-radius: 8px;
  z-index: 10;
}
.skip:focus { top: 8px; }

/* ---------- A screen: at least as tall as the visible window, never clipped ---------- */

.screen {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  scroll-snap-align: start;
  padding-top: max(clamp(20px, 4svh, 44px), env(safe-area-inset-top));
  padding-bottom: max(clamp(20px, 4svh, 44px), env(safe-area-inset-bottom));
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
.screen.alt { background: var(--court-deep); }

.inner {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
}

.screen-title {
  margin: 0 0 6px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(26px, 6.5vw, 40px);
  line-height: 1.1;
  text-transform: uppercase;
}

.hint { margin: 0; color: var(--sage); font-size: 15px; }
.hint:empty { display: none; }

.status { margin: 10px 0 0; color: var(--sage); font-size: 14px; text-align: center; }
.status:empty { display: none; }

/* ---------- Buttons ---------- */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 22px;
  border: 2px solid var(--gold);
  border-radius: 12px;
  background: transparent;
  color: var(--gold);
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: rgba(244, 181, 42, 0.14); }
.btn.primary { background: var(--gold); color: var(--ink); }
.btn.primary:hover { background: var(--gold-hover); }
.btn.small { min-height: 44px; font-size: 16px; padding: 8px 18px; }

/* =====================================================================
   Screen 1: the event
   ===================================================================== */

.hero {
  isolation: isolate;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(90% 55% at 50% 0%, rgba(228, 87, 28, 0.3), transparent 70%),
    var(--court-deep);
}

.hero.has-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(rgba(8, 43, 27, 0.72), rgba(8, 43, 27, 0.94)),
    var(--hero-photo) center / cover no-repeat;
}

.court {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  color: rgba(246, 240, 223, 0.11);
}
.court * { fill: none; stroke: currentColor; stroke-width: 2; vector-effect: non-scaling-stroke; }

.credit-top {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(169, 196, 176, 0.75);
}

.hero-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 12px 0;
}

.logo { display: block; max-height: 56px; width: auto; margin: 0 auto 6px; }

.presents {
  margin: 0;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--sage);
}

.ball { display: block; width: clamp(48px, 9svh, 72px); height: auto; margin: 14px auto 10px; }

.title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 3px 3px 0 #052014;
}
.t1 { display: block; font-size: clamp(30px, 9.5vw, 56px); }
.t2 { display: block; font-size: clamp(42px, 13vw, 96px); }

.tagline {
  max-width: 26ch;
  margin: 18px auto 0;
  font-size: clamp(17px, 4.6vw, 21px);
  font-weight: 600;
  font-style: italic;
}

.when { margin: 24px 0 0; }
.when strong { display: block; font-size: clamp(19px, 5vw, 24px); font-weight: 800; }
.when span { display: block; margin-top: 2px; color: var(--sage); }

.countdown {
  display: inline-block;
  margin: 16px 0 0;
  padding: 6px 16px;
  border: 2px solid var(--gold);
  border-radius: 999px;
  font-weight: 800;
  color: var(--gold);
}

/* Two buttons share a row; with a third, the last one takes the row below */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  max-width: 520px;
  margin: 8px auto 0;
}
.hero-actions .btn {
  flex: 1 1 130px;
  min-width: 0;
  padding: 12px 10px;
  font-size: 16px;
  line-height: 1.2;
}

.cue {
  margin: 4px 0 0;
  color: var(--gold);
  font-size: 30px;
  line-height: 0.6;
  height: 18px;
}
@media (prefers-reduced-motion: no-preference) {
  .ball { animation: drop 0.9s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
  .cue { animation: nudge 1.8s ease-in-out infinite; }
}
@keyframes drop {
  from { transform: translateY(-70px); opacity: 0; }
  55% { opacity: 1; }
  to { transform: none; opacity: 1; }
}
@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* =====================================================================
   Activity screens
   ===================================================================== */

.act {
  display: grid;
  flex: 1;
  align-content: center;
  gap: 20px;
}

.step { margin: 0 0 10px; font-weight: 800; font-size: 15px; color: var(--sage); }

/* Photo carousel: swipe sideways, dots show where you are */

.carousel { position: relative; min-width: 0; }

.slides {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 52svh;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border: 3px solid var(--gold);
  border-radius: 18px;
  background: var(--court-deep);
}
.slides::-webkit-scrollbar { display: none; }

.slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}
.slide img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Shown until real photos are added */
.slide.ph {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
  color: var(--sage);
  font-weight: 700;
  background:
    radial-gradient(70% 60% at 50% 40%, rgba(228, 87, 28, 0.28), transparent 70%),
    var(--court-deep);
}
.ph-ball {
  width: 64px;
  height: 64px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='30' fill='%23f6f0df' stroke='%231a1203' stroke-width='2'/%3E%3Cg fill='%231a1203'%3E%3Cpolygon points='32,22 41.5,28.9 37.9,40.1 26.1,40.1 22.5,28.9'/%3E%3Cpolygon points='32,2.5 38,6 32,10 26,6'/%3E%3Cpolygon points='58,22 59.5,29 54,31 51.5,24.5'/%3E%3Cpolygon points='6,22 4.5,29 10,31 12.5,24.5'/%3E%3Cpolygon points='48,54 42,56 40,61 47,59'/%3E%3Cpolygon points='16,54 22,56 24,61 17,59'/%3E%3C/g%3E%3Cpath d='M32 22V11M41.5 28.9L51.5 24.5M37.9 40.1L42 56M26.1 40.1L22 56M22.5 28.9L12.5 24.5' fill='none' stroke='%231a1203' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.dots { display: flex; justify-content: center; gap: 2px; margin-top: 8px; }
.dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.dot::before {
  content: '';
  width: 11px;
  height: 11px;
  border: 2px solid var(--gold);
  border-radius: 50%;
}
.dot[aria-current='true']::before { background: var(--gold); }

.car-arrow {
  display: none;
  position: absolute;
  top: calc(50% - 22px);
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: rgba(26, 18, 3, 0.75);
  color: var(--gold);
  font-size: 20px;
  cursor: pointer;
}
.car-arrow.prev { left: 12px; }
.car-arrow.next { right: 12px; }
@media (hover: hover) and (min-width: 700px) {
  .carousel.multi .car-arrow { display: block; }
}

/* Text under the photos */

.act-text { min-width: 0; }
.act-time { margin: 0; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.act-title {
  margin: 4px 0 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 8vw, 50px);
  line-height: 1.05;
  text-transform: uppercase;
}
.act-desc { max-width: 46ch; margin: 12px 0 0; font-size: clamp(17px, 2.2vw, 20px); }

.tag-open,
.tag-ticket {
  display: inline-block;
  margin-top: 14px;
  padding: 3px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}
.tag-open { border: 1px solid rgba(169, 196, 176, 0.7); color: var(--sage); font-weight: 600; }
.tag-ticket { background: var(--gold); color: var(--ink); }

/* Ticket placeholders on the Evening Party screen */

.tickets { margin-top: 20px; }
.ticket-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ticket-row.one { grid-template-columns: minmax(0, 260px); }

.ticket-art {
  position: relative;
  aspect-ratio: 5 / 3;
  border-radius: 12px;
  overflow: hidden;
}
.ticket-art img { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--court-deep); }

.ticket-ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 8px 32% 8px 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}
.ticket-ph::after {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  right: 28%;
  border-left: 2px dashed currentColor;
  opacity: 0.55;
}
.ticket-card.pkg .ticket-ph { background: var(--gold); color: var(--ink); }
.ticket-card.entry .ticket-ph {
  background: var(--court-deep);
  color: var(--chalk);
  box-shadow: inset 0 0 0 2px var(--gold);
}

.ticket-name { margin: 8px 0 0; font-size: 15px; font-weight: 800; }
.ticket-price { margin: 0; font-family: var(--display); font-size: clamp(24px, 6vw, 30px); line-height: 1.1; color: var(--gold); }
.ticket-note { margin: 2px 0 0; font-size: 14px; color: var(--sage); }

/* Portrait phones: a squarer photo uses the tall screen better */
@media (max-width: 699px) and (orientation: portrait) {
  .slides { aspect-ratio: 1 / 1; max-height: 50svh; }
}

/* Wide screens: photos on one side, text on the other */

@media (min-width: 900px) {
  .act { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
  .act .step { grid-column: 1 / -1; margin: 0; }
  .slides { max-height: 64svh; }
}

/* Short landscape phones: keep the photo from taking the whole screen */
@media (max-height: 500px) and (orientation: landscape) {
  .act { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: center; }
  .act .step { grid-column: 1 / -1; margin: 0; }
  .slides { max-height: 78svh; }
  .act-title { font-size: clamp(24px, 5vw, 34px); }
}

/* =====================================================================
   Invited guests: photo cards that flip to show a short bio
   ===================================================================== */

.guests-screen .inner { align-items: stretch; }

.guests {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(150px, 1fr);
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 720px) {
  .guests { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
}

.guest { display: flex; min-width: 0; perspective: 900px; }

.guest-card {
  position: relative;
  display: block;
  width: 100%;
  min-height: 150px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
}
.guest-card.flippable { cursor: pointer; }

.guest-inner {
  position: absolute;
  inset: 0;
  display: block;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.3, 0.8, 0.2, 1);
}
.guest-card.is-flipped .guest-inner { transform: rotateY(180deg); }

.guest-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border: 3px solid var(--gold);
  border-radius: 16px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.guest-front { background: var(--court-deep); }
.guest-back {
  justify-content: flex-start;
  padding: 14px 12px;
  background: var(--gold);
  color: var(--ink);
  transform: rotateY(180deg);
}

.guest-art {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 35%, #14573a, #082b1b);
}
.guest-mono { font-family: var(--display); font-size: clamp(36px, 11vw, 64px); color: var(--gold); }
.guest-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.guest-text {
  position: relative;
  z-index: 1;
  padding: 40px 12px 12px;
  background: linear-gradient(transparent, rgba(5, 32, 20, 0.92) 55%);
}
.guest-name { display: block; font-family: var(--display); font-size: clamp(14px, 3.6vw, 17px); line-height: 1.15; color: var(--chalk); }
.guest-title { display: block; margin-top: 3px; font-size: 14px; line-height: 1.3; font-weight: 700; }
.guest-back .guest-name { color: var(--ink); font-size: 17px; padding-right: 30px; }
.guest-back .guest-title { color: #4a3508; }
.guest-bio {
  display: block;
  margin-top: 8px;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.4;
  color: #2d2106;
}

.guest-i {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
  font-size: 16px;
  line-height: 1;
}
.guest-back .guest-i { background: var(--ink); color: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  .guest-inner { transition: none; transform: none !important; }
  .guest-face { backface-visibility: visible; -webkit-backface-visibility: visible; }
  .guest-back { transform: none; visibility: hidden; }
  .guest-card.is-flipped .guest-back { visibility: visible; }
  .guest-card.is-flipped .guest-front { visibility: hidden; }
}

/* =====================================================================
   Getting there + footer
   ===================================================================== */

.there .inner { justify-content: center; }

.venue-name { margin: 4px 0 0; font-size: 22px; font-weight: 800; }
.venue-address { margin: 0; color: var(--sage); }

.btns { display: grid; gap: 10px; margin-top: 18px; max-width: 640px; }
@media (min-width: 520px) {
  .btns { grid-template-columns: 1fr 1fr; }
}
.there .hint { margin-top: 12px; }

.foot { margin-top: clamp(28px, 6svh, 56px); padding-top: 24px; border-top: 1px solid rgba(246, 240, 223, 0.18); text-align: center; }
.foot p { margin: 0 0 6px; color: var(--sage); font-size: 15px; }
.foot strong { color: var(--chalk); font-weight: 700; }
.foot a { color: var(--gold); }
.foot .btn { display: inline-flex; margin-top: 14px; }
.foot-tag { margin-top: 20px !important; font-style: italic; }
.credit { margin-top: 14px !important; font-size: 13px !important; }
.credit strong { color: var(--sage); }

/* =====================================================================
   Gentle reveal for the text under each photo (only where motion is welcome)
   ===================================================================== */

@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .reveal.in { opacity: 1; transform: none; }
}
