/* ============================================================
   CONVITE ABEL — ESTILOS
   Constância visual: uma paleta única (extraída do banner e
   das referências), mesma textura e tipografia nas duas telas.
   ============================================================ */

:root {
  /* --- Paleta: VERDE como cor principal + apoios coloridos --- */
  /* Verdes (marca) */
  --verde:      #6ba368;   /* verde folha, cor dominante */
  --verde-esc:  #4b7d4a;   /* verde profundo p/ títulos/data */
  --verde-cl:   #9cc79a;   /* verde claro p/ realces */
  --sage:       #8b9e77;   /* verde-sálvia (dos elementos gráficos) */

  /* Apoios coloridos */
  --serenity:   #a9c3d9;   /* azul suave (balões/banner) */
  --azul-poeira:#8fb0c7;
  --dourado:    #c9a24b;
  --dourado-cl: #e3c987;
  --coral:      #e8a07a;   /* toque quente/alegre */
  --amber:      #e6b85c;

  /* Neutros / papel */
  --creme:      #f6efe1;
  --papel:      #f3ecdd;
  --oliva:      #8b9e77;
  --oliva-esc:  #567a4f;
  --grafite:    #3b4a37;
  --grafite-cl: #647059;

  /* --- Tipografia --- */
  --f-script: "Great Vibes", cursive;
  --f-titulo: "Cormorant Garamond", serif;
  --f-corpo:  "Inter", system-ui, sans-serif;

  --sombra-suave: 0 10px 30px rgba(70, 80, 63, .16);
  --sombra-btn:   0 6px 18px rgba(70, 80, 63, .20);
  --radius: 22px;
}

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

html, body { height: 100%; }

body {
  font-family: var(--f-corpo);
  color: var(--grafite);
  background: var(--creme);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent; /* sem flash cinza ao tocar (mobile) */
  overflow-x: hidden;
}

/* Palco central: coluna vertical (mobile-first), limitada em telas grandes */
.stage {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;          /* usa a altura real da viewport no mobile (barra do navegador) */
  overflow: hidden;
  background: var(--papel);
  box-shadow: 0 0 60px rgba(70,80,63,.12);
}

/* Textura de papel/aquarela sutil, comum a todas as telas */
.stage::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 15%, rgba(255,255,255,.35), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(201,162,75,.06), transparent 45%);
  mix-blend-mode: soft-light;
  z-index: 40;
}

/* ============================================================
   Telas empilhadas (crossfade controlado por JS/GSAP)
   ============================================================ */
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
}
.screen[hidden] { display: none; }

/* ---------- Fundos das telas (banner e frame final) ---------- */
.bg {
  position: absolute; inset: 0;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
  z-index: 0;
}
#intro .bg { background-image: url("../Assets/Banner Inicial.png"); }

/* A tela de detalhes NÃO tem imagem de fundo própria: o canvas (frame 050)
   fica atrás dela. O .bg aqui é apenas o véu de legibilidade sobre o canvas. */
#detalhes .bg {
  background: linear-gradient(180deg,
     rgba(246,239,225,0) 0%,
     rgba(246,239,225,.35) 38%,
     rgba(246,239,225,.82) 70%,
     rgba(246,239,225,.96) 100%);
}

/* ============================================================
   Elementos gráficos flutuantes (mesmos PNGs nas duas telas)
   ============================================================ */
.deco {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  opacity: .82;
  filter: blur(1.1px) drop-shadow(0 5px 9px rgba(70,80,63,.10));
  will-change: transform;
}
/* menores e mais discretos */
.deco--folha1 { width: 24%; top: -1%;  left: -6%;  transform: rotate(-8deg); }
.deco--nuvem  { width: 30%; top: 5%;   right: -5%; opacity: .7; filter: blur(1.6px); }
.deco--oliva  { width: 11%; top: 28%;  left: 5%; }
.deco--folha2 { width: 18%; bottom: 7%; right: -5%; transform: rotate(12deg); }
.deco--passaro{ width: 15%; top: 18%;  right: 7%; opacity: .9; filter: blur(.5px) drop-shadow(0 5px 9px rgba(70,80,63,.12)); }

