:root {
  --sand: #f7f1e8;
  --sand-deep: #ede3d3;
  --ink: #2b2a27;
  --ink-soft: #5d5a53;
  --lagoon: #1f7a77;
  --lagoon-deep: #145855;
  --coral: #d9573f;
  --gold: #c39a5b;
  --white: #fffdf9;

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Jost', system-ui, sans-serif;

  --max: 1120px;
  --radius: 4px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.6em;
}
h2 { font-size: clamp(2rem, 4vw, 2.8rem); }

p { margin: 0 0 1em; }
strong { font-weight: 500; }

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--lagoon);
  font-weight: 500;
  margin-bottom: 0.9em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.95em 2.2em;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.25s, color 0.25s, transform 0.25s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--lagoon); color: var(--white); }
.btn-primary:hover { background: var(--lagoon-deep); }
.btn-light { border: 1px solid rgba(255,255,255,0.8); color: var(--white); }
.btn-light:hover { background: var(--white); color: var(--ink); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background 0.3s, box-shadow 0.3s;
}
.site-header.scrolled {
  background: rgba(247, 241, 232, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.08em;
}
.nav-brand span { font-style: italic; }
.scrolled .nav-brand span { color: var(--coral); }
.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
  align-items: center;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 400;
}
.nav-links a:hover { color: var(--gold); }
.nav-cta {
  border: 1px solid currentColor;
  padding: 0.6em 1.2em;
  border-radius: var(--radius);
}
.scrolled .nav-brand, .scrolled .nav-links a { color: var(--ink); }
.scrolled .nav-cta { background: var(--lagoon); border-color: var(--lagoon); color: var(--white) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 32px;
  height: 32px;
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 4px; right: 4px;
  height: 1.5px;
  background: var(--white);
  transition: transform 0.25s, top 0.25s;
}
.nav-toggle span:first-child { top: 12px; }
.nav-toggle span:last-child { top: 20px; }
.scrolled .nav-toggle span { background: var(--ink); }
.nav-toggle[aria-expanded="true"] span:first-child { top: 16px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 16px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: grid;
  place-items: start center;
  text-align: center;
  color: var(--white);
  /* Text sits in the sky; the couple stays visible in the lower third */
  padding: clamp(88px, 11vh, 120px) 24px 80px;
  background:
    linear-gradient(180deg, rgba(20,30,28,0.6) 0%, rgba(20,30,28,0.4) 40%, rgba(20,30,28,0.05) 68%, rgba(20,30,28,0.3) 100%),
    var(--hero-img) center 80% / cover no-repeat;
}
.hero .countdown { margin: 1.4em 0 1.8em; }
.hero .eyebrow { color: rgba(255,255,255,0.85); }
.hero-names {
  font-size: clamp(3.4rem, 11vw, 7.5rem);
  font-weight: 400;
  margin: 0.1em 0 0.15em;
  text-shadow: 0 2px 30px rgba(0,0,0,0.25);
}
.hero-names .amp { font-style: italic; color: #f3dcb4; font-size: 0.75em; }
.hero-date {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.2em;
}
.hero-place {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.9;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 5vw, 48px);
  margin: 2.2em 0 2.6em;
}
.countdown div { display: flex; flex-direction: column; align-items: center; min-width: 64px; }
.countdown span {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  line-height: 1;
}
.countdown small {
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-top: 0.6em;
  opacity: 0.85;
}

/* ---------- Sections ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(64px, 10vw, 120px) 24px;
}
.intro { text-align: center; max-width: 720px; }
.intro.section { padding-bottom: 0; }
.lead { font-size: 1.15rem; color: var(--ink-soft); }

.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.split.reverse .split-media { order: 2; }
.split-media { margin: 0; }
.split-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -30px rgba(31, 60, 58, 0.45);
}
.split-text p { color: var(--ink-soft); }
.split-text strong { color: var(--ink); }

.callout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--white);
  border-left: 3px solid var(--coral);
  padding: 20px 22px;
  margin-top: 1.6em;
  border-radius: var(--radius);
}
.callout p { margin: 0; }
.callout-icon { color: var(--coral); flex-shrink: 0; padding-top: 3px; }

.perks {
  list-style: none;
  padding: 0;
  margin: 1.6em 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.perks li {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  padding: 0.5em 1em;
  border: 1px solid var(--sand-deep);
  background: var(--white);
  border-radius: 999px;
  color: var(--lagoon-deep);
}

/* ---------- Booking ---------- */
.booking {
  padding: clamp(80px, 12vw, 140px) 24px;
  background:
    linear-gradient(rgba(20,60,58,0.55), rgba(20,60,58,0.55)),
    var(--booking-img) center / cover fixed no-repeat;
}
.booking-card {
  max-width: 680px;
  margin: 0 auto;
  background: var(--white);
  padding: clamp(36px, 6vw, 64px);
  text-align: center;
  border-radius: var(--radius);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,0.4);
}
.booking-card p { color: var(--ink-soft); }
.booking-card .btn { margin-top: 0.8em; }

