/* ==========================================================
   SITE DO AMOR — style.css
   3D · Partículas · Responsivo · Animações Suaves
   ========================================================== */

/* ---------- Variáveis ---------- */
:root {
  --bg-deep:       #0a0514;
  --bg-mid:        #130a2a;
  --rose:          #f472b6;
  --rose-light:    #fce7f3;
  --rose-glow:     rgba(244, 114, 182, 0.35);
  --gold:          #e2b96f;
  --gold-light:    #fdf3dc;
  --purple:        #7c3aed;
  --purple-light:  #c4b5fd;
  --glass:         rgba(255, 255, 255, 0.06);
  --glass-border:  rgba(255, 255, 255, 0.14);
  --text-main:     #f0d9f0;
  --text-muted:    rgba(240, 217, 240, 0.7);
  --font-title:    'Dancing Script', cursive;
  --font-body:     'Lato', sans-serif;
  --font-display:  'Playfair Display', serif;
  --ease-out:      cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
}

img { display: block; max-width: 100%; }

/* ---------- Canvas de Partículas ---------- */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ---------- Controle de Música ---------- */
.music-ctrl {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  pointer-events: none;
}

.music-ctrl.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.music-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(124, 58, 237, 0.35);
  backdrop-filter: blur(12px);
  color: var(--rose-light);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.25s var(--ease-spring), background 0.3s;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}

.music-btn:hover { transform: scale(1.15); background: rgba(124, 58, 237, 0.55); }
.music-btn:active { transform: scale(0.93); }

.music-label {
  font-size: 0.78rem;
  color: var(--purple-light);
  letter-spacing: 0.05em;
  opacity: 0.85;
  white-space: nowrap;
}

/* ==========================================================
   INTRO SCREEN
   ========================================================== */
.intro-screen {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
}

.intro-inner {
  max-width: 760px;
  perspective: 1000px;
}

.intro-eyebrow {
  font-family: var(--font-body);
  font-size: clamp(0.72rem, 2vw, 0.9rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
  opacity: 0.85;
}

.intro-title {
  font-family: var(--font-title);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  line-height: 1.1;
  margin-bottom: 1.4rem;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--rose) 50%, var(--purple-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 28px rgba(244, 114, 182, 0.4));
}

.intro-title .highlight {
  background: linear-gradient(90deg, var(--rose), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
}

.intro-sub {
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 2.5rem;
}

.scroll-cta { margin-top: 1rem; }
.scroll-arrow {
  display: inline-block;
  font-size: 1.6rem;
  color: var(--rose);
  animation: bounce 1.8s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* ==========================================================
   ANIMAÇÕES DE REVEAL (IntersectionObserver)
   ========================================================== */
.reveal-up {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.reveal-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal-in {
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}

.reveal-in.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Delays de reveal */
.delay-1 { transition-delay: 0.18s; }
.delay-2 { transition-delay: 0.36s; }
.delay-3 { transition-delay: 0.54s; }
.delay-4 { transition-delay: 0.72s; }

/* ==========================================================
   STORY SECTIONS
   ========================================================== */
#story { position: relative; z-index: 1; }

.story-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem;
}

/* ---------- Layout 3D por seção ---------- */
.scene-3d {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  max-width: 1100px;
  width: 100%;
  perspective: 1200px;
}

.scene-3d.reverse { flex-direction: row-reverse; }

/* ---------- Cards 3D base ---------- */
.card-3d {
  position: relative;
  border-radius: 24px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 60px rgba(124, 58, 237, 0.07);
  transform-style: preserve-3d;

  /* Estado inicial para reveal */
  opacity: 0;
  transform: perspective(900px) rotateY(18deg) translateY(40px) scale(0.94);
  transition:
    opacity 1.1s var(--ease-out),
    transform 1.1s var(--ease-out),
    box-shadow 0.4s ease;
}

.card-3d.in-view {
  opacity: 1;
  transform: perspective(900px) rotateY(0deg) translateY(0) scale(1);
}

/* Lado esquerdo entra da esquerda */
.scene-3d .card-3d:first-child {
  transform: perspective(900px) rotateY(-18deg) translateY(40px) scale(0.94);
}

.scene-3d .card-3d:first-child.in-view {
  transform: perspective(900px) rotateY(0deg) translateY(0) scale(1);
}

/* Hover 3D sutil */
.card-3d:hover {
  box-shadow:
    0 16px 60px rgba(0, 0, 0, 0.55),
    0 0 80px rgba(244, 114, 182, 0.12);
}

/* ---------- Foto ---------- */
.photo-side {
  flex: 0 0 auto;
  width: min(320px, 42vw);
  overflow: hidden;
  padding: 0;
}

.photo-wrap {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 24px;
}

.photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}

.photo-side:hover .photo-wrap img { transform: scale(1.05); }

/* Borda dourada na foto */
.photo-side::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  border: 2px solid rgba(226, 185, 111, 0.4);
  pointer-events: none;
}