/* Twinkle das estrelinhas (desenhadas em CSS sobre o topo) */
.stars { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.star {
  position: absolute;
  width: 8px; height: 8px;
  background: var(--dourado);
  clip-path: polygon(50% 0,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);
  opacity: .5;
  animation: twinkle 3.5s ease-in-out infinite;
}
@keyframes twinkle {
  0%,100% { opacity: .25; transform: scale(.8); }
  50%     { opacity: .9;  transform: scale(1.1); }
}

/* ============================================================
   INTRO — título e chamada
   ============================================================ */
#intro { justify-content: flex-start; }

.intro-top {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: clamp(6vh, 8vh, 10vh) 24px 0;
}
.intro-eyebrow {
  font-family: var(--f-titulo);
  font-size: clamp(14px, 4vw, 19px);
  letter-spacing: .32em;
  text-indent: .32em;           /* compensa o tracking p/ centralizar de verdade */
  text-transform: uppercase;
  color: var(--oliva-esc);
  opacity: .9;
  margin-bottom: clamp(6px, 1.4vh, 14px);
}
.intro-nome {
  font-family: var(--f-script);
  font-size: clamp(72px, 23vw, 122px);
  line-height: 1;
  color: var(--verde-esc);
  margin: 0;
  text-shadow: 0 3px 14px rgba(75,125,74,.30);
}
.intro-idade {
  font-family: var(--f-titulo);
  font-weight: 600;
  font-size: clamp(19px, 5.6vw, 28px);
  letter-spacing: .28em;
  text-indent: .28em;
  text-transform: uppercase;
  color: var(--dourado);
  margin-top: clamp(6px, 1.4vh, 14px);
}
.intro-idade::before,
.intro-idade::after { content: "·"; margin: 0 .5em; color: var(--dourado-cl); }

/* Chamada / botão entrar, ancorado embaixo */
.intro-cta {
  margin-top: auto;
  z-index: 10;
  text-align: center;
  padding: 26px 24px calc(5vh + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(246,239,225,0) 0%, rgba(246,239,225,.55) 34%, rgba(246,239,225,.85) 100%);
}
.btn-entrar {
  font-family: var(--f-titulo);
  font-weight: 600;
  font-size: clamp(16px, 4.6vw, 20px);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--grafite);
  background: rgba(246,239,225,.86);
  border: 1.5px solid var(--dourado);
  border-radius: 999px;
  padding: 15px 34px;
  cursor: pointer;
  box-shadow: var(--sombra-btn);
  backdrop-filter: blur(3px);
  transition: transform .25s ease, background .25s ease;
}
.btn-entrar { touch-action: manipulation; min-height: 50px; }
.btn-entrar:hover { transform: translateY(-2px); background: var(--creme); }
.btn-entrar:disabled { opacity: .5; cursor: default; }

.cta-hint {
  margin-top: 14px;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--grafite);
  text-shadow: 0 1px 3px rgba(246,239,225,.9);
}
.arrow-down {
  display: block;
  margin: 6px auto 0;
  width: 20px; height: 20px;
  border-right: 2px solid var(--dourado);
  border-bottom: 2px solid var(--dourado);
  transform: rotate(45deg);
  animation: bounce 1.6s ease-in-out infinite;
}
@keyframes bounce {
  0%,100% { transform: rotate(45deg) translate(0,0); opacity: .6; }
  50%     { transform: rotate(45deg) translate(4px,4px); opacity: 1; }
}

/* Botão de som (fixo no canto) */
.btn-som {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top, 0px)); right: 16px;
  z-index: 60;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1.5px solid var(--dourado);
  background: rgba(246,239,225,.8);
  color: var(--grafite);
  cursor: pointer;
  display: grid; place-items: center;
  backdrop-filter: blur(3px);
  box-shadow: var(--sombra-btn);
}
.btn-som svg { width: 20px; height: 20px; }
.btn-som[hidden] { display: none; }

/* ============================================================
   CANVAS do portão
   ============================================================ */
#gate {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 30;
  display: block;
}
#gate[hidden] { display: none; }
/* Após o vídeo, o canvas vira o fundo fixo da tela de detalhes (sem gap) */
#gate.gate--fundo { z-index: 15; }

/* Tela de carregamento (preload dos frames) */
.loader {
  position: absolute; inset: 0;
  z-index: 70;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 18px;
  background: var(--papel);
  color: var(--grafite);
}
.loader[hidden] { display: none; }
.loader .l-nome { font-family: var(--f-script); font-size: 68px; color: var(--verde-esc); }
.loader .l-barra { width: 180px; height: 4px; border-radius: 4px; background: rgba(70,80,63,.15); overflow: hidden; }
.loader .l-fill { height: 100%; width: 0%; background: var(--dourado); transition: width .2s ease; }
.loader .l-txt { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--grafite-cl); }

