/* =========================================================
   Para o amor que encontrei na imensidão da internet
   ========================================================= */

:root {
  --vinho-escuro: #2a0510;
  --vinho: #4a0d1f;
  --vermelho-profundo: #7a0c2e;
  --vermelho: #b3123a;
  --rosa: #ff5c7c;
  --rosa-claro: #ffd1dc;
  --dourado: #d4af37;
  --dourado-claro: #f5d78e;
  --preto: #150307;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.18);
  --font-titulo: 'Great Vibes', cursive;
  --font-corpo: 'Playfair Display', serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-corpo);
  color: var(--rosa-claro);
  background: linear-gradient(160deg, var(--preto) 0%, var(--vinho-escuro) 30%, var(--vermelho-profundo) 65%, var(--vinho) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 15%, rgba(212, 175, 55, 0.12), transparent 40%),
    radial-gradient(circle at 80% 85%, rgba(255, 92, 124, 0.18), transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(122, 12, 46, 0.25), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Floating hearts background */
.floating-hearts {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.floating-hearts .heart {
  position: absolute;
  bottom: -10%;
  color: rgba(255, 92, 124, 0.35);
  font-size: 1.4rem;
  animation: floatUp linear infinite;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

@keyframes floatUp {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-110vh) translateX(20px) rotate(25deg);
    opacity: 0;
  }
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.25rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ================= HERO ================= */
.hero {
  text-align: center;
  margin-bottom: 2.5rem;
  animation: fadeInDown 1.4s ease both;
}

.hero-eyebrow {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--dourado-claro);
  margin-bottom: 0.6rem;
  opacity: 0.9;
}

.hero-title {
  font-family: var(--font-titulo);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.15;
  margin: 0 0 0.8rem;
  background: linear-gradient(90deg, var(--dourado-claro), var(--rosa), var(--dourado));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 30px rgba(212, 175, 55, 0.25);
}

.hero-subtitle {
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(255, 209, 220, 0.85);
  max-width: 40rem;
  margin: 0 auto;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= ROSE ================= */
.rose-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1.5rem 0 3rem;
}

.rose-wrapper {
  position: relative;
  width: min(300px, 70vw);
  cursor: pointer;
  outline: none;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
  transition: transform 0.4s ease;
}

.rose-wrapper:hover {
  transform: scale(1.03);
}

.rose-wrapper:focus-visible .rose-glow {
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.6);
}

.rose-glow {
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 92, 124, 0.45) 0%, rgba(212, 175, 55, 0.18) 45%, transparent 70%);
  filter: blur(18px);
  z-index: 0;
  animation: glowPulse 3.5s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.08); }
}

.rose-svg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  overflow: visible;
}

.rose-stem,
.rose-leaf {
  opacity: 0;
  animation: revealStem 1.2s ease forwards 0.3s;
}

@keyframes revealStem {
  to { opacity: 1; }
}

.calyx path {
  opacity: 0;
  animation: revealStem 1.2s ease forwards 0.5s;
}

/* Cada pétala é posicionada estaticamente (translate + rotate) pelo <g class="petal-pos">
   no SVG, apontando para fora, a partir do centro da flor. O CSS só anima escala/rotação
   extra por cima disso, criando o efeito de botão fechado -> flor aberta. */
.petal {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: scale(var(--s, 0.15)) rotate(var(--r, 0deg));
  opacity: 0.95;
  transition:
    transform 1.5s cubic-bezier(0.34, 1.1, 0.4, 1),
    opacity 1s ease;
}

/* Estado fechado (botão): camadas externas bem recolhidas dentro do miolo */
.layer-core .petal   { --s: 0.8; }
.layer-mid1 .petal   { --s: 0.3; }
.layer-mid2 .petal   { --s: 0.16; }
.layer-outer .petal  { --s: 0.09; }

/* Estado aberto: cada camada se expande em tempos diferentes, como uma rosa desabrochando */
.rose-wrapper.is-open .layer-core .petal  { --s: 1;    transition-delay: 0.05s; }
.rose-wrapper.is-open .layer-mid1 .petal  { --s: 1.02; transition-delay: 0.25s; }
.rose-wrapper.is-open .layer-mid2 .petal  { --s: 1.05; transition-delay: 0.45s; }
.rose-wrapper.is-open .layer-outer .petal { --s: 1.1;  transition-delay: 0.65s; }

