/* =====================================================
   LUCAS & MARILENE — CONVITE DIGITAL
   ===================================================== */

/* -----------------------------------------------------
   FONTES PERSONALIZADAS
   Coloque os arquivos de fonte na pasta /fonts/
   (Hello Bride Script e English111 Vivace BT são fontes
   licenciadas — não estão disponíveis via Google Fonts)
----------------------------------------------------- */
@font-face {
  font-family: "English111 Vivace BT";
  src: url("fonts/English111VivaceBT.woff2") format("woff2"),
       url("fonts/English111VivaceBT.ttf") format("truetype");
  font-display: swap;
}

:root {
  --gold: #AB8B49;
  --gold-soft: #c7a96b;
  --white: #ffffff;
  --cream: #faf7f1;
  --ink: #3a2f1f;

  --font-script: "Allura", "Snell Roundhand", cursive;
  --font-display: "English111 Vivace BT", "Cinzel", serif;
  --font-body: "Cinzel", serif;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--gold);
  background: var(--cream);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.hidden { display: none !important; }

/* =====================================================
   TELA DE ABERTURA — ENVELOPE EM VÍDEO
   ===================================================== */
#envelope-screen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: #0c0c0c;
  z-index: 1000;
  overflow: hidden;
}

#envelope-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#open-trigger {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 12%;
  background: transparent;
}

.open-text {
  font-family: "Cinzel", serif;   /* era: var(--font-script) */
  font-size: 20px;
  color: var(--white);
  text-shadow: 0 2px 14px rgba(0,0,0,.45);
  letter-spacing: .5px;
  animation: pulse-soft 2.6s ease-in-out infinite;
}

@keyframes pulse-soft {
  0%, 100% { opacity: .65; transform: translateY(0); }
  50%      { opacity: 1;   transform: translateY(-4px); }
}

#envelope-screen.playing #open-trigger { display: none; }

/* =====================================================
   VÉU DE TRANSIÇÃO (fade + blur branco)
   ===================================================== */
#transition-veil {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(0px);
  transition: opacity 1.1s var(--ease), backdrop-filter 1.1s var(--ease);
}

#transition-veil.active {
  opacity: 1;
  backdrop-filter: blur(18px);
}

/* =====================================================
   BOTÃO DE MÚSICA FLUTUANTE
   ===================================================== */
.music-btn {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  right: 18px;
  z-index: 500;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  transition: opacity .6s var(--ease), transform .3s var(--ease);
}

.music-btn:active { transform: scale(.92); }
.music-btn svg { width: 24px; height: 24px; }
.music-btn .icon-mute { display: none; }
.music-btn.muted .icon-sound { display: none; }
.music-btn.muted .icon-mute { display: block; }

/* =====================================================
   FUNDO DE PAPEL (FIXO)
   ===================================================== */
.paper-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("https://i.ibb.co/tMHv4c12/papel.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

#site {
  position: relative;
  width: 100%;
}

/* =====================================================
   SCROLL REVEAL
   ===================================================== */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .open-text { animation: none; }
}

/* =====================================================
   SEÇÃO 1 — CAPA
   ===================================================== */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6vh 0;
}

.hero-photo {
  width: 100%;
  height: 100%;
  max-height: 100vh;
  object-fit: contain;
  margin: 0 auto;
}

.hero-names {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: none;
}

.hero-names .name {
  font-family: var(--font-script);
  font-size: clamp(44px, 12.1vw, 70px);
  color: var(--white);
  text-shadow: 0 2px 18px rgba(0,0,0,.4);
  line-height: 1;
}

.hero-names .amp {
  font-family: var(--font-script);
  font-size: clamp(24px, 6vw, 32px);
  color: var(--white);
  text-shadow: 0 2px 14px rgba(0,0,0,.4);
  margin: 2px 0;
}

/* =====================================================
   SEÇÃO 2 — VERSÍCULO
   ===================================================== */
