@font-face {
  font-family: 'Dachi the Lynx';
  src: url('Dachi the Lynx.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BPG Nino Mtavruli';
  src: url('bpg_nino_mtavruli_book.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BPG Nino Mtavruli';
  src: url('bpg_nino_mtavruli_normal.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BPG Nino Mtavruli';
  src: url('bpg_nino_mtavruli_bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-top: #0a0a1c;
  --bg-mid: #171335;
  --bg-bottom: #1e1840;
  --panel-bg: #16123399;
  --panel-border: rgba(217, 164, 65, 0.4);
  --gold: #d9a441;
  --gold-light: #f3d17a;
  --gold-dark: #a97c2f;
  --text: #ece6d8;
  --text-soft: #a79fc4;
  --font-display: 'Dachi the Lynx', 'Anton', sans-serif;
  --font-geo: 'BPG Nino Mtavruli', 'Noto Sans Georgian', sans-serif;
  --font-body: 'BPG Nino Mtavruli', 'Poppins', 'Noto Sans Georgian', sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  position: relative;
  background-color: var(--bg-top);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  overflow-y: hidden;
  min-height: 100vh;
}

body.unlocked {
  overflow-y: auto;
}

.desktop-notice {
  display: none;
}

.desktop-notice__card {
  text-align: center;
}

.desktop-notice__logo {
  width: 52px;
  height: 52px;
  display: block;
  margin: 0 auto 14px;
  opacity: 0.8;
}

.desktop-notice__title {
  margin: 0;
  color: var(--gold-light);
  font-family: var(--font-geo);
  font-size: 22px;
  line-height: 1.4;
}

@media (min-width: 769px) {
  .desktop-notice {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background-color: var(--bg-top);
    background-image:
      radial-gradient(circle at 20% 18%, rgba(217, 164, 65, 0.08) 0.6px, transparent 1px),
      radial-gradient(circle at 78% 62%, rgba(217, 164, 65, 0.06) 0.6px, transparent 1.1px),
      radial-gradient(circle at 42% 84%, rgba(255, 255, 255, 0.05) 0.5px, transparent 1px);
    background-size: 4px 4px, 5px 5px, 6px 6px;
  }
}

.starfield {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, #ffffff 100%, transparent 100%),
    radial-gradient(1px 1px at 90px 120px, #ffffff 100%, transparent 100%),
    radial-gradient(1.5px 1.5px at 150px 60px, #ffffff 100%, transparent 100%),
    radial-gradient(1px 1px at 45px 170px, #ffffff 100%, transparent 100%),
    radial-gradient(1px 1px at 180px 20px, #ffffff 100%, transparent 100%),
    radial-gradient(1.5px 1.5px at 110px 190px, #ffffff 100%, transparent 100%);
  background-repeat: repeat;
  background-size: 220px 220px;
}

.starfield__shine {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.starfield__star {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: var(--gold-light, #f3d17a);
  opacity: 0;
  will-change: opacity, transform;
  animation-name: star-twinkle;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-duration: var(--dur);
  animation-delay: var(--delay);
}

@keyframes star-twinkle {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.6);
    box-shadow: 0 0 0 rgba(243, 209, 122, 0);
  }
  50% {
    opacity: var(--peak, 0.9);
    transform: scale(1);
    box-shadow: 0 0 3px 0 rgba(243, 209, 122, 0.3);
  }
}

@media (prefers-reduced-motion: reduce) {
  .starfield__star {
    animation: none;
    opacity: var(--peak, 0.9);
  }
}

/* ============ REEL SIDE BORDERS ============ */

.reel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28px;
  z-index: 0;
  pointer-events: none;
  background-image: url('reel-tile.svg');
  background-repeat: repeat-y;
  background-position: top center;
  background-size: 28px 40px;
  opacity: 0.85;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, transparent 95svh, black 108svh);
  mask-image: linear-gradient(to bottom, transparent 0, transparent 92svh, black 108svh);
}

.reel--left {
  left: 0;
}

.reel--right {
  right: 0;
}

/* horizontal frame separator — connects the two side reels so each
   section reads as one frame of the continuous film strip */
.reel-sep {
  position: relative;
  z-index: 1;
  width: auto;
  margin: 5px 28px;
  height: 12px;
  background-color: #f3d17a;
  opacity: 0.85;
  pointer-events: none;
}

/* flared, concave end-caps so each separator reads like the I-beam
   film-frame window (ends widen outward, not rounded inward) */
.reel-sep::before,
.reel-sep::after {
  content: '';
  position: absolute;
  top: -5px;
  width: 12px;
  height: 22px;
  background: url('sep-cap.svg') center / 100% 100% no-repeat;
}

.reel-sep::before {
  left: 0;
}

.reel-sep::after {
  right: 0;
  transform: scaleX(-1);
}

/* ============ INTRO VIDEO ============ */

.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: var(--bg-top);
  overflow: hidden;
}

.intro__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* hidden behind the solid gate until the guest taps, then fades in */
  opacity: 0;
  transition: opacity 0.9s ease;
}

.intro__video.is-visible {
  opacity: 1;
}

.intro.is-done {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

.intro__loader {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.intro__loader.is-visible {
  opacity: 1;
}

.intro__spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid rgba(217, 164, 65, 0.25);
  border-top-color: var(--gold-light);
  animation: spin 0.9s linear infinite;
}

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

.intro__tap {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
  background-color: var(--bg-top);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.intro__tap.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.intro__tap-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.intro__tap-ring {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ring-pulse 2.2s ease-in-out infinite;
}

/* CSS-drawn play triangle — renders pixel-identically on every device
   (avoids ▶ flipping to a colored emoji on iOS/Android) */
.intro__tap-icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent var(--gold-light);
  transform: translateX(2px);
}

@keyframes ring-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 164, 65, 0.35); }
  50% { box-shadow: 0 0 0 14px rgba(217, 164, 65, 0); }
}

.intro__tap-text {
  font-family: var(--font-geo);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--text);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

/* ============ MUSIC TOGGLE ============ */

.music-toggle {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--panel-border);
  background: var(--panel-bg);
  backdrop-filter: blur(6px);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease, border-color 0.3s ease, background-color 0.3s ease;
}

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

.music-toggle:hover {
  border-color: var(--gold);
}

.music-toggle__bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 18px;
}

.music-toggle__bar {
  width: 3px;
  height: 4px;
  border-radius: 2px;
  background: var(--gold-light);
  transform-origin: bottom;
  animation: none;
  transition: background-color 0.3s ease;
}

.music-toggle.is-playing .music-toggle__bar {
  animation-name: var(--bar-anim, music-bar-1);
  animation-duration: var(--dur, 1s);
  animation-delay: var(--delay, 0s);
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.music-toggle__bar:nth-child(1) { --bar-anim: music-bar-1; }
.music-toggle__bar:nth-child(2) { --bar-anim: music-bar-2; }
.music-toggle__bar:nth-child(3) { --bar-anim: music-bar-3; }
.music-toggle__bar:nth-child(4) { --bar-anim: music-bar-4; }

@keyframes music-bar-1 {
  0% { height: 5px; }
  22% { height: 17px; }
  40% { height: 7px; }
  63% { height: 13px; }
  81% { height: 4px; }
  100% { height: 5px; }
}

@keyframes music-bar-2 {
  0% { height: 10px; }
  18% { height: 4px; }
  37% { height: 18px; }
  58% { height: 9px; }
  77% { height: 15px; }
  100% { height: 10px; }
}

@keyframes music-bar-3 {
  0% { height: 6px; }
  28% { height: 12px; }
  46% { height: 4px; }
  69% { height: 17px; }
  88% { height: 8px; }
  100% { height: 6px; }
}

@keyframes music-bar-4 {
  0% { height: 14px; }
  20% { height: 6px; }
  44% { height: 16px; }
  66% { height: 5px; }
  85% { height: 11px; }
  100% { height: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .music-toggle.is-playing .music-toggle__bar {
    animation: none;
    height: 12px;
  }
}

/* ============ MAIN ============ */

.main {
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity 1s ease;
}

.main.is-visible {
  opacity: 1;
}

section {
  position: relative;
  padding: 64px 24px;
  max-width: 560px;
  margin: 0 auto;
}

/* ============ HERO ============ */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 100vh;
  min-height: 100svh;
  max-width: none;
  padding: 0;
  overflow: hidden;
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  
}

.hero__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34%;
  background: linear-gradient(180deg, rgba(10, 10, 28, 0) 0%, var(--bg-top) 92%);
  pointer-events: none;
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 2;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 8px;
}

.scroll-hint__mouse {
  width: 26px;
  height: 42px;
  border: 2px solid var(--gold-light);
  border-radius: 14px;
  position: relative;
  opacity: 0.9;
}

.scroll-hint__wheel {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: var(--gold-light);
  animation: wheel-drop 1.8s ease-in-out infinite;
}

@keyframes wheel-drop {
  0% { opacity: 1; top: 6px; }
  60% { opacity: 0; top: 20px; }
  61% { opacity: 0; top: 6px; }
  100% { opacity: 1; top: 6px; }
}

.scroll-hint__chevrons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.scroll-hint__chevrons span {
  display: block;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--gold-light);
  border-bottom: 2px solid var(--gold-light);
  transform: rotate(45deg);
  opacity: 0.85;
  animation: chevron-bounce 1.8s ease-in-out infinite;
}