/* Leve torção alternada nas pétalas ao abrir, para um visual mais orgânico e ondulado */
.rose-wrapper.is-open .layer-mid1 .petal-pos:nth-child(odd)   { --r: 5deg; }
.rose-wrapper.is-open .layer-mid1 .petal-pos:nth-child(even)  { --r: -5deg; }
.rose-wrapper.is-open .layer-mid2 .petal-pos:nth-child(odd)   { --r: 8deg; }
.rose-wrapper.is-open .layer-mid2 .petal-pos:nth-child(even)  { --r: -8deg; }
.rose-wrapper.is-open .layer-outer .petal-pos:nth-child(odd)  { --r: 12deg; }
.rose-wrapper.is-open .layer-outer .petal-pos:nth-child(even) { --r: -12deg; }

.rose-wrapper.is-open .rose-glow {
  animation: glowPulseOpen 2.5s ease-in-out infinite;
}

@keyframes glowPulseOpen {
  0%, 100% { opacity: 0.7; transform: scale(1.05); }
  50% { opacity: 1; transform: scale(1.2); }
}

.rose-hint {
  margin-top: 1rem;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--dourado-claro);
  opacity: 0.85;
  animation: hintPulse 2s ease-in-out infinite;
}

.rose-hint.hidden {
  display: none;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ================= CARDS ================= */
.cards-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: translateY(30px);
  pointer-events: none;
  transition: opacity 1s ease, transform 1s ease;
}

.cards-section.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.card-stage {
  position: relative;
  width: 100%;
  max-width: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.card-frame {
  position: relative;
  width: 100%;
  min-height: 560px;
  perspective: 1200px;
}

.photo-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.75rem;
  border-radius: 26px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 40px rgba(212, 175, 55, 0.08);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8) rotate(-6deg) translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.7s;
}

.photo-card.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1) rotate(0deg) translateY(0);
  z-index: 2;
}

.photo-card.exit-left {
  opacity: 0;
  visibility: visible;
  transform: scale(0.85) rotate(-8deg) translateX(-60px);
  z-index: 1;
}

.photo-card.exit-right {
  opacity: 0;
  visibility: visible;
  transform: scale(0.85) rotate(8deg) translateX(60px);
  z-index: 1;
}

.photo-frame {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  overflow: hidden;
  border: 3px solid var(--dourado);
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.5),
    0 0 25px rgba(212, 175, 55, 0.25);
  margin-bottom: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-quote {
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--rosa-claro);
  max-width: 34ch;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.card-quote::before {
  content: "“";
  color: var(--dourado);
  font-size: 1.6rem;
  margin-right: 2px;
}

.card-quote::after {
  content: "”";
  color: var(--dourado);
  font-size: 1.6rem;
  margin-left: 2px;
}

.card-number {
  margin-top: 1.1rem;
  font-family: var(--font-titulo);
  font-size: 1.4rem;
  color: var(--dourado-claro);
}

/* Nav buttons */
.nav-btn {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  color: var(--dourado-claro);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.nav-btn:hover {
  transform: scale(1.12);
  background: rgba(255, 92, 124, 0.25);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.4);
}

.nav-btn:active {
  transform: scale(0.95);
}

/* Dots */
.dots {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.6rem;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.dot:hover {
  transform: scale(1.2);
}

.dot.active {
  background: linear-gradient(135deg, var(--dourado), var(--rosa));
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.7);
  transform: scale(1.25);
}

/* ================= FOOTER ================= */
.site-footer {
  margin-top: 3.5rem;
  text-align: center;
  padding: 1.5rem 1rem 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  max-width: 600px;
}

.site-footer p {
  margin: 0.3rem 0;
  color: rgba(255, 209, 220, 0.8);
  font-style: italic;
}

.footer-heart {
  display: inline-block;
  color: var(--rosa);
  animation: heartbeat 1.4s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.25); }
  40% { transform: scale(1); }
  60% { transform: scale(1.2); }
}

.footer-small {
  font-size: 0.85rem;
  opacity: 0.7;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 600px) {
  .container {
    padding: 2rem 1rem 1.5rem;
  }

  .hero {
    margin-bottom: 1.5rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .rose-section {
    margin: 1rem 0 2rem;
  }

  .card-stage {
    gap: 0.5rem;
  }

  .card-frame {
    min-height: 0;
    height: auto;
  }

  .photo-card {
    position: relative;
    inset: unset;
    padding: 1.25rem;
    display: none;
  }

  .photo-card.active {
    display: flex;
  }

  .photo-card.exit-left,
  .photo-card.exit-right {
    display: none;
  }

  .photo-frame {
    max-width: 260px;
  }

  .nav-btn {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }

  .card-quote {
    font-size: 1rem;
  }

  .card-number {
    font-size: 1.2rem;
  }
}

@media (max-width: 380px) {
  .card-stage {
    gap: 0.3rem;
  }

  .photo-frame {
    max-width: 220px;
  }

  .nav-btn {
    width: 38px;
    height: 38px;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }
}
