@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --cream: #fbf7ef;
  --paper: rgba(255, 252, 245, 0.88);
  --ink: #2d2a24;
  --muted: #756f63;
  --gold: #b6935b;
  --olive: #6c7357;
  --shadow: 0 20px 60px rgba(45, 42, 36, 0.16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(182,147,91,.22), transparent 35%),
    linear-gradient(180deg, #fffaf0, #f2eadc);
}

body.locked { overflow: hidden; }

.screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background:
    linear-gradient(rgba(40,35,28,.2), rgba(40,35,28,.45)),
    url('/assets/photos/hero.jpg') center/cover,
    linear-gradient(135deg, #f7efe1, #dbc7a2);
}

.start-card {
  width: min(92vw, 460px);
  padding: 44px 28px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 28px;
  background: rgba(255, 252, 245, 0.70);
  backdrop-filter: blur(18px);
  text-align: center;
  box-shadow: var(--shadow);
}

.start-card h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(74px, 18vw, 132px);
  line-height: .75;
  margin: 18px 0;
  font-weight: 700;
}

.start-card h1 span { color: var(--gold); }

.kicker {
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .75rem;
  color: var(--gold);
  font-weight: 700;
}

.date, .subtitle { color: var(--muted); }

.primary-btn, .ghost-btn {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.primary-btn {
  margin-top: 20px;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-weight: 700;
  box-shadow: 0 12px 25px rgba(45,42,36,.22);
}

.ghost-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255,255,255,.76);
  color: var(--ink);
  border: 1px solid rgba(182,147,91,.35);
}

.topbar {
  position: fixed;
  z-index: 10;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.topbar > * { pointer-events: auto; }

.monogram {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(182,147,91,.25);
}

.section {
  min-height: 100vh;
  padding: 92px 22px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.section > * {
  max-width: 860px;
}

.hero {
  color: white;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(35,31,25,.25), rgba(35,31,25,.55)),
    url('/assets/photos/hero.jpg') center/cover,
    linear-gradient(135deg, #b6935b, #6c7357);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-shadow: 0 8px 30px rgba(0,0,0,.35);
}

h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(42px, 9vw, 92px);
  line-height: .95;
  margin: 12px 0 18px;
}

.story p, .gifts p {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(22px, 5vw, 34px);
  line-height: 1.25;
  color: var(--muted);
}

.detail-grid {
  width: min(100%, 940px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.detail-grid article, .admin-note, form {
  background: var(--paper);
  border: 1px solid rgba(182,147,91,.22);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.icon { font-size: 2rem; }

.text-link {
  color: var(--olive);
  font-weight: 700;
}

.gallery-grid {
  width: min(100%, 980px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow);
  background: #e7dac5;
}

.timeline {
  width: min(100%, 720px);
  display: grid;
  gap: 12px;
  text-align: left;
}

.timeline div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(182,147,91,.18);
}

form {
  width: min(100%, 680px);
  display: grid;
  gap: 16px;
  text-align: left;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

input, select, textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(117,111,99,.24);
  background: white;
  color: var(--ink);
  font: inherit;
}

textarea { min-height: 92px; resize: vertical; }

.result {
  margin-top: 18px;
  padding: 18px;
  border-radius: 18px;
  background: #eef4e8;
  border: 1px solid rgba(108,115,87,.3);
}

.admin-note {
  margin-top: 22px;
  text-align: left;
  color: var(--muted);
}

.small-note, .tiny {
  color: var(--muted);
  font-size: .9rem;
}

footer {
  padding: 60px 20px 80px;
  text-align: center;
  color: var(--muted);
}

.hidden { display: none; }

/* ── RSVP invite section ─────────────────────────────────────────── */
.rsvp-contact {
  color: var(--muted);
  margin-bottom: 32px;
  line-height: 1.8;
}

.rsvp-members-container {
  width: min(100%, 560px);
  display: grid;
  gap: 12px;
}

.rsvp-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  background: var(--paper);
  border: 1px solid rgba(182,147,91,.22);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.rsvp-name {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
  text-align: left;
}

.rsvp-toggle {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.rsvp-yes,
.rsvp-no {
  padding: 10px 22px;
  border-radius: 999px;
  border: 2px solid;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  transition: background .18s, color .18s;
}

.rsvp-yes           { border-color: #4a7c59; color: #4a7c59; background: transparent; }
.rsvp-yes.active    { background: #4a7c59;   color: white; }
.rsvp-no            { border-color: #8b3a3a; color: #8b3a3a; background: transparent; }
.rsvp-no.active     { background: #8b3a3a;   color: white; }

.rsvp-total {
  margin-top: 8px;
  font-size: 1.05rem;
  color: var(--muted);
  text-align: center;
}

.rsvp-total strong {
  color: var(--ink);
  font-size: 1.2rem;
}

.rsvp-submit-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}

.rsvp-result {
  padding: 14px 20px;
  border-radius: 14px;
  background: #eef4e8;
  border: 1px solid rgba(108,115,87,.3);
  text-align: center;
  width: 100%;
}

.rsvp-result.error {
  background: #f4e8e8;
  border-color: rgba(139,58,58,.3);
}

@media (max-width: 760px) {
  .detail-grid, .gallery-grid {
    grid-template-columns: 1fr;
  }
  .timeline div {
    display: grid;
  }
}
