/* =============================================================
   Віктор & Любов — весільне запрошення
   Палітра: тепле айворі · графіт · антична позолота · шавлія
   Шрифти: Cormorant (serif) · Marck Script · Montserrat (sans)
   ============================================================= */

:root {
  --paper: #f6f1e8;
  --panel: #efe7d8;
  --cream: #fdfaf4;
  --ink: #26221c;
  --ink-2: #4a4339;
  --muted: #8d8474;
  --gold: #b0915f;
  --gold-2: #977a4d;
  --sage: #7c8570;
  --line: rgba(38, 34, 28, 0.13);
  --line-2: rgba(38, 34, 28, 0.24);

  --serif: "Cormorant", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --script: "Marck Script", "Snell Roundhand", "Segoe Script", cursive;
  --sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --page: min(1240px, 100%);
  --gutter: clamp(22px, 5vw, 48px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: #e6ddcd;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }

.invite {
  width: var(--page);
  margin: 0 auto;
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 0 70px rgba(60, 45, 25, 0.12);
}

/* ---------- Layout helpers ---------- */
.wrap { width: min(1080px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap.narrow { width: min(760px, 100% - 2 * var(--gutter)); }

.section { position: relative; padding: clamp(62px, 9vw, 130px) 0; }
.greeting { background: var(--paper); }
.date { background: var(--panel); }
.location { background: var(--paper); }
.timing { background: var(--panel); }
.details { background: var(--paper); }
.countdown { background: var(--panel); }
.rsvp { background: var(--paper); }

/* ---------- Shared type ---------- */
.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px; height: 1px;
  margin: 0 12px 4px 0;
  background: var(--gold);
  vertical-align: middle;
  opacity: 0.75;
}

.section-head {
  width: min(760px, 100% - 2 * var(--gutter));
  margin: 0 auto clamp(34px, 5vw, 60px);
  text-align: center;
}
.section-head .eyebrow { margin-bottom: 18px; }
.section-head .eyebrow::after {
  content: "";
  display: inline-block;
  width: 24px; height: 1px;
  margin: 0 0 4px 12px;
  background: var(--gold);
  vertical-align: middle;
  opacity: 0.75;
}

.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: 0.005em;
  color: var(--ink);
}
.section-sub {
  margin-top: 16px;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15px;
  letter-spacing: 0.03em;
  line-height: 1.6;
  color: var(--muted);
}
.section-sub strong { font-weight: 500; color: var(--ink-2); }

.lead {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(18px, 2.3vw, 22px);
  line-height: 1.75;
  color: var(--ink-2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 52px;
  padding: 0 30px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--gold-2); border-color: var(--gold-2); color: #fff; }

/* ---------- Music toggle ---------- */
.music {
  position: fixed;
  z-index: 50;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  width: 56px; height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: rgba(253, 250, 244, 0.9);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(70, 55, 30, 0.2);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.music:hover { transform: scale(1.06); }
.music:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.music__note { font-size: 20px; color: var(--gold-2); line-height: 1; }
.music__bars { display: none; align-items: flex-end; gap: 2.5px; height: 18px; }
.music__bars i { width: 2.5px; background: var(--gold-2); animation: sound 1s ease-in-out infinite alternate; }
.music__bars i:nth-child(1) { height: 7px; }
.music__bars i:nth-child(2) { height: 16px; animation-delay: 0.2s; }
.music__bars i:nth-child(3) { height: 11px; animation-delay: 0.4s; }
.music__bars i:nth-child(4) { height: 14px; animation-delay: 0.6s; }
.music[aria-pressed="true"] .music__note { display: none; }
.music[aria-pressed="true"] .music__bars { display: flex; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  max-height: 1000px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--ink);
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 55% 60%;
  animation: heroZoom 1.2s var(--ease) both;
}
.hero__scrim {
  position: absolute; inset: 0;
  background: radial-gradient(125% 78% at 50% 45%,
    rgba(249, 245, 238, 0.6), rgba(247, 242, 233, 0.18) 55%, rgba(238, 230, 216, 0.05) 100%);
}
.hero__frame {
  position: absolute;
  inset: clamp(14px, 2.4vw, 28px);
  border: 1px solid rgba(176, 145, 95, 0.55);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 2;
  padding: 0 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
}
.hero__eyebrow {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(10px, 1.4vw, 12px);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold-2);
  animation: heroUp 0.7s var(--ease) both;
  animation-delay: 0.12s;
}
.hero__kicker {
  font-family: var(--script);
  font-size: clamp(30px, 6.4vw, 56px);
  line-height: 1;
  color: var(--gold-2);
  margin: clamp(14px, 2.4vw, 24px) 0 clamp(4px, 1.4vw, 12px);
  animation: heroUp 0.7s var(--ease) both;
  animation-delay: 0.26s;
}
.hero__names {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0px, 0.6vw, 8px);
  font-family: var(--serif);
  font-weight: 500;
  line-height: 0.98;
  text-shadow: 0 2px 34px rgba(249, 245, 238, 0.65);
  animation: heroUp 0.8s var(--ease) both;
  animation-delay: 0.4s;
}
.hero__name {
  font-size: clamp(52px, 15vw, 126px);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.hero__amp {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(30px, 6.5vw, 58px);
  line-height: 1;
  color: var(--gold);
}
.hero__date {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--ink);
  text-shadow: 0 1px 18px rgba(253, 250, 244, 0.95);
  animation: heroUp 0.7s var(--ease) both;
  animation-delay: 0.58s;
}
.hero__date::before, .hero__date::after {
  content: "";
  width: clamp(22px, 6vw, 48px); height: 1px;
  background: var(--gold);
  opacity: 0.75;
}

.scroll-cue {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: clamp(20px, 4vh, 40px);
  transform: translateX(-50%);
  width: 30px; height: 48px;
  padding: 0;
  border: 1px solid rgba(38, 34, 28, 0.5);
  border-radius: 16px;
  background: rgba(253, 250, 244, 0.32);
  cursor: pointer;
  animation: heroUp 0.7s var(--ease) both;
  animation-delay: 0.85s;
}
.scroll-cue:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.scroll-cue__dot {
  position: absolute;
  left: 50%; top: 9px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--ink);
  transform: translateX(-50%);
  animation: scrollDot 1.9s var(--ease) infinite;
}

