/* ============================================================
   WEDDING SITE — STYLE.CSS
   Palette: Ivory · Blush · Gold · Sage
   ============================================================ */

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

:root {
  --ivory:   #FFFDF7;
  --ivory2:  #F5F0E8;
  --blush:   #E8C4B8;
  --blush2:  #F2D5CB;
  --gold:    #C9A96E;
  --gold2:   #E2C48A;
  --sage:    #8A9E8A;
  --dark:    #1C1C1C;
  --mid:     #3A3530;
  --light-text: #6B6058;

  --ff-serif: 'Cormorant Garamond', Georgia, serif;
  --ff-sans:  'Montserrat', sans-serif;

  --radius: 16px;
  --transition: 0.4s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-sans);
  background: var(--ivory);
  color: var(--mid);
  overflow-x: hidden;
}

/* ── CANVAS ── */
#petals-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
}

/* ── NAVBAR ── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: center;
  transition: background var(--transition), backdrop-filter var(--transition);
}
#navbar.scrolled {
  background: rgba(255,253,247,0.85);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}
#navbar ul {
  list-style: none;
  display: flex;
  gap: 2.5rem;
  align-items: center;
}
#navbar a {
  font-family: var(--ff-sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ivory);
  transition: color var(--transition);
}
#navbar.scrolled a { color: var(--mid); }
#navbar a.nav-cta {
  border: 1px solid var(--ivory);
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  transition: all var(--transition);
}
#navbar.scrolled a.nav-cta {
  border-color: var(--gold);
  color: var(--gold);
}
#navbar a.nav-cta:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ivory) !important;
}

/* ── Language switcher ── */
.lang-switcher {
  position: absolute;
  right: 2rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.lang-btn {
  background: none;
  border: none;
  font-family: var(--ff-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  cursor: pointer;
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
  color: rgba(255,255,255,0.55);
  transition: color var(--transition);
}
#navbar.scrolled .lang-btn { color: var(--light-text); }
.lang-btn.active {
  color: var(--gold2);
  font-weight: 600;
}
#navbar.scrolled .lang-btn.active { color: var(--gold); }
.lang-btn:hover { color: var(--gold2); }
.lang-sep {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.25);
  line-height: 1;
}
#navbar.scrolled .lang-sep { color: rgba(0,0,0,0.2); }


/* ── HERO ── */
#hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(145deg, #2A1D13 0%, #402E1D 50%, #1C120A 100%);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(201,169,110,0.15) 0%, rgba(28,18,10,0.4) 40%, rgba(28,18,10,0.95) 100%);
  z-index: 1;
}

/* ── HERO GRID REFACTOR ── */
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-rows: 1fr auto 1fr auto;
  align-items: center;
  justify-items: center;
  padding: 60px 2vw 20px; 
  pointer-events: none;
  width: 100%;
  height: 100%;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.hero-grid *,
.hero-grid > div {
  -webkit-user-select: none;
  user-select: none;
}
.hero-grid > div { pointer-events: auto; }

.hg-top { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 0.2em; height: 100%; padding-bottom: 1.5vh; margin: 0; z-index: 3; }
.hg-bottom { grid-column: 2; grid-row: 3; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; gap: 0.2em; height: 100%; padding-top: 5vh; margin: 0; z-index: 3; }
.hg-date { grid-column: 1 / 4; grid-row: 4; text-align: center; margin-top: clamp(1rem, 3vh, 2rem); }
.hg-left { grid-column: 1; grid-row: 2; display: flex; justify-content: flex-end; align-items: center; width: 100%; margin-right: -16vw; padding-right: 0; gap: 0.2rem; z-index: 3; }
.hg-right { grid-column: 3; grid-row: 2; display: flex; justify-content: flex-start; align-items: center; width: 100%; margin-left: -16vw; padding-left: 0; gap: 0.2rem; z-index: 3; }

.hg-center {
  grid-column: 2; 
  grid-row: 2; 
  width: 40vw; 
  min-width: 160px;
  max-width: 450px; 
  max-height: 38vh;
  z-index: 1;
}

.hover-scale-css {
  cursor: default;
}
.hover-scale-css span {
  font-family: var(--ff-serif);
  font-weight: 300;
  background: linear-gradient(135deg, #E8C4B8 0%, #C9A96E 50%, #8C7343 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.4s ease, color 0.4s ease;
  display: inline-block;
  line-height: 1;
}

.hg-top span, .hg-bottom span { font-size: clamp(1.2rem, 5vh, 3.5rem); }
.hg-left span, .hg-right span { font-size: clamp(1rem, 8vw, 4.5rem); }

.hover-scale-css:hover span,
.hover-scale-css:active span {
  transform: scale(1.25);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  color: #FFF4E0;
  filter: drop-shadow(0 0 10px rgba(201,169,110,0.4));
}

.hover-scale-a {
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), stroke 0.4s ease;
  transform-box: fill-box;
  transform-origin: center;
  cursor: default;
}

