/* ============================================================
   Charlotte & Sebastian — Wedding Site  (v2)
   Palette:  cream #fffcf1 · blush #ebd9d1 · deep #383838 · ink #111
   ============================================================ */

:root {
  --cream: #fffcf1;
  --blush: #ebd9d1;
  --blush-soft: #f5ebe6;
  --ink: #1a1a1a;
  --deep: #383838;
  --muted: #7a726a;
  --line: #d8c9bf;
  --accent: #b9a88f;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --script: "Pinyon Script", "Great Vibes", cursive;
  --maxw: 1100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
:target { scroll-margin-top: 92px; }
section[id], header[id] { scroll-margin-top: 92px; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
p { margin: 0 0 1.1em; }
sup { font-size: 0.55em; vertical-align: super; }
.script { font-family: var(--script); font-weight: 400; }
.nowrap { white-space: nowrap; }

/* Visible keyboard focus for links/buttons (form fields style their own). */
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- SCROLL REVEAL ----------
   Only hide elements when JS is active (html.js). Without JS, or if the
   observer never fires, content stays fully visible. */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.7,.2,1);
}
.js .reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.reveal[data-delay="5"] { transition-delay: .40s; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .hero__scroll, .hero__media { animation: none; }
}

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 28px;
  /* Always-on frosted cream bar so the menu is clear over the hero photo */
  background: rgba(255, 252, 241, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: padding 0.3s, box-shadow 0.3s;
}
.nav.scrolled {
  padding: 10px 28px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.06);
}
.nav__brand {
  font-size: 23px; letter-spacing: 0.18em; text-decoration: none; color: var(--ink);
}
.nav__amp { color: var(--accent); }
.nav__links { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; align-items: center; }
.nav__links a {
  text-decoration: none; color: var(--deep);
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 12px;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--ink); }
.nav__cta {
  border: 1px solid var(--ink); padding: 7px 16px; color: var(--ink) !important;
}
.nav__cta:hover { background: var(--ink); color: var(--cream) !important; }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav__toggle span { width: 26px; height: 2px; background: var(--ink); transition: 0.3s; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  text-align: center; padding: 12vh 24px 70px;
  overflow: hidden;
}
.hero__media {
  position: absolute; inset: 0;
  background: url("images/photo-1.jpg") center 50% / cover no-repeat;
  transform: scale(1.06);
  animation: heroZoom 18s ease-out forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero__scrim {
  position: absolute; inset: 0;
  /* A gentle veil concentrated in the upper third (where the text sits, over
     the sky) so the building below stays vivid and inviting. */
  background:
    linear-gradient(to bottom,
      rgba(255,252,241,0.55) 0%,
      rgba(255,252,241,0.34) 18%,
      rgba(255,252,241,0.08) 38%,
      rgba(255,252,241,0.00) 55%,
      rgba(255,252,241,0.00) 85%,
      rgba(255,252,241,0.75) 97%,
      var(--cream) 100%);
}
.hero__inner {
  position: relative; z-index: 2;
  max-width: 760px;
  text-shadow: 0 1px 14px rgba(255,252,241,0.75), 0 1px 3px rgba(255,252,241,0.6);
}
.hero__eyebrow {
  text-transform: uppercase; letter-spacing: 0.4em; font-size: 13px; color: var(--deep);
  margin: 0 0 12px;
}
.hero__names {
  margin: 0; font-weight: 400; line-height: 1.0; color: var(--ink);
  font-size: clamp(38px, 6.2vw, 72px);
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: center; gap: 0 0.28em;
}
.hero__name { white-space: nowrap; }
.hero__and {
  font-style: italic; font-weight: 400; color: var(--accent);
  font-size: 0.72em;
  text-shadow: none;
}
.hero__date {
  margin: 14px 0 4px; font-size: clamp(16px, 2.2vw, 21px);
  letter-spacing: 0.04em; color: var(--ink);
}
.hero__venue {
  margin: 0; font-size: clamp(13px, 1.6vw, 16px);
  text-transform: uppercase; letter-spacing: 0.22em; color: var(--deep);
}
.hero__note {
  margin: 18px 0 16px; font-style: italic; font-size: clamp(15px, 1.8vw, 19px);
  color: var(--deep);
}
.hero__scroll {
  position: absolute; bottom: 24px; z-index: 2;
  font-size: 28px; color: var(--deep); text-decoration: none;
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(8px)} }

