/* ===== FONTS (Mix = набор кастомных woff, CirceRounded) ===== */
@font-face { font-family:'Mix'; src:url('../fonts/Bickham_Script_Pro_3.woff') format('woff'); font-weight:100; font-style:normal; }
@font-face { font-family:'Mix'; src:url('../fonts/rosamundatwo.woff') format('woff'); font-weight:200; font-style:normal; }
@font-face { font-family:'Mix'; src:url('../fonts/TrajanPro3-Regular.woff') format('woff'); font-weight:300; font-style:normal; }
@font-face { font-family:'Mix'; src:url('../fonts/MyPlayfairDisplayFin.woff') format('woff'); font-weight:400; font-style:normal; }
@font-face { font-family:'Mix'; src:url('../fonts/SaintViet-Regular.woff') format('woff'); font-weight:500; font-style:normal; }
@font-face { font-family:'Mix'; src:url('../fonts/AgoniaLyubviRegular.woff') format('woff'); font-weight:600; font-style:normal; }
@font-face { font-family:'Mix'; src:url('../fonts/MyCormorant-Regular.woff') format('woff'); font-weight:700; font-style:normal; }
@font-face { font-family:'Mix'; src:url('../fonts/SmithenScript-Regula.woff') format('woff'); font-weight:800; font-style:normal; }

/* CirceRounded — Google Nunito как ближайший публичный аналог */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;500&display=swap');

:root {
  --font-headline: 'Mix', Arial, sans-serif;
  --font-text: 'Nunito', Arial, sans-serif;

  /* Цветовая схема сайта 1 */
  --color-bg: #efeae3;
  --color-bg-section: #ffffff;
  --color-bg-dark: #1a1612;
  --color-accent: #7aae89;
  --color-accent-dark: #5a9470;
  --color-accent-light: rgba(122,174,137,0.12);
  --color-text: #1a1612;
  --color-text-light: #6b5e54;
  --color-border: #d9cfc4;
  --color-white: #ffffff;

  --radius-sm: 2px;
  --radius: 4px;
  --radius-lg: 8px;
  --transition: 0.35s cubic-bezier(.25,1,.5,1);
  --shadow: 0 4px 32px rgba(26,22,18,0.10);
  --shadow-hover: 0 8px 48px rgba(26,22,18,0.18);

  /* Конверт */
  --envelope-bg: #1e3326;
  --envelope-bg2: #2d4a35;
  --envelope-gold: #c9923a;
  --envelope-gold-light: #e8b96a;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  background-color: var(--color-bg);
  background-image: url('../images/list.jpg');
  background-repeat: repeat;
  background-size: 420px auto;
  color: var(--color-text);
  font-family: var(--font-headline);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.65;
  overflow: hidden;
}

.hidden { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; }

/* ===== SCROLL ANIMATIONS ===== */
[data-anim] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(.25,1,.5,1), transform 0.7s cubic-bezier(.25,1,.5,1);
}
[data-anim="left"] { transform: translateX(-40px); }
[data-anim="right"] { transform: translateX(40px); }
[data-anim="scale"] { transform: scale(0.92); }
[data-anim="fade"] { transform: none; }
[data-anim].anim-visible {
  opacity: 1;
  transform: none;
}
[data-anim-delay="1"] { transition-delay: 0.1s; }
[data-anim-delay="2"] { transition-delay: 0.2s; }
[data-anim-delay="3"] { transition-delay: 0.3s; }
[data-anim-delay="4"] { transition-delay: 0.45s; }
[data-anim-delay="5"] { transition-delay: 0.6s; }

/* ===== ENVELOPE (старые стили — перенесены ниже) ===== */
/* Смотри блок "ENVELOPE v2" */

/* ===== MAIN SITE ===== */
.main-site { min-height: 100vh; }

