/* Mitchell & Trywell — public invitation
   Palette: the couple's wedding blues (Midnight, Cobalt, Denim, Dusty, Baby & Ice Blue). Mobile-first. */

:root {
  --page: #f6f9fc;
  --paper: #eaf2f9;
  --mist: #d9edf6;          /* Ice Blue */
  --line: #b8d9f0;          /* Baby Blue */
  --accent: #456b99;        /* Denim */
  --accent-deep: #2454d7;   /* Cobalt */
  --accent-soft: rgba(69, 107, 153, .3);
  --ink: #101a35;           /* Midnight */
  --ink-soft: #4a5a73;      /* deepened Dusty Blue, for readable body text */
  --white: #ffffff;
  --error: #9b3b2f;

  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --script: "Pinyon Script", "Snell Roundhand", cursive;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 5vw, 48px);
  --ease: cubic-bezier(.22, .61, .36, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1rem + .4vw, 1.25rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Faint paper grain */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(217, 237, 246, .55), transparent 60%),
    radial-gradient(900px 500px at 110% 30%, rgba(217, 237, 246, .35), transparent 60%),
    var(--page);
}

img { max-width: 100%; display: block; }
h1, h2, h3 { font-weight: 400; margin: 0; }
p { margin: 0 0 1em; }
a { color: var(--accent-deep); }
code { font-family: var(--sans); font-size: .85em; letter-spacing: .06em; background: var(--paper); padding: .1em .45em; border-radius: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.script { font-family: var(--script); font-weight: 400; }
.muted { color: var(--ink-soft); }
.small { font-size: .9rem; }

.eyebrow {
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: .9rem;
}
.eyebrow--light { color: var(--accent-deep); }

.section { padding: clamp(72px, 12vw, 140px) var(--gutter); text-align: center; position: relative; }
.section-title { font-size: clamp(2rem, 1.5rem + 2.4vw, 3rem); letter-spacing: .02em; margin-bottom: 2.5rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 52px; padding: .9em 2.4em;
  font-family: var(--sans); font-size: .78rem; font-weight: 500; letter-spacing: .26em; text-transform: uppercase;
  text-decoration: none; border-radius: 999px; border: 1px solid var(--accent); cursor: pointer;
  transition: background .4s var(--ease), color .4s var(--ease), transform .4s var(--ease), box-shadow .4s var(--ease);
}
.btn--primary { background: var(--accent); color: var(--white); box-shadow: 0 10px 30px -12px rgba(69, 107, 153, .6); }
.btn--primary:hover { background: var(--accent-deep); transform: translateY(-2px); }
.btn--outline { background: transparent; color: var(--accent-deep); }
.btn--outline:hover { background: var(--accent); color: var(--white); }
.btn--block { width: 100%; }
.btn:focus-visible, .link-btn:focus-visible, .choice__card input:focus-visible + .choice__body { outline: 2px solid var(--accent-deep); outline-offset: 3px; }
.btn[disabled] { opacity: .6; cursor: progress; }

.link-btn {
  display: inline-block; margin-top: 1.2rem; background: none; border: 0; padding: .4em;
  font-family: var(--sans); font-size: .75rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent-deep); text-decoration: underline; text-underline-offset: 4px; cursor: pointer;
}

/* ---------- Decorative sprigs ---------- */
.sprig { color: var(--accent); width: 150px; height: 82px; pointer-events: none; }
.sprig--hero { display: block; margin: 0 auto 1.2rem; width: 120px; height: 66px; transform: scaleX(-1); opacity: .9; }
.sprig--tl { position: absolute; top: -18px; left: -26px; transform: rotate(-8deg) scaleY(-1); opacity: .75; }
.sprig--br { position: absolute; bottom: -18px; right: -26px; transform: rotate(172deg) scaleY(-1); opacity: .75; }
.sprig--center { display: block; margin: 2.5rem auto 0; width: 110px; height: 60px; opacity: .8; }
.sprig--footer { display: block; margin: 0 auto 1rem; width: 120px; height: 66px; opacity: .7; }

