/* Irakli & Tamta invitation styles. Mobile-first (481 / 769 px); from 769px
   the page is replaced by #desktop-notice. One dark theme throughout: every
   section sits on --void and feathers its own artwork into it, so the joins
   between sections never show an edge.

   Shape system: paper objects (letter, calendar, ticket, image frames) 2px;
   form controls (inputs, segmented answers, submit) 10-14px; links are pills.
   z-index scale: hero layers 1-8, grain 50, loader 10001. */

@font-face {
  font-family: 'Vardi';
  src: url('vardi.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

:root {
  --vh: 1vh;

  --void: #1b0606;          /* the stage floor at the bottom of the videos */
  --void-deep: #120304;
  --wine: #3e0a11;
  --garnet: #6e1222;
  --garnet-hi: #8a1a2c;
  --blush: #e9c3b8;
  --ivory: #f3e6d3;
  --ivory-soft: rgba(243, 230, 211, 0.9);
  --ivory-faint: rgba(243, 230, 211, 0.74);
  --champagne: #d9b88a;
  --champagne-soft: rgba(217, 184, 138, 0.6);
  --ink: #3a1016;            /* text on paper */
  --ink-soft: #5b2a30;

  --script: 'Vardi', 'Noto Serif Georgian', serif;   /* the couple's names only */
  --display: 'Noto Serif Georgian', 'Cormorant Garamond', serif;
  --serif: 'Noto Serif Georgian', 'Cormorant Garamond', serif;
  --num: 'Cormorant Garamond', 'Noto Serif Georgian', serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { overscroll-behavior-y: none; }

html {
  background-color: var(--void);
  -webkit-text-size-adjust: 100%;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  transition: scrollbar-color 1.2s ease;
}
html.scrollbar-ready { scrollbar-color: rgba(217, 184, 138, 0.45) var(--void-deep); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background-color: var(--void-deep); }
::-webkit-scrollbar-thumb { background-color: transparent; border-radius: 6px; transition: background-color 1.2s ease; }
html.scrollbar-ready ::-webkit-scrollbar-thumb { background-color: rgba(217, 184, 138, 0.45); }

body {
  background-color: var(--void);
  color: var(--ivory);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  /* Cormorant defaults to old-style figures, where "11" reads as "ıı". */
  font-variant-numeric: lining-nums;
  font-feature-settings: 'lnum' 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Intro lock: the gesture is trapped in JS, the document stays scrollable
   (position:fixed / overflow:hidden would freeze Chrome iOS short). */
html.is-locked, html.is-locked body { overscroll-behavior: none; touch-action: none; }

img, video, canvas { display: block; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }

/* Film grain over everything: fixed and pointer-less, so it never repaints with scroll. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background-image: url('grain.png');
  background-size: 160px 160px;
  opacity: 0.05;
  mix-blend-mode: overlay;
}

/* ===== Loader ===== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background-color: var(--void-deep);
  transition: opacity 0.8s ease;
}
.loader.is-out { opacity: 0; pointer-events: none; }
.loader.is-gone { display: none; }

.loader__ring {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(217, 184, 138, 0.16);
}
.loader__arc {
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: var(--champagne);
  animation: spin 1.1s linear infinite;
}
.loader__pct {
  font-family: var(--num);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--champagne-soft);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Music switch =====
   Top right, appears once the curtains have opened. */
#music-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}
#music-toggle.is-visible { opacity: 1; pointer-events: auto; }

.music-switch {
  position: relative;
  width: 54px;
  height: 30px;
  border-radius: 15px;
  background-color: rgba(27, 6, 6, 0.55);
  border: 1px solid rgba(217, 184, 138, 0.45);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.music-switch.playing { background-color: rgba(110, 18, 34, 0.85); border-color: rgba(217, 184, 138, 0.7); }
.music-switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  color: var(--garnet);
  background-color: var(--ivory);
  box-shadow: 0 1px 4px rgba(10, 0, 2, 0.4);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.music-switch.playing .music-switch__thumb { transform: translateX(24px); }
.music-switch:focus-visible { outline: 1px solid var(--champagne); outline-offset: 3px; }

/* ===== Shared type ===== */
.script-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 27px;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--ivory);
  text-align: center;
  padding: 0 24px
}
.section-sub {
  margin-top: 8px;
  text-align: center;
  font-size: 15px;
  color: var(--ivory-soft)
}
.hairline {
  display: block;
  width: 56px;
  height: 1px;
  margin: 18px auto;
  background-color: var(--champagne-soft);
}
.hairline--left { margin-left: 0; }
.nowrap { white-space: nowrap; }

/* Scroll reveal: added by an IntersectionObserver in script.js. */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1.2s var(--ease-soft), transform 1.4s var(--ease-soft);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ===== Hero ===== */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background-color: var(--void);
  isolation: isolate;
}
.vh-lock .hero { height: calc(var(--vh) * 100); }

.hero__poster,
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
}
.hero__poster { z-index: 1; }
/* Videos stay invisible until they have painted a frame (script adds .is-live),
   so a slow first decode shows the matching still, never black. */
.hero__video { z-index: 2; opacity: 0; }
.hero__video.is-live { opacity: 1; }
.hero__video--loop { z-index: 3; transition: opacity 0.3s linear; }

/* Legibility for the names over the haze, and the feather into the next
   section: the floor of the stage melts into --void. */
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background-image:
    linear-gradient(to bottom, rgba(18, 3, 4, 0.55) 0%, rgba(18, 3, 4, 0.18) 34%, rgba(18, 3, 4, 0) 52%),
    linear-gradient(to top, #1b0606 0%, rgba(27, 6, 6, 0.6) 6%, rgba(27, 6, 6, 0) 16%);
}

.hero-copy {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--vh) * 9);
  z-index: 6;
  padding: 0 24px;
  text-align: center;
  pointer-events: none;
}
.hero-copy__names {
  margin-top: 0;
  font-family: var(--script);
  font-weight: 400;
  line-height: 1.05;
  color: var(--ivory);
}
.hero-copy__name {
  display: block;
  font-size: 58px;
  text-shadow: 0 0 22px rgba(255, 196, 196, 0.32), 0 2px 18px rgba(18, 3, 4, 0.6);
}
.hero-copy__amp {
  display: block;
  font-size: 34px;
  margin: 2px 0 4px;
  color: var(--champagne);
}
.hero-copy__invite {
  margin-top: 14px;
  font-size: 14px;
  letter-spacing: 0.03em;
  color: var(--ivory-soft);
  text-shadow: 0 1px 12px rgba(18, 3, 4, 0.8);
}
.hero-copy__date {
  margin-top: 8px;
  font-family: var(--num);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: var(--champagne);
  text-shadow: 0 1px 12px rgba(18, 3, 4, 0.8);
}

