/* Option 5: Ivory Arch. Cream paper with gold accents, full width on desktop. */

:root {
  --paper: #f7f0e1;
  --paper-2: #fbf7ee;
  --gold: #b8924a;
  --gold-text: #85642a;
  --brown: #5b3a22;
  --ink: #3d2b1c;
  --script: "Great Vibes", "Pinyon Script", cursive;
  --serif: "Cormorant Garamond", Georgia, serif;
  --caps: "Cinzel", "Cormorant Garamond", serif;
  --nav-h: 56px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 30%, rgba(184, 146, 74, .05), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(184, 146, 74, .05), transparent 40%),
    var(--paper);
  overflow-x: hidden;
}

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

a { color: var(--gold-text); }

:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 3px; }

[id] { scroll-margin-top: var(--nav-h); }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 30;
  padding: .5rem 1rem;
  background: var(--paper-2);
  border: 1px solid var(--gold);
  color: var(--ink);
}
.skip:focus { top: 1rem; }

/* Centered content container */
.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Top navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper-2);
  border-bottom: 1px solid var(--gold);
  box-shadow: 0 1px 0 rgba(184, 146, 74, .25), 0 8px 20px -18px rgba(91, 58, 34, .5);
}

.site-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--nav-h);
}

.monogram {
  flex: none;
  font-family: var(--script);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--brown);
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-width: 0;
}

.nav-links a {
  display: block;
  font-family: var(--caps);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold-text);
  white-space: nowrap;
  padding: .4rem 0;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover { color: var(--brown); border-bottom-color: var(--gold); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: .6rem;
  margin-left: auto;
  font-family: var(--caps);
  font-size: .75rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brown);
  background: transparent;
  border: 1px solid var(--gold);
  border-radius: 2px;
  padding: .5rem .8rem;
  cursor: pointer;
}

.bars,
.bars::before,
.bars::after {
  display: block;
  width: 16px;
  height: 1px;
  background: var(--gold-text);
}
.bars { position: relative; }
.bars::before,
.bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -5px; }
.bars::after { top: 5px; }

.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 899.98px) {
  /* No JS: links stay visible as a scrollable row */
  .nav-links {
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links::-webkit-scrollbar { display: none; }

  /* With JS: collapse into a menu */
  .js .nav-toggle { display: inline-flex; }
  .js .nav-links { display: none; }
  .js .site-nav.is-open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    overflow: visible;
    padding: .5rem 1.25rem 1rem;
    background: var(--paper-2);
    border-bottom: 1px solid var(--gold);
    box-shadow: 0 16px 24px -20px rgba(91, 58, 34, .5);
  }
  .js .site-nav.is-open .nav-links a {
    padding: .85rem 0;
    border-bottom: 1px solid rgba(184, 146, 74, .3);
    text-align: center;
  }
  .js .site-nav.is-open .nav-links li:last-child a { border-bottom: 0; }
}

/* Hero */
.hero {
  position: relative;
  height: calc(100vh - var(--nav-h));
  height: calc(100svh - var(--nav-h));
  min-height: 560px;
  overflow: hidden;
  background: var(--paper);
  container-type: size;
}

/* A box with the art's exact 9:16 proportions: fills the height on phones,
   fills the width (top aligned) on wider small screens. */
.hero-art {
  position: absolute;
  top: 0;
  left: 50%;
  width: max(100cqw, 56.25cqh);
  aspect-ratio: 9 / 16;
  transform: translateX(-50%);
  container-type: size;
}

@media (max-width: 899.98px) {
  .hero-art { background: url("images/o5-hero.webp") center / cover no-repeat; }
}

/* Text sits inside the empty cream of the arch, above the beach. */
.hero-text {
  position: absolute;
  top: 18%;
  left: 10%;
  right: 10%;
  height: 42%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.4;
}

.hero-text p,
.hero h1 { margin: 0; }

.caps {
  font-family: var(--caps);
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--gold-text);
  font-size: .8rem;
  font-weight: 500;
  margin: 0;
}

.hero .eyebrow {
  font-size: 2.8cqw;
  margin-bottom: 3cqw;
}

