/* ============================================
   Mediterranean Wedding — Даниил & Анастасия
   Art Direction: Warm earth tones, olive greens,
   terracotta accents, elegant serif + clean sans
   ============================================ */

/* --- Fonts --- */
/* Cormorant Garamond — elegant serif for headings
   Switzer — clean modern sans for body */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&display=swap');

/* --- Design Tokens --- */
:root {
  /* Typography */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Switzer', 'Helvetica Neue', sans-serif;

  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(3rem, 0.5rem + 7vw, 8rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Mediterranean Color Palette */
  --color-bg: #FAF8F3;
  --color-surface: #F5F1EA;
  --color-surface-warm: #EDE8DE;
  --color-text: #3D3427;
  --color-text-muted: #7A7062;
  --color-text-light: #A69D8F;
  --color-accent: #7A8B5E;          /* sage/olive green */
  --color-accent-light: #96A87A;
  --color-terracotta: #C4845C;       /* terracotta */
  --color-terracotta-light: #D9A882;
  --color-gold: #BFA46E;             /* warm gold */
  --color-gold-light: #D4C49B;
  --color-cream: #FDF9F0;
  --color-divider: #DDD6C8;
  --color-hero-overlay: rgba(61, 52, 39, 0.35);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 860px;
  --content-wide: 1100px;
}

/* --- Global Styles --- */
body {
  background-color: var(--color-bg);
  color: var(--color-text);
  overflow-x: hidden;
}

/* --- Nav --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-4) var(--space-6);
  display: flex;
  justify-content: center;
  gap: var(--space-8);
  background: rgba(250, 248, 243, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(221, 214, 200, 0.5);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.nav a {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color var(--transition-interactive);
  padding: var(--space-1) var(--space-2);
}

.nav a:hover {
  color: var(--color-text);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  height: 100dvh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(61, 52, 39, 0.15) 0%,
    rgba(61, 52, 39, 0.4) 50%,
    rgba(61, 52, 39, 0.55) 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  color: #FDF9F0;
  padding: var(--space-6);
}

.hero__date-top {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: var(--space-6);
}

.hero__names {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-4);
}

.hero__names .ampersand {
  display: block;
  font-style: italic;
  font-size: 0.5em;
  font-weight: 300;
  opacity: 0.7;
  margin: var(--space-2) 0;
}

.hero__location {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-top: var(--space-4);
}

.hero__scroll-hint {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: rgba(253, 249, 240, 0.6);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: gentle-bounce 2.5s ease-in-out infinite;
}

@keyframes gentle-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

.hero__scroll-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, rgba(253, 249, 240, 0.5), transparent);
}

/* --- Section Generic --- */
.section {
  padding: clamp(var(--space-16), 8vw, var(--space-32)) var(--space-6);
}

.section__inner {
  max-width: var(--content-default);
  margin-inline: auto;
}

.section__header {
  text-align: center;
  margin-bottom: clamp(var(--space-8), 4vw, var(--space-16));
}

.section__label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 300;
  color: var(--color-text);
  line-height: 1.1;
}

.section__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.section__divider-line {
  width: 48px;
  height: 1px;
  background: var(--color-divider);
}

.section__divider-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-gold);
}

/* --- Invitation Section --- */
.invitation {
  background: var(--color-cream);
  position: relative;
}

.invitation__card {
  background: #fff;
  border: 1px solid var(--color-divider);
  padding: clamp(var(--space-8), 5vw, var(--space-16));
  text-align: center;
  position: relative;
  max-width: 680px;
  margin-inline: auto;
}

.invitation__olive-img {
  width: 120px;
  height: auto;
  margin: 0 auto var(--space-6);
  opacity: 0.7;
}

.invitation__text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: var(--space-6);
}

.invitation__text em {
  font-style: italic;
  color: var(--color-terracotta);
}

