/* მაია & ვაჟა invitation: all styles for index.html (find-table.html has its
   own find-table.css). Mobile-only; desktop gets #desktop-notice. Palette is
   pulled from the intro art: ivory envelope paper + powder-blue wax and florals. */

/* ===== FONTS =====
   font-display: block is only safe because .loader covers the block period. */
@font-face {
  font-family: 'BPG Nino';
  src: url('bpg_nino.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: 'DM Medea';
  src: url('DM-Medea.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

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

[hidden] {
  display: none !important;
}

/* ===== VARIABLES ===== */
:root {
  --vh: 1vh;                /* JS off = plain vh; the inline head script pins it */

  --bg:        #f5f4f0;
  --bg-alt:    #ecede9;
  --paper:     #fbfaf7;
  --text:      #2b3746;
  --text-soft: #6d7b8a;
  --blue:      #6f8ca8;     /* the wax seal */
  --blue-deep: #44607c;
  --blue-pale: #dde6ee;
  --border:    #d5dce2;
  --rule:      #c3cfd9;

  /* type scale, sm = mobile, lg = 769px+ (Georgian) */
  --fs-names-sm: 40px;
  --fs-names-lg: 72px;
  --fs-title-sm: 25px;
  --fs-title-lg: 34px;
  --fs-venue-sm: 20px;
  --fs-venue-lg: 26px;
}

body.lang-en {
  --fs-names-sm: 48px;
  --fs-names-lg: 80px;
  --fs-title-sm: 30px;
  --fs-title-lg: 36px;
  --fs-venue-sm: 28px;
  --fs-venue-lg: 30px;
}

/* ===== BASE ===== */
html {
  overflow-x: hidden;
}

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

body {
  font-family: 'BPG Nino', 'Noto Serif Georgian', serif;
  background-color: var(--bg);
  color: var(--text);
  /* No overflow-x here: with it on html AND body, body becomes its own scroll
     box, a trackpad wheel lands on it, and overscroll-behavior stops the scroll
     chaining to the page. html's overflow-x alone already clips sideways. */
}

body.lang-en {
  font-family: 'Cormorant Garamond', serif;
}

input, textarea, select, button {
  font-family: inherit;
}

/* Intro scroll-lock. Never position:fixed / overflow:hidden on the document:
   Chrome iOS opened from a chat app freezes its viewport short when it does.
   script.js traps touchmove/scroll while this class is on <html>. */
html.is-locked,
html.is-locked body {
  overscroll-behavior: none;
  touch-action: none;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: var(--bg-alt);
}
::-webkit-scrollbar-thumb {
  background-color: transparent;
  border-radius: 3px;
  transition: background-color 0.6s ease;
}
html {
  scrollbar-width: thin;
  scrollbar-color: transparent var(--bg-alt);
  transition: scrollbar-color 0.6s ease;
}
html.scrollbar-ready {
  scrollbar-color: var(--rule) var(--bg-alt);
}
html.scrollbar-ready ::-webkit-scrollbar-thumb {
  background-color: var(--rule);
}

/* ===== LOADING SCREEN ===== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 20000;           /* above the intro overlay */
  background-color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}

.loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.loader__ring {
  width: 46px;
  height: 46px;
  border: 2px solid var(--blue-pale);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: loaderSpin 1s linear infinite;
}

@keyframes loaderSpin {
  to { transform: rotate(360deg); }
}

/* ===== INTRO OVERLAY ===== */
#intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background-color: var(--paper);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.6s ease;
}

#intro-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

#intro-overlay.gone {
  display: none;
}

#intro-video,
#intro-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

#intro-poster {
  transition: opacity 0.35s ease;
}

#intro-poster.hidden {
  opacity: 0;
}

/* sits below the seal, over the lower envelope flap */
#intro-click {
  position: absolute;
  top: 74%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 16px 26px;
  border-radius: 18px;
  background-color: rgba(251, 250, 247, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  user-select: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.5s ease;
}

html:not(.is-loading) #intro-click {
  animation: introFadeIn 1.2s ease 0.3s forwards;
}

.intro-en {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 0.34em;
  color: var(--blue-deep);
  font-weight: 500;
}

.intro-divider {
  width: 34px;
  height: 1px;
  background-color: var(--blue);
  opacity: 0.6;
}

.intro-ka {
  font-size: 20px;
  color: var(--blue-deep);
  letter-spacing: 0.04em;
}

/* ===== LANGUAGE TOGGLE ===== */
#lang-toggle {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

#lang-toggle.visible {
  opacity: 1;
  pointer-events: auto;
}

