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

/* ── THEMES ── */
:root,
[data-theme="classic"] {
  --cream: #f9f6f1;
  --sand: #e8e0d4;
  --stone: #c4b8a8;
  --warm-dark: #2c2825;
  --accent: #8a7968;
  --light-accent: #d4c8b8;
}

[data-theme="garden"] {
  --cream: #f4f7f2;
  --sand: #d8e8d0;
  --stone: #9aba90;
  --warm-dark: #263322;
  --accent: #5e8f52;
  --light-accent: #bdd9b5;
}

[data-theme="midnight"] {
  --cream: #1c2133;
  --sand: #2a3150;
  --stone: #7a8faa;
  --warm-dark: #eeeaf4;
  --accent: #c8a84a;
  --light-accent: #5a4a20;
}

[data-theme="coastal"] {
  --cream: #f0f6fa;
  --sand: #cce0ef;
  --stone: #80b4cc;
  --warm-dark: #142a38;
  --accent: #3a7a9e;
  --light-accent: #a8cfe0;
}

[data-theme="blush"] {
  --cream: #fdf4f4;
  --sand: #f0d8d8;
  --stone: #d09898;
  --warm-dark: #3a1c1c;
  --accent: #b05868;
  --light-accent: #e8c0c8;
}

/* ── THEME SWITCHER ── */
#theme-switcher {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}
#theme-toggle-btn {
  background: var(--warm-dark);
  color: var(--cream);
  border: none;
  padding: 0.5rem 1rem;
  font-family: 'Jost', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  opacity: 0.85;
  transition: opacity 0.2s;
}
#theme-toggle-btn:hover { opacity: 1; }
#theme-options {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-end;
}
#theme-options.open { display: flex; }
.theme-btn {
  border: none;
  padding: 0.4rem 0.85rem;
  font-family: 'Jost', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: opacity 0.2s;
  opacity: 0.85;
}
.theme-btn:hover { opacity: 1; }
.theme-btn[data-theme="classic"]  { background: #2c2825; color: #f9f6f1; }
.theme-btn[data-theme="garden"]   { background: #263322; color: #f4f7f2; }
.theme-btn[data-theme="midnight"] { background: #1c2133; color: #c8a84a; }
.theme-btn[data-theme="coastal"]  { background: #142a38; color: #f0f6fa; }
.theme-btn[data-theme="blush"]    { background: #b05868; color: #fdf4f4; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Jost', sans-serif;
  background: var(--cream);
  color: var(--warm-dark);
  font-weight: 300;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: center; gap: 3rem;
  padding: 1.4rem 2rem;
  background: rgba(249,246,241,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--sand);
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  text-transform: uppercase;
}
nav a { text-decoration: none; color: var(--accent); transition: color 0.2s; }
nav a:hover { color: var(--warm-dark); }
nav a.active { color: var(--warm-dark); border-bottom: 1px solid var(--stone); padding-bottom: 1px; }

/* ── SECTIONS COMMON ── */
section {
  padding: 7rem 2rem;
  max-width: 900px; margin: 0 auto;
}
.section-label {
  font-size: 0.65rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--stone);
  margin-bottom: 1rem;
  display: block;
}
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 2.5rem;
}
.section-title em { font-style: italic; color: var(--accent); }
.divider-line {
  width: 50px; height: 1px;
  background: var(--stone); margin-bottom: 2.5rem;
}

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}
#hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(196,184,168,0.22) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 20% 20%, rgba(212,200,184,0.15) 0%, transparent 60%);
}
.hero-eyebrow {
  font-size: 0.68rem; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 2rem;
  opacity: 0; animation: fadeUp 1s 0.2s forwards;
}
.hero-names {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(4rem, 12vw, 9rem);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -0.01em;
  opacity: 0; animation: fadeUp 1s 0.4s forwards;
}
.hero-names em { font-style: italic; color: var(--accent); }
.hero-ampersand {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 8vw, 6rem);
  font-style: italic;
  font-weight: 300;
  color: var(--stone);
  display: block;
  margin: 0.2rem 0;
}
.hero-date {
  margin-top: 2.5rem;
  font-size: 0.8rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent);
  opacity: 0; animation: fadeUp 1s 0.6s forwards;
}
.hero-divider {
  width: 60px; height: 1px;
  background: var(--stone);
  margin: 2rem auto;
  opacity: 0; animation: fadeUp 1s 0.7s forwards;
}
.hero-location {
  font-size: 0.75rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--accent);
  opacity: 0; animation: fadeUp 1s 0.8s forwards;
}
.scroll-hint {
  position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--stone);
  animation: fadeIn 1s 1.5s both;
}
.scroll-hint::after {
  content: ''; width: 1px; height: 40px;
  background: var(--stone);
  animation: lineGrow 1.5s 2s infinite;
}

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  padding: 10rem 2rem 4rem;
  text-align: center;
  border-bottom: 1px solid var(--sand);
  max-width: 100%;
}
.page-hero-inner { max-width: 900px; margin: 0 auto; }
.page-hero .section-label { justify-content: center; display: block; text-align: center; }
.page-hero .section-title { margin-bottom: 0; }
.page-hero .divider-line { margin: 1.5rem auto 0; }

