/* ============================================
   Zhudro's Wedding — Styles (Darling-inspired)
   ============================================ */

/* ----- CSS Custom Properties ----- */
:root {
  /* Colors — softer, warmer palette */
  --bg: #FBF8F3;
  --bg-alt: #F7F3EC;
  --text: #2C1810;
  --text-light: #6B5B50;
  --gold: #C4A35A;
  --gold-light: #E8D5B5;
  --gold-soft: rgba(196, 163, 90, 0.15);
  --white: #FFFFFF;
  --border: rgba(44, 24, 16, 0.08);
  --shadow: rgba(44, 24, 16, 0.06);

  /* Fonts */
  --font-heading: 'Source Sans 3', Arial, sans-serif;
  --font-body: 'Source Sans 3', Arial, sans-serif;
  --font-script: 'Great Vibes', cursive;

  /* Spacing */
  --section-py: 100px;
  --container-max: 1300px;
  --container-pad: 0 32px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 0.4s var(--ease);
}

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

html {
  scroll-behavior: auto;
}

/* Lenis smooth scroll */
html.lenis, html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}
.lenis.lenis-smooth iframe {
  pointer-events: none;
}

/* Thin scrollbar (like almaztan.vercel.app) */
::-webkit-scrollbar {
  width: 3px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background-color: var(--gold);
  border-radius: 2px;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 19px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ----- Container ----- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--container-pad);
}

/* ----- Navigation ----- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transform: translateY(0);
  transition: transform 0.4s var(--ease), background var(--transition), padding var(--transition);
}

.navbar.hidden {
  transform: translateY(-100%);
}

.navbar.scrolled {
  background: rgba(251, 248, 243, 0.92);
  backdrop-filter: blur(12px);
  padding: 12px 0;
  box-shadow: 0 1px 0 var(--border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--container-pad);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  width: 100%;
}

.nav-emblem {
  height: 36px;
  width: auto;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 15px;
  letter-spacing: 0.5px;
  color: var(--white);
  transition: color var(--transition);
}

.nav-links a:hover { color: var(--gold-light); }

.scrolled .nav-links a {
  color: var(--text-light);
}

.scrolled .nav-links a:hover { color: var(--gold); }

.nav-cta {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: var(--font-body) !important;
  font-size: 13px !important;
  letter-spacing: 1px !important;
  padding: 12px 24px !important;
  background: transparent !important;
  color: var(--white) !important;
  border: 1px solid var(--white) !important;
  border-radius: 50px !important;
  transition: all var(--transition) !important;
}

.scrolled .nav-cta {
  background: var(--gold) !important;
  color: var(--white) !important;
  border-color: var(--gold) !important;
}

.nav-cta:hover {
  /* text-slide handled by .btn-label below */
}

@media (min-width: 769px) {
  .nav-cta-li {
    margin-left: auto;
  }
}

/* Мобильная кнопка в шапке; .nav-cta даёт display:inline-flex !important — без двойного класса она бы показывалась на десктопе */
.nav-cta.nav-cta-bar-mobile {
  display: none !important;
  position: relative;
  z-index: 1001;
  text-decoration: none;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 1.5px;
  background: var(--white);
  transition: var(--transition);
  border-radius: 1px;
}