/* ============================================================
   DETALHES — informações + botões
   ============================================================ */
#detalhes {
  overflow-y: auto;
  z-index: 20;
}
.detalhes-inner {
  position: relative;
  z-index: 10;
  margin-top: auto;               /* empurra conteúdo p/ metade de baixo (paisagem em cima) */
  padding: clamp(20px, 4vh, 44px) 26px calc(clamp(20px, 3.5vh, 38px) + env(safe-area-inset-bottom, 0px));
  text-align: center;
}

.d-eyebrow {
  font-family: var(--f-titulo);
  letter-spacing: .3em;
  text-transform: uppercase;
  font-size: 14px;
  color: var(--oliva-esc);
}
.d-nome {
  font-family: var(--f-script);
  font-size: clamp(56px, 18vw, 92px);
  line-height: .95;
  color: var(--verde-esc);
  margin: 2px 0;
}
.d-idade {
  font-family: var(--f-titulo);
  letter-spacing: .26em;
  text-transform: uppercase;
  font-size: 17px;
  color: var(--dourado);
  margin-bottom: clamp(10px, 1.6vh, 18px);
}

.divisor {
  width: 60px; height: 1.5px;
  background: var(--dourado);
  margin: clamp(8px, 1.4vh, 14px) auto;
  position: relative;
}
.divisor::before {
  content: "❧";
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  background: var(--papel);
  color: var(--dourado);
  padding: 0 10px;
  font-size: 15px;
}

.d-info { margin: clamp(4px, 0.8vh, 8px) 0; }
.d-info .rot {
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--grafite-cl);
}
.d-data {
  font-family: var(--f-titulo);
  font-weight: 600;
  font-size: clamp(26px, 8vw, 38px);
  color: var(--verde-esc);
  letter-spacing: .04em;
}
.d-local {
  font-family: var(--f-titulo);
  font-size: clamp(18px, 5vw, 22px);
  color: var(--grafite);
}
.d-end { font-size: 13px; color: var(--grafite-cl); margin-top: 2px; }

/* Contagem regressiva */
.countdown {
  display: flex; justify-content: center; gap: clamp(6px, 2vw, 10px);
  margin: clamp(12px, 2vh, 20px) 0 clamp(4px, 1vh, 6px);
}
.cd-cell {
  flex: 1; max-width: 72px;
  background: rgba(246,239,225,.7);
  border: 1px solid rgba(107,163,104,.45);
  border-radius: 14px;
  padding: clamp(6px, 1.2vh, 9px) 4px;
  box-shadow: var(--sombra-suave);
}
.cd-num { font-family: var(--f-titulo); font-weight: 600; font-size: clamp(22px, 6vw, 26px); color: var(--verde-esc); line-height: 1; }
.cd-lab { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--grafite-cl); margin-top: 4px; }

/* Botão PRINCIPAL: confirmar presença (CTA de destaque) */
.acao-principal {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  margin: clamp(16px, 3vh, 26px) 0 clamp(10px, 1.6vh, 14px);
  min-height: clamp(52px, 7vh, 58px);
  padding: 14px 20px;
  white-space: nowrap;             /* não quebra "Confirmar presença" em 2 linhas */
  font-family: var(--f-titulo); font-weight: 600;
  font-size: clamp(16px, 4.6vw, 19px); letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--verde), var(--verde-esc));
  border: 2px solid var(--dourado);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(75,125,74,.34);
  touch-action: manipulation;
  transition: transform .2s ease, box-shadow .2s ease;
}
.acao-principal svg {
  width: 22px; height: 22px; stroke: #fff; fill: none;
  flex-shrink: 0;
}
.acao-principal:hover,
.acao-principal:active {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(75,125,74,.42);
}

