/* ============================================================
   Natalia & Kyle — palette & type taken from the Save the Date
   Script:  Sacramento (stand-in for Rastanty Cortez)
   Caps:    Jost Light (stand-in for Congenial UltraLight)
   Numbers: Bodoni Moda (stand-in for Walbaum Display)
   Italic:  Cormorant Garamond
   ============================================================ */
:root {
  --navy: #163E64;
  --navy-soft: #3C5B7C;
  --cream: #F7F7EF;
  --sand: #F4ECDE;
  --shell: #FBF5E9;
  --peach: #F0C3A7;
  --peach-soft: #F3D9C6;
  --sea: #C5D2D9;
  --sea-deep: #8FA3B0;
  --line: rgba(22, 62, 100, .16);
  --shadow: 0 10px 30px -12px rgba(22, 62, 100, .22);

  --f-script: 'Rastanty Cortez', 'Sacramento', cursive;
  --f-sans: 'Jost', 'Segoe UI', system-ui, sans-serif;
  --f-didone: 'Walbaum Display', 'Bodoni Moda', 'Didot', Georgia, serif;
  --f-italic: 'Cormorant Garamond', Georgia, serif;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font: 300 17px/1.7 var(--f-sans);
  -webkit-font-smoothing: antialiased;
}
body.noscroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
strong { font-weight: 500; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- type helpers ---------- */
.script { font-family: var(--f-script); font-weight: 400; line-height: 1; }
.script svg.st, .art svg.st { display: inline-block; vertical-align: middle; max-width: 100%; height: auto; fill: currentColor; overflow: visible; }
.script svg.st path { stroke: currentColor; stroke-width: 9; stroke-linejoin: round; }
.art svg.st path { stroke: currentColor; stroke-width: var(--sw, 0); stroke-linejoin: round; }  /* Congenial UltraLight: names & monogram */  /* slightly heavier, like the printed save-the-date */
.caps { font-family: var(--f-sans); text-transform: uppercase; letter-spacing: .22em; font-weight: 300; }
.italic { font-family: var(--f-italic); font-style: italic; }
.eyebrow { font-size: 13px; text-transform: uppercase; letter-spacing: .32em; color: var(--navy-soft); margin-bottom: .6em; }
.lead { font-size: 1.15em; }
.muted { color: var(--navy-soft); }
.small { font-size: 14px; }
.center { text-align: center; }
.narrow { max-width: 720px; margin-left: auto; margin-right: auto; }
.fineprint { font-size: 14px; color: var(--navy-soft); max-width: 720px; margin: 2.5rem auto 0; }

h2.script { font-size: clamp(56px, 9vw, 92px); margin-bottom: .35em; }
.sub-head { font-size: 15px; letter-spacing: .3em; text-align: center; margin: 4rem 0 1.6rem; display: flex; align-items: center; gap: 1rem; }
.sub-head::before, .sub-head::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---------- layout ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(72px, 10vw, 120px) 0; }
.section--sand { background: var(--shell); }
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; cursor: pointer; border: 1px solid var(--navy);
  background: var(--navy); color: var(--cream); text-decoration: none;
  font: 400 13px/1 var(--f-sans); text-transform: uppercase; letter-spacing: .24em;
  padding: 16px 34px; border-radius: 999px; transition: background .2s, color .2s, transform .2s;
}
.btn:hover { background: transparent; color: var(--navy); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn--small { padding: 11px 20px; font-size: 11.5px; letter-spacing: .18em; }
.btn--ghost { background: transparent; color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: var(--cream); }
.btn--full { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; }
.link { background: none; border: 0; padding: 0; cursor: pointer; font: 400 14px var(--f-sans); color: var(--navy); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--peach); }
.tag { display: inline-block; font-size: 12px; text-transform: uppercase; letter-spacing: .18em; padding: 6px 14px; border-radius: 999px; background: var(--peach-soft); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: 64px;
  display: flex; align-items: center; gap: 24px; padding: 0 var(--gutter);
  transition: background .3s, box-shadow .3s;
}
.nav.scrolled, .nav.open { background: rgba(247, 247, 239, .94); backdrop-filter: blur(8px); box-shadow: 0 1px 0 var(--line); }
.nav__brand { font: 300 34px/1 var(--f-sans); text-decoration: none; margin-right: auto; display: flex; align-items: center; --sw: 16; }
.nav__links { display: flex; gap: 26px; align-items: center; }
.nav__links a { text-decoration: none; font-size: 12.5px; text-transform: uppercase; letter-spacing: .2em; position: relative; }
.nav__links a:not(.nav__cta)::after { content: ''; position: absolute; left: 0; right: 100%; bottom: -4px; height: 1px; background: var(--navy); transition: right .25s; }
.nav__links a:hover::after { right: 0; }
.nav__cta { border: 1px solid var(--navy); padding: 8px 16px; border-radius: 999px; }
.nav__cta:hover { background: var(--navy); color: var(--cream); }
.lang { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--sea-deep); }
.lang button { background: none; border: 0; padding: 4px; cursor: pointer; font: 400 12.5px var(--f-sans); letter-spacing: .16em; color: var(--sea-deep); }
.lang button[aria-pressed="true"] { color: var(--navy); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--peach); }
.nav__toggle { display: none; }