.divider { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 1.6rem auto; color: var(--accent); }
.divider span { height: 1px; width: min(90px, 22vw); background: linear-gradient(90deg, transparent, var(--accent)); }
.divider span:last-child { transform: scaleX(-1); }
.divider svg { width: 14px; height: 14px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
  isolation: isolate;
}
/* Mobile: the photograph fills the top of the screen and fades softly into the page. */
.hero__media { position: relative; flex: 1 1 auto; min-height: 52svh; max-height: 66svh; margin-bottom: -14svh; z-index: -1; }
.hero__arch { position: absolute; inset: 0; }
.hero__arch img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%;
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 98%);
  mask-image: linear-gradient(180deg, #000 62%, transparent 98%);
  animation: hero-zoom 16s var(--ease) both;
}
.hero__content {
  padding: 0 var(--gutter) calc(76px + env(safe-area-inset-bottom));
  text-align: center;
  animation: rise 1.4s .2s var(--ease) both;
}
.hero__names {
  display: flex; flex-direction: column; align-items: center;
  font-size: clamp(2.6rem, 9vw + .5rem, 5.6rem); line-height: 1; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 300;
}
.hero__name { display: block; padding-left: .14em; }
.hero__amp { font-family: var(--script); text-transform: none; letter-spacing: 0; color: var(--accent); font-size: .78em; line-height: .9; margin: .05em 0 .1em; }
.hero__subtitle { font-style: italic; font-size: clamp(1.15rem, 1rem + .8vw, 1.5rem); color: var(--ink-soft); margin: 1.4rem 0 .6rem; }
.hero__date { font-family: var(--sans); letter-spacing: .42em; font-size: .9rem; color: var(--accent-deep); margin-bottom: 2rem; padding-left: .42em; }
.hero__content > .eyebrow { margin-bottom: .6rem; text-shadow: 0 0 12px var(--page), 0 0 4px var(--page); }
@media (max-width: 899px) { .hero__media { margin-bottom: -6svh; } .hero__content .sprig--hero { display: none; } }
.hero__tagline { font-family: var(--sans); font-size: .62rem; letter-spacing: .34em; text-transform: uppercase; color: var(--ink-soft); margin: 1.6rem 0 0; }
.invite-card__families { font-style: italic; color: var(--ink-soft); margin: 1.2rem auto 0; max-width: 440px; }
.invitation .link-btn { margin-top: 1.8rem; }
.hero__scroll {
  position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: 22px; height: 36px; border: 1px solid var(--accent-soft); border-radius: 12px;
}
.hero__scroll span { position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--accent); animation: scroll-dot 2.2s infinite; }

@media (min-width: 900px) {
  .hero { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: clamp(32px, 5vw, 80px); padding: 48px clamp(40px, 6vw, 96px); }
  .hero__media { flex: none; min-height: 0; max-height: none; margin: 0; z-index: 0; order: 2; display: flex; justify-content: center; }
  .hero__arch img { -webkit-mask-image: none; mask-image: none; }
  .hero__arch {
    position: relative; inset: auto; height: auto; width: min(100%, 460px); aspect-ratio: 2 / 3;
    border-radius: 999px 999px 6px 6px; overflow: hidden;
    box-shadow: 0 40px 80px -40px rgba(16, 26, 53, .45);
  }
  .hero__media::before {
    content: ""; position: absolute; width: min(100%, 460px); aspect-ratio: 2 / 3; translate: 18px 18px;
    border: 1px solid var(--accent-soft); border-radius: 999px 999px 6px 6px;
  }
  .hero__content { order: 1; padding: 0; }
  .hero__scroll { display: none; }
}

