/* ============================================================
   Wedding Site — Design System
   All colours, type, and spacing derived from CLAUDE.md tokens.
   DO NOT change palette or typography without updating CLAUDE.md.
   ============================================================ */

/* ── Self-hosted fonts (couple's names, hero only) ──────────────── */
/* "Brock Script" — Cyrillic-extended fork, free for non-commercial use
   (see /fonts/LICENSE-BrockScript.txt). FULL Ukrainian coverage incl.
   і/ї/є/ґ — no substitution needed, currently the active choice. */
@font-face {
  font-family: 'Brock Script';
  src: url('/fonts/BrockScript.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* "Good Vibes Pro" — Cyrillic-extended fork of Great Vibes, OFL licensed
   (see /fonts/OFL.txt). Missing і/ї/є/ґ — main.js's forScriptFont()
   substitutes Latin lookalikes IF this becomes the active font again. */
@font-face {
  font-family: 'Good Vibes Pro';
  src: url('/fonts/GoodVibesCyr.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  --bg:        #EFE7D7;
  --bg-alt:    #F8F5EE;
  --ink:       #2B2622;
  --ink-soft:  #6E6457;
  --gold:      #9C7A45;
  --gold-soft: #CDB789;
  --line:      #DDD3BC;
  --sage:      #707A65;
  --max:       920px;
  --gutter:    clamp(20px, 6vw, 64px);
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }

/* ── Typography ──────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  margin: 0;
  color: var(--ink);
}

.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 14px;
}

/* ── Layout ──────────────────────────────────────────────────── */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: clamp(64px, 10vw, 120px) 0;
}
.section--alt { background: var(--bg-alt); }

.section__head {
  text-align: center;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section__title { font-size: clamp(30px, 4vw, 42px); }
.section__note {
  color: var(--ink-soft);
  font-size: 16px;
  margin-top: 14px;
}

/* ── Reveal on scroll ────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 12px 26px;
  border-radius: 2px;
  cursor: pointer;
  background: transparent;
  transition: background .25s ease, color .25s ease;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn--gold { border-color: var(--gold); color: var(--gold); }
.btn--gold:hover { background: var(--gold); color: var(--bg); }
.btn--full { width: 100%; text-align: center; }

/* ── Nav ─────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(239, 231, 215, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  justify-content: center;
  gap: clamp(12px, 3vw, 32px);
  flex-wrap: wrap;
}
.nav__link {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color .2s ease;
}
.nav__link:hover { color: var(--gold); }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px var(--gutter) 60px;
}
.hero__inner { max-width: 720px; }

.hero__eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 28px;
  display: block;
}
.hero__names {
  font-size: clamp(36px, 12vw, 104px);
  line-height: 1.2;
  font-weight: 500;
}
.hero__name-script {
  font-family: 'Good Vibes Pro', 'Brock Script', 'Cormorant Garamond', cursive;
  font-weight: 400;
  font-size: clamp(44px, 13vw, 120px);
  line-height: 1.35;
  display: inline-block;
  padding: 0.1em 0.05em;
}
.hero__amp {
  display: block;
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
  font-size: clamp(30px, 6vw, 48px);
  margin: 10px 0;
  font-family: 'Cormorant Garamond', serif;
}
.hero__date {
  margin-top: 26px;
  font-family: 'Inter', sans-serif;
  font-size: 23px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.hero__guest {
  margin-bottom: 22px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(20px, 4vw, 47px);
  color: var(--gold);
  text-align: center;
  /* Break out of .hero__inner's 720px cap so the line has room to fit
     on one row at 47px; clamp() still shrinks it on narrow phones. */
  width: 100vw;
  max-width: 100vw;
  box-sizing: border-box;
  padding: 0 var(--gutter);
  margin-left: calc(50% - 50vw);
}

/* ── Countdown ───────────────────────────────────────────────── */
.countdown {
  margin-top: 56px;
  display: flex;
  justify-content: center;
  gap: 0;
}
.countdown__item {
  text-align: center;
  padding: 0 clamp(18px, 5vw, 44px);
}
.countdown__item + .countdown__item {
  border-left: 1px solid var(--line);
}
.countdown__num {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px, 6vw, 48px);
  color: var(--ink);
  display: block;
}
.countdown__label {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ── Story / Timeline ────────────────────────────────────────── */
.timeline {
  max-width: 640px;
  margin: 0 auto;
  border-left: 1px solid var(--line);
}
.timeline__item {
  position: relative;
  padding: 0 0 44px 36px;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute;
  left: -5px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
}
.timeline__year {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 6px;
}
.timeline__trigger {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.timeline__title {
  font-size: 22px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.timeline__chevron {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  line-height: 1;
  color: var(--gold);
  flex-shrink: 0;
  transition: transform .3s ease;
}
.timeline__item.is-open .timeline__chevron { transform: rotate(90deg); }

.timeline__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .35s ease;
}
.timeline__item.is-open .timeline__panel { grid-template-rows: 1fr; }
.timeline__panel-inner { overflow: hidden; min-height: 0; }
.timeline__text { color: var(--ink-soft); margin: 12px 0 0; }

@media (prefers-reduced-motion: reduce) {
  .timeline__panel { transition: none; }
  .timeline__chevron { transition: none; }
}

/* ── Schedule ────────────────────────────────────────────────── */
.schedule {
  max-width: 640px;
  margin: 0 auto;
}
.schedule__row {
  display: flex;
  gap: 28px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.schedule__row:first-child { border-top: 1px solid var(--line); }
.schedule__time {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  color: var(--gold);
  width: 84px;
  flex-shrink: 0;
}
.schedule__title { font-size: 21px; margin-bottom: 2px; }
.schedule__desc { color: var(--ink-soft); font-size: 16px; margin: 0; }

/* ── Locations ───────────────────────────────────────────────── */
.locations {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(24px, 5vw, 56px);
  row-gap: 0;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.locations > * {
  grid-column: var(--col, auto);
  grid-row: var(--row, auto);
}
/* Vertical divider between the two location columns on desktop — an
   absolutely-positioned line down the middle of the gap, not a grid
   feature, so it doesn't affect column sizing. Hidden on mobile where
   the layout collapses to a single stacked column (see media query). */
.locations::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 50%;
  width: 1px;
  background: var(--gold-soft);
}
.location__label {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 10px;
  display: block;
}
.location__name { font-size: 26px; margin-bottom: 8px; }
.location__address { color: var(--ink-soft); margin: 0 0 18px; }
.location__map {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 18px;
}
.location__map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ── Колористика весілля ─────────────────────────────────────── */
.palette-swatches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  /* Gap was clamping to 40px at desktop widths, which — combined with the
     920px-container-derived cap below — left just enough room for 5
     swatches but pushed a 6th onto its own row. Smaller max gap + wider
     cap gives headroom for 6-7 without shrinking the 135px circles. */
  gap: clamp(16px, 2.5vw, 28px);
  /* Own container, wider than the site's usual 920px .container — 135px
     circles + gaps need more room than that leaves. Plain margin:auto
     centering (not a 100vw breakout) so it isn't thrown off-center by the
     scrollbar's width like 100vw is. */
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  box-sizing: border-box;
}
.swatch { text-align: center; width: 135px; }
.swatch__circle {
  display: block;
  width: 135px;
  height: 135px;
  border-radius: 50%;
  margin: 0 auto 10px;
  border: 1px solid rgba(0,0,0,0.08);
}
.swatch__label {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

/* ── RSVP Form ───────────────────────────────────────────────── */
.rsvp-wrap { max-width: 540px; margin: 0 auto; }

.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: 'EB Garamond', serif;
  font-size: 18px;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 8px 2px;
  outline: none;
  appearance: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-bottom-color: var(--gold); }

.field--row { display: flex; gap: 24px; }
.field--row > div { flex: 1; }

.rsvp__note {
  text-align: center;
  color: var(--ink-soft);
  font-size: 16px;
  margin-top: 18px;
}

/* Success / error states */
.rsvp__success {
  display: none;
  text-align: center;
  padding: 32px 0 0;
}
.rsvp__success-title {
  font-size: 28px;
  color: var(--sage);
  margin-bottom: 8px;
}
.rsvp__success-sub { color: var(--ink-soft); }

.rsvp__error {
  display: none;
  text-align: center;
  color: #8B3A2A;
  margin-top: 14px;
  font-size: 16px;
}

/* ── Gifts ───────────────────────────────────────────────────── */
.gifts { max-width: 560px; margin: 0 auto; text-align: center; }
.gifts p { color: var(--ink-soft); }
.gifts__account {
  margin: 24px auto 0;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.06em;
  border: 1px solid var(--line);
  padding: 18px 24px;
  display: inline-block;
  font-size: 14px;
  color: var(--ink);
}
.gifts__copy-btn {
  margin-top: 14px;
  display: inline-block;
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 64px var(--gutter) 48px;
}
.footer__names { font-size: clamp(26px, 4vw, 34px); margin-bottom: 8px; }
.footer__thanks { color: var(--ink-soft); font-size: 16px; }

/* ── Admin Panel ─────────────────────────────────────────────── */
.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
}
.admin-login__box {
  max-width: 400px;
  width: 100%;
  text-align: center;
}
.admin-login__title { font-size: 32px; margin-bottom: 28px; }

.admin-wrap { padding: clamp(32px, 5vw, 64px) var(--gutter); }
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.admin-header h1 { font-size: 32px; }

.stats-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.stat-card {
  flex: 1;
  min-width: 140px;
  border: 1px solid var(--line);
  padding: 20px 24px;
  border-radius: 2px;
  text-align: center;
}
.stat-card__num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 40px;
  color: var(--gold);
  display: block;
}
.stat-card__label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}