/* ---------- GREETING ---------- */
.greeting__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.greeting__photo {
  position: relative;
  aspect-ratio: 4 / 5;
  margin: 0;
  padding: 10px;
  background: var(--cream);
  border: 1px solid rgba(176, 145, 95, 0.5);
  box-shadow: 0 26px 60px rgba(70, 55, 30, 0.16);
}
.greeting__photo picture { display: block; width: 100%; height: 100%; }
.greeting__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.greeting__copy .section-title { margin: 14px 0 22px; }
.greeting__sign {
  margin-top: 24px;
  font-family: var(--script);
  font-size: clamp(22px, 3vw, 30px);
  color: var(--gold-2);
}

/* ---------- DATE + CALENDAR ---------- */
.date__inner { display: flex; flex-direction: column; align-items: center; }
.calendar {
  width: min(420px, 100%);
  padding: clamp(22px, 4vw, 34px);
  background: var(--cream);
  border: 1px solid var(--line);
  box-shadow: 0 22px 55px rgba(70, 55, 30, 0.1);
}
.calendar__title {
  text-align: center;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 4vw, 32px);
  letter-spacing: 0.02em;
  margin-bottom: 18px;
}
.calendar__title span:last-child { color: var(--gold-2); }
.calendar__grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar__weekdays {
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.calendar__weekdays span { text-align: center; padding: 4px 0; }
.calendar__days { row-gap: 3px; font-family: var(--serif); font-size: clamp(15px, 2vw, 17px); }
.calendar__days span {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  color: var(--ink-2);
}
.calendar__days .is-empty { visibility: hidden; }
.calendar__days .is-wedding { color: var(--ink); font-weight: 600; }
.calendar__days .is-wedding::before {
  content: "";
  position: absolute;
  inset: 11%;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  background: rgba(176, 145, 95, 0.12);
}

/* ---------- LOCATION ---------- */
.location__photo { margin: 0; }
.location__photo img {
  width: 100%;
  height: clamp(300px, 50vh, 540px);
  object-fit: cover;
  object-position: center;
}
.location__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 52px);
  align-items: center;
  margin-top: clamp(30px, 4vw, 52px);
}
.location__addr {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(21px, 2.8vw, 27px);
  color: var(--ink);
}
.location__note {
  margin: 14px 0 26px;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}
.location__map {
  position: relative;
  aspect-ratio: 16 / 11;
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(70, 55, 30, 0.12);
  overflow: hidden;
  background: var(--cream);
}
.location__map iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: 0;
  filter: grayscale(0.25) contrast(0.95);
}