/* Hero copy arrives with the curtains: plain fades for the small lines, a
   faked blur (glow on transparent glyphs, never filter: blur) for the names. */
.hero-copy > *,
.hero-copy__name,
.hero-copy__amp { opacity: 0; }

.copy-in .hero-copy > * { opacity: 1; transition: opacity 1.6s ease; }
.copy-in .hero-copy__invite { transition-delay: 2.5s; }
.copy-in .hero-copy__date   { transition-delay: 3s; }
.copy-in .hero-copy__name { animation: ink-in 2.2s ease backwards; opacity: 1; }
.copy-in .hero-copy__name:first-child { animation-delay: 0.5s; }
.copy-in .hero-copy__amp { opacity: 1; transition: opacity 1.4s ease 1.2s; }
.copy-in .hero-copy__name:last-child { animation-delay: 1.5s; }

@keyframes ink-in {
  from { color: rgba(243, 230, 211, 0); text-shadow: 0 0 14px rgba(243, 230, 211, 0.9); }
  to   { color: var(--ivory); }
}

/* ===== Glitter cover ===== */
.glitter {
  position: absolute;
  inset: 0;
  z-index: 7;
  width: 100%;
  height: 100%;
  transition: opacity 0.6s ease;
}
.glitter.is-done { opacity: 0; pointer-events: none; }

