/* =====================================================================
   Ivory & gold wedding invitation — mobile-first
   ===================================================================== */

:root {
  --ivory: #f7f2e7;
  --ivory-deep: #efe7d7;
  --paper: #fdfbf6;
  --ink: #22281f;
  --gold: #c9a55c;
  --gold-deep: #a3813d;
  --gold-soft: #e5d5ae;
  --muted: #7c745f;
  --shadow: 0 18px 50px rgba(50, 42, 20, 0.14);

  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --script: 'Great Vibes', cursive;
  --sans: 'Montserrat', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- shared type ---------- */

h2.script {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1.15;
  margin: 0.1em 0 0.6em;
  color: var(--ink);
}

.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 0.5rem;
}
.eyebrow-light { color: var(--gold-soft); }

.section { padding: clamp(4rem, 10vh, 7rem) 1.25rem; }
.section.alt { background: var(--ivory-deep); }
.wrap { max-width: 1060px; margin: 0 auto; }
.wrap.narrow { max-width: 620px; }

.section-intro { max-width: 640px; color: var(--muted); margin: 0 auto 2.5rem; }

/* ---------- decorative frame & ornament ---------- */

.frame {
  border: 1px solid rgba(201, 165, 92, 0.5);
  outline: 1px solid rgba(201, 165, 92, 0.25);
  outline-offset: 5px;
  background: var(--paper);
  padding: clamp(1.6rem, 4vw, 2.8rem);
  box-shadow: var(--shadow);
}

.orn { color: var(--gold); margin: 1.4rem auto; width: min(220px, 60%); }
.orn svg { width: 100%; display: block; }
.orn.center { margin-left: auto; margin-right: auto; }
.orn.gold-light { color: var(--gold-soft); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  color: var(--ivory);
  background:
    radial-gradient(ellipse at 30% 20%, #2b3833 0%, #141a17 55%, #0d110f 100%);
}
#sky { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-scrim {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(10, 12, 10, 0) 30%, rgba(10, 12, 10, 0.55) 100%);
}
.hero-inner { position: relative; z-index: 2; padding: 1rem; max-width: 900px; }

.hero-names {
  font-family: var(--serif);
  font-weight: 500;
  margin: 0.6rem 0 0;
  font-size: clamp(2.6rem, 9vw, 5.4rem);
  line-height: 1.08;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.55);
}
.hero-names .amp {
  display: block;
  font-family: var(--script);
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  color: var(--gold);
  margin: 0.15em 0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
}
.hero-date {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2.6vw, 1.5rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0.4rem 0 0;
}
.hero-loc {
  font-size: 0.82rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0.9rem 0 0;
}

.eyebrow, .hero-names, .orn, .hero-date, .hero-loc { will-change: opacity, transform; }

.scroll-cue {
  position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%);
  z-index: 2; color: var(--gold-soft); opacity: 0.85;
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 7px); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue { animation: none; }
}

/* ---------- venue ---------- */

.meta-strip {
  display: flex; flex-wrap: wrap; gap: 0.7rem 2rem; justify-content: center;
  margin: 0.4rem 0 2.2rem; color: var(--ink);
  font-size: 0.85rem; letter-spacing: 0.08em;
}
.meta-row { display: flex; align-items: center; gap: 0.55rem; }
.meta-row svg { color: var(--gold-deep); flex: none; }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0 0 2.2rem;
}
.g-item {
  margin: 0; position: relative; overflow: hidden; cursor: pointer;
  aspect-ratio: 4 / 5; border: 1px solid rgba(201, 165, 92, 0.4);
  background: var(--ivory-deep); box-shadow: var(--shadow);
}
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
@media (hover: hover) {
  .g-item:hover img { transform: scale(1.04); }
}
@media (max-width: 720px) { .gallery { grid-template-columns: 1fr 1fr; } .g-item:last-child { grid-column: 1 / -1; } }