@media (max-width: 920px) {
  .nav { gap: 12px; }
  .nav__toggle { display: inline-flex; flex-direction: column; gap: 5px; background: none; border: 0; padding: 10px 6px; cursor: pointer; order: 3; }
  .nav__toggle span:not(.sr-only) { width: 22px; height: 1.5px; background: var(--navy); transition: transform .25s, opacity .25s; }
  .nav.open .nav__toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav.open .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav.open .nav__toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  .nav__links {
    position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: rgba(247, 247, 239, .98); box-shadow: 0 12px 20px -12px rgba(22, 62, 100, .2);
    max-height: 0; overflow: hidden; transition: max-height .35s ease;
  }
  .nav.open .nav__links { max-height: 420px; }
  .nav__links a { padding: 16px; width: 100%; text-align: center; border-top: 1px solid var(--line); }
  .nav__links a::after { display: none; }
  .nav__cta { border-radius: 0; border: 0; border-top: 1px solid var(--line); }
}

/* ---------- hero ---------- */
.hero {
  min-height: min(100vh, 1000px); min-height: min(100svh, 1000px);
  display: grid; place-items: center; text-align: center;
  padding: 110px var(--gutter) clamp(150px, 24vh, 280px);
  background:
    linear-gradient(180deg, var(--cream) 0%, rgba(247,247,239,.65) 22%, rgba(247,247,239,0) 55%),
    url('../img/watercolor.jpg') center bottom / cover no-repeat var(--cream);
}
.hero__inner { max-width: 1040px; }
.hero__eyebrow { font-size: clamp(23px, 3.1vw, 30px); margin: 0 0 .4em; }
.hero__names { font-size: clamp(38px, 5.4vw, 80px); font-weight: 300; letter-spacing: .09em; margin: .2em 0 .1em; --sw: 4; }
.hero__date { font: 500 clamp(52px, 9vw, 96px)/1 var(--f-didone); font-variation-settings: 'opsz' 24; margin: .25em 0 .3em; display: flex; justify-content: center; align-items: center; gap: .35em; }
.hero__date i { display: inline-block; width: 1.5px; height: 1.05em; background: var(--navy); }
.hero__place { font-size: clamp(14px, 2.2vw, 22px); letter-spacing: .2em; margin-bottom: .3em; }
.hero__sub { font-size: clamp(19px, 2.6vw, 25px); margin-bottom: 1.6em; }

.countdown { display: flex; justify-content: center; gap: clamp(10px, 3vw, 26px); margin: 0 0 2.2em; }
.countdown div { min-width: 64px; padding: 12px 6px 8px; border-radius: 14px; background: rgba(251, 245, 233, .65); backdrop-filter: blur(3px); }
.countdown b { display: block; font: 400 clamp(26px, 5vw, 40px)/1.1 var(--f-didone); }
.countdown span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .2em; color: var(--navy-soft); }
.event__date, .event__time, .countdown b { font-variation-settings: 'opsz' 24; font-weight: 500; }
.cd-done { font-size: 48px; margin: 0; }

/* ---------- welcome ---------- */
.welcome .birds { width: min(420px, 80%); margin: 0 auto 28px; opacity: .85; }
.welcome .lead { font-family: var(--f-italic); font-style: italic; font-size: 1.6em; line-height: 1.35; }