.lang-switch {
  position: relative;
  width: 74px;
  height: 36px;
  background-color: rgba(251, 250, 247, 0.82);
  border-radius: 18px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.lang-switch__thumb {
  position: absolute;
  left: 3px;
  width: 32px;
  height: 28px;
  background-color: rgba(111, 140, 168, 0.16);
  border: 1px solid rgba(111, 140, 168, 0.45);
  border-radius: 14px;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-switch.lang-en .lang-switch__thumb {
  transform: translateX(36px);
}

.lang-switch__label {
  flex: 1;
  text-align: center;
  font-size: 20px;
  line-height: 1;
  position: relative;
  z-index: 1;
  opacity: 0.4;
  transition: opacity 0.28s ease;
}

.lang-switch__label--ka,
.lang-switch.lang-en .lang-switch__label--en {
  opacity: 1;
}

.lang-switch.lang-en .lang-switch__label--ka {
  opacity: 0.4;
}

/* ===== MUSIC TOGGLE ===== */
#music-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

#music-toggle.visible {
  opacity: 1;
  pointer-events: auto;
}

.music-switch {
  position: relative;
  width: 54px;
  height: 30px;
  background-color: rgba(140, 148, 156, 0.5);
  border-radius: 15px;
  border: 1px solid var(--border);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background-color 0.28s ease;
}

.music-switch.playing {
  background-color: rgba(111, 140, 168, 0.85);
}

.music-switch__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  background-color: #fdfdfb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(43, 55, 70, 0.3);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.music-switch.playing .music-switch__thumb {
  transform: translateX(24px);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
}

.vh-lock .hero {
  min-height: calc(var(--vh) * 100);
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

/* soft white wash over the sky so the names read */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(251, 250, 247, 0.55) 0%,
    rgba(251, 250, 247, 0.62) 18%,
    rgba(251, 250, 247, 0.30) 40%,
    rgba(251, 250, 247, 0) 58%
  );
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 26%;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(245, 244, 240, 0), var(--bg));
  pointer-events: none;
}

.hero-center {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 4.5rem 24px 40px;
  max-width: 600px;
}

.hero-center > *,
.h-scroll {
  opacity: 0;
}

.hero-center.revealed .h-monogram { animation: fadeInUp 0.8s ease forwards; }
.hero-center.revealed .h-names    { animation: fadeInUp 0.8s ease 0.15s forwards; }
.hero-center.revealed .h-date     { animation: fadeInUp 0.8s ease 0.28s forwards; }
.hero-center.revealed .h-subtitle { animation: fadeInUp 0.8s ease 0.40s forwards; }
.hero-center.revealed ~ .h-scroll { animation: fadeInUpCentered 0.8s ease 0.55s forwards; }

/* script monogram, same face as every past couple's hero initials */
.h-monogram {
  font-family: 'Pinyon Script', cursive;
  font-size: 66px;
  line-height: 1.1;
  color: var(--blue-deep);
  margin-bottom: 14px;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.95), 0 0 34px rgba(255, 255, 255, 0.7);
}

.h-monogram__amp {
  font-size: 54px;
  color: var(--blue);
  padding: 0 4px;
  vertical-align: 4px;
}


.h-names {
  font-family: 'DM Medea', 'BPG Nino', serif;
  font-size: var(--fs-names-sm);
  font-weight: normal;
  color: var(--blue-deep);
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin-bottom: 18px;
  white-space: nowrap;
}

body.lang-en .h-names {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
}

/* the & in every name line: script, like the monogram. Neither DM Medea nor
   BPG Nino draws a decorative ampersand, so it would fall back to a plain one. */
.amp {
  font-family: 'Pinyon Script', cursive;
  font-size: 1.5em;         /* Pinyon draws its & small; this matches the name height */
  line-height: 1;
  color: var(--blue);
  margin: 0 -4px;           /* the spaces around it in the markup are wide enough */
}

.h-date {
  font-family: 'Noto Serif Georgian', 'Cormorant Garamond', serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--blue);
  letter-spacing: 0.22em;
  margin-bottom: 20px;
}

.h-subtitle {
  font-size: 16px;
  color: var(--text);
  letter-spacing: 0.02em;
  line-height: 1.6;
  text-shadow: 0 1px 10px rgba(255, 255, 255, 0.9);
}

.h-scroll {
  position: absolute;
  bottom: 12%;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 16px 10px;
  border-radius: 16px;
  background-color: rgba(251, 250, 247, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.scroll-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--blue-deep);
}

.scroll-chevron {
  width: 8px;
  height: 8px;
  border-right: 1px solid var(--blue);
  border-bottom: 1px solid var(--blue);
  animation: chevronBounce 3.5s ease-in-out infinite;
}

