/* ============================================================
   ENUPERS 2026 — BASE
   Design tokens, reset, tipografia e utilitários
   Direção visual: dark premium, alto contraste, arquitetura
   inspirada em landing pages de evento nacional (estrutura),
   executada 100% com marca e identidade Avantar.
============================================================ */

:root {
  /* ---------- Paleta Avantar (marca) ---------- */
  --purple-deep: #12002E;
  --purple-dark: #22004D;
  --purple-main: #5B11D6;
  --purple-vibrant: #7B1FFF;
  --black-purple: #080014;
  --orange: #F28907;
  --orange-light: #FFB13B;
  --yellow-orange: #FFB21A;
  --violet-light: #A875FF;
  --cyan-detail: #56DFFF;
  --white: #FFFFFF;
  --off-white: #F8F5FF;
  --gray-light: #F4F4F7;
  --gray-medium: #D9D9E0;
  --muted-text: #B9B2C8;
  --text-dark: #1E1B26;

  /* ---------- Derivados controlados (transparências da paleta) ---------- */
  --purple-glass: rgba(123, 31, 255, 0.12);
  --purple-border: rgba(123, 31, 255, 0.35);
  --lilac-border: rgba(217, 217, 224, 0.22);
  --orange-glow: rgba(242, 137, 7, 0.35);
  --white-soft: rgba(255, 255, 255, 0.85);
  --white-dim: rgba(255, 255, 255, 0.64);

  /* Glass / vidro escuro */
  --glass-bg: rgba(255, 255, 255, 0.045);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-hover: rgba(242, 137, 7, 0.45);

  /* Glows */
  --glow-orange: 0 0 56px rgba(242, 137, 7, 0.35);
  --glow-orange-lg: 0 0 80px rgba(242, 137, 7, 0.22);
  --glow-purple: 0 0 72px rgba(91, 17, 214, 0.32);
  --glow-white: 0 0 32px rgba(255, 255, 255, 0.10);

  /* ---------- Tipografia ---------- */
  --font-main: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* ---------- Layout ---------- */
  --container: 1240px;
  --container-wide: 1440px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --radius-xl: 40px;
  --radius-card: 28px;
  --radius-btn: 999px;
  --header-h: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
  overflow-x: clip; /* nunca permitir scroll horizontal */
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.65;
  color: var(--white);
  background: var(--black-purple);
  /* Sem overflow-x aqui: "html" já cuida do corte horizontal via overflow-x:clip.
     Definir overflow-x isolado no body (sem overflow-y) faz o navegador computar
     overflow-y:auto automaticamente, transformando o body num contêiner de scroll
     independente e quebrando window.scrollY / eventos de scroll no window. */
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

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

em {
  font-style: normal;
}

/* Foco visível — acessibilidade */
:focus-visible {
  outline: 3px solid var(--orange-light);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.container-wide {
  max-width: var(--container-wide);
}

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

/* ---------- Eyebrow (rótulo de seção) ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
}

/* ---------- Tipografia de seção ---------- */
.section-head {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 18px;
}

.section-head-left {
  text-align: left;
  margin-inline: 0;
}

.section-title {
  font-size: clamp(1.8rem, 4.4vw, 3.1rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: 8px 0 10px;
}

.section-title em {
  color: var(--orange-light);
}

.section-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 500;
  color: var(--white-soft);
}

.section-text {
  margin-top: 14px;
  color: var(--muted-text);
}

.section-closing {
  text-align: center;
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  font-weight: 500;
  margin-top: 22px;
  color: var(--white-soft);
}

.section-closing strong {
  color: var(--white);
  font-weight: 800;
}

.txt-orange {
  color: var(--orange-light);
}

/* Seções claras: inverter cores de texto */
.section-light {
  background: var(--gray-light);
  color: var(--text-dark);
}

.section-light .section-subtitle,
.section-light .section-text {
  color: rgba(30, 27, 38, 0.72);
}

.section-light .section-title em {
  color: var(--purple-main);
}

.section-light .txt-orange {
  color: var(--orange);
}

.section-closing-dark {
  color: rgba(30, 27, 38, 0.75);
}

.section-closing-dark strong {
  color: var(--purple-main);
}

/* Fundos escuros */
.section-dark {
  background: var(--black-purple);
  position: relative;
}

.section-gradient {
  background: linear-gradient(180deg, var(--black-purple) 0%, var(--purple-dark) 55%, var(--black-purple) 100%);
}

/* Espaçamento padrão de seção — altura dita pelo conteúdo,
   com respiro vertical consistente entre seções. */
section {
  padding: 48px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

/* ---------- Texturas premium (grid + noise) ---------- */
.bg-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent 80%);
}

.bg-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ---------- Glass card (componente base reutilizável) ---------- */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-6px);
  border-color: var(--glass-border-hover);
  box-shadow: 0 20px 70px rgba(91, 17, 214, 0.22);
}

/* ---------- Animações de entrada (IntersectionObserver) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Entrada escalonada: o JS aplica delay incremental nos filhos .reveal de .stagger */

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Espaçamento responsivo de seção ---------- */
@media (max-width: 640px) {
  section { padding: 32px 0; }
}