/* ── OUR STORY ── */
#story { border-top: 1px solid var(--sand); }
.story-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem;
  align-items: start;
}
.story-text p {
  font-size: 1rem; line-height: 1.85;
  color: #5a524a; margin-bottom: 1.2rem;
}
.story-timeline { padding-top: 0.5rem; }
.timeline-item {
  display: flex; gap: 1.5rem;
  padding-bottom: 2rem;
  position: relative;
}
.timeline-item:not(:last-child)::after {
  content: '';
  position: absolute; left: 2.25rem; top: 2rem; bottom: 0;
  width: 1px; background: var(--sand);
}
.timeline-year {
  min-width: 4.5rem;
  font-size: 0.65rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--stone);
  padding-top: 0.3rem;
}
.timeline-content h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem; font-weight: 400;
  margin-bottom: 0.3rem;
}
.timeline-content p { font-size: 0.85rem; color: #7a7068; line-height: 1.6; }

/* ── EVENT DETAILS ── */
#details {
  background: var(--warm-dark);
  color: var(--cream);
  max-width: 100%;
  padding: 7rem 2rem;
}
#details .inner { max-width: 900px; margin: 0 auto; }
#details .section-title em { color: var(--stone); }
#details .divider-line { background: var(--accent); }
.events-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2px;
  margin-top: 1rem;
}
.event-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 2.5rem;
  transition: background 0.3s;
}
.event-card:hover { background: rgba(255,255,255,0.07); }
.event-card .event-type {
  font-size: 0.62rem; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--stone);
  margin-bottom: 1rem;
}
.event-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem; font-weight: 300;
  margin-bottom: 1.5rem;
}
.event-card .detail-row {
  display: flex; gap: 0.75rem;
  font-size: 0.8rem; color: rgba(249,246,241,0.6);
  margin-bottom: 0.6rem; line-height: 1.5;
}
.event-card .detail-icon { color: var(--stone); flex-shrink: 0; }
.add-cal {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.65rem; letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--stone);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  transition: color 0.2s;
}
.add-cal:hover { color: var(--cream); }

