:root {
  --black: #050403;
  --ink: #0d0b08;
  --panel: #15120d;
  --line: rgba(232, 190, 104, .22);
  --gold: #d9a640;
  --gold-light: #f6d98a;
  --gold-deep: #9c6b1c;
  --gold-grad: linear-gradient(100deg, #9c6b1c 0%, #f6d98a 45%, #d9a640 60%, #8a5d16 100%);
  --text: #f4efe6;
  --muted: #b7ab95;
  --danger: #ff7a6b;
  --display: "Bebas Neue", "Oswald", Impact, sans-serif;
  --cond: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, sans-serif;
  --radius: 4px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-light); }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn {
  --h: 48px;
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--h); padding: 0 28px;
  font: 400 22px/1 var(--display); letter-spacing: .08em; text-transform: uppercase;
  color: #1a1206;
  background: var(--gold);
  border-radius: var(--radius);
  transition: background-color .25s var(--ease), transform .15s var(--ease);
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}
@media (hover: hover) {
  .btn:hover { background-color: var(--gold-light); }
}
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.btn--small { --h: 40px; padding: 0 18px; font-size: 18px; }
.btn--large { --h: 58px; padding: 0 40px; font-size: 26px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Topbar */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 14px max(16px, env(safe-area-inset-left)) 14px max(16px, env(safe-area-inset-right));
  transition: background .3s, backdrop-filter .3s;
}
.topbar.is-scrolled { background: rgba(5, 4, 3, .82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar__logo { grid-column: 2; }
.topbar__logo img { width: 170px; height: auto; }
.topbar .btn { grid-column: 3; justify-self: end; }
@media (max-width: 480px) {
  .topbar__logo img { width: 140px; }
  .topbar .btn { padding: 0 12px; font-size: 16px; }
}
.topbar .btn { opacity: 0; pointer-events: none; transition: opacity .3s, transform .15s; }
.topbar.is-scrolled .btn { opacity: 1; pointer-events: auto; }

/* Hero */
.hero {
  position: relative; height: max(100svh, 680px);
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden; isolation: isolate;
  padding: 72px 16px 48px;
  text-align: center;
  background: var(--black);
}
.hero__bg {
  position: absolute; inset: auto 0 0; height: 55%; z-index: -2;
  background: url(/assets/crowd.jpg) center bottom / cover no-repeat;
  opacity: .55;
  mask-image: linear-gradient(to bottom, transparent, #000 60%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 60%);
}
.hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 30%, var(--black) 100%); }
.hero__x {
  grid-row: 2 / 4; grid-column: 1;
  position: relative; z-index: -1;
  margin: -1vh -16px -48px;
  min-height: 0;
  animation: xIn 1.6s .1s var(--ease) both;
}
.hero__x img {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  height: 100%; width: auto; max-width: none; aspect-ratio: 4 / 3; object-fit: cover; object-position: center top;
  mask-image: linear-gradient(to right, transparent 0%, #000 22%, #000 78%, transparent 100%), linear-gradient(to bottom, transparent 0%, #000 12%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 22%, #000 78%, transparent 100%);
  mask-composite: intersect;
}
/* neutral scrim so the date, headline and button sit on dark ground, not on the photos (taste-skill-ignore: legibility scrim) */
.hero__x::after { content: ""; position: absolute; inset: auto 0 0; height: 62%; background: radial-gradient(ellipse 46% 100% at 50% 100%, rgba(5,4,3,.95) 0%, rgba(5,4,3,.86) 50%, rgba(5,4,3,0) 100%); }
@keyframes xIn { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: none; } }
.hero__inner { animation: rise .7s .05s var(--ease) both; position: relative; z-index: 1; }
.hero__title { width: min(820px, 100%); margin: 0 auto; }
.rule { height: 3px; flex: 0 1 180px; background: var(--gold-grad); border-radius: 2px; }
.hero__bottom { grid-row: 3; grid-column: 1; position: relative; }
.hero__bottom > * { animation: rise .7s var(--ease) both; }
.hero__bottom > :nth-child(1) { animation-delay: .15s; }
.hero__bottom > :nth-child(2) { animation-delay: .23s; }
.hero__bottom > :nth-child(3) { animation-delay: .31s; }
.hero__bottom > :nth-child(4) { animation-delay: .39s; }
.hero__x img { animation: drift 24s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translateX(-50%) scale(1); } to { transform: translateX(-50%) scale(1.04); } }
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; opacity: 0; transition: opacity 1.2s var(--ease); }
.hero__video.is-playing { opacity: 1; }
.btn:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 4px; }
.facts {
  list-style: none; margin: 0 0 10px; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 36px;
  font: 400 clamp(22px, 2.6vw, 34px)/1.1 var(--display); letter-spacing: .06em;
}
.facts li { display: inline-flex; align-items: center; gap: 10px; }
.facts svg { width: 1.05em; height: 1.05em; fill: var(--gold); }
.hero__headline {
  margin: 0;
  font: 400 clamp(52px, 9vw, 128px)/.9 var(--display); letter-spacing: .01em;
}
.hero__sub {
  margin: 10px 0 26px;
  font: 400 clamp(17px, 2vw, 28px)/1.3 var(--cond); letter-spacing: .05em; text-transform: uppercase; color: var(--gold-light);
}
.hero__sub strong { font-weight: 600; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@media (max-width: 700px) {
  .hero { padding-top: 76px; }
  .hero__x { grid-row: 2; margin-bottom: -10vh; }
  .hero__x img { aspect-ratio: 1 / 1; object-position: center top; }
  .hero__x::after { height: 55%; }
  .hero__bottom { padding-top: 8px; }
  .facts { flex-direction: column; align-items: center; gap: 4px; }
}

/* Shared type used by the dialog */
.lead { margin-top: 24px; font-size: clamp(18px, 1.8vw, 21px); color: var(--muted); max-width: 62ch; }
.display { font: 400 clamp(44px, 7vw, 84px)/.95 var(--display); letter-spacing: .02em; }

/* Dialog: the dialog itself is a full-screen, transparent scroll area and the
   form is the visible card, so the wheel scrolls the form wherever the pointer is. */
.rsvp {
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: clamp(16px, 4vh, 48px) 16px; border: 0;
  background: transparent; color: var(--text);
  overflow-y: auto; overscroll-behavior: contain;
}
.rsvp::backdrop { background: rgba(0,0,0,.75); backdrop-filter: blur(6px); }
html:has(.rsvp[open]) { overflow: hidden; }
.rsvp__form {
  width: min(560px, 100%); margin: 0 auto;
  padding: 36px clamp(20px, 5vw, 40px) 32px; position: relative;
  border: 1px solid var(--line); border-radius: 6px;
  background: radial-gradient(120% 60% at 50% 0%, #241b0c 0%, var(--ink) 55%);
  box-shadow: 0 30px 80px rgba(0,0,0,.7), 0 0 0 1px rgba(246,217,138,.06) inset;
}
.rsvp[open] .rsvp__form { animation: dialogIn .35s var(--ease); }
@keyframes dialogIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }
@media (max-width: 600px) {
  .rsvp { padding: 0; }
  .rsvp__form { width: 100%; min-height: 100%; border-radius: 0; border: 0; }
}
.rsvp__close {
  position: absolute; top: 10px; right: 10px; width: 44px; height: 44px;
  background: none; border: 0; color: var(--muted); font-size: 32px; line-height: 1; cursor: pointer; border-radius: 50%;
}
.rsvp__close { display: grid; place-items: center; }
.rsvp__close:hover { color: var(--text); background: rgba(255,255,255,.06); }
.rsvp__close:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.rsvp h2 { margin-bottom: 6px; }
.rsvp__meta { margin: 0 0 24px; font: 500 17px/1.3 var(--cond); letter-spacing: .04em; color: var(--gold-light); }

.field { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { display: block; padding: 0; margin-bottom: 8px; font: 500 15px/1.2 var(--cond); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-light); }
.field__hint { font-size: 15px; color: var(--muted); margin: -2px 0 10px; line-height: 1.45; }
.optional { color: var(--muted); letter-spacing: .06em; text-transform: none; font-weight: 400; }
input[type=text], input[type=tel], input[type=email], textarea, select {
  width: 100%; min-height: 50px;
  padding: 12px 14px;
  font: 400 17px/1.3 var(--body); color: var(--text);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(232,190,104,.28); border-radius: var(--radius);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 92px; }
select { appearance: none; padding-right: 28px; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 16px) 22px, calc(100% - 11px) 22px; background-size: 5px 5px; background-repeat: no-repeat; }
select option { background: var(--ink); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); background: rgba(255,255,255,.06); box-shadow: 0 0 0 3px rgba(217,166,64,.18); }
input[aria-invalid="true"], .field.has-error .segmented span { border-color: var(--danger); }
input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(255,122,107,.2); }
::placeholder { color: #958a77; opacity: 1; }
.field__error { color: var(--danger); font-size: 14px; margin-top: 6px; min-height: 0; }
.field__error:empty { display: none; }
.phone { display: grid; grid-template-columns: 86px 1fr; gap: 8px; }
.phone input[name=country_code] { text-align: center; }
.field__note {
  margin-top: 10px; padding: 10px 12px; border-radius: var(--radius);
  background: rgba(217,166,64,.1); border: 1px solid rgba(217,166,64,.3);
  font-size: 15px; line-height: 1.45; color: var(--gold-light);
  animation: rise .3s var(--ease);
}

.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; border-radius: var(--radius); }
.segmented--two { grid-template-columns: 1fr 1fr; }
.segmented label { margin: 0; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 8px; text-align: center;
  border: 1px solid rgba(232,190,104,.28); border-radius: var(--radius);
  font: 500 17px/1.1 var(--cond); letter-spacing: .06em; color: var(--text); text-transform: none;
  transition: background .2s, border-color .2s, color .2s;
}
.segmented input:checked + span { background: var(--gold-grad); color: #1a1206; border-color: transparent; font-weight: 600; }
.segmented input:focus-visible + span { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.guests { display: grid; gap: 10px; }
.guests:not(:empty) { margin-top: 12px; }
.guest { display: grid; gap: 6px; padding: 14px; background: rgba(246,217,138,.05); border-radius: var(--radius); animation: rise .3s var(--ease); }
.guest + .guest { margin-top: 2px; }
.guest__title { margin: 0 0 2px; font: 400 20px/1 var(--display); letter-spacing: .06em; color: var(--gold-light); }
.guest .phone { margin-bottom: 2px; }
.guest__hint { margin: 6px 0 4px !important; }
.guest__label { margin: 0 !important; font: 500 15px/1.3 var(--body) !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--muted) !important; }

.hp { position: absolute; left: -9999px; }
.form-error { color: var(--danger); margin-bottom: 12px; }
.form-error:empty { display: none; }
.privacy { font-size: 14px; color: #9a8f7c; text-align: center; margin-top: 14px; }
.rsvp__done { text-align: center; display: grid; justify-items: center; gap: 8px; padding: 24px 0 8px; }
.rsvp__done img { width: 240px; margin-bottom: 16px; }
.rsvp__done .lead { margin: 0 0 8px; }
.rsvp__done h2:focus { outline: none; }
.summary { width: 100%; margin: 16px 0 24px; padding: 8px 18px; background: rgba(246,217,138,.06); border-radius: var(--radius); text-align: left; }
.summary > div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 12px 0; }
.summary dt { font: 500 14px/1.4 var(--cond); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.summary dd { margin: 0; font-size: 16px; line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }
.done-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.btn--ghost { background: transparent; color: var(--gold-light); box-shadow: 0 0 0 1px rgba(232,190,104,.45) inset; gap: 10px; }
@media (hover: hover) { .btn--ghost:hover { background: rgba(217,166,64,.1); box-shadow: 0 0 0 1px var(--gold) inset; } }
@media (max-width: 420px) { .summary > div { grid-template-columns: 1fr; gap: 2px; } }

@media (prefers-reduced-motion: reduce) {
  .hero__x img { animation: none !important; }
  .hero__video { display: none; }
  .celebrate__shine, .celebrate__stars { display: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* Scrollbars in the brand palette (registration dialog on desktop) */
.rsvp, .rsvp * { scrollbar-width: thin; scrollbar-color: #5a4a2a transparent; }
.rsvp::-webkit-scrollbar { width: 10px; }
.rsvp::-webkit-scrollbar-track { background: transparent; }
.rsvp::-webkit-scrollbar-thumb { background: #4a3d22; border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
.rsvp::-webkit-scrollbar-thumb:hover { background: #9c7a34; border: 3px solid transparent; background-clip: padding-box; }

/* Dietary needs per person */
.diet { margin-top: 10px; }
.diet summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font: 500 16px/1.3 var(--body); color: var(--gold-light); }
.diet summary::-webkit-details-marker { display: none; }
.diet summary::before { content: "+"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(246,217,138,.14); font: 600 16px/1 var(--body); }
.diet[open] summary::before { content: "–"; }
.diet summary:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; border-radius: 4px; }
.diet__body { display: grid; gap: 8px; padding: 12px 0 2px; }
.diet__opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.diet__opt { display: flex !important; align-items: center; gap: 10px; min-height: 44px; margin: 0 !important; padding: 0 12px; border-radius: var(--radius); background: rgba(255,255,255,.04); cursor: pointer;
  font: 400 15px/1.2 var(--body) !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--text) !important; }
.diet__opt input { width: 18px; height: 18px; accent-color: var(--gold); flex: none; }
.diet__opt:has(input:checked) { background: rgba(217,166,64,.18); }
.diet__other-label { margin: 4px 0 0 !important; font: 500 14px/1.3 var(--body) !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--muted) !important; }
.summary__diet { color: var(--muted); }

/* Sparkle on "Let's celebrate": a light sweep masked to the letters + star glints (app.js) */
.celebrate { position: relative; width: min(820px, 100%); margin: 0 auto; }
.celebrate .hero__title { width: 100%; }
.celebrate__shine {
  position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: url(/assets/lets-celebrate.png) center / 100% 100% no-repeat; mask: url(/assets/lets-celebrate.png) center / 100% 100% no-repeat;
  background: linear-gradient(105deg, transparent 38%, rgba(255,244,200,.0) 42%, rgba(255,248,215,.62) 50%, rgba(255,244,200,0) 58%, transparent 62%) no-repeat;
  background-size: 260% 100%; background-position: 130% 0;
  mix-blend-mode: plus-lighter; opacity: .9;
  animation: shine 6.5s 1.2s cubic-bezier(.45,.05,.25,1) infinite;
}
@keyframes shine { 0% { background-position: 130% 0; } 38%, 100% { background-position: -30% 0; } }
.celebrate__stars { position: absolute; inset: 0; pointer-events: none; }
.celebrate__stars .star {
  position: absolute; translate: -50% -50%; color: #fff6d6;
  filter: drop-shadow(0 0 4px rgba(255,226,140,.9)) drop-shadow(0 0 10px rgba(246,200,90,.55));
  animation: twinkle 1.2s ease-in-out both;
}
.celebrate__stars .star svg { display: block; width: 100%; height: 100%; fill: currentColor; }
@keyframes twinkle { 0% { opacity: 0; transform: scale(0) rotate(0deg); } 45% { opacity: 1; transform: scale(1) rotate(45deg); } 100% { opacity: 0; transform: scale(0) rotate(90deg); } }
.celebrate.is-paused .celebrate__shine { animation-play-state: paused; }

.hero__closed { margin: 0; font: 400 clamp(30px, 4vw, 44px)/1.05 var(--display); letter-spacing: .03em; color: var(--gold-light); text-shadow: 0 2px 16px rgba(0,0,0,.6); }
.hero__closed span { display: block; margin-top: 10px; font: 500 16px/1.4 var(--body); letter-spacing: .02em; color: var(--text); }
.hero__closed a { color: var(--gold-light); }
body.reg-closed [data-open-rsvp], body.reg-closed [data-reg-open] { display: none; }
.hero__deadline { margin: 14px 0 0; font: 500 15px/1.3 var(--body); letter-spacing: .04em; color: var(--muted); }
.facts li { text-shadow: 0 1px 2px rgba(0,0,0,.9), 0 0 14px rgba(0,0,0,.85), 0 0 28px rgba(0,0,0,.7); }
.facts svg { filter: drop-shadow(0 0 6px rgba(0,0,0,.9)); }

/* Language toggle in the registration dialog */
.lang { display: inline-flex; gap: 2px; padding: 3px; margin: -14px 0 18px; border-radius: 999px; background: rgba(255,255,255,.05); box-shadow: 0 0 0 1px var(--line) inset; }
.lang button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: 600 13px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--gold); color: #1a1206; }
.lang button:hover:not([aria-pressed="true"]) { color: var(--text); }
.lang button:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }
