/* ===== FONTS ===== */
@font-face {
  font-family: 'DM Medea';
  src: url(bpg_nino.otf) format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DM Medea Display';
  src: url(./MCh\ Ma\ Si\ Vardi\ Serif\ -\ Regular.otf) format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

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

/* ===== VARIABLES ===== */
:root {
  --bg:        #f4efe6;
  --bg-alt:    #ede8df;
  --text:      #2c2018;
  --text-soft: #8a7a6a;
  --teal:      #6888a0;
  --gold:      #c9a46a;
  --gold-lt:   #a07840;
  --border:    #d5ccc0;
  --rule:      #c8bdb0;
}

/* — Georgian — */
:root {
  --fs-names-sm:    42px;
  --fs-names-md:    74px;
  --fs-names-lg:    96px;
  --fs-names-xl:   118px;

  --fs-title-sm:    34px;
  --fs-title-md:    40px;
  --fs-title-lg:    44px;

  --fs-venue-sm:    28px;
  --fs-venue-lg:    36px;

  --fs-venue-sub:   32px;

  --fs-time-sm:     38px;
  --fs-time-lg:     36px;

  --fs-thankyou:    30px;
}

/* — English — */
body.lang-en {
  --fs-names-sm:    42px;
  --fs-names-md:    64px;
  --fs-names-lg:    86px;
  --fs-names-xl:   108px;

  --fs-title-sm:    28px;
  --fs-title-md:    32px;
  --fs-title-lg:    36px;

  --fs-venue-sm:    34px;
  --fs-venue-lg:    30px;

  --fs-venue-sub:   22px;

  --fs-time-sm:     28px;
  --fs-time-lg:     26px;

  --fs-thankyou:    20px;
}

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

body {
  font-family: 'DM Medea', 'Noto Serif Georgian', serif;
  background-color: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  max-width: 100%;
}

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

body.lang-en .h-names {
  font-family: 'Petit Formal Script', serif;
}

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

body.no-scroll {
  overflow: hidden;
  position: fixed;
  width: 100%;
  top: 0;
}

/* ===== 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.4s ease;
}
body.scrollbar-ready::-webkit-scrollbar-thumb {
  background-color: var(--rule);
}
html {
  scrollbar-color: var(--rule) var(--bg-alt);
  scrollbar-width: thin;
}

/* ===== LOADING SCREEN ===== */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: #F0E6DA;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.7s ease;
}

#loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

#loading-screen.gone {
  display: none;
}

.loader-ring {
  width: 60px;
  height: 60px;
  border: 2.5px solid rgba(201, 164, 106, 0.18);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: loaderSpin 1s linear infinite;
}

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

/* ===== INTRO OVERLAY ===== */
#intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #f0e6da;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.5s ease;
}

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

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

#intro-click {
  position: absolute;
  top: 75%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  white-space: nowrap;
  opacity: 0;
  animation: introFadeIn 1.4s ease 0.3s forwards;
  transition: opacity 0.5s ease;
}

.intro-en {
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px;
  letter-spacing: 0.38em;
  color: #2a1a0e;
  font-weight: 500;
}

.intro-divider {
  width: 36px;
  height: 1px;
  background: #2a1a0e;
  opacity: 0.4;
}

.intro-ka {
  font-size: 22px;
  color: #2a1a0e;
  letter-spacing: 0.05em;
  font-weight: 600;
}

#video-1,
#video-2,
#intro-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

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

#video-1 {
  opacity: 1;
}

#video-2 {
  opacity: 0;
}

#video-2.active {
  opacity: 1;
}

/* ===== 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: rgba(244, 239, 230, 0.82);
  border-radius: 18px;
  border: 1px solid rgba(200, 189, 176, 0.7);
  display: flex;
  align-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  backdrop-filter: blur(6px);
}

.lang-switch__thumb {
  position: absolute;
  left: 3px;
  width: 32px;
  height: 28px;
  background: rgba(104, 136, 160, 0.15);
  border: 1px solid rgba(104, 136, 160, 0.4);
  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.5;
  transition: opacity 0.28s ease;
  color: var(--text);
}

.lang-switch__label--ka {
  opacity: 1;
}

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

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

/* ===== 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: rgba(150, 144, 134, 0.5);
  border-radius: 15px;
  border: 1px solid rgba(200, 189, 176, 0.7);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  backdrop-filter: blur(6px);
  transition: background 0.28s ease;
}

.music-switch.playing {
  background: rgba(104, 136, 160, 0.7);
}

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

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


/* ===== SHARED HERO CENTER ===== */
.hero-center {
  text-align: center;
  padding: 6rem 24px 40px;
  max-width: 600px;
}