.scroll-hint__chevrons span:nth-child(2) {
  animation-delay: 0.15s;
}

@keyframes chevron-bounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.3; }
  50% { transform: rotate(45deg) translate(3px, 3px); opacity: 1; }
}

/* ============ INTRO TEXT ============ */

.intro-text {
  text-align: center;
  padding-top: 48px;
  padding-bottom: 40px;
}

.intro-text__line {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 23px;
  color: var(--gold-light);
  text-shadow: 0 0 18px rgba(217, 164, 65, 0.35);
  margin-bottom: 28px;
  letter-spacing: 0.01em;
}

.intro-text__line--sub {
  font-weight: 500;
  font-size: 15px;
  color: var(--text-soft);
  text-shadow: none;
  margin-bottom: 10px;
}

/* ============ SECTION HEAD ============ */

.section-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 10px;
}

.rule {
  flex: 1;
  max-width: 90px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.section-head__diamond {
  color: var(--gold);
  font-size: 13px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  text-align: center;
  color: var(--gold-light);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-soft);
  font-family: var(--font-geo);
  font-weight: 400;
  font-size: 14px;
  margin-bottom: 30px;
}

/* ============ REVEAL ============ */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ============ PANEL (shared box look) ============ */

.countdown__box,
.timeline,
.rsvp-form {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 0 1px rgba(217, 164, 65, 0.05) inset, 0 18px 40px rgba(0, 0, 0, 0.35);
  width: 90%;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ============ COUNTDOWN ============ */

.countdown__box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 10px;
}