/* ── RSVP ── */
#rsvp { border-top: 1px solid var(--sand); }
.rsvp-intro {
  font-size: 1rem; line-height: 1.8; color: #5a524a;
  max-width: 520px; margin-bottom: 3rem;
}
.rsvp-form { max-width: 560px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.field {
  margin-bottom: 1.5rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.field label {
  font-size: 0.65rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent);
}
.field input, .field select, .field textarea {
  background: #e0ddd9;
  border: none; border-bottom: 1px solid var(--sand);
  padding: 0.6rem 0.5rem;
  font-family: 'Jost', sans-serif;
  font-size: 0.9rem; font-weight: 300;
  color: var(--warm-dark);
  outline: none; transition: border-color 0.2s, background 0.2s;
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
}
.field select { cursor: pointer; -webkit-appearance: none; }
.field textarea { resize: none; height: 80px; }
.radio-group { display: flex; gap: 2rem; margin-top: 0.3rem; }
.radio-label {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.85rem; cursor: pointer; color: #5a524a;
}
.radio-label input { accent-color: var(--accent); }
.btn-submit {
  margin-top: 1rem;
  background: var(--warm-dark); color: var(--cream);
  border: none; padding: 1rem 3rem;
  font-family: 'Jost', sans-serif;
  font-size: 0.7rem; letter-spacing: 0.2em;
  text-transform: uppercase; cursor: pointer;
  transition: background 0.3s;
}
.btn-submit:hover { background: var(--accent); }
.form-success {
  display: none;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem; font-style: italic;
  color: var(--accent); margin-top: 1rem;
}

/* ── GALLERY ── */
#gallery { border-top: 1px solid var(--sand); }
.gallery-intro { color: #5a524a; font-size: 0.9rem; line-height: 1.8; max-width: 480px; margin-bottom: 3rem; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 220px);
  gap: 6px;
}
.gallery-slot {
  background: var(--sand);
  overflow: hidden; position: relative;
  cursor: pointer;
}
.gallery-slot:first-child { grid-row: span 2; }
.gallery-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.75rem; color: var(--stone);
}
.gallery-placeholder svg { opacity: 0.5; }
.gallery-placeholder span {
  font-size: 0.62rem; letter-spacing: 0.2em;
  text-transform: uppercase;
}
.gallery-note {
  margin-top: 1.5rem;
  font-size: 0.75rem; color: var(--stone);
  letter-spacing: 0.05em;
}

/* ── REGISTRY ── */
#registry { border-top: 1px solid var(--sand); }
.registry-intro { color: #5a524a; font-size: 0.95rem; line-height: 1.85; max-width: 520px; margin-bottom: 3rem; }
.registry-links {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
}
.registry-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 2rem;
  background: var(--sand);
  text-decoration: none; color: var(--warm-dark);
  font-size: 0.8rem; letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s;
}
.registry-link:hover { background: var(--stone); color: var(--cream); }
.registry-link span { font-size: 1.2rem; }

/* ── ACCOMMODATIONS ── */
#accommodations { border-top: 1px solid var(--sand); }
.accom-intro { color: #5a524a; font-size: 0.95rem; line-height: 1.85; max-width: 520px; margin-bottom: 3rem; }
.hotel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.hotel-card {
  border: 1px solid var(--sand); padding: 2rem;
  transition: border-color 0.2s;
}
.hotel-card:hover { border-color: var(--stone); }
.hotel-badge {
  display: inline-block;
  font-size: 0.6rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--cream);
  background: var(--accent); padding: 0.25rem 0.7rem;
  margin-bottom: 1rem;
}
.hotel-card h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem; font-weight: 400;
  margin-bottom: 0.5rem;
}
.hotel-card p { font-size: 0.82rem; color: #7a7068; line-height: 1.6; margin-bottom: 0.4rem; }
.hotel-card a {
  display: inline-block; margin-top: 1rem;
  font-size: 0.65rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--accent);
  text-decoration: none; border-bottom: 1px solid var(--light-accent);
}
.hotel-card a:hover { color: var(--warm-dark); }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--sand);
  padding: 3rem 2rem;
  text-align: center;
}
.footer-names {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem; font-style: italic;
  font-weight: 300; color: var(--accent);
  margin-bottom: 0.75rem;
}
footer p { font-size: 0.7rem; letter-spacing: 0.12em; color: var(--stone); text-transform: uppercase; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes lineGrow {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 1; }
  50%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  51%  { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  nav { gap: 1.2rem; font-size: 0.62rem; flex-wrap: wrap; padding: 1rem; }
  .story-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .gallery-slot:first-child { grid-row: span 1; }
}
