/* ===========================================================
   Feliz Aniversário — Amélia Afonso
   Paleta romântica e suave (pêssego / rosa)
   =========================================================== */

:root {
  --peach: #ffd9c0;
  --peach-deep: #ffb99a;
  --rose: #ffc2d1;
  --rose-deep: #f7a8bd;
  --cream: #fff6ef;
  --ink: #5a4038;
  --ink-soft: #8a6d63;
  --white: #fffdfb;
  --shadow: 0 20px 60px rgba(210, 140, 120, 0.25);
  --radius: 24px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Confetti sits above everything but ignores clicks */
#confetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* variantes direcionais (definidas ANTES de .visible para ter menor prioridade) */
.reveal.reveal-left  { transform: translateX(-60px) rotate(-2deg); }
.reveal.reveal-right { transform: translateX(60px) rotate(2deg); }
.reveal.reveal-up    { transform: translateY(70px); }
.reveal.reveal-zoom  { transform: scale(0.8); }
/* variante "desfoca -> foca" com brilho, para as frases românticas */
.reveal.reveal-blur {
  filter: blur(16px);
  transform: scale(1.1) translateY(20px);
  transition: opacity 1.2s ease, transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), filter 1.2s ease;
}
/* estado final: precisa de vencer as variantes, por isso vem por último */
.reveal.visible {
  opacity: 1;
  transform: none;
  filter: none;
}

/* ---------- Shared ---------- */
section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 90px 24px;
  text-align: center;
  position: relative;
}

.eyebrow {
  font-family: 'Poppins', sans-serif;
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--rose-deep);
  margin-bottom: 14px;
}

.section-head { max-width: 620px; margin-bottom: 46px; }
.section-head h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--ink);
  margin-bottom: 12px;
}
.section-head p { color: var(--ink-soft); font-weight: 300; }

.cta {
  margin-top: 34px;
  border: none;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, var(--rose-deep), var(--peach-deep));
  padding: 15px 34px;
  border-radius: 100px;
  box-shadow: 0 12px 28px rgba(247, 168, 189, 0.5);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.cta:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 18px 36px rgba(247, 168, 189, 0.6); }
.cta:active { transform: translateY(0) scale(0.99); }
.cta.ghost {
  background: transparent;
  color: var(--rose-deep);
  border: 2px solid var(--rose-deep);
  box-shadow: none;
}
.cta.ghost:hover { background: var(--rose-deep); color: #fff; }

/* =============== 1. HERO =============== */
.hero {
  background:
    radial-gradient(1200px 600px at 50% -10%, var(--rose) 0%, transparent 60%),
    radial-gradient(900px 500px at 10% 110%, var(--peach) 0%, transparent 55%),
    radial-gradient(900px 500px at 90% 110%, var(--rose) 0%, transparent 55%),
    var(--cream);
}
.hero-inner { max-width: 700px; }
.hero-title {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(2.6rem, 9vw, 5rem);
  font-weight: 700;
  color: var(--rose-deep);
  line-height: 1;
}
.hero-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 8vw, 4.4rem);
  font-weight: 600;
  color: var(--ink);
  margin: 6px 0 22px;
}
.age-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  background: var(--white);
  padding: 10px 26px;
  border-radius: 100px;
  box-shadow: var(--shadow);
  font-weight: 300;
  color: var(--ink-soft);
  margin-bottom: 20px;
}
.age-badge span {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--rose-deep);
}
.hero-sub { color: var(--ink-soft); font-size: 1.1rem; font-weight: 300; }

.scroll-hint {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid var(--rose-deep);
  border-radius: 20px;
}
.scroll-hint span {
  position: absolute;
  top: 8px; left: 50%;
  width: 5px; height: 5px;
  margin-left: -2.5px;
  background: var(--rose-deep);
  border-radius: 50%;
  animation: scrollDot 1.6s infinite;
}
@keyframes scrollDot {
  0% { opacity: 0; transform: translateY(0); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translateY(18px); }
}

