/* ============================================================
   AVANCE UP — Landing Page 3D
   Mobile-first · sem frameworks · pronto para Hostinger
   Fonts alojadas localmente (sem Google Fonts → melhor RGPD)
   ============================================================ */

/* ---------- Fonts locais (ficheiros variáveis) ---------- */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/montserrat.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter.woff2") format("woff2");
}

:root {
  /* Cores oficiais AVANCE UP — ver kit de marca no Obsidian */
  --bg: #161513;
  --bg-alt: #1E1D1B;
  --card: #26241F;
  --text: #F4F1EA;
  --muted: #A9A296;
  --gold: #FFB300;        /* Amarelo Avance */
  --gold-bright: #FFC533; /* Amarelo claro (hover) */
  --line: rgba(255, 179, 0, 0.22);
  --wa-green: #25D366;
  --font-display: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; }

/* Garante que nada decorativo cause scroll lateral no telemóvel */
html, body { overflow-x: clip; }

/* O atributo hidden vence qualquer display definido abaixo */
[hidden] { display: none !important; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Universo 3D (canvas fixo atrás do conteúdo) ---------- */

#scene3d {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* Textura de grão subtil por cima de tudo */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.4rem;
}

.container-narrow { max-width: 760px; }

/* ---------- Tipografia ---------- */

h1, h2, h3, .price, .step-num, .statement {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.14;
}

h1 {
  font-size: clamp(2.2rem, 8vw, 4rem);
  letter-spacing: -0.02em;
  font-weight: 800;
}

h2 {
  font-size: clamp(1.7rem, 5.5vw, 2.6rem);
  letter-spacing: -0.015em;
  margin-bottom: 1.2rem;
}

h1 em, h2 em, .statement em {
  font-style: normal;
  color: var(--gold);
}

.overline {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
}

.lead {
  font-size: clamp(1.05rem, 3.5vw, 1.25rem);
  color: var(--muted);
  max-width: 34em;
  margin: 1.4rem auto 0;
}

.lead strong { color: var(--text); }

/* ---------- Botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 1.8rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #171207;
  box-shadow: 0 8px 28px rgba(255, 179, 0, 0.28);
  border: 0;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 34px rgba(255, 179, 0, 0.4);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.btn-small { padding: 0.55rem 1.15rem; font-size: 0.85rem; }

.icon-wa { width: 1.15em; height: 1.15em; flex: none; }

/* ---------- Cabeçalho ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 12, 10, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 179, 0, 0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
}

.brand span { color: var(--gold); font-weight: 800; }

.brand img { display: block; height: 24px; width: auto; }

.footer-inner .brand img { height: 30px; margin: 0 auto; }

.header-nav { display: none; }

.header-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.header-nav a:hover { color: var(--gold-bright); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(5rem, 14vw, 9rem) 0 clamp(4rem, 10vw, 7rem);
}

.hero-glow {
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 130vw;
  max-width: 1400px;
  aspect-ratio: 1.6;
  background: radial-gradient(ellipse at center, rgba(255, 179, 0, 0.1) 0%, transparent 62%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  will-change: transform; /* recebe o parallax do rato via JS */
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  margin-top: 2.2rem;
}

.hero-note {
  margin-top: 1.1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Secções ---------- */

.section { padding: clamp(4rem, 10vw, 7rem) 0; }

/* Ligeiramente translúcido para o universo 3D brilhar através */
.section-alt {
  background: rgba(30, 29, 27, 0.78);
  border-top: 1px solid rgba(255, 179, 0, 0.1);
  border-bottom: 1px solid rgba(255, 179, 0, 0.1);
}

.statement {
  font-size: clamp(2.1rem, 7vw, 3.4rem);
  margin-bottom: 1.6rem;
}

.split p, p.split {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 40em;
}

.split em { color: var(--text); }

.section-intro { color: var(--muted); }

.closing {
  margin-top: 2.4rem;
  font-size: 1.1rem;
  max-width: 38em;
  color: var(--muted);
}

.closing strong, .closing em { color: var(--gold-bright); }

/* ---------- Cartões de dor ---------- */

.cards-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2.4rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem;
}

.card.pain p { color: var(--muted); }
.card.pain strong { color: var(--text); }

.card.pain::before {
  content: "—";
  display: block;
  color: var(--gold);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

/* ---------- Passos ---------- */

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2.6rem;
}

.step-num {
  display: block;
  font-size: 3rem;
  font-weight: 800;
  color: var(--gold);
  opacity: 0.9;
  line-height: 1;
  margin-bottom: 0.6rem;
}

.step h3 { font-size: 1.35rem; margin-bottom: 0.4rem; }