/* ---------- Invitation ---------- */
.invitation { padding-top: clamp(56px, 10vw, 120px); }
.invite-card {
  position: relative; max-width: 640px; margin: 0 auto;
  padding: clamp(56px, 10vw, 88px) clamp(24px, 7vw, 72px);
  background: var(--white);
  border: 1px solid var(--accent-soft);
  box-shadow: 0 30px 60px -40px rgba(16, 26, 53, .35);
}
.invite-card::before {
  content: ""; position: absolute; inset: 10px; border: 1px solid var(--accent-soft); pointer-events: none;
}
.invite-card__dear { font-style: italic; color: var(--ink-soft); font-size: 1.15em; }
.invite-card__heading { font-size: clamp(2.6rem, 2rem + 3vw, 3.8rem); color: var(--accent-deep); line-height: 1.15; margin-bottom: 1rem; }
.invite-card__text { font-style: italic; font-size: 1.15em; color: var(--ink-soft); margin-bottom: 1.4rem; }
.invite-card__names { display: flex; flex-direction: column; align-items: center; font-size: clamp(1.7rem, 1.2rem + 2.6vw, 2.6rem); letter-spacing: .16em; line-height: 1.2; margin: 0; }
.invite-card__names > span:not(.amp-inline) { padding-left: .16em; }
.amp-inline { color: var(--accent); letter-spacing: 0; font-size: 1.1em; line-height: 1; }
.invite-card__when {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .35em .8em;
  font-family: var(--sans); font-size: .8rem; letter-spacing: .26em; color: var(--ink); margin: 0;
}
.invite-card__when i { font-style: normal; color: var(--accent); }
@media (max-width: 559px) {
  .invite-card__when { flex-direction: column; gap: .4em; }
  .invite-card__when .sep { display: none; }
}
.invite-card__time { font-family: var(--sans); font-size: .8rem; letter-spacing: .26em; margin-top: .8rem; }
.invite-card__admits { margin: 1.8rem 0 0; font-style: italic; color: var(--ink-soft); }

/* ---------- Featured photograph(s) ---------- */
.photo-feature { padding-top: 0; }
.photo-feature--pair { display: grid; gap: 20px; max-width: 920px; margin: 0 auto; }
@media (min-width: 720px) {
  .photo-feature--pair { grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
  .frame--offset { margin-top: 72px; }
  .photo-feature--pair .photo-feature__mono { grid-column: 1 / -1; }
}
.photo-feature__mono { margin: 1.2rem 0 0; font-size: 2.2rem; color: var(--accent-deep); }
.frame { margin: 0 auto; max-width: 480px; width: 100%; }
.frame__mat {
  padding: clamp(10px, 2.5vw, 18px); background: var(--white);
  border: 1px solid var(--accent-soft);
  box-shadow: 0 40px 70px -45px rgba(16, 26, 53, .5);
}
.frame img { width: 100%; height: auto; }

/* ---------- Story ---------- */
.story { background: linear-gradient(180deg, transparent, var(--paper) 18%, var(--paper) 82%, transparent); }
.story__inner { max-width: 660px; margin: 0 auto; }
.story .section-title { margin-bottom: 2rem; }
.story__layout { display: grid; gap: 40px; max-width: 1100px; margin: 0 auto; align-items: center; }
@media (min-width: 900px) {
  .story__layout--photos { grid-template-columns: 1fr 1.4fr 1fr; gap: 48px; }
  .story__photo--late { margin-top: 120px; }
}
.story__photo { margin: 0 auto; max-width: 360px; }
.story__photo img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 999px 999px 4px 4px; border: 1px solid var(--accent-soft); padding: 8px; background: var(--white); }
.story__photo figcaption { font-size: 2rem; color: var(--accent-deep); margin-top: .6rem; }
.story__heading { font-size: clamp(2rem, 1.5rem + 2.4vw, 3rem); font-style: italic; font-weight: 300; margin-bottom: 1.6rem; }
.story__body p { font-size: 1.12em; }
.quote-mark { font-size: 2.6em; line-height: 0; vertical-align: -.38em; color: var(--accent); margin-right: .06em; }
.story__signoff { font-size: clamp(2rem, 1.6rem + 1.5vw, 2.6rem); color: var(--accent-deep); margin-top: 1.6rem; }

