/* ===== Wedding site — Provence-inspired design system ===== */
:root {
  --cream: #faf6ee;
  --cream-2: #f3ecdd;
  --ink: #33312b;
  --ink-soft: #5d594f;
  --olive: #6b7250;
  --olive-dark: #565c40;
  --terra: #c46f4a;
  --terra-dark: #a95a38;
  --white: #fffdf9;
  --shadow: 0 2px 24px rgba(51, 49, 43, .10);
  --radius: 14px;
  --serif: "Spectral", "Didot", "Hoefler Text", Georgia, serif;
  /* One family throughout; hierarchy comes from weight and size, not contrast. */
  --sans: "Spectral", "Iowan Old Style", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* The UA rule for [hidden] is display:none at the lowest specificity, so any
   class setting display (.step label, .hint, .checks label, .lang-gate) silently
   beats it and the element stays visible. Keep this above everything. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 17px;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; }
h2 { font-size: clamp(1.9rem, 4.2vw, 2.7rem); text-align: center; margin-bottom: .5em; }
h2::after {
  content: ""; display: block; width: 56px; height: 2px;
  background: var(--terra); margin: .45em auto 0;
}

/* ===== Drifting olive leaves =====
   Fixed behind everything (z-index -1 keeps it above the page background but
   below all content). Opaque section backgrounds hide it, so leaves show
   through the cream stretches rather than over cards or the hero. */
.leaves {
  position: fixed; inset: 0; overflow: hidden;
  pointer-events: none; z-index: -1;
}
.leaves svg {
  position: absolute; color: var(--olive);
  will-change: transform;
  animation: leaf-drift linear infinite;
}
@keyframes leaf-drift {
  0%   { transform: translate3d(0, -12vh, 0) rotate(0deg); }
  50%  { transform: translate3d(26px, 44vh, 0) rotate(180deg); }
  100% { transform: translate3d(0, 108vh, 0) rotate(360deg); }
}
/* Under prefers-reduced-motion app.js spawns no leaves at all, rather than
   leaving them frozen: without the animation they carry no `top` and would
   all pile up at the viewport's top edge. */

