:root {
  --forest: #173d2b;
  --forest-soft: #2e513d;
  --paper: #f0e8d9;
  --paper-deep: #e3d4b9;
  --oat: #c7aa7b;
  --khaki: #9a875e;
  --cocoa: #76553c;
  --brown: #473429;
  --ink: #25251e;
  --line: rgba(37,37,30,.2);
  --serif: Iowan Old Style, Baskerville, "Times New Roman", serif;
  --sans: Avenir Next, Avenir, Helvetica Neue, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; overflow-x: clip; }
body { min-width: 320px; margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); line-height: 1.65; overflow-x: clip; }
body.gate-open { overflow: hidden; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; }
button, input { font: inherit; }

.overline { margin: 0; font-size: 10px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; }
.envelope-gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; color: #fff; background: var(--forest); transition: opacity .8s ease, visibility .8s; }
.envelope-gate.opened { opacity: 0; visibility: hidden; }
.gate-photo { position: absolute; inset: 0; background: url("assets/final-1-large.jpg") center 48%/cover no-repeat; filter: saturate(.8); }
.gate-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,45,31,.84), rgba(15,45,31,.38)), linear-gradient(0deg, rgba(12,29,20,.6), transparent 55%); }
.gate-content { position: relative; z-index: 2; width: min(90vw, 700px); padding: 48px 20px; text-align: center; }
.gate-content h1 { margin: 12px 0 5px; font: clamp(58px, 11vw, 112px)/.85 var(--serif); letter-spacing: -.06em; text-shadow: 0 2px 30px rgba(0,0,0,.18); }
.gate-content h1 em { color: var(--paper-deep); font-size: .7em; font-weight: 400; }
.gate-date { margin: 22px 0 30px; letter-spacing: .35em; font-size: 12px; }
.tap-note { margin-top: 18px; font-size: 9px; letter-spacing: .22em; text-transform: uppercase; }
.envelope { position: relative; width: 166px; height: 112px; padding: 0; border: 0; background: transparent; cursor: pointer; perspective: 700px; filter: drop-shadow(0 15px 18px rgba(0,0,0,.2)); }
.envelope-back, .envelope-front, .envelope-flap, .envelope-letter { position: absolute; left: 0; width: 100%; }
.envelope-back { inset: 0; background: #c7aa7b; }
.envelope-letter { bottom: 8px; left: 12%; width: 76%; height: 87%; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--forest); background: #f5edde; font: 23px var(--serif); transition: transform .5s .2s; }
.envelope-letter i { color: var(--cocoa); font-size: 15px; }
.envelope-front { bottom: 0; height: 100%; background: #d2b98d; clip-path: polygon(0 28%, 50% 68%, 100% 28%, 100% 100%, 0 100%); }
.envelope-flap { top: 0; height: 62%; background: #b99562; clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top; transition: transform .4s; }
.envelope:hover .envelope-flap, .envelope:focus-visible .envelope-flap { transform: rotateX(168deg); }
.envelope:hover .envelope-letter, .envelope:focus-visible .envelope-letter { transform: translateY(-30px); }

.site-header { position: sticky; top: 0; z-index: 30; min-height: 76px; padding: 0 clamp(22px, 5vw, 78px); display: flex; align-items: center; justify-content: space-between; color: var(--paper); background: rgba(23,61,43,.96); border-bottom: 1px solid rgba(255,255,255,.15); backdrop-filter: blur(10px); }
.brand { text-decoration: none; font: 25px var(--serif); letter-spacing: .08em; }
.brand span { margin: 0 2px; color: var(--oat); font-size: 13px; }
.site-header nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 44px); }
.site-header nav a, .menu-button { font-size: 9px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; }
.nav-rsvp { padding: 10px 16px; border: 1px solid rgba(255,255,255,.45); }
.menu-button { display: none; color: inherit; border: 0; background: transparent; }

.music-toggle { position: fixed; right: 18px; bottom: 18px; z-index: 40; min-height: 46px; padding: 0 16px 0 11px; display: inline-flex; align-items: center; gap: 9px; color: var(--paper); background: rgba(23,61,43,.92); border: 1px solid rgba(240,232,217,.4); border-radius: 999px; box-shadow: 0 8px 25px rgba(0,0,0,.18); cursor: pointer; backdrop-filter: blur(8px); }
.music-toggle[hidden] { display: none; }
.music-icon { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: var(--forest); background: var(--oat); font-size: 14px; }
.music-label { font-size: 8px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.music-toggle.is-paused .music-icon { color: var(--paper); background: var(--cocoa); }

.hero { min-height: calc(100vh - 76px); padding: 0; display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(390px, .82fr); background: var(--forest); color: var(--paper); }
.hero-image { min-height: 760px; background: linear-gradient(90deg, transparent 65%, rgba(23,61,43,.5)), url("assets/final-1-large.jpg") center 48%/cover no-repeat; }
.hero-copy { min-width: 0; padding: 80px clamp(30px, 6vw, 90px) 65px clamp(30px, 5vw, 75px); display: flex; flex-direction: column; justify-content: center; }
.hero-copy h1 { margin: 22px 0; font: clamp(65px, 8.5vw, 135px)/.76 var(--serif); letter-spacing: -.06em; }
.hero-copy h1 span { color: var(--oat); font-size: .53em; font-weight: 400; font-style: italic; }
.hero-invite { font: italic 20px/1.5 var(--serif); color: rgba(240,232,217,.83); }
.hero-date { margin: 45px 0 35px; padding: 20px 0; display: grid; grid-template-columns: 1fr .75fr 1.2fr; align-items: center; border-top: 1px solid rgba(255,255,255,.22); border-bottom: 1px solid rgba(255,255,255,.22); }
.hero-date span { font-size: 9px; letter-spacing: .15em; text-transform: uppercase; }
.hero-date strong { font: 58px/1 var(--serif); text-align: center; }
.hero-date span:last-child { padding-left: 18px; border-left: 1px solid rgba(255,255,255,.25); }
.scroll-cue { align-self: flex-start; font-size: 9px; letter-spacing: .17em; text-transform: uppercase; text-underline-offset: 7px; }

section { padding: clamp(85px, 11vw, 165px) clamp(22px, 7vw, 110px); scroll-margin-top: 76px; }
.welcome { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 9vw; background: var(--paper-deep); }
.welcome blockquote { max-width: 750px; margin: 25px 0 0; font: clamp(47px, 7vw, 93px)/1.02 var(--serif); letter-spacing: -.045em; }
.portrait { margin: 0; }
.portrait img { aspect-ratio: 3/4; filter: sepia(.1) saturate(.85); }
.portrait figcaption { margin-top: 12px; font: italic 16px var(--serif); text-align: right; }

.countdown-section { position: relative; display: grid; grid-template-columns: .8fr 1.2fr; gap: 10vw; color: var(--paper); background: var(--cocoa); overflow: hidden; }
.weave-mark { position: absolute; inset: 0; opacity: .12; background-image: linear-gradient(45deg, transparent 45%, var(--paper) 45%, var(--paper) 55%, transparent 55%), linear-gradient(-45deg, transparent 45%, var(--paper) 45%, var(--paper) 55%, transparent 55%); background-size: 42px 42px; }
.countdown-copy, .countdown { position: relative; z-index: 1; }
.countdown-copy h2, .section-title h2, .attire-copy h2, .gift-copy h2, .faq h2, .rsvp-panel h2 { margin: 18px 0 0; font: clamp(48px, 7vw, 91px)/.95 var(--serif); letter-spacing: -.045em; }
.countdown { align-self: end; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(255,255,255,.4); }
.countdown div { padding: 28px 10px 0; border-right: 1px solid rgba(255,255,255,.25); text-align: center; }
.countdown div:last-child { border-right: 0; }
.countdown strong { display: block; font: clamp(35px, 5vw, 70px) var(--serif); }
.countdown span { font-size: 8px; letter-spacing: .2em; text-transform: uppercase; }

.details { background: var(--paper); }
.section-title { max-width: 760px; margin-bottom: 70px; }
.venue { display: grid; grid-template-columns: 80px 1fr 1fr; min-height: 480px; border-top: 1px solid var(--line); }
.venue:last-child { border-bottom: 1px solid var(--line); }
.venue-number { padding-top: 42px; font: italic 15px var(--serif); }
.venue-body { padding: 42px clamp(25px, 5vw, 70px) 42px 10px; }
.venue-body h3 { margin: 19px 0; font: clamp(35px, 4vw, 58px)/1 var(--serif); letter-spacing: -.035em; }
.button { min-height: 50px; padding: 0 22px; display: inline-flex; align-items: center; gap: 20px; border: 1px solid var(--ink); text-decoration: none; text-transform: uppercase; letter-spacing: .14em; font-size: 9px; transition: .25s ease; }
.button:hover { color: var(--paper); background: var(--forest); border-color: var(--forest); transform: translateY(-2px); }
.map-frame { min-height: 100%; background: var(--paper-deep); }
.map-frame iframe { width: 100%; height: 100%; min-height: 430px; display: block; border: 0; filter: sepia(.28) saturate(.6) contrast(.95); }

.photo-break { display: grid; grid-template-columns: 1.45fr .55fr; padding: 0; background: var(--forest); color: var(--paper); }
.wide-photo { margin: 0; min-height: 690px; }
.wide-photo img { object-position: center 62%; }
.photo-note { padding: 65px 40px; align-self: center; text-align: center; }
.script-mark { font: italic clamp(44px, 6vw, 79px) var(--serif); color: var(--oat); }
.photo-note p { font: italic 22px/1.5 var(--serif); }

.entourage { background: #e7dcc8; }
.party-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.party-card { min-height: 150px; padding: 28px clamp(20px, 3vw, 48px); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.party-card.featured { min-height: 215px; background: rgba(255,255,255,.24); }
.party-card.span-two { grid-column: 1/-1; }
.party-card h3 { margin: 0 0 16px; color: var(--cocoa); font-size: 9px; letter-spacing: .2em; text-transform: uppercase; }
.party-card p { margin: 3px 0; font: 20px var(--serif); }
.name-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 50px; }

.attire { display: grid; grid-template-columns: 1.05fr .95fr; padding: 0; background: var(--paper-deep); }
.attire-photo { min-height: 760px; }
.attire-photo img { object-position: center 46%; }
.attire-copy { padding: clamp(70px, 10vw, 145px) clamp(30px, 7vw, 110px); align-self: center; }
.attire-copy > p:not(.overline) { max-width: 530px; margin: 28px 0 40px; }
.swatches { display: flex; height: 140px; }
.swatches span { flex: 1; position: relative; background: var(--color); }
.swatches i { position: absolute; left: 50%; bottom: 10px; writing-mode: vertical-rl; transform: translateX(-50%) rotate(180deg); color: var(--ink); font: normal 7px var(--sans); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
.swatches span:nth-child(n+4) i { color: var(--paper); }

.gifts-share { display: grid; grid-template-columns: 1.25fr .75fr; gap: 9vw; align-items: center; background: var(--paper); }
.gift-copy > p:not(.overline) { max-width: 720px; margin-top: 30px; }
.gift-qr-card { max-width: 660px; margin-top: 42px; padding: 24px; display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: center; border: 1px solid var(--line); background: rgba(255,255,255,.25); }
.qr-art { width: 180px; aspect-ratio: 1; overflow: hidden; background: #fff; border: 8px solid #fff; box-shadow: 0 8px 24px rgba(37,37,30,.12); }
.qr-art img { width: 100%; height: 100%; object-fit: contain; }
.qr-copy h3 { margin: 10px 0 6px; font: 27px/1.1 var(--serif); }
.qr-copy > p:last-child { margin: 0; font-size: 13px; }
.share-card { aspect-ratio: 1; padding: 50px; display: flex; flex-direction: column; justify-content: center; border-radius: 50%; text-align: center; color: var(--paper); background: var(--forest); }
.share-card > span { font: 80px/1 var(--serif); color: var(--oat); }
.share-card h3 { margin: 5px 0; font: italic clamp(24px, 3vw, 38px) var(--serif); overflow-wrap: anywhere; }

.faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: 9vw; color: var(--paper); background: var(--brown); }
.faq-list { border-top: 1px solid rgba(255,255,255,.25); }
details { padding: 25px 0; border-bottom: 1px solid rgba(255,255,255,.25); }
summary { cursor: pointer; list-style: none; font: 25px var(--serif); }
summary::after { content: "+"; float: right; color: var(--oat); }
details[open] summary::after { content: "−"; }
details p { max-width: 680px; color: rgba(240,232,217,.72); }

.rsvp { min-height: 820px; display: grid; grid-template-columns: 1.15fr .85fr; padding: 0; background: var(--forest); color: var(--paper); }
.rsvp-photo { background: linear-gradient(90deg, transparent 65%, rgba(23,61,43,.6)), url("assets/final-3-large.jpg") center 36%/cover no-repeat; }
.rsvp-panel { padding: clamp(80px, 11vw, 160px) clamp(30px, 7vw, 100px); align-self: center; }
.rsvp.has-form { grid-template-columns: minmax(340px, .72fr) minmax(560px, 1.28fr); }
.rsvp.has-form .rsvp-panel { padding: clamp(70px, 8vw, 110px) clamp(30px, 5vw, 70px); }
.rsvp-panel > p:not(.overline) { max-width: 500px; margin: 28px 0 35px; color: rgba(240,232,217,.78); }
.button-light { color: var(--forest); background: var(--paper); border-color: var(--paper); }
.button.is-pending { opacity: .58; cursor: default; }
.rsvp-embed { max-width: 760px; margin-top: 40px; overflow: hidden; background: #fff; border-radius: 2px; }
.rsvp-embed iframe { width: 100%; min-height: 1120px; display: block; border: 0; background: #fff; }

footer { min-height: 420px; padding: 95px 22px 35px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--paper-deep); text-align: center; }
footer h2 { margin: 10px 0 4px; font: italic clamp(52px, 8vw, 105px)/1 var(--serif); letter-spacing: -.04em; }
footer > p:nth-of-type(2) { letter-spacing: .22em; font-size: 10px; }
footer a { margin-top: auto; font-size: 9px; letter-spacing: .16em; text-transform: uppercase; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .75s ease, transform .75s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .envelope-gate { transition: none; }
}

@media (min-width: 901px) and (max-width: 1200px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr); }
  .hero-image { min-height: 680px; }
  .hero-copy { padding: 60px 42px; }
  .hero-copy h1 { font-size: clamp(68px, 8.5vw, 102px); }
  .hero-date { margin-top: 30px; }
  .venue { grid-template-columns: 54px minmax(300px, .9fr) minmax(350px, 1.1fr); }
  .venue-body { padding-right: 35px; }
  .wide-photo { min-height: 590px; }
  .attire-photo { min-height: 680px; }
  .rsvp.has-form { grid-template-columns: minmax(300px, .65fr) minmax(500px, 1.35fr); }
  .rsvp.has-form .rsvp-panel { padding-inline: 38px; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-image { min-height: 68svh; background-image: linear-gradient(0deg, rgba(23,61,43,.7), transparent 55%), url("assets/final-1-large.jpg"); background-position: center 48%; }
  .hero-copy { padding-top: 65px; }
  .welcome, .countdown-section, .attire, .gifts-share, .faq, .rsvp { grid-template-columns: 1fr; }
  .portrait { width: 72%; justify-self: end; }
  .countdown { margin-top: 35px; }
  .venue { grid-template-columns: 60px 1fr; }
  .map-frame { grid-column: 1/-1; min-height: 380px; }
  .photo-break { grid-template-columns: 1fr; }
  .photo-note { padding: 70px 30px; }
  .wide-photo { min-height: 520px; }
  .attire-photo { min-height: 620px; }
  .share-card { width: min(450px, 90%); justify-self: center; }
  .rsvp { min-height: auto; }
  .rsvp.has-form { grid-template-columns: 1fr; }
  .rsvp-photo { min-height: 620px; background-image: linear-gradient(0deg, rgba(23,61,43,.6), transparent 55%), url("assets/final-3-large.jpg"); background-position: center 36%; }
}

@media (max-width: 620px) {
  .site-header { min-height: 68px; }
  .menu-button { display: block; }
  .site-header nav { position: absolute; top: 68px; left: 0; right: 0; padding: 25px; display: none; flex-direction: column; align-items: stretch; gap: 18px; background: var(--forest); border-top: 1px solid rgba(255,255,255,.15); }
  .site-header nav.open { display: flex; }
  .site-header nav a { text-align: center; }
  .music-toggle { right: 12px; bottom: 12px; padding-right: 11px; }
  .music-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .gate-photo { background-image: url("assets/final-1-mobile.jpg"); background-position: 52% 48%; }
  .gate-shade { background: linear-gradient(0deg, rgba(12,29,20,.76), rgba(15,45,31,.15) 72%), linear-gradient(90deg, rgba(15,45,31,.48), rgba(15,45,31,.18)); }
  .gate-content { width: 100%; padding: 32px 18px; }
  .gate-content h1 { font-size: clamp(54px, 18vw, 78px); }
  .gate-date { margin: 17px 0 24px; }
  .envelope { width: 150px; height: 101px; }
  section { padding: 76px 20px; scroll-margin-top: 68px; }
  .hero { min-height: auto; }
  .hero-image { min-height: 60svh; background-image: linear-gradient(0deg, rgba(23,61,43,.72), transparent 58%), url("assets/final-1-mobile.jpg"); background-position: center 48%; }
  .hero-copy { padding: 58px 20px 72px; }
  .hero-copy h1 { font-size: clamp(68px, 23vw, 105px); }
  .hero-invite { font-size: 18px; }
  .hero-date strong { font-size: 48px; }
  .welcome { gap: 55px; }
  .welcome blockquote { font-size: clamp(43px, 13vw, 62px); }
  .portrait { width: 90%; }
  .countdown { grid-template-columns: 1fr 1fr; border-left: 1px solid rgba(255,255,255,.25); }
  .countdown div { border-bottom: 1px solid rgba(255,255,255,.25); }
  .venue { grid-template-columns: 38px 1fr; }
  .venue-number { padding-top: 35px; }
  .venue-body { padding: 35px 0 35px 12px; }
  .venue-body h3 { font-size: clamp(34px, 10vw, 46px); }
  .map-frame { min-height: 0; aspect-ratio: 4/3; }
  .map-frame iframe { min-height: 100%; }
  .section-title { margin-bottom: 48px; }
  .countdown-copy h2, .section-title h2, .attire-copy h2, .gift-copy h2, .faq h2, .rsvp-panel h2 { font-size: clamp(45px, 13vw, 64px); }
  .wide-photo { min-height: 440px; }
  .wide-photo img { object-position: center 64%; }
  .party-grid { grid-template-columns: 1fr; }
  .party-card.span-two { grid-column: auto; }
  .name-columns { grid-template-columns: 1fr; }
  .attire-photo { min-height: 560px; }
  .attire-photo img { object-position: center 44%; }
  .attire-copy, .rsvp-panel { padding: 76px 20px; }
  .rsvp-photo { min-height: 430px; background-image: linear-gradient(0deg, rgba(23,61,43,.58), transparent 58%), url("assets/final-3-mobile.jpg"); background-position: center 36%; }
  .rsvp-embed { margin-top: 32px; }
  .rsvp-embed iframe { min-height: 1050px; }
  .swatches { height: 115px; }
  .share-card { padding: 38px; }
  .gift-qr-card { grid-template-columns: 1fr; gap: 20px; padding: 22px; text-align: center; }
  .qr-art { width: min(210px, 100%); justify-self: center; border-width: 6px; }
  .qr-copy h3 { font-size: 24px; }
  footer { min-height: 360px; padding-top: 78px; }
}

@media (max-width: 380px) {
  .site-header { padding-inline: 16px; }
  .hero-copy h1 { font-size: 66px; }
  .hero-date { grid-template-columns: 1fr .65fr 1.15fr; }
  .hero-date span { font-size: 8px; }
  .hero-date span:last-child { padding-left: 12px; }
  .venue { grid-template-columns: 30px 1fr; }
  .venue-body { padding-left: 8px; }
  .button { padding-inline: 17px; gap: 14px; }
  .party-card { padding-inline: 20px; }
  .qr-art { width: min(190px, 100%); }
}
