:root {
  --sage: #8c9a7e;
  --sage-deep: #5f6d52;
  --olive: #6b6a3f;
  --champagne: #e9dcc3;
  --blush: #e8c9c0;
  --rose: #b98a86;
  --paper: #fbf7ef;
  --linen: #ece4d3;
  --ink: #3d4237;
  --muted: #7a7f70;
  --muted-text: #5f6455;
  --rose-text: #8e5f5b;
  --line: #d9d2c1;
  --script: "Pinyon Script", "Snell Roundhand", cursive;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Jost", "Avenir Next", "Helvetica Neue", sans-serif;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 19px/1.6 var(--serif); }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0 0 1em; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 96px var(--gutter); }
.wrap.narrow { max-width: 720px; }
.center { text-align: center; }
section { position: relative; }
.sage { background: var(--sage-deep); color: var(--paper); }
.linen { background: var(--linen); }
/* To add a lace texture you own: save it as raw-images/lace.jpg, run npm run images, then add: background-image: url("/img/lace-1600.webp"); background-size: cover; */
.lace { background: var(--paper) url("/img/art/lace-tile.svg") center / 160px 200px repeat; }

.display { font-family: var(--serif); font-weight: 300; text-transform: uppercase; letter-spacing: .08em; font-size: clamp(30px, 5vw, 48px); line-height: 1.15; }
.script { font-family: var(--script); font-size: clamp(32px, 5vw, 44px); line-height: 1.2; text-transform: none; letter-spacing: 0; }
.script.big { font-size: clamp(42px, 8vw, 64px); }
.eyebrow { font: 500 12px/1.4 var(--sans); letter-spacing: .28em; text-transform: uppercase; margin-bottom: 12px; }
.label { font: 500 13px/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; margin: 32px 0 10px; color: var(--sage-deep); }
.logo { display: block; background-color: currentColor; -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; }
.logo-oval { --logo: url("/brand/ab-oval.svg"); aspect-ratio: 808.29 / 1000; }
.logo-names-line { --logo: url("/brand/names-line.svg"); aspect-ratio: 3314.87 / 400; }
.logo-names-stacked { --logo: url("/brand/names-stacked.svg"); aspect-ratio: 1768.89 / 600; }
.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; }
.monogram-logo { width: 64px; margin: 0 auto 18px; }
.monogram-logo.small { width: 44px; }
.card .monogram-logo { color: var(--sage-deep); }
.hero-names { margin: 0 auto 8px; }
.hero-names .logo-names-line { width: min(720px, 86vw); margin: 0 auto; }
.hero-names .logo-names-stacked { display: none; width: min(320px, 78vw); margin: 0 auto; }
.welcome-names { width: min(300px, 70%); margin: 4px auto 0; color: var(--sage-deep); }

.btn { display: inline-block; font: 500 13px var(--sans); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; padding: 16px 30px; border: 1px solid transparent; cursor: pointer; transition: background .2s, color .2s; }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-ghost { background: rgba(251, 247, 239, .25); color: var(--paper); border-color: rgba(251, 247, 239, .5); }
.btn-outline-light { border-color: var(--paper); color: var(--paper); margin-top: 8px; }
.btn-outline-light:hover { background: var(--paper); color: var(--sage-deep); }
.btn-sage { background: var(--sage-deep); color: var(--paper); width: 100%; }
.btn-sage:hover { background: var(--olive); }
.btn-sage:disabled { opacity: .6; cursor: progress; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }

/* hero */
.hero { position: relative; min-height: min(100svh, 860px); display: grid; place-items: end center; color: var(--paper); text-align: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% center; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(30, 35, 25, .35), rgba(30, 35, 25, .15) 40%, rgba(30, 35, 25, .55)); }
.hero-inner { position: relative; z-index: 1; width: 100%; padding: 48px var(--gutter) 64px; }
.hero-venues { display: flex; justify-content: space-between; gap: 24px; max-width: 900px; margin: 28px auto; font: 400 13px/1.6 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.hero-venues p:last-child { text-align: right; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* welcome */
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 56px; align-items: center; }
.welcome-text { text-align: center; }
.welcome-text .display { margin-bottom: 20px; }
.signoff { margin-top: 24px; font-style: italic; }

/* countdown */
.countdown-band { position: relative; overflow: hidden; color: var(--paper); background: var(--ink); }
.countdown-band .band-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 70%; }
.countdown-band::after { content: ""; position: absolute; inset: 0; background: rgba(30, 35, 25, .55); }
.countdown-band .wrap { position: relative; z-index: 1; }
.countdown-band h2, .countdown-band .countdown span, .countdown-band .countdown small, .countdown-band .countdown-done { color: var(--paper); }
.countdown-band .wrap { padding-block: 64px; }
.countdown { display: flex; justify-content: center; gap: clamp(20px, 6vw, 56px); margin-top: 20px; }
.countdown span { display: block; font: 300 clamp(44px, 8vw, 72px)/1 var(--serif); color: var(--sage-deep); font-variant-numeric: tabular-nums; }
.countdown small { font: 500 11px var(--sans); letter-spacing: .25em; text-transform: uppercase; color: var(--muted-text); }
.countdown-done { margin-top: 16px; font-style: italic; }

