/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
  --color-bg: #f3f2f2;
  --color-surface: #eae9e9;
  --color-text: #201f1d;
  --color-accent: #b68235;
  --color-accent-700: #7d5411;
  --color-divider: rgba(32, 31, 29, 0.16);
  --color-neutral-100: #f8f4f4;
  --color-neutral-200: #eae7e7;
  --color-neutral-700: #605d5d;

  --font-heading: "Cormorant Garamond", Georgia, serif;
  --font-body: "Lora", Georgia, serif;

  --radius-md: 4px;
  --shadow-md: 0 3px 10px rgba(45, 43, 43, 0.16);
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-neutral-200);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
}
h1, h2, h6 { font-family: var(--font-heading); font-weight: 600; line-height: 1.12; margin: 0; }
p { margin: 0 0 14px; }
a { color: var(--color-accent-700); text-underline-offset: 3px; }
a:hover { color: var(--color-accent); }
img { display: block; max-width: 100%; }
.text-muted { color: rgba(32, 31, 29, 0.55); }
.small { font-size: 13px; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: rgba(182, 130, 53, 0.3); }

h6 {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-700);
  margin-bottom: 9px;
}

.hr {
  height: 1px;
  border: 0;
  margin: 56px 0;
  background: var(--color-divider);
}

/* ==========================================================================
   Layout shell
   ========================================================================== */
.page {
  display: flex;
  justify-content: center;
  padding: 56px 24px;
}
.card {
  width: 100%;
  max-width: 900px;
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding: 76px 96px 64px;
  text-align: center;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent-700);
}
.monogram {
  margin: 34px 0 8px;
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: 0.34em;
  color: var(--color-accent);
}
.name {
  margin: 18px 0 0;
  font-size: 76px;
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.02em;
}
.and {
  font-family: var(--font-heading);
  font-size: 28px;
  font-style: italic;
  color: var(--color-accent-700);
  margin: 6px 0;
}
.date-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 38px;
}
.rule { height: 1px; width: 70px; background: var(--color-divider); }
.date {
  font-family: var(--font-heading);
  font-size: 17px;
  letter-spacing: 0.18em;
  font-feature-settings: 'tnum';
}
.venue-note {
  font-size: 13px;
  margin-top: 10px;
  letter-spacing: 0.06em;
  color: rgba(32, 31, 29, 0.55);
}

/* ==========================================================================
   Photo plates (hero + gallery)
   ========================================================================== */
.plate {
  filter: sepia(0.22) saturate(0.82) contrast(1.05);
  box-sizing: border-box;
  border: 6px solid var(--color-surface);
  outline: 1px solid var(--color-divider);
}
.hero-photo { padding: 0 96px; }
.hero-photo .plate {
  position: relative;
  height: 460px;
  width: 100%;
  object-fit: cover;
  display: block;
}
.placeholder-plate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  background: #fffdf8;
  filter: none;
  gap: 14px;
}
.placeholder-monogram {
  font-family: var(--font-heading);
  font-size: clamp(48px, 9vw, 120px);
  color: var(--color-accent-700);
  letter-spacing: 0.02em;
}
.placeholder-rule {
  height: 1px;
  width: 180px;
  background: var(--color-divider);
}
.placeholder-caption {
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: 0.3em;
  color: var(--color-neutral-700);
}
.placeholder-caption-small {
  font-family: var(--font-heading);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-neutral-700);
}

/* ==========================================================================
   Content
   ========================================================================== */
.content { padding: 64px 96px 0; }

.story { max-width: 560px; margin: 0 auto; text-align: center; }
.story p { text-align: justify; hyphens: auto; font-size: 15px; line-height: 1.85; }
.story em { font-style: italic; }

.section-heading { text-align: center; margin-bottom: 34px; }
.section-heading h2 { font-weight: 400; font-size: 38px; }

.events { max-width: 620px; margin: 0 auto; }
.event {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 24px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--color-divider);
}
.event-last { border-bottom: none; }
.event-date {
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-700);
  font-feature-settings: 'tnum';
}
.event-name { font-family: var(--font-heading); font-size: 25px; line-height: 1.2; }

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
}
.placeholder-gallery { height: 250px; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin-top: 56px;
}
.two-col p { font-size: 14px; text-align: justify; hyphens: auto; }