/* ---------- COUNTDOWN ---------- */
.countdown-section {
  text-align: center;
  padding: 64px 24px 56px;
  background: var(--cream);
}
.countdown-section__label {
  text-transform: uppercase; letter-spacing: 0.3em;
  font-size: 14px; color: var(--deep); margin: 0 0 26px;
}
.countdown {
  display: inline-flex; gap: 10px; justify-content: center; margin: 0;
  padding: 0;
}
.cd { display: flex; flex-direction: column; align-items: center; min-width: 58px; }
.cd + .cd { border-left: 1px solid var(--line); }
.cd b {
  font-size: clamp(28px, 4.5vw, 42px); font-weight: 500; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.cd span { text-transform: uppercase; letter-spacing: 0.2em; font-size: 10px; color: var(--deep); margin-top: 6px; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block; margin-top: 10px; padding: 14px 40px;
  background: var(--ink); color: var(--cream); text-decoration: none;
  text-transform: uppercase; letter-spacing: 0.22em; font-size: 13px;
  border: 1px solid var(--ink); cursor: pointer; transition: all 0.25s;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn { text-shadow: none; }
.btn--light { background: var(--ink); color: var(--cream); }
.btn--outline { background: transparent; color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--cream); }
.link-btn {
  display: inline-block; color: var(--deep); text-decoration: none;
  border-bottom: 1px solid var(--accent); padding-bottom: 2px;
  font-size: 15px; letter-spacing: 0.06em; transition: color 0.2s;
}
.link-btn:hover { color: var(--ink); }

/* ---------- SECTIONS ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: 96px 28px; }
.label { text-transform: uppercase; letter-spacing: 0.32em; font-size: 14px; color: var(--deep); margin-bottom: 24px; }
.label--center { text-align: center; }
.lead { font-size: 21px; }
.subhead { font-size: 32px; font-weight: 500; margin: 1.5em 0 0.35em; }
.subhead.script { font-size: 46px; font-weight: 400; color: var(--ink); }
.subhead--lg { font-size: 58px; margin-top: 0; }
.venue { font-style: normal; line-height: 1.8; margin-bottom: 0.5em; }
.venue-actions { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 0.4em; }
.signoff { font-size: 40px; margin-top: 0.4em; color: var(--ink); }

.section--day, .section--gifts {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center;
}
.section--gifts { grid-template-columns: 1.1fr 0.9fr; }
.section--gifts .section__photo { order: 2; }
.section__photo img {
  width: 100%; height: 100%; max-height: 640px; object-fit: cover;
  border-radius: 3px; box-shadow: 0 20px 48px rgba(0,0,0,0.15);
}
.poem { font-style: italic; font-size: 20px; line-height: 1.9; color: var(--deep); }

/* ---------- ORDER / TIMELINE ---------- */
.section--order { text-align: center; background: var(--blush-soft); max-width: none; }
.order__kicker { text-transform: uppercase; letter-spacing: 0.3em; font-size: 14px; color: var(--muted); }
.order__title { font-weight: 400; font-size: clamp(42px, 7vw, 78px); margin: 4px 0 48px; }
.order__title .script { font-size: 1.25em; color: var(--ink); }
.timeline { list-style: none; margin: 0 auto; padding: 0; max-width: 520px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 50%; top: 6px; bottom: 6px; width: 1px; background: var(--line); transform: translateX(-0.5px); }
.timeline li { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: baseline; padding: 14px 0; position: relative; }
.timeline li::after { content: ""; position: absolute; left: 50%; top: 22px; width: 9px; height: 9px; background: var(--blush); border: 1px solid var(--deep); border-radius: 50%; transform: translateX(-50%); }
.timeline__time { text-align: right; font-size: 22px; }
.timeline__event { text-align: left; text-transform: uppercase; letter-spacing: 0.12em; font-size: 14px; color: var(--deep); }

/* ---------- FAQs (accordion) ---------- */
.faqs { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 56px; }
.faq { border-bottom: 1px solid var(--line); }
.faq summary {
  font-size: 26px; font-weight: 500; margin: 0; padding: 14px 0; cursor: pointer;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 28px; color: var(--accent); font-weight: 300; transition: transform 0.2s; }
.faq[open] summary::after { content: "\2013"; }
.faq p { font-size: 18px; color: var(--deep); padding-bottom: 16px; margin: 0; }

/* ---------- RSVP FORM ---------- */
.section--rsvp, .section--honeymoon { text-align: center; max-width: 760px; }
.section--pay { text-align: center; background: var(--blush-soft); max-width: none; }
.section--pay > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.rsvp__eyebrow { text-transform: uppercase; letter-spacing: 0.26em; font-size: clamp(22px, 4vw, 34px); margin-bottom: 6px; }
.rsvp__by { font-size: 40px; color: var(--deep); margin-bottom: 22px; }
.rsvp__text { font-size: 19px; color: var(--deep); }

.rsvp-form { max-width: 520px; margin: 30px auto 0; text-align: left; display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field > span { text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px; color: var(--deep); }
.field .req { color: #9a3434; margin-left: 2px; }
.field input, .field textarea {
  font-family: var(--serif); font-size: 18px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--ink); width: 100%;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--deep); box-shadow: 0 0 0 3px rgba(185,168,143,0.25); }
.field textarea { resize: vertical; }
.field--radio { border: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.field--radio > span { text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px; color: var(--deep); }
.radio-row { display: flex; gap: 14px; flex-wrap: wrap; }
.choice {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  border: 1px solid var(--line); padding: 11px 18px; border-radius: 3px; font-size: 18px; flex: 1; justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}
.choice:has(input:checked) { border-color: var(--ink); background: var(--blush-soft); }
.attending-fields {
  display: grid; gap: 18px;
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}
.attending-fields.show { max-height: 800px; opacity: 1; }
.rsvp-form .btn { justify-self: center; margin-top: 6px; }
.form-status { text-align: center; min-height: 1.4em; margin: 4px 0 0; font-size: 16px; }
.form-status.ok { color: #2f6b3a; }
.form-status.bad { color: #9a3434; }

/* ---------- FOOTER ---------- */
.footer { text-align: center; padding: 72px 24px 90px; background: var(--deep); color: var(--cream); }
.footer__love { font-size: 44px; margin: 0; }
.footer__names { text-transform: uppercase; letter-spacing: 0.3em; font-size: 18px; margin: 6px 0 14px; }
.footer__date { letter-spacing: 0.4em; font-size: 14px; color: var(--accent); margin: 0; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 820px) {
  body { font-size: 18px; }
  .nav__toggle { display: flex; }
  .nav__links {
    position: absolute; top: 100%; right: 0; flex-direction: column; gap: 0;
    background: var(--cream); border: 1px solid var(--line); border-top: none; min-width: 220px;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: 0.25s;
  }
  .nav__links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav__links li { border-bottom: 1px solid var(--line); width: 100%; }
  .nav__links a { display: block; padding: 14px 22px; }
  .nav__cta { border: none; }
  .section--day, .section--gifts { grid-template-columns: 1fr; gap: 36px; }
  .section--gifts .section__photo { order: 0; }
  .section__photo img { max-height: 460px; }
  .faqs { grid-template-columns: 1fr; gap: 0; }
  .countdown { gap: 12px; }
}
@media (max-width: 480px) {
  .section { padding: 64px 20px; }
  .timeline::before, .timeline li::after { display: none; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; text-align: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .timeline__time, .timeline__event { text-align: center; }
  .radio-row { flex-direction: column; }
}

/* ---------- MOBILE HERO (phones) ----------
   Refine the approved desktop hero for small screens: stack the names with the
   italic "and" on its own centred line, keep the manor facade framed and
   legible, trim the hero height, and give RSVP a comfortable tap target. */
@media (max-width: 600px) {
  .hero {
    min-height: 92vh;
    padding: 92px 22px 56px;
    justify-content: flex-start;
  }
  /* Push the facade/entrance lower on a tall narrow frame so the text block
     above it sits over sky, not brick. */
  .hero__media { background-position: center 78%; }
  /* A touch more veil at the very top so the text reads over the sky without
     washing the building below. */
  .hero__scrim {
    background:
      linear-gradient(to bottom,
        rgba(255,252,241,0.62) 0%,
        rgba(255,252,241,0.40) 22%,
        rgba(255,252,241,0.10) 42%,
        rgba(255,252,241,0.00) 58%,
        rgba(255,252,241,0.00) 86%,
        rgba(255,252,241,0.80) 97%,
        var(--cream) 100%);
  }
  .hero__inner { max-width: 100%; }
  .hero__eyebrow {
    font-size: 11px; letter-spacing: 0.3em; margin: 0 0 14px;
  }
  /* Stack the names: Charlotte / and / Sebastian, centred. Keep the block
     compact so it clears the roofline. */
  .hero__names {
    flex-direction: column; gap: 0;
    font-size: clamp(42px, 12.5vw, 56px); line-height: 1.0;
  }
  .hero__and { font-size: 0.5em; margin: 1px 0; }
  .hero__date {
    margin: 12px 0 4px; font-size: 17px; letter-spacing: 0.03em;
  }
  .hero__venue {
    font-size: 11.5px; letter-spacing: 0.16em; line-height: 1.5;
    max-width: 18em; margin-left: auto; margin-right: auto;
  }
  .hero__note { margin: 12px 0 14px; font-size: 15px; }
  .hero .btn {
    padding: 15px 38px; min-height: 48px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  /* Countdown: ensure the four units never overflow a 320px screen. */
  .countdown-section { padding: 48px 16px 44px; }
  .countdown { gap: 0; width: 100%; max-width: 340px; }
  .cd { min-width: 0; flex: 1; padding: 0 2px; }
  .cd b { font-size: clamp(24px, 8vw, 36px); }
  .cd span { font-size: 9px; letter-spacing: 0.14em; }
}

@media (max-width: 360px) {
  .hero { padding-top: 84px; }
  /* Keep the eyebrow on one line at the narrowest width. */
  .hero__eyebrow { font-size: 10px; letter-spacing: 0.22em; margin-bottom: 10px; }
  .hero__names { font-size: 44px; }
  .hero__date { font-size: 16px; margin-top: 10px; }
  .hero__venue { font-size: 11px; letter-spacing: 0.12em; }
  .hero__note { font-size: 14px; margin: 10px 0 12px; }
  /* Drop the facade lower so the text block stays over sky. */
  .hero__media { background-position: center 88%; }
  .cd span { letter-spacing: 0.1em; }
}
