/* =========================================================================
   OrbitaPlay TV — style.css
   Camada de identidade visual sobre o Tailwind (CDN).
   Tudo aqui é aditivo: cores, textura, tipografia e movimento.
   ========================================================================= */

:root {
  --ink-950: #04060c;
  --ink-900: #070a12;
  --ink-800: #0d1320;
  --ink-700: #131a28;
  --ink-600: #1b2334;

  --brand-300: #ffc24b;
  --brand-400: #ffa51f;
  --brand-500: #ff8a1e;
  --brand-600: #e96d08;
  --brand-700: #be5206;

  --cream: #faf6ef;
  --cream-deep: #f2ebdd;

  --edge: rgba(255, 255, 255, 0.08);
  --edge-dark: rgba(10, 12, 20, 0.08);

  --shell: min(1200px, 100% - 2.5rem);
}

/* -------------------------------------------------------------------------
   Base
   ------------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--cream);
  color: var(--ink-800);
  font-feature-settings: 'ss01' 1, 'cv11' 1;
  overflow-x: hidden;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Bricolage Grotesque', 'Manrope', system-ui, sans-serif;
  letter-spacing: -0.025em;
  font-variation-settings: 'wdth' 100, 'opsz' 24;
}

h1 { font-variation-settings: 'wdth' 92, 'opsz' 48; }

::selection {
  background: var(--brand-400);
  color: var(--ink-900);
}

img { max-width: 100%; height: auto; }

/* Alvo de toque mínimo 48x48 — exigência mobile-first */
@media (max-width: 768px) {
  .min-tap { min-height: 48px; min-width: 48px; }
}

/* -------------------------------------------------------------------------
   Textura de grão — dá profundidade sem custo de imagem
   ------------------------------------------------------------------------- */
.grain::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
}

/* -------------------------------------------------------------------------
   Hero — camadas: grade + halo âmbar + vinheta
   ------------------------------------------------------------------------- */
.hero-bg {
  position: relative;
  isolation: isolate;
  background-color: var(--ink-950);
  background-image:
    radial-gradient(120% 90% at 85% 8%, rgba(255, 138, 30, 0.26) 0%, transparent 58%),
    radial-gradient(90% 70% at 8% 92%, rgba(58, 120, 255, 0.18) 0%, transparent 60%),
    linear-gradient(180deg, rgba(4, 6, 12, 0.92) 0%, rgba(4, 6, 12, 0.97) 100%),
    url('../assets/img/background.svg');
  background-size: auto, auto, auto, cover;
  background-position: center;
  background-attachment: scroll;
}

@media (min-width: 1024px) {
  .hero-bg { background-attachment: scroll, scroll, scroll, fixed; }
}

/* Grade sutil sobreposta ao hero */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(70% 60% at 50% 40%, #000 0%, transparent 100%);
}

/* -------------------------------------------------------------------------
   Superfícies
   ------------------------------------------------------------------------- */
.surface-cream { background: var(--cream); }
.surface-cream-deep { background: var(--cream-deep); }

.surface-ink {
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(255, 138, 30, 0.14) 0%, transparent 60%),
    var(--ink-900);
}

.card-lift {
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.card-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -24px rgba(8, 12, 22, 0.45);
}

/* Contorno âmbar do plano em destaque */
.plan-featured {
  position: relative;
  border-color: rgba(255, 165, 31, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 165, 31, 0.25), 0 32px 64px -32px rgba(255, 138, 30, 0.55);
}
.plan-featured::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, var(--brand-300), transparent 45%, var(--brand-600));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* -------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------- */
#site-header {
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}
#site-header.is-scrolled {
  background-color: rgba(4, 6, 12, 0.88);
  backdrop-filter: saturate(140%) blur(14px);
  box-shadow: 0 12px 32px -20px rgba(0, 0, 0, 0.9);
}

/* Sublinhado animado da navegação */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 100%;
  background: var(--brand-400);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.nav-link:hover::after,
.nav-link[aria-current='page']::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* -------------------------------------------------------------------------
   Selo de avaliação
   ------------------------------------------------------------------------- */
.review-stars i { color: var(--brand-300); }

/* -------------------------------------------------------------------------
   Movimento
   ------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
[data-reveal][data-delay='1'] { transition-delay: 0.08s; }
[data-reveal][data-delay='2'] { transition-delay: 0.16s; }
[data-reveal][data-delay='3'] { transition-delay: 0.24s; }
[data-reveal][data-delay='4'] { transition-delay: 0.32s; }

/* Entrada escalonada do hero (sem depender de JS) */
.hero-in {
  animation: heroIn 0.9s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.hero-in[data-delay='1'] { animation-delay: 0.1s; }
.hero-in[data-delay='2'] { animation-delay: 0.2s; }
.hero-in[data-delay='3'] { animation-delay: 0.3s; }
.hero-in[data-delay='4'] { animation-delay: 0.4s; }

@keyframes heroIn {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}

.animate-pulse, .animate-bounce { will-change: transform, opacity; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* -------------------------------------------------------------------------
   FAQ
   ------------------------------------------------------------------------- */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary { color: var(--brand-700); }

/* -------------------------------------------------------------------------
   Captação de leads — modal e formulário
   ------------------------------------------------------------------------- */
.orbita-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(4, 6, 12, 0.82);
  backdrop-filter: blur(6px);
}
.orbita-modal.is-open {
  display: flex;
  animation: orbitaFade 0.25s ease both;
}

.orbita-modal__card {
  position: relative;
  width: 100%;
  max-width: 30rem;
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  padding: 2rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(255, 138, 30, 0.16) 0%, transparent 60%),
    var(--ink-900);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.85);
  animation: orbitaRise 0.35s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.orbita-modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--ink-100, #e2e7f2);
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease, color 0.2s ease;
}
.orbita-modal__close:hover {
  background: var(--brand-500);
  color: var(--ink-950);
}

@keyframes orbitaFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes orbitaRise {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.orbita-lead-fields {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.orbita-input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 1rem;
  border-radius: 0.875rem;
  border: 1px solid rgba(10, 12, 20, 0.14);
  background: #ffffff;
  color: var(--ink-800);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
}
.orbita-input::placeholder { color: #9aa3b6; }
.orbita-input:focus {
  outline: none;
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(255, 165, 31, 0.25);
}
select.orbita-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5'  stroke='%236b7280' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 1.25rem;
  padding-right: 2.75rem;
}

.orbita-lead-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.05rem 1.5rem;
  border-radius: 999px;
  background: #25d366;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: 0 18px 32px -18px rgba(37, 211, 102, 0.9);
  transition: transform 0.25s ease, background 0.25s ease;
}
.orbita-lead-submit:hover:not(:disabled) {
  background: #1eb959;
  transform: translateY(-2px);
}
.orbita-lead-submit:disabled {
  opacity: 0.65;
  cursor: progress;
  transform: none;
}

.orbita-lead-feedback {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
}
.orbita-lead-feedback[data-state='error'] { color: #ff8f6b; }
.orbita-lead-feedback[data-state='success'] {
  color: #34d17d;
  font-size: 1rem;
}

.orbita-lead-legal {
  margin-top: 0.9rem;
  font-size: 0.75rem;
  line-height: 1.6;
}

/* Armadilha de robô: fora da tela, invisível para quem enxerga e para leitor de tela */
.orbita-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* -------------------------------------------------------------------------
   Acessibilidade
   ------------------------------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--brand-400);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  background: var(--brand-400);
  color: var(--ink-900);
  padding: 0.75rem 1.25rem;
  font-weight: 700;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}