.hero-center .h-initials,
.hero-center .h-names,
.hero-center .h-date,
.hero-center .h-subtitle {
  opacity: 0;
}

.h-scroll {
  opacity: 0;
}

.hero-center.revealed .h-initials  { animation: fadeInUp 0.7s ease forwards; animation-delay: 0s; }
.hero-center.revealed .h-names     { animation: fadeInUp 0.7s ease forwards; animation-delay: 0.15s; }
.hero-center.revealed .h-date      { animation: fadeInUp 0.7s ease forwards; animation-delay: 0.28s; }
.hero-center.revealed .h-subtitle  { animation: fadeInUp 0.7s ease forwards; animation-delay: 0.40s; }
.hero-center.revealed ~ .h-scroll  { animation: fadeInUpCentered 0.7s ease forwards; animation-delay: 0.52s; }

.h-rule {
  width: 48px;
  height: 1px;
  background: #2d4870;
  margin: 0 auto 18px;
  display: none;
}

.h-names {
  font-family: 'DM Medea Display', serif;
  font-size: var(--fs-names-sm);
  font-weight: 600;
  color: #2d4870;
  letter-spacing: 0.03em;
  line-height: 1.1;
  margin-bottom: 38px;
  text-shadow: none;
  white-space: nowrap;
}

.amp {
  color: #2d4870;
  padding: 0 6px;
}

.h-initials {
  display: block;
  width: 120px;
  margin: -10px auto 24px;
  mix-blend-mode: multiply;
  opacity: 0.9;
}

.h-date {
  font-size: 16px;
  font-weight: 500;
  color: #4d6a93;
  letter-spacing: 0.26em;
  margin: 12px 0 24px;
}

.h-subtitle {
  font-size: 16px;
  font-weight: 600;
  color: #2d4870;
  letter-spacing: 0.02em;
  line-height: 1.6;
  margin-bottom: 12px;
  padding: 0 30px;
  min-height: 100px;
  text-shadow: 0 1px 8px rgba(255,255,255,0.85), 0 0 20px rgba(255,255,255,0.6);
}

.h-scroll {
  position: absolute;
  bottom: 18%;
  left: 50%;
  right: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  padding: 6px 10px;
  width: fit-content;
  min-width: 120px;
  min-height: 50px;
  font-weight: 700 !important;
}

.scroll-label {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: #4d6a93;
  font-weight: 400;
}

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

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

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

#hv-fwd {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  opacity: 0;
}

#hv-fwd.show {
  opacity: 1;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.32) 0%,
    rgba(255,255,255,0.60) 10%,
    rgba(255,255,255,0.40) 25%,
    rgba(255,255,255,0) 55%
  );
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 35%;
  z-index: 1;
  background: linear-gradient(to bottom, transparent, #f4efe6);
  pointer-events: none;
}

.hero-center {
  position: relative;
  z-index: 2;
}

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

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

@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50%      { transform: scale(1.05); opacity: 1; }
}

@keyframes ringExpand {
  0%   { transform: scale(1); opacity: 0.45; }
  100% { transform: scale(1.5); opacity: 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.8; }
  50%  { transform: translateY(2px)  rotate(45deg); opacity: 0.35; }
  100% { transform: translateY(-2px) rotate(45deg); opacity: 0.8; }
}