.map-block {
  margin-top: 40px;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.map-embed {
  display: block;
  width: 100%;
  height: 280px;
  border: 0;
  filter: sepia(0.15) saturate(0.85);
}
.map-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--color-divider);
}

/* ==========================================================================
   Buttons & form
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  color: var(--color-text);
  background: transparent;
  border: 1px solid transparent;
  padding: 9.2px 16.6px;
  border-radius: var(--radius-md);
}
.btn-primary { color: var(--color-accent); border-color: var(--color-accent); }
.btn-primary:hover { background: rgba(182, 130, 53, 0.12); }
.btn-primary:active { background: rgba(182, 130, 53, 0.22); }
.btn-secondary { border-color: var(--color-divider); color: var(--color-text); }
.btn-secondary:hover { background: rgba(32, 31, 29, 0.07); }
.btn-block { width: 100%; margin-top: 9.2px; }

.field { margin-bottom: 0; }
.field > label {
  display: block;
  font-size: 12px;
  margin-bottom: 5px;
  color: rgba(32, 31, 29, 0.7);
}
.input {
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  font: inherit;
  font-size: 14px;
  color: var(--color-text);
  caret-color: var(--color-accent);
  background: transparent;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
}
.input:hover { border-color: rgba(32, 31, 29, 0.45); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.input { min-height: 90px; resize: vertical; font-family: inherit; }

.seg {
  display: inline-flex;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
}
.seg-opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 6px;
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
}
.seg-opt input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.seg-opt + .seg-opt { border-left: 1px solid var(--color-divider); }
.seg-opt:has(input:checked) { color: var(--color-accent); box-shadow: inset 0 0 0 1px var(--color-accent); }
.seg-opt:not(:has(input:checked)):hover { background: rgba(32, 31, 29, 0.07); }

.nights { display: flex; gap: 10px; flex-wrap: wrap; }
.night-btn { padding: 7px 18px; }

/* ==========================================================================
   RSVP
   ========================================================================== */
.rsvp {
  margin-top: 64px;
  padding: 64px 96px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
}
.rsvp-inner { max-width: 560px; margin: 0 auto; text-align: center; }
.rsvp-title { font-weight: 400; font-size: 38px; margin-bottom: 6px; }
.rsvp-form {
  max-width: 560px;
  margin: 26px auto 0;
  display: grid;
  gap: 18px;
}
.rsvp-form[hidden], .rsvp-thanks[hidden] { display: none; }
.rsvp-thanks {
  max-width: 560px;
  margin: 26px auto 0;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
}
.rsvp-thanks-title { font-family: var(--font-heading); font-weight: 600; font-size: 24px; }

.rsvp-error {
  font-size: 13px;
  color: #a13a2f;
  border: 1px solid rgba(161, 58, 47, 0.35);
  background: rgba(161, 58, 47, 0.06);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  padding: 34px 96px;
  text-align: center;
  border-top: 1px solid var(--color-divider);
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 720px) {
  .page { padding: 0; }
  .card { border: none; box-shadow: none; }
  .hero { padding: 56px 24px 40px; }
  .hero-photo { padding: 0 24px; }
  .content { padding: 48px 24px 0; }
  .rsvp { padding: 48px 24px; }
  .footer { padding: 28px 24px; }
  .name { font-size: 44px; }
  .and { font-size: 20px; }
  .date { font-size: 13px; letter-spacing: 0.1em; }
  .rule { width: 36px; }
  .section-heading h2, .rsvp-title { font-size: 28px; }
  .event { grid-template-columns: 100px 1fr; gap: 14px; }
  .event-name { font-size: 21px; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery > :last-child { grid-column: 1 / -1; }
  .two-col { grid-template-columns: 1fr; gap: 32px; }
  .hero-photo .plate { height: 320px; }
  .placeholder-monogram { font-size: 64px; }
}

@media (max-width: 420px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery > :last-child { grid-column: auto; }
}
