/* ==========================================================================
   Sage & Ivory: Wedding Website
   Colours and fonts are set once here. Change a value and the whole site follows.
   ========================================================================== */

/* Fonts are stored with the site (no Google Fonts request: faster, works offline, GDPR-friendly).
   All are free under the SIL Open Font License (see assets/fonts). */
@font-face { font-family: 'Cormorant Garamond'; src: url('../fonts/cormorant-garamond.woff2') format('woff2'); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('../fonts/cormorant-garamond-italic.woff2') format('woff2'); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'Jost'; src: url('../fonts/jost.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Mrs Saint Delafield'; src: url('../fonts/mrs-saint-delafield.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
/* Cyrillic letters (Bulgarian) come from separate files that load only when a Cyrillic text is shown.
   Mrs Saint Delafield has no Cyrillic letters, so Cyrillic script text uses Great Vibes (also SIL OFL). */
@font-face { font-family: 'Cormorant Garamond'; src: url('../fonts/cormorant-garamond-cyrillic.woff2') format('woff2'); font-weight: 300 700; font-style: normal; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Cormorant Garamond'; src: url('../fonts/cormorant-garamond-italic-cyrillic.woff2') format('woff2'); font-weight: 300 700; font-style: italic; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Jost'; src: url('../fonts/jost-cyrillic.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Great Vibes'; src: url('../fonts/great-vibes-cyrillic.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --cream:      #F4EFE6;   /* page background */
  --paper:      #FBF8F2;   /* cards */
  --sand:       #E9E0D1;   /* soft bands */
  --olive:      #4D5536;   /* deep bands, buttons */
  --olive-dark: #343A24;
  --sage:       #8C9873;
  --sage-mist:  #DDE2D0;
  --gold:       #B8924F;   /* seal, thin lines */
  --gold-text:  #735626;   /* gold for small text */
  --ink:        #2F2A22;   /* text */
  --muted:      #5F584B;   /* secondary text */
  --line:       rgba(47, 42, 34, .16);
  --on-dark:    #F7F2E8;

  --font-script:  'Mrs Saint Delafield', 'Great Vibes', 'Snell Roundhand', cursive;
  --font-display: 'Cormorant Garamond', 'Garamond', 'Times New Roman', serif;
  --font-body:    'Jost', 'Helvetica Neue', Arial, sans-serif;

  --wrap: 1140px;
  --ease: cubic-bezier(.22, .7, .2, 1);
  --pad-x: clamp(16px, 5vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 300 1rem/1.75 var(--font-body);
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Fine paper grain over the whole page */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 80; opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .5 0 0 0 0 .42 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body.is-locked { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--olive); text-underline-offset: .22em; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.12; margin: 0; color: var(--ink); }
p { margin: 0 0 1em; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip { position: absolute; left: 12px; top: -60px; background: var(--olive); color: var(--on-dark); padding: 8px 14px; z-index: 100; }
.skip:focus { top: 12px; }

/* ---------- Type helpers ---------- */
.eyebrow { font: 400 .74rem/1.4 var(--font-body); letter-spacing: .32em; text-transform: uppercase; color: var(--muted); margin: 0 0 1.1em; }
.eyebrow--light { color: rgba(247, 242, 232, .92); }
.script { font-family: var(--font-script); font-weight: 400; letter-spacing: 0; text-transform: none; line-height: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .75em 1.9em; border-radius: 0;
  border: 1px solid var(--olive);
  font: 400 .76rem/1 var(--font-body); letter-spacing: .22em; text-transform: uppercase; text-decoration: none;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn--solid { background: var(--olive); color: var(--on-dark); }
.btn--solid:hover { background: var(--olive-dark); border-color: var(--olive-dark); }
.btn--ghost { background: transparent; color: var(--olive); }
.btn--ghost:hover { background: var(--olive); color: var(--on-dark); }
.btn--light { background: var(--on-dark); color: var(--olive-dark); border-color: var(--on-dark); }
.btn--light:hover { background: transparent; color: var(--on-dark); }
.btn--outline-light { background: transparent; color: var(--on-dark); border-color: rgba(247, 242, 232, .75); }
.btn--outline-light:hover { background: var(--on-dark); color: var(--olive-dark); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-grid; place-items: center;
  border: 1px solid currentColor; background: transparent; color: inherit;
}
.icon-btn[aria-pressed="true"] { background: var(--olive); border-color: var(--olive); color: var(--on-dark); }
.is-over .icon-btn[aria-pressed="true"] { background: var(--on-dark); border-color: var(--on-dark); color: var(--olive-dark); }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px;
  padding: 14px var(--pad-x);
  color: var(--ink);
  background: rgba(244, 239, 230, .97);
  border-bottom: 1px solid var(--line);
  transition: background .4s var(--ease), color .4s var(--ease), border-color .4s, padding .4s var(--ease);
}
.topbar.is-over { background: transparent; color: var(--on-dark); border-bottom-color: transparent; padding-top: 22px; }
.topbar__mono { font: 300 1.15rem/1 var(--font-display); letter-spacing: .3em; color: inherit; text-decoration: none; white-space: nowrap; }
.nav { margin-left: auto; }
.nav__list { list-style: none; display: flex; gap: clamp(12px, 1.6vw, 26px); margin: 0; padding: 0; }
.nav__list a {
  text-decoration: none; color: inherit; font: 400 .7rem/1 var(--font-body); letter-spacing: .2em; text-transform: uppercase;
  padding: 8px 0; border-bottom: 1px solid transparent; white-space: nowrap;
}
.nav__list a:hover, .nav__list a.is-active { border-bottom-color: currentColor; }
.topbar__tools { display: flex; align-items: center; gap: 8px; }
.lang { display: inline-flex; gap: 2px; }
.lang button {
  border: 0; background: transparent; color: inherit; opacity: .6;
  min-width: 34px; height: 34px; font: 400 .72rem/1 var(--font-body); letter-spacing: .14em;
}
.lang button[aria-pressed="true"] { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
.nav-toggle { display: none; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 16px; height: 1.5px; background: currentColor; position: relative; transition: transform .25s;
}
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after  { top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after  { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 1100px) {
  .nav-toggle { display: inline-grid; }
  .nav {
    position: fixed; inset: 68px 0 auto 0; margin: 0;
    background: var(--cream); color: var(--ink);
    max-height: 0; overflow: hidden; transition: max-height .4s var(--ease);
  }
  .nav.is-open { max-height: 85vh; overflow-y: auto; border-bottom: 1px solid var(--line); }
  .nav__list { flex-direction: column; gap: 0; padding: 6px var(--pad-x) 22px; }
  .nav__list a { display: block; padding: 15px 0; font-size: .8rem; border-bottom: 1px solid var(--line); }
  .topbar__tools { margin-left: auto; }
  .topbar.is-open { background: var(--cream); color: var(--ink); padding-top: 14px; }
}

/* One warm film-like grade for every photo, so mixed photos look like one set */
.collage img, .venue__photo, .travel__photo, .gallery__item img, .party__photo img,
.hero__photo, .countdown-band__photo, .rsvp-band__photo, .footer__photo { filter: saturate(.76) sepia(.16) contrast(.97); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: grid; place-items: center;
  padding: 110px 16px 96px; text-align: center; color: var(--on-dark); overflow: hidden; isolation: isolate;
}
.hero__photo, .countdown-band__photo, .footer__photo, .rsvp-band__photo {
  position: absolute; inset: 0; z-index: -1; background: var(--olive) center / cover no-repeat;
}
.hero__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(28, 26, 18, .58) 0%, rgba(28, 26, 18, .4) 42%, rgba(28, 26, 18, .66) 100%); }
.hero__inner { max-width: 920px; }
.hero__frame { position: relative; width: clamp(118px, 15vw, 164px); margin: 0 auto 24px; color: var(--on-dark); }
.wreath { width: 100%; height: auto; display: block; }
.initials {
  position: absolute; inset: 0; display: grid; place-content: center; margin: 0;
  font: 300 clamp(1.6rem, 2.8vw, 2.2rem)/1.05 var(--font-display); letter-spacing: .08em;
}
.initials span { display: block; }
.initials .rule { width: 24px; height: 1px; background: currentColor; margin: 7px auto; opacity: .8; }
.hero__names {
  font: 300 clamp(2.4rem, 7.4vw, 6.2rem)/1.04 var(--font-display);
  letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark); margin: 0 0 .32em;
}
.amp { font-style: italic; text-transform: none; letter-spacing: 0; font-size: .72em; padding: 0 .1em; }
.hero__date { font: 400 .86rem/1.4 var(--font-body); letter-spacing: .42em; text-transform: uppercase; margin: 0 0 .7em; }
.hero__place { font-size: clamp(2.1rem, 4.4vw, 3rem); margin: 0; color: var(--on-dark); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 2.6rem; }
.hero__scroll { position: absolute; left: 50%; bottom: 24px; width: 1px; height: 54px; background: rgba(247, 242, 232, .35); overflow: hidden; }
.hero__scroll span { position: absolute; left: 0; top: -54px; width: 1px; height: 54px; background: var(--on-dark); animation: drip 2.6s var(--ease) infinite; }
@keyframes drip { to { top: 54px; } }

/* ---------- Countdown band ---------- */
.countdown-band { position: relative; isolation: isolate; text-align: center; color: var(--on-dark); padding: clamp(70px, 10vw, 120px) var(--pad-x); overflow: hidden; }
.countdown-band__photo::after { content: ""; position: absolute; inset: 0; background: rgba(52, 58, 36, .86); }
.countdown-band__script { font-size: clamp(2.8rem, 6vw, 4.2rem); color: #E9D7AC; margin: 0 0 .3em; }
.countdown { display: flex; justify-content: center; gap: clamp(14px, 4vw, 56px); }
.countdown__unit { min-width: 70px; }
.countdown__num { display: block; font: 300 clamp(2.8rem, 7.5vw, 5.4rem)/1 var(--font-display); font-variant-numeric: lining-nums tabular-nums; }
.countdown__label { display: block; font: 400 .7rem/1 var(--font-body); letter-spacing: .3em; text-transform: uppercase; margin-top: 12px; opacity: .88; }
.countdown__done { font: 400 clamp(3rem, 8vw, 5rem)/1 var(--font-script); color: #E9D7AC; margin: 0; }
.countdown-band__intro { max-width: 46ch; margin: clamp(30px, 5vw, 46px) auto 0; font: italic 400 clamp(1.15rem, 2.2vw, 1.4rem)/1.55 var(--font-display); color: rgba(247, 242, 232, .94); }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 11vw, 150px) var(--pad-x); position: relative; }
.section--sand { background: var(--sand); }
.section__wrap { max-width: var(--wrap); margin: 0 auto; }
.head { text-align: center; margin-bottom: clamp(44px, 7vw, 76px); }
.head--left { text-align: left; }
.head__script { display: block; font-size: clamp(2.7rem, 5.4vw, 3.8rem); color: var(--gold-text); margin: 0 0 -.12em; position: relative; z-index: 1; }
.head__title { font: 300 clamp(2.1rem, 4.6vw, 3.4rem)/1.08 var(--font-display); letter-spacing: .12em; text-transform: uppercase; }
.head__lead { max-width: 54ch; margin: 22px auto 0; color: var(--muted); }
.head--left .head__lead { margin-left: 0; }

/* Story: editorial collage + chapters */
.story { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(40px, 7vw, 100px); align-items: center; }
.collage { position: relative; padding: 0 18% 22% 0; }
.collage__a { aspect-ratio: 3 / 4; width: 100%; overflow: hidden; }
.collage__b {
  position: absolute; right: 0; bottom: 0; width: 52%; aspect-ratio: 4 / 5; overflow: hidden;
  border: 10px solid var(--cream); box-shadow: 0 18px 40px rgba(47, 42, 34, .18);
}
.collage__a img, .collage__b img, .collage__c img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Three photos (as on the Canva page): arch, then two framed photos below it, oldest first */
.collage--3 { padding: 0 12% 34% 10%; }
.collage--3 .collage__a { border-radius: 999px 999px 0 0; }
.collage--3 .collage__c, .collage--3 .collage__b {
  position: absolute; aspect-ratio: 4 / 5; overflow: hidden;
  border: 10px solid var(--paper); box-shadow: 0 18px 40px rgba(47, 42, 34, .18);
}
.collage--3 .collage__c { left: 0; bottom: 0; width: 40%; z-index: 1; }
.collage--3 .collage__b { right: 0; bottom: 9%; width: 46%; z-index: 2; }
.collage__script { position: absolute; left: 4%; top: 3%; font-size: clamp(2.8rem, 5vw, 3.8rem); color: var(--on-dark); text-shadow: 0 2px 14px rgba(0,0,0,.4); transform: rotate(-8deg); margin: 0; }
.chapters { list-style: none; margin: 34px 0 0; padding: 0; }
.chapter { display: grid; grid-template-columns: 76px 1fr; gap: 20px; padding: 20px 0; border-top: 1px solid var(--line); }
.chapter:last-child { border-bottom: 1px solid var(--line); }
.chapter__year { font: italic 400 1.5rem/1.2 var(--font-display); color: var(--gold-text); }
.chapter__title { font: 400 .78rem/1.5 var(--font-body); letter-spacing: .24em; text-transform: uppercase; margin-bottom: .35em; }
.chapter__text { color: var(--muted); margin: 0; }

/* The day: venues */
.venues { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: clamp(36px, 6vw, 72px); }
.venue { text-align: center; }
.venue__frame { position: relative; margin-bottom: 30px; border-radius: 999px 999px 0 0; overflow: hidden; }
.venue__photo { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; object-position: center 72%; border-radius: 999px 999px 0 0; }
.venue__time { font: italic 400 1.35rem/1.2 var(--font-display); color: var(--gold-text); margin-bottom: .35em; }
.venue__name { font: 300 clamp(1.8rem, 3vw, 2.3rem)/1.1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; margin-bottom: .45em; }
.venue__place { margin: 0; font-weight: 400; }
.venue__address { color: var(--muted); margin-bottom: 1.4em; }
.venue__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.venue__map { display: block; width: 100%; aspect-ratio: 16 / 10; border: 0; margin-top: 20px; filter: saturate(.7) sepia(.15); background: var(--sage-mist); }

/* Schedule */
.schedule-wrap { margin-top: clamp(80px, 11vw, 140px); }
.schedule { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); position: relative; text-align: center; }
.schedule::before { content: ""; position: absolute; left: 10%; right: 10%; top: 38px; height: 1px; background: rgba(47, 42, 34, .25); }
.schedule__item { position: relative; padding: 0 10px; }
.schedule__icon {
  width: 76px; height: 76px; margin: 0 auto 20px; border-radius: 50%;
  display: grid; place-items: center; background: var(--cream); border: 1px solid rgba(47, 42, 34, .25); color: var(--olive); position: relative;
}
.schedule__icon svg { width: 34px; height: 34px; }
.schedule__time { font: 300 1.9rem/1 var(--font-display); font-variant-numeric: lining-nums; display: block; margin-bottom: 10px; }
.schedule__title { font: 400 .76rem/1.5 var(--font-body); letter-spacing: .22em; text-transform: uppercase; margin-bottom: .3em; }
.schedule__note { color: var(--muted); font-size: .95rem; margin: 0; }

/* Travel */
.travel { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 7vw, 100px); align-items: center; }
.travel__photo { aspect-ratio: 3 / 4; width: 100%; object-fit: cover; border-radius: 999px 999px 0 0; }
.travel__text { font: 400 1.3rem/1.6 var(--font-display); }
.hotels { margin-top: 30px; }
.hotel { padding: 24px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; align-items: center; }
.hotel:last-child { border-bottom: 1px solid var(--line); }
.hotel__name { font: 300 1.6rem/1.15 var(--font-display); letter-spacing: .1em; text-transform: uppercase; }
.hotel__note { color: var(--muted); margin: 0; grid-column: 1; }
.hotel__by { font: italic 400 1.1rem/1.4 var(--font-display); color: var(--gold-text); margin: 0; grid-column: 1; }
.hotel .btn { grid-column: 2; grid-row: 1 / span 3; }

/* Wedding party */
.party { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 44px 24px; text-align: center; }
/* Instant photos, tilted and taped, at slightly different heights (as on the Canva page) */
.party { align-items: start; }
.party > li:nth-child(4n+2) { margin-top: 26px; }
.party > li:nth-child(4n+4) { margin-top: 20px; }
.party__card {
  --tilt: -5deg; --tape: rgba(185, 194, 163, .88);
  position: relative; width: 170px; margin: 0 auto 26px; padding: 10px 10px 36px;
  background: #FFFDF8; border: 1px solid #E2D9C8; box-shadow: 0 12px 26px rgba(47, 42, 34, .12);
  transform: rotate(var(--tilt));
}
.party > li:nth-child(4n+2) .party__card { --tilt: 4deg; --tape: rgba(217, 199, 167, .9); }
.party > li:nth-child(4n+3) .party__card { --tilt: -3deg; }
.party > li:nth-child(4n+4) .party__card { --tilt: 5deg; --tape: rgba(217, 199, 167, .9); }
.party__card::before {
  content: ""; position: absolute; left: 50%; top: -12px; width: 76px; height: 24px;
  background: var(--tape); transform: translateX(-50%) rotate(calc(var(--tilt) * -1.4));
}
.party__photo {
  aspect-ratio: 15 / 17; overflow: hidden; display: grid; place-items: center;
  background: var(--olive); color: var(--on-dark); font: 300 3rem/1 var(--font-display); letter-spacing: .06em;
}
.party__photo img { width: 100%; height: 100%; object-fit: cover; }
.party__name { font: 300 1.5rem/1.2 var(--font-display); letter-spacing: .14em; text-transform: uppercase; }
.party__role { font: italic 400 1.15rem/1.4 var(--font-display); color: var(--muted); margin: 0; }

/* Dress code + gifts side by side */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 60px); }
.duo__col { text-align: center; padding: clamp(40px, 5vw, 64px) clamp(24px, 4vw, 52px); background: var(--paper); outline: 1px solid var(--line); outline-offset: -12px; }
.duo__col .head { margin-bottom: 26px; }
.duo__col .head__title { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
.dress__title { font: italic 400 1.6rem/1.2 var(--font-display); margin-bottom: .5em; }
.dress__text, .gifts__text { color: var(--muted); }
.swatches { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; list-style: none; padding: 0; margin: 26px 0 0; }
.swatch { width: 46px; height: 46px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 0 0 5px var(--paper), 0 0 0 6px var(--line); }
.gifts__links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 26px; }

/* Gallery: editorial grid */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: clamp(150px, 21vw, 290px); gap: clamp(8px, 1.4vw, 16px); }
.gallery__item { padding: 0; border: 0; background: var(--sand); overflow: hidden; display: block; width: 100%; height: 100%; }
.gallery__item:nth-child(6n+1) { grid-column: span 2; grid-row: span 2; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.gallery__item:hover img { transform: scale(1.04); }
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(34, 31, 24, .94); display: grid; place-items: center; padding: 60px 16px; }
.lightbox img { max-height: 84vh; width: auto; max-width: 100%; }
.lightbox__btn { position: absolute; color: var(--on-dark); }
.lightbox__close { top: 14px; right: 14px; }
.lightbox__prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 14px; top: 50%; transform: translateY(-50%); }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(30px, 6vw, 90px); align-items: start; }
.faq-grid .head { margin-bottom: 0; position: sticky; top: 110px; }
.faq__item { border-top: 1px solid var(--line); }
.faq__item:last-child { border-bottom: 1px solid var(--line); }
.faq__q {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 18px;
  padding: 22px 0; font: 400 1.4rem/1.3 var(--font-display);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after { content: "+"; font: 200 1.8rem/1 var(--font-body); color: var(--gold-text); transition: transform .3s var(--ease); flex: none; }
.faq__item[open] .faq__q::after { transform: rotate(45deg); }
.faq__a { padding: 0 0 24px; color: var(--muted); max-width: 62ch; }

/* RSVP band */
.rsvp-band { position: relative; isolation: isolate; padding: clamp(80px, 11vw, 150px) var(--pad-x); }
.rsvp-band__photo::after { content: ""; position: absolute; inset: 0; background: rgba(52, 58, 36, .8); }
.rsvp { max-width: 760px; margin: 0 auto; background: var(--paper); padding: clamp(40px, 6vw, 76px) clamp(24px, 6vw, 76px); position: relative; }
.rsvp::before { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(184, 146, 79, .45); pointer-events: none; }
.rsvp .head { margin-bottom: 14px; }
.rsvp__deadline { text-align: center; font: italic 400 1.25rem/1.4 var(--font-display); color: var(--gold-text); margin-bottom: 36px; }
.form { display: grid; gap: 24px; position: relative; z-index: 1; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.field { display: grid; gap: 8px; }
.field__label, .field legend { font: 400 .7rem/1.4 var(--font-body); letter-spacing: .22em; text-transform: uppercase; color: var(--ink); padding: 0; }
.field__input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 2px;
  font: 300 1.02rem/1.4 var(--font-body); color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid rgba(47, 42, 34, .4); border-radius: 0;
}
.field select { padding-right: 24px; appearance: none; -webkit-appearance: none; background: linear-gradient(45deg, transparent 50%, var(--ink) 50%) calc(100% - 9px) 50% / 5px 5px no-repeat, linear-gradient(-45deg, transparent 50%, var(--ink) 50%) calc(100% - 4px) 50% / 5px 5px no-repeat; }
.field textarea { min-height: 96px; resize: vertical; border: 1px solid rgba(47, 42, 34, .3); padding: 10px 12px; }
.field__input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--olive); box-shadow: 0 1px 0 var(--olive); }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 20px; border: 1px solid rgba(47, 42, 34, .35); font-size: .95rem; transition: background .2s, color .2s; }
.choice input:checked + span { background: var(--olive); color: var(--on-dark); border-color: var(--olive); }
.choice input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.form__extra { display: grid; gap: 24px; }
.form__error { color: #8A3B2E; font-size: .92rem; margin: 0; }
.form__submit { justify-self: center; min-width: 240px; margin-top: 6px; }
.rsvp__done { text-align: center; padding: 30px 0 10px; }
.rsvp__done h3 { font: 400 clamp(3rem, 7vw, 4.2rem)/1 var(--font-script); color: var(--gold-text); margin-bottom: .3em; }
.rsvp__demo { font-size: .85rem; color: var(--muted); }

/* Footer */
.footer { position: relative; isolation: isolate; min-height: 78svh; display: grid; place-items: center; text-align: center; color: var(--on-dark); padding: 100px 16px 60px; overflow: hidden; }
.footer__photo { background-position: center 80%; }
.footer__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(28, 26, 18, .3), rgba(28, 26, 18, .7)); }
.footer__script { font-size: clamp(3.6rem, 10vw, 7rem); color: var(--on-dark); margin: 0 0 .15em; }
.footer__names { font: 300 clamp(1.5rem, 3.4vw, 2.2rem)/1.2 var(--font-display); letter-spacing: .28em; text-transform: uppercase; margin-bottom: .5em; }
.footer__date { font: 400 .78rem/1.4 var(--font-body); letter-spacing: .4em; text-transform: uppercase; }
.footer__hashtag { font: italic 400 1.3rem/1.4 var(--font-display); color: #E9D7AC; }
.footer__contact { font-size: .92rem; margin: 0; }
.footer a { color: inherit; }

/* ---------- Envelope intro ---------- */
.envelope-scene {
  --env: #5C6343; --env-dark: #4E5538; --env-liner: #EFE8DA;
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; align-content: center; gap: clamp(16px, 3.4vh, 34px);
  padding: 20px 16px;
  background: radial-gradient(ellipse at 50% 45%, #FBF8F2 0%, #ECE4D6 75%) var(--cream);
  transition: opacity 1s var(--ease), visibility 1s;
  text-align: center;
}
.envelope-scene[data-color="ivory"]      { --env: #EAE1D0; --env-dark: #DED3BE; --env-liner: #6E7652; }
.envelope-scene[data-color="blush"]      { --env: #E2C6BA; --env-dark: #D6B4A6; --env-liner: #F6EFE6; }
.envelope-scene[data-color="dusty-blue"] { --env: #A9BAC7; --env-dark: #98AAB8; --env-liner: #F3EFE7; }
.envelope-scene.is-gone { opacity: 0; visibility: hidden; }
.envelope-scene__head { transition: opacity .5s; }
.envelope-scene__head .eyebrow { margin-bottom: .4em; }
.envelope-scene__from { font: 400 2.5rem/1 var(--font-script); color: var(--gold-text); margin: 0; }
.envelope-scene__names { font: 300 clamp(1.9rem, 6vw, 3rem)/1.1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; margin: 0; }
.envelope {
  --w: min(86vw, 460px);
  position: relative; width: var(--w); aspect-ratio: 1.42; perspective: 1600px;
  filter: drop-shadow(0 26px 40px rgba(47, 42, 34, .24));
}
.envelope__back { position: absolute; inset: 0; background: var(--env-dark); }
.envelope__letter {
  position: absolute; left: 5%; right: 5%; top: 5%; height: 90%; z-index: 1;
  background: var(--paper); padding: 4% 4% 3%;
  display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 6px;
  transition: transform 1.1s var(--ease) .6s;
}
.envelope__photo { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.envelope__date { font: 400 .62rem/1 var(--font-body); letter-spacing: .36em; color: var(--muted); margin: 4px 0 0; }
.envelope__pocket {
  position: absolute; inset: 0; z-index: 2;
  background: var(--env);
  clip-path: polygon(0 0, 50% 55%, 100% 0, 100% 100%, 0 100%);
}
.envelope__pocket::before, .envelope__flap-face--front::before {
  content: ""; position: absolute; inset: 0; opacity: .55; mix-blend-mode: multiply;
  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='1.1' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .28 0 0 0 0 .2 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.envelope__pocket::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top right, transparent 49.6%, rgba(0,0,0,.09) 50%, transparent 50.5%) left / 50% 100% no-repeat,
              linear-gradient(to top left,  transparent 49.6%, rgba(0,0,0,.09) 50%, transparent 50.5%) right / 50% 100% no-repeat;
}
.envelope__flap {
  position: absolute; left: 0; right: 0; top: 0; height: 60%; z-index: 3;
  transform-origin: top center; transform-style: preserve-3d;
  transition: transform .9s var(--ease), z-index 0s .45s;
}
.envelope__flap-face { position: absolute; inset: 0; clip-path: polygon(0 0, 100% 0, 50% 100%); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.envelope__flap-face--front { background: linear-gradient(180deg, var(--env-dark), var(--env)); }
.envelope__flap-face--front::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.12)); }
.envelope__flap-face--liner {
  transform: rotateX(180deg);
  /* The liner is turned over twice (on its own and with the flap), so its tip is drawn at the top: once open it points up like a real envelope flap. */
  clip-path: polygon(0 100%, 100% 100%, 50% 0);
  background-color: var(--env-liner);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='46' viewBox='0 0 46 46'%3E%3Cg fill='none' stroke='%238C9873' stroke-width='1' opacity='.6'%3E%3Cpath d='M23 34V12'/%3E%3Cellipse cx='19' cy='17' rx='4' ry='2' transform='rotate(35 19 17)'/%3E%3Cellipse cx='27' cy='21' rx='4' ry='2' transform='rotate(-35 27 21)'/%3E%3Cellipse cx='19' cy='26' rx='4' ry='2' transform='rotate(35 19 26)'/%3E%3C/g%3E%3C/svg%3E");
}
.seal {
  position: absolute; left: 50%; top: 60%; z-index: 4;
  width: clamp(80px, 21vw, 104px); aspect-ratio: 1; transform: translate(-50%, -50%);
  border: 0; padding: 0; background: none; border-radius: 50%;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .3));
  transition: transform .4s var(--ease), opacity .4s;
}
.seal__wax, .seal__wax svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.seal__mono { position: relative; display: grid; place-items: center; height: 100%; font: 600 clamp(1.1rem, 3.6vw, 1.4rem)/1 var(--font-display); letter-spacing: .06em; color: #654A1B; text-shadow: 0 1px 0 rgba(255, 240, 200, .6); }
.seal:hover { transform: translate(-50%, -50%) scale(1.06) rotate(-4deg); }
.envelope-scene__hint { font: 400 .72rem/1.4 var(--font-body); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); margin: 0; animation: breathe 2.6s ease-in-out infinite; transition: opacity .3s; }
@keyframes breathe { 50% { opacity: .45; } }
.envelope.is-open .seal { opacity: 0; transform: translate(-50%, -50%) scale(.7); pointer-events: none; }
.envelope.is-open .envelope__flap { transform: rotateX(180deg); z-index: 0; }
.envelope.is-open .envelope__letter { transform: translateY(-52%); }
.envelope-scene.is-opening .envelope-scene__hint { opacity: 0; animation: none; }
.envelope-scene.is-opening .envelope-scene__head { opacity: 0; } /* the opened flap rises into this space */

/* ---------- Password gate ---------- */
.gate { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: var(--sand); }
.gate__card { background: var(--paper); padding: 46px 34px; width: min(100%, 400px); display: grid; gap: 16px; text-align: center; outline: 1px solid var(--line); outline-offset: -10px; }
.gate__mono { width: 110px; margin: 0 auto 4px; position: relative; color: var(--olive); }
.gate__mono .initials { font-size: 1.4rem; }
.gate__label { font: italic 400 1.2rem/1.4 var(--font-display); }
.gate__error { color: #8A3B2E; margin: 0; font-size: .92rem; }
.gate .field__input { text-align: center; }

/* ---------- Tablet & mobile ---------- */
@media (max-width: 900px) {
  .story, .travel, .faq-grid, .duo { grid-template-columns: 1fr; }
  .faq-grid .head { position: static; text-align: center; }
  .collage { max-width: 520px; margin: 0 auto; width: 100%; }
  .travel__photo { max-width: 420px; margin: 0 auto; }
  .story__text .head, .travel__body .head { text-align: center; }
  .story__text .head__lead, .travel__body .head__lead { margin-left: auto; }
  .schedule { grid-template-columns: 1fr; gap: 0; text-align: left; max-width: 520px; margin: 0 auto; }
  .schedule::before { left: 38px; right: auto; top: 20px; bottom: 20px; width: 1px; height: auto; }
  .schedule__item { display: grid; grid-template-columns: 76px 1fr; gap: 0 22px; padding: 0 0 26px; align-items: start; }
  .schedule__icon { margin: 0; grid-row: span 3; }
  .schedule__time { margin: 12px 0 6px; }
}
@media (max-width: 640px) {
  body { font-size: .98rem; }
  .form__row { grid-template-columns: 1fr; }
  .hotel { grid-template-columns: 1fr; }
  .hotel .btn { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 10px; }
  .countdown__unit { min-width: 58px; }
  .countdown__label { letter-spacing: .16em; font-size: .62rem; }
  /* Bulgarian labels ("секунди", "минути") are longer than the English ones */
  :lang(bg) .countdown { gap: 8px; }
  :lang(bg) .countdown__label { letter-spacing: .08em; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 42vw; }
  .gallery__item:nth-child(6n+1) { grid-column: span 2; grid-row: span 1; }
  .hero__date { letter-spacing: .28em; }
  .party__card { width: 140px; }
  .chapter { grid-template-columns: 58px 1fr; gap: 14px; }
  .topbar__mono { letter-spacing: .2em; }
}
@media (max-width: 400px) {
  /* Long Bulgarian words ("ПОТВЪРЖДЕНИЕ", "НАСТАНЯВАНЕ") must fit on a small phone */
  :lang(bg) .head__title { font-size: 1.85rem; letter-spacing: .06em; }
  :lang(bg) .rsvp .head__title { font-size: 1.6rem; letter-spacing: .04em; }
}

/* ---------- Scroll animations (same set as the Canva version) ----------
   Only active when app.js adds .js-anim, so without JavaScript everything is simply visible. */
.js-anim [data-anim] {
  transition-property: opacity, transform;
  transition-timing-function: var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js-anim [data-anim="sleek"] { transition-duration: .9s; }
.js-anim [data-anim="sleek"]:not(.is-in) { opacity: 0; transform: translateY(22px); }
.js-anim [data-anim="zoom"] { transition-duration: 1.6s; }
.js-anim [data-anim="zoom"]:not(.is-in) { opacity: 0; transform: scale(1.16); }
/* Ink: the photo shows from the middle first and spreads to the edges.
   Built only from opacity and scale (no masks), so scrolling stays smooth on phones too. */
.section { --ink-bg: var(--cream); }
.section--sand { --ink-bg: var(--sand); }
.js-anim [data-anim="ink"] { position: relative; }
.js-anim [data-anim="ink"]:not(.anim-done) { background: transparent; }
.js-anim [data-anim="ink"]:not(.anim-done) img { transition: opacity .9s var(--ease), transform 1.9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js-anim [data-anim="ink"]:not(.is-in) img { opacity: 0; transform: scale(1.08); }
.js-anim [data-anim="ink"]::after {
  content: ""; position: absolute; inset: -1px; pointer-events: none; z-index: 1;
  background: radial-gradient(ellipse at 50% 60%, transparent 0%, transparent 16%, var(--ink-bg) 64%);
  opacity: 0; transition: opacity 2s var(--ease) calc(var(--i, 0) * 90ms + .15s);
}
.js-anim [data-anim="ink"]:not(.is-in)::after { opacity: 1; }
.js-anim [data-anim="ink"].anim-done::after { content: none; }
.js-anim [data-anim="blur"] { transition-duration: 1.6s; transition-property: opacity, filter; }
.js-anim [data-anim="blur"]:not(.is-in) { opacity: 0; filter: saturate(.76) sepia(.16) contrast(.97) blur(16px); }
.js-anim [data-anim="fade"] { transition-duration: 1.6s; }
.js-anim [data-anim="fade"]:not(.is-in) { opacity: 0; }
/* After the animation: no overlay and no delays on later changes */
.js-anim [data-anim].anim-done { transition: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .hero__photo { transform: none; }
  .js-anim [data-anim]:not(.is-in), .js-anim [data-anim]:not(.is-in) img { opacity: 1; transform: none; }
  .js-anim [data-anim="ink"]::after { content: none; }
  .js-anim [data-anim="sleek"]:not(.is-in) { filter: none; }
  .js-anim [data-anim="blur"]:not(.is-in) { filter: saturate(.76) sepia(.16) contrast(.97); }
}

@media print {
  .topbar, .envelope-scene, .gate, .hero__actions, .venue__map, .lightbox, .rsvp-band, body::after { display: none !important; }
  body { background: #fff; }
  .js-anim [data-anim], .js-anim [data-anim="ink"] img { opacity: 1 !important; transform: none !important; transition: none !important; }
  .js-anim [data-anim="ink"]::after { content: none !important; }
  .js-anim [data-anim="sleek"] { filter: none !important; }
}