.hero h1 {
  font-weight: 400;
  line-height: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero .person {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero .name {
  font-family: var(--script);
  color: var(--brown);
  font-size: 13cqw;
  line-height: 1.08;
}

.hero .surname {
  font-family: var(--caps);
  text-transform: uppercase;
  letter-spacing: .32em;
  padding-left: .32em;
  font-size: 3cqw;
  color: var(--gold-text);
  margin-top: .4cqw;
}

.hero .amp {
  font-family: var(--script);
  color: var(--gold);
  font-size: 7cqw;
  margin: 1.5cqw 0 .5cqw;
}

.hero .when {
  font-family: var(--caps);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 2.7cqw;
  color: var(--brown);
  margin-top: 4.5cqw;
  text-wrap: balance;
}

.scroll-cue {
  margin-top: 3cqw;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .2em;
  font-family: var(--caps);
  text-transform: uppercase;
  letter-spacing: .3em;
  font-size: 2.4cqw;
  color: var(--gold-text);
  text-decoration: none;
  padding: .4em .8em;
}
.scroll-cue svg { width: 4.5cqw; height: 4.5cqw; animation: bob 2.4s ease-in-out 5.4s infinite; }

/* Staged reveal */
.reveal {
  opacity: 0;
  animation: rise 1.2s cubic-bezier(.2, .7, .2, 1) forwards;
}
.r1 { animation-delay: .3s; }
.r2 { animation-delay: 1s; }
.r3 { animation-delay: 1.6s; }
.r4 { animation-delay: 2.1s; }
.r5 { animation-delay: 2.6s; }
.r6 { animation-delay: 3.2s; }
.r7 { animation-delay: 3.9s; }
.r8 { animation-delay: 4.7s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(.5em); filter: blur(3px); }
  to { opacity: 1; transform: none; filter: none; }
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* Panels */
.panel {
  padding: 3.5rem 0;
  text-align: center;
}

.panel + .panel { padding-top: 1rem; }

.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin: 1.25rem auto;
  max-width: 260px;
}
.rule::before,
.rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.rule::after { background: linear-gradient(90deg, var(--gold), transparent); }
.rule span {
  width: 7px;
  height: 7px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}

.invitation { padding-top: 4rem; }

.script-xl {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(3rem, 14vw, 4rem);
  line-height: 1.1;
  color: var(--brown);
  margin: .6rem 0 0;
}

.script-md {
  font-family: var(--script);
  font-size: clamp(2rem, 9vw, 2.6rem);
  line-height: 1.2;
  color: var(--brown);
  margin: 0;
}

.script-title {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(2.6rem, 12vw, 3.4rem);
  line-height: 1.15;
  color: var(--brown);
  margin: .2rem 0 1.5rem;
}

.lede {
  font-size: 1.2rem;
  font-style: italic;
  max-width: 26rem;
  margin: 0 auto 1.5rem;
}

.invitation .lede { margin-bottom: .5rem; }
.story .lede { margin-bottom: 0; }

.tbd {
  font-family: var(--caps);
  font-size: .75rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin: 0;
}

/* Cards with thin gold double border */
.stack {
  display: grid;
  gap: 1.25rem;
  max-width: 560px;
  margin: 0 auto;
}

.card {
  position: relative;
  background: var(--paper-2);
  border: 4px double var(--gold);
  padding: 1.75rem 1.25rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 10px 24px -18px rgba(91, 58, 34, .45);
}

.card h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.45rem;
  line-height: 1.25;
  color: var(--brown);
  margin: .2rem 0 .4rem;
}

.card .day { font-size: .78rem; }

.card .event {
  font-style: italic;
  font-size: 1.25rem;
  margin: 0 0 .6rem;
}

.card .meta {
  margin: .1rem 0;
  font-size: 1.05rem;
}

/* FAQ */
.faq {
  text-align: left;
  margin: 0 auto;
  max-width: 560px;
  background: var(--paper-2);
  border: 4px double var(--gold);
  padding: 1.75rem 1.25rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 10px 24px -18px rgba(91, 58, 34, .45);
}
.faq .qa {
  padding: 1.1rem 0;
  border-bottom: 1px solid rgba(184, 146, 74, .35);
}
.faq .qa:first-child { padding-top: 0; }
.faq .qa:last-child { border-bottom: 0; padding-bottom: 0; }
.faq dt {
  font-weight: 600;
  color: var(--brown);
  font-size: 1.2rem;
}
.faq dd { margin: .2rem 0 0; }