/* ===== 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-eyebrow {
  font-family: 'Cormorant Garamond', serif;
  font-size: 11px;
  letter-spacing: 0.35em;
  color: var(--teal);
  margin-bottom: 14px;
}

.section-title {
  font-family: 'DM Medea Display', serif;
  font-size: var(--fs-title-sm);
  color: var(--text);
  letter-spacing: 0.02em;
  margin-bottom: 18px;
}

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

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

/* ===== EVENTS SECTION ===== */
.flowers-container {
  position: absolute;
  width: 100%;
  top: -22%;
  left: 50%;
  opacity: 0.7;
  transform: translateX(-50%);
  z-index: 1;
  pointer-events: none;
}

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

.events {
  background-color: var(--bg);
  overflow-y: visible;
  overflow-x: clip;
  position: relative;
  padding-bottom: 6rem;
}

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

.event-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: 40px 32px 36px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  overflow: hidden;
}

.event-card__img {
  width: calc(100% + 64px);
  height: auto;
  margin: -40px -32px 24px;
  position: relative;
  overflow: hidden;
  border-radius: 0;
}

.event-card__img img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0.9;
}

.event-card__img::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 16%;
  background: linear-gradient(to bottom, transparent, var(--bg-alt));
  pointer-events: none;
}

.event-card__label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  letter-spacing: 0.2em;
  color: var(--teal);
  margin-bottom: 26px;
  line-height: 1.2;
}

.event-card__venue {
  font-family: 'DM Medea Display', serif;
  font-size: var(--fs-venue-sm);
  color: var(--text);
  letter-spacing: 0.01em;
  line-height: 1.2;
  margin-bottom: 20px;
}

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

.g17 {
  font-family: 'DM Medea', serif !important;
  font-size: 32px !important;
}

.event-card__sub {
  font-family: 'DM Medea Display', serif;
  font-size: var(--fs-venue-sub);
  color: var(--text-soft);
  letter-spacing: 0.01em;
  margin-bottom: 10px;
}

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

.event-card__addr {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  color: var(--text-soft);
  letter-spacing: 0.03em;
  line-height: 1.5;
  margin-bottom: 20px;
}

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

.event-card__date {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  color: var(--text);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.event-card__time {
  font-family: 'DM Medea Display', serif;
  font-size: 34px;
  color: var(--teal);
  letter-spacing: 0.02em;
  margin-bottom: 22px;
  line-height: 1;
}

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

.event-card__schedule {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 16px;
  row-gap: 8px;
  width: 70%;
  margin: 0 auto;
  margin-bottom: 22px;
  padding-top: 4px;
  align-items: baseline;
}

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

.event-card__sub-time {
  font-family: 'DM Medea', serif;
  font-size: 20px;
  color: var(--teal);
  letter-spacing: 0.08em;
  text-align: right;
  white-space: nowrap;
}

.event-card__sub-label {
  font-family: 'DM Medea', serif;
  font-size: 18px;
  color: var(--text-soft);
  letter-spacing: 0.03em;
  text-align: left;
}

.event-card__sub-label .after-party {
  display: block;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--text-soft);
  opacity: 0.75;
}

.event-card__after-desc {
  grid-column: 1 / -1;
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.6;
  opacity: 0.8;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  text-align: left;
}

body.lang-ka .event-card__after-desc {
  font-family: 'Noto Serif Georgian', serif;
  font-size: 12px;
}

.event-card__map {
  font-family: 'Cormorant Garamond', serif;
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.event-card__map:hover {
  color: var(--teal);
  border-color: var(--teal);
}

.thankyou-text {
  font-family: 'DM Medea Display', serif;
  font-size: var(--fs-thankyou);
  color: var(--text);
  letter-spacing: 0.04em;
  text-align: center;
}

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

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

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

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

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

.countdown-sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--teal);
  margin-top: 0px;
  margin-bottom: 50px;
}

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

.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 16px;
  min-width: 66px;
}

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

.cd-num {
  font-family: 'DM Medea Display', serif;
  font-size: 24px;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

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

.cd-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-soft);
  margin-top: 12px;
}

/* ===== DAY GROUPS ===== */
.day-group {
  margin-bottom: 60px;
  font-family: 'DM Medea Display', serif;
}

.day-group:last-child {
  margin-bottom: 0;
}

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

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

.day-date {
  font-family: 'DM Medea Display', 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 0.3em;
  color: var(--teal);
}

