/* Noto Serif Georgian is loaded by a <link> in index.html (display=block). */

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

:root {
  --red: #d31f1f;
  --red-deep: #8f1414;
  --asphalt: #1c1712;
  --cream: #f7ede0;
  --chrome: #d8d8d8;
}

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

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--asphalt);
  font-family: 'Dachi the Lynx', 'Noto Serif Georgian', serif;
}

/* overflow-x belongs on html alone. On body it also forces overflow-y to
   compute as auto, which turns body into a scroll container that can never
   scroll - the trackpad wheel gesture latches onto that dead scroller. */
html {
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

body {
  scrollbar-color: var(--red) var(--asphalt);
  scrollbar-width: thin;
}

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

body::-webkit-scrollbar-track {
  background: var(--asphalt);
}

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

img {
  max-width: 100%;
  display: block;
}

/* ---------- Music toggle ---------- */

.music-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 60;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(216, 216, 216, 0.55);
  border-radius: 999px;
  background-image: linear-gradient(180deg, #ff4b3d 0%, var(--red) 48%, var(--red-deep) 100%);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.45),
    inset 0 -3px 6px rgba(0, 0, 0, 0.3),
    0 6px 14px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.15s ease;
}

.music-toggle.is-visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.music-toggle:active {
  transform: scale(0.92);
}

.music-toggle__icon {
  position: absolute;
  width: 17px;
  height: 17px;
  fill: var(--cream);
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.music-toggle__icon--play {
  margin-left: 1px;
  opacity: 1;
}

.music-toggle.is-playing .music-toggle__icon--play {
  opacity: 0;
}

.music-toggle.is-playing .music-toggle__icon--pause {
  opacity: 1;
}

/* ---------- Intro / Garage screen ---------- */

.intro {
  position: fixed;
  inset: 0;
  z-index: 50;
  width: 100%;
  height: 100%;
  background-image: url('https://weddsite.b-cdn.net/showcase/birthday-7/garage.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  cursor: pointer;
  transition: transform 1.9s cubic-bezier(0.65, 0.05, 0.36, 1);
  will-change: transform;
}

.intro.is-open {
  transform: translateY(-100%);
  pointer-events: none;
}

.intro-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.intro-name {
  width: 190px;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.5));
}

.intro-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 52px;
  text-align: center;
  color: var(--cream);
  font-size: 15px;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  animation: hint-pulse 1.8s ease-in-out infinite;
}

@keyframes hint-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  background-image: url('https://weddsite.b-cdn.net/showcase/birthday-7/bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-name-wrap {
  position: absolute;
  top: 22px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  opacity: 0;
  transform: translateY(-18px);
  transition: opacity 1s ease, transform 1s ease;
}

.hero-name-wrap.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-name {
  width: 140px;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.45));
}

.hero-info {
  position: absolute;
  top: 40%;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 24px;
  text-align: center;
  transform: translateY(calc(-50% + 14px));
  opacity: 0;
  transition: opacity 1.1s ease, transform 1.1s ease;
}

.hero-info.is-visible {
  opacity: 1;
  transform: translateY(-50%);
}

.hero-info__title {
  font-family: 'Dachi the Lynx', 'Noto Serif Georgian', serif;
  font-size: 34px;
  line-height: 1.2;
  color: #F7AD30;
  text-shadow:
    -1.5px -1.5px 0 #000,
    1.5px -1.5px 0 #000,
    -1.5px 1.5px 0 #000,
    1.5px 1.5px 0 #000,
    -1.5px 0 0 #000,
    1.5px 0 0 #000,
    0 -1.5px 0 #000,
    0 1.5px 0 #000,
    0 3px 14px rgba(0, 0, 0, 0.55);
}

.hero-info__date {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  gap: 14px;
  margin-top: 6px;
}

.hero-info__date-side {
  position: relative;
  flex: 1 1 0;
  padding: 0 14px;
  font-family: 'Dachi the Lynx', 'Noto Serif Georgian', serif;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--cream);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.hero-info__date-side:first-of-type {
  text-align: right;
}