.scrolled .nav-toggle span {
  background: var(--text);
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ----- Hero (photo background, full-width names) ----- */
.hero {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

/* Spacer matching hero height so content scrolls over it */
.hero-spacer {
  height: 100vh;
}

/* Content wrapper slides over the fixed hero */
.page-content {
  position: relative;
  z-index: 2;
  background: var(--bg);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(44, 24, 16, 0.3) 0%,
    rgba(44, 24, 16, 0.6) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 40px 40px;
}

.hero-bottom {
  width: 100%;
}

.hero-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 10px;
}

.hero-script {
  font-family: var(--font-script);
  font-size: clamp(22px, 3vw, 34px);
  color: rgba(255,255,255,0.9);
  text-align: left;
  flex: 1;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.3s forwards;
}

.hero-names {
  font-family: var(--font-script);
  /* Линейный масштаб от ~100px до 210px по ширине 1280px; при большей ширине — плато 210px (не проваливается между 1600 и 1280, как при 13vw) */
  font-size: clamp(100px, calc(210 * 100vw / 1280), 210px);
  font-weight: 400;
  line-height: 1.1;
  color: var(--white);
  width: auto;
  float: right;
  white-space: nowrap;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.6s forwards;
}

@media (min-width: 769px) {
  .hero-names-br {
    display: none;
  }
}

.hero-date {
  font-family: var(--font-heading);
  font-size: clamp(14px, 2vw, 20px);
  letter-spacing: 4px;
  text-transform: none;
  font-style: italic;
  color: var(--gold-light);
  text-align: center;
  flex: 1;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.9s forwards;
}

.hero-invite {
  font-size: clamp(16px, 1.8vw, 20px);
  font-style: italic;
  color: rgba(255,255,255,0.8);
  text-align: right;
  flex: 1;
  line-height: 1.5;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 1.1s forwards;
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 42px;
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  border-radius: 50px;
}

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

.btn-white:hover {
  background: rgba(255,255,255,0.85);
  transform: translateY(-1px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

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

.btn-gold:hover {
  box-shadow: 0 4px 24px rgba(196, 163, 90, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--gold);
  border-radius: 50px;
}

.btn-outline:hover {
  border-color: var(--gold);
}

/* Button text slide — on hover, current text slides up, new text appears from below */
.btn-label {
  position: relative;
  display: inline-block;
  overflow: hidden;
  line-height: 1;
  vertical-align: middle;
}

.btn-label-inner {
  display: block;
  transition: transform 0.4s var(--ease);
}

.btn-label-inner:last-child {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
}

.btn:hover .btn-label-inner:first-child,
.nav-cta:hover .btn-label-inner:first-child {
  transform: translateY(-101%);
}

.btn:hover .btn-label-inner:last-child,
.nav-cta:hover .btn-label-inner:last-child {
  transform: translateY(-100%);
}

/* ----- Section Divider ----- */
.section-divider {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto 24px;
  opacity: 0.5;
}

/* ----- Sections General ----- */
.section {
  padding: var(--section-py) 0;
  background: var(--bg);
  position: relative;
  z-index: 2;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-family: var(--font-script);
  font-size: clamp(34px, 4.5vw, 52px);
  text-align: center;
  color: var(--text);
  margin-bottom: 12px;
  font-weight: 400;
}

.section-subtitle {
  text-align: center;
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 48px;
  font-style: italic;
}

/* ----- Venue — photos on top, info below ----- */
.venue-photos-wide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 100%;
  margin: 0 auto 48px;
}

.venue-photo-item {
  overflow: hidden;
}

.venue-photo-wide-img {
  width: 100%;
  height: 450px;
  object-fit: cover;
  display: block;
}

.venue-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 100%;
  margin: 0 auto;
}

.venue-info-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.venue-info-text {
  text-align: left;
}

.venue-info-card .btn {
  padding: 14px 24px;
  white-space: nowrap;
}

/* ----- Venue Redesign — split layout (photo right, info left) ----- */
.venue-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 100%;
  align-items: start;
}

/* Левый блок (черта + текст) по вертикали по центру относительно фото */
#venue .venue-split {
  align-items: center;
}

.venue-split-image {
  position: relative;
  height: 750px;
  overflow: hidden;
  box-shadow: 0 12px 48px var(--shadow);
  order: 2;
}

.venue-slider {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.venue-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  filter: blur(14px);
  transform: scale(1.03);
  transition:
    opacity 0.65s var(--ease),
    filter 0.65s var(--ease),
    transform 0.65s var(--ease);
  pointer-events: none;
  z-index: 0;
}

.venue-slide.active {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .venue-slide {
    filter: none;
    transform: none;
    transition-duration: 0.25s;
  }

  .venue-slide.active {
    transform: none;
  }
}