/* ---------- celebration ---------- */
.notice {
  display: flex; gap: 16px; align-items: flex-start; max-width: 760px; margin: 0 auto 44px;
  padding: 18px 22px; border-radius: 16px; background: var(--peach-soft); border: 1px solid rgba(240, 195, 167, .9);
}
.notice p { margin: 0; }
.dress-note { max-width: 760px; margin: 44px auto 0; text-align: center; }
.dress-note p { margin: 0; }
.dress-note p + p { margin-top: 8px; }
.notice a { text-decoration: underline; text-underline-offset: 3px; }
.field-hint { width: 100%; margin: -4px 0 4px; }
.notice__icon { font-size: 22px; line-height: 1.4; }
.events { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
@media (max-width: 760px) { .events { grid-template-columns: 1fr; } }
.event {
  background: var(--cream); border: 1px solid var(--line); border-radius: 22px;
  padding: 36px 28px; text-align: center; box-shadow: var(--shadow);
}
.event--main { background: #fff; }
.event__day { font-size: 13px; text-transform: uppercase; letter-spacing: .3em; color: var(--navy-soft); margin: 0; }
.event__date { font: 400 64px/1 var(--f-didone); margin: 6px 0 14px; }
.event__date small { display: block; font: italic 400 22px var(--f-italic); margin-top: 4px; }
.event h3 { font-size: 17px; margin-bottom: 14px; }
.event__time { font: 400 34px/1 var(--f-didone); margin-bottom: 12px; }
.event__venue { font: italic 400 24px/1.25 var(--f-italic); margin-bottom: 4px; }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 36px; }
@media (max-width: 600px) { .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; } .gallery__item { border-radius: 10px; } }
.gallery__item { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 5; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery__item:hover img { transform: scale(1.04); }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(14, 35, 58, .93); display: grid; place-items: center; padding: 56px 12px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 86vh; max-width: min(1100px, 100%); border-radius: 8px; object-fit: contain; }
.lightbox button { position: absolute; background: none; border: 0; color: var(--cream); cursor: pointer; font: 300 46px/1 var(--f-sans); padding: 10px 16px; }
.lightbox__close { top: 8px; right: 8px; }
.lightbox__prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 4px; top: 50%; transform: translateY(-50%); }