/* Ações secundárias (círculos menores) */
.acoes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 10px;
}
.acao {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer; padding: 0;
  color: var(--grafite);
  touch-action: manipulation;
}
.acao-circulo {
  width: clamp(50px, 14vw, 58px); height: clamp(50px, 14vw, 58px);
  border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, var(--verde-cl), var(--verde));
  border: 2px solid var(--dourado);
  box-shadow: var(--sombra-btn);
  transition: transform .2s ease;
}
/* Cada ação com sua cor -> visual mais colorido e fácil de distinguir */
.acao--local .acao-circulo { background: radial-gradient(circle at 35% 30%, var(--serenity), var(--azul-poeira)); }
.acao--pix   .acao-circulo { background: radial-gradient(circle at 35% 30%, #f0b892, var(--coral)); }
.acao--cal   .acao-circulo { background: radial-gradient(circle at 35% 30%, var(--dourado-cl), var(--amber)); }
.acao:hover .acao-circulo,
.acao:active .acao-circulo { transform: translateY(-3px) scale(1.04); }
.acao-circulo svg { width: 28px; height: 28px; stroke: #fff; fill: none; }
.acao-label { font-size: 11px; line-height: 1.15; letter-spacing: .02em; color: var(--grafite); max-width: 74px; }

.rodape {
  margin-top: 20px;
  font-size: 12px; letter-spacing: .1em;
  color: var(--grafite-cl);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.rodape svg { width: 16px; height: 16px; fill: var(--dourado); }

/* ============================================================
   MODAIS
   ============================================================ */
.modal {
  position: fixed; inset: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 22px;
  background: rgba(59,74,55,.45);
  backdrop-filter: blur(3px);
  overflow-y: auto;                 /* rola se o card for mais alto que a tela */
  -webkit-overflow-scrolling: touch;
}
.modal[hidden] { display: none; }
.modal-card {
  width: 100%; max-width: 380px;
  max-height: calc(100dvh - 44px);
  overflow-y: auto;
  background: var(--papel);
  border: 1.5px solid var(--dourado);
  border-radius: var(--radius);
  padding: 26px 24px;
  text-align: center;
  box-shadow: var(--sombra-suave);
  position: relative;
}
.modal-card h3 {
  font-family: var(--f-titulo);
  font-weight: 600;
  font-size: 26px;
  color: var(--verde-esc);
  margin-bottom: 4px;
}
.modal-card p { font-size: 14px; color: var(--grafite-cl); margin-bottom: 16px; }
.modal-close {
  position: absolute; top: 6px; right: 8px;
  width: 40px; height: 40px;        /* alvo de toque confortável */
  background: none; border: none; font-size: 24px;
  color: var(--grafite-cl); cursor: pointer; line-height: 1;
}

.campo { text-align: left; margin-bottom: 14px; }
.campo label { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--grafite-cl); margin-bottom: 6px; }
.campo input, .campo select {
  width: 100%;
  font-family: var(--f-corpo); font-size: 15px;
  padding: 11px 13px;
  border: 1px solid rgba(70,80,63,.25);
  border-radius: 12px;
  background: #fff;
  color: var(--grafite);
}
.campo input, .campo select { min-height: 46px; } /* alvo de toque mobile */
.campo input:focus, .campo select:focus { outline: 2px solid var(--verde); border-color: transparent; }

.btn-cheio {
  width: 100%;
  font-family: var(--f-titulo); font-weight: 600;
  font-size: 16px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--creme);
  background: var(--oliva-esc);
  border: none; border-radius: 12px;
  padding: 13px; cursor: pointer;
  box-shadow: var(--sombra-btn);
  transition: background .2s ease;
}
.btn-cheio:hover { background: var(--grafite); }

/* Tabela de medidas (sugestão de presente) */
.tab-medidas {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 6px;
  text-align: left;
}
.tab-medidas th[scope="row"] {
  font-family: var(--f-corpo); font-weight: 500;
  font-size: 14px; color: var(--grafite);
  padding: 11px 6px;
  border-bottom: 1px solid rgba(107,163,104,.28);
}
.tab-medidas td {
  font-family: var(--f-titulo); font-weight: 600;
  font-size: 17px; color: var(--verde-esc);
  text-align: right;
  padding: 11px 6px;
  border-bottom: 1px solid rgba(107,163,104,.28);
}
.tab-medidas tr:last-child th,
.tab-medidas tr:last-child td { border-bottom: none; }

.presente-cores {
  margin-top: 14px;
  font-size: 13px; color: var(--grafite-cl);
  line-height: 1.5;
}
.presente-cores .cores-rot {
  display: block;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--verde); margin-bottom: 2px;
}

.msg-ok {
  color: var(--oliva-esc);
  font-family: var(--f-titulo); font-size: 20px;
  padding: 8px 0;
}

/* Reduz movimento para quem prefere */
@media (prefers-reduced-motion: reduce) {
  .arrow-down, .star, .deco { animation: none !important; }
}
