/* ================================================================
   WEDDING INVITATION — Dark Tilda Clone
   Authors: vlad1116 & Antigravity
================================================================ */

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  --dark:     #292929;
  --darker:   #1e1e1e;
  --white:    #ffffff;
  --text-mid: rgba(255,255,255,0.72);
  --text-dim: rgba(255,255,255,0.4);
  --ff-disp:  'Playfair Display', Georgia, serif;
  --ff-serif: 'Cormorant Garamond', Georgia, serif;
  --ff-sans:  'Montserrat', Arial, sans-serif;
  --ease:     cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }

body {
  font-family: var(--ff-sans);
  background: var(--dark);
  color: var(--white);
  max-width: 480px;
  margin: 0 auto;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Shared reveal animation ─────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }

/* ── Typography atoms ───────────────────────────────────────── */
.eyebrow {
  font-family: var(--ff-sans);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.caps-heading {
  font-family: var(--ff-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 0.8rem;
}

.script-heading {
  font-family: var(--ff-disp);
  font-style: italic;
  font-size: clamp(2rem, 8.5vw, 2.8rem);
  font-weight: 400;
  color: var(--white);
  margin-bottom: 0.8rem;
  line-height: 1.25;
}

.thin-rule {
  width: 44px;
  height: 1px;
  background: rgba(255,255,255,0.2);
  margin: 0 auto 2rem;
}

.body-text {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: clamp(1rem, 4vw, 1.1rem);
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.85;
  max-width: 360px;
  margin-bottom: 1.1rem;
}

.quote {
  margin-top: 0.5rem;
  padding: 1.3rem 1.5rem;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: clamp(1rem, 4.2vw, 1.12rem);
  font-weight: 400;
  color: rgba(255,255,255,0.88);
  line-height: 1.7;
  max-width: 350px;
}

/* ── Section containers ─────────────────────────────────────── */
.dark-section {
  background: var(--dark);
  padding: 3.5rem 1.5rem;
}
.text-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ================================================================
   SCREEN 1 — COVER
================================================================ */
.cover {
  position: fixed;
  inset: 0;
  z-index: 200;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.6rem 3.5rem;
  overflow: hidden;

  /* Transition out */
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.cover.exiting {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}

.cover__bg {
  position: absolute;
  inset: 0;
  background: url('img/frame.png') center center / cover no-repeat;
  z-index: 0;
}

.cover__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.30);
  z-index: 1;
}

/* Top block — label + monogram */
.cover__top {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: clamp(3rem, 11vw, 5rem);
  gap: clamp(1.4rem, 5vw, 2.2rem);
}

/* "ПРИГЛАШЕНИЕ НА СВАДЬБУ" — large, top */
.cover__invite-label {
  font-family: var(--ff-sans);
  font-size: clamp(0.9rem, 3.6vw, 1.15rem);
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--white);
  text-align: center;
  line-height: 1.4;
}

/* Monogram С | В */
.cover__monogram {
  display: flex;
  align-items: center;
  gap: 0;
}

.cover__initial {
  font-family: var(--ff-disp);
  font-size: clamp(5.5rem, 24vw, 9rem);
  font-weight: 400;
  color: var(--white);
  line-height: 1;
  letter-spacing: -0.01em;
}

.cover__mono-bar {
  display: block;
  width: 1px;
  height: clamp(4.5rem, 20vw, 7.5rem);
  background: rgba(255,255,255,0.55);
  margin: 0 clamp(1rem, 4.5vw, 1.8rem);
}

/* Bottom hint */
.cover__hint {
  position: relative;
  z-index: 2;
  font-family: var(--ff-sans);
  font-size: clamp(0.58rem, 2.2vw, 0.72rem);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  text-align: center;
  line-height: 1.5;
  animation: gentlePulse 3s ease-in-out infinite;
}

@keyframes gentlePulse {
  0%, 100% { opacity: 0.65; }
  50%       { opacity: 1; }
}

/* ================================================================
   SCREEN 2 — WEDDING DAY (full photo BG)
================================================================ */
.screen2 {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: url('img/couple1.jpg') center center / cover no-repeat;
}

.screen2__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.48);
  z-index: 0;
}

.screen2__center {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 2rem 1.8rem;
  animation: fadeUp 1s var(--ease) 0.3s both;
}

/* "Wedding day" italic serif */
.screen2__wedding-day {
  font-family: var(--ff-disp);
  font-style: italic;
  font-size: clamp(1.6rem, 7vw, 2.4rem);
  font-weight: 400;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.04em;
  margin-bottom: 0.9rem;
}

.screen2__rule {
  width: 44px;
  height: 1px;
  background: rgba(255,255,255,0.4);
  margin: 0 auto 1.1rem;
}

/* "Сергей & Виктория" */
.screen2__names {
  font-family: var(--ff-disp);
  font-size: clamp(1.8rem, 7.5vw, 2.8rem);
  font-weight: 400;
  color: var(--white);
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin-bottom: 0.8rem;
}