/* ---------- Countdown ---------- */
.countdown { background: var(--mist); }
.countdown::before, .countdown::after {
  content: ""; position: absolute; left: 50%; width: min(520px, 80%); height: 1px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.countdown::before { top: 22px; } .countdown::after { bottom: 22px; }
.countdown__heading { font-size: clamp(2rem, 1.5rem + 2vw, 2.9rem); margin-bottom: .4rem; }
.countdown__date { font-family: var(--sans); letter-spacing: .42em; font-size: .85rem; color: var(--accent-deep); margin-bottom: 2.2rem; padding-left: .42em; }
.countdown__footer { font-size: 2.2rem; color: var(--accent-deep); margin: 1.6rem 0 0; }
.countdown__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px, 2vw, 24px); max-width: 640px; margin: 0 auto; }
.countdown__unit {
  display: flex; flex-direction: column; align-items: center; padding: 1rem .25rem;
  background: rgba(255, 255, 255, .6); border: 1px solid rgba(69, 107, 153, .25);
}
.countdown__num { font-size: clamp(2.1rem, 1.4rem + 4vw, 3.8rem); font-weight: 300; line-height: 1.1; font-variant-numeric: tabular-nums lining-nums; }
.countdown__label { font-family: var(--sans); font-size: .62rem; letter-spacing: .26em; text-transform: uppercase; color: var(--accent-deep); margin-top: .35rem; }
.countdown__done { font-size: 2.6rem; color: var(--accent-deep); margin: 1.5rem 0 0; }

/* ---------- Theme & colours ---------- */
.section-intro { max-width: 560px; margin: -1.2rem auto 2.2rem; font-style: italic; color: var(--ink-soft); }
.palette { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 640px; margin: 0 auto; }
@media (max-width: 559px) { .palette { max-width: 300px; } }
.swatch {
  width: 46px; height: 46px; border-radius: 50%; padding: 0; cursor: pointer;
  background: var(--swatch); border: 3px solid var(--white); box-shadow: 0 0 0 1px var(--accent-soft), 0 8px 18px -10px rgba(16, 26, 53, .6);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.swatch:hover { transform: translateY(-2px); }
.swatch[aria-pressed="true"] { transform: scale(1.15); box-shadow: 0 0 0 2px var(--accent), 0 10px 22px -10px rgba(16, 26, 53, .7); }
.swatch:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 4px; }
.swatch-name { font-size: 2.2rem; color: var(--accent-deep); min-height: 1.4em; margin: 1rem 0 0; }
.dress-code {
  display: flex; align-items: center; gap: 1.2rem; max-width: 520px; margin: 2.4rem auto 0; padding: 1.6rem 1.8rem;
  background: var(--white); border: 1px solid var(--accent-soft); text-align: left;
}
.dress-code__icon { flex: none; width: 40px; height: 40px; color: var(--accent); }
.dress-code .eyebrow { margin-bottom: .2rem; }
.dress-code h3 { font-size: 1.6rem; margin-bottom: .2rem; }
.dress-code p:last-child { margin: 0; font-size: .95em; }

/* ---------- Venue ---------- */
.venue-card { max-width: 560px; margin: 0 auto; background: var(--white); border: 1px solid var(--accent-soft); box-shadow: 0 30px 60px -40px rgba(16, 26, 53, .35); }
.venue-card__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.venue-card__body { padding: 2.2rem 1.5rem 2.4rem; }
.venue-card__pin { width: 28px; height: 28px; color: var(--accent); margin: 0 auto .6rem; display: block; }
.venue-card h3 { font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.4rem); }
.venue-card p { margin: 0 0 .3rem; }
.venue-card__when { font-family: var(--sans); font-size: .78rem; letter-spacing: .24em; text-transform: uppercase; margin-top: 1rem !important; }
.venue-card__time { font-style: italic; color: var(--accent-deep); margin-bottom: 1.6rem !important; }
.venue-card .btn { margin-top: 1.2rem; }