.invitation__names {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.invitation__date {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.invitation__venue {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text-light);
  letter-spacing: 0.1em;
}

.invitation__note {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-style: italic;
  color: var(--color-text-muted);
  margin-top: var(--space-8);
  line-height: 1.6;
}

/* --- Dress Code Section --- */
.dresscode {
  background: var(--color-bg);
}

.dresscode__content {
  text-align: center;
  max-width: 600px;
  margin-inline: auto;
}

.dresscode__description {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: var(--space-8);
}

.dresscode__palette {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.dresscode__color {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.dresscode__swatch {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(221, 214, 200, 0.6);
  transition: transform var(--transition-interactive);
}

.dresscode__swatch:hover {
  transform: scale(1.08);
}

.dresscode__color-name {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--color-text-light);
  letter-spacing: 0.08em;
}

.dresscode__note {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 480px;
  margin-inline: auto;
}

.dresscode__icons {
  display: flex;
  justify-content: center;
  gap: var(--space-10);
  margin-bottom: var(--space-8);
}

.dresscode__icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.dresscode__icon-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid var(--color-divider);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-cream);
}

.dresscode__icon-circle svg {
  width: 28px;
  height: 28px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 1.5;
}

.dresscode__icon-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* --- Schedule Section --- */
.schedule {
  background: var(--color-surface);
  position: relative;
}

.schedule__timeline {
  max-width: 560px;
  margin-inline: auto;
  position: relative;
}

.schedule__timeline::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--color-divider) 10%,
    var(--color-divider) 90%,
    transparent
  );
}

.schedule__item {
  display: flex;
  gap: var(--space-6);
  padding: var(--space-6) 0;
  position: relative;
}

.schedule__item + .schedule__item {
  border-top: none;
}

.schedule__dot-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 56px;
}

.schedule__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-gold);
  border: 2px solid var(--color-surface);
  box-shadow: 0 0 0 2px var(--color-gold-light);
  position: relative;
  z-index: 1;
  margin-top: 4px;
}

.schedule__time {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-terracotta);
  letter-spacing: 0.05em;
  min-width: 56px;
  text-align: center;
  margin-top: var(--space-3);
}

.schedule__details {
  flex: 1;
  padding-top: 0;
}

.schedule__event-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.schedule__event-desc {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --- Monogram / Logo --- */
.monogram {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-4);
}

.monogram svg {
  width: 80px;
  height: 80px;
}

/* --- Footer --- */
.footer {
  background: var(--color-text);
  color: var(--color-surface);
  text-align: center;
  padding: clamp(var(--space-12), 5vw, var(--space-20)) var(--space-6);
}

.footer__monogram svg {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-6);
  opacity: 0.5;
}

.footer__text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 300;
  font-style: italic;
  opacity: 0.7;
  margin-bottom: var(--space-4);
}

.footer__date {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.4;
}

/* --- Scroll Animations --- */
.fade-in {
  opacity: 1;
}

@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 80%;
  }
}

@keyframes reveal-fade {
  to { opacity: 1; }
}

/* Staggered children */
.stagger > * {
  opacity: 1;
}

@supports (animation-timeline: scroll()) {
  .stagger > *:nth-child(1) { animation-delay: 0ms; }
  .stagger > *:nth-child(2) { animation-delay: 80ms; }
  .stagger > *:nth-child(3) { animation-delay: 160ms; }
  .stagger > *:nth-child(4) { animation-delay: 240ms; }
  .stagger > *:nth-child(5) { animation-delay: 320ms; }
  .stagger > *:nth-child(6) { animation-delay: 400ms; }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav {
    gap: var(--space-3);
    padding: var(--space-3) var(--space-3);
  }

  .nav a {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    white-space: nowrap;
  }

  .hero__names {
    font-size: clamp(2.5rem, 0.5rem + 10vw, 5rem);
  }

  .dresscode__palette {
    gap: var(--space-3);
  }

  .dresscode__swatch {
    width: 44px;
    height: 44px;
  }

  .dresscode__icons {
    gap: var(--space-6);
  }

  .dresscode__icon-circle {
    width: 60px;
    height: 60px;
  }

  .schedule__timeline::before {
    left: 24px;
  }

  .schedule__dot-col {
    width: 48px;
  }
}

@media (max-width: 480px) {
  .hero__scroll-hint {
    display: none;
  }

  .section {
    padding: var(--space-12) var(--space-4);
  }

  .invitation__card {
    padding: var(--space-6);
  }
}