/* =============== 2. GALERIA =============== */
.gallery-section { background: var(--white); }
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  width: 100%;
  max-width: 960px;
}
.photo {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--peach), var(--rose));
  transition: transform 0.35s ease;
}
.photo:hover { transform: translateY(-6px) rotate(-1deg); }
.photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
/* efeito Ken Burns: zoom lento e vivo depois de aparecer */
.photo.visible img {
  animation: kenburns 12s ease-in-out infinite alternate;
}
@keyframes kenburns {
  0%   { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.12) translate(-2%, -2%); }
}
.photo .caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 26px 16px 14px;
  background: linear-gradient(transparent, rgba(90, 64, 56, 0.6));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 300;
  text-align: left;
}
/* placeholder look when img is missing */
.photo.placeholder .ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  color: #fff;
}
.photo.placeholder .ph .emoji { font-size: 2.4rem; }
.photo.placeholder .ph small { opacity: 0.85; font-size: 0.72rem; }

/* =============== 2b. SOBRE TI =============== */
.about-section {
  background:
    radial-gradient(700px 500px at 100% 0%, var(--peach) 0%, transparent 55%),
    radial-gradient(700px 500px at 0% 100%, var(--rose) 0%, transparent 55%),
    var(--cream);
}
.verses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 900px;
}
.verse {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  text-align: left;
  background: var(--white);
  border-radius: 22px;
  padding: 24px 26px;
  box-shadow: var(--shadow);
}
.verse:hover { box-shadow: 0 26px 60px rgba(210, 140, 120, 0.32); }
.verse-icon {
  font-size: 1.7rem;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 3px 6px rgba(247, 168, 189, 0.4));
}
.verse p {
  color: var(--ink);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
}

/* =============== 2c. FRASES ROMÂNTICAS =============== */
.romance-section {
  background:
    radial-gradient(900px 600px at 50% 50%, var(--rose) 0%, transparent 60%),
    linear-gradient(160deg, #fff1ea, var(--cream));
}
.romance-lines {
  display: flex;
  flex-direction: column;
  gap: 34px;
  max-width: 820px;
  width: 100%;
}
.rline {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1.4rem, 4vw, 2.3rem);
  line-height: 1.35;
  color: var(--ink);
  text-shadow: 0 6px 24px rgba(247, 168, 189, 0.45);
}
.rline:nth-child(even) { color: var(--rose-deep); }
.rline:nth-child(odd) { transform-origin: left; }

/* =============== 3. MENSAGEM =============== */
.message-section {
  background:
    radial-gradient(800px 500px at 50% 0%, var(--rose) 0%, transparent 60%),
    var(--cream);
}
.card {
  max-width: 640px;
  background: var(--white);
  border-radius: 32px;
  padding: 56px 44px 48px;
  box-shadow: var(--shadow);
  position: relative;
}
.quote-mark {
  font-family: 'Playfair Display', serif;
  font-size: 5rem;
  line-height: 0.5;
  color: var(--rose);
  margin-bottom: 10px;
}
.message-text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  font-style: italic;
  color: var(--ink);
  line-height: 1.8;
  min-height: 6em;
}
/* cursor piscante enquanto a mensagem é "escrita" */
.message-text.typing::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--rose-deep);
  animation: caretBlink 0.8s steps(1) infinite;
}
@keyframes caretBlink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

