/* =====================================================================
   Catherine & Noah — shared styles
   Theme matched from their Zola site: rosewood + botanical green on blush,
   Cormorant Garamond + Ballet script for their names.
   Change the variables in :root to re-skin the whole site.
   ===================================================================== */

:root {
  /* Palette (from the original Zola theme) */
  --blush:        #f6eaec;
  --blush-deep:   #efd9dd;
  --rosewood:     #be7b77;
  --rosewood-dk:  #6d4a4a;
  --rosewood-sf:  #9d7d7d;
  --green:        #6f7a44;
  --green-dk:     #545d31;
  --coral:        #cf7d5c; /* Save-the-Date script accent */
  --ink:          #5f6443; /* dark olive green — script headers & body text */
  --muted:        #6a625f; /* WCAG AA (>=4.5:1) on white, blush, and page bg */
  --white:        #ffffff;
  --offwhite:     #f9f9f9;

  /* Semantic */
  --bg:         #fdfdfd;
  --surface:    var(--white);
  --text:       var(--ink);
  --text-soft:  var(--muted);
  --brand:      var(--rosewood);
  --accent:     var(--green);

  /* Type */
  --font-serif:  "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-script: "Ballet", "Segoe Script", cursive;
  --font-body:   "Cormorant Garamond", Georgia, "Times New Roman", serif;

  /* Layout */
  --maxw: 1080px;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(33, 32, 31, 0.10);
  --nav-h: 68px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Accessibility: visible keyboard focus, skip link, screen-reader-only text */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 200;
  background: var(--brand); color: #fff; padding: 10px 18px; border-radius: 4px;
  font-size: 0.85rem; font-weight: 600; transform: translateY(-160%);
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: translateY(0); color: #fff; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--green); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 0.5em;
}
h1 { font-family: var(--font-script); font-size: clamp(2.9rem, 7vw, 4.6rem); line-height: 1.02; letter-spacing: 0; }
h2 { font-family: var(--font-script); font-size: clamp(2.4rem, 5vw, 3.5rem); line-height: 1.04; }
h3 { font-size: 1.25rem; }

/* Script face — reserved for the couple's names */
.script, .names-script {
  font-family: var(--font-script);
  font-weight: 400;
  line-height: 1;
  color: var(--brand);
}

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: clamp(48px, 8vw, 92px) 0; }
.section--tint { background: var(--blush); }
.center { text-align: center; }
.lead { font-size: 1.08rem; color: var(--text-soft); max-width: 620px; margin: 0 auto 1.5rem; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.7rem;
}
.divider {
  width: 220px; height: 1px; border: 0; margin: 1.5rem auto;
  background: var(--brand); opacity: 0.65;
}
.divider--sm { width: 140px; }

/* Orchid line-art cascading continuously down the left of the whole page,
   behind content — the couple's own branch, tiled top to bottom. */