/* ── RESPONSIVE MOBILE/PORTRAIT ── */
@media (max-width: 600px) {
  .hg-center {
    width: 60vw;
  }
  .hg-left {
    margin-right: -22vw;
  }
  .hg-right {
    margin-left: -22vw;
  }
  .hg-left span {
    font-size: clamp(0.75rem, 5.8vw, 4.5rem);
  }
  .hg-right span {
    font-size: clamp(0.75rem, 5.8vw, 4.5rem);
  }
  .hg-bottom {
    padding-top: 0;
    margin-top: -3vh;
  }
}

@media (min-width: 601px) and (max-width: 1000px) {
  .hg-bottom {
    padding-top: 0;
    margin-top: -5vh;
  }
}

.interactive-group:hover .hover-scale-a, 
.hover-scale-a:hover,
.hero-grid:has(.hover-scale-css:hover) .hover-scale-a {
  transform: scale(1.03);
  stroke: #FFF4E0 !important;
}
.hero-content {
  position: absolute;
  top: 55vh;
  left: 0;
  width: 100%;
  z-index: 2;
  color: var(--ivory);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}
.hero-pre {
  font-family: var(--ff-sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--blush2);
}
.hero-content h1 {
  font-family: var(--ff-serif);
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-shadow: 0 4px 30px rgba(0,0,0,0.3);
}
.hero-bg-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}
.ampersand {
  font-style: italic;
  color: var(--gold2);
}
.hero-date {
  font-family: var(--ff-serif);
  font-size: clamp(1rem, 3vw, 1.5rem);
  font-weight: 300;
  letter-spacing: 0.3em;
  color: var(--blush2);
}
.hero-divider {
  font-size: 1.8rem;
  color: var(--gold2);
  opacity: 0.7;
  line-height: 1;
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.scroll-hint span {
  display: block;
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 12px;
  position: relative;
}
.scroll-hint span::after {
  content: '';
  position: absolute;
  top: 5px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 8px;
  background: rgba(255,255,255,0.7);
  border-radius: 2px;
  animation: scrollDot 1.8s infinite;
}
@keyframes scrollDot {
  0%   { opacity: 1; top: 5px; }
  100% { opacity: 0; top: 20px; }
}

/* ── FADE-IN ANIMATIONS ── */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.9s forwards;
}
.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.6s; }
.delay-3 { animation-delay: 0.9s; }

@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-block;
  font-family: var(--ff-sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--dark);
  background: linear-gradient(135deg, var(--gold2) 0%, var(--gold) 100%);
  padding: 0.85rem 2.5rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(201,169,110,0.35);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(201,169,110,0.5);
  filter: brightness(1.05);
}
.btn-primary:active { transform: translateY(-1px); }
.btn-full { width: 100%; padding: 1rem; }

/* ── SECTION SHARED ── */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}
.section-label {
  font-family: var(--ff-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
h2 {
  font-family: var(--ff-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 300;
  line-height: 1.15;
  margin-bottom: 1rem;
}

/* ── COUNTDOWN ── */
/* ── HERO COUNTDOWN ── */
.hero-countdown {
  margin-top: -0.5rem;
}
.countdown-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}
.count-item { display: flex; flex-direction: column; min-width: 60px; text-align: center; }
.count-num {
  font-family: var(--ff-serif);
  font-size: 2.2rem;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
}
.count-label {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 0.3rem;
  color: rgba(255,255,255,0.6);
}
.count-sep { font-size: 1.5rem; font-weight: 300; color: rgba(201,169,110,0.4); margin-top: -1rem; }

/* ── HISTORIA ── */
.section-light  { padding: 6rem 0; background: var(--ivory); }
.section-dark   { padding: 6rem 0; background: var(--mid); color: var(--ivory2); }
.section-dark h2 { color: var(--ivory); }

.timeline {
  position: relative;
  max-width: 600px;
  margin: 3.5rem auto 0;
}
.tl-item {
  position: relative;
  margin-bottom: 3rem;
  display: block;
}
.tl-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ivory2);
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  position: absolute;
  left: -1.5rem;
  top: 0;
  box-shadow: 0 0 0 6px var(--ivory);
}
.tl-content { padding-left: 0; }
.tl-content h3 {
  font-family: var(--ff-serif);
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
}
.tl-year {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.5rem;
}
.tl-content p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--light-text);
}