.signature {
  font-family: 'Dancing Script', cursive;
  font-size: 1.7rem;
  color: var(--rose-deep);
  margin-top: 22px;
}
.wish-btn { display: inline-block; }
.wish-btn.done {
  background: linear-gradient(135deg, #f7a8bd, #ffd9c0);
  cursor: default;
  pointer-events: none;
}

/* =============== 4. FINAL / VÍDEO =============== */
.finale-section {
  background:
    radial-gradient(900px 500px at 50% 120%, var(--peach) 0%, transparent 60%),
    var(--white);
}
.video-frame {
  width: 100%;
  max-width: 400px;
  max-height: 80vh;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #2a1f1c;
  position: relative;
  aspect-ratio: 9 / 16;
  margin: 0 auto;
}
.video-frame video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
/* botão de play por cima do vídeo */
.video-play {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: none;
  cursor: pointer;
  color: #fff;
  background: rgba(90, 64, 56, 0.35);
  backdrop-filter: blur(2px);
  z-index: 3;
  transition: opacity 0.45s ease;
}
.video-play.hidden { opacity: 0; pointer-events: none; }
.play-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.9rem;
  padding-left: 5px;
  background: linear-gradient(135deg, var(--rose-deep), var(--peach-deep));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
  animation: playPulse 1.9s ease-in-out infinite;
}
@keyframes playPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35); }
  50% { transform: scale(1.09); box-shadow: 0 18px 44px rgba(247, 168, 189, 0.6); }
}
.play-label { font-weight: 500; font-size: 1rem; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); }
.video-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose-deep), var(--peach-deep));
  text-align: center;
  padding: 20px;
}
.video-placeholder .ph-icon { font-size: 3rem; }
.video-placeholder .ph-hint { font-size: 0.82rem; opacity: 0.9; font-weight: 300; }
.video-placeholder code {
  background: rgba(255, 255, 255, 0.25);
  padding: 2px 8px; border-radius: 6px;
}

.watch-note {
  margin-top: 18px;
  display: inline-block;
  font-weight: 500;
  color: var(--rose-deep);
  background: var(--white);
  padding: 12px 22px;
  border-radius: 100px;
  box-shadow: var(--shadow);
  font-size: 0.92rem;
}

/* caixa do presente que surge no fim do vídeo */
.gift-reveal {
  display: none;
  margin-top: 34px;
  max-width: 560px;
  background: linear-gradient(135deg, var(--rose-deep), var(--peach-deep));
  color: #fff;
  padding: 34px 30px;
  border-radius: 28px;
  box-shadow: var(--shadow);
  text-align: center;
}
.gift-reveal.show {
  display: block;
  animation: giftPop 0.7s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
@keyframes giftPop {
  0% { opacity: 0; transform: scale(0.6) translateY(20px); }
  100% { opacity: 1; transform: none; }
}
.gift-icon {
  font-size: 3rem;
  display: inline-block;
  animation: giftWiggle 1.2s ease-in-out infinite;
}
@keyframes giftWiggle {
  0%, 100% { transform: rotate(-7deg); }
  50% { transform: rotate(7deg); }
}
.gift-reveal h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin: 10px 0 8px;
}
.gift-reveal p { font-weight: 300; }

.closing { margin-top: 40px; }
.closing-text {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  color: var(--rose-deep);
}

footer {
  text-align: center;
  padding: 30px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 300;
  background: var(--cream);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .scroll-hint span { animation: none; }
}

/* ---------- Mobile (telemóvel) ---------- */
@media (max-width: 640px) {
  section { padding: 64px 18px; min-height: auto; }
  .hero { min-height: 100vh; min-height: 100svh; }

  .section-head { margin-bottom: 32px; }

  /* galeria: 2 colunas no telemóvel para caber bem */
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .photo .caption { font-size: 0.72rem; padding: 20px 10px 10px; }

  /* versos sempre numa coluna, mais compactos */
  .verses { grid-template-columns: 1fr; gap: 14px; }
  .verse { padding: 18px 20px; gap: 12px; }
  .verse p { font-size: 0.95rem; }
  .verse-icon { font-size: 1.4rem; }

  /* frases românticas mais juntas */
  .romance-lines { gap: 24px; }

  /* mensagem e final mais compactos */
  .card { padding: 40px 26px 34px; border-radius: 24px; }
  .quote-mark { font-size: 3.5rem; }
  .cta { padding: 14px 28px; font-size: 0.95rem; }

  /* animações menos agressivas para não empurrar o layout */
  .reveal.reveal-left  { transform: translateX(-34px) rotate(-1.5deg); }
  .reveal.reveal-right { transform: translateX(34px) rotate(1.5deg); }
}

/* Ecrãs muito pequenos: 1 foto por linha */
@media (max-width: 380px) {
  .gallery { grid-template-columns: 1fr; }
}