body { position: relative; }
body::before, body::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 200px;
  z-index: -1; pointer-events: none; opacity: 0.22;
  background: url("../img/orchid-branch-line.png") repeat-y -30px top;
  background-size: 214px auto;
}
body::before { left: 0; }
body::after  { right: 0; transform: scaleX(-1); }
@media (max-width: 720px) {
  body::before, body::after {
    width: 132px; opacity: 0.22;
    background-position: -34px top; background-size: 150px auto;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: 2px;
  border: 1.5px solid var(--brand);
  background: var(--brand);
  color: var(--white);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover { background: var(--rosewood-dk); border-color: var(--rosewood-dk); color: var(--white); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--brand); }
.btn--ghost:hover { background: var(--brand); color: var(--white); }
.btn--light { background: transparent; border-color: rgba(255,255,255,0.85); color: #fff; }
.btn--light:hover { background: #fff; border-color: #fff; color: var(--brand); }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  height: var(--nav-h);
  background: rgba(253, 253, 253, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(190, 123, 119, 0.14);
}
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 22px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav__brand { display: flex; align-items: center; line-height: 0; }
.nav__brand-img { height: 40px; width: auto; display: block; }
.nav__links { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  color: var(--text); font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em;
  padding: 6px 2px; border-bottom: 2px solid transparent;
}
.nav__links a:hover { color: var(--brand); }
.nav__links a.is-active { color: var(--brand); border-bottom-color: var(--accent); }
.nav__toggle {
  display: none; background: none; border: 0; cursor: pointer;
  font-size: 1.6rem; color: var(--brand); line-height: 1;
}

@media (max-width: 820px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid rgba(190, 123, 119,0.14);
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  }
  .nav__links.is-open { max-height: 460px; }
  .nav__links a { padding: 15px 22px; border-bottom: 1px solid rgba(190, 123, 119,0.10); }
  .nav__links a.is-active { border-bottom-color: rgba(190, 123, 119,0.10); background: var(--blush); }
}

/* ---------- Hero (full-bleed photo, text anchored low) ---------- */
.hero {
  position: relative;
  min-height: calc(94vh - var(--nav-h));
  display: flex; align-items: flex-end; justify-content: center;
  text-align: center; color: var(--text);
  background:
    linear-gradient(to bottom, rgba(253,253,253,0) 50%, rgba(253,253,253,0.6) 100%),
    url("../img/hero-bg.jpg");
  background-size: cover;
  background-position: center 42%;
}
.hero__inner { padding: 0 22px 8vh; max-width: 820px; }
.hero__names {
  font-family: var(--font-script); font-weight: 400; color: var(--brand);
  font-size: clamp(3.4rem, 10vw, 6.5rem); line-height: 0.95; margin: 0 0 0.2em;
  text-shadow: 0 1px 16px rgba(255,255,255,0.7);
}
.hero__meta {
  font-family: var(--font-serif); font-size: clamp(0.95rem, 2vw, 1.2rem);
  letter-spacing: 0.14em; text-transform: uppercase; text-shadow: 0 1px 10px rgba(255,255,255,0.7);
}
.hero__meta span { display: inline-block; }
.hero__meta .dot { margin: 0 12px; opacity: 0.8; }
.hero__cta { margin-top: 26px; }

@media (max-width: 560px) {
  .hero__meta .dot { display: block; height: 6px; visibility: hidden; }
}

/* ---------- Countdown band ---------- */
.countdown-band { background: var(--blush); text-align: center; padding: 40px 22px; }
.countdown-band .eyebrow { margin-bottom: 1rem; }
.countdown { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.countdown__unit { min-width: 88px; }
.countdown__num {
  font-family: var(--font-serif); font-size: 2.4rem; line-height: 1; color: var(--brand);
}
.countdown__label {
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.68rem;
  color: var(--text-soft); margin-top: 6px;
}

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 26px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .grid--2, .grid--3 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 30px; height: 100%;
  border: 1px solid rgba(190, 123, 119,0.08);
}
.card h3 { color: var(--brand); }
/* Card/aside headings that act as the section (h2) heading on pages without a
   section-head — keep the compact scale so the visual is unchanged. */
.card h2, .split__aside h2 { font-size: 1.25rem; color: var(--brand); margin: 0 0 0.4em; }
a.card { color: inherit; transition: transform 0.15s ease, box-shadow 0.2s ease; }
a.card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(33,32,31,0.14); }

/* ---------- Info rows (details) ---------- */
.detail { text-align: center; }
.detail h3 { margin-bottom: 0.2em; }
.detail .detail__time {
  color: var(--accent); font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; font-size: 0.85rem;
}

/* ---------- Gallery ---------- */
.gallery { column-count: 3; column-gap: 14px; }
@media (max-width: 820px) { .gallery { column-count: 2; } }
@media (max-width: 520px) { .gallery { column-count: 1; } }
.gallery__item {
  break-inside: avoid; margin: 0 0 14px; overflow: hidden; border-radius: var(--radius);
  background: var(--blush); cursor: pointer; position: relative; display: block;
}
.gallery__item img { width: 100%; height: auto; display: block; transition: transform 0.4s ease; }
.gallery__item:hover img { transform: scale(1.06); }
.gallery__placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--rosewood-sf); font-family: var(--font-serif); font-size: 1.1rem;
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 60; display: none;
  align-items: center; justify-content: center;
  background: rgba(33,32,31,0.9); padding: 30px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 6px; }