/* ===== SHARED ESTATE FORMS & CARDS (RSVP & WISHES) ===== */
.estate-card {
  position: relative;
  background: rgba(237, 232, 223, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 1.75rem;
  padding: 34px 24px 32px;
  margin: 0 auto;
  max-width: 540px;
  text-align: left;
  box-shadow: 0 14px 36px rgba(44, 32, 24, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.estate-card::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(201, 164, 106, 0.26);
  border-radius: 1.35rem;
  pointer-events: none;
}

.estate-card__ornament {
  text-align: center;
  font-size: 18px;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 18px;
  opacity: 0.85;
}

.estate-form {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.estate-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 460px) {
  .estate-row {
    grid-template-columns: 1fr 1fr;
  }
}

.estate-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.estate-label {
  font-family: 'DM Medea', 'Noto Serif Georgian', serif;
  font-size: 14px;
  font-weight: 600;
  color: #2d4870;
  letter-spacing: 0.02em;
}

.estate-req {
  color: var(--gold-lt);
}

.estate-opt {
  font-weight: 400;
  font-size: 12px;
  color: var(--text-soft);
}

.estate-input,
.estate-textarea,
.estate-select {
  width: 100%;
  background: rgba(252, 249, 244, 0.92);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 13px 15px;
  font-family: 'DM Medea', 'Noto Serif Georgian', serif;
  font-size: 15px;
  color: var(--text);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
  -webkit-appearance: none;
  appearance: none;
}

.estate-input::placeholder,
.estate-textarea::placeholder {
  color: rgba(138, 122, 106, 0.72);
  font-size: 14px;
}

.estate-input:focus,
.estate-textarea:focus,
.estate-select:focus {
  outline: none;
  border-color: var(--gold);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(201, 164, 106, 0.16);
}

.estate-input.is-invalid,
.estate-textarea.is-invalid,
.estate-select.is-invalid {
  border-color: #b85c52;
  background: rgba(255, 246, 245, 0.96);
}

.estate-textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.65;
}

.estate-field-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.estate-char-count {
  font-size: 11px;
  color: var(--text-soft);
  margin-left: auto;
  white-space: nowrap;
}

.estate-field-hint {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.5;
}

.estate-field-error {
  font-size: 12.5px;
  color: #a9443a;
  line-height: 1.4;
  min-height: 0;
}

.estate-field-error:empty {
  display: none;
}

/* Guest Stepper */
.guest-stepper {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.guest-stepper__btn {
  width: 46px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: rgba(252, 249, 244, 0.95);
  color: #2d4870;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.guest-stepper__btn:hover:not(:disabled) {
  border-color: var(--gold);
  background: #ffffff;
}

.guest-stepper__btn:active:not(:disabled) {
  transform: scale(0.96);
}

.guest-stepper__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.guest-stepper .estate-select {
  text-align: center;
  text-align-last: center;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--teal) 50%),
                    linear-gradient(135deg, var(--teal) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 2px),
                       calc(100% - 13px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

/* Dynamic Additional Guests */
.additional-guests {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 4px;
}

.additional-guests[hidden] {
  display: none;
}

.guest-subcard {
  background: rgba(244, 239, 230, 0.85);
  border: 1px dashed rgba(160, 120, 64, 0.42);
  border-radius: 1.1rem;
  padding: 16px 16px 18px;
  animation: guestSlideIn 0.32s ease forwards;
}

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

.guest-subcard__title {
  font-family: 'DM Medea Display', 'DM Medea', serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--gold-lt);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guest-subcard__title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(201, 164, 106, 0.28);
}

/* Submit Button */
.estate-btn {
  margin-top: 4px;
  width: 100%;
  padding: 15px 22px;
  border: 1px solid #2d4870;
  border-radius: 999px;
  background: #2d4870;
  color: #f9f6f0;
  font-family: 'DM Medea', 'Noto Serif Georgian', serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(45, 72, 112, 0.18);
  transition: background-color 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.estate-btn:hover:not(:disabled) {
  background: #3a5a88;
  box-shadow: 0 10px 24px rgba(45, 72, 112, 0.25);
}

.estate-btn:active:not(:disabled) {
  transform: scale(0.985);
}

.estate-btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.estate-btn__spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: loaderSpin 0.8s linear infinite;
}

.estate-btn.is-loading .estate-btn__spinner {
  display: inline-block;
}

.estate-status {
  text-align: center;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--teal);
  min-height: 0;
}