.entry-copy {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--vh) * 10) 28px calc(var(--vh) * 12);
  text-align: center;
  cursor: pointer;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.5s ease;
}
.is-loading .entry-copy { opacity: 0; }
.entry-copy.is-out { opacity: 0; pointer-events: none; }
/* Soft shade behind the two lines of text, so they read on the photo. */
.entry-copy::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 80% 22% at 50% 15%, rgba(20, 2, 6, 0.55), rgba(20, 2, 6, 0)),
    radial-gradient(ellipse 85% 20% at 50% 86%, rgba(20, 2, 6, 0.6), rgba(20, 2, 6, 0));
}
.entry-copy:focus-visible { outline: 1px solid var(--champagne-soft); outline-offset: -12px; }

.entry-copy__mono {
  font-family: var(--script);
  font-size: 72px;
  line-height: 1.15;
  color: var(--champagne);
  text-shadow: 0 1px 10px rgba(30, 0, 4, 0.9);
}
.entry-copy__call {
  font-family: var(--script);
  font-size: 34px;
  line-height: 1.2;
  color: var(--ivory);
  text-shadow: 0 0 20px rgba(255, 190, 190, 0.35), 0 2px 14px rgba(30, 0, 4, 0.9);
  animation: breathe 3.2s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: 0.82; transform: translateY(0); }
  50%      { opacity: 1;    transform: translateY(-3px); }
}

/* ===== The letter on satin ===== */
.letter {
  position: relative;
  padding: 64px 0 120px;
  background-color: var(--void);
}
/* Satin feathered into --void at both ends, so the hero floor and the next
   section flow into it. Behind .assets-ready so it never competes with the
   reveal clip on a slow connection. */
.letter::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--wine);
  background-size: cover;
  background-position: center;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 20%, #000 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 20%, #000 78%, transparent 100%);
}
.assets-ready .letter::before { background-image: url('satin.jpg'); }

.env-stage {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 400px;
  margin: 0 auto;
  overflow: hidden;
  padding-top: 24px;
}
.env-letter {
  position: relative;
  z-index: 1;
  width: 84%;
  margin: 0 auto;
  padding: 34px 26px 210px;
  text-align: center;
  color: var(--ink);
  background-color: var(--ivory);
  background-size: 420px 420px;
  border-radius: 2px;
  box-shadow: 0 18px 50px rgba(20, 0, 4, 0.45), 0 2px 6px rgba(20, 0, 4, 0.25);
  transform: translateY(46%);
  transition: transform 2.4s var(--ease-soft);
}
.assets-ready .env-letter { background-image: url('paper.jpg'); }
.env-stage.is-open .env-letter { transform: translateY(0); }

.env-letter__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.4;
  color: var(--garnet)
}
.env-letter .hairline { background-color: rgba(110, 18, 34, 0.35); margin: 16px auto; }
.env-letter__body {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink)
}
.env-letter__body + .env-letter__body { margin-top: 12px; }
.env-letter__sign {
  margin-top: 22px;
  font-size: 15px;
  color: var(--ink-soft)
}
.env-letter__names {
  margin-top: 2px;
  font-family: var(--script);
  font-size: 30px;
  line-height: 1.2;
  color: var(--garnet);
}

/* The pocket overlaps the bottom of the letter; percentage margins resolve
   against the stage width, which keeps the overlap proportional. */
