*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --gold: #bfa365;
  --gold-light: #d9c398;
  --gold-dark: #8a6c3e;
  --bg-white: #fdfcf9;
  --card-bg: #ffffff;
  --dark: #2d2922;
  --text: #4a4338;
  --muted: #8c8273;
  --frame-inset: clamp(12px, 3.5vw, 24px);
  --frame-inner: clamp(6px, 2vw, 8px);
  --page-pad: clamp(14px, 3.5vw, 28px);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--bg-white);
  color: var(--text);
  overflow-x: hidden;
  padding: var(--page-pad);
}

body.intro-active { overflow: hidden; }

/* —— PAGE ORNAMENT FRAME —— */
.page-frame {
  position: fixed;
  inset: var(--page-pad);
  pointer-events: none;
  z-index: 900;
}

.page-border {
  position: absolute;
  inset: 0;
  border: 2px solid #d4a017;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.5),
    0 0 24px rgba(212, 160, 23, 0.15);
}

.page-border::before {
  content: '';
  position: absolute;
  inset: clamp(5px, 1.5vw, 9px);
  border: 1px solid rgba(212, 160, 23, 0.4);
}

.page-border::after {
  content: '';
  position: absolute;
  inset: clamp(10px, 2.5vw, 16px);
  border: 0.5px dashed rgba(212, 160, 23, 0.25);
}

.page-corner {
  position: absolute;
  width: clamp(48px, 12vw, 72px);
  height: clamp(48px, 12vw, 72px);
}

.page-corner svg { width: 100%; height: 100%; }

.page-corner.tl { top: 0; left: 0; }
.page-corner.tr { top: 0; right: 0; transform: scaleX(-1); }
.page-corner.bl { bottom: 0; left: 0; transform: scaleY(-1); }
.page-corner.br { bottom: 0; right: 0; transform: scale(-1); }

.page-gem {
  position: absolute;
  width: 7px;
  height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
  opacity: 0.65;
  box-shadow: 0 0 8px rgba(191, 163, 101, 0.35);
}

.page-gem-top { top: 0; left: 50%; margin-left: -3.5px; margin-top: -3.5px; }
.page-gem-bottom { bottom: 0; left: 50%; margin-left: -3.5px; margin-bottom: -3.5px; }
.page-gem-left { left: 0; top: 50%; margin-left: -3.5px; margin-top: -3.5px; }
.page-gem-right { right: 0; top: 50%; margin-right: -3.5px; margin-top: -3.5px; }

body.intro-active .page-frame {
  opacity: 0;
  transition: opacity 0.8s ease 0.3s;
}

body:not(.intro-active) .page-frame {
  opacity: 1;
}

/* —— INTRO —— */
.intro-screen {
  position: fixed;
  inset: 0;
  background: #0a0a0a;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

.intro-screen.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-inner {
  text-align: center;
  padding: 1.5rem;
}

.intro-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 0 40px rgba(191, 163, 101, 0.35);
}

.intro-title .type-cursor {
  display: inline-block;
  width: 2px;
  height: 0.85em;
  background: var(--gold);
  margin-left: 4px;
  vertical-align: baseline;
  animation: blink-caret 0.7s step-end infinite;
}

