/*
 * DESIGN INTENT
 * Tone: "playful elegant surprise" — toy-like joy meets refined dental-brand warmth
 * Fonts: Fredoka 700 (display) + Quicksand 400/600 (body)
 * Palette: bg #0d1b2a → #1b2a3a (deep night), accent #6fcf97 (mint/teal), #f2c94c (gold), #bb6bd9 (lavender), #ff6b9d (coral)
 * Layout signature: full-screen cover with floating decorated elements → card reveal with confetti burst
 * Memorable element: the "TOCA AQUÍ" button that explodes into confetti and reveals the message
 */

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Quicksand', sans-serif;
  background: #0d1b2a;
  color: #f0f4f8;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ===== SECTIONS ===== */
.cover-section,
.message-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
}

.message-section {
  background: linear-gradient(145deg, #0d1b2a 0%, #1b2a3a 50%, #0d1b2a 100%);
}

.hidden {
  display: none !important;
}

/* ===== COVER BACKGROUND ===== */
.cover-section {
  background: radial-gradient(ellipse at 30% 20%, #1b3a4a 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, #2a1b3a 0%, transparent 50%),
              linear-gradient(160deg, #0d1b2a 0%, #1a2a3a 100%);
}

/* ===== FLOATING DECORATIONS ===== */
.floating-deco {
  position: absolute;
  pointer-events: none;
  opacity: 0.15;
  animation: floatAnim 6s ease-in-out infinite;
}

.deco-star-1 { top: 10%; left: 8%; font-size: 2.5rem; color: #f2c94c; animation-delay: 0s; }
.deco-star-2 { top: 25%; right: 12%; font-size: 1.8rem; color: #bb6bd9; animation-delay: 1.5s; }
.deco-star-3 { bottom: 20%; left: 15%; font-size: 2rem; color: #6fcf97; animation-delay: 3s; }
.deco-heart-1 { top: 15%; right: 20%; font-size: 2.2rem; opacity: 0.12; animation-delay: 0.8s; }
.deco-heart-2 { bottom: 30%; right: 10%; font-size: 1.6rem; opacity: 0.12; animation-delay: 2.2s; }
.deco-circle-1 { top: 40%; left: 5%; font-size: 3rem; color: #ff6b9d; opacity: 0.08; animation-delay: 1s; }
.deco-circle-2 { bottom: 15%; right: 25%; font-size: 2rem; color: #f2c94c; opacity: 0.08; animation-delay: 2.8s; }

/* Message section decos */
.deco-star-4 { top: 8%; right: 8%; font-size: 2rem; color: #f2c94c; animation-delay: 0.3s; }
.deco-star-5 { bottom: 15%; left: 10%; font-size: 1.5rem; color: #bb6bd9; animation-delay: 1.8s; }
.deco-heart-3 { top: 30%; left: 6%; font-size: 1.8rem; opacity: 0.1; animation-delay: 0.6s; }
.deco-heart-4 { bottom: 25%; right: 8%; font-size: 2rem; opacity: 0.1; animation-delay: 2.4s; }
.deco-sparkle-1 { top: 12%; left: 20%; font-size: 1.5rem; color: #f2c94c; animation-delay: 1.2s; }
.deco-sparkle-2 { bottom: 10%; right: 15%; font-size: 1.2rem; color: #6fcf97; animation-delay: 3.2s; }

@keyframes floatAnim {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-15px) rotate(5deg); }
  50% { transform: translateY(-8px) rotate(-3deg); }
  75% { transform: translateY(-18px) rotate(4deg); }
}

/* ===== COVER CONTENT ===== */
.cover-content {
  text-align: center;
  z-index: 2;
  max-width: 700px;
}

.pre-title {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  color: #6fcf97;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  animation: fadeSlideUp 0.8s ease-out 0.2s both;
}

.main-question {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 2.5rem;
}

.line {
  display: block;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(2.5rem, 8vw, 5rem);
  line-height: 1.1;
  color: #f0f4f8;
  text-shadow: 0 2px 20px rgba(111, 207, 151, 0.15);
}

.line-1 {
  animation: fadeSlideUp 0.8s ease-out 0.4s both;
}

.line-2 {
  animation: fadeSlideUp 0.8s ease-out 0.6s both;
  background: linear-gradient(135deg, #6fcf97, #f2c94c, #bb6bd9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== CTA BUTTON ===== */
.cta-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.2rem 3rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #6fcf97 0%, #4ecdc4 100%);
  color: #0d1b2a;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 8px 32px rgba(111, 207, 151, 0.35);
  animation: fadeSlideUp 0.8s ease-out 0.8s both, pulseGlow 2s ease-in-out 1.5s infinite;
  overflow: visible;
}

.cta-button:hover {
  transform: scale(1.08) translateY(-3px);
  box-shadow: 0 12px 40px rgba(111, 207, 151, 0.5);
}

.cta-button:active {
  transform: scale(0.95) translateY(2px);
  box-shadow: 0 4px 16px rgba(111, 207, 151, 0.3);
}

.btn-sparkle {
  font-size: 1.4em;
  animation: sparkleSpin 2s ease-in-out infinite;
}

.btn-ring {
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 2px solid rgba(111, 207, 151, 0.3);
  animation: ringExpand 2s ease-out infinite;
}

.btn-ring.ring-2 { animation-delay: 0.7s; }
.btn-ring.ring-3 { animation-delay: 1.4s; }

@keyframes ringExpand {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 8px 32px rgba(111, 207, 151, 0.35); }
  50% { box-shadow: 0 8px 48px rgba(111, 207, 151, 0.55); }
}

@keyframes sparkleSpin {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(15deg) scale(1.2); }
  75% { transform: rotate(-15deg) scale(1.2); }
}

.cover-sub {
  margin-top: 1.5rem;
  font-family: 'Quicksand', sans-serif;
  font-weight: 500;
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  color: rgba(240, 244, 248, 0.5);
  animation: fadeSlideUp 0.8s ease-out 1s both;
}

/* ===== MESSAGE CARD ===== */
.message-card {
  position: relative;
  z-index: 2;
  max-width: 640px;
  width: 100%;
  background: linear-gradient(160deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(111, 207, 151, 0.15);
  border-radius: 32px;
  padding: 3rem 2.5rem;
  animation: cardAppear 1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 80px rgba(111, 207, 151, 0.05);
}

.card-glow {
  position: absolute;
  inset: -2px;
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(111,207,151,0.2), rgba(242,201,76,0.1), rgba(187,107,217,0.15));
  z-index: -1;
  filter: blur(4px);
  opacity: 0.6;
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.4; filter: blur(4px); }
  50% { opacity: 0.8; filter: blur(8px); }
}

@keyframes cardAppear {
  0% { opacity: 0; transform: scale(0.8) translateY(40px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ===== MESSAGE HEADER ===== */
.message-header {
  text-align: center;
  margin-bottom: 2rem;
}

.header-icon {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 0.5rem;
  animation: bounceIcon 2s ease-in-out infinite;
}

@keyframes bounceIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.message-title {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.title-line {
  display: block;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  line-height: 1.2;
  color: #f0f4f8;
}

.title-line.highlight {
  background: linear-gradient(135deg, #6fcf97, #f2c94c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: clamp(1.8rem, 5vw, 3rem);
}

/* ===== MESSAGE BODY ===== */
.message-body {
  margin-bottom: 1.5rem;
}

.greeting {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: #6fcf97;
  margin-bottom: 1rem;
}

.letter-text p {
  font-family: 'Quicksand', sans-serif;
  font-weight: 400;
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  line-height: 1.7;
  color: rgba(240, 244, 248, 0.85);
  margin-bottom: 0.8rem;
}

.sign-off {
  margin-top: 1.2rem !important;
  color: rgba(240, 244, 248, 0.6) !important;
  font-style: italic;
}

.signature {
  font-family: 'Fredoka', sans-serif !important;
  font-weight: 700 !important;
  font-size: clamp(1.1rem, 2vw, 1.3rem) !important;
  color: #6fcf97 !important;
  margin-top: 0.3rem !important;
}

.message-emoji-row {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.5rem;
  font-size: 1.5rem;
  opacity: 0.7;
  animation: emojiSlide 1s ease-out 0.5s both;
}

@keyframes emojiSlide {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 0.7; transform: translateY(0); }
}

/* ===== CONFETTI ===== */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) rotate(720deg) scale(0.5);
    opacity: 0;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeSlideUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .cover-section,
  .message-section {
    padding: 1.5rem;
  }

  .message-card {
    padding: 2rem 1.5rem;
    border-radius: 24px;
  }

  .cta-button {
    padding: 1rem 2rem;
  }

  .floating-deco {
    opacity: 0.08;
  }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0d1b2a; }
::-webkit-scrollbar-thumb { background: #6fcf97; border-radius: 3px; }

::selection {
  background: rgba(111, 207, 151, 0.3);
  color: #f0f4f8;
}