.hero-info__date-side:last-of-type {
  text-align: left;
}

.hero-info__date-side::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 1px;
  height: 26px;
  background: rgba(247, 237, 224, 0.4);
  transform: translateY(-50%);
}

.hero-info__date-side:first-of-type::before { right: 0; }
.hero-info__date-side:last-of-type::before { left: 0; }

.hero-info__date-num {
  font-family: 'Dachi the Lynx', 'Noto Serif Georgian', serif;
  font-size: 34px;
  line-height: 1;
  color: #F7AD30;
  text-shadow:
    -1.5px -1.5px 0 #000,
    1.5px -1.5px 0 #000,
    -1.5px 1.5px 0 #000,
    1.5px 1.5px 0 #000,
    -1.5px 0 0 #000,
    1.5px 0 0 #000,
    0 -1.5px 0 #000,
    0 1.5px 0 #000,
    0 3px 14px rgba(0, 0, 0, 0.55);
}

.hero-info__location {
  font-family: 'Dachi the Lynx', 'Noto Serif Georgian', serif;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--cream);
  text-decoration: none;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.hero-info__location:active {
  opacity: 0.75;
}

.hero-info__pin {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: -4px;
  fill: var(--red);
  margin-right: -2px;
  margin-bottom: 1px;
}

.hero-info__rsvp {
  position: relative;
  margin-top: 4px;
  padding: 16px 20px 10px;
  border: 1.5px solid rgba(216, 216, 216, 0.55);
  border-radius: 999px;
  background-image: linear-gradient(180deg, #ff4b3d 0%, var(--red) 48%, var(--red-deep) 100%);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.45),
    inset 0 -3px 6px rgba(0, 0, 0, 0.3),
    0 8px 16px rgba(0, 0, 0, 0.4);
  font-family: 'Dachi the Lynx', 'Noto Serif Georgian', serif;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--cream);
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000,
    0 2px 8px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hero-info__rsvp::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 12%;
  right: 12%;
  height: 34%;
  border-radius: 999px;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.hero-info__rsvp:active {
  transform: scale(0.95);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.35),
    0 5px 12px rgba(0, 0, 0, 0.35);
}

.hero-kid {
  position: absolute;
  right: 2px;
  bottom: 2.5rem;
  z-index: 1;
  width: 100px;
  opacity: 0;
  transition: opacity 1.1s ease;
}

.hero-kid.is-visible {
  opacity: 1;
}

.hero-car {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.hero-car.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-car-stage {
  position: relative;
  width: 380px;
  height: 218px;
  flex-shrink: 0;
  transform: translateX(-18px);
  cursor: pointer;
}

.hero-car-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
}

.hero-car-video.is-active {
  opacity: 1;
}

/* ---------- Flag strip divider ---------- */

.flag-strip {
  position: relative;
  height: 22px;
  background-image: repeating-conic-gradient(var(--asphalt) 0% 25%, var(--cream) 0% 50%);
  background-size: 22px 22px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

/* ---------- RSVP ---------- */

.rsvp {
  position: relative;
  overflow: hidden;
  background-color: var(--asphalt);
  background-image: radial-gradient(ellipse at 50% 0%, #2c2318 0%, var(--asphalt) 62%);
  padding: 52px 24px 64px;
}

.rsvp__glow {
  position: absolute;
  top: -60px;
  left: 50%;
  width: 320px;
  height: 220px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(211, 31, 31, 0.35) 0%, rgba(211, 31, 31, 0) 70%);
  pointer-events: none;
}

.rsvp__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.rsvp__title {
  font-family: 'Dachi the Lynx', 'Noto Serif Georgian', serif;
  font-size: 30px;
  line-height: 1.2;
  color: #F7AD30;
  text-shadow:
    -1.5px -1.5px 0 #000,
    1.5px -1.5px 0 #000,
    -1.5px 1.5px 0 #000,
    1.5px 1.5px 0 #000,
    -1.5px 0 0 #000,
    1.5px 0 0 #000,
    0 -1.5px 0 #000,
    0 1.5px 0 #000,
    0 3px 14px rgba(0, 0, 0, 0.55);
}

.rsvp__subtitle {
  margin-top: 14px;
  font-family: 'Dachi the Lynx', 'Noto Serif Georgian', serif;
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0.03em;
  color: var(--cream);
  opacity: 0.75;
}

.rsvp__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 320px;
  margin-top: 30px;
}