.screen2__amp {
  font-style: italic;
  color: rgba(255,255,255,0.6);
  font-weight: 400;
}

/* Date */
.screen2__date {
  font-family: var(--ff-disp);
  font-style: italic;
  font-size: clamp(1.8rem, 8vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.95);
  margin-top: 0.6rem;
}

.date-sep {
  font-family: var(--ff-sans);
  font-style: normal;
  font-size: 0.75em;
  color: rgba(255,255,255,0.3);
  margin: 0 clamp(0.3rem, 1.5vw, 0.5rem);
  vertical-align: middle;
  position: relative;
  top: -2px;
}

/* "Листайте ниже" + arrow */
.screen2__scroll-hint {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.55);
  animation: fadeIn 1s ease 1.2s both;
}

.screen2__scroll-txt {
  font-family: var(--ff-sans);
  font-size: 0.55rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.screen2__arrow {
  animation: arrowBounce 1.8s ease-in-out infinite;
}

@keyframes arrowBounce {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50%       { transform: translateY(6px); opacity: 1; }
}

/* ================================================================
   OVAL PHOTO FRAME
================================================================ */
.photo-block {
  padding: 0 1.5rem 3.5rem;
  display: flex;
  justify-content: center;
}

.oval-frame {
  width: min(258px, 68vw);
  aspect-ratio: 3 / 4.2;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
}

/* White-padded oval (reference style) */
.oval-frame--white {
  background: var(--white);
  padding: 7px;
}
.oval-frame--white .oval-frame__img {
  border-radius: 50%;
}

.oval-frame__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* ================================================================
   LOCATION OVAL
================================================================ */
.location-section {
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.location-oval {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  /* Oval border frame */
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  width: min(300px, 82vw);
  aspect-ratio: 1 / 1.18;
  justify-content: center;
  gap: 0.6rem;
  padding: 3rem 2.2rem;

  background: rgba(255,255,255,0.03);
  box-shadow: 0 0 0 8px rgba(255,255,255,0.025),
              0 0 0 16px rgba(255,255,255,0.012);
}

.location-oval__label {
  font-family: var(--ff-sans);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.location-oval__rule {
  width: 32px;
  height: 1px;
  background: rgba(255,255,255,0.18);
  margin: 0 auto;
}

.location-oval__venue {
  font-family: var(--ff-disp);
  font-style: italic;
  font-size: clamp(1.05rem, 4.2vw, 1.25rem);
  font-weight: 400;
  color: var(--white);
  line-height: 1.3;
}

.location-oval__addr {
  font-family: var(--ff-sans);
  font-size: 0.72rem;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.75;
}

.location-oval__btn {
  display: inline-block;
  margin-top: 0.4rem;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 100px;
  padding: 0.55rem 1.3rem;
  font-family: var(--ff-sans);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.location-oval__btn:hover {
  border-color: rgba(255,255,255,0.5);
  color: var(--white);
  background: rgba(255,255,255,0.07);
}

/* ================================================================
   SCHEDULE
================================================================ */
.schedule-list {
  list-style: none;
  width: 100%;
  max-width: 360px;
  position: relative;
}

/* vertical timeline line */
.schedule-list::before {
  content: '';
  position: absolute;
  left: 54px;
  top: 6px; bottom: 6px;
  width: 1px;
  background: linear-gradient(to bottom,
    transparent, rgba(255,255,255,0.14) 10%,
    rgba(255,255,255,0.14) 90%, transparent);
}

.schedule-item {
  display: grid;
  grid-template-columns: 54px 14px 1fr;
  gap: 0 1rem;
  align-items: flex-start;
  margin-bottom: 2.4rem;
}
.schedule-item:last-child { margin-bottom: 0; }

.schedule-item__time {
  font-family: var(--ff-disp);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--white);
  text-align: right;
  line-height: 1.3;
  padding-top: 0.05rem;
}

.schedule-item__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.35);
  background: var(--dark);
  margin-top: 0.28rem;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.schedule-item__title {
  font-family: var(--ff-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

.schedule-item__desc {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.65;
}

/* ================================================================
   FULL-WIDTH PHOTO DIVIDER (decor3.jpg)
================================================================ */
.full-photo {
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.full-photo__img {
  width: 100%;
  height: min(126vw, 580px);
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

/* ================================================================
   GIFTS
================================================================ */
.icon-wrap {
  margin-bottom: 1.6rem;
  opacity: 0.65;
}

/* ================================================================
   RSVP FORM
================================================================ */
.rsvp-section { padding-bottom: 4rem; }

.rsvp-form {
  width: 100%; max-width: 360px;
  display: flex; flex-direction: column;
  gap: 1.3rem;
}

.field-group {
  display: flex; flex-direction: column;
  gap: 0.5rem; text-align: left;
}

.field-label {
  font-family: var(--ff-sans);
  font-size: 0.58rem; font-weight: 600;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--text-dim);
}

.field-input, .field-textarea {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-family: var(--ff-sans);
  font-size: 0.85rem; font-weight: 300;
  color: var(--white);
  outline: none;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s;
  -webkit-appearance: none;
}
.field-input::placeholder,
.field-textarea::placeholder { color: rgba(255,255,255,0.22); }
.field-input:focus, .field-textarea:focus {
  border-color: rgba(255,255,255,0.35);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.05);
}
.field-input.error { border-color: #c05a5a; }
.field-textarea { resize: vertical; min-height: 78px; }

.radio-row { display: flex; flex-direction: column; gap: 0.65rem; }

.radio-pill { display: flex; align-items: center; cursor: pointer; }
.radio-pill input[type="radio"] { display: none; }
.radio-pill span {
  display: block; width: 100%;
  padding: 0.65rem 1.2rem;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 100px;
  font-family: var(--ff-sans);
  font-size: 0.78rem; font-weight: 400;
  color: var(--text-mid);
  text-align: center;
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.radio-pill input:checked + span {
  border-color: rgba(255,255,255,0.45);
  color: var(--white);
  background: rgba(255,255,255,0.07);
}

.submit-btn {
  margin-top: 0.4rem; width: 100%;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 100px; background: transparent;
  color: var(--white);
  font-family: var(--ff-sans);
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.26em; text-transform: uppercase;
  cursor: pointer;
  transition: background 0.35s, border-color 0.35s, transform 0.2s;
}
.submit-btn:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.5);
}
.submit-btn:active  { transform: scale(0.98); }
.submit-btn:disabled { opacity: 0.45; cursor: default; }

.rsvp-ok { display: none; flex-direction: column; align-items: center; gap: 1.1rem; padding: 2rem 0; }
.rsvp-ok.visible { display: flex; animation: fadeUp 0.6s var(--ease) both; }
.rsvp-ok__check {
  width: 52px; height: 52px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: var(--white);
}
.rsvp-ok__text {
  font-family: var(--ff-serif); font-style: italic;
  font-size: 1.05rem; font-weight: 300;
  color: var(--text-mid); text-align: center;
}

/* ================================================================
   FOOTER
================================================================ */
.site-footer {
  position: relative;
  min-height: 56vw; max-height: 280px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.footer__bg-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 30%;
}
.footer__overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.50);
}
.footer__content {
  position: relative; z-index: 1;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  gap: 0.4rem; padding: 2rem 1.5rem;
}
.footer__sup {
  font-family: var(--ff-sans);
  font-size: 0.58rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: rgba(255,255,255,0.55);
}
.footer__monogram { display: flex; align-items: center; }
.footer__monogram span:not(.footer__mono-bar) {
  font-family: var(--ff-disp);
  font-size: clamp(2.8rem, 13vw, 4.5rem);
  font-weight: 400; color: var(--white); line-height: 1;
}
.footer__mono-bar {
  display: block; width: 1px;
  height: clamp(2.2rem, 10vw, 3.5rem);
  background: rgba(255,255,255,0.4);
  margin: 0 clamp(0.6rem, 2.5vw, 1rem);
}
.footer__date {
  font-family: var(--ff-disp);
  font-style: italic;
  font-size: clamp(1.1rem, 5vw, 1.4rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.7);
  margin-top: 0.6rem;
}

/* ================================================================
   TOAST
================================================================ */
.toast {
  position: fixed; bottom: 1.4rem;
  left: 50%; transform: translateX(-50%) translateY(8px);
  background: #3a3a3a;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
  font-family: var(--ff-sans); font-size: 0.75rem;
  padding: 0.65rem 1.4rem; border-radius: 100px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  z-index: 9999; white-space: nowrap;
  max-width: 92vw; text-align: center;
}
.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ================================================================
   MUSIC BUTTON (floating, bottom-right)
================================================================ */
.music-btn {
  position: fixed;
  bottom: 1.6rem;
  right: 1.3rem;
  z-index: 300;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(30,30,30,0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Hidden until cover exits */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.3s ease, border-color 0.3s;
}

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

.music-btn:hover {
  border-color: rgba(255,255,255,0.45);
  color: var(--white);
  transform: scale(1.08);
}

.music-btn.playing {
  border-color: rgba(255,255,255,0.38);
  color: var(--white);
}

/* Animated ripple ring when playing */
.music-btn__ripple {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  opacity: 0;
  pointer-events: none;
}

.music-btn.playing .music-btn__ripple {
  animation: ripplePulse 2.2s ease-out infinite;
}

@keyframes ripplePulse {
  0%   { transform: scale(1);    opacity: 0.5; }
  100% { transform: scale(1.75); opacity: 0; }
}

/* ================================================================
   KEYFRAMES
================================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes numFlip {
  0%   { transform: translateY(-5px); opacity: 0.4; }
  100% { transform: none; opacity: 1; }
}