/* ---------- Programme ---------- */
.programme { background: linear-gradient(180deg, transparent, var(--paper) 20%, var(--paper) 80%, transparent); }
.timeline { list-style: none; max-width: 520px; margin: 0 auto; padding: 0; text-align: left; position: relative; }
.timeline::before { content: ""; position: absolute; left: 76px; top: .6em; bottom: .6em; width: 1px; background: var(--accent-soft); }
.timeline__item { display: grid; grid-template-columns: 64px 1fr; gap: 28px; padding: .7rem 0; position: relative; }
.timeline__item::before { content: ""; position: absolute; left: 72px; top: 1.25em; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--paper); }
.timeline__item time { font-family: var(--sans); font-size: .85rem; letter-spacing: .12em; color: var(--accent-deep); padding-top: .25em; text-align: right; }
.timeline__item span { grid-column: 2; }

/* ---------- Menu ---------- */
.menu__columns { display: grid; gap: 28px; max-width: 900px; margin: 0 auto 2rem; }
@media (min-width: 720px) { .menu__columns { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }
.menu__course p:not(.eyebrow) { margin: 0 0 .3rem; font-size: 1.1em; }

/* ---------- Gallery ---------- */
.gallery { padding-top: 0; }
.gallery__grid { columns: 2 160px; column-gap: 12px; max-width: 1100px; margin: 0 auto; }
@media (min-width: 900px) { .gallery__grid { columns: 3; column-gap: 18px; } }
.gallery__item {
  display: block; width: 100%; margin: 0 0 12px; padding: 0; border: 0; background: var(--paper);
  cursor: zoom-in; break-inside: avoid; overflow: hidden;
}
@media (min-width: 900px) { .gallery__item { margin-bottom: 18px; } }
.gallery__item img { width: 100%; height: auto; transition: transform 1.2s var(--ease), filter .6s; }
.gallery__item:hover img { transform: scale(1.04); }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; margin: 0; }
.lightbox::backdrop { background: rgba(16, 26, 53, .94); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: 92vw; max-height: 84vh; width: auto; height: auto; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.lightbox figcaption { color: var(--mist); font-style: italic; margin-top: .8rem; min-height: 1.4em; }
.lightbox button { position: fixed; background: none; border: 0; color: var(--page); font-size: 2.6rem; line-height: 1; width: 56px; height: 56px; cursor: pointer; }
.lightbox__close { top: 10px; right: 10px; }
.lightbox__nav--prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 4px; top: 50%; transform: translateY(-50%); }

/* ---------- RSVP ---------- */
.rsvp { background: linear-gradient(180deg, transparent, var(--paper) 30%); }
.rsvp__card {
  position: relative; max-width: 560px; margin: 0 auto; padding: clamp(48px, 9vw, 72px) clamp(20px, 6vw, 56px);
  background: var(--white); border: 1px solid var(--accent-soft); text-align: left;
  box-shadow: 0 30px 60px -40px rgba(16, 26, 53, .35);
}
.rsvp__card > .eyebrow, .rsvp__heading, .rsvp__deadline { text-align: center; }
.rsvp__heading { font-size: clamp(2.3rem, 1.8rem + 2.6vw, 3.4rem); color: var(--accent-deep); line-height: 1.15; margin-bottom: .6rem; }
.rsvp__deadline { font-style: italic; color: var(--ink-soft); }
.rsvp__flow { margin-top: 2rem; }
.rsvp__intro, .rsvp__party, .rsvp__allowance { text-align: center; }
.rsvp__party { font-style: italic; font-size: 1.3em; margin-bottom: .2rem; }
.rsvp__allowance { color: var(--ink-soft); }
.rsvp__previous { text-align: center; font-size: .9em; background: var(--paper); padding: .6em 1em; border-radius: 6px; color: var(--ink-soft); }
.rsvp__closed { text-align: center; font-style: italic; margin-top: 1.6rem; }