.venue-split-info {
  display: flex;
  flex-direction: column;
  order: 1;
}

.venue-split-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px 0;
}

.venue-split-card + .venue-split-card {
  border-top: 1px solid var(--border);
}

.venue-split-text {
  flex: 1;
}

.venue-split-card .venue-name {
  margin-bottom: 0;
  font-size: 20px;
}

.venue-split-card .venue-address {
  margin-bottom: 0;
  font-size: 16px;
}

#venue .venue-split-text {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#venue .venue-split-card {
  gap: 28px;
  padding: 48px 0;
}

.venue-split-card .btn {
  padding: 12px 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

#venue .section-title {
  text-align: left;
  max-width: 100%;
  width: 100%;
  margin-bottom: 24px;
}

#venue .venue-split-intro {
  margin-bottom: 48px;
}

#venue .venue-split-intro p {
  max-width: 38em;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-light);
}

#venue .section-divider {
  margin-left: 0;
  margin-right: auto;
  margin-bottom: 24px;
}

.venue-name {
  font-family: var(--font-heading);
  font-size: 24px;
  margin-bottom: 10px;
  font-weight: 600;
}

.venue-address {
  font-size: 17px;
  color: var(--text-light);
  margin-bottom: 6px;
  line-height: 1.6;
}

.venue-address:last-of-type {
  margin-bottom: 24px;
}

/* ----- Schedule / Timeline ----- */
.timeline {
  max-width: 600px;
  margin: 0 auto;
}

.timeline-item {
  display: flex;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.timeline-item:first-child {
  border-top: 1px solid var(--border);
}

.timeline-time {
  flex: 0 0 80px;
  font-family: var(--font-heading);
  font-size: 22px;
  color: var(--gold);
  letter-spacing: 0.5px;
  font-weight: 600;
}

.timeline-content h3 {
  font-family: var(--font-heading);
  font-size: 19px;
  margin-bottom: 4px;
  font-weight: 600;
}

.timeline-content p {
  color: var(--text-light);
  font-size: 17px;
}

/* ----- Cards (Dress Code, Registry, etc) ----- */
.card-simple {
  max-width: 550px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.9;
  font-size: 19px;
  color: var(--text-light);
}

/* ----- Photos ----- */
.photos-content {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}

.photos-text {
  font-size: 19px;
  line-height: 1.8;
  margin-bottom: 16px;
  color: var(--text-light);
}

.photos-hint {
  font-style: italic;
  color: var(--text-light);
  font-size: 16px;
}

/* ----- RSVP Form ----- */
.rsvp-form {
  max-width: 480px;
  margin: 0 auto;
}

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

.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-size: 14px;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  color: var(--text);
}

.label-note {
  font-family: var(--font-body);
  font-size: 13px;
  font-style: italic;
  color: var(--text-light);
  letter-spacing: 0;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 18px;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: var(--white);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

.rsvp-form .btn {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 8px;
}

/* ----- Registry QR ----- */
.registry-qr {
  text-align: center;
  margin-top: 40px;
}

.registry-qr-img {
  display: inline-block;
  width: 120px;
  height: auto;
  opacity: 0.7;
}

/* ----- Contact ----- */
.contact-info {
  text-align: center;
}

.contact-info p {
  font-size: 19px;
  margin-bottom: 8px;
  color: var(--text-light);
}

.contact-info a {
  color: var(--text);
  transition: color var(--transition);
  border-bottom: 1px solid transparent;
}

.contact-info a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ----- Footer ----- */
.footer {
  background: var(--text);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 56px 0;
}

.footer-text {
  font-family: var(--font-heading);
  font-size: 15px;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.5);
}

.footer-heart {
  display: inline-block;
  color: var(--gold);
  margin: 0 4px;
}