.verse {
  padding: 14vh 8% 10vh;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.verse-text {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(18px, 3.6vw, 18px);
  line-height: 1.8;
  letter-spacing: .3px;
  margin: 0 0 18px;
}

.verse-ref {
  display: block;
  font-size: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 36px;
  opacity: .85;
}

.monogram {
  width: 95px;
  margin: 0 auto;
  opacity: .9;
}

.verse-names {
  font-family: var(--font-script);
  font-size: clamp(40px, 7vw, 50px);
  color: var(--gold);
  margin: 16px 0 0;
}

/* =====================================================
   SEÇÃO 3 — TEXTO DO CONVITE / DATA
   ===================================================== */
.invite-text {
  padding: 8vh 8% 12vh;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.blessing {
  font-size: clamp(18px, 3.6vw, 18px);
  line-height: 1.9;
  letter-spacing: .4px;
  margin: 0 0 28px;
}

.big-date {
  font-family: var(--font-display);
  font-size: clamp(25px, 5vw, 38px);
  line-height: 1;
  margin: 0 0 10px;
  letter-spacing: .5px;
}

.time-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0;
}

/* =====================================================
   CERIMÔNIA / RECEPÇÃO
   ===================================================== */
.venue {
  padding: 10vh 8%;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.venue-photo {
  width: 100%;
  max-width: 250px;
  margin: 0 auto 28px;
  border-radius: 4px;
}

.venue-title {
  font-family: var(--font-script);
  font-size: clamp(42px, 7vw, 42px);
  margin: 0 0 18px;
  font-weight: 400;
}

.venue-address {
  font-size: 20px;
  line-height: 2;
  letter-spacing: .3px;
  margin: 0 0 30px;
}

.reception { padding-top: 4vh; }

/* =====================================================
   BOTÕES DOURADOS
   ===================================================== */
.gold-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 13px 32px;
  background: var(--gold);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
  box-shadow: 0 6px 18px rgba(171,139,73,.28);
}

.gold-btn:active { transform: scale(.96); }
.gold-btn:hover { background: var(--gold-soft); }
.icon-btn svg { width: 18px; height: 18px; }

/* =====================================================
   CONTAGEM REGRESSIVA
   ===================================================== */
.countdown {
  padding: 12vh 6% 14vh;
  text-align: center;
}

.countdown-label {
  font-family: var(--font-script);
  font-size: clamp(42px, 6.5vw, 60px);
  margin: 0 0 20px;
}

.countdown-grid {
  display: flex;
  justify-content: center;
  gap: 12px;
  max-width: 420px;
  margin: 0 auto;
}

.count-item {
  flex: 1;
  background: var(--gold);
  color: var(--white);
  border-radius: 6px;
  padding: 16px 4px 14px;
  position: relative;
  box-shadow: 0 8px 22px rgba(171,139,73,.3);
}

.count-item::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 4px;
  pointer-events: none;
}

.count-num {
  display: block;
  font-family: var(--font-body);
  font-size: clamp(22px, 6vw, 30px);
  font-weight: 600;
  line-height: 1;
}

.count-unit {
  display: block;
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-top: 6px;
  opacity: .92;
}

/* =====================================================
   PRESENTES + CONFIRMAÇÃO
   ===================================================== */
.actions {
  padding: 6vh 8% 12vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.actions .gold-btn { width: 100%; max-width: 320px; }

/* =====================================================
   GALERIA
   ===================================================== */
.gallery {
  padding: 6vh 8% 14vh;
  text-align: center;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 480px;
  margin: 28px auto 0;
}

.gallery-thumb {
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 4px;
  padding: 0;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease);
}

.gallery-thumb:active img { transform: scale(1.06); }

/* =====================================================
   LIGHTBOX
   ===================================================== */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(10,8,5,.96);
  display: flex;
  align-items: center;
}

#lightbox-close {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: 18px;
  z-index: 10;
  width: 44px;
  height: 44px;
  font-size: 30px;
  line-height: 1;
  color: var(--white);
}

#lightbox-track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

#lightbox-track::-webkit-scrollbar { display: none; }

.lightbox-img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  scroll-snap-align: center;
  transition: transform .35s var(--ease);
}

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
  padding: 8vh 8% 10vh;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.footer-names {
  font-family: var(--font-script);
  font-size: clamp(50px, 6vw, 32px);
}

.footer-date {
  font-size: 25px;
  letter-spacing: 3px;
}

/* =====================================================
   DESKTOP
   ===================================================== */
@media (min-width: 760px) {
  body { background: #f1ece1; }

  #envelope-screen, #site, #lightbox {
    max-width: 480px;
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
  }

  #envelope-screen { box-shadow: 0 0 80px rgba(0,0,0,.4); }

  .music-btn { right: calc(50% - 240px + 18px); }

  #site { box-shadow: 0 0 60px rgba(0,0,0,.08); }
}