/* ===== ANIMATIONS ===== */
@keyframes introFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUpCentered {
  from { opacity: 0; transform: translateX(-50%) translateY(18px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes chevronBounce {
  0%   { transform: translateY(-2px) rotate(45deg); opacity: 0.85; }
  50%  { transform: translateY(2px)  rotate(45deg); opacity: 0.35; }
  100% { transform: translateY(-2px) rotate(45deg); opacity: 0.85; }
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== SHARED SECTION ===== */
.section {
  padding: 80px 24px;
}

.section-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.section-title {
  font-family: 'DM Medea', 'BPG Nino', serif;
  font-size: var(--fs-title-sm);
  font-weight: normal;
  color: var(--blue-deep);
  letter-spacing: 0.12em;
  line-height: 1.75;        /* DM Medea's tall swashes collide below ~1.7 when a title wraps */
  margin-bottom: 14px;
}

body.lang-en .section-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
}

.section-rule {
  width: 36px;
  height: 1px;
  background-color: var(--rule);
  margin: 0 auto 40px;
}

/* ===== WELCOME ===== */
.welcome {
  padding-top: 64px;
  padding-bottom: 40px;
}

.welcome-text {
  font-size: 18px;
  line-height: 1.95;
  color: var(--text);
  max-width: 330px;
  margin: 0 auto;
}

body.lang-en .welcome-text {
  font-size: 20px;
  line-height: 1.6;
}

/* ===== COUNTDOWN ===== */
.countdown {
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.countdown-col {
  position: absolute;
  top: 48%;
  transform: translateY(-50%);
  width: 190px;
  height: auto;
  pointer-events: none;
  opacity: 0.8;
}

.countdown-col--left {
  left: -88px;
}

.countdown-col--right {
  right: -88px;
  transform: translateY(-50%) scaleX(-1);
}

.countdown-sub {
  font-family: 'Noto Serif Georgian', 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--blue);
}

body.lang-en .countdown-sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
}

.countdown .section-rule {
  margin: 28px auto 36px;
}

.countdown-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.cd-unit {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 14px;
  min-width: 64px;
}

.cd-unit + .cd-unit::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8%;
  height: 52%;
  width: 1px;
  background-color: var(--rule);
}

.cd-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
  color: var(--blue-deep);
  font-variant-numeric: tabular-nums;
}

.cd-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-soft);
  margin-top: 10px;
}

/* ===== EVENTS ===== */
.events {
  position: relative;
  overflow-x: clip;
  padding-bottom: 7rem;
}

.flowers-container {
  position: absolute;
  width: 100%;
  top: -3%;
  left: 50%;
  opacity: 0.6;
  transform: translateX(-50%);
  pointer-events: none;
}

.flowers-img {
  width: 100%;
  height: auto;
}

.events .section-inner {
  position: relative;
  z-index: 1;
}

.day-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 30px;
}

.day-header::before,
.day-header::after {
  content: '';
  width: 28px;
  height: 1px;
  background-color: var(--rule);
}

.day-date {
  font-family: 'Noto Serif Georgian', 'Cormorant Garamond', serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--blue);
}

body.lang-en .day-date {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
}

.events-cards {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.event-card {
  background-color: var(--paper);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 0 28px 34px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(68, 96, 124, 0.07);
}

.event-card__img {
  width: calc(100% + 56px);
  margin: 0 -28px 24px;
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.event-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.event-card__img::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 18%;
  background: linear-gradient(to bottom, rgba(251, 250, 247, 0), var(--paper));
  pointer-events: none;
}

.event-card__label {
  font-size: 15px;
  letter-spacing: 0.12em;
  color: var(--blue);
  margin-bottom: 12px;
}

body.lang-en .event-card__label {
  font-size: 17px;
  letter-spacing: 0.2em;
}

.event-card__venue {
  font-family: 'DM Medea', 'BPG Nino', serif;
  font-size: var(--fs-venue-sm);
  font-weight: normal;
  color: var(--text);
  line-height: 2.6;
  margin-bottom: 6px;
}

body.lang-en .event-card__venue {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  line-height: 1.2;
}

.event-card__addr {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.6;
  margin-bottom: 20px;
}

body.lang-en .event-card__addr {
  font-size: 17px;
}

.event-card__rule {
  width: 40px;
  height: 1px;
  background-color: var(--rule);
  margin: 0 auto 20px;
}

.event-card__time {
  font-family: 'Cormorant Garamond', serif;
  font-size: 38px;
  color: var(--blue-deep);
  line-height: 1;
  margin-bottom: 24px;
}

.event-card__schedule {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 16px;
  row-gap: 10px;
  margin: 0 auto 24px;
  align-items: baseline;
}

.event-card__sub-row {
  display: contents;
}

.event-card__sub-time {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  color: var(--blue-deep);
  text-align: right;
  white-space: nowrap;
}

.event-card__sub-label {
  font-size: 15px;
  color: var(--text-soft);
  text-align: left;
}

body.lang-en .event-card__sub-label {
  font-size: 18px;
}

.event-card__map {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--blue-deep);
  text-decoration: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 10px 22px;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

body.lang-en .event-card__map {
  font-size: 15px;
  letter-spacing: 0.14em;
}

.event-card__map:active {
  background-color: var(--blue-pale);
  border-color: var(--blue);
}

.events-note {
  font-size: 15px;
  line-height: 1.8;
  color: var(--blue-deep);
  padding: 4px 18px;
}

body.lang-en .events-note {
  font-size: 19px;
}

/* ===== FIND YOUR TABLE ===== */
.findtable {
  background-color: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.findtable-lead {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-soft);
  max-width: 300px;
  margin: 0 auto 28px;
}

body.lang-en .findtable-lead {
  font-size: 19px;
}

.findtable-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 30px;
  border-radius: 999px;
  background-color: var(--blue-deep);
  color: #fbfaf7;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(68, 96, 124, 0.22);
  transition: transform 0.2s ease, background-color 0.25s ease;
}