/* ===== MUSIC PLAYER ===== */
.music-player {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.90);
  border: 1px solid var(--color-border);
  border-radius: 50px;
  padding: 7px 16px 7px 7px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.music-btn {
  background: var(--color-accent);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.music-btn:hover { background: var(--color-accent-dark); transform: scale(1.08); }
.music-icon { width: 18px; height: 18px; filter: brightness(0) invert(1); }

.music-title {
  font-family: var(--font-text);
  font-size: 11px;
  color: var(--color-text-light);
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.04em;
}

/* ===== SECTIONS ===== */
.section {
  padding: 96px 24px;
  position: relative;
  background: url('../images/list.jpg') repeat 0 0 / 420px auto;
}

.section:nth-child(even) {
  background: url('../images/list.jpg') repeat 0 0 / 420px auto;
}

/* Полупрозрачный оверлей для читаемости текста */
.section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(239, 234, 227, 0.72);
  pointer-events: none;
  z-index: 0;
}

.section:nth-child(even)::before {
  background: rgba(255, 255, 255, 0.72);
}

.section-inner {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
}

/* Декоративный разделитель */
.section::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 1px;
  background: var(--color-border);
}

.section-final::after, .section-hero::after { display: none; }
.section-final::before, .section-hero::before { display: none; }

.section-title {
  font-family: var(--font-headline);
  font-size: clamp(80px, 14vw, 140px);
  font-weight: 100; /* Bickham Script */
  color: var(--color-text);
  text-align: center;
  margin-bottom: 48px;
  letter-spacing: 0.04em;
  line-height: 0.95;
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  background: var(--color-accent);
  margin: 16px auto 0;
}

.section-photo {
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.section-photo-center {
  margin: 48px auto 0;
  max-height: 560px;
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}

.section-photo-center:hover { box-shadow: var(--shadow-hover); }

/* Фото 2-7 — по ширине с сохранением пропорций */
.section-photo-square {
  display: block;
  margin: 48px auto 0;
  width: 100%;
  max-width: 960px;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}

.section-photo-square:hover { box-shadow: var(--shadow-hover); }

.section-photo-right {
  float: right;
  margin: 0 0 28px 36px;
  max-width: 360px;
  width: 44%;
  object-fit: cover;
  max-height: 440px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}

.section-photo-right:hover { box-shadow: var(--shadow-hover); }

.section-photo-left {
  float: left;
  margin: 0 36px 28px 0;
  max-width: 360px;
  width: 44%;
  object-fit: cover;
  max-height: 440px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}

.section-photo-left:hover { box-shadow: var(--shadow-hover); }

/* ===== HERO ===== */
.section-hero {
  padding: 0;
  background: transparent;
}

.section-hero::after { display: none; }

/* Фото — верхний блок */
.hero-photo-wrap {
  position: relative;
  width: 100%;
  line-height: 0;
  background: linear-gradient(rgba(239,234,227,0.72), rgba(239,234,227,0.72)), url('../images/list.jpg') repeat 0 0 / 420px auto;
  padding: 0;
  text-align: center;
}

.hero-photo {
  display: none;
}

/* Torn paper edge — SVG снизу блока */
.hero-torn-edge {
  position: relative;
  bottom: auto;
  left: 0;
  width: 100%;
  line-height: 0;
  margin-top: -2px;
}

.hero-torn-edge svg {
  display: block;
  width: 100%;
  height: clamp(30px, 5vw, 60px);
}

/* Текстовый блок под фото */
.hero-text-block {
  background: linear-gradient(rgba(239,234,227,0.72), rgba(239,234,227,0.72)), url('../images/list.jpg') repeat 0 0 / 420px auto;
  text-align: center;
  padding: 40px 24px 64px;
}

.hero-names {
  font-family: var(--font-headline);
  font-size: clamp(36px, 9vw, 80px);
  font-weight: 300; /* Trajan */
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text);
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero-date {
  font-family: var(--font-headline);
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 100;
  letter-spacing: 0.04em;
  color: var(--color-text);
  margin-bottom: 12px;
  line-height: 1.2;
}

.hero-tagline {
  font-family: var(--font-headline);
  font-weight: 100;
  font-size: clamp(40px, 7vw, 72px);
  color: var(--color-text-light);
  letter-spacing: 0.04em;
  margin-bottom: 24px;
  line-height: 1.2;
}

.hero-scroll-hint {
  font-family: var(--font-text);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-light);
  opacity: 0.7;
}

