/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Colors */
  --ivory:          #FAF7F2;
  --sage:           #A8BFB0;
  --sage-mid:       #C4D9CC;
  --sage-wash:      #F3F7F4;
  --blue:           #B8D0DC;
  --blue-wash:      #F1F6FA;
  --charcoal:       #2C2825;
  --charcoal-mid:   #5A534E;
  --charcoal-soft:  #8A837E;
  --gold:           #C9A96E;
  --gold-light:     #E3CBAA;
  --gold-pale:      #F5ECD8;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-name:    'Spectral', Georgia, serif;      /* lyrical — used for all personal names */
  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;
  --font-script:  'Pinyon Script', cursive;

  /* Spacing — fluid */
  --section-y:   clamp(60px, 10vw, 108px);
  --section-x:   clamp(24px, 7vw, 72px);
  --content-max: 660px;

  /* Easing */
  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft:  cubic-bezier(0.4, 0, 0.2, 1);
}


/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--ivory);
  color: var(--charcoal);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}


/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes heroReveal {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes balloonFloat {
  0%,  100% { transform: translateY(0)   rotate(-1.5deg); }
  50%        { transform: translateY(-14px) rotate(2deg);   }
}

@keyframes scrollPulse {
  0%   { transform: scaleY(0) translateY(0); transform-origin: top;    opacity: 0; }
  45%  { transform: scaleY(1) translateY(0); transform-origin: top;    opacity: 1; }
  55%  { transform: scaleY(1) translateY(0); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0) translateY(0); transform-origin: bottom; opacity: 0; }
}


/* ============================================================
   SCROLL REVEAL UTILITY
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity  0.85s var(--ease-out),
    transform 0.85s var(--ease-out);
}

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

/* Gallery items override — offset preserved after reveal */
.gallery-item--up.reveal.visible  { transform: translateY(-20px); }
.gallery-item--down.reveal.visible { transform: translateY(20px);  }

@media (min-width: 640px) {
  .gallery-item--up.reveal.visible  { transform: translateY(-28px); }
  .gallery-item--down.reveal.visible { transform: translateY(28px);  }
}

/* Hero elements animate via CSS animation on load, not observer */
.hero .reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: heroReveal 1s var(--ease-out) both;
}
.hero .hero-eyebrow.reveal    { animation-delay: 0.15s; }
.hero .hero-photo-wrap.reveal { animation-delay: 0.35s; }
.hero .hero-title.reveal      { animation-delay: 0.75s; }
.hero .hero-info.reveal       { animation-delay: 1.0s;  }


/* ============================================================
   SHARED SECTION PATTERNS
   ============================================================ */
.section-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--section-y) var(--section-x);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 6.5vw, 44px);
  letter-spacing: 0.02em;
  color: var(--charcoal);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-divider {
  margin: 28px 0;
}

.section-divider img {
  width: 180px;
  opacity: 0.65;
}


/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  min-height: 100vh;
  background: radial-gradient(ellipse 80% 60% at 50% 30%, #F4EFE4 0%, var(--ivory) 68%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 60px 28px 90px;
  overflow: hidden;
}

/* Scattered background stars */
.hero-bg-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-bg-stars img {
  position: absolute;
  opacity: 0.45;
}

.hero-bg-stars .stars-a {
  top: 36px;
  right: 20px;
  width: 110px;
  transform: rotate(12deg);
}

.hero-bg-stars .stars-b {
  bottom: 100px;
  left: 14px;
  width: 80px;
  transform: rotate(-8deg) scaleX(-1);
  opacity: 0.3;
}

/* Hero content */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(18px, 4.8vw, 24px);
  color: var(--charcoal-mid);
  letter-spacing: 0.05em;
  margin-bottom: 20px;
  line-height: 1.55;
  text-align: center;
}

/* Photo frame */
.hero-photo-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 24px;
}