.code-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 1.8em 0;
  padding: 18px 20px;
  border: 1px dashed var(--gold);
  background: var(--sand);
  border-radius: var(--radius);
}
.code-label {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.code-value {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.code-copy {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: none;
  border: 1px solid var(--lagoon);
  color: var(--lagoon);
  padding: 0.45em 1em;
  border-radius: var(--radius);
  cursor: pointer;
}
.code-copy:hover { background: var(--lagoon); color: var(--white); }

.fine-print {
  margin-top: 1.4em;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

/* ---------- Gallery ---------- */
.gallery {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 260px;
  gap: 12px;
}
.g-item {
  padding: 0;
  border: 0;
  cursor: zoom-in;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--sand-deep);
}
.g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.g-item:hover img { transform: scale(1.04); }
.g-wide { grid-column: span 2; }

.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 92vw;
  max-height: 92vh;
}
.lightbox::backdrop { background: rgba(15, 20, 22, 0.88); }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: var(--radius); }
.lightbox-close {
  position: fixed;
  top: 16px;
  right: 22px;
  background: none;
  border: 0;
  color: var(--white);
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Closing / Footer ---------- */
.closing { text-align: center; padding-top: 0; }
.script { font-style: italic; font-weight: 400; color: var(--lagoon-deep); }
.closing-sig { font-family: var(--serif); font-size: 1.3rem; color: var(--ink-soft); }

.footer {
  background: var(--lagoon-deep);
  color: rgba(255,255,255,0.8);
  text-align: center;
  padding: 36px 24px;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
}
.footer p { margin-bottom: 0.4em; }
.footer a { color: var(--gold); text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--sand);
    padding: 8px 24px 24px;
    box-shadow: 0 12px 24px -12px rgba(0,0,0,0.2);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; border-bottom: 1px solid var(--sand-deep); }
  .nav-links li:last-child { border: 0; padding-top: 16px; }
  .nav-links a { color: var(--ink); display: block; padding: 14px 0; }
  .nav-cta { text-align: center; background: var(--lagoon); color: var(--white) !important; border-color: var(--lagoon); }

  .split { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .split-media img { aspect-ratio: 4 / 3; }

  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 180px; }
  .booking { background-attachment: scroll; }
}

@media (max-width: 520px) {
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .g-wide { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}


/* ---------- RSVP ---------- */
.rsvp { padding-top: clamp(64px, 10vw, 120px); }
.rsvp .intro { margin: 0 auto; }
.rsvp-card {
  max-width: 680px;
  margin: 40px auto 0;
  background: var(--white);
  padding: clamp(24px, 5vw, 48px);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -30px rgba(31, 60, 58, 0.3);
}
.rsvp-card iframe { display: block; border: 0; width: 100%; }
.rsvp-card .fine-print { text-align: center; color: var(--ink-soft); }
.rsvp-card .fine-print a { color: var(--lagoon); }

/* ---------- Password gate (dist build only) ---------- */
/* The penguins sit in the lower-left middle of the art, so the card stays
   compact near the top and the image is anchored to the bottom. */
.gate {
  min-height: 100svh;
  display: grid;
  justify-items: center;
  align-items: start;
  padding: clamp(16px, 4vh, 40px) 16px;
  background: #7cc4ef url('login/penguins.jpg') 32% bottom / cover no-repeat;
}
.gate-card {
  width: 100%;
  max-width: 400px;
  background: rgba(255, 253, 249, 0.9);
  backdrop-filter: blur(6px);
  padding: 24px clamp(20px, 5vw, 36px) 26px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 20px 50px -20px rgba(20, 60, 90, 0.45);
}
.gate-names { font-size: clamp(2.1rem, 8vw, 2.8rem); margin-bottom: 0; }
.gate-names .amp { font-style: italic; color: var(--coral); font-size: 0.75em; }
.gate-date { font-family: var(--serif); font-size: 1.2rem; color: var(--ink-soft); margin-bottom: 0.9em; }
.gate label { display: block; font-size: 0.85rem; line-height: 1.5; color: var(--ink-soft); margin-bottom: 0.7em; }
.gate input {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  text-align: center;
  letter-spacing: 0.1em;
  padding: 0.7em 1em;
  border: 1px solid var(--sand-deep);
  background: var(--white);
  border-radius: 8px;
  margin-bottom: 0.8em;
}
.gate input:focus { outline: 2px solid var(--lagoon); outline-offset: 1px; }
.gate .btn { width: 100%; border: 0; border-radius: 8px; cursor: pointer; }
.gate .btn:disabled { opacity: 0.7; cursor: progress; }
.gate-error { color: var(--coral); font-size: 0.9rem; margin: 0.8em 0 0; }