.env-pocket {
  position: relative;
  z-index: 2;
  margin-top: -52%;
}
.env-pocket__lace {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 -6px 16px rgba(20, 0, 4, 0.45));
}
.env-pocket__seal {
  position: absolute;
  left: 50%;
  top: 34%;
  width: 22%;
  height: auto;
  transform: translate(-50%, -50%) rotate(-8deg);
  filter: drop-shadow(0 4px 8px rgba(20, 0, 4, 0.5));
}

/* ===== Save the date ===== */
.date {
  position: relative;
  padding: 40px 0 110px;
  background-color: var(--void);
  overflow: hidden;   /* the 520px glow below is wider than small phones */
}
/* A warm pool of light behind the calendar, like a single spot on stage. */
.date::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 140px;
  width: 520px;
  height: 620px;
  transform: translateX(-50%);
  background-image: radial-gradient(closest-side, rgba(138, 26, 44, 0.32), rgba(138, 26, 44, 0));
  pointer-events: none;
}
.date > * { position: relative; }

.cal-wrap {
  position: relative;
  width: 76%;
  max-width: 320px;
  margin: 40px auto 0;
}
/* The pearls are photographed on black; screen drops the black onto the page. */
.cal-pearls {
  position: absolute;
  left: -16%;
  top: -18px;
  width: 30%;
  height: auto;
  z-index: 2;
  mix-blend-mode: screen;
  pointer-events: none;
  transform: rotate(4deg);
  transform-origin: top center;
  animation: sway 6s ease-in-out infinite;
}
@keyframes sway {
  0%, 100% { transform: rotate(4deg); }
  50%      { transform: rotate(1deg); }
}

.cal { position: relative; }

.cal__binding {
  position: relative;
  z-index: 2;
  height: 22px;
  border-radius: 2px 2px 0 0;
  background-color: #2a0a0e;
  box-shadow: inset 0 -1px 0 rgba(217, 184, 138, 0.25);
}
.cal__binding i {
  position: absolute;
  top: -7px;
  width: 8px;
  height: 18px;
  border-radius: 4px;
  background-color: var(--champagne);
  box-shadow: inset 0 0 0 1px rgba(80, 50, 20, 0.35);
}
.cal__binding i:first-child { left: 26%; }
.cal__binding i:last-child  { right: 26%; }

.cal-page {
  position: relative;
  padding: 22px 18px 24px;
  color: var(--ink);
  background-color: var(--ivory);
  background-size: 420px 420px;
  border-radius: 0 0 2px 2px;
  box-shadow: 0 22px 46px rgba(10, 0, 2, 0.55);
}
.assets-ready .cal-page { background-image: url('paper.jpg'); }

.cal-page__mono {
  font-family: var(--script);
  font-size: 20px;
  text-align: center;
  color: var(--ink-soft);
}
.cal-page__month {
  margin-top: 2px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.3;
  text-align: center;
  color: var(--garnet);
}
.cal-page__year {
  font-family: var(--num);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-align: center;
  color: var(--ink-soft);
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 4px;
  margin-top: 16px;
  text-align: center;
}
.cal-grid__wd {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  padding-bottom: 6px;
}
.cal-grid__d {
  position: relative;
  font-family: var(--num);
  font-size: 18px;
  font-weight: 500;
  line-height: 32px;
  color: var(--ink);
}
.cal-grid__n { position: relative; }
.cal-grid__d--mark .cal-grid__n { transition: color 0.8s ease 2.2s; }
.cal-wrap.is-in .cal-grid__d--mark .cal-grid__n { color: var(--ivory); }

/* The heart: the stroke draws itself, then a soft fill blooms behind the
   number, which turns ivory on it. */