.lightbox__close {
  position: absolute; top: 20px; right: 26px; background: none; border: 0;
  color: var(--white); font-size: 2.2rem; cursor: pointer; line-height: 1;
}

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq__item { border-bottom: 1px solid rgba(190, 123, 119,0.18); }
.faq__q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font-family: var(--font-serif); font-size: 1.1rem; color: var(--text);
  padding: 20px 40px 20px 0; position: relative;
}
.faq__q::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  color: var(--accent); font-size: 1.6rem; transition: transform 0.2s ease;
}
.faq__item.is-open .faq__q::after { content: "\2013"; }
.faq__a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; color: var(--text-soft); }
.faq__a > div { padding: 0 0 20px; }

/* ---------- Forms (RSVP) ---------- */
.form { max-width: 620px; margin: 0 auto; }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; }
.field .req { color: var(--accent); }
.field input[type="text"],
.field input[type="email"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%; padding: 12px 14px; font-family: var(--font-body); font-size: 1rem;
  border: 1.5px solid rgba(190, 123, 119,0.28); border-radius: 6px; background: var(--white);
  color: var(--text);
}
.field textarea { min-height: 100px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(190, 123, 119,0.15);
}
.choice { display: flex; gap: 14px; flex-wrap: wrap; }
.choice label {
  flex: 1; min-width: 150px; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border: 1.5px solid rgba(190, 123, 119,0.28); border-radius: 6px;
  cursor: pointer; font-weight: 500;
}
.choice input { accent-color: var(--brand); }
.form__note { font-size: 0.88rem; color: var(--text-soft); }
.form__status { margin-top: 16px; padding: 14px 16px; border-radius: 6px; display: none; }
.form__status.is-ok { display: block; background: #e8efe6; color: var(--green-dk); border: 1px solid #a9c3a7; }
.form__status.is-err { display: block; background: #f6e4e4; color: #8f3a3a; border: 1px solid #d9a3a3; }
.hidden { display: none !important; }

/* ---------- Registry ---------- */
.registry-card { text-align: center; }

/* ---------- Footer ---------- */
.footer {
  background: var(--blush); color: var(--text-soft);
  text-align: center; padding: 48px 22px;
  border-top: 1px solid rgba(190, 123, 119,0.14);
}
.footer__crest { height: 104px; width: auto; display: block; margin: 0 auto; }
.footer a { color: var(--brand); text-decoration: underline; }
.footer__meta { font-size: 0.8rem; opacity: 0.78; margin-top: 12px; letter-spacing: 0.05em; }

/* =====================================================================
   Added components — visual polish
   ===================================================================== */

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Nav elevation on scroll ---------- */
.nav.is-scrolled { box-shadow: 0 4px 20px rgba(33, 32, 31, 0.08); }

/* ---------- Hero enhancements ---------- */
.hero__scroll {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  color: var(--brand); font-size: 0.62rem; letter-spacing: 0.24em;
  text-transform: uppercase; text-align: center; z-index: 3;
}
.hero__scroll .chev {
  display: block; width: 13px; height: 13px; margin: 8px auto 0;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: rotate(45deg) translate(0,0); } 50% { transform: rotate(45deg) translate(4px,4px); } }
@media (prefers-reduced-motion: reduce) { .hero__scroll .chev { animation: none; } }

/* ---------- Section ornament heading group ---------- */
.section-head { text-align: center; margin-bottom: 2.4rem; }
.section-head p { color: var(--text-soft); max-width: 620px; margin: 0.4rem auto 0; }

/* The orchid framing is now the single continuous cascade on body (above),
   uniform on every page/section — no separate per-section branch layer. */

/* ---------- Story (image + text) ---------- */
.story {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 60px);
  align-items: center;
}
.story__media {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  aspect-ratio: 4 / 5; background: var(--blush);
}
.story__media img { width: 100%; height: 100%; object-fit: cover; }
.story__body .eyebrow { text-align: left; }
@media (max-width: 820px) {
  .story { grid-template-columns: 1fr; }
  .story__media { aspect-ratio: 16 / 10; order: -1; }
}