.hero-photo-frame {
  width: clamp(200px, 55vw, 275px);
  height: clamp(268px, 74vw, 368px);
  border-radius: clamp(100px, 27.5vw, 138px) clamp(100px, 27.5vw, 138px) 10px 10px;
  overflow: hidden;
  box-shadow:
    0 2px 4px   rgba(44, 40, 37, 0.04),
    0 8px 24px  rgba(44, 40, 37, 0.07),
    0 28px 56px rgba(44, 40, 37, 0.09);
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}

/* Floating balloon */
.hero-balloon {
  position: absolute;
  top: 22px;
  right: -26px;
  width: 40px;
  animation: balloonFloat 5.5s ease-in-out infinite;
  pointer-events: none;
}

/* Title block — "Botezul lui" lead + "Matei" as one coherent unit */
.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
}

.hero-title-lead {
  font-family: var(--font-name);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(18px, 4.8vw, 26px);
  letter-spacing: 0.06em;
  color: var(--charcoal-soft);
  line-height: 1;
}

/* Name — Spectral italic: lyrical, soft, premium */
.hero-name {
  font-family: var(--font-name);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(72px, 20vw, 120px);
  letter-spacing: 0.05em;
  color: var(--charcoal-mid);
  line-height: 0.9;
  margin: 0;
  padding-top: 14px;
}

/* Info cluster — 3-column horizontal plate */
.hero-info {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

.hero-info-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 0 clamp(14px, 4.5vw, 28px);
}

.hero-info-sep {
  display: block;
  width: 1px;
  height: 44px;
  background: var(--gold);
  opacity: 0.22;
  align-self: center;
  flex-shrink: 0;
}

.hero-info-icon {
  width: 18px;
  height: 18px;
  opacity: 0.55;
}

.hero-info-label {
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--charcoal-soft);
}

.hero-info-date {
  font-family: var(--font-name);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(14px, 3.2vw, 17px);
  letter-spacing: 0.02em;
  color: var(--charcoal-mid);
  line-height: 1.2;
}

.hero-info-time {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(16px, 3.8vw, 20px);
  letter-spacing: 0.04em;
  color: var(--charcoal-mid);
  line-height: 1.1;
}

/* Scroll cue */
.hero-scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero-scroll-cue span {
  display: block;
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, transparent, var(--charcoal-soft));
  animation: scrollPulse 2.4s ease-in-out infinite;
}


/* ============================================================
   OPENING SECTION
   ============================================================ */
.opening {
  background-color: var(--ivory);
}

.opening-ornament {
  margin-bottom: 20px;
}

.opening-ornament img {
  width: 130px;
  opacity: 0.72;
}

.opening .section-title {
  font-style: italic;
}

.opening-text {
  font-family: var(--font-body);
  font-size: clamp(16px, 2.6vw, 18px);
  font-weight: 300;
  color: var(--charcoal-mid);
  line-height: 1.9;
  max-width: 520px;
  text-align: center;
}

.opening-text + .opening-text {
  margin-top: 18px;
}

.opening-text em {
  font-family: var(--font-name);
  font-style: italic;
  font-size: 1.12em;
  font-weight: 400;
  color: var(--charcoal);
  letter-spacing: 0.01em;
}


/* ============================================================
   EVENT SECTIONS — Church & Restaurant
   ============================================================ */
.event-section--church {
  background-color: var(--sage-wash);
}

.event-section--restaurant {
  background-color: var(--blue-wash);
}

.event-icon-wrap {
  margin-bottom: 24px;
}

.event-icon {
  height: 44px;
  width: auto;
  opacity: 0.65;
}

.event-icon--large {
  height: 64px;
}

.event-label {
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--charcoal-soft);
  margin-bottom: 10px;
}

.event-time {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(64px, 17vw, 100px);
  letter-spacing: 0.04em;
  color: var(--charcoal);
  line-height: 1;
  margin-bottom: 20px;
}

.event-divider {
  margin-bottom: 22px;
}