/* schedule */
.date-line { font: 500 13px var(--sans); letter-spacing: .25em; text-transform: uppercase; color: var(--muted-text); margin: 8px 0 32px; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; padding: 0 0 28px 24px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--sage); }
.timeline time { font: 500 14px/1.9 var(--sans); letter-spacing: .08em; color: var(--sage-deep); font-variant-numeric: tabular-nums; }
.timeline h3 { font: 500 14px/1.9 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.timeline p { margin: 0; color: var(--muted-text); }

/* venues */
.venues { background: var(--sage-deep); }
.venue-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin-top: 40px; }
.venue { border: 1px solid rgba(251, 247, 239, .45); padding: 40px 28px; }
.venue h3 { font: 500 15px/1.5 var(--sans); letter-spacing: .2em; text-transform: uppercase; margin: 6px 0 10px; }
.venue .when { font: 500 13px var(--sans); letter-spacing: .2em; text-transform: uppercase; }

/* dress */
.swatches { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 22px; padding: 0; margin: 28px 0 36px; font: 500 11px var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.swatches span { display: block; width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 8px; border: 1px solid var(--line); }
.dress-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; text-align: left; }
.dress-grid h3 { font: 500 13px var(--sans); letter-spacing: .25em; text-transform: uppercase; color: var(--sage-deep); margin-bottom: 8px; }
.note { margin-top: 28px; font-style: italic; color: var(--rose-text); }

/* gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 36px; }
.gallery-grid .wide { grid-column: 1 / -1; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 5; }
.gallery-grid .wide { aspect-ratio: 16 / 10; }

/* rsvp */
.rsvp-banner { position: relative; overflow: hidden; }
.rsvp-banner > img { width: 100%; height: clamp(380px, 56vw, 640px); object-fit: cover; object-position: center 30%; }
.banner-art { position: absolute; left: 50%; top: 5%; transform: translateX(-50%); width: min(420px, 78%); display: flex; align-items: flex-end; justify-content: center; }
.envelope { position: relative; width: 78%; filter: drop-shadow(0 10px 18px rgba(20, 25, 15, .35)); }
.envelope img { width: 100%; display: block; }
.seal { position: absolute; left: 50%; top: 62%; transform: translate(-50%, -50%); width: 17%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fffaf0, #e9dcc3 70%, #d6c7a6); box-shadow: 0 3px 8px rgba(0, 0, 0, .3), inset 0 -2px 4px rgba(0, 0, 0, .12); display: grid; place-items: center; color: var(--sage-deep); }
.seal .logo { width: 52%; }
.sprig { width: 34%; margin-right: -16%; position: relative; z-index: 1; transform: rotate(-16deg); transform-origin: bottom center; filter: drop-shadow(0 2px 3px rgba(20, 25, 15, .45)); }
.sprig-right { margin: 0 0 0 -16%; transform: rotate(18deg) scaleX(-1); }

/* "Moments / Before Forever" heading, styled after the Canva lockup */
.moments-eyebrow { font: 600 20px/1 var(--serif); letter-spacing: .32em; text-transform: uppercase; color: var(--olive); margin-bottom: 22px; }
.moments-title { display: inline-grid; justify-items: start; line-height: 1; }
.mt-before { font: 300 clamp(48px, 8.5vw, 84px)/1 var(--serif); letter-spacing: .03em; color: var(--ink); }
.mt-before .swash { font-family: var(--script); font-weight: 400; font-size: 1.3em; line-height: 0; margin-right: -.02em; position: relative; top: .08em; }
.mt-forever { font: 400 clamp(44px, 7.5vw, 74px)/1 var(--script); color: var(--olive); margin: -.3em 0 0 2em; }
.rsvp { padding: 72px var(--gutter) 96px; }
.card { max-width: 620px; margin: 0 auto; background: var(--paper); color: var(--ink); padding: clamp(28px, 6vw, 56px); text-align: center; position: relative; box-shadow: 0 18px 50px rgba(48, 58, 40, .25); }
.card::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--line); pointer-events: none; }
.card .eyebrow { color: var(--rose-text); }
.lede { color: var(--muted-text); }
form { text-align: left; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 28px; position: relative; }
[data-attending-only] { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
[data-attending-only][hidden] { display: none; }
.field { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; }
.field label, .field legend { font: 500 12px/1.5 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--sage-deep); padding: 0; }
.req { color: var(--rose-text); }
input[type="text"], select, textarea { font: 400 18px/1.4 var(--serif); color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 0; padding: 12px 14px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sage-deep); box-shadow: 0 0 0 1px var(--sage-deep); }
::placeholder { color: #6f6f62; font-style: italic; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { position: relative; text-transform: none !important; letter-spacing: 0 !important; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: block; text-align: center; border: 1px solid var(--line); padding: 14px 10px; font: 400 18px var(--serif); color: var(--ink); background: #fff; }
.choice input:checked + span { background: var(--sage-deep); border-color: var(--sage-deep); color: var(--paper); }
.choice input:focus-visible + span { outline: 2px solid var(--rose); outline-offset: 2px; }
.check { display: flex !important; gap: 12px; align-items: flex-start; font: 400 17px/1.45 var(--serif) !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--ink) !important; cursor: pointer; }
.check input { accent-color: var(--sage-deep); width: 18px; height: 18px; margin-top: 4px; flex: none; }
.field-error, .form-error { color: #a0524b; font: 400 15px var(--sans); margin: 0; }
.cf-turnstile { min-height: 65px; }
.thanks { padding: 24px 0 8px; }
.thanks p { max-width: 36ch; margin: 12px auto 0; }

/* faq */
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
summary { cursor: pointer; font-size: 21px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--sans); color: var(--sage-deep); }
details[open] summary::after { content: "–"; }
details p { margin: 12px 0 0; color: var(--muted-text); }