.rsvp-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.rsvp-table th {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.rsvp-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.rsvp-table tr:last-child td { border-bottom: none; }
.badge {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}
.badge--yes { background: #E6EFE6; color: var(--sage); }
.badge--no  { background: #F4EAE6; color: #8B3A2A; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero { min-height: auto; padding: 64px var(--gutter) 48px; }
  .locations { grid-template-columns: 1fr; }
  .locations > * { grid-column: auto; grid-row: auto; }
  .locations::before { display: none; } /* desktop-only vertical divider */
  .locations > .location__end:not(:last-child) {
    display: block;
    width: 100%;
    margin-bottom: 40px;
  }
  /* Stacked single-column layout puts one location's button directly
     above the next location's label with no visual break — add a
     divider above each subsequent location instead of inside the
     previous one's button, so the button's own box (padding/height)
     stays identical between locations. */
  .locations > .location__label:not(:first-of-type) {
    display: block;
    padding-top: 32px;
    /* --line is nearly invisible against this section's --bg (both light
       warm beige, ~1:1 contrast) — --gold-soft is the palette's actual
       "dividers" color and reads clearly here. */
    border-top: 1px solid var(--gold-soft);
  }
  .field--row { flex-direction: column; gap: 0; }
  .stats-row { gap: 12px; }
  .rsvp-table th:nth-child(n+4),
  .rsvp-table td:nth-child(n+4) { display: none; }
}

@media (max-width: 420px) {
  .countdown {
    flex-wrap: wrap;
    row-gap: 20px;
  }
  .countdown__item {
    width: 50%;
    padding: 0 10px;
  }
  .countdown__item:nth-child(3) { border-left: none; }
  .swatch { width: 96px; }
  .swatch__circle { width: 96px; height: 96px; }
}