.cal-heart {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 50px;
  height: 47px;
  transform: translate(-50%, -54%) rotate(-6deg);
  overflow: visible;
  pointer-events: none;
}
.cal-heart__line {
  fill: none;
  stroke: var(--garnet);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 1.6s cubic-bezier(0.45, 0, 0.2, 1) 0.7s;
}
.cal-heart__fill {
  fill: var(--garnet);
  opacity: 0;
  transform: scale(0.6);
  transform-origin: 50% 55%;
  transition: opacity 0.9s ease 2.1s, transform 1.1s var(--ease-out) 2.1s;
}
.cal-wrap.is-in .cal-heart__line { stroke-dashoffset: 0; }
.cal-wrap.is-in .cal-heart__fill { opacity: 0.92; transform: scale(1); }

.countdown-title {
  margin-top: 44px;
  text-align: center;
  font-size: 15px;
  color: var(--ivory-soft);
}
.countdown {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
  margin-top: 12px;
  padding: 0 12px;
}
.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 60px;
}
.countdown__num {
  font-family: var(--num);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.1;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: 'lnum' 1, 'tnum' 1;
  color: var(--ivory);
}
.countdown__label { margin-top: 2px; font-size: 14px; color: var(--ivory-soft); }
.countdown__sep {
  font-family: var(--num);
  font-size: 32px;
  line-height: 1.3;
  color: var(--champagne-soft);
}

/* ===== The day ===== */
.program {
  padding: 40px 0 70px;
  background-color: var(--void);
}
.act {
  position: relative;
  margin-top: 46px;
}
.act__frame {
  position: relative;
  width: 78%;
  aspect-ratio: 820 / 1018;
  overflow: hidden;
  border-radius: 2px;
  background-color: var(--wine);
  box-shadow: 0 30px 60px rgba(10, 0, 2, 0.5);
}
/* A thin champagne frame set inside the photo, like a mounted print. */
.act__frame::after {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 238, 214, 0.55);
  pointer-events: none;
}
.act__frame img { width: 100%; height: 100%; object-fit: cover; }
.act--one .act__frame { margin-left: 0; }
.act--two .act__frame { margin-left: auto; }

.act__text {
  position: relative;
  z-index: 1;
  width: 84%;
  margin-top: -64px;
  padding: 26px 24px 24px;
  background-color: rgba(27, 6, 6, 0.92);
  border-radius: 2px;
  box-shadow: 0 20px 40px rgba(10, 0, 2, 0.45);
}
.act--one .act__text { margin-left: auto; margin-right: 12px; }
.act--two .act__text { margin-left: 12px; }

.act__num {
  font-family: var(--num);
  font-size: 44px;
  font-weight: 300;
  line-height: 1;
  color: var(--champagne);
}
.act__title {
  margin-top: 10px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 21px;
  line-height: 1.4;
  color: var(--ivory)
}
.act__time {
  font-family: var(--num);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.2;
  color: var(--champagne);
}
.act__venue {
  margin-top: 4px;
  text-wrap: balance;
  font-size: 17px;
  font-weight: 500;
  color: var(--ivory)
}
.act__place {
  font-size: 15px;
  color: var(--ivory-soft)
}
.act__map {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--champagne);
  border: 1px solid var(--champagne-soft);
  border-radius: 999px;
  transition: background-color 0.3s ease, color 0.3s ease
}
.act__map:active { background-color: var(--champagne); color: var(--void); transform: translateY(1px); }

/* ===== Dress code ===== */
.dress {
  padding: 60px 24px 90px;
  background-color: var(--void);
  text-align: center;
}
.swatches {
  display: flex;
  justify-content: center;
  margin-top: 34px;
}
.swatch { position: relative; width: 132px; }
.swatch img {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(217, 184, 138, 0.4), 0 18px 36px rgba(10, 0, 2, 0.6);
}
.swatch--burgundy { margin-left: -22px; margin-top: 28px; }
.swatch figcaption {
  margin-top: 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ivory)
}
.dress__text {
  max-width: 320px;
  margin: 30px auto 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ivory-soft)
}

