:root {
  --bg: #fbf6f0;          /* cream */
  --surface: #fffdfa;
  --blush: #f3e1df;       /* light pink */
  --blush-soft: #f8ecea;
  --ink: #3b3a35;
  --muted: #74716a;
  --accent: #6e8063;      /* sage (white text on it stays readable) */
  --accent-dark: #56664d;
  --sage-soft: #a9b79e;
  --gold: #b9827f;        /* dusty rose, used for small labels & frames */
  --line: #eadfd5;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
  --tabbar-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  opacity: 0;
  transition: opacity .5s ease;
}
html.ready body { opacity: 1; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Language picker ---------- */
.lang-picker {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: 16px;
  z-index: 20;
}
.lang-picker {
  display: flex;
  padding: 3px;
  background: rgba(255,253,250,.85);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.lang-btn {
  min-width: 44px;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 500 .8rem var(--sans);
  letter-spacing: .1em;
  cursor: pointer;
}
.lang-btn[aria-pressed="true"] { background: var(--blush); color: var(--ink); }
.lang-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 96px 24px 48px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(243,225,223,.9), transparent 55%),
    radial-gradient(ellipse at 85% 10%, rgba(169,183,158,.28), transparent 50%),
    var(--bg);
}
.hero__photo {
  max-width: 960px;
  margin: 40px auto 0;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 18px 40px -24px rgba(185,130,127,.55);
}
.hero__photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: 50% 60%;
  border-radius: 14px;
}
.hero__kicker {
  margin: 0 0 8px;
  font-size: .8rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--accent-dark);
}
.hero__names {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.8rem, 9vw, 5.5rem);
  line-height: 1.05;
}
.hero__date {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 3.4vw, 1.6rem);
  font-style: italic;
}
.hero__place {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .95rem;
}

/* ---------- Tabs (desktop: under hero, sticky) ---------- */
.tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(251,246,240,.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 400 .95rem var(--sans);
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.tab:hover { color: var(--ink); background: var(--blush-soft); }
.tab[aria-selected="true"] { background: var(--accent); color: #fff; }
.tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.tab__icon {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Panels ---------- */
main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}
.panel { animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.panel__title {
  margin: 0 0 8px;
  text-align: center;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 2.8rem);
}
.panel__intro {
  max-width: 560px;
  margin: 0 auto 36px;
  text-align: center;
  color: var(--muted);
}
.note {
  max-width: 560px;
  margin: 32px auto 0;
  text-align: center;
  font-size: .9rem;
  color: var(--muted);
  font-style: italic;
}

/* ---------- Menu ---------- */
.menu {
  max-width: 620px;
  margin: 0 auto;
  padding: 40px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}
.menu--soon { padding: 48px 32px; background: linear-gradient(180deg, var(--blush-soft), var(--surface)); }
.menu--soon .menu__item { font-style: italic; font-size: 1.5rem; margin: 16px 0 0; }
.menu__flourish {
  width: 120px; height: 20px;
  fill: none; stroke: var(--gold); stroke-width: 1.2;
}
.menu__course + .menu__course {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.menu__name {
  margin: 0 0 8px;
  font: 500 .75rem var(--sans);
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold);
}
.menu__item {
  margin: 4px 0;
  font-family: var(--serif);
  font-size: 1.3rem;
}

/* ---------- Location ---------- */
.location {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 24px;
  margin-top: 32px;
  align-items: stretch;
}
.location__info { display: flex; flex-direction: column; gap: 16px; }
.card {
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card__label {
  margin: 0 0 6px;
  font: 500 .72rem var(--sans);
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold);
}
.card__name { margin: 0; font-family: var(--serif); font-size: 1.45rem; }
.card__text { margin: 2px 0 0; color: var(--muted); font-size: .95rem; }
.location__map {
  min-height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--blush-soft);
}
.location__map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 12px 26px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: 400 .95rem var(--sans);
  letter-spacing: .04em;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn--ghost { background: transparent; color: var(--accent-dark); }
.btn--ghost:hover { color: #fff; }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- Save the date ---------- */
.save {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 32px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
}
.save::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--gold);
  border-radius: calc(var(--radius) - 6px);
  opacity: .45;
  pointer-events: none;
}
.save__kicker {
  margin: 0;
  font-size: .78rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--accent-dark);
}
.save__title {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(2.6rem, 8vw, 4rem);
  line-height: 1.1;
}
.save__date { margin: 12px 0 32px; font-family: var(--serif); font-size: 1.35rem; }
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}
.countdown__item {
  padding: 14px 6px;
  border-radius: 12px;
  background: var(--blush-soft);
}
.countdown__num {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.countdown__label {
  display: block;
  margin-top: 6px;
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.countdown__done { grid-column: 1 / -1; margin: 0; font-family: var(--serif); font-size: 1.6rem; }
.save__message { max-width: 480px; margin: 32px auto; color: var(--muted); }
.save__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

/* ---------- Footer ---------- */
.footer {
  padding: 32px 24px 40px;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.footer p { margin: 0; }

/* =====================================================================
   MOBILE — applied on small screens (media query) AND whenever the
   script detects a phone / touch tablet (data-device="mobile").
   Tabs move to a bottom bar that's easy to reach with the thumb.
   ===================================================================== */
@media (max-width: 767px) {
  html:not([data-device]) .tabs { position: fixed; }
}

html[data-device="mobile"] .hero { padding: 80px 16px 36px; }
html[data-device="mobile"] .hero__photo { margin-top: 28px; padding: 6px; border-radius: 18px; }
html[data-device="mobile"] .hero__photo img { aspect-ratio: 4 / 5; object-position: 50% 62%; border-radius: 13px; }
html[data-device="mobile"] main { padding: 32px 16px calc(var(--tabbar-h) + 40px + env(safe-area-inset-bottom)); }
html[data-device="mobile"] .footer { padding-bottom: calc(var(--tabbar-h) + 32px + env(safe-area-inset-bottom)); }

html[data-device="mobile"] .tabs {
  position: fixed;
  top: auto;
  bottom: 0;
  left: 0;
  right: 0;
  gap: 0;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  border-bottom: 0;
  background: rgba(255,255,255,.96);
  box-shadow: 0 -4px 20px rgba(47,58,51,.06);
}
html[data-device="mobile"] .tab {
  flex: 1 1 0;
  flex-direction: column;
  gap: 3px;
  min-height: 56px;
  padding: 6px 4px;
  border-radius: 12px;
  font-size: .72rem;
  line-height: 1.2;
  text-align: center;
}
html[data-device="mobile"] .tab:hover { background: transparent; }
html[data-device="mobile"] .tab[aria-selected="true"] { background: var(--blush); color: var(--accent-dark); }
html[data-device="mobile"] .tab__icon { width: 24px; height: 24px; }

html[data-device="mobile"] .menu { padding: 28px 18px; }
html[data-device="mobile"] .menu__item { font-size: 1.15rem; }

html[data-device="mobile"] .location { grid-template-columns: 1fr; margin-top: 20px; }
html[data-device="mobile"] .location__map,
html[data-device="mobile"] .location__map iframe { min-height: 300px; }
html[data-device="mobile"] .location .btn { width: 100%; }

html[data-device="mobile"] .save { padding: 40px 18px; }
html[data-device="mobile"] .countdown { gap: 6px; }
html[data-device="mobile"] .countdown__label { font-size: .6rem; letter-spacing: .1em; }
html[data-device="mobile"] .save__actions { flex-direction: column; }
html[data-device="mobile"] .save__actions .btn { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
