 :root {
  --ivory: #fffaf1;
  --warm-ivory: #f7efe1;
  --champagne: #d7c2a2;
  --deep-green: #23372b;
  --sage: #7b8b73;
  --burgundy: #7d2e3a;
  --ink: #2b2926;
  --muted: #6f665c;
  --white: #ffffff;
  --shadow: 0 20px 50px rgba(35, 55, 43, 0.16);
  --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, var(--ivory), #fbf6ed 55%, var(--warm-ivory));
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .25;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(215, 194, 162, .25), transparent 22rem),
    radial-gradient(circle at 88% 10%, rgba(123, 139, 115, .18), transparent 20rem),
    radial-gradient(circle at 50% 100%, rgba(125, 46, 58, .08), transparent 24rem);
  z-index: -1;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .9rem clamp(1rem, 4vw, 4rem);
  background: rgba(255, 250, 241, .86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(215, 194, 162, .45);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  text-decoration: none;
  font-weight: 700;
  color: var(--deep-green);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--champagne);
  border-radius: 50%;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(35,55,43,.08);
}
.brand-mark span { color: var(--burgundy); font-size: .95rem; margin: 0 .05rem; }
.brand-text { letter-spacing: .04em; text-transform: uppercase; font-size: .82rem; }
.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(.75rem, 2vw, 1.5rem);
  font-size: .92rem;
  font-weight: 600;
}
.main-nav a {
  text-decoration: none;
  color: var(--deep-green);
  padding: .45rem .15rem;
  border-bottom: 1px solid transparent;
}
.main-nav a:hover { border-bottom-color: var(--champagne); }
.nav-registry {
  border: 1px solid var(--champagne) !important;
  padding: .55rem .95rem !important;
  border-radius: 999px;
  background: rgba(255,255,255,.65);
}
.nav-toggle {
  display: none;
  border: 0;
  background: var(--deep-green);
  color: white;
  border-radius: 999px;
  width: 42px;
  height: 42px;
  font-size: 1.2rem;
}

.hero {
  position: relative;
  min-height: 78vh;
  display: grid;
  align-items: center;
  padding: clamp(2rem, 6vw, 6rem);
  isolation: isolate;
}
.hero-media {
  position: absolute;
  inset: clamp(1rem, 3vw, 2rem);
  background: linear-gradient(90deg, rgba(35,55,43,.78), rgba(35,55,43,.38), rgba(35,55,43,.08)), url("assets/images/photo-09.jpg") center / cover no-repeat;
  border-radius: calc(var(--radius) + 16px);
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: -1;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 1.2rem;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: var(--radius);
}
.hero-panel {
  width: min(720px, 100%);
  color: white;
  padding: clamp(2rem, 6vw, 4rem);
}
.eyebrow, .script-small {
  margin: 0 0 .55rem;
  color: var(--burgundy);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.hero .eyebrow { color: #f3dec3; }
h1, h2, h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  line-height: .98;
  font-weight: 700;
  color: var(--deep-green);
  margin: 0;
}
.hero h1 {
  color: white;
  font-size: clamp(4rem, 10vw, 9.5rem);
  letter-spacing: -.045em;
  max-width: 780px;
}
.hero-date {
  margin: 1rem 0 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}
.hero-time { margin: .2rem 0 2rem; font-size: 1.1rem; }
.hero-actions, .button-stack {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  align-items: center;
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: .78rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(35,55,43,.14); }
.button.primary { background: var(--burgundy); color: white; }
.button.secondary { background: rgba(255,255,255,.82); color: var(--deep-green); border-color: var(--champagne); }

.section-narrow {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7rem) clamp(1.25rem, 4vw, 2rem);
  text-align: center;
}
.section-narrow h2, .section-heading h2, .split-text h2, .directions-panel h2, .form-card h2 {
  font-size: clamp(2.4rem, 6vw, 4.25rem);
  margin-bottom: 1rem;
}
.section-narrow p { color: var(--muted); font-size: 1.08rem; }
.details-band {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid rgba(215,194,162,.6);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--champagne);
}
.details-band div {
  background: rgba(255,255,255,.74);
  padding: clamp(1.3rem, 3vw, 2.1rem);
  text-align: center;
}
.details-band span {
  display: block;
  color: var(--burgundy);
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: .75rem;
  margin-bottom: .55rem;
}
.details-band strong {
  color: var(--deep-green);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.15;
}