.countdown__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.countdown__num {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--gold-light);
  line-height: 1;
}

.countdown__label {
  font-family: var(--font-geo);
  font-size: 9.5px;
  color: var(--text-soft);
  letter-spacing: 0.06em;
}

.countdown__sep {
  width: 1px;
  align-self: stretch;
  margin: 4px 0;
  background: rgba(217, 164, 65, 0.25);
}

/* ============ TIMETABLE ============ */

.timeline {
  padding: 30px 22px 30px 30px;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 40px;
  top: 34px;
  bottom: 34px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
}

.timeline__item {
  position: relative;
  padding-left: 30px;
  margin-bottom: 34px;
}

.timeline__item:last-child {
  margin-bottom: 0;
}

.timeline__dot {
  position: absolute;
  left: 5px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(217, 164, 65, 0.18);
}

.timeline__badge {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--bg-top);
  background: linear-gradient(180deg, var(--gold-light), var(--gold-dark));
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.timeline__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 4px;
  white-space: normal;
  overflow-wrap: break-word;
}

@media (min-width: 481px) {
  .timeline__title {
    font-size: 15.5px;
  }
}

.timeline__desc {
  font-family: var(--font-geo);
  font-weight: 400;
  font-size: 12.5px;
  color: var(--text-soft);
}

/* ============ LOCATION ============ */

.location {
  text-align: center;
  padding-bottom: 20px;
}

.location__link {
  display: inline-block;
  margin: 6px auto 0;
  padding: 13px 26px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: rgba(243, 209, 122, 0.08);
  color: var(--gold-light);
  font-family: var(--font-geo);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.location__link:hover {
  background: rgba(243, 209, 122, 0.16);
  border-color: var(--gold-light);
}

/* ============ RSVP ============ */

.rsvp-form {
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rsvp-form__row {
  display: flex;
  gap: 10px;
}

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

.rsvp-form__input {
  flex: 1;
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 13px 14px;
  color: var(--text);
  font-family: var(--font-geo);
  font-size: 12.5px;
}

.rsvp-form__input::placeholder {
  color: var(--text-soft);
}

.rsvp-form__attendance {
  display: flex;
  gap: 6px;
}

@media (min-width: 481px) {
  .rsvp-form__attendance {
    gap: 10px;
  }
}

.rsvp-radio {
  flex: 1;
  cursor: pointer;
}

.rsvp-radio input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.rsvp-radio__box {
  display: block;
  text-align: center;
  font-family: var(--font-geo);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-soft);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 10px 3px;
  white-space: nowrap;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

@media (min-width: 481px) {
  .rsvp-radio__box {
    font-size: 11.5px;
    padding: 12px 8px;
  }
}

.rsvp-radio input:checked + .rsvp-radio__box {
  background-color: rgba(217, 164, 65, 0.16);
  border-color: var(--gold);
  color: var(--gold-light);
}

.rsvp-form__submit {
  margin-top: 6px;
  border: none;
  border-radius: 12px;
  padding: 15px;
  font-family: var(--font-geo);
  font-weight: 700;
  font-size: 13px;
  color: #241a05;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-dark));
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(217, 164, 65, 0.25);
}

.rsvp-form__submit:active {
  transform: translateY(1px);
}

.rsvp-form__status {
  text-align: center;
  font-family: var(--font-geo);
  font-size: 11.5px;
  color: var(--text-soft);
  min-height: 16px;
}

/* ============ CLOSING ============ */

.closing {
  text-align: center;
  padding-top: 20px;
  padding-bottom: 60px;
}

.closing__text {
  font-family: var(--font-geo);
  font-weight: 700;
  font-size: 22px;
  color: var(--gold-light);
  text-shadow: 0 0 18px rgba(217, 164, 65, 0.3);
}

/* ============ FOOTER ============ */

.footer {
  text-align: center;
  padding: 0 24px 40px;
}

.footer__credit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-soft);
  font-size: 12px;
  opacity: 0.3;
  transition: opacity 0.3s ease;
}

.footer__credit:hover {
  opacity: 1;
}

.footer__logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* ============ SCROLLBAR ============ */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-top);
}

::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  border-radius: 4px;
}

* {
  scrollbar-color: var(--gold-dark) var(--bg-top);
  scrollbar-width: thin;
}