.rsvp__input {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid rgba(216, 216, 216, 0.22);
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.05);
  font-family: 'Dachi the Lynx', 'Noto Serif Georgian', serif;
  font-size: 14px;
  color: var(--cream);
  outline: none;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

.rsvp__input::placeholder {
  color: rgba(247, 237, 224, 0.4);
}

.rsvp__input:focus {
  border-color: var(--red);
  background-color: rgba(255, 255, 255, 0.09);
}

.rsvp__radios {
  display: flex;
  gap: 10px;
}

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

.radio-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-card__face {
  display: block;
  padding: 13px 6px;
  border: 1.5px solid rgba(216, 216, 216, 0.22);
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.05);
  font-family: 'Dachi the Lynx', 'Noto Serif Georgian', serif;
  font-size: 10px;
  color: var(--cream);
  text-align: center;
  transition: background-image 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.radio-card input:checked + .radio-card__face {
  border-color: transparent;
  background-image: linear-gradient(180deg, #ff4b3d 0%, var(--red) 48%, var(--red-deep) 100%);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.4),
    0 6px 14px rgba(0, 0, 0, 0.35);
}

.rsvp__submit {
  position: relative;
  margin-top: 6px;
  padding: 15px 20px 12px;
  border: 1.5px solid rgba(216, 216, 216, 0.55);
  border-radius: 999px;
  background-image: linear-gradient(180deg, #ff4b3d 0%, var(--red) 48%, var(--red-deep) 100%);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.45),
    inset 0 -3px 6px rgba(0, 0, 0, 0.3),
    0 8px 16px rgba(0, 0, 0, 0.4);
  font-family: 'Dachi the Lynx', 'Noto Serif Georgian', serif;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--cream);
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000,
    0 2px 8px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rsvp__submit::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 12%;
  right: 12%;
  height: 34%;
  border-radius: 999px;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.rsvp__submit:active {
  transform: scale(0.97);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.35),
    0 5px 12px rgba(0, 0, 0, 0.35);
}

.rsvp__submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.rsvp__status {
  margin-top: 18px;
  min-height: 1.2em;
  font-family: 'Dachi the Lynx', 'Noto Serif Georgian', serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--cream);
  opacity: 0.85;
}

.rsvp__status.is-error {
  color: #ff6b57;
  opacity: 1;
}

/* ---------- Dress code ---------- */

