:root {
  color-scheme: light;
  --bg: #f8f5ee;
  --surface: #ffffff;
  --ink: #2e2419;    /* dark brown */
  --muted: #7a6b5a;
  --accent: #5c6b3c; /* olive green */
  --accent-soft: #eef0e4;
  --brown: #7b5a3c;
  --line: #e3dccd;
  --error: #9a4a2c;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", system-ui, sans-serif;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0 0 .6em; }
h2 { font-size: clamp(2rem, 5vw, 2.8rem); text-align: center; }
h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  margin: .5em auto 0;
  background: var(--brown);
}

.muted { color: var(--muted); }

/* Language switch */
.lang {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10;
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgb(255 255 255 / .85);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgb(0 0 0 / .08);
}
.lang button {
  border: 0;
  background: none;
  font: 500 13px var(--sans);
  letter-spacing: .08em;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--accent); color: #fff; }

/* Hero */
.hero {
  min-height: 100svh;
  display: grid;
  place-items: start center; /* keep text in the sky, couple visible below */
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 14px rgb(40 15 10 / .35);
  padding: clamp(88px, 14svh, 150px) 16px 80px;
  background:
    linear-gradient(rgb(80 35 20 / .5), rgb(80 35 20 / .15) 60%, rgb(30 15 15 / .35)),
    url("images/3N0A6765.JPG") center 72% / cover no-repeat,
    linear-gradient(135deg, #3f4a28, #5c6b3c 55%, #7b5a3c);
}
.hero h1 { font-size: clamp(3.4rem, 13vw, 7rem); margin: .1em 0 .2em; }
.amp { font-style: italic; font-weight: 500; color: #f1d9b0; }
.eyebrow {
  margin: 0;
  font-size: .85rem;
  letter-spacing: .3em;
  text-transform: uppercase;
}
.hero__date { font-family: var(--serif); font-size: clamp(1.3rem, 4vw, 1.7rem); margin: 0 0 1.6em; }

.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 4vw, 32px);
  margin-bottom: 2.2em;
}
.countdown div { min-width: 56px; }
.countdown span { display: block; font: 500 clamp(1.8rem, 7vw, 2.6rem)/1 var(--serif); }
.countdown small { font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; opacity: .85; }

/* Buttons */
.btn {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  padding: 14px 32px;
  font: 500 15px var(--sans);
  letter-spacing: .08em;
  text-decoration: none;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  transition: transform .15s, opacity .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn--light { background: #fff; color: var(--accent); }

/* Sections */
main section { padding: clamp(64px, 10vw, 112px) 16px; }
.intro p { max-width: 620px; margin: 0 auto; text-align: center; font-size: 1.1rem; }

.details { background: var(--surface); }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  max-width: 820px;
  margin: 0 auto;
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.card dt { font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--brown); }
.card dd { margin: .4em 0 0; font: 500 1.35rem/1.3 var(--serif); }
.card dd a { color: var(--brown); }

/* Gallery */
/* Masonry: every photo keeps its own aspect ratio */
.grid {
  max-width: 1080px;
  margin: 0 auto;
  columns: 3;
  column-gap: 12px;
}
.grid figure {
  margin: 0 0 12px;
  break-inside: avoid;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
}
.grid img { display: block; width: 100%; height: auto; }
/* Shown if a photo fails to load */
.grid figure.missing { aspect-ratio: 3 / 4; background: linear-gradient(135deg, #ebe6d6, #ddd5bf); }

@media (max-width: 640px) {
  .grid { columns: 2; column-gap: 8px; }
  .grid figure { margin-bottom: 8px; }
}

/* RSVP */
.rsvp { background: var(--surface); }
.rsvp > p { text-align: center; margin: -.4em 0 2em; }
form { max-width: 520px; margin: 0 auto; display: grid; gap: 20px; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; }
.field > span, legend { font-weight: 500; font-size: .95rem; padding: 0; }
input:not([type]), input[type="text"], textarea {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.choice { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.choice label {
  flex: 1 1 180px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.choice label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
input[type="radio"], input[type="checkbox"] { accent-color: var(--accent); width: 18px; height: 18px; }
.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.if-attending { display: grid; gap: 20px; }
.if-attending[hidden], .if-plus-one[hidden] { display: none; }
.hp { position: absolute; left: -9999px; }
.status { margin: 0; min-height: 1.5em; text-align: center; }
.status.ok { color: var(--accent); }
.status.err { color: var(--error); }

footer { text-align: center; padding: 48px 16px 64px; font-family: var(--serif); font-size: 1.3rem; }
footer p { margin: 0; }
footer .muted { font: .85rem var(--sans); margin-top: 6px; }