/* ----- Animations ----- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  :root {
    --section-py: 72px;
    --container-pad: 0 24px;
  }

  body { font-size: 17px; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(251, 248, 243, 0.98);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    transition: right 0.4s var(--ease);
    backdrop-filter: blur(12px);
  }

  .nav-links.show {
    right: 0;
    gap: clamp(40px, 7vh, 64px);
  }

  /* Оверлей: стили не на .show — иначе при закрытии они пропадают до конца transition right */
  .navbar .nav-links a {
    font-family: var(--font-script);
    font-size: clamp(40px, 10vw, 64px);
    font-weight: 400;
    letter-spacing: 0.03em;
    line-height: 1.15;
    color: var(--text);
  }

  .navbar .nav-links a:hover {
    color: var(--gold);
  }

  /* Пока меню открыто — бургер и «Я приду» в шапке тёмные (читаемы на светлом фоне) */
  .nav-container:has(.nav-links.show) .nav-toggle span {
    background: var(--text);
  }

  .nav-container:has(.nav-links.show) .nav-cta.nav-cta-bar-mobile {
    background: transparent !important;
    color: var(--text) !important;
    border-color: var(--text) !important;
  }

  .nav-container:has(.nav-links.show) .nav-cta.nav-cta-bar-mobile:hover {
    color: var(--gold) !important;
    border-color: var(--gold) !important;
  }

  .nav-cta {
    font-size: 13px !important;
    padding: 12px 32px !important;
  }

  .nav-container {
    justify-content: space-between;
    align-items: center;
  }

  .nav-cta.nav-cta-bar-mobile {
    display: inline-flex !important;
  }

  .nav-cta-li {
    display: none;
  }

  .nav-links {
    z-index: 1000;
  }

  .nav-toggle { display: flex; }

  /* Hero: колонка, приглашение под именами, типографика по центру */
  .hero-content {
    padding: 0 24px 32px;
  }

  .hero-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }

  .hero-top-row {
    display: contents;
  }

  .hero-script {
    flex: none;
    width: 100%;
    text-align: center;
    order: 1;
    font-size: clamp(28px, 5.5vw, 36px);
  }

  .hero-date {
    flex: none;
    width: 100%;
    text-align: center;
    order: 2;
    font-size: clamp(18px, 3.2vw, 24px);
    letter-spacing: 3px;
  }

  .hero-invite {
    flex: none;
    width: 100%;
    text-align: center;
    order: 4;
  }

  .hero-names {
    order: 3;
    float: none;
    width: 90%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    white-space: normal;
    position: relative;
    left: -28px;
  }

  .venue-photos-wide {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .venue-photo-wide-img { height: 240px; }

  .venue-info-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .venue-info-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .timeline-item {
    flex-direction: column;
    gap: 8px;
    padding: 24px 0;
  }

  .timeline-time {
    flex: none;
    font-size: 20px;
  }

  .section-subtitle {
    margin-bottom: 36px;
  }

  /* Venue split */
  .venue-split {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .venue-split-image {
    height: 400px;
  }

  .venue-split-info {
    padding-top: 0;
    gap: 28px;
  }

  #venue .section-divider {
    margin-left: auto;
    margin-right: auto;
  }

  #venue .section-title {
    text-align: center;
  }

  #venue .venue-split-intro {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  #venue .venue-split-intro p {
    text-align: center;
    max-width: 100%;
  }

  #venue .venue-split-card {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    gap: 20px;
    padding-top: 32px;
    padding-bottom: 32px;
  }

  #venue .venue-split-text {
    align-items: center;
    width: 100%;
  }

  #venue .venue-split-card .venue-name,
  #venue .venue-split-card .venue-address {
    text-align: center;
  }

  #venue .venue-split-card .btn {
    flex-shrink: 0;
    margin-top: 4px;
  }
}

@media (max-width: 480px) {
  :root {
    --section-py: 56px;
  }

  .hero { height: 100dvh; }
  .hero-spacer { height: 100dvh; }
  .venue-photo-wide-img { height: 220px; }

  .rsvp-form { max-width: 100%; }
}