body.lang-en .findtable-cta {
  font-size: 18px;
}

.findtable-cta:active {
  transform: scale(0.98);
  background-color: var(--blue);
}

.findtable-chev {
  width: 7px;
  height: 7px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
}

/* ===== RSVP ===== */
.rsvp-form {
  max-width: 360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-align: left;
}

.rsvp-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rsvp-label {
  font-size: 13px;
  color: var(--text-soft);
  letter-spacing: 0.04em;
}

body.lang-en .rsvp-label {
  font-size: 16px;
}

.rsvp-input {
  width: 100%;
  background-color: var(--paper);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 16px;            /* 16px stops iOS zooming on focus */
  color: var(--text);
  outline: none;
  transition: border-color 0.25s ease;
}

.rsvp-input:focus {
  border-color: var(--blue);
}

.rsvp-radios {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.radio-card,
.count-pill {
  display: block;
  position: relative;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.radio-card input,
.count-pill input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-face {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background-color: var(--paper);
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-soft);
  text-align: center;
  transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}

body.lang-en .radio-face {
  font-size: 17px;
}

.radio-card input:checked + .radio-face {
  border-color: var(--blue);
  color: var(--blue-deep);
  background-color: var(--blue-pale);
}

.radio-card input:focus-visible + .radio-face,
.count-pill input:focus-visible + span {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.rsvp-guests {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rsvp-guests.is-hidden {
  display: none;
}

.rsvp-count {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.count-pill span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background-color: var(--paper);
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  color: var(--text-soft);
  transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}

.count-pill input:checked + span {
  border-color: var(--blue);
  color: var(--blue-deep);
  background-color: var(--blue-pale);
}

.rsvp-submit {
  border: none;
  border-radius: 999px;
  background-color: var(--blue-deep);
  color: #fbfaf7;
  font-size: 15px;
  letter-spacing: 0.06em;
  padding: 16px 40px;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.2s ease;
}

body.lang-en .rsvp-submit {
  font-size: 18px;
}

.rsvp-submit:active {
  transform: scale(0.98);
  background-color: var(--blue);
}

.rsvp-submit:disabled {
  opacity: 0.5;
  cursor: default;
}

.rsvp-status {
  font-size: 14px;
  color: var(--text-soft);
  min-height: 20px;
  text-align: center;
}

.rsvp-status.is-error {
  color: #9a4a4a;
}

.rsvp-thankyou {
  display: none;
  padding: 20px 0;
}

.rsvp-thankyou.visible {
  display: block;
}

.thankyou-text {
  font-family: 'DM Medea', 'BPG Nino', serif;
  font-size: 21px;
  line-height: 1.6;
  color: var(--blue-deep);
}

body.lang-en .thankyou-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
}

/* ===== CLOSING: the garden gate from the intro, faded into the page ===== */
.closing {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg);
  background-image: url('closing-bg.jpg');
  background-size: cover;
  background-position: center 30%;
}

.closing::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    var(--bg) 0%,
    rgba(245, 244, 240, 0.55) 30%,
    rgba(245, 244, 240, 0.55) 70%,
    var(--bg) 100%
  );
  pointer-events: none;
}

.closing .section-inner {
  position: relative;
  z-index: 1;
}