.dresscode {
  position: relative;
  background-color: var(--asphalt);
  background-image: radial-gradient(ellipse at 50% 0%, #2c2318 0%, var(--asphalt) 62%);
  padding: 48px 24px 54px;
}

.dresscode__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.dresscode__badge {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2.5px solid rgba(216, 216, 216, 0.55);
  background-image: repeating-conic-gradient(var(--asphalt) 0% 25%, var(--cream) 0% 50%);
  background-size: 12px 12px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
  margin-bottom: 18px;
}

.dresscode__title {
  font-family: 'Dachi the Lynx', 'Noto Serif Georgian', serif;
  font-size: 30px;
  line-height: 1.2;
  color: #F7AD30;
  text-shadow:
    -1.5px -1.5px 0 #000,
    1.5px -1.5px 0 #000,
    -1.5px 1.5px 0 #000,
    1.5px 1.5px 0 #000,
    -1.5px 0 0 #000,
    1.5px 0 0 #000,
    0 -1.5px 0 #000,
    0 1.5px 0 #000,
    0 3px 14px rgba(0, 0, 0, 0.55);
}

.dresscode__text {
  margin-top: 14px;
  font-family: 'Dachi the Lynx', 'Noto Serif Georgian', serif;
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0.03em;
  color: var(--cream);
  opacity: 0.75;
}

.dresscode__swatches {
  display: flex;
  gap: 22px;
  margin-top: 26px;
}

.dresscode__swatch {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
}

.dresscode__swatch--black {
  background-color: #0c0a08;
  border: 1.5px solid rgba(216, 216, 216, 0.35);
}

.dresscode__swatch--white {
  background-color: var(--cream);
  border: 1.5px solid rgba(28, 23, 18, 0.4);
}

.dresscode__swatch-label {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Dachi the Lynx', 'Noto Serif Georgian', serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--cream);
  white-space: nowrap;
}

/* ---------- Footer ---------- */

.footer {
  padding: 6px 24px 6px;
  background-color: var(--asphalt);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer__credit {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 0 10px;
  color: #F7AD30;
  text-decoration: none;
  opacity: 0.55;
  transition: opacity 0.3s ease;
}

.footer__credit:hover,
.footer__credit:focus-visible {
  opacity: 0.9;
}

.footer__credit-text {
  font-family: 'Noto Serif Georgian', serif;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.footer__logo {
  display: block;
  width: 46px;
  height: 46px;
  background-color: #F7AD30;
  -webkit-mask-image: url('logo-vector.svg');
  mask-image: url('logo-vector.svg');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  opacity: 0.9;
}

/* ---------- Desktop notice (mobile-only site) ---------- */

.mobile-prompt {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: rgba(12, 14, 20, 0.62);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

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

.mobile-prompt.is-blocking {
  background-color: rgba(7, 10, 16, 0.96);
}

.mobile-prompt__card {
  position: relative;
  width: min(92vw, 420px);
  padding: 26px 22px 22px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 18px;
  background-color: rgba(19, 26, 36, 0.9);
  text-align: center;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

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

.mobile-prompt__title {
  margin: 0 0 8px;
  font-family: 'Dachi the Lynx', 'Noto Serif Georgian', serif;
  font-size: 22px;
  color: #f4f8ff;
  letter-spacing: 0.03em;
}

.mobile-prompt__text {
  margin: 0;
  font-family: 'Dachi the Lynx', 'Noto Serif Georgian', serif;
  font-size: 16px;
  color: #c9d7e7;
  line-height: 1.45;
}

.no-scroll {
  overflow: hidden;
}


/* ===========================================================================
   Viewport pin, intro scroll lock + loading screen
   ---------------------------------------------------------------------------
   --vh is written by the inline script in <head> off visualViewport and re-pinned
   by script.js for the first 6s only, so an in-app browser's sliding nav bar
   cannot resize the hero. The 100vh/100svh floors on .hero stay as the no-JS
   fallback and MUST come before the .vh-lock rule below.

   The garage door holds the page with a JS gesture trap (script.js), never
   overflow: hidden on the document, which freezes Chrome iOS's viewport short.
   =========================================================================== */

:root {
  --vh: 1vh;
}

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

html.is-locked,
html.is-locked body {
  overscroll-behavior: none;
  touch-action: none;
}

/* The door's hint pulse must not run unseen behind the spinner. */
.is-loading body *:not(.loader):not(.loader__spinner) {
  animation-play-state: paused !important;
}

.loader {
  position: fixed;
  inset: 0;
  /* Out-ranks the garage door (50) and the desktop notice (99999). */
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--asphalt);
  opacity: 1;
  transition: opacity 0.55s ease;
}

.loader.is-hidden {
  opacity: 0;
}

.loader.is-gone {
  display: none;
}

.loader__spinner {
  display: block;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(247, 237, 224, 0.2);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: loader-spin 0.9s linear infinite;
}

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