.field { margin-bottom: 1.3rem; }
.field label { display: block; font-family: var(--sans); font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: .45rem; }
.optional { text-transform: none; letter-spacing: .02em; font-style: italic; font-family: var(--serif); font-size: 1.1em; color: var(--accent-deep); margin-left: .3em; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1.1rem; color: var(--ink);
  background: var(--page); border: 1px solid var(--line); border-radius: 4px; padding: .7em .9em;
  transition: border-color .3s, box-shadow .3s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(69, 107, 153, .18); }
#rsvp-code { text-align: center; font-family: var(--sans); font-size: 1.4rem; letter-spacing: .35em; }

.choice { border: 0; padding: 0; margin: 1.6rem 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice__card { position: relative; cursor: pointer; }
.choice__card input { position: absolute; opacity: 0; pointer-events: none; }
.choice__body {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: .25rem;
  padding: 1.2rem .6rem; border: 1px solid var(--line); border-radius: 6px; background: var(--page);
  transition: border-color .3s, background .3s, transform .3s var(--ease);
}
.choice__body svg, .choice__mark { width: 20px; height: 20px; color: var(--line); font-size: 1rem; line-height: 20px; transition: color .3s; }
.choice__body strong { font-weight: 500; font-size: 1.05rem; }
.choice__body em { font-size: .9rem; color: var(--ink-soft); }
.choice__card:hover .choice__body { border-color: var(--accent); }
.choice__card input:checked + .choice__body { border-color: var(--accent); background: #e6f0f9; transform: translateY(-2px); box-shadow: 0 10px 24px -16px rgba(69, 107, 153, .7); }
.choice__card input:checked + .choice__body svg, .choice__card input:checked + .choice__body .choice__mark { color: var(--accent-deep); }

.stepper { display: flex; align-items: stretch; max-width: 220px; }
.stepper input { text-align: center; border-radius: 0; font-family: var(--sans); -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; }
.stepper__btn { width: 52px; flex: none; background: var(--paper); border: 1px solid var(--line); color: var(--accent-deep); font-size: 1.3rem; cursor: pointer; }
.stepper__btn:first-child { border-radius: 4px 0 0 4px; border-right: 0; }
.stepper__btn:last-child { border-radius: 0 4px 4px 0; border-left: 0; }
html:not(.js) .stepper__btn { display: none; }

.when-attending { overflow: hidden; transition: opacity .4s; }
.when-attending[aria-hidden="true"] { display: none; }

.form-error { color: var(--error); font-size: .95rem; min-height: 1.4em; text-align: center; margin: .2rem 0 .8rem; }
.rsvp-step[data-step="form"] .link-btn { display: block; margin-left: auto; margin-right: auto; }

.rsvp-done { text-align: center; outline: none; animation: rise .9s var(--ease) both; }
.rsvp-done__heart { width: 30px; height: 30px; color: var(--accent); margin: 0 auto .4rem; display: block; animation: beat 1.8s ease-in-out infinite; }
.rsvp-done__title { font-size: 3rem; color: var(--accent-deep); margin: 0 0 .6rem; line-height: 1.2; }

.rsvp__alt { margin-top: 2.4rem; padding-top: 1.8rem; border-top: 1px solid var(--mist); text-align: center; }
.sms-sample { line-height: 2.2; }

.rsvp__whatsapp { display: flex; flex-direction: column; gap: 10px; align-items: center; margin-bottom: .8rem; }
@media (min-width: 560px) { .rsvp__whatsapp { flex-direction: row; justify-content: center; } }
.rsvp__whatsapp .btn { padding-left: 1.6em; padding-right: 1.6em; }

/* ---------- Closing card ---------- */
.closing__frame {
  position: relative; max-width: 520px; margin: 0 auto; padding: clamp(40px, 8vw, 64px) clamp(20px, 6vw, 48px);
  background: var(--white); border: 1px solid var(--accent-soft);
}
.closing__frame::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--accent-soft); pointer-events: none; }
.closing__frame .sprig--center { margin: 0 auto 1rem; }
.closing__names { font-size: clamp(2.8rem, 2.2rem + 3vw, 4rem); line-height: 1.1; color: var(--accent-deep); margin-bottom: 1.2rem; }
.closing__names span { color: var(--accent); }
.closing__text { font-style: italic; color: var(--ink-soft); }
.closing__date { font-family: var(--sans); font-size: 1.1rem; letter-spacing: .3em; margin: 1.6rem 0 .6rem; }
.closing__date span { color: var(--accent); margin: 0 .6em; }
.closing__venue { font-family: var(--sans); font-size: .75rem; letter-spacing: .26em; color: var(--ink-soft); margin-bottom: 2rem; }