/* ===== GREETING ===== */
.section-greeting .section-inner { text-align: center; }

.greeting-text p {
  margin-bottom: 18px;
  font-size: clamp(16px, 1.9vw, 20px);
  font-family: var(--font-headline);
  font-weight: 300;
  color: var(--color-text);
}

.greeting-text p:first-child {
  font-family: var(--font-headline);
  font-size: clamp(16px, 1.9vw, 20px);
  font-weight: 300;
  color: var(--color-text);
  margin-bottom: 28px;
  line-height: 1.3;
}

/* ===== CALENDAR ===== */
.calendar-wrap {
  max-width: 520px;
  margin: 0 auto;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow);
}

.calendar-month {
  text-align: center;
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 28px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.cal-header {
  font-family: var(--font-text);
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-light);
  letter-spacing: 0.06em;
  padding: 4px 0 8px;
}

.cal-day, .cal-empty {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-text);
  font-size: 14px;
  color: var(--color-text);
  border-radius: 50%;
  margin: 1px auto;
  transition: background var(--transition), color var(--transition);
}

.cal-day:hover { background: var(--color-accent-light); }

.cal-highlight {
  background: transparent;
  color: #c0392b;
  font-weight: 700;
  box-shadow: none;
  position: relative;
  z-index: 0;
}

.cal-highlight::before {
  content: '';
  position: absolute;
  inset: -2px;
  z-index: -1;
  background: transparent;
  /* CSS-сердечко через clip-path */
  clip-path: path('M19 3 C14 3 9 7 9 12 C9 7 4 3 -1 3 C-7 3 -12 8 -12 14 C-12 22 -1 30 9 38 C19 30 30 22 30 14 C30 8 25 3 19 3 Z');
  /* fallback — SVG data-uri */
  background-image: none;
}

/* Сердечко через outline SVG поверх числа */
.cal-highlight {
  --heart-size: 38px;
}

@supports (clip-path: path('M0,0')) {
  .cal-highlight {
    background: transparent;
  }
}

/* Используем ::after для обводки сердца (SVG) */
.cal-highlight::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Cpath d='M18 32 C18 32 3 22 3 12 C3 7 7 3 12 3 C14.5 3 17 4 18 6 C19 4 21.5 3 24 3 C29 3 33 7 33 12 C33 22 18 32 18 32 Z' fill='none' stroke='%23c0392b' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat;
  width: 100%;
  height: 100%;
}