.estate-status:empty {
  display: none;
}

.estate-status.is-error {
  color: #a9443a;
}

.estate-status.is-success {
  color: #2d5e4e;
}

/* ===== RSVP SUCCESS ANIMATION ===== */
.rsvp-success {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 22px 12px 14px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.rsvp-success.visible {
  opacity: 1;
  transform: translateY(0);
}

.rsvp-success__badge {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
}

.rsvp-success__svg {
  width: 64px;
  height: 64px;
}

.rsvp-success__circle {
  stroke: var(--gold);
  stroke-width: 1.8;
  stroke-dasharray: 152;
  stroke-dashoffset: 152;
}

.rsvp-success.visible .rsvp-success__circle {
  animation: strokeDraw 0.75s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.rsvp-success__check {
  stroke: #2d4870;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
}

.rsvp-success.visible .rsvp-success__check {
  animation: strokeDraw 0.45s cubic-bezier(0.65, 0, 0.45, 1) 0.45s forwards;
}

@keyframes strokeDraw {
  to {
    stroke-dashoffset: 0;
  }
}

.rsvp-success__title {
  font-family: 'DM Medea Display', serif;
  font-size: 28px;
  color: #2d4870;
  margin-bottom: 10px;
}

.rsvp-success__msg {
  font-size: 15.5px;
  color: var(--text);
  line-height: 1.7;
  max-width: 380px;
  margin: 0 auto 10px;
}

.rsvp-success__detail {
  font-size: 13.5px;
  color: var(--teal);
  letter-spacing: 0.03em;
}

/* ===== WEDDING WISHES SECTION ===== */
.wishes {
  background-color: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.wishes-subtitle {
  font-size: 14.5px;
  color: var(--text-soft);
  line-height: 1.6;
  margin-bottom: 24px;
}

.wishes .section-rule {
  margin-bottom: 36px;
}

.estate-card--wishes {
  background: rgba(244, 239, 230, 0.96);
}

.wishes-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(201, 164, 106, 0.12);
  border: 1px solid rgba(201, 164, 106, 0.36);
  border-radius: 0.95rem;
  padding: 13px 14px;
}

.wishes-disclaimer__icon {
  color: var(--gold-lt);
  font-size: 13px;
  line-height: 1.5;
  flex-shrink: 0;
}

.wishes-disclaimer__text {
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.65;
  text-align: left;
}

/* Public Wishes Wall */
.wishes-wall-wrap {
  max-width: 540px;
  margin: 46px auto 0;
}

.wishes-wall-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 24px;
}

.wishes-wall-header__line {
  flex: 1;
  max-width: 56px;
  height: 1px;
  background: var(--rule);
}

.wishes-wall-header__title {
  font-family: 'DM Medea Display', serif;
  font-size: 19px;
  color: #2d4870;
  letter-spacing: 0.04em;
}

.wishes-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-soft);
  padding: 18px 0;
}

.wishes-loading[hidden],
.wishes-empty[hidden] {
  display: none;
}

.wishes-loading__dot {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(201, 164, 106, 0.3);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: loaderSpin 0.9s linear infinite;
}

.wishes-empty {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.6;
  padding: 18px 12px;
}

.wishes-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Handwritten-Inspired Wish Card */
.wish-card {
  position: relative;
  background: linear-gradient(165deg, #fcf9f3 0%, #f5efe4 100%);
  border: 1px solid var(--border);
  border-radius: 1.35rem;
  padding: 22px 22px 20px;
  text-align: left;
  box-shadow: 0 8px 22px rgba(44, 32, 24, 0.045);
  opacity: 0;
  transform: translateY(14px);
  animation: wishCardEnter 0.55s ease forwards;
}

.wish-card::before {
  content: '“';
  position: absolute;
  top: 10px;
  right: 18px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 46px;
  line-height: 1;
  color: rgba(201, 164, 106, 0.32);
  pointer-events: none;
}

@keyframes wishCardEnter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wish-card__message {
  font-family: 'DM Medea', 'Noto Serif Georgian', serif;
  font-size: 15px;
  color: var(--text);
  line-height: 1.78;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 14px;
}

.wish-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(200, 189, 176, 0.7);
}