.step p { color: var(--muted); font-size: 0.97rem; max-width: 30em; }

.highlight-strip {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-top: 3rem;
  padding: 1.4rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 179, 0, 0.1), rgba(255, 179, 0, 0.02));
  color: var(--muted);
  font-size: 0.98rem;
}

.highlight-strip .big {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.4rem;
  color: var(--gold-bright);
  line-height: 1;
  flex: none;
}

/* ---------- Portfólio / Vídeos (16:9, click-to-load RGPD) ---------- */

.video-featured {
  max-width: 880px;
  margin: 2.2rem auto 0;
}

.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin: 1.2rem 0 1rem;
}

.video-slot {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 50% 120%, rgba(255, 179, 0, 0.12), transparent 65%),
    var(--card);
}

.video-slot iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-facade,
.video-slot.is-soon .video-soon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 1.2rem;
  text-align: center;
  background: transparent;
  border: 0;
  color: var(--text);
  font-family: var(--font-body);
}

.video-facade { cursor: pointer; }

.video-facade:hover .play-btn {
  transform: scale(1.1);
  box-shadow: 0 10px 34px rgba(255, 179, 0, 0.45);
}

.video-facade:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

.video-cat {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.video-featured .video-cat { font-size: 1.35rem; }

.play-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #171207;
  box-shadow: 0 8px 28px rgba(255, 179, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.play-btn svg { width: 1.6rem; height: 1.6rem; margin-left: 2px; }

.video-featured .play-btn { width: 4.2rem; height: 4.2rem; }

.video-desc {
  color: var(--muted);
  font-size: 0.85rem;
  max-width: 30em;
}

.video-consent-note {
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.8;
}

/* Quando o utilizador aceitou tudo, o aviso deixa de ser necessário */
body.consent-all .video-consent-note { display: none; }

.soon-badge {
  display: inline-block;
  border: 1px dashed var(--line);
  color: var(--gold-bright);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
}

.niches-title {
  font-size: 1.3rem;
  margin-top: 3rem;
  margin-bottom: 1.4rem;
}

.niches {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.niches li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1.05rem 0;
  border-top: 1px solid rgba(255, 179, 0, 0.14);
}

.niches li:last-child { border-bottom: 1px solid rgba(255, 179, 0, 0.14); }

.niches strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.12rem;
  letter-spacing: 0.01em;
}

.niches span { color: var(--muted); font-size: 0.92rem; }

/* ---------- Packs ---------- */

.packs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
  margin-top: 2.4rem;
}

.pack {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2rem 1.7rem;
  display: flex;
  flex-direction: column;
}

.pack-featured {
  border-color: var(--gold);
  background: linear-gradient(160deg, rgba(255, 179, 0, 0.14), var(--card) 55%);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

.badge {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: #171207;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.32rem 0.95rem;
  border-radius: 999px;
  white-space: nowrap;
}

.pack h3 { font-size: 1.45rem; }

.price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gold-bright);
  margin: 0.4rem 0 0.2rem;
}

.pack-tagline {
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 1.2rem;
}

.pack ul {
  list-style: none;
  margin-bottom: 1.6rem;
  flex-grow: 1;
}

.pack ul li {
  padding: 0.5rem 0 0.5rem 1.6rem;
  position: relative;
  color: var(--muted);
  font-size: 0.94rem;
  border-top: 1px solid rgba(255, 179, 0, 0.1);
}

.pack ul li strong { color: var(--text); }

.pack ul li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 1.05rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.75;
}

.pack .btn { width: 100%; }

.extras {
  margin-top: 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.4rem;
}

.extras strong { color: var(--gold-bright); }

/* ---------- FAQ ---------- */

.faq-list { margin-top: 2rem; }

.faq-list details {
  border-top: 1px solid rgba(255, 179, 0, 0.16);
}

.faq-list details:last-child { border-bottom: 1px solid rgba(255, 179, 0, 0.16); }

.faq-list summary {
  list-style: none;
  cursor: pointer;
  padding: 1.15rem 2.4rem 1.15rem 0;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 500;
  position: relative;
  transition: color 0.2s ease;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 0.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--gold);
  transition: transform 0.25s ease;
}

.faq-list details[open] summary { color: var(--gold-bright); }

.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }

.faq-list details p {
  padding: 0 0 1.3rem;
  color: var(--muted);
  font-size: 0.97rem;
  max-width: 42em;
}

/* ---------- CTA final ---------- */

.final-cta {
  text-align: center;
  background: radial-gradient(ellipse at 50% 120%, rgba(255, 179, 0, 0.12), transparent 65%);
}