/* ---------- Timeline (schedule / itinerary) ---------- */
.timeline { max-width: 720px; margin: 0 auto; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 20px; top: 6px; bottom: 6px;
  width: 2px; background: linear-gradient(var(--blush-deep), var(--accent), var(--blush-deep));
}
.timeline__item { position: relative; padding: 0 0 34px 62px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: ""; position: absolute; left: 12px; top: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--accent);
}
.timeline__time {
  font-family: var(--font-body); font-weight: 600; font-size: 0.72rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
.timeline__title { font-family: var(--font-serif); font-size: 1.3rem; color: var(--brand); margin: 2px 0 4px; }
.timeline__desc { color: var(--text-soft); margin: 0; }

/* ---------- Badge / pill ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: 999px; background: var(--blush);
  color: var(--brand); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.badge--outline { background: transparent; border: 1.5px solid var(--brand); }

/* ---------- Info list with markers ---------- */
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { position: relative; padding: 6px 0 6px 26px; border-bottom: 1px solid rgba(190, 123, 119,0.10); }
.info-list li:last-child { border-bottom: 0; }
.info-list li::before {
  content: ""; position: absolute; left: 4px; top: 15px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}

/* ---------- Map placeholder ---------- */
.map-embed {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  aspect-ratio: 16 / 7; background:
    repeating-linear-gradient(45deg, #eef2ec, #eef2ec 14px, #e7ede4 14px, #e7ede4 28px);
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--green-dk); font-family: var(--font-serif); padding: 20px;
}
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Split feature (RSVP aside) ---------- */
.split { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 5vw, 56px); align-items: start; }
.split__aside {
  background: var(--blush); border-radius: var(--radius); padding: 32px;
  position: sticky; top: calc(var(--nav-h) + 20px);
}
.split__aside h3 { color: var(--brand); }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split__aside { position: static; } }

/* ---------- Gallery feature spans ---------- */
.gallery__item--wide { grid-column: span 2; aspect-ratio: 2 / 1; }
.gallery__item--tall { grid-row: span 2; aspect-ratio: 1 / 2; }
@media (max-width: 820px) {
  .gallery__item--wide, .gallery__item--tall { grid-column: auto; grid-row: auto; aspect-ratio: 1 / 1; }
}
.gallery__cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 12px;
  color: #fff; font-family: var(--font-serif); font-size: 0.9rem;
  background: linear-gradient(transparent, rgba(33,32,31,0.6)); opacity: 0; transition: opacity 0.3s ease;
}
.gallery__item { position: relative; }
.gallery__item:hover .gallery__cap { opacity: 1; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 50;
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--brand); color: #fff; font-size: 1.1rem; line-height: 1;
  box-shadow: 0 6px 18px rgba(33,32,31,0.22);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--rosewood-dk); }

/* ---------- Footer ornament ---------- */
.footer .divider { margin: 16px auto; }

/* ---------- "See you there" video intro overlay ---------- */
.intro-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: #ece7de;
  cursor: pointer;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
.intro-overlay.is-dismissed { opacity: 0; visibility: hidden; pointer-events: none; }
.intro-overlay__video { width: 100%; height: 100%; object-fit: contain; display: block; }
@media (max-aspect-ratio: 3 / 4) { .intro-overlay__video { object-fit: cover; } }
.intro-overlay__hint {
  position: absolute; bottom: 26px; left: 0; right: 0; text-align: center;
  color: rgba(61,70,38,0.6); letter-spacing: 0.2em;
  text-transform: uppercase; font-size: 0.68rem;
  text-shadow: 0 1px 3px rgba(255,255,255,0.6);
}
@media (prefers-reduced-motion: reduce) { .intro-overlay { transition: none; } }