/* ---------- TIMELINE ---------- */
.timeline { position: relative; width: min(720px, 100%); margin-inline: auto; }
.timeline::before {
  content: "";
  position: absolute;
  top: 8px; bottom: 8px;
  left: 50%;
  width: 1px;
  background: var(--line-2);
  transform: translateX(-50%);
}
.timeline__item {
  position: relative;
  width: 50%;
  padding: 0 42px clamp(30px, 4vw, 46px);
  box-sizing: border-box;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: "";
  position: absolute;
  top: 9px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--panel);
  box-shadow: 0 0 0 1px var(--gold);
}
.timeline__item:nth-child(odd) { text-align: right; }
.timeline__item:nth-child(odd)::before { right: -6px; }
.timeline__item:nth-child(even) { margin-left: 50%; text-align: left; }
.timeline__item:nth-child(even)::before { left: -6px; }
.timeline__time {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1;
  color: var(--gold-2);
}
.timeline__item h3 {
  margin: 12px 0 6px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.timeline__item p { font-family: var(--serif); font-size: 17px; color: var(--ink-2); }

/* ---------- DETAILS + DRESS CODE ---------- */
.details__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(18px, 3vw, 34px);
  width: min(820px, 100%);
  margin-inline: auto;
  counter-reset: d;
}
.detail {
  text-align: center;
  padding: clamp(26px, 3.4vw, 40px) clamp(18px, 2.4vw, 28px);
  background: var(--cream);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(70, 55, 30, 0.07);
}
.detail::before {
  counter-increment: d;
  content: "0" counter(d);
  display: block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--gold-2);
}
.detail h3 {
  margin: 12px 0 12px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(22px, 3vw, 27px);
  color: var(--ink);
}
.detail p {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-line;
  color: var(--ink-2);
}

