/* Layout: an invitation suite. An envelope opens onto a nude paper card, one vivid orange band carries the facts,
   then the photographs and a reply card. Single, deliberate light look: the theme is orange & nude. */
:root {
  --paper: #F6EADF;       /* nude paper */
  --paper-deep: #EAD5C3;  /* envelope, deeper nude */
  --card: #FFFAF5;        /* card stock */
  --ink: #2C1810;         /* espresso */
  --ink-soft: #57392C;
  --orange: #E8661E;      /* the band */
  --orange-deep: #A9400F; /* orange that reads as text on paper */
  --peach: #F4B38A;
  --rule: rgba(44, 24, 16, .18);
  --shadow: rgba(44, 24, 16, .32);

  --display: "Bodoni Moda", "Bodoni 72", Didot, "Didot LT STD", Georgia, serif;
  --body: "Jost", Futura, "Century Gothic", "Avenir Next", system-ui, sans-serif;

  --s5: clamp(3.2rem, 1.4rem + 8vw, 7.25rem);
  --s4: clamp(2.5rem, 1.7rem + 3.6vw, 4.5rem);
  --s3: clamp(1.7rem, 1.3rem + 1.8vw, 2.5rem);
  --s2: clamp(1.3rem, 1.15rem + .7vw, 1.65rem);
  --s1: 1.2rem;
  --s0: 1.0625rem;
  --sm: .8125rem;

  --radius: 14px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .17 0 0 0 0 .09 0 0 0 0 .06 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--s0);
  font-weight: 400;
  /* Bodoni Moda's large optical sizes have hair-thin strokes that are hard to read on phones.
     Pinning the optical size to its text cut (11) keeps the style but makes every stroke sturdier. */
  font-variation-settings: "opsz" 11;
  line-height: 1.6;
  overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.wrap {
  width: min(100%, 1140px);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Shared type ---------- */
.eyebrow {
  font-size: var(--sm);
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--orange-deep);
}
h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--s4);
  line-height: 1;
  letter-spacing: -.01em;
  margin: .25em 0 0;
}
h2 i, .title em, .couple .amp { font-style: italic; }
h2 i { color: var(--orange-deep); }
.section-head { display: grid; gap: 4px; max-width: 38rem; }
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }
.lede { margin-top: 14px; font-size: var(--s1); font-weight: 400; line-height: 1.55; color: var(--ink-soft); max-width: 34rem; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions--center { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 48px; padding: .85em 1.35em;
  border: 1.5px solid currentColor; border-radius: 999px;
  background: transparent; color: inherit;
  font: 500 var(--sm)/1.2 var(--body); letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease-out), background-color .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--solid { background: var(--ink); border-color: var(--ink); color: var(--card); }
.btn--wide { width: 100%; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--orange-deep); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- Envelope intro ---------- */
.intro { display: none; }
.js .intro {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; align-content: center; gap: 30px;
  padding: calc(24px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: inherit;
  background-color: var(--paper);
  transition: opacity .7s ease, transform .7s var(--ease-out), visibility 0s linear .7s;
}
.js.is-sealed body { overflow: hidden; }
.intro.is-leaving { opacity: 0; transform: scale(1.06); visibility: hidden; }

.envelope {
  position: relative;
  width: min(86vw, 460px);
  aspect-ratio: 1.42;
  padding: 0; border: 0; background: none; cursor: pointer;
  perspective: 1400px;
  color: var(--ink);
  font-family: var(--body);
  animation: bob 3.2s ease-in-out infinite;
  border-radius: 8px;
}
.intro.is-open .envelope { animation: none; }
.env-back, .env-pocket, .env-flap, .env-letter { position: absolute; }
.env-back { inset: 0; border-radius: 8px; background: #DFC4AE; box-shadow: 0 34px 60px -30px var(--shadow), 0 2px 0 rgba(255,255,255,.35) inset; }
.env-letter {
  left: 6%; right: 6%; top: 7%; bottom: 7%;
  z-index: 1;
  display: grid; align-content: start; justify-items: center; gap: 6px;
  padding-top: 7%;
  background: var(--card); border-radius: 4px;
  box-shadow: 0 1px 0 var(--rule);
  transition: transform .9s var(--ease-out) .75s;
}
.env-letter-eyebrow { font-size: .62rem; letter-spacing: .28em; text-transform: uppercase; color: var(--orange-deep); font-weight: 500; }
.env-letter-names { font-family: var(--display); font-weight: 500; font-size: clamp(1.4rem, 5.4vw, 2rem); line-height: 1.1; }
.env-letter-names i { color: var(--orange); }
.env-letter-date { font-size: .7rem; letter-spacing: .24em; color: var(--ink-soft); }
.env-pocket {
  inset: 0; z-index: 2;
  background: linear-gradient(172deg, #EFDCCB 0%, var(--paper-deep) 60%, #E2C9B4 100%);
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
  border-radius: 8px;
}
.env-pocket svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.env-pocket polyline { fill: none; stroke: rgba(44, 24, 16, .12); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.env-to {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 11%;
  display: grid; justify-items: center; gap: 2px; pointer-events: none;
  transition: opacity .3s ease;
}
.env-to-label { font-size: .62rem; letter-spacing: .28em; text-transform: uppercase; color: var(--ink-soft); }
.env-to-name { font-family: var(--display); font-weight: 500; font-style: italic; font-size: clamp(1.15rem, 4.6vw, 1.6rem); line-height: 1.15; max-width: 86%; text-wrap: balance; }
.env-flap {
  left: 0; right: 0; top: 0; height: 56%;
  z-index: 4;
  transform-origin: 50% 0;
  transform-style: preserve-3d;
  transition: transform .75s cubic-bezier(.55, 0, .25, 1) .25s, z-index 0s linear .6s;
}
.env-flap::before, .env-flap::after {
  content: ""; position: absolute; inset: 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 8px 8px 0 0;
}
.env-flap::before { background: linear-gradient(180deg, #E6CDB8, #D9BCA4); }
/* Envelope liner: a litema-style triangle pattern in the theme colours */
.env-flap::after {
  transform: rotateX(180deg);
  background:
    conic-gradient(from 135deg at 50% 0, var(--orange) 90deg, transparent 0) 0 0 / 22px 11px,
    conic-gradient(from -45deg at 50% 100%, var(--peach) 90deg, transparent 0) 11px 0 / 22px 11px,
    #F7D3B8;
}
.env-seal {
  position: absolute; z-index: 5;
  left: 50%; top: 56%;
  width: clamp(58px, 16vw, 76px); aspect-ratio: 1;
  translate: -50% -50%;
  display: flex; align-items: center; justify-content: center; white-space: nowrap;
  border-radius: 48% 52% 50% 50% / 52% 47% 53% 48%;
  background: radial-gradient(circle at 34% 30%, #F08C4C 0%, #C9531A 46%, #93360D 100%);
  box-shadow: 0 6px 14px -4px rgba(44, 24, 16, .55), inset 0 0 0 4px rgba(255, 220, 190, .12), inset 0 -3px 6px rgba(0,0,0,.18);
  color: #FFE7D3;
  font-family: var(--display); font-size: clamp(1.05rem, 3.6vw, 1.35rem); letter-spacing: .02em;
  text-shadow: 0 -1px 0 rgba(0,0,0,.28), 0 1px 0 rgba(255,255,255,.18);
  transition: transform .45s var(--ease-out), opacity .35s ease;
}
.env-seal i { font-style: italic; margin-inline: 1px; }
.envelope:hover .env-seal { transform: scale(1.06) rotate(-4deg); }

.intro-hint {
  font-size: var(--sm); letter-spacing: .3em; text-transform: uppercase; color: var(--ink-soft);
  animation: hint 2.4s ease-in-out infinite;
}
.intro.is-open .intro-hint { opacity: 0; transition: opacity .3s; animation: none; }

.intro.is-open .env-seal { transform: scale(1.5); opacity: 0; }
.intro.is-open .env-to { opacity: 0; }
.intro.is-open .env-flap { transform: rotateX(180deg); z-index: 0; }
.intro.is-open .env-letter { transform: translateY(-58%); }

@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8px) rotate(.5deg); } }
@keyframes hint { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

.petals { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 60; pointer-events: none; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(36px, 7vw, 88px) clamp(44px, 7vw, 88px); }
.hero-grid { display: grid; gap: clamp(40px, 6vw, 80px); align-items: center; text-align: center; justify-items: center; }
.hero-text { display: grid; justify-items: center; min-width: 0; }
.greeting { font-family: var(--display); font-weight: 500; font-style: italic; font-size: var(--s2); color: var(--orange-deep); margin-bottom: 14px; overflow-wrap: anywhere; }
.title {
  font-family: var(--display); font-weight: 500; font-size: var(--s5);
  line-height: .9; letter-spacing: -.02em;
  margin: .22em 0 .08em;
}
.title:focus { outline: none; }
.title em { display: block; color: var(--orange-deep); font-weight: 500; }
.of { font-family: var(--display); font-weight: 500; font-style: italic; font-size: var(--s2); color: var(--ink-soft); margin: .35em 0 .3em; }
.couple { display: grid; justify-items: center; font-family: var(--display); font-weight: 500; font-size: var(--s3); line-height: 1.12; }
.couple .amp { font-size: 1.5em; line-height: .9; color: var(--orange); margin-block: .04em; }
/* Classic invitation date block: month above, weekday | day | time, year below */
.when { margin-top: 30px; width: min(100%, 380px); }
.when-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: ". month ." "left day right" ". year .";
  align-items: center; column-gap: 14px;
}
.when-month, .when-year, .when-side { font-size: var(--sm); font-weight: 500; letter-spacing: .24em; text-transform: uppercase; text-align: center; }
.when-month { grid-area: month; padding-left: .24em; }
.when-year { grid-area: year; padding-left: .24em; }
.when-side { padding-block: 9px; border-block: 1px solid var(--rule); white-space: nowrap; }
.when-left { grid-area: left; }
.when-right { grid-area: right; }
.when-day { grid-area: day; font-family: var(--display); font-size: clamp(3.4rem, 12vw, 4.4rem); line-height: 1; color: var(--orange-deep); font-variant-numeric: lining-nums; padding-inline: 4px; }

.hero-photo { position: relative; margin: 0; width: min(100%, 420px); }
.hero-photo::before {
  content: ""; position: absolute; inset: 0;
  translate: 14px 14px;
  border: 1.5px solid var(--orange);
  border-radius: 50% 50% 16px 16px / 40% 40% 16px 16px;
}
.hero-photo img {
  position: relative; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 35%;
  border-radius: 50% 50% 16px 16px / 40% 40% 16px 16px;
  box-shadow: 0 40px 70px -40px var(--shadow);
}
.badge { position: absolute; left: -18px; bottom: 6%; width: clamp(96px, 24vw, 128px); height: auto; overflow: visible; }
.badge-bg { fill: var(--orange); }
.badge-ring { transform-origin: 60px 60px; animation: spin 24s linear infinite; }
.badge-ring text { font-family: var(--body); font-size: 9.6px; font-weight: 500; letter-spacing: .12em; fill: var(--ink); }
.badge-mono { font-family: var(--display); font-style: italic; font-size: 22px; fill: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.15fr .85fr; text-align: left; justify-items: stretch; }
  .hero-text { justify-items: start; }
  .couple { justify-items: start; }
  .hero-photo { justify-self: end; }
}

/* Litema-inspired border: alternating solid and outlined triangles */
.litema {
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14'%3E%3Cpath d='M0 14 7 1l7 13z' fill='%23E8661E'/%3E%3Cpath d='M14 1h14l-7 12.2z' fill='none' stroke='%23A9400F' stroke-width='1.3'/%3E%3C/svg%3E") 0 0 / 28px 14px repeat-x;
  opacity: .9;
}

/* ---------- Verse ---------- */
.verse { padding-block: clamp(56px, 9vw, 112px); text-align: center; }
.verse blockquote { position: relative; margin: 0 auto; max-width: 40rem; display: grid; justify-items: center; }
.verse-mark { font-family: var(--display); font-size: clamp(5rem, 14vw, 8rem); line-height: .6; color: var(--orange); height: .5em; }
.verse p { font-family: var(--display); font-weight: 500; font-style: italic; font-size: var(--s3); line-height: 1.3; text-wrap: balance; }
.verse footer { margin-top: 22px; }
.verse cite { font-style: normal; font-size: var(--sm); letter-spacing: .26em; text-transform: uppercase; font-weight: 500; color: var(--orange-deep); }

/* ---------- Families ---------- */
.families { padding-block: clamp(32px, 6vw, 72px) clamp(72px, 10vw, 128px); }
.pair {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start;
  gap: clamp(6px, 3vw, 44px);
  margin-top: clamp(32px, 6vw, 64px);
  max-width: 860px; margin-inline: auto;
}
.person { margin: 0; display: grid; gap: 14px; min-width: 0; }
.person img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 20%; border-radius: var(--radius); }
.person--low { margin-top: clamp(48px, 12vw, 140px); }
.person figcaption { display: grid; gap: 2px; }
.person-name { font-family: var(--display); font-weight: 500; font-size: var(--s3); line-height: 1.05; }
.person-family { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); font-weight: 500; }
.pair-amp { align-self: center; font-family: var(--display); font-style: italic; font-size: clamp(2.6rem, 11vw, 8rem); line-height: 1; color: var(--orange); }

/* ---------- The orange band: an orange frame around a cream card, so the details read easily ---------- */
.band {
  position: relative;
  background: var(--orange); color: var(--ink);
  padding-block: clamp(40px, 7vw, 96px);
  margin-block: 14px;
}
.band::before, .band::after { content: ""; position: absolute; left: 0; right: 0; height: 14px; }
.band::before { bottom: 100%; background: conic-gradient(from 135deg at 50% 0, var(--orange) 90deg, transparent 0) 0 0 / 28px 100% repeat-x; }
.band::after { top: 100%; background: conic-gradient(from -45deg at 50% 100%, var(--orange) 90deg, transparent 0) 0 0 / 28px 100% repeat-x; }
.ticket {
  background: var(--card); color: var(--ink);
  border-radius: 18px;
  padding: clamp(28px, 6vw, 64px) clamp(20px, 5vw, 64px) clamp(28px, 5vw, 56px);
  box-shadow: 0 30px 60px -34px rgba(44, 24, 16, .55);
}
.band h2 { font-size: var(--s5); line-height: .95; }

.facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 18px; margin: clamp(28px, 5vw, 48px) 0 0;
}
.fact { border-top: 1.5px solid var(--ink); padding-top: 14px; min-width: 0; }
.fact dt { font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 600; color: var(--orange-deep); }
.fact dd { margin: 8px 0 0; font-family: var(--body); font-weight: 500; font-size: clamp(1.08rem, 1rem + .4vw, 1.3rem); line-height: 1.35; overflow-wrap: anywhere; }
.fact-note { font-weight: 400; font-size: .95rem; color: var(--ink-soft); }
.theme-link { text-decoration: none; }
.theme-link:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.dots { display: flex; margin-bottom: 8px; }
.dot { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--ink); flex: none; }
.dot--orange { background: #C4501A; }
.dot--nude { background: #EDCBB4; margin-left: -6px; }
@media (min-width: 760px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.countdown { margin-top: clamp(32px, 5vw, 56px); display: grid; gap: 12px; }
.clock { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(8px, 2vw, 16px); max-width: 640px; }
.tick {
  display: grid; justify-items: center; gap: 4px;
  padding: clamp(14px, 3vw, 22px) 6px;
  background: var(--paper); border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(44, 24, 16, .08);
}
.tick-num { font-family: var(--body); font-size: clamp(1.9rem, 7vw, 3rem); line-height: 1; font-variant-numeric: tabular-nums lining-nums; font-weight: 500; }
.tick-num.flip { animation: flip .45s var(--ease-out); }
@keyframes flip { from { transform: translateY(-30%); opacity: .2; } to { transform: none; opacity: 1; } }
.tick-label { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; color: var(--ink-soft); }
.countdown-caption { font-family: var(--display); font-weight: 500; font-style: italic; font-size: var(--s2); color: var(--ink-soft); }
.band .actions { margin-top: clamp(28px, 4vw, 44px); }
.band .btn:not(.btn--solid):hover { background: var(--paper); }
@media (max-width: 560px) {
  .band .actions { display: grid; }
}

/* ---------- Theme / dress code ---------- */
.theme { padding-block: clamp(80px, 11vw, 140px) clamp(64px, 9vw, 112px); }
.theme-grid { display: grid; gap: clamp(48px, 7vw, 88px); align-items: center; }
.theme-text { min-width: 0; }
.swatches { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 12px; max-width: 520px; }
.swatch { display: grid; gap: 8px; font-size: .78rem; letter-spacing: .08em; font-weight: 500; }
.swatch-chip {
  display: block; aspect-ratio: 5 / 3; border-radius: 10px; background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(44, 24, 16, .08), 0 10px 20px -16px var(--shadow);
  transition: transform .25s var(--ease-out);
}
.swatch:hover .swatch-chip { transform: translateY(-3px) rotate(-1.5deg); }
.tip {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 32px; padding: 16px 18px; max-width: 520px;
  border: 1px dashed var(--rule); border-radius: var(--radius);
  font-size: .95rem; color: var(--ink-soft);
}
.tip .icon { color: var(--orange-deep); margin-top: 2px; }
.tip strong { color: var(--ink); font-weight: 500; }

.polaroid { margin: 0 auto; width: min(100%, 340px); rotate: 2.5deg; display: grid; }
.polaroid-frame { position: relative; padding: 12px 12px 0; background: var(--card); border-radius: 4px 4px 0 0; box-shadow: 0 30px 60px -30px var(--shadow); }
.polaroid video { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 2px; background: var(--paper-deep); }
.polaroid figcaption {
  background: var(--card); border-radius: 0 0 4px 4px; padding: 14px 12px 20px; text-align: center;
  font-family: var(--display); font-weight: 500; font-style: italic; font-size: var(--s1);
  box-shadow: 0 30px 60px -30px var(--shadow);
}
.video-toggle {
  position: absolute; right: 22px; bottom: 10px;
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 250, 245, .88); color: var(--ink);
}
.video-toggle .icon { width: 18px; height: 18px; }
.video-toggle .icon-play { fill: currentColor; }
.video-toggle .icon-play, .video-toggle[aria-pressed="true"] .icon-pause { display: none; }
.video-toggle[aria-pressed="true"] .icon-play { display: block; }

@media (min-width: 900px) {
  .theme-grid { grid-template-columns: 1.2fr .8fr; }
  .polaroid { margin-inline: auto 0; }
}

/* ---------- Gallery ---------- */
.gallery { padding-block: clamp(40px, 7vw, 88px) clamp(72px, 10vw, 128px); }
.filters { display: none; }
.js .filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(24px, 4vw, 36px); }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 42px; padding: 0 16px;
  border: 1.5px solid var(--rule); border-radius: 999px;
  background: transparent; color: var(--ink);
  font: 500 .74rem/1 var(--body); letter-spacing: .16em; text-transform: uppercase;
  cursor: pointer; transition: background-color .2s, border-color .2s, color .2s;
}
.chip:hover { border-color: var(--ink-soft); }
.chip-count { font-family: var(--display); font-size: .95rem; letter-spacing: 0; color: var(--orange-deep); font-variant-numeric: lining-nums; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--card); }
.chip[aria-pressed="true"] .chip-count { color: var(--peach); }
@media (max-width: 520px) {
  .js .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chip { justify-content: center; }
}
.more-wrap { display: flex; justify-content: center; margin-top: 12px; }
.shots { list-style: none; padding: 0; margin: 20px 0 0; columns: 2; column-gap: 12px; }
.shots li { break-inside: avoid; margin-bottom: 12px; }
.shot { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius); overflow: hidden; }
.shot img { width: 100%; height: auto; transition: transform .6s var(--ease-out), filter .3s; }
.shot:hover img { transform: scale(1.035); }
@media (min-width: 760px) { .shots { columns: 3; column-gap: 20px; } .shots li { margin-bottom: 20px; } }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0; padding: 0;
  background: rgba(30, 16, 10, .94); color: #FBEDE1;
}
.lightbox::backdrop { background: rgba(30, 16, 10, .6); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox-figure {
  margin: 0; display: grid; justify-items: center; gap: 14px;
  padding: calc(64px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(72px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.lightbox-figure img { max-height: calc(100vh - 190px); max-height: calc(100dvh - 190px); width: auto; border-radius: 6px; touch-action: pan-y; user-select: none; }
.lightbox-figure figcaption { font-family: var(--display); font-weight: 500; font-style: italic; font-size: var(--s1); text-align: center; }
.lightbox-count { position: absolute; left: 0; right: 0; top: calc(26px + env(safe-area-inset-top, 0px)); text-align: center; font-size: .75rem; letter-spacing: .24em; }
.lb-btn {
  position: absolute; display: grid; place-items: center; width: 48px; height: 48px;
  border: 1px solid rgba(251, 237, 225, .35); border-radius: 50%; background: rgba(30, 16, 10, .4); color: #FBEDE1; cursor: pointer;
}
.lb-btn:hover { background: rgba(251, 237, 225, .14); }
.lb-close { top: calc(14px + env(safe-area-inset-top, 0px)); right: calc(14px + env(safe-area-inset-right, 0px)); }
.lb-prev, .lb-next { top: 50%; translate: 0 -50%; }
.lb-prev { left: calc(12px + env(safe-area-inset-left, 0px)); }
.lb-next { right: calc(12px + env(safe-area-inset-right, 0px)); }
.lightbox :focus-visible { outline-color: #FBEDE1; }
@media (max-width: 640px) {
  .lb-prev, .lb-next { top: auto; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); translate: none; }
  .lb-prev { left: calc(50% - 60px); } .lb-next { right: calc(50% - 60px); }
}

/* ---------- RSVP ---------- */
.rsvp { padding-block: clamp(56px, 8vw, 96px) clamp(16px, 3vw, 40px); }
.reply {
  max-width: 640px; margin-inline: auto;
  background: var(--card); border-radius: 6px; overflow: hidden;
  box-shadow: 0 50px 80px -50px var(--shadow), 0 0 0 1px var(--rule);
}
.litema--card { opacity: 1; }
.reply-body { padding: clamp(32px, 6vw, 56px) clamp(20px, 6vw, 56px) clamp(32px, 6vw, 52px); }
.reply h2 { font-size: var(--s3); }
.reply-by { margin-top: 10px; font-family: var(--display); font-weight: 500; font-style: italic; font-size: var(--s1); color: var(--ink-soft); }
.seats { margin-top: 14px; padding: 8px 16px; border-radius: 999px; background: #FCE6D6; color: var(--orange-deep); font-size: .9rem; font-weight: 500; }

.rsvp-form { display: grid; gap: 26px; margin-top: 34px; }
.field { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > label, .field > legend { font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; padding: 0; }
.field > legend { margin-bottom: 10px; }
.optional { text-transform: none; letter-spacing: .02em; font-weight: 400; color: var(--ink-soft); }
.field input[type="text"], .field textarea {
  width: 100%; padding: 10px 2px; border: 0; border-bottom: 1.5px solid var(--rule); border-radius: 0;
  background: transparent; color: var(--ink); font: 400 var(--s1)/1.4 var(--body);
  transition: border-color .2s;
}
.field textarea { resize: vertical; min-height: 84px; font-size: var(--s0); }
.field input::placeholder, .field textarea::placeholder { color: #A88E80; }
.field input[type="text"]:focus, .field textarea:focus { outline: none; border-bottom-color: var(--orange); }
.field input[aria-invalid="true"] { border-bottom-color: #B3261E; }
.field-error { color: #B3261E; font-size: .9rem; }
.field-hint { color: var(--ink-soft); font-size: .9rem; }

.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: grid; gap: 2px; height: 100%; padding: 14px 16px;
  border: 1.5px solid var(--rule); border-radius: 12px;
  font-weight: 500; transition: border-color .2s, background-color .2s;
}
.choice small { font-weight: 400; font-size: .82rem; color: var(--ink-soft); }
.choice input:checked + span { border-color: var(--orange); background: #FDEDE2; }
.choice input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

.stepper { display: inline-flex; align-items: center; gap: 6px; }
.step {
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--rule); background: transparent; color: var(--ink);
  font: 400 1.4rem/1 var(--body); cursor: pointer;
}
.step:hover { border-color: var(--orange); }
.step:disabled { opacity: .35; cursor: not-allowed; }
.stepper input {
  width: 3.2ch; text-align: center; border: 0; background: transparent; color: var(--ink);
  font: 500 var(--s3)/1 var(--body); font-variant-numeric: tabular-nums lining-nums; -moz-appearance: textfield; appearance: textfield;
  -webkit-text-fill-color: var(--ink); opacity: 1;
}
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.form-foot { text-align: center; font-size: .9rem; color: var(--ink-soft); }
.form-status { text-align: center; font-size: .9rem; color: var(--orange-deep); min-height: 1.4em; margin-top: -14px; }
.manual-copy { width: 100%; padding: 12px; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); color: var(--ink); font: 400 .9rem/1.5 var(--body); }
.lb-open, .lb-open body { overflow: hidden; }
.rsvp-done { margin-top: 30px; display: grid; gap: 14px; text-align: center; }
.rsvp-done:focus { outline: none; }
.rsvp-done-title { font-family: var(--display); font-weight: 500; font-style: italic; font-size: var(--s3); color: var(--orange-deep); }
.rsvp-done .actions { margin-top: 10px; }

/* ---------- Footer ---------- */
.foot { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
.foot-inner { display: grid; justify-items: center; text-align: center; gap: 10px; padding-top: clamp(56px, 8vw, 96px); }
.foot-mono { font-family: var(--display); font-weight: 500; font-size: var(--s4); line-height: 1; }
.foot-mono i { color: var(--orange); }
.foot-date { font-size: var(--sm); letter-spacing: .24em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 18px; }
.share-status { min-height: 1.6em; font-size: .9rem; color: var(--ink-soft); }

/* Floating RSVP button */
.float-rsvp {
  position: fixed; z-index: 20;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  background: var(--ink); color: var(--card); text-decoration: none;
  font-size: .72rem; font-weight: 600; letter-spacing: .18em; padding-left: .18em;
  box-shadow: 0 14px 28px -12px rgba(44, 24, 16, .7);
  transition: transform .3s var(--ease-out), opacity .3s;
}
.float-rsvp.is-away { transform: translateY(24px) scale(.8); opacity: 0; pointer-events: none; }
.lb-open .float-rsvp { display: none; }

/* Sound switch on the envelope screen */
.sound-toggle {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top, 0px));
  right: max(14px, env(safe-area-inset-right, 0px));
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px 0 12px;
  border: 1px solid var(--rule); border-radius: 999px;
  background: rgba(255, 250, 245, .6); color: var(--ink-soft);
  font: 500 .72rem/1 var(--body); letter-spacing: .18em; text-transform: uppercase;
  cursor: pointer; transition: color .2s, border-color .2s, opacity .3s;
}
.sound-toggle:hover { color: var(--ink); border-color: var(--ink-soft); }
.sound-toggle .icon { width: 20px; height: 20px; }
.sound-toggle .icon-sound-off, .sound-toggle[aria-pressed="false"] .icon-sound-on { display: none; }
.sound-toggle[aria-pressed="false"] .icon-sound-off { display: block; }
.intro.is-open .sound-toggle { opacity: 0; pointer-events: none; }

/* Music button, shown only when a song is set in config.js */
.float-music {
  position: fixed; z-index: 20;
  left: calc(16px + env(safe-area-inset-left, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--rule); background: var(--card); color: var(--ink); cursor: pointer;
  box-shadow: 0 14px 28px -16px rgba(44, 24, 16, .6);
}
.float-music .icon { width: 22px; height: 22px; }
.float-music .eq { display: none; align-items: flex-end; gap: 3px; height: 18px; }
.float-music .eq i { width: 3px; height: 100%; border-radius: 2px; background: var(--orange); transform-origin: bottom; animation: eq 1s ease-in-out infinite; }
.float-music .eq i:nth-child(2) { animation-delay: -.35s; }
.float-music .eq i:nth-child(3) { animation-delay: -.7s; }
.float-music .eq i:nth-child(4) { animation-delay: -.15s; }
.float-music[data-playing="true"] .eq { display: flex; }
.float-music[data-playing="true"] .icon-music-off { display: none; }
.lb-open .float-music { display: none; }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .badge-ring { animation: none; }
}