/* ---------- cards ---------- */
.card {
  background: var(--cream); border: 1px solid var(--line); border-radius: 18px; padding: 26px 24px;
  display: flex; flex-direction: column;
}
.section--sand .card { background: #fff; }
.card h4.caps { font-size: 14px; letter-spacing: .2em; margin-bottom: 10px; }
.card h4.italic { font-size: 25px; line-height: 1.15; margin-bottom: 8px; }
.card p { font-size: 15.5px; margin: 0; }
.card__icon { width: 30px; height: 30px; margin-bottom: 12px; color: var(--navy); }
.card__icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.card--beach { border-top: 3px solid var(--sea); padding-top: 0; overflow: hidden; }
.card__photo { margin: 0 -24px 16px; position: relative; }
.card__photo img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.card__photo figcaption { position: absolute; right: 6px; bottom: 6px; font-size: 10.5px; line-height: 1.3; color: #fff; background: rgba(14, 35, 58, .55); padding: 2px 7px; border-radius: 6px; max-width: calc(100% - 12px); }
.card__photo figcaption a { color: inherit; }
.card--pick { position: relative; border: 1.5px solid var(--peach); }
.pick-badge { position: absolute; top: -12px; left: 20px; background: var(--peach); color: var(--navy); font-size: 11px; text-transform: uppercase; letter-spacing: .16em; padding: 4px 12px; border-radius: 999px; }
.card__meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; color: var(--navy-soft); }
.card__meta .caps { font-size: 11px; }
.price { font: 400 14px var(--f-sans); letter-spacing: .12em; }
.card__links { margin-top: auto; padding-top: 16px; display: flex; gap: 18px; font-size: 13px; text-transform: uppercase; letter-spacing: .14em; }
.card__links a { text-decoration: underline; text-decoration-color: var(--peach); text-underline-offset: 4px; }

.todo { list-style: none; padding: 0; margin: 0 auto; max-width: 820px; display: grid; gap: 12px; }
.todo li { position: relative; padding: 14px 18px 14px 50px; background: var(--shell); border-radius: 14px; }
.todo li::before { content: '〰'; position: absolute; left: 16px; top: 13px; color: var(--sea-deep); }

.panel { background: var(--shell); border-radius: 20px; padding: 28px 26px; }
.panel h4 { font-size: 32px; margin-bottom: 6px; }
.places { list-style: none; padding: 0; margin: 18px 0 0; }
.places li { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.places a { font-weight: 500; text-decoration: none; letter-spacing: .04em; }
.places a::after { content: ' ↗'; font-size: .8em; color: var(--sea-deep); }
.places span { font-size: 15px; color: var(--navy-soft); }

/* ---------- RSVP ---------- */
.rsvp-section {
  background:
    linear-gradient(180deg, var(--cream) 0%, rgba(247,247,239,.92) 60%, rgba(247,247,239,.75) 100%),
    url('../img/watercolor.jpg') center 40% / cover no-repeat;
}
.preview-banner { background: #FFF4D6; border: 1px dashed #D8B565; border-radius: 12px; padding: 12px 16px; font-size: 14px; margin-bottom: 20px; text-align: center; }
.form { background: rgba(255,255,255,.88); border: 1px solid var(--line); border-radius: 24px; padding: clamp(22px, 5vw, 44px); box-shadow: var(--shadow); }
.field { margin: 0 0 20px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 8px; font-weight: 400; padding: 0; }
.opt { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--sea-deep); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0 18px; }
input, select, textarea {
  width: 100%; font: 400 16px/1.4 var(--f-sans); color: var(--navy);
  background: var(--cream); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px;
  transition: border-color .2s, box-shadow .2s;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 38px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(22, 62, 100, .12); }
.invalid, .choice.invalid { border-color: #B4472E !important; box-shadow: 0 0 0 3px rgba(180, 71, 46, .12); }
.choice.invalid { border: 1px solid; border-radius: 14px; padding: 8px; }
.choice { display: flex; flex-wrap: wrap; gap: 10px; }
.choice legend { width: 100%; }
.pill { position: relative; cursor: pointer; margin: 0 !important; text-transform: none !important; letter-spacing: 0 !important; font-size: 15px !important; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill span { display: inline-block; padding: 11px 20px; border: 1px solid var(--line); border-radius: 999px; background: var(--cream); transition: all .2s; }
.pill input:checked + span { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.pill input:focus-visible + span { box-shadow: 0 0 0 3px rgba(22, 62, 100, .2); }
.choice--compact .pill span { padding: 11px 14px; }
.hp { position: absolute; left: -9999px; }

.form-sub { font-size: 14px; letter-spacing: .24em; margin: 30px 0 20px; padding-top: 26px; border-top: 1px solid var(--line); text-align: center; }
.guests__intro { background: var(--peach-soft); padding: 12px 16px; border-radius: 12px; }
.guest { border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 0; margin-bottom: 14px; background: var(--shell); }
.guest__num { margin: 0 0 10px; color: var(--navy-soft); }
.guest__grid { display: grid; grid-template-columns: 1.4fr auto 1.2fr; gap: 0 14px; align-items: end; }
.guest__grid--me { grid-template-columns: auto 1fr; max-width: 640px; }
.guest--me { background: #fff; border-color: var(--peach); margin-top: 6px; }
.guest--me .guests__intro { margin-bottom: 14px; }
.guests__hint { margin: -4px 0 12px; }
.form-gap { margin-top: 8px; }
@media (max-width: 640px) { .guest__grid, .guest__grid--me { grid-template-columns: 1fr; } }

.sizeguide { margin: 4px 0 22px; }
.sizeguide summary { cursor: pointer; font-size: 14px; text-decoration: underline; text-decoration-color: var(--peach); text-underline-offset: 4px; }
.table-scroll { overflow-x: auto; margin: 12px 0; }
.sizeguide table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 380px; }
.sizeguide th, .sizeguide td { padding: 8px 10px; white-space: nowrap; text-align: center; border-bottom: 1px solid var(--line); }
.sizeguide th { font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.sizeguide td:first-child { font-weight: 500; }

.form-error { color: #B4472E; font-size: 15px; text-align: center; }
.thanks { text-align: center; background: rgba(255,255,255,.9); border-radius: 24px; padding: 44px 28px; box-shadow: var(--shadow); }
.thanks h3 { font-size: 72px; margin-bottom: 12px; }

/* ---------- gifts ---------- */
.gifts { margin-top: 30px; text-align: center; }
.gift { align-items: center; justify-content: center; gap: 6px; }
.gift .btn, .gift .tag { margin-top: 10px; }
.gift__row { display: flex; align-items: stretch; justify-content: center; gap: 22px; width: 100%; margin-top: 4px; }
.gift__main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.gift__pix { padding-left: 22px; border-left: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 10px; }
@media (max-width: 480px) {
  .gift__row { flex-direction: column; }
  .gift__pix { padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--line); width: 100%; }
}
.gift__pix p { margin: 0; }
.gift .gift__note { font-size: 13px; }
.gift__qr { background: none; border: 0; padding: 0; cursor: zoom-in; display: block; }
.gift__qr img { width: 110px; height: 110px; image-rendering: pixelated; border: 1px solid var(--line); border-radius: 6px; }
.lightbox--single .lightbox__nav { display: none; }
.lightbox--single img { width: min(420px, 86vw); height: auto; image-rendering: pixelated; background: #fff; padding: 14px; border-radius: 14px; }

/* ---------- footer ---------- */
.footer {
  min-height: 300px; display: grid; place-items: end center; text-align: center; padding: 60px var(--gutter) 40px;
  background: linear-gradient(180deg, var(--shell) 0%, rgba(251,245,233,0) 45%), url('../img/sea-strip.jpg') center bottom / cover no-repeat;
}
.footer__inner { background: rgba(247,247,239,.8); border-radius: 18px; padding: 18px 28px 6px; backdrop-filter: blur(3px); }
.footer__mono { font-size: 92px; line-height: 1; margin: 0; --sw: 5; }
.footer__date { font-size: 32px; margin: 2px 0 12px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