/* ===== RSVP ticket ===== */
.rsvp {
  position: relative;
  padding: 70px 0 100px;
  background-color: var(--void);
}
.rsvp::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--wine);
  background-size: cover;
  background-position: center;
  opacity: 0.55;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 76%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 76%, transparent 100%);
}
.assets-ready .rsvp::before { background-image: url('velvet.jpg'); }
.rsvp > * { position: relative; }

/* Notches at the perforation are cut with two radial masks intersected, so
   the velvet behind shows through them. */
.ticket {
  --perf: 104px;
  width: 88%;
  max-width: 390px;
  margin: 34px auto 0;
  color: var(--ink);
  background-color: var(--ivory);
  background-size: 420px 420px;
  border-radius: 2px;
  box-shadow: 0 30px 60px rgba(10, 0, 2, 0.55);
  -webkit-mask-image:
    radial-gradient(circle 13px at 0 calc(100% - var(--perf)), transparent 12px, #000 12.5px),
    radial-gradient(circle 13px at 100% calc(100% - var(--perf)), transparent 12px, #000 12.5px);
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(circle 13px at 0 calc(100% - var(--perf)), transparent 12px, #000 12.5px),
    radial-gradient(circle 13px at 100% calc(100% - var(--perf)), transparent 12px, #000 12.5px);
  mask-composite: intersect;
}
.assets-ready .ticket { background-image: url('paper.jpg'); }

.ticket__body {
  position: relative;
  padding: 30px 26px 30px;
}
.ticket__body::before {
  content: '';
  position: absolute;
  inset: 10px 10px 0;
  border: 1px solid rgba(110, 18, 34, 0.28);
  border-bottom: 0;
  pointer-events: none;
}
.ticket__kicker {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.ticket__names {
  text-align: center;
  font-family: var(--script);
  font-size: 34px;
  line-height: 1.3;
  color: var(--garnet);
}

.rsvp-form { margin-top: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.field__label {
  display: block;
  padding: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
}
.field__note {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-soft);
}
.field__input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  font-size: 16px;            /* 16px keeps iOS from zooming on focus */
  font-weight: 400;
  color: var(--ink);
  background-color: rgba(255, 252, 246, 0.75);
  border: 1px solid rgba(110, 18, 34, 0.28);
  border-radius: 12px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.field__input::placeholder { color: rgba(91, 42, 48, 0.55); }
.field__input:focus { border-color: var(--garnet); box-shadow: 0 0 0 3px rgba(110, 18, 34, 0.12); }

.choice { border: 0; margin-top: 22px; min-width: 0; }
.choice legend, .choice__inner > .field__label { margin-bottom: 8px; }

/* Segmented control: equal columns in one row, labels never wrap. */
.seg {
  display: grid;
  gap: 4px;
  padding: 4px;
  background-color: rgba(110, 18, 34, 0.08);
  border-radius: 14px;
}
.seg--2 { grid-template-columns: 1fr 1fr; }
.seg--4 { grid-template-columns: repeat(4, 1fr); }
.seg__opt { position: relative; cursor: pointer; min-width: 0; }
.seg__opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg__opt span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 8px;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  border-radius: 10px;
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.seg--4 .seg__opt span { font-family: var(--num); font-size: 20px; }
.seg__opt input:checked + span {
  background-color: var(--garnet);
  color: var(--ivory);
  box-shadow: 0 4px 12px rgba(110, 18, 34, 0.28);
}
.seg__opt input:focus-visible + span { outline: 2px solid var(--garnet); outline-offset: 1px; }

/* Opens under a "yes". */
.choice--guests {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  transition: grid-template-rows 0.6s var(--ease-soft), opacity 0.5s ease, margin-top 0.6s var(--ease-soft);
}
.choice__inner { overflow: hidden; min-height: 0; }
.choice--guests.is-open { grid-template-rows: 1fr; opacity: 1; margin-top: 22px; }

.ticket__submit {
  display: block;
  width: 100%;
  height: 54px;
  margin-top: 28px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ivory);
  background-color: var(--garnet);
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(110, 18, 34, 0.3);
  transition: background-color 0.3s ease, transform 0.15s ease;
}
.ticket__submit:active { transform: translateY(1px) scale(0.99); background-color: var(--garnet-hi); }
.ticket__submit:disabled { opacity: 0.6; cursor: default; }

.rsvp-status {
  min-height: 24px;
  margin-top: 12px;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  color: var(--garnet);
}

.rsvp-done,
.rsvp-closed {
  display: none;
  padding: 10px 0 6px;
  text-align: center;
}
.rsvp-done.is-visible,
.rsvp-closed.is-visible { display: block; animation: rise-in 1s var(--ease-soft) both; }
.rsvp-done__seal { width: 74px; height: auto; margin: 10px auto 6px; transform: rotate(-10deg); }
.rsvp-done__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.35;
  color: var(--garnet);
}
.rsvp-done__sub { margin-top: 8px; font-size: 16px; color: var(--ink); }
.rsvp-done__again {
  margin-top: 20px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--garnet);
  background: none;
  border: 1px solid rgba(110, 18, 34, 0.35);
  border-radius: 12px;
  cursor: pointer;
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.ticket__stub {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.1fr;
  height: var(--perf);
  padding: 0 12px;
  align-items: center;
  border-top: 1px dashed rgba(110, 18, 34, 0.4);
  text-align: center;
}
.ticket__stub-cell { display: flex; flex-direction: column; gap: 2px; }
.ticket__stub-k {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft)
}
.ticket__stub-v {
  white-space: nowrap;
  font-family: var(--num);
  font-size: 16px;
  font-weight: 500;
  color: var(--garnet)
}
.ticket__stub-cell:last-child .ticket__stub-v { font-family: var(--serif); font-size: 14px; }

/* ===== Footer ===== */
.footer {
  padding: 40px 24px 54px;
  text-align: center;
  background-color: var(--void);
}
.footer__love {
  font-size: 15px;
  color: var(--ivory-soft)
}
.footer__names {
  font-family: var(--script);
  font-size: 34px;
  line-height: 1.3;
  color: var(--ivory);
}
.footer__credit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--num);
  font-size: 13px;
  text-decoration: none;
  color: var(--champagne);
  opacity: 0.3;
  transition: opacity 0.3s ease;
}
.footer__credit:hover, .footer__credit:active { opacity: 0.7; }
.footer__logo { width: 18px; height: 18px; }