.wish-card__author {
  font-family: 'DM Medea Display', 'DM Medea', serif;
  font-size: 17px;
  font-weight: 600;
  color: #2d4870;
  letter-spacing: 0.02em;
}

.wish-card__author::before {
  content: '— ';
  color: var(--gold-lt);
}

.wish-card__date {
  font-size: 11.5px;
  color: var(--text-soft);
}

/* ===== CLOSING & RSVP ===== */
.closing {
  background-color: var(--bg);
  background-image: url(last-bg.jpg);
  background-size: cover;
  background-position: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.closing::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 32%;
  background: linear-gradient(to bottom, var(--bg), transparent);
  pointer-events: none;
  z-index: 1;
}

.closing::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 28%;
  background: linear-gradient(to top, var(--bg), transparent);
  pointer-events: none;
  z-index: 1;
}

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

.closing-crest {
  display: block;
  width: 240px;
  max-width: 72%;
  margin: -3rem auto 8px;
  mix-blend-mode: multiply;
  opacity: 0.95;
}

.rsvp-heading {
  margin-bottom: 10px;
}

.closing-line {
  font-size: 12px;
  letter-spacing: 0.26em;
  font-weight: 800;
  color: var(--teal);
  line-height: 2.1;
  margin-bottom: 24px;
  padding: 0 20px;
}

.estate-card--rsvp {
  margin-top: 22px;
  margin-bottom: 42px;
}

.closing-divider {
  width: 36px;
  height: 1px;
  background: var(--rule);
  margin: 0 auto 24px;
}

.closing-love {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-soft);
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.closing-names {
  font-family: 'DM Medea Display', serif;
  font-size: 34px;
  color: #2d4870;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

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

/* ===== 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;
}

@keyframes petalFallA {
  0%   { transform: translateY(-100px) translateX(0) rotate(0deg);    opacity: 0; }
  12%  { opacity: 0.55; }
  30%  { transform: translateY(26vh) translateX(28px) rotate(50deg); }
  55%  { transform: translateY(54vh) translateX(-14px) rotate(96deg); }
  80%  { transform: translateY(80vh) translateX(24px) rotate(148deg); opacity: 0.48; }
  93%  { opacity: 0; }
  100% { transform: translateY(110vh) 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(28vh) translateX(-26px) rotate(-44deg); }
  58%  { transform: translateY(58vh) translateX(18px) rotate(-90deg); }
  82%  { transform: translateY(82vh) translateX(-10px) rotate(-145deg); opacity: 0.45; }
  93%  { opacity: 0; }
  100% { transform: translateY(110vh) translateX(6px) rotate(-176deg); opacity: 0; }
}

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

/* ===== 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;
    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', serif;
    font-size: 18px;
    color: var(--text);
    letter-spacing: 0.02em;
    text-align: center;
    margin: 0;
    line-height: 1.5;
  }

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

@media (min-width: 769px) {
  .h-names        { font-size: var(--fs-names-lg); }
  .h-date         { font-size: 15px; letter-spacing: 0.3em; }
  .h-subtitle     { font-size: 18px; }
  .hero-center    { padding: 100px 40px 50px; }
  .h-initials     { width: 180px; }
  .section        { padding: 110px 60px; }
  .section-title  { font-size: var(--fs-title-lg); }
  .events-cards       { flex-direction: row; align-items: flex-start; gap: 24px; }
  .event-card         { flex: 1; }
  .event-card__venue  { font-size: var(--fs-venue-lg); }
}

@media (min-width: 1025px) {
  .h-names        { font-size: var(--fs-names-xl); }
  .h-date         { font-size: 16px; }
  .h-subtitle     { font-size: 19px; }
  .hero-center    { padding: 120px 60px 60px; }
  .h-initials     { width: 200px; }
  .section        { padding: 120px 80px; }
}