.split-section {
  width: min(1120px, calc(100% - 2rem));
  margin: clamp(4rem, 7vw, 7rem) auto;
  display: grid;
  grid-template-columns: 1fr .88fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.split-text p { color: var(--muted); }
.text-link {
  color: var(--burgundy);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.framed-photo {
  padding: .75rem;
  border: 1px solid rgba(215,194,162,.7);
  border-radius: var(--radius);
  background: rgba(255,255,255,.62);
  box-shadow: var(--shadow);
}
.framed-photo img { border-radius: calc(var(--radius) - 10px); aspect-ratio: 4 / 5; object-fit: cover; }
.registry-callout {
  background: rgba(255,255,255,.54);
  border: 1px solid rgba(215,194,162,.45);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: clamp(4rem, 8vw, 7rem);
}

.gallery-section {
  padding: clamp(3rem, 6vw, 6rem) clamp(1rem, 4vw, 4rem) clamp(5rem, 8vw, 8rem);
  background: rgba(35, 55, 43, .06);
  border-top: 1px solid rgba(215,194,162,.45);
}
.section-heading {
  max-width: 780px;
  margin: 0 auto 2.5rem;
  text-align: center;
}
.section-heading p { color: var(--muted); }
.memory-gallery {
  columns: 3 280px;
  column-gap: 1.15rem;
  max-width: 1220px;
  margin: 0 auto;
}
.memory-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 1.15rem;
  padding: .65rem;
  background: rgba(255,255,255,.76);
  border: 1px solid rgba(215,194,162,.5);
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(35,55,43,.1);
  break-inside: avoid;
}
.memory-card img {
  width: 100%;
  border-radius: 16px;
}
.memory-card figcaption {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  padding: .9rem .35rem .25rem;
  color: var(--muted);
  font-size: .92rem;
}
.memory-card figcaption span {
  color: var(--burgundy);
  font-weight: 800;
  letter-spacing: .08em;
}

.page-hero {
  width: min(1120px, calc(100% - 2rem));
  margin: clamp(2rem, 5vw, 4rem) auto;
  text-align: center;
  padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 4vw, 3rem);
  border-radius: calc(var(--radius) + 10px);
  background: linear-gradient(135deg, rgba(255,255,255,.82), rgba(247,239,225,.9));
  border: 1px solid rgba(215,194,162,.6);
  box-shadow: var(--shadow);
}
.page-hero h1 { font-size: clamp(3.2rem, 9vw, 7.5rem); }
.page-hero p:not(.eyebrow) { color: var(--muted); font-size: 1.1rem; max-width: 720px; margin: 1rem auto 0; }
.small-hero { margin-bottom: 2rem; }

.map-layout {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto clamp(5rem, 8vw, 8rem);
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 1.5rem;
  align-items: stretch;
}
.map-card, .directions-panel, .form-card {
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(215,194,162,.55);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.map-card { overflow: hidden; min-height: 520px; }
.map-card iframe { width: 100%; height: 100%; min-height: 520px; border: 0; display: block; }
.directions-panel { padding: clamp(1.5rem, 4vw, 2.5rem); }
.directions-panel p { color: var(--muted); }
.directions-panel .button { width: 100%; }
.button-stack { flex-direction: column; align-items: stretch; }
.note { font-size: .95rem; border-top: 1px solid rgba(215,194,162,.55); padding-top: 1rem; margin-top: 1.5rem; }

.form-shell {
  width: min(900px, calc(100% - 2rem));
  margin: 0 auto clamp(5rem, 8vw, 8rem);
}
.rsvp-form { display: grid; gap: 1.25rem; }
.form-card { padding: clamp(1.4rem, 4vw, 2.25rem); }
.form-card h2 { font-size: clamp(2rem, 5vw, 3.2rem); }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
label {
  display: grid;
  gap: .35rem;
  color: var(--deep-green);
  font-weight: 800;
  font-size: .92rem;
}
input, select, textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(35,55,43,.22);
  border-radius: 14px;
  padding: .75rem .9rem;
  background: rgba(255,255,255,.9);
  color: var(--ink);
  font: inherit;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(125,46,58,.18);
  border-color: var(--burgundy);
}
.form-help, .fine-print { color: var(--muted); margin-top: -.4rem; }
.guest-list { display: grid; gap: 1rem; margin: 1rem 0; }
.guest-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 220px auto;
  gap: .85rem;
  align-items: end;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(247,239,225,.72);
  border: 1px dashed rgba(123,139,115,.6);
}
.remove-guest {
  min-height: 46px;
  border: 1px solid rgba(125,46,58,.24);
  color: var(--burgundy);
  background: white;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  padding: .6rem .9rem;
}
.add-guest { width: fit-content; }
.submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: .25rem;
}
.thank-you-hero { min-height: 55vh; display: grid; place-content: center; }
.centered-actions { justify-content: center; }

.site-footer {
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(255,255,255,.78);
  background: var(--deep-green);
}
.site-footer .script-small { color: var(--champagne); margin-bottom: .4rem; }
.site-footer p { margin: .25rem 0; }
.site-footer a { color: white; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-grid; place-items: center; }
  .main-nav {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: calc(100% + .5rem);
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: rgba(255,250,241,.98);
    border: 1px solid rgba(215,194,162,.65);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: .7rem .8rem; }
  .hero { min-height: 72vh; padding: 1rem; align-items: end; }
  .hero-media { inset: .75rem; background-position: center; }
  .hero-panel { padding: 2rem 1.25rem; }
  .hero h1 { font-size: clamp(3.5rem, 18vw, 6rem); }
  .details-band { grid-template-columns: 1fr; }
  .split-section, .map-layout { grid-template-columns: 1fr; }
  .map-card, .map-card iframe { min-height: 390px; }
  .form-grid, .guest-card { grid-template-columns: 1fr; }
  .add-guest { width: 100%; }
  .submit-row .button { width: 100%; }
}

@media (max-width: 520px) {
  .brand-text { display: none; }
  .hero-actions .button, .button-stack .button { width: 100%; }
  .memory-card figcaption { font-size: .88rem; }
}