.venue-card { max-width: 560px; margin: 0 auto; text-align: center; }
.venue-name { font-family: var(--serif); font-size: clamp(1.5rem, 4vw, 2rem); margin: 0 0 0.3rem; font-weight: 600; }
.venue-address { color: var(--muted); margin: 0 0 1.4rem; }

.btn-row { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--sans); font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.85rem 1.6rem; text-decoration: none; cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn-solid { background: var(--gold); color: #1c1a12; border: 1px solid var(--gold); }
.btn-solid:hover { background: var(--gold-deep); border-color: var(--gold-deep); color: var(--ivory); }
.btn-ghost { background: transparent; color: inherit; border: 1px solid currentColor; }
.btn-ghost:hover { background: rgba(201, 165, 92, 0.12); color: var(--gold-deep); }
.section.alt .btn-ghost:hover { color: var(--gold-deep); }

.center-cta { text-align: center; margin-top: 2.4rem; }

/* ---------- accommodation ---------- */

.hotels {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem; max-width: 980px; margin: 0 auto;
}
.hotel-card {
  background: var(--paper); border: 1px solid rgba(201, 165, 92, 0.45);
  padding: 1.6rem 1.4rem; box-shadow: var(--shadow); text-align: left;
}
.hotel-card h3 { font-family: var(--serif); font-size: 1.35rem; margin: 0 0 0.2rem; font-weight: 600; }
.hotel-dist { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-deep); margin: 0 0 0.7rem; }
.hotel-blurb { color: var(--muted); font-size: 0.92rem; margin: 0 0 1rem; }
.hotel-link { color: var(--gold-deep); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.hotel-link:hover { color: var(--ink); }

/* ---------- timeline ---------- */

.timeline { list-style: none; margin: 0 auto; padding: 0; max-width: 640px; position: relative; }
.timeline::before {
  content: ''; position: absolute; left: 61px; top: 8px; bottom: 8px;
  width: 1px; background: linear-gradient(var(--gold-soft), rgba(201, 165, 92, 0.15));
}
.tl-item { display: flex; gap: 1.4rem; padding: 0.85rem 0; position: relative; }
.tl-time {
  flex: none; width: 62px; text-align: right;
  font-family: var(--serif); font-size: 1.05rem; font-weight: 600; color: var(--gold-deep);
  padding-top: 0.15rem;
}
.tl-body { position: relative; padding: 0 0 0.2rem 1.6rem; }
.tl-body::before {
  content: ''; position: absolute; left: -3.5px; top: 0.55rem;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 4px rgba(201, 165, 92, 0.18);
}
.tl-body h3 { font-family: var(--serif); font-size: 1.25rem; margin: 0 0 0.15rem; font-weight: 600; }
.tl-body p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.tl-item:not(:last-child) .tl-body { padding-bottom: 1.1rem; }

/* ---------- dress code ---------- */

.attire-title { font-family: var(--serif); font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 600; margin: 0 0 0.6rem; }
.body.center, .center { text-align: center; }
.body { color: #4a4636; }
.lede { font-family: var(--serif); font-size: clamp(1.25rem, 3vw, 1.7rem); line-height: 1.5; color: #3c3a2c; margin: 0 0 1.2rem; }
.fineprint { font-size: 0.8rem; color: var(--muted); font-style: italic; margin: 1.4rem 0 0; }

.swatches { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.6rem; }
.swatch { display: flex; align-items: center; gap: 0.45rem; font-size: 0.75rem; letter-spacing: 0.08em; color: var(--muted); }
.swatch-dot { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.12); display: inline-block; }

/* ---------- RSVP ---------- */

.section.rsvp {
  background:
    radial-gradient(ellipse at 50% 0%, #2f3c36 0%, #181e1a 60%, #10140f 100%);
  color: var(--ivory);
}
.rsvp .script { color: var(--ivory); }
.rsvp-by { color: var(--gold-soft); font-size: 0.85rem; letter-spacing: 0.18em; text-transform: uppercase; margin: 0 0 2rem; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field.span2 { grid-column: 1 / -1; }
.field label, .pills-field legend {
  display: block; font-size: 0.72rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold-soft); margin-bottom: 0.45rem;
}
.field .optional { text-transform: none; letter-spacing: 0.05em; color: var(--muted); }
.section.rsvp .hint { color: rgba(247, 242, 231, 0.55); }
.hint { font-size: 0.75rem; margin: 0.4rem 0 0; }

.field input, .field textarea {
  width: 100%; background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(201, 165, 92, 0.35);
  color: var(--ivory); padding: 0.8rem 0.9rem;
  font-family: var(--sans); font-size: 0.95rem; font-weight: 300;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--gold); background: rgba(255, 255, 255, 0.08);
}
.field input::placeholder, .field textarea::placeholder { color: rgba(247, 242, 231, 0.4); }

.field.invalid input, .field.invalid textarea { border-color: #d47a6a; }

.pills-field { border: 0; padding: 0; margin: 0; }
.pill-group { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.pill-group input { position: absolute; opacity: 0; pointer-events: none; }
.pill {
  flex: 1; min-width: 150px; text-align: center; cursor: pointer;
  border: 1px solid rgba(201, 165, 92, 0.4); padding: 0.8rem 1rem;
  font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
  transition: all 0.2s ease; margin: 0;
}
.pill-group input:checked + .pill {
  background: var(--gold); color: #1c1a12; border-color: var(--gold);
  font-weight: 500;
}
.pill-group input:focus-visible + .pill { outline: 2px solid var(--gold-soft); outline-offset: 2px; }

.hp { position: absolute; left: -9999px; top: 0; width: 1px; height: 1px; overflow: hidden; }

.btn-submit { width: 100%; justify-content: center; margin-top: 1.4rem; font-size: 0.85rem; }
.btn-submit:disabled { opacity: 0.6; cursor: wait; }

.form-error {
  margin-top: 1rem; padding: 0.8rem 1rem; text-align: center;
  border: 1px solid rgba(212, 122, 106, 0.55); color: #f0b9ad;
  background: rgba(212, 122, 106, 0.12); font-size: 0.85rem;
}

.rsvp-success { text-align: center; padding: 1rem 0 0; }
.success-title { font-size: clamp(2.2rem, 6vw, 3rem); margin: 0 0 0.4rem; }
.link-btn {
  margin-top: 1.4rem; background: none; border: none; cursor: pointer;
  color: var(--gold-soft); font-family: var(--sans); font-size: 0.8rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  border-bottom: 1px solid currentColor; padding: 0 0 2px;
}

/* ---------- footer / lightbox ---------- */

.footer { background: #0d110f; color: rgba(247, 242, 231, 0.6); text-align: center; padding: 2rem; font-size: 0.78rem; letter-spacing: 0.2em; }

.lightbox {
  position: fixed; inset: 0; z-index: 60; background: rgba(10, 10, 8, 0.92);
  display: flex; align-items: center; justify-content: center; padding: 2rem;
}
.lightbox img { max-height: 100%; max-width: 100%; object-fit: contain; border: 1px solid rgba(201, 165, 92, 0.5); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); }
.lb-close {
  position: absolute; top: 0.8rem; right: 1rem; font-size: 2.2rem; line-height: 1;
  background: none; border: none; color: var(--ivory); cursor: pointer; z-index: 2;
}

/* ---------- scroll reveal (content visible by default; JS adds animation) ---------- */

.will-reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s ease, transform 0.8s ease; }
.will-reveal.revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .will-reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- small screens ---------- */

@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .tl-time { width: 52px; }
  .timeline::before { left: 51px; }
  .tl-body { padding-left: 1.2rem; }
}

[hidden] { display: none !important; }