.intro-title.typing-done .type-cursor {
  animation: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

@keyframes blink-caret {
  50% { opacity: 0; }
}

/* —— LANG (floating, no header bar) —— */
.site-header {
  position: fixed;
  top: calc(var(--page-pad) + clamp(0.5rem, 2vw, 0.85rem));
  right: calc(var(--page-pad) + clamp(0.5rem, 2vw, 0.85rem));
  z-index: 10001;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.site-header.visible {
  opacity: 1;
  pointer-events: auto;
}

.lang-switch {
  display: flex;
  gap: 0;
  border: 0.5px solid rgba(191, 163, 101, 0.5);
  border-radius: 2px;
  overflow: hidden;
  background: rgba(253, 252, 249, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 12px rgba(45, 41, 34, 0.06);
}

body.intro-active .lang-switch {
  background: rgba(10, 10, 10, 0.35);
  border-color: rgba(191, 163, 101, 0.55);
  box-shadow: none;
}

.lang-btn {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  padding: 0.4rem 0.65rem;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

body.intro-active .lang-btn {
  color: rgba(217, 195, 152, 0.75);
}

body.intro-active .lang-btn:hover {
  color: var(--gold-light);
}

.lang-btn:hover {
  color: var(--dark);
}

.lang-btn.active {
  background: var(--gold);
  color: #fff;
}

/* —— MAIN (hidden until intro) —— */
.main-app {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.main-app.ready {
  opacity: 1;
}

/* —— HERO —— */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--bg-white);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 20%, rgba(191,163,101,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 80%, rgba(191,163,101,0.05) 0%, transparent 70%);
}

.petals-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: clamp(1rem, 4vw, 2rem);
  max-width: min(92vw, 720px);
  opacity: 0;
  transform: translateY(30px);
}

.hero-content.animate-in {
  animation: fadeUp 1.2s ease 0.2s forwards;
}

.hero-image {
  display: block;
  max-width: min(100%, 600px);
  width: 100%;
  height: auto;
  margin: 0 auto 1rem;
}

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  margin: 1.5rem auto;
}

.divider-line {
  flex: 1;
  max-width: 80px;
  height: 0.5px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.divider-line.r { background: linear-gradient(90deg, var(--gold), transparent); }

.divider-gem {
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.names {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 9vw, 5.25rem);
  font-weight: 400;
  color: var(--dark);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.names .amp {
  color: var(--gold);
  font-style: italic;
  font-size: 0.85em;
  vertical-align: middle;
}

.hero-verse {
  font-size: clamp(0.7rem, 2vw, 0.95rem);
  letter-spacing: 0.12em;
  color: var(--text);
  margin-top: 1.5rem;
  line-height: 1.6;
  padding: 0 0.5rem;
}

.hero-date {
  font-size: clamp(0.75rem, 2vw, 1rem);
  color: var(--gold-dark);
  margin-top: 0.5rem;
  letter-spacing: 0.15em;
  font-weight: 500;
}

.scroll-hint {
  position: absolute;
  bottom: clamp(1rem, 4vw, 2rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

.scroll-hint span {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
}

.scroll-line {
  width: 0.5px;
  height: 35px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* —— SECTIONS —— */
section {
  padding: clamp(3rem, 8vw, 5rem) clamp(1rem, 4vw, 2rem);
  position: relative;
}

.section-inner {
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}

.label {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--gold-dark);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  text-align: center;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.75rem, 4.5vw, 2.875rem);
  font-weight: 400;
  color: var(--dark);
  line-height: 1.2;
  margin-bottom: 2.5rem;
  text-align: center;
}

.countdown-section { background: #fbf9f4; }

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 2rem;
}

@media (min-width: 480px) {
  .countdown-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem;
  }
}

.count-box {
  min-width: 0;
  padding: 1.2rem 1rem;
  background: var(--card-bg);
  border: 0.5px solid rgba(191, 163, 101, 0.3);
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (min-width: 480px) {
  .count-box { min-width: 90px; }
}

.count-box.visible { opacity: 1; transform: translateY(0); }

.count-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 400;
  color: var(--gold-dark);
  line-height: 1;
  display: block;
}

.count-label {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 0.4rem;
  display: block;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 560px) {
  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.info-card {
  background: var(--card-bg);
  padding: clamp(1.5rem, 4vw, 2.2rem) clamp(1.25rem, 3vw, 1.8rem);
  border: 0.5px solid rgba(191, 163, 101, 0.2);
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.01);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.info-card.visible { opacity: 1; transform: translateY(0); }

.info-icon {
  width: 32px;
  height: 32px;
  margin: 0 auto 1rem;
  color: var(--gold);
}

.info-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--dark);
  margin-bottom: 0.6rem;
}

.info-card p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
}

.location-section { background: #fbf9f4; }

.location-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.8;
  text-align: center;
  margin-bottom: 2rem;
  padding: 0 0.5rem;
}

.map-placeholder {
  width: 100%;
  height: clamp(160px, 40vw, 200px);
  background: #fff;
  border: 0.5px solid rgba(191, 163, 101, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.map-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.map-btn svg { color: var(--gold); }

.map-btn span {
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--dark);
  text-transform: uppercase;
  font-weight: 500;
}

footer {
  background: #fbf9f4;
  text-align: center;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1rem, 4vw, 2rem);
  border-top: 0.5px solid rgba(191, 163, 101, 0.2);
}

.footer-names {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.75rem, 5vw, 2.625rem);
  font-weight: 400;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.footer-names em { color: var(--gold); font-style: italic; }

footer p {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.1em;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.1); }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* —— MOBILE: reduce top space —— */
@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding-top: 2rem;
    padding-bottom: 3rem;
  }

  .hero-content {
    padding-top: 0.5rem;
  }

  .hero-image {
    margin-bottom: 0.5rem;
  }

  .divider {
    margin: 1rem auto;
  }

  .names {
    font-size: clamp(1.8rem, 8vw, 3rem);
  }
}
