:root {
  --rose:       #e8647a;
  --rose-dark:  #c94d62;
  --rose-light: #fce8ec;
  --cream:      #fffaf8;
  --gold:       #c9a96e;
}

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

body {
  font-family: 'Lato', sans-serif;
  overflow-x: hidden;
  background: linear-gradient(160deg, #1a0a0e 0%, #3b1020 40%, #220d15 70%, #1a0a0e 100%);
  background-attachment: fixed;
}

#petals-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
}

/* SPLASH */
#splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #1a0a0e 0%, #3b1020 50%, #1a0a0e 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: opacity .6s, visibility .6s;
}
#splash.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-hearts { font-size: 48px; animation: pulse 1.4s ease-in-out infinite; }
.splash-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: var(--rose-light);
  text-align: center;
  padding: 0 20px;
}
.splash-tap { color: #a07080; font-size: .82rem; letter-spacing: .06em; }
.btn-reveal {
  background: var(--rose);
  color: #fff;
  border: none;
  padding: 14px 40px;
  border-radius: 50px;
  font-size: 1rem;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  letter-spacing: .06em;
  transition: background .25s;
  animation: float 2.5s ease-in-out infinite;
}
.btn-reveal:hover { background: var(--rose-dark); }

/* MAIN */
#main { opacity: 0; transition: opacity .8s; }
#main.visible { opacity: 1; }

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}
.hero-emoji { font-size: 52px; margin-bottom: 12px; animation: pulse 2s infinite; }
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 6vw, 3.6rem);
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.2;
}
.hero-since { color: #e0b0bb; font-size: 1.05rem; letter-spacing: .08em; margin-bottom: 36px; }
.counter-grid { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin-bottom: 20px; }
.counter-box {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(232,100,122,.35);
  border-radius: 16px;
  padding: 18px 24px;
  min-width: 90px;
  backdrop-filter: blur(8px);
}
.counter-num { font-family: 'Playfair Display', serif; font-size: 2.6rem; color: var(--rose); display: block; line-height: 1; }
.counter-label { font-size: .72rem; color: #d4a0ac; letter-spacing: .1em; text-transform: uppercase; margin-top: 4px; }
.counter-clock {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(232,100,122,.2);
  border-radius: 50px;
  padding: 10px 28px;
  font-family: monospace;
  font-size: 1.5rem;
  color: var(--rose-light);
  letter-spacing: .08em;
}
.hero-days { color: #c9a0b0; font-size: .9rem; margin-top: 12px; }

/* SEÇÕES */
.music-section, .message-section, .gallery-section, .timeline-section, .share-section {
  padding: 70px 20px;
  text-align: center;
  background: transparent;
}
.section-label { font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--rose); margin-bottom: 8px; }
.section-title { font-family: 'Playfair Display', serif; font-size: clamp(1.6rem, 4vw, 2.4rem); color: #c9a0b0; margin-bottom: 8px; }
.section-sub { color: #d4a0ac; font-size: .95rem; margin-bottom: 32px; }

/* MÚSICA */
.music-embed-wrap {
  max-width: 440px;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(232,100,122,.25);
}

/* MENSAGEM */
.quote-mark {
  font-size: 5rem; line-height: .6; color: var(--rose);
  font-family: 'Playfair Display', serif; opacity: .4;
  display: block; margin-bottom: -10px;
}
.quote-close { transform: rotate(180deg); display: inline-block; }
.message-text {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  color: var(--rose-light);
  line-height: 1.8;
  max-width: 680px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════
   CARROSSEL AUTOPLAY
   ─────────────────────────────────────────
   .carousel        → janela visível (overflow:hidden)
   .carousel img    → todas as fotos empilhadas, uma
                       de cada vez via opacity + z-index
   ═══════════════════════════════════════════ */
.carousel {
  position: relative;
  max-width: 720px;
  margin: 32px auto 0;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 4/3;         /* mantém proporção fixa */
  cursor: pointer;
}

/* todas as fotos ficam sobrepostas */
.carousel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .8s ease;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

/* foto ativa */
.carousel img.active {
  opacity: 1;
  z-index: 1;
}

/* setas */
.car-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,.8);
  border: none;
  border-radius: 50%;
  width: 42px; height: 42px;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s;
}
.car-arrow:hover { background: #fff; }
.car-prev { left: 12px; }
.car-next { right: 12px; }

/* contador */
.car-counter {
  position: absolute;
  top: 12px; right: 14px;
  z-index: 10;
  background: rgba(0,0,0,.55);
  color: #fff;
  border-radius: 50px;
  padding: 4px 12px;
  font-size: .8rem;
  backdrop-filter: blur(4px);
}

/* bolinhas */
.car-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 7px;
}
.car-dots button {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.4);
  cursor: pointer;
  padding: 0;
  transition: background .25s, transform .25s;
}
.car-dots button.active {
  background: var(--rose);
  transform: scale(1.35);
}

/* LINHA DO TEMPO */
.timeline { max-width: 600px; margin: 40px auto 0; position: relative; padding-left: 32px; text-align: left; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: linear-gradient(to bottom, var(--rose), #f9d0da); }
.tl-item { position: relative; margin-bottom: 44px; }
.tl-dot { position: absolute; left: -28px; top: 4px; width: 14px; height: 14px; background: var(--rose); border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 3px rgba(232,100,122,.25); }
.tl-date { font-size: .78rem; letter-spacing: .1em; color: var(--rose); text-transform: uppercase; margin-bottom: 4px; }
.tl-title { font-family: 'Playfair Display', serif; font-size: 1.1rem; color: var(--cream); margin-bottom: 10px; }
.tl-img { width: 100%; border-radius: 14px; object-fit: cover; max-height: 600px; }

/* COMPARTILHAR */
.share-title { font-family: 'Playfair Display', serif; font-size: clamp(1.5rem, 4vw, 2.2rem); color: #fff; margin-bottom: 8px; }
.share-sub { color: #d4a0ac; font-size: .9rem; margin-bottom: 28px; }
.share-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.share-btn {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff; border-radius: 50px;
  padding: 12px 24px; font-size: .9rem;
  cursor: pointer; transition: background .2s;
  font-family: 'Lato', sans-serif; text-decoration: none;
}
.share-btn:hover { background: rgba(255,255,255,.2); }

/* FOOTER */
footer { background: rgba(0,0,0,.3); border-top: 1px solid rgba(232,100,122,.2); padding: 28px 20px; text-align: center; color: var(--gold); }

/* ═══════════════════════════════════════════
   SEGURANÇA — proteção de conteúdo
   ═══════════════════════════════════════════ */

/* bloqueia seleção de texto em toda a página */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

/* impede arrastar imagens e vídeos */
img, video {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}

/* remove pointer-events apenas das mídias do carrossel e timeline
   (setas e bolinhas continuam clicáveis via z-index) */
.carousel img,
.carousel video,
.tl-img {
  pointer-events: none;
}

/* oculta barra de download nativa em alguns browsers */
video::-webkit-media-controls-download-button { display: none; }
video::--webkit-media-controls-enclosure { overflow: hidden; }

/* KEYFRAMES */
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

@media (max-width: 768px) {

  /* HERO */
  .hero { padding: 40px 16px; }
  .hero h1 { font-size: 2rem; }
  .counter-clock { font-size: 1.2rem; padding: 8px 20px; }

  /* CARROSSEL — ocupa toda a largura na tela pequena */
  .carousel {
    max-width: 100%;
    border-radius: 12px;
    aspect-ratio: 3/4;   /* mais alto que largo, melhor para fotos de celular */
  }
  .car-arrow {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }
  /* bolinhas menores — 13 delas numa tela pequena fica apertado */
  .car-dots button { width: 6px; height: 6px; }

  /* MÚSICA */
  .music-embed-wrap { max-width: 100%; }

  /* MENSAGEM */
  .message-text { font-size: 1rem; padding: 0 8px; }
  .quote-mark { font-size: 3.5rem; }

  /* LINHA DO TEMPO */
  .timeline { padding-left: 24px; }
  .tl-title { font-size: 1rem; }
  .tl-img { max-height: 400px; }

  /* SEÇÕES — menos padding lateral */
  .music-section,
  .message-section,
  .gallery-section,
  .timeline-section,
  .share-section { padding: 50px 16px; }

  /* FOOTER */
  footer { padding: 20px 16px; font-size: .9rem; }
  .car-dots {
    max-width: 90%;
    flex-wrap: wrap;        /* quebra linha se tiver muitas bolinhas */
    justify-content: center;
    gap: 5px;
    bottom: 8px;}
}