.event-divider img {
  width: 160px;
  opacity: 0.62;
}

.event-venue {
  margin-bottom: 34px;
}

.venue-name {
  font-family: var(--font-display);
  font-size: clamp(22px, 4.8vw, 30px);
  font-weight: 400;
  color: var(--charcoal);
  letter-spacing: 0.02em;
  margin-bottom: 10px;
  line-height: 1.3;
}

.venue-address {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--charcoal-soft);
  line-height: 1.7;
}

/* Map button */
.map-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 26px;
  border: 1px solid var(--gold-light);
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--charcoal-mid);
  background: transparent;
  cursor: pointer;
  transition:
    border-color 0.35s var(--ease-soft),
    background   0.35s var(--ease-soft),
    color        0.35s var(--ease-soft),
    box-shadow   0.35s var(--ease-soft);
}

.map-button:hover,
.map-button:focus-visible {
  border-color: var(--gold);
  background: rgba(201, 169, 110, 0.05);
  color: var(--charcoal);
  box-shadow: 0 4px 18px rgba(201, 169, 110, 0.12);
  outline: none;
}

.map-pin {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: var(--gold);
}


/* ============================================================
   PHOTO MOMENT — full-width atmospheric
   ============================================================ */
.photo-moment {
  width: 100%;
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 3;
  max-height: 540px;
}

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

.photo-moment-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(250, 247, 242, 0.18) 0%,
    transparent 18%,
    transparent 82%,
    rgba(250, 247, 242, 0.22) 100%
  );
  pointer-events: none;
}


/* ============================================================
   GALLERY — staggered portrait pair
   ============================================================ */
.gallery {
  background-color: var(--ivory);
  padding: var(--section-y) var(--section-x);
}

.gallery-inner {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: center;
  width: 100%;
  margin-bottom: 36px;
}

.gallery-item--up  { transform: translateY(-20px); }
.gallery-item--down { transform: translateY(20px);  }

.gallery-frame {
  overflow: hidden;
  border-radius: 5px;
  box-shadow:
    0 4px 10px  rgba(44, 40, 37, 0.06),
    0 12px 30px rgba(44, 40, 37, 0.07);
}

.gallery-frame img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.65s var(--ease-soft);
}

.gallery-frame:hover img {
  transform: scale(1.04);
}

.gallery-ornament img {
  width: 100px;
  opacity: 0.65;
}


/* ============================================================
   RSVP
   ============================================================ */
.rsvp {
  background-color: var(--sage-wash);
}

.rsvp-cloud {
  margin-bottom: 22px;
}

.rsvp-cloud img {
  width: 200px;
  opacity: 0.5;
}

.rsvp .section-title {
  font-style: italic;
  margin-bottom: 14px;
}

.rsvp-subtitle {
  font-family: var(--font-body);
  font-size: clamp(14.5px, 2.4vw, 16px);
  font-weight: 300;
  color: var(--charcoal-mid);
  line-height: 1.9;
  max-width: 380px;
  text-align: center;
  margin-bottom: 36px;
}

.rsvp-contacts {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 400px;
}

/* RSVP card — centered, unified tap target */
.rsvp-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 24px 26px;
  background: var(--ivory);
  border: 1px solid rgba(168, 191, 176, 0.42);
  border-radius: 6px;
  box-shadow:
    0 2px 8px  rgba(44, 40, 37, 0.04),
    0 6px 20px rgba(44, 40, 37, 0.05);
  transition:
    border-color  0.35s var(--ease-soft),
    box-shadow    0.35s var(--ease-soft),
    transform     0.35s var(--ease-soft);
  cursor: pointer;
  min-width: 0;
}

.rsvp-card:hover,
.rsvp-card:focus-visible {
  border-color: var(--sage);
  box-shadow: 0 8px 36px rgba(168, 191, 176, 0.22);
  transform: translateY(-2px);
  outline: none;
}