/* ---------- Texto ---------- */
.text-side {
  flex: 1;
  min-width: 0;
  padding: 2.5rem 2.2rem;
}

.text-content { position: relative; }

.section-number {
  display: block;
  font-family: var(--font-title);
  font-size: 4rem;
  color: rgba(226, 185, 111, 0.15);
  line-height: 1;
  margin-bottom: -1rem;
  user-select: none;
}

.story-text {
  font-size: clamp(0.95rem, 2.2vw, 1.12rem);
  line-height: 1.85;
  color: var(--text-main);
  margin-bottom: 1.2rem;
  font-weight: 300;
}

.story-text:last-child { margin-bottom: 0; }

.story-text em {
  font-style: italic;
  color: var(--rose);
}

/* ---------- Seção texto completo (sem foto) ---------- */
.full-text .card-3d {
  max-width: 680px;
  padding: 3rem 3.5rem;
  text-align: center;
  transform: perspective(900px) translateY(50px) scale(0.95);
}

.full-text .card-3d.in-view {
  transform: perspective(900px) translateY(0) scale(1);
}

.highlight-text {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3vw, 1.4rem) !important;
  font-style: italic;
  color: var(--rose-light) !important;
  margin-top: 1.8rem !important;
  line-height: 1.7 !important;
}

/* ==========================================================
   SEÇÃO DE PROPOSTA
   ========================================================== */
.proposal-section {
  padding: 4rem 1.5rem 6rem;
  align-items: flex-start;
  padding-top: 6rem;
}

.proposal-inner {
  max-width: 720px;
  width: 100%;
  padding: 3.5rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  /* override reveal */
  transform: perspective(900px) translateY(50px) scale(0.95);
}

.proposal-inner.in-view {
  transform: perspective(900px) translateY(0) scale(1);
}

/* Brilho de fundo na proposta */
.proposal-inner::before {
  content: '';
  position: absolute;
  inset: -40%;
  background: radial-gradient(
    ellipse at center,
    rgba(244, 114, 182, 0.15) 0%,
    rgba(124, 58, 237, 0.1) 40%,
    transparent 70%
  );
  animation: proposalGlow 4s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes proposalGlow {
  from { opacity: 0.6; transform: scale(0.95); }
  to   { opacity: 1;   transform: scale(1.05); }
}

/* Corações flutuantes na proposta */
.proposal-hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.proposal-hearts span {
  position: absolute;
  font-size: clamp(1rem, 2.5vw, 1.6rem);
  animation: floatHeart linear infinite;
  opacity: 0;
}

.proposal-hearts span:nth-child(1) { left: 8%;  animation-duration: 7s;  animation-delay: 0s; }
.proposal-hearts span:nth-child(2) { left: 22%; animation-duration: 9s;  animation-delay: 1.5s; }
.proposal-hearts span:nth-child(3) { left: 50%; animation-duration: 6s;  animation-delay: 0.8s; }
.proposal-hearts span:nth-child(4) { left: 72%; animation-duration: 8s;  animation-delay: 2s; }
.proposal-hearts span:nth-child(5) { left: 88%; animation-duration: 7.5s;animation-delay: 0.3s; }

@keyframes floatHeart {
  0%   { bottom: -10%; opacity: 0; transform: translateX(0) rotate(0deg); }
  10%  { opacity: 0.7; }
  90%  { opacity: 0.5; }
  100% { bottom: 110%; opacity: 0; transform: translateX(20px) rotate(20deg); }
}

.proposal-lead {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 2rem;
  font-style: italic;
}

.proposal-question {
  font-family: var(--font-title);
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.2;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--gold-light), var(--rose), var(--purple-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 20px rgba(244, 114, 182, 0.5));
}

.proposal-detail {
  font-size: clamp(0.9rem, 2.2vw, 1.05rem);
  line-height: 1.85;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.proposal-closing {
  font-size: clamp(0.95rem, 2.3vw, 1.1rem);
  color: var(--rose-light);
  font-style: italic;
  margin-bottom: 2.8rem;
}

/* ---------- Botões Sim / Não ---------- */
.proposal-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  position: relative;
}

.btn-sim {
  padding: 1rem 2.6rem;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--rose), var(--purple));
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1rem, 3vw, 1.25rem);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow:
    0 8px 30px rgba(244, 114, 182, 0.5),
    0 0 60px rgba(124, 58, 237, 0.3);
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s;
  animation: pulseBtn 2.4s ease-in-out infinite;
}

.btn-sim:hover {
  transform: scale(1.08);
  box-shadow:
    0 12px 40px rgba(244, 114, 182, 0.65),
    0 0 80px rgba(124, 58, 237, 0.4);
}

.btn-sim:active { transform: scale(0.96); }