/* ── CARDS ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(201,169,110,0.25);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all var(--transition);
  backdrop-filter: blur(6px);
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  background: rgba(201,169,110,0.08);
}
.card-icon { font-size: 2.2rem; margin-bottom: 1rem; }
.card h3 {
  font-family: var(--ff-serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--ivory);
  margin-bottom: 0.25rem;
}
.card-time {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--gold2);
  margin-bottom: 0.75rem;
  display: block;
}
.card p { font-size: 0.88rem; line-height: 1.7; color: rgba(255,255,255,0.65); }
.card-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--gold2);
  text-decoration: none;
  border-bottom: 1px solid rgba(201,169,110,0.3);
  transition: border-color var(--transition), color var(--transition);
}
.card-link:hover { color: var(--gold2); border-color: var(--gold2); }

/* ── DRESS CODE ── */
.dress-code {
  text-align: center;
  margin-top: 4rem;
  padding: 3rem 2rem;
  border-top: 1px solid rgba(201,169,110,0.2);
}
.palette {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0 1rem;
}
.color-swatch {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: transform var(--transition);
}
.color-swatch:hover { transform: scale(1.2); }
.dress-code > p:last-child {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.55);
}

/* ── RSVP FORM ── */
.rsvp-note {
  font-size: 0.9rem;
  color: var(--light-text);
  margin-bottom: 2.5rem;
  text-align: center;
}
.rsvp-note strong { color: var(--gold); }

#guest-rsvp-form,
#rsvp-form {
  background: #fff;
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: 0 8px 50px rgba(0,0,0,0.07);
  border: 1px solid rgba(201,169,110,0.15);
  max-width: 500px;
  margin: 0 auto;
  text-align: left;
}
.rsvp-form--legacy[hidden] {
  display: none !important;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.form-group label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light-text);
}
.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--ff-sans);
  font-size: 0.92rem;
  color: var(--mid);
  background: var(--ivory);
  border: 1.5px solid #E8E0D5;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,169,110,0.15);
}
.form-group input.invalid,
.form-group select.invalid {
  border-color: #E07070;
  box-shadow: 0 0 0 3px rgba(224,112,112,0.12);
}
.form-group textarea { resize: vertical; min-height: 80px; }

/* ── FORM MESSAGES ── */
.form-msg {
  text-align: center;
  padding: 3rem 2rem;
  border-radius: var(--radius);
  margin-top: 1.5rem;
}
.form-msg span { font-size: 3rem; display: block; margin-bottom: 1rem; }
.form-msg h3 {
  font-family: var(--ff-serif);
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}
.form-msg p { font-size: 0.9rem; color: var(--light-text); }
.form-msg--success { background: linear-gradient(135deg, #F0FAF0, #E8F5E8); border: 1px solid #A8D5A8; }
.form-msg--error   { background: linear-gradient(135deg, #FFF0F0, #FAE8E8); border: 1px solid #E0A0A0; }

/* ── REVEAL ANIMATION ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── FOOTER ── */
#footer {
  background: var(--dark);
  color: var(--ivory);
  text-align: center;
  padding: 5rem 2rem 3rem;
}
.footer-ornament {
  font-size: 2rem;
  color: var(--gold);
  opacity: 0.6;
  margin-bottom: 1rem;
}
.footer-names {
  font-family: var(--ff-serif);
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 300;
  margin-bottom: 0.5rem;
}
.footer-date {
  font-size: 0.8rem;
  letter-spacing: 0.4em;
  color: var(--gold2);
  text-transform: uppercase;
  margin-bottom: 2rem;
}
.footer-quote {
  font-family: var(--ff-serif);
  font-size: 1rem;
  font-style: italic;
  color: rgba(255,255,255,0.45);
  max-width: 480px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}
.footer-credit {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.2);
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  #navbar {
    flex-direction: row;
    padding: 1rem 0.5rem;
    gap: 0.5rem;
    justify-content: center;
  }
  #navbar ul {
    gap: 0.8rem;
    font-size: 0.75rem;
  }
  .lang-switcher {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
  }
  .hero-bg-logo {
    object-position: 65% center;
  }
  #hero { padding-top: 60px; }
  .section-light, #historia, #rsvp { padding: 4rem 0; }
  
  .container { padding: 0 1rem; }
  
  .rsvp-form-container {
    padding: 2rem 1.2rem;
  }
  .form-row { grid-template-columns: 1fr; }
  #guest-rsvp-form, #rsvp-form { padding: 1.5rem 1rem; }
  .tl-item { flex-direction: column; }
  .count-sep { display: none; }
  .countdown-grid { gap: 0; }
  .count-item { min-width: 70px; }
}