/* ===== First-visit language chooser ===== */
.lang-gate {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(243, 236, 221, .97);
  animation: gate-in .3s ease-out;
}
@keyframes gate-in { from { opacity: 0; } to { opacity: 1; } }
.lang-gate-card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 40px 34px 34px; text-align: center; max-width: 460px; width: 100%;
}
.lang-gate-names {
  font-family: var(--serif); font-size: 1.9rem; font-weight: 500; color: var(--ink);
}
.lang-gate-card .olive-branch { margin: 4px auto 18px; }
.lang-gate-title { display: flex; flex-direction: column; gap: 2px; margin-bottom: 22px; }
.lang-gate-title span {
  font-family: var(--sans); font-size: .82rem; font-weight: 400;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft);
}
.lang-gate-title span:first-child { color: var(--terra); }
.lang-gate-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lang-gate-options button {
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
  background: var(--cream); border: 1.5px solid #ddd5c4; border-radius: 10px;
  padding: 14px 10px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.lang-gate-options button:hover { border-color: var(--olive); background: #eef0e5; }
.lang-gate-options button:focus-visible { outline: 2px solid var(--olive); outline-offset: 2px; }
.lang-gate-options button.suggested { border-color: var(--olive); box-shadow: inset 0 0 0 1px var(--olive); }
body.gate-open { overflow: hidden; }

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 22px;
  background: rgba(250, 246, 238, .96);
  border-bottom: 1px solid rgba(51, 49, 43, .08);
}
.nav-name {
  font-family: var(--serif); font-size: 1.28rem; font-weight: 600;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.nav-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.nav-links a {
  color: var(--ink-soft); text-decoration: none; font-size: .92rem;
  letter-spacing: .04em; text-transform: uppercase;
}
.nav-links a:hover { color: var(--terra); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.lang-switch { display: flex; gap: 2px; background: var(--cream-2); border-radius: 20px; padding: 3px; }
.lang-switch button {
  border: 0; background: none; font-family: var(--sans); font-size: .78rem;
  letter-spacing: .05em; padding: 4px 9px; border-radius: 16px;
  cursor: pointer; color: var(--ink-soft);
}
.lang-switch button.on { background: var(--olive); color: var(--white); }

/* ===== Buttons ===== */
.btn {
  display: inline-block; border: 0; cursor: pointer;
  background: var(--olive); color: var(--white);
  font-family: var(--sans); font-size: 1rem; font-weight: 400;
  letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  padding: 13px 34px; border-radius: 40px;
  transition: background .2s, transform .15s;
}
.btn:hover { background: var(--olive-dark); transform: translateY(-1px); }
.btn-small { padding: 9px 22px; font-size: .85rem; }
.btn-outline {
  background: transparent; color: var(--olive);
  box-shadow: inset 0 0 0 1.5px var(--olive);
}
.btn-outline:hover { background: rgba(107, 114, 80, .1); }

/* ===== Hero (split layout) =====
   The photo pane is deliberately shorter and wider than a full-height half:
   the hero photo is landscape, so a 100vh pane would crop away ~40% of its
   width. These proportions keep the crop closer to the photo's own 4:3. */
.hero {
  display: grid; grid-template-columns: 1fr 1.1fr;
  min-height: 82vh; padding-top: 56px; background: var(--cream-2);
}
.hero-text { display: flex; align-items: center; justify-content: center; padding: 60px 36px; }
.hero-photo { overflow: hidden; }
.hero-photo img {
  width: 100%; height: 100%; object-fit: cover;
  /* faces sit slightly right of centre, upper third of this photo */
  object-position: 55% 32%;
}
.hero-card { text-align: center; color: var(--ink); max-width: 560px; }
.eyebrow { letter-spacing: .35em; text-transform: uppercase; font-size: .8rem; margin-bottom: 14px; color: var(--terra); }
.hero-card h1 { font-size: clamp(2.4rem, 5vw, 3.7rem); margin-bottom: 10px; }
.hero-date { font-family: var(--serif); font-size: 1.35rem; font-style: italic; }
.hero-place { font-size: 1rem; letter-spacing: .06em; margin: 4px 0 22px; color: var(--ink-soft); }
.hero-deadline {
  margin-top: 18px; font-size: 1.05rem; font-weight: 400;
  color: var(--olive-dark); letter-spacing: .01em;
}
/* Single item since the countdown shows days only. */
.countdown { display: flex; justify-content: center; margin-bottom: 26px; }
.countdown b { display: block; font-family: var(--serif); font-size: 2.9rem; font-weight: 600; line-height: 1.05; color: var(--olive-dark); }
.countdown span { font-size: .74rem; text-transform: uppercase; letter-spacing: .18em; color: var(--ink-soft); }

/* One olive branch as decoration, under the names in the hero card. */
.olive-branch { display: block; margin: 6px auto 12px; color: var(--olive-dark); opacity: .7; }

/* ===== Sections ===== */
.section { max-width: 1060px; margin: 0 auto; padding: 84px 22px; }
.section-narrow { max-width: 720px; }
.section-intro { text-align: center; max-width: 720px; margin: 0 auto 34px; color: var(--ink-soft); }
.lead { font-family: var(--serif); font-size: 1.42rem; text-align: center; line-height: 1.5; }
.lead-sub { text-align: center; color: var(--ink-soft); margin-top: 18px; }
.sub-h { font-size: 1.42rem; margin: 44px 0 18px; text-align: center; }
.note { text-align: center; color: var(--ink-soft); font-size: .95rem; margin-top: 18px; font-style: italic; }

/* ===== Cards ===== */
.cards { display: grid; gap: 18px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--white); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow);
}
.card h3 { font-size: 1.42rem; margin-bottom: 8px; }
.card h4 { font-family: var(--serif); font-size: 1.24rem; font-weight: 600; margin-bottom: 4px; }
.card p { font-size: .95rem; color: var(--ink-soft); }
.day-label {
  color: var(--terra) !important; letter-spacing: .18em; text-transform: uppercase;
  font-size: .78rem !important; margin-bottom: 10px;
}
.day-card-main { border-top: 3px solid var(--terra); }
.drive { color: var(--olive) !important; font-weight: 500; margin-bottom: 6px; }
.badge {
  display: inline-block; background: var(--terra); color: var(--white) !important;
  font-size: .7rem !important; letter-spacing: .12em; text-transform: uppercase;
  border-radius: 20px; padding: 3px 12px; margin-bottom: 10px;
}
.recommended { border-top: 3px solid var(--terra); }

.venue-line { text-align: center; margin-top: 44px; }
.venue-line p { margin-bottom: 16px; color: var(--ink-soft); }
.venue-line strong { color: var(--ink); font-size: 1.12rem; }

/* ===== Tips / stay note ===== */
.tips, .stay-note {
  background: var(--cream-2); border-radius: var(--radius);
  padding: 30px 34px; margin-top: 40px;
}
.tips h3 { font-size: 1.32rem; margin-bottom: 12px; }
.tips ul { padding-left: 20px; }
.tips li { margin-bottom: 8px; }
.stay-note p { margin-bottom: 10px; }
.stay-note p:last-child { margin-bottom: 0; }

/* ===== Photo breaks & gallery =====
   Photos are shown at (or below) native resolution and never cropped,
   so quality stays crisp and faces are always fully visible. */
.photo-break { max-width: 920px; margin: 0 auto; padding: 36px 22px; }
.photo-break img {
  max-width: 100%; max-height: 76vh; width: auto; margin: 0 auto; display: block;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
/* Venue trio, sits where a single photo break would otherwise go. */
.venue-photos { max-width: 1060px; margin: 0 auto; padding: 36px 22px; }
.venue-photos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.venue-photos-grid img {
  width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.venue-credit {
  text-align: center; margin-top: 14px;
  font-size: .78rem; letter-spacing: .06em; color: var(--ink-soft); opacity: .75;
}
.venue-credit a { color: var(--olive); text-decoration: underline; text-underline-offset: 3px; }
.venue-credit a:hover { color: var(--terra); }
.venue-credit a::before { content: "\00b7"; margin: 0 6px; color: var(--ink-soft); text-decoration: none; display: inline-block; }

.gallery { columns: 3 240px; column-gap: 14px; }
.gallery img {
  width: 100%; display: block; margin-bottom: 14px; break-inside: avoid;
  border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ===== FAQ ===== */
.faq {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 18px 22px; font-weight: 400; font-size: 1.05rem;
  list-style: none; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 22px; top: 50%;
  transform: translateY(-50%); color: var(--terra);
  font-size: 1.4rem; font-weight: 300; transition: transform .2s;
}
.faq[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq p { padding: 0 22px 18px; color: var(--ink-soft); }

/* ===== RSVP form ===== */
.rsvp-section { max-width: 760px; }
.rsvp-form {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 38px 40px;
}
.progress { display: flex; justify-content: center; gap: 8px; margin-bottom: 26px; }
.progress i {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--cream-2); transition: background .2s;
}
.progress i.on { background: var(--terra); }
.step { border: 0; }
.step h3 { font-size: 1.6rem; text-align: center; margin-bottom: 20px; }
.step label { display: block; margin-bottom: 16px; font-weight: 400; font-size: .98rem; }
.optional { color: var(--ink-soft); font-weight: 400; font-size: .85rem; }
.hint { display: block; font-size: .84rem; color: var(--ink-soft); font-weight: 400; margin-top: 4px; }
.field-h { font-family: var(--sans); font-weight: 500; font-size: 1rem; margin: 24px 0 10px; }
input[type=text], input[type=email], input[type=tel], input[type=number], textarea {
  width: 100%; margin-top: 6px;
  border: 1.5px solid #ddd5c4; border-radius: 10px;
  background: var(--cream); color: var(--ink);
  font-family: var(--sans); font-size: 1rem; font-weight: 400;
  padding: 12px 14px;
}
input:focus, textarea:focus { outline: 2px solid var(--olive); border-color: var(--olive); }
input.invalid { border-color: #c0392b; }

.choice-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.choice-cards-3 { grid-template-columns: repeat(3, 1fr); }
.choice-cards-4 { grid-template-columns: repeat(4, 1fr); }
.choice { position: relative; margin: 0 !important; }
.choice input { position: absolute; opacity: 0; }
.choice span {
  display: block; text-align: center; padding: 16px 12px;
  border: 1.5px solid #ddd5c4; border-radius: 10px;
  background: var(--cream); cursor: pointer; font-size: .95rem;
  transition: border-color .15s, background .15s;
}
.choice input:checked + span { border-color: var(--olive); background: #eef0e5; box-shadow: inset 0 0 0 1px var(--olive); }
.choice input:focus-visible + span { outline: 2px solid var(--olive); }

.checks label { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-weight: 400; }
.checks { margin-bottom: 14px; }
.checks input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--olive); }
.checks-stack { display: block; }
.seat-count { padding-left: 28px; }
.seat-count input { max-width: 90px; }

.guest-row {
  background: var(--cream); border: 1.5px solid #ddd5c4; border-radius: 10px;
  padding: 16px; margin-bottom: 14px; position: relative;
}
.guest-row .guest-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.guest-row .guest-head input { margin-top: 0; background: var(--white); }
.guest-remove {
  border: 0; background: none; color: var(--terra-dark); cursor: pointer;
  font-size: 1.5rem; line-height: 1; padding: 4px 8px;
}
.diet-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.diet-chips label { margin: 0; }
.diet-chips input { position: absolute; opacity: 0; }
.diet-chips span {
  display: inline-block; padding: 6px 14px; border-radius: 20px;
  border: 1.5px solid #ddd5c4; background: var(--white);
  font-size: .85rem; cursor: pointer;
}
.diet-chips input:checked + span { background: var(--olive); border-color: var(--olive); color: var(--white); }
.guest-row input[name=dietaryNotes] { background: var(--white); }
.btn-add { margin-bottom: 8px; }

.step-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 26px; }
.form-error { color: #c0392b; text-align: center; margin-top: 14px; }
.confirm { text-align: center; }
.confirm h3 { font-size: 1.88rem; }
.confirm p { margin-bottom: 12px; }

/* Read-back of everything the guest submitted. */
.confirm-summary {
  text-align: left; background: var(--cream); border: 1.5px solid #ddd5c4;
  border-radius: 10px; padding: 20px 22px; margin: 22px 0 16px; font-size: .92rem;
}
.confirm-summary h4 {
  font-family: var(--serif); font-size: 1.2rem; font-weight: 600;
  margin-bottom: 12px; color: var(--olive-dark);
}
.confirm-summary dl { display: grid; grid-template-columns: minmax(90px, 30%) 1fr; gap: 8px 16px; }
.confirm-summary dt { color: var(--ink-soft); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; padding-top: 2px; }
.confirm-summary dd { color: var(--ink); overflow-wrap: anywhere; }
.confirm-summary .sum-note { color: var(--ink-soft); font-size: .86rem; }
.confirm-summary .sum-save { margin: 14px 0 0; color: var(--ink-soft); font-size: .84rem; font-style: italic; }
@media (max-width: 520px) {
  .confirm-summary dl { grid-template-columns: 1fr; gap: 2px; }
  .confirm-summary dd { margin-bottom: 10px; }
}

/* ===== Footer ===== */
.footer {
  text-align: center; padding: 60px 20px 46px;
  background: var(--olive); color: var(--cream);
}
.footer p:first-child { font-family: var(--serif); font-size: 1.6rem; margin-bottom: 6px; }
.footer-small { opacity: .8; font-size: .9rem; margin-top: 10px; font-style: italic; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .cards-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-photo { order: -1; height: 40vh; }
  .hero-photo img { object-position: 55% 30%; }
  .hero-text { padding: 44px 22px; }
}
@media (max-width: 700px) {
  /* First venue photo leads, the other two sit side by side beneath it. */
  .venue-photos-grid { grid-template-columns: 1fr 1fr; }
  .venue-photos-grid img:first-child { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
}
@media (max-width: 640px) {
  .nav { padding: 8px 14px; }
  .nav-links { display: none; }
  .nav-name { font-size: 1.05rem; }
  .cards-3, .cards-4, .choice-cards-3, .choice-cards-4 { grid-template-columns: 1fr 1fr; }
  .choice-cards { grid-template-columns: 1fr; }
  .section { padding: 60px 18px; }
  .rsvp-form { padding: 26px 20px; }
  .countdown { gap: 14px; }
  .lead { font-size: 1.18rem; }
}
@media (max-width: 420px) {
  .cards-3, .cards-4 { grid-template-columns: 1fr; }
}