@keyframes pulse-cal {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

.cal-highlight::after {
  animation: pulse-cal 2.2s ease-in-out infinite;
}

/* ===== LOCATION ===== */
.section-location .section-inner { text-align: center; }

.location-text {
  font-size: clamp(16px, 1.9vw, 20px);
  font-family: var(--font-headline);
  font-weight: 300;
  margin-bottom: 32px;
  line-height: 1.7;
}

/* ===== TIMING ===== */

.timing-list {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.timing-card {
  text-align: center;
  padding: 28px 24px 8px;
  width: 100%;
}

.timing-card-last { padding-bottom: 0; }

.timing-time {
  font-family: var(--font-headline);
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 300; /* Trajan */
  color: var(--color-text);
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}

.timing-desc-main {
  font-family: var(--font-text);
  font-size: clamp(14px, 2.5vw, 18px);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 6px;
}

.timing-desc-sub {
  font-family: var(--font-text);
  font-size: clamp(13px, 1.8vw, 15px);
  color: var(--color-text-light);
  line-height: 1.5;
  max-width: 320px;
  margin: 0 auto;
}

.timing-arrow {
  font-size: 20px;
  color: var(--color-border);
  margin-top: 16px;
  line-height: 1;
}

/* ===== DRESSCODE ===== */
.dresscode-text {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  font-size: clamp(16px, 1.9vw, 20px);
  font-family: var(--font-headline);
  font-weight: 300;
  color: var(--color-text-light);
  font-style: normal;
  line-height: 1.8;
}

/* ===== GIFTS ===== */
.section-gifts .section-inner { text-align: center; }

.gifts-subtitle {
  font-family: var(--font-headline);
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 20px;
  line-height: 1.4;
}

.gifts-content p {
  margin-bottom: 18px;
  font-size: clamp(15px, 1.8vw, 18px);
  font-family: var(--font-headline);
  font-weight: 300;
  line-height: 1.75;
}

/* ===== ORGANIZERS ===== */
.organizers-intro {
  text-align: center;
  margin-bottom: 48px;
  font-style: normal;
  font-family: var(--font-headline);
  font-weight: 300;
  color: var(--color-text-light);
  font-size: clamp(15px, 1.8vw, 18px);
}

.organizers-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.organizer-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.organizer-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.organizer-role {
  font-family: var(--font-text);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.organizer-name {
  font-family: var(--font-headline);
  font-size: 24px;
  font-weight: 400; /* Playfair */
  margin-bottom: 8px;
  color: var(--color-text);
}

.organizer-phone {
  font-family: var(--font-text);
  font-size: 15px;
  color: var(--color-text-light);
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}

.organizer-contacts {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.contact-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.contact-btn:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  transform: scale(1.1);
}

.contact-btn:hover img { filter: brightness(0) invert(1); }
.contact-btn img { width: 18px; height: 18px; }

/* ===== VK ===== */
.section-vk { text-align: center; }
.section-vk p {
  max-width: 620px;
  margin: 0 auto 36px;
  font-size: clamp(15px, 1.8vw, 18px);
  font-family: var(--font-headline);
  font-weight: 300;
}

/* ===== TIMER ===== */
.section-timer { text-align: center; }

.timer-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  margin-bottom: 56px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.timer-unit {
  text-align: center;
  padding: 28px 20px;
  flex: 1;
  min-width: 90px;
}

.timer-value {
  display: block;
  font-family: var(--font-headline);
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 300; /* Trajan */
  color: var(--color-accent);
  line-height: 1;
  letter-spacing: 0.02em;
}

.timer-label {
  display: block;
  font-family: var(--font-text);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-top: 6px;
}

.timer-sep {
  font-family: var(--font-headline);
  font-size: clamp(36px, 5vw, 60px);
  color: var(--color-border);
  line-height: 1;
  padding-bottom: 20px;
  align-self: flex-end;
}

.timer-photo {
  max-height: 440px;
  margin-top: 48px;
}

/* ===== FORM ===== */
.section-form { background: rgba(239,234,227,0.93); color: var(--color-text); }
.section-form .section-title { color: var(--color-text); }

.form-intro {
  text-align: center;
  font-family: var(--font-headline);
  font-weight: 300;
  font-style: normal;
  color: var(--color-text-light);
  margin-bottom: 48px;
  font-size: clamp(15px, 1.8vw, 19px);
  letter-spacing: 0.06em;
}

.guest-form {
  max-width: 620px;
  margin: 0 auto;
}

.form-group { margin-bottom: 32px; }

.form-label {
  display: block;
  font-family: var(--font-headline);
  font-size: clamp(13px, 1.8vw, 16px);
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 12px;
  line-height: 1.5;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--color-white);
  border: 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  color: var(--color-text);
  font-family: var(--font-text);
  font-size: 16px;
  padding: 14px 0;
  transition: border-color var(--transition);
  outline: none;
  appearance: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-bottom-color: var(--color-accent);
}

.form-input::placeholder, .form-textarea::placeholder {
  color: var(--color-text-light);
  opacity: 0.5;
}

.form-select option { background: var(--color-white); color: var(--color-text); }
.form-textarea { min-height: 100px; resize: vertical; }
.form-textarea-sm { min-height: 60px; resize: vertical; }

.radio-group, .checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.radio-label, .checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: var(--font-text);
  font-size: 14px;
  color: var(--color-text);
  padding: 9px 18px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 50px;
  transition: background var(--transition), border-color var(--transition);
  user-select: none;
}

.radio-label:hover, .checkbox-label:hover {
  background: var(--color-accent-light);
  border-color: var(--color-accent);
}

.radio-label input:checked + span,
.checkbox-label input:checked + span {
  color: var(--color-accent);
}

.radio-label:has(input:checked),
.checkbox-label:has(input:checked) {
  background: var(--color-accent-light);
  border-color: var(--color-accent);
}

.radio-label input, .checkbox-label input { accent-color: var(--color-accent); }

.form-submit { width: 100%; margin-top: 8px; }

.form-message {
  margin-top: 18px;
  text-align: center;
  font-family: var(--font-text);
  font-size: 14px;
  min-height: 20px;
}

.form-message.success { color: #3a8a3e; }
.form-message.error { color: #c0392b; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 16px 44px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(122,174,137,0.38);
}

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
}

.btn-outline:hover {
  background: var(--color-accent);
  color: var(--color-white);
  transform: translateY(-2px);
}

/* ===== FINAL ===== */
.section-final {
  background: linear-gradient(rgba(170,203,170,0.82), rgba(170,203,170,0.82)), url('../images/list.jpg') repeat 0 0 / 420px auto;
  text-align: center;
  padding: 120px 24px;
}

.section-final::after { display: none; }

.final-text {
  font-family: var(--font-headline);
  font-size: clamp(36px, 7vw, 72px);
  font-weight: 100; /* Bickham */
  color: var(--color-text);
  margin-bottom: 18px;
  line-height: 1.2;
}

.final-sign {
  font-family: var(--font-headline);
  font-weight: 300; /* Trajan */
  font-size: clamp(16px, 2.5vw, 24px);
  color: var(--color-text);
  letter-spacing: 0.1em;
}

/* ===== FILM FRAME (первое фото в рамке) ===== */
.film-frame-wrap {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.film-frame-bg {
  display: none;
}

.film-frame-photo {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: auto;
  max-height: 80vh;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  position: relative;
  z-index: 1;
  padding-bottom: 0;
  margin: 0;
}

/* ===== ENVELOPE v2 — письмо выдвигается ===== */
.envelope-section {
  position: fixed;
  inset: 0;
  background-image: url('../images/list.jpg');
  background-repeat: repeat;
  background-size: 420px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  cursor: pointer;
  overflow-y: auto;
  padding: 5vh 16px;
}

/* ===== ENVELOPE ===== */

.envelope-outer {
  position: relative;
  width: min(720px, 90vw);
  filter: drop-shadow(0 20px 56px rgba(0,0,0,0.45));
}

/* Корпус конверта — overflow:hidden скрывает письмо пока оно внизу */
.envelope-wrap {
  position: relative;
  width: 100%;
  border-radius: 3px;
  overflow: hidden;
}

.envelope-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
}

/*
  Письмо — абсолютно внутри .envelope-wrap.
  Закрыто: translateY(110%) — полностью за нижней границей враппера (не видно).
  Открыто: translateY(-50%) translateX(-50%) — по центру конверта (left:50%, top:50%).
*/
.envelope-letter {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(110%);
  width: 84%;
  background: #faf7f2;
  border: 1px solid #e8ddd0;
  border-radius: 2px;
  padding: clamp(20px, 4vw, 48px) clamp(24px, 5vw, 60px);
  text-align: center;
  z-index: 3;
  transition: transform 0.85s cubic-bezier(.25,1,.5,1);
  box-shadow: 0 4px 32px rgba(0,0,0,0.18);
}

/* Открытое: письмо по центру конверта */
.envelope-opened .envelope-letter {
  transform: translateX(-50%) translateY(-50%);
}

.envelope-letter-monogram {
  font-family: var(--font-headline);
  font-weight: 100;
  font-size: clamp(64px, 14vw, 110px);
  color: var(--envelope-gold);
  line-height: 1;
  text-shadow: 0 2px 12px rgba(201,146,58,0.4);
  margin-bottom: clamp(12px, 3vw, 22px);
  letter-spacing: 0.06em;
}

.envelope-letter-date {
  font-family: var(--font-headline);
  font-weight: 300;
  font-size: clamp(14px, 2.8vw, 22px);
  color: var(--color-text-light);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.envelope-letter-line {
  width: 60px;
  height: 1px;
  background: var(--envelope-gold);
  margin: clamp(12px, 3vw, 22px) auto;
  opacity: 0.6;
}

.envelope-letter-title {
  font-family: var(--font-headline);
  font-weight: 100;
  font-size: clamp(26px, 5vw, 46px);
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: clamp(8px, 2vw, 14px);
}

/* Основной конверт-корпус — картинка av-envelope.png */
.envelope-body {
  position: relative;
  width: 100%;
  z-index: 2;
  border-radius: 3px;
  overflow: hidden;
}

/* Картинка конверта */
.envelope-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
}

/* Картинка конверта остаётся видимой всегда */
.envelope-opened .envelope-img { opacity: 1; }

.envelope-body::before { display: none; }

.envelope-flap { display: none; }
.top-flap { display: none; }
.bottom-flap { display: none; }

/* Кнопка перехода к сайту — появляется после открытия */
.envelope-proceed-btn {
  margin-top: clamp(24px, 4vw, 48px);
  font-family: var(--font-text);
  font-size: clamp(13px, 2vw, 17px);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text);
  background: rgba(250,247,242,0.92);
  border: 1px solid var(--color-border);
  border-radius: 50px;
  padding: 14px 40px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, background var(--transition), transform var(--transition);
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}