/* ---------- Footer & floating RSVP ---------- */
.footer { text-align: center; padding: 64px var(--gutter) calc(96px + env(safe-area-inset-bottom)); }
.footer__monogram { font-size: 3rem; color: var(--accent-deep); margin: 0; line-height: 1.2; }
.footer__date { font-family: var(--sans); font-size: .72rem; letter-spacing: .3em; color: var(--ink-soft); text-transform: uppercase; }

.rsvp-pill {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 20;
  padding: .85em 1.5em; border-radius: 999px; background: var(--accent); color: var(--white); text-decoration: none;
  font-family: var(--sans); font-size: .72rem; letter-spacing: .28em; box-shadow: 0 12px 30px -10px rgba(16, 26, 53, .55);
  opacity: 0; transform: translateY(20px); pointer-events: none; transition: opacity .5s, transform .5s var(--ease);
}
.rsvp-pill.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.footer__love { font-style: italic; color: var(--ink-soft); margin: 1rem 0 0; }
.footer .link-btn { margin-top: .6rem; }

.to-top {
  position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 20;
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  background: var(--white); color: var(--accent-deep); border: 1px solid var(--accent-soft); text-decoration: none; font-family: var(--sans);
  box-shadow: 0 10px 24px -12px rgba(16, 26, 53, .55);
  opacity: 0; transform: translateY(20px); pointer-events: none; transition: opacity .5s, transform .5s var(--ease);
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; gap: 1rem; padding: calc(8px + env(safe-area-inset-top)) var(--gutter) 8px;
  background: rgba(246, 249, 252, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(69, 107, 153, .2);
  transform: translateY(-110%); transition: transform .5s var(--ease);
}
.topbar.is-visible { transform: none; }
.topbar__brand { flex: none; font-size: 1.9rem; line-height: 1; color: var(--accent-deep); text-decoration: none; }
.topbar__brand span { color: var(--accent); margin: 0 .05em; }
.topbar__links { display: flex; gap: 1.2rem; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 24px; }
.topbar__links::-webkit-scrollbar { display: none; }
.topbar__links a { flex: none; font-family: var(--sans); font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); text-decoration: none; padding: .6em 0; }
.topbar__links a:hover, .topbar__links a[aria-current="true"] { color: var(--accent-deep); }
@media (min-width: 720px) { .topbar { justify-content: space-between; } .topbar__links { -webkit-mask-image: none; mask-image: none; padding-right: 0; } }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 40; padding: .6em 1em; background: var(--ink); color: var(--white); font-family: var(--sans); font-size: .8rem; }
.skip-link:focus { top: 12px; }
section[id], header[id] { scroll-margin-top: 56px; }

/* ---------- Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes hero-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes scroll-dot { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }
@keyframes beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
[hidden] { display: none !important; }
.invitation, .rsvp { overflow-x: clip; }