/* RSVP form */
.rsvp-card {
  max-width: 560px;
  margin: 0 auto;
}

.rsvp { text-align: left; }

.field {
  margin: 0 0 1.2rem;
  padding: 0;
  border: 0;
  min-width: 0;
}

.field label,
.field legend {
  display: block;
  font-family: var(--caps);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin-bottom: .4rem;
  padding: 0;
}

.field input:not([type="radio"]):not([type="checkbox"]),
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1.1rem;
  color: var(--ink);
  background: #fffdf8;
  border: 1px solid #d9c59c;
  border-radius: 2px;
  padding: .6rem .75rem;
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}

.choices { display: grid; gap: .5rem; }

.field .choice {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  margin: 0;
  cursor: pointer;
}

.choice input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--gold-text);
  flex: none;
}

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

.btn {
  display: inline-block;
  width: 100%;
  font-family: var(--caps);
  font-size: .9rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  color: #fffaf0;
  background: linear-gradient(180deg, #a5803d, #85642a);
  border: 1px solid #85642a;
  box-shadow: 0 0 0 3px var(--paper-2), 0 0 0 4px var(--gold);
  padding: .95rem 1.5rem;
  margin-top: .5rem;
  cursor: pointer;
}
.btn:hover { background: linear-gradient(180deg, #8f6d31, #6f5322); }

/* Footer beach scene */
.footer {
  text-align: center;
  padding-top: 2rem;
}
.footer .caps { margin-top: .4rem; }
.footer-scene {
  width: 100%;
  height: auto;
  margin-top: -1rem;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 22%);
}

/* Thank you page */
.thanks .hero-text { left: 14%; right: 14%; }
.thanks .hero-text p { font-size: 3.6cqw; line-height: 1.5; color: var(--ink); font-family: var(--serif); }
.thanks .hero-text .caps { font-family: var(--caps); font-size: 3cqw; color: var(--gold-text); }
.thanks .hero .name { font-size: 15cqw; margin-bottom: 2cqw; }
.thanks .back {
  margin-top: 4cqw;
  font-family: var(--caps);
  font-size: 2.8cqw;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--brown);
  border: 3px double var(--gold);
  padding: .8em 1.4em;
  background: rgba(251, 247, 238, .85);
}

/* Desktop: full width website */
@media (min-width: 900px) {
  :root { --nav-h: 68px; }

  .wrap { padding: 0 2rem; }

  .monogram { font-size: 2.2rem; }
  .nav-links { margin-left: auto; gap: clamp(1.25rem, 2.6vw, 2.5rem); }

  /* Hero: wide arch art as a full-bleed background */
  .hero {
    min-height: 640px;
    background: var(--paper) url("images/o5-hero-wide.webp") center top / cover no-repeat;
  }

  .hero-art {
    left: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    transform: none;
  }

  /*
    Geometry of the cover-scaled 1280x720 art, measured in hero units.
    The cream inside the arch sits at about 12% to 48% of the art height
    and the centre 60% of its width.
  */
  .hero-text {
    --ih: max(100cqh, 56.25cqw);
    --iw: max(100cqw, 177.78cqh);
    --bw: min(var(--iw) * .6, 100cqw - 3rem);
    --f: min(var(--ih) * .092, var(--bw) / 9.5, 7.5rem);
    top: calc(var(--ih) * .12);
    height: calc(var(--ih) * .36);
    left: 0;
    right: 0;
    width: var(--bw);
    margin: 0 auto;
    isolation: isolate;
  }

  /* Soft cream glow for legibility */
  .hero-text::before {
    content: "";
    position: absolute;
    inset: -8% 4%;
    z-index: -1;
    background: radial-gradient(closest-side, rgba(251, 247, 238, .9), rgba(251, 247, 238, .55) 55%, rgba(251, 247, 238, 0));
    pointer-events: none;
  }

  .hero .eyebrow {
    font-size: max(.8rem, var(--f) * .19);
    margin-bottom: calc(var(--f) * .3);
  }

  .hero h1 {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: calc(var(--f) * .35);
  }

  .hero .name { font-size: var(--f); }

  .hero .surname {
    font-size: max(.75rem, var(--f) * .2);
    margin-top: calc(var(--f) * .02);
  }

  .hero .amp {
    font-size: calc(var(--f) * .7);
    margin: 0 0 calc(var(--f) * .3);
  }

  .hero .when {
    font-size: max(.85rem, var(--f) * .21);
    margin-top: calc(var(--f) * .4);
  }

  /* Scroll cue anchored near the bottom centre of the hero */
  .scroll-cue {
    position: absolute;
    left: 0;
    right: 0;
    width: max-content;
    margin: 0 auto;
    bottom: calc(1.25rem - (100cqh - var(--ih) * .48));
    font-size: .72rem;
    background: rgba(251, 247, 238, .8);
    border-radius: 2em;
    padding: .55em 1.2em .45em 1.5em;
  }
  .scroll-cue svg { width: 18px; height: 18px; }

  /* Sections */
  .panel { padding: 5.5rem 0; }
  .panel + .panel { padding-top: 5.5rem; }
  .panel.alt { background: rgba(251, 247, 238, .7); }

  .invitation {
    padding: 4.5rem 0 5rem;
    background: var(--paper-2);
    border-top: 1px solid var(--gold);
    border-bottom: 1px solid var(--gold);
    box-shadow: inset 0 4px 0 var(--paper-2), inset 0 5px 0 rgba(184, 146, 74, .5), inset 0 -4px 0 var(--paper-2), inset 0 -5px 0 rgba(184, 146, 74, .5);
  }
  .invitation .rule { max-width: 360px; }
  .script-xl { font-size: 4.75rem; }
  .script-md { font-size: 2.9rem; }
  .script-title { font-size: 3.9rem; margin-bottom: 2.5rem; }
  .lede { font-size: 1.35rem; max-width: 34rem; }

  .story .wrap { max-width: 760px; }

  .stack { max-width: none; gap: 2rem; }
  .cols-3 { grid-template-columns: repeat(3, 1fr); }
  .cols-2 { grid-template-columns: repeat(2, 1fr); max-width: 940px; }
  .card { padding: 2.5rem 2rem; }

  .faq {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 3.5rem;
    max-width: 1000px;
    padding: 2.5rem 3rem;
  }
  .faq .qa,
  .faq .qa:first-child,
  .faq .qa:last-child { padding: 1.25rem 0; }

  .rsvp-card { max-width: 720px; padding: 2.75rem 3rem; }
  .rsvp {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1.5rem;
  }
  .rsvp > * { grid-column: 1 / -1; }
  .rsvp > .half { grid-column: auto; }
  .rsvp .field { margin-bottom: 1.4rem; }
  .rsvp .choices { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .5rem 1.5rem; }
  .btn { margin-top: 1rem; }

  /* Footer: text above a full-bleed beach scene */
  .footer { padding-top: 4.5rem; }
  .footer .script-md { font-size: 3.4rem; }
  .footer-scene {
    height: clamp(320px, 28vw, 420px);
    object-fit: cover;
    object-position: center 62%;
    margin-top: -.5rem;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 30%);
  }

  /* Thank you page in the wide arch */
  .thanks .hero-text {
    --f: min(var(--ih) * .1, var(--bw) / 5, 6.5rem);
    height: calc(var(--ih) * .4);
    left: 0;
    right: 0;
  }
  .thanks .hero .name { font-size: var(--f); margin-bottom: calc(var(--f) * .12); }
  .thanks .hero-text .caps { font-size: max(.78rem, var(--f) * .17); }
  .thanks .hero-text .note {
    font-size: max(1.15rem, var(--f) * .26);
    max-width: 28em;
    margin-bottom: calc(var(--f) * .25);
  }
  .thanks .back {
    margin-top: calc(var(--f) * .3);
    font-size: .78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal,
  .scroll-cue svg {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
  }
}