.closing-crest {
  display: block;
  width: 120px;
  margin: 0 auto 26px;
  filter: drop-shadow(0 4px 12px rgba(68, 96, 124, 0.25));
}

.closing-love {
  font-size: 17px;
  color: var(--text);
  margin-bottom: 10px;
}

body.lang-en .closing-love {
  font-size: 22px;
}

.closing-names {
  font-family: 'DM Medea', 'BPG Nino', serif;
  font-size: 32px;
  color: var(--blue-deep);
  line-height: 1.2;
}

body.lang-en .closing-names {
  font-family: 'Cormorant Garamond', serif;
  font-size: 38px;
}

/* ===== FOOTER ===== */
.site-footer {
  background-color: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 26px 24px;
  text-align: center;
}

.footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  opacity: 0.3;
  transition: opacity 0.25s ease;
}

.footer-credit:hover {
  opacity: 1;
}

.footer-logo {
  width: 22px;
  height: auto;
}

.footer-credit span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--blue-deep);
}

/* ===== FALLING PETALS ===== */
#site {
  position: relative;
}

#petals-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  overflow: hidden;
  visibility: hidden;
}

#petals-layer.visible {
  visibility: visible;
}

.petal {
  position: absolute;
  pointer-events: none;
  will-change: transform, opacity;
  user-select: none;
  -webkit-user-select: none;
}

/* pinned to --vh: plain vh moves when an in-app browser resizes its frame */
@keyframes petalFallA {
  0%   { transform: translateY(-100px) translateX(0) rotate(0deg); opacity: 0; }
  12%  { opacity: 0.55; }
  30%  { transform: translateY(calc(var(--vh) * 26)) translateX(28px) rotate(50deg); }
  55%  { transform: translateY(calc(var(--vh) * 54)) translateX(-14px) rotate(96deg); }
  80%  { transform: translateY(calc(var(--vh) * 80)) translateX(24px) rotate(148deg); opacity: 0.48; }
  93%  { opacity: 0; }
  100% { transform: translateY(calc(var(--vh) * 110)) translateX(-4px) rotate(183deg); opacity: 0; }
}

@keyframes petalFallB {
  0%   { transform: translateY(-100px) translateX(0) rotate(16deg); opacity: 0; }
  12%  { opacity: 0.52; }
  32%  { transform: translateY(calc(var(--vh) * 28)) translateX(-26px) rotate(-44deg); }
  58%  { transform: translateY(calc(var(--vh) * 58)) translateX(18px) rotate(-90deg); }
  82%  { transform: translateY(calc(var(--vh) * 82)) translateX(-10px) rotate(-145deg); opacity: 0.45; }
  93%  { opacity: 0; }
  100% { transform: translateY(calc(var(--vh) * 110)) translateX(6px) rotate(-176deg); opacity: 0; }
}

@keyframes petalFallC {
  0%   { transform: translateY(-100px) translateX(0) rotate(-8deg); opacity: 0; }
  14%  { opacity: 0.5; }
  28%  { transform: translateY(calc(var(--vh) * 24)) translateX(34px) rotate(36deg); }
  54%  { transform: translateY(calc(var(--vh) * 54)) translateX(4px) rotate(80deg); }
  80%  { transform: translateY(calc(var(--vh) * 80)) translateX(30px) rotate(126deg); opacity: 0.44; }
  93%  { opacity: 0; }
  100% { transform: translateY(calc(var(--vh) * 110)) translateX(12px) rotate(158deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  #petals-layer { display: none; }
  .scroll-chevron { animation: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
}

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

@media (min-width: 481px) {
  .h-monogram     { font-size: 76px; }
  .section        { padding: 96px 40px; }
}

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

  #desktop-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: var(--bg);
    padding: 40px 24px;
    gap: 10px;
  }

  .desktop-notice__logo {
    width: 52px;
    height: auto;
    opacity: 0.8;
    margin-bottom: 24px;
  }

  .desktop-notice__ka,
  .desktop-notice__en {
    font-family: 'Cormorant Garamond', 'Noto Serif Georgian', serif;
    font-size: 18px;
    color: var(--text);
    text-align: center;
    line-height: 1.5;
  }

  .desktop-notice__ka {
    font-family: 'Noto Serif Georgian', serif;
    font-size: 16px;
  }

  .desktop-notice__sub {
    font-size: 14px;
    color: var(--text-soft);
  }

  .h-names        { font-size: var(--fs-names-lg); }
  .section-title  { font-size: var(--fs-title-lg); }
  .event-card__venue { font-size: var(--fs-venue-lg); }
}

@media (min-width: 1025px) {
  .section        { padding: 120px 80px; }
}