/* closing */
.closing { position: relative; color: var(--paper); text-align: center; }
.closing img { width: 100%; height: clamp(360px, 60vw, 640px); object-fit: cover; }
.closing::after { content: ""; position: absolute; inset: 0; background: rgba(30, 35, 25, .35); }
.closing-inner { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; padding: 0 var(--gutter); }
.closing .display { font-size: clamp(34px, 6vw, 60px); }

@media (max-width: 760px) {
  .hero-names .logo-names-line { display: none; }
  .hero-names .logo-names-stacked { display: block; }
  body { font-size: 18px; }
  .wrap { padding-block: 64px; }
  .split, .venue-grid, .dress-grid { grid-template-columns: 1fr; }
  .split { gap: 32px; }
  .hero-venues { flex-direction: column; gap: 12px; }
  .hero-venues p:last-child { text-align: center; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .choices { grid-template-columns: 1fr; }
  .gallery-grid { gap: 10px; }
  .gallery-grid img { aspect-ratio: 3 / 4; }
  .gallery-grid .wide { aspect-ratio: 4 / 3; }

  /* hero: names below faces, readable over the photo */
  /* phones: whole photo on top, names on sage below (a landscape photo can't fill a tall screen without cutting one of you off) */
  .hero { display: block; min-height: 0; background: var(--sage-deep); }
  .hero-bg { position: relative; height: auto; aspect-ratio: 4 / 3; object-position: 40% center; }
  .hero::after { display: none; }
  .hero-inner { padding: 28px var(--gutter) 40px; }
  .hero-venues { display: none; }
  .hero .monogram-logo { width: 52px; margin-bottom: 12px; }
  .hero-actions { margin-top: 24px; }
  .hero-actions .btn { flex: 1 1 0; padding-inline: 10px; font-size: 12px; letter-spacing: .14em; white-space: nowrap; }

  /* welcome photo fills the column */
  .split img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

  /* dress-code swatches in one row */
  .swatches { flex-wrap: nowrap; gap: 8px; font-size: 9px; letter-spacing: .1em; }
  .swatches li { flex: 1 1 0; min-width: 0; }
  .swatches span { width: 44px; height: 44px; }

  /* four countdown units fit */
  .countdown { gap: 18px; }
  .countdown span { font-size: 40px; }
  .countdown small { font-size: 10px; letter-spacing: .15em; }
}