.envelope-proceed-btn:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.envelope-content {
  display: none;
}

.envelope-monogram {
  display: none;
}

.monogram-letter {
  display: none;
}

.monogram-ampersand {
  display: none;
}

.envelope-wax-seal {
  display: none;
}

.envelope-title {
  display: none;
}

.envelope-invite-text {
  display: none;
}

/* ===== AV MAIN IMAGE (конверт — новое фото по центру) ===== */
.av-main-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 0 clamp(24px, 4vw, 40px) 0;
}

.av-main-img {
  width: 50%;
  max-width: 560px;
  min-width: 200px;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-lg);
  display: block;
}

/* ===== TIMING PHOTO FRAMES ===== */
.timing-photo-frame {
  width: 300px;
  height: 200px;
  border-radius: 12px;
  border: 2px solid var(--color-accent);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 18px auto 0;
  overflow: hidden;
  position: relative;
}

.timing-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 980px) {
  .section { padding: 80px 20px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 64px 16px; }

  .section-photo-right, .section-photo-left {
    float: none;
    margin: 0 0 28px 0;
    width: 100%;
    max-width: 100%;
  }

  .film-frame-wrap { max-width: 96vw; }

  .timer-wrap { flex-wrap: wrap; margin-bottom: 0; }
  .timer-unit { padding: 20px 16px; min-width: 70px; }
  .timer-sep { display: none; }
  .timer-photo { margin-top: 32px; }

  .music-player { top: 10px; right: 10px; padding: 6px 12px 6px 6px; }
  .music-title { display: none; }

  .calendar-wrap { padding: 24px 12px; }
  .cal-day, .cal-empty { width: 30px; height: 30px; font-size: 12px; }

  .organizers-list { grid-template-columns: 1fr; }

  .envelope-wrap { width: 96vw; aspect-ratio: 1 / 1; }
  .av-main-img { width: 80%; }
  .timing-photo-frame { width: 100%; max-width: 280px; height: 160px; }

  .section-final { padding: 80px 16px; }
  .btn { padding: 14px 28px; font-size: 11px; }

  .timing-card { padding: 20px 16px 4px; }
}

@media (max-width: 400px) {
  .cal-day, .cal-empty { width: 26px; height: 26px; font-size: 11px; }
  .monogram-letter { font-size: 14vw; }
}