/* Name */
.rsvp-card-name {
  font-family: var(--font-name);
  font-size: clamp(34px, 8vw, 42px);
  font-weight: 400;
  font-style: italic;
  color: var(--charcoal);
  letter-spacing: 0.02em;
  line-height: 1;
  display: block;
}

/* Thin gold rule between name and action */
.rsvp-card-name::after {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--gold);
  opacity: 0.45;
  margin: 14px auto 0;
}

/* WhatsApp CTA — centered */
.rsvp-card-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--charcoal-soft);
  transition: color 0.3s var(--ease-soft);
}

.rsvp-card:hover .rsvp-card-cta,
.rsvp-card:focus-visible .rsvp-card-cta {
  color: var(--sage);
}

.rsvp-card-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--sage);
  display: flex;
  align-items: center;
}

.rsvp-card-icon svg {
  width: 15px;
  height: 15px;
}


/* ============================================================
   CLOSING
   ============================================================ */
.closing {
  background-color: var(--ivory);
}

.closing-divider {
  margin-bottom: 40px;
}

.closing-divider img {
  width: 160px;
  opacity: 0.62;
}

.closing-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--charcoal-soft);
  margin-bottom: 14px;
  display: block;
}

.closing-names {
  font-family: var(--font-name);
  font-size: clamp(28px, 5.5vw, 38px);
  font-weight: 400;
  font-style: italic;
  color: var(--charcoal);
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin-bottom: 44px;
}

.closing-stars {
  opacity: 0.55;
}

.closing-stars img {
  width: 120px;
}

.closing-foot {
  margin-top: 48px;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--charcoal-soft);
  opacity: 0.5;
}


/* ============================================================
   RESPONSIVE — TABLET ≥ 640px
   ============================================================ */
@media (min-width: 640px) {
  .hero-balloon {
    width: 52px;
    right: -34px;
    top: 28px;
  }

  .photo-moment {
    aspect-ratio: 16 / 9;
    max-height: 580px;
  }

  .gallery-pair {
    gap: 22px;
  }

  .gallery-item--up  { transform: translateY(-28px); }
  .gallery-item--down { transform: translateY(28px);  }

  .rsvp-contacts {
    flex-direction: row;
    max-width: 580px;
  }

  .rsvp-card {
    flex: 1;
  }

  .section-divider img {
    width: 220px;
  }
}


/* ============================================================
   RESPONSIVE — DESKTOP ≥ 1024px
   ============================================================ */
@media (min-width: 1024px) {
  .hero-photo-frame {
    width: 295px;
    height: 394px;
    border-radius: 148px 148px 12px 12px;
  }

  .hero-balloon {
    width: 60px;
    right: -42px;
    top: 32px;
  }

  .gallery-inner {
    max-width: 540px;
  }

  .rsvp-contacts {
    max-width: 620px;
  }

  .gallery-pair {
    gap: 28px;
  }

  /* Photo moment — art-directed desktop treatment.
     Portrait photo shown tall and inset, not as a wide cropped banner. */
  .photo-moment {
    aspect-ratio: unset;
    height: 560px;
    max-height: 560px;
    margin-left: clamp(48px, 7vw, 140px);
    margin-right: clamp(48px, 7vw, 140px);
    border-radius: 10px;
  }

  .photo-moment-img {
    object-position: center 22%;
  }
}


/* ============================================================
   FOCUS & ACCESSIBILITY
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
}


/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .hero .reveal {
    animation: none !important;
    transition: opacity 0.3s ease !important;
    transform: none !important;
  }

  .reveal.visible {
    opacity: 1;
  }

  .hero-balloon {
    animation: none;
  }

  .hero-scroll-cue span {
    animation: none;
    opacity: 0.4;
  }

  .gallery-item--up,
  .gallery-item--down,
  .gallery-item--up.reveal.visible,
  .gallery-item--down.reveal.visible {
    transform: none !important;
  }

  .gallery-frame img {
    transition: none;
  }
}