.dresscode {
  text-align: center;
  margin-top: clamp(42px, 6vw, 74px);
  padding-top: clamp(36px, 5vw, 56px);
  border-top: 1px solid var(--line);
}
.dresscode .eyebrow::before { display: none; }
.dresscode .eyebrow { margin-bottom: 8px; }
.dresscode__note {
  max-width: 560px;
  margin: 12px auto 32px;
  font-family: var(--serif);
  font-size: clamp(17px, 2.2vw, 21px);
  line-height: 1.6;
  white-space: pre-line;
  color: var(--ink-2);
}
.palette { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(16px, 3vw, 34px); }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 11px; }
.swatch__dot {
  width: clamp(44px, 8vw, 58px);
  height: clamp(44px, 8vw, 58px);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.09), 0 8px 18px rgba(70, 55, 30, 0.16);
}
.swatch__name {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- COUNTDOWN ---------- */
.countdown .wrap { text-align: center; }
.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(10px, 2vw, 22px);
  max-width: 640px;
  margin: clamp(30px, 4vw, 48px) auto 0;
}
.cd {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: clamp(16px, 2.2vw, 24px) 4px;
  background: var(--cream);
  border: 1px solid var(--line);
  box-shadow: 0 14px 36px rgba(70, 55, 30, 0.08);
}
.cd strong {
  font-family: var(--serif);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-size: clamp(32px, 8vw, 58px);
  line-height: 1;
  color: var(--ink);
}
.cd span {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(9px, 1.4vw, 11px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- RSVP FORM ---------- */
.rsvp__inner { width: min(720px, 100% - 2 * var(--gutter)); }
.form { margin-top: clamp(30px, 4vw, 44px); }
.field { display: block; margin: 0 0 clamp(22px, 3vw, 30px); padding: 0; border: 0; min-width: 0; }
.field__label {
  display: block;
  margin-bottom: 12px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--ink);
}
.field__label em { font-style: normal; font-weight: 300; color: var(--muted); }
.field__hint {
  margin: -4px 0 14px;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

input[type="text"], textarea {
  width: 100%;
  padding: 16px 18px;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
input[type="text"]::placeholder, textarea::placeholder { color: #b3a996; }
input[type="text"]:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176, 145, 95, 0.16);
}
textarea { min-height: 96px; line-height: 1.6; resize: vertical; }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pill, .chip { position: relative; margin: 0; }
.pill input, .chip input {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.pill span {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 56px;
  padding: 8px 14px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  background: var(--cream);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  transition: background 0.22s var(--ease), color 0.22s var(--ease), border-color 0.22s var(--ease);
}
.chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.chip span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 52px;
  padding: 8px 12px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.25;
  text-align: center;
  background: var(--cream);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  transition: background 0.22s var(--ease), color 0.22s var(--ease), border-color 0.22s var(--ease);
}
.pill input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip input:checked + span { background: var(--gold); color: #fff; border-color: var(--gold); }
.pill input:focus-visible + span, .chip input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(176, 145, 95, 0.4);
}
.pill input:hover + span, .chip input:hover + span { border-color: var(--gold); }

.form .btn--solid { width: 100%; min-height: 58px; margin-top: 6px; }
.form__status {
  min-height: 22px;
  margin: 16px 0 0;
  font-family: var(--sans);
  font-size: 14px;
  text-align: center;
  color: var(--sage);
}
.form__status.is-error { color: #a3563f; }

/* ---------- FINALE ---------- */
.finale {
  position: relative;
  width: var(--page);
  height: clamp(520px, 78vh, 760px);
  margin-inline: auto;
  overflow: hidden;
  color: var(--ink);
  box-shadow: 0 0 70px rgba(60, 45, 25, 0.12);
}
.finale__media {
  position: absolute;
  inset: 0;
}
.finale__media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.finale__scrim {
  position: absolute; inset: 0;
  background: radial-gradient(125% 90% at 50% 50%,
    rgba(246, 241, 232, 0.74), rgba(246, 241, 232, 0.32) 60%, rgba(246, 241, 232, 0.14) 100%);
}
.finale__inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
}
.finale__script {
  max-width: 600px;
  margin-bottom: 18px;
  font-family: var(--script);
  font-size: clamp(28px, 5.5vw, 52px);
  line-height: 1.25;
  color: var(--gold-2);
}
.finale__names {
  display: flex;
  align-items: center;
  gap: 0.28em;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 7vw, 62px);
  line-height: 1;
  color: var(--ink);
}
.finale__date {
  margin-top: 18px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(12px, 1.6vw, 14px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Keyframes ---------- */
@keyframes heroZoom { from { transform: scale(1.06); opacity: 0.5; } to { transform: scale(1); opacity: 1; } }
@keyframes heroUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes scrollDot {
  0% { opacity: 0; transform: translate(-50%, 0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 16px); }
}
@keyframes sound { from { transform: scaleY(0.4); } to { transform: scaleY(1); } }

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  .greeting__grid { grid-template-columns: 1fr; gap: clamp(26px, 6vw, 40px); }
  .greeting__photo { width: min(440px, 100%); margin-inline: auto; }
  .greeting__copy { text-align: center; }
  .greeting__copy .section-title { margin-top: 18px; }
  .greeting .eyebrow::before { display: none; }
  .location__grid { grid-template-columns: 1fr; }
  .location__info { text-align: center; }
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  body { font-size: 17px; }
  :root { --gutter: 20px; }

  .details__grid { grid-template-columns: 1fr; gap: 16px; max-width: 460px; margin-inline: auto; }
  .detail { padding: 26px 22px; }

  .timeline { width: 100%; max-width: 460px; }
  .timeline::before { left: 6px; }
  .timeline__item {
    width: 100%;
    margin-left: 0;
    text-align: left;
    padding: 0 0 clamp(26px, 7vw, 36px) 34px;
  }
  .timeline__item:nth-child(odd) { text-align: left; }
  .timeline__item:nth-child(even) { margin-left: 0; }
  .timeline__item::before { left: 0; right: auto; }
  .timeline__item:nth-child(odd)::before { right: auto; left: 0; }

  .countdown__grid { gap: 8px; }
  .segmented { gap: 10px; }
  .chips { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .chip:last-child { grid-column: 1 / -1; }

  /* Palette as a centered 3-column grid so labels never reach the
     floating music button in the bottom corner. */
  .palette {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: center;
    justify-items: center;
    column-gap: 18px;
    row-gap: 22px;
    max-width: 300px;
    margin-inline: auto;
  }
  .swatch__dot { width: 46px; height: 46px; }
  .swatch__name { font-size: 10px; }
  .music { width: 52px; height: 52px; background: var(--cream); }
  .hero__date { gap: 8px; font-size: 21px; }
  .hero__date::before, .hero__date::after { width: 14px; }
}

/* ---------- Small phones ---------- */
@media (max-width: 380px) {
  .segmented { grid-template-columns: 1fr; }
  .pill span { min-height: 52px; }
  .countdown__grid { gap: 7px; }
  .cd { padding: 14px 2px; }
  .hero__date { font-size: 19px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero__media img { animation: none; }
}