.final-cta h2 { margin-bottom: 2rem; }

/* ---------- Rodapé ---------- */

.site-footer {
  border-top: 1px solid rgba(255, 179, 0, 0.14);
  padding: 3rem 0 2.4rem;
  text-align: center;
  background: rgba(22, 21, 19, 0.7);
}

.footer-inner .brand { font-size: 1.4rem; }

.footer-tagline {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.3rem;
}

.footer-contacts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.4rem;
  margin: 1.4rem 0;
}

.footer-contacts a {
  color: var(--gold-bright);
  text-decoration: none;
  font-size: 0.92rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.footer-contacts a:hover { border-color: var(--gold); }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  font-size: 0.85rem;
  margin-top: 0.4rem;
  color: var(--muted);
}

.footer-legal a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 179, 0, 0.25);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-legal a:hover { color: var(--gold-bright); border-color: var(--gold); }

.copyright { color: var(--muted); font-size: 0.8rem; margin-top: 0.9rem; }

/* ---------- Botão flutuante WhatsApp ---------- */

.wa-float {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 60;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  background: var(--wa-green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease;
}

.wa-float:hover { transform: scale(1.08); }

.wa-float svg { width: 1.8rem; height: 1.8rem; }

/* ---------- Barra de cookies (RGPD) ---------- */

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55; /* abaixo do botão de WhatsApp (60) */
  padding: 0.9rem 1rem calc(0.9rem + env(safe-area-inset-bottom, 0px));
  background: rgba(24, 23, 20, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
  animation: cookie-in 0.45s ease both;
}

@keyframes cookie-in {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.cookie-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: flex-start;
}

.cookie-inner p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 46em;
}

.cookie-inner a { color: var(--gold-bright); }

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ---------- Animações 3D de entrada / tilt ---------- */

.reveal {
  opacity: 0;
  transform: perspective(1000px) translateY(30px) rotateX(8deg);
  transform-origin: 50% 100%;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: perspective(1000px) translateY(0) rotateX(0);
}

/* Cartões que inclinam em 3D com o rato (JS define --rx / --ry) */
.tilt {
  transform: perspective(950px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.35s ease;
  will-change: transform;
}

.tilt.is-playing { transform: none; will-change: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #scene3d { display: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .tilt { transform: none; transition: none; }
  .cookie-banner { animation: none; }
}

/* ---------- Página legal (política de privacidade) ---------- */

.legal { padding: clamp(3rem, 8vw, 5rem) 0; }

.legal h1 {
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  margin-bottom: 0.6rem;
}

.legal h2 {
  font-size: 1.25rem;
  margin: 2.2rem 0 0.7rem;
  color: var(--gold-bright);
}

.legal p, .legal li {
  color: var(--muted);
  font-size: 0.97rem;
  max-width: 46em;
}

.legal strong { color: var(--text); }

.legal ul { margin: 0.6rem 0 0.6rem 1.3rem; }

.legal li { margin-bottom: 0.35rem; }

.legal .updated {
  font-size: 0.85rem;
  color: var(--muted);
  opacity: 0.8;
  margin-bottom: 1.5rem;
}

.legal .placeholder {
  color: var(--gold-bright);
  background: rgba(255, 179, 0, 0.08);
  border: 1px dashed var(--line);
  border-radius: 6px;
  padding: 0 0.35rem;
  font-style: normal;
}

.legal table {
  width: 100%;
  max-width: 46em;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.legal th, .legal td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border: 1px solid rgba(255, 179, 0, 0.14);
  color: var(--muted);
  vertical-align: top;
}

.legal th {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  background: rgba(255, 179, 0, 0.06);
}

.legal-back { margin-top: 2.6rem; }

/* ============================================================
   TABLET / DESKTOP
   ============================================================ */

@media (min-width: 720px) {
  .header-nav { display: flex; gap: 1.6rem; }

  .hero-cta { flex-direction: row; justify-content: center; }

  .cards-3 { grid-template-columns: repeat(3, 1fr); }

  .steps { grid-template-columns: repeat(3, 1fr); }

  .video-grid { grid-template-columns: repeat(2, 1fr); margin-top: 1.4rem; }

  .niches li {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 2rem;
  }

  .niches span { text-align: right; max-width: 55%; }

  .cookie-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .cookie-actions { flex: none; }
}

@media (min-width: 980px) {
  .packs { grid-template-columns: repeat(3, 1fr); align-items: stretch; }

  .pack-featured {
    transform: perspective(950px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(1.04);
  }

  .video-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 980px) and (prefers-reduced-motion: reduce) {
  .pack-featured { transform: scale(1.04); }
}