/* ===== Larger phones ===== */
@media (min-width: 481px) {
  .hero-copy__name { font-size: 66px; }
  .script-title { font-size: 30px; }
  .env-letter { padding: 40px 34px 240px; }
  .env-letter__title { font-size: 24px; }
  .act__frame { width: 70%; }
  .act__text { width: 70%; }
  .swatch, .swatch img { width: 150px; }
  .swatch img { height: 150px; }
}

/* ===== Desktop notice ===== */
#desktop-notice { display: none; }

@media (min-width: 769px) {
  body > *:not(#desktop-notice) { display: none !important; }

  #desktop-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 10px;
    padding: 40px 24px;
    background-color: var(--void);
  }
  .desktop-notice__logo { width: 52px; height: auto; opacity: 0.8; margin-bottom: 24px; }
  .desktop-notice__ka,
  .desktop-notice__en {
    font-family: 'Noto Serif Georgian', 'Cormorant Garamond', serif;
    font-size: 18px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    text-align: center;
    color: var(--ivory);
  }
  .desktop-notice__en { font-family: 'Cormorant Garamond', serif; }
  .desktop-notice__sub { font-size: 14px; color: var(--ivory-faint); margin-top: 2px; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .entry-copy__call, .cal-pearls, .loader__arc { animation: none; }
  .env-letter, .cal-heart__line, .cal-heart__fill, .cal-grid__n { transition-duration: 0.01s; transition-delay: 0s; }
  .copy-in .hero-copy__name { animation: none; }
}