@keyframes pulseBtn {
  0%, 100% { box-shadow: 0 8px 30px rgba(244, 114, 182, 0.5), 0 0 60px rgba(124, 58, 237, 0.3); }
  50%       { box-shadow: 0 8px 45px rgba(244, 114, 182, 0.75), 0 0 90px rgba(124, 58, 237, 0.5); }
}

.btn-icon { font-size: 1.2em; }

.btn-nao {
  padding: 0.75rem 1.8rem;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  cursor: pointer;
  transition: opacity 0.3s, color 0.3s;
  position: absolute; /* será movido via JS */
}

.btn-nao:hover { opacity: 0.5; color: var(--rose); }

/* ==========================================================
   TELA DE CELEBRAÇÃO
   ========================================================== */
.celebration-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: linear-gradient(160deg, #0d0021 0%, #1a0030 40%, #2a0040 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s var(--ease-out);
}

.celebration-screen.active {
  opacity: 1;
  pointer-events: auto;
}

#confetti-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.celebration-inner {
  position: relative;
  z-index: 1;
}

.celebration-hearts {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.celeb-heart-particle {
  position: absolute;
  bottom: -10%;
  font-size: 1.5rem;
  animation: riseFly linear infinite;
  opacity: 0;
}

@keyframes riseFly {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-110vh) rotate(360deg); opacity: 0; }
}

.celeb-title {
  font-family: var(--font-title);
  font-size: clamp(2.5rem, 8vw, 5rem);
  background: linear-gradient(135deg, var(--gold-light), var(--rose));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
  transform: scale(0.6) translateY(20px);
  transition: opacity 0.8s var(--ease-out) 0.5s, transform 0.8s var(--ease-spring) 0.5s;
}

.celeb-sim {
  font-family: var(--font-title);
  max-width: 760px;
  margin: 0 auto 1.5rem;
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  color: var(--rose-light);
  line-height: 1.7;
  font-style: italic;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s var(--ease-spring) 0.9s, transform 1s var(--ease-spring) 0.9s;
}

.celebration-screen.active .celeb-title,
.celebration-screen.active .celeb-sim {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.celeb-msg {
  font-size: clamp(1rem, 3vw, 1.3rem);
  color: var(--rose-light);
  line-height: 1.7;
  font-style: italic;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s var(--ease-out) 1.6s, transform 0.9s var(--ease-out) 1.6s;
}

.celebration-screen.active .celeb-msg {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================
   CONSOLE DE LOG — registro dos cliques em tempo real
   ========================================================== */
.log-console {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  width: min(340px, calc(100vw - 2.4rem));
  max-height: 45vh;
  background: rgba(10, 5, 20, 0.92);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(226, 185, 111, 0.08);
  backdrop-filter: blur(10px);
  z-index: 999;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.log-console.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.log-console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid var(--glass-border);
}

.log-console-title {
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--gold);
}

.log-console-actions { display: flex; gap: 0.4rem; }

.log-console-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  border-radius: 6px;
  width: 24px;
  height: 24px;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.log-console-btn:hover {
  background: var(--rose);
  color: #fff;
}

.log-console-body {
  margin: 0;
  padding: 0.7rem 0.85rem;
  font-family: 'Courier New', monospace;
  font-size: 0.72rem;
  line-height: 1.5;
  color: #b6f2c9;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.log-console-body .log-line-nao { color: #f8a5c2; }
.log-console-body .log-line-sim { color: #b6f2c9; }

@media (max-width: 768px) {
  .log-console {
    left: 1rem;
    right: 1rem;
    width: auto;
    bottom: 0.8rem;
    max-height: 38vh;
  }
}

/* ==========================================================
   RESPONSIVO — CELULAR
   ========================================================== */
@media (max-width: 768px) {
  .story-section { padding: 4rem 1rem; min-height: auto; }

  .scene-3d,
  .scene-3d.reverse {
    flex-direction: column;
    gap: 1.5rem;
  }

  .photo-side {
    width: min(280px, 80vw);
  }

  .text-side {
    padding: 1.5rem 1.2rem;
    width: 100%;
  }

  .section-number { font-size: 2.8rem; }

  .full-text .card-3d { padding: 2rem 1.5rem; }

  .proposal-inner { padding: 2.5rem 1.5rem; }

  .proposal-section { padding: 3rem 1rem 4rem; }

  .btn-sim { padding: 0.9rem 2rem; font-size: 1rem; }

  .music-ctrl { bottom: 1rem; right: 1rem; }
  .music-btn  { width: 42px; height: 42px; }
  .music-label { display: none; }

  /* Sem 3D pesado no mobile para performance */
  .card-3d {
    opacity: 0;
    transform: translateY(40px) scale(0.97);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  }
  .card-3d.in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 400px) {
  .intro-title { font-size: 2.4rem; }
  .proposal-question { font-size: 1.9rem; }
  .story-text { font-size: 0.92rem; }
}
