/* ==========================================================================
   GLOBAL — Enem Social | PensarEaD
   Tokens, reset, fundo aurora, componentes compartilhados (bolha, cartão,
   selo, botões, títulos de seção), WhatsApp flutuante e animações de revelar.
   ========================================================================== */

/* ---------- Fonte ---------- */
@font-face {
  font-family: "sohne";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/Sohne.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --cor-branco-fixo: #fff;
  --cor-preto-fixo: #000;
  --cor-texto: #fff;
  --cor-cinza: #a8a2b8;
  --cor-cinza-claro: #231c30;
  --cor-verde: #2effb6;
  --cor-laranja: #eaae4c;
  --cor-rosa: #ff2e6d;
  --cor-azul-claro: #5cc8ff;
  --cor-roxo: #6217ec;
  --cor-roxo-claro: #b68cff;
  --cor-roxo-escuro: #4e11bd;
  --cor-roxo-transparente: #6217ec26;

  --fundo: #07060c;
  --fundo-elevado: #0e0b17;

  --bolha-fundo: linear-gradient(180deg, hsla(0, 0%, 100%, .055), hsla(0, 0%, 100%, .02));
  --bolha-fundo-hover: linear-gradient(180deg, hsla(0, 0%, 100%, .085), hsla(0, 0%, 100%, .035));
  --bolha-borda: hsla(0, 0%, 100%, .08);
  --bolha-borda-forte: hsla(0, 0%, 100%, .14);
  --bolha-sombra: inset 0 1px 0 hsla(0, 0%, 100%, .1), inset 0 -1px 0 rgba(0, 0, 0, .35), inset 0 0 28px rgba(98, 23, 236, .05), 0 24px 60px rgba(0, 0, 0, .45);
  --bolha-sombra-leve: inset 0 1px 0 hsla(0, 0%, 100%, .08), inset 0 -1px 0 rgba(0, 0, 0, .3);

  --brilho-roxo: 0 0 0 1px hsla(0, 0%, 100%, .06) inset, 0 12px 34px rgba(98, 23, 236, .45);
  --brilho-roxo-hover: 0 0 0 1px hsla(0, 0%, 100%, .1) inset, 0 16px 44px rgba(124, 58, 237, .6);
  --foco-roxo: 0 0 0 3px rgba(124, 58, 237, .5);
  --degrade-marca: linear-gradient(180deg, #8b4bff, #6217ec);

  --raio-card: 28px;
  --raio-controle: 18px;
  --raio-pilula: 999px;

  --f0: 10px;
  --f1: 12px;
  --f2: 14px;
  --f3: 16px;
  --f4: 18px;
  --f5: 20px;
  --f6: 22px;
  --f7: 24px;
  --f8: 26px;
  --f9: 28px;
  --f10: 30px;
  --f11: 40px;

  --regular: "sohne", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --curva: cubic-bezier(.2, .8, .2, 1);
}

@media screen and (max-width: 1000px) {
  :root {
    --f0: 9px;
    --f1: 11px;
    --f2: 13px;
    --f3: 15px;
    --f4: 17px;
    --f5: 19px;
    --f6: 21px;
    --f7: 22px;
    --f8: 24px;
    --f9: 26px;
    --f10: 28px;
    --f11: 36px;
  }
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  vertical-align: baseline;
  text-decoration: none;
}

html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  color-scheme: dark;
}

html,
body {
  background-color: var(--fundo);
  overflow-x: clip;
}

body {
  font-family: var(--regular);
  color: var(--cor-texto);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-color: var(--cor-cinza-claro) var(--fundo);
  scrollbar-width: thin;
}

body.bloqueado {
  overflow: hidden;
}

ul,
ol {
  list-style: none;
}

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

a {
  color: inherit;
  background-color: transparent;
  cursor: pointer;
}

button {
  font-family: inherit;
  line-height: 1;
  color: inherit;
  background: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

a:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: var(--foco-roxo);
}

::selection {
  color: #fff;
  background-color: #6217ecb0;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--fundo);
}

::-webkit-scrollbar-thumb {
  background: var(--cor-cinza-claro);
  border-radius: 10px;
}

/* Texto apenas para leitores de tela */
.somente-leitor {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Link "pular para o conteúdo" */
.pular-conteudo {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 1000;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--degrade-marca);
  font-size: var(--f2);
  transition: top .3s;
}

.pular-conteudo:focus {
  top: 16px;
}

/* ---------- Estrutura ---------- */
.site {
  position: relative;
  min-height: 100vh;
}

.camada {
  position: relative;
  z-index: 1;
}

.container-site {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 100px;
}

/* ---------- Fundo aurora ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(180deg, #1b0a4a 0, #0d0620 45%, var(--fundo) 100%);
  contain: strict;
}

/* Sem filter: blur — o radial-gradient já esmaece até transparente e o
   blur animado em tela cheia era o maior custo de renderização da página */
.aurora .luz {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
  will-change: transform;
}

.aurora .luz.l1 {
  top: -30%;
  left: -22%;
  width: 70vw;
  height: 70vw;
  max-width: 1000px;
  max-height: 1000px;
  background: radial-gradient(circle, #6217ecf2 0, #6217ec80 28%, #6217ec00 70%);
  animation: derivar1 22s ease-in-out infinite alternate;
}

.aurora .luz.l2 {
  top: -20%;
  right: -10%;
  width: 55vw;
  height: 55vw;
  max-width: 800px;
  max-height: 800px;
  background: radial-gradient(circle, #b01fff8c 0, #b01fff4a 28%, #b01fff00 70%);
  animation: derivar2 28s ease-in-out infinite alternate;
}

.aurora .luz.l3 {
  bottom: -35%;
  left: -15%;
  width: 60vw;
  height: 60vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(circle, #3c0aa0bf 0, #3c0aa066 28%, #3c0aa000 70%);
  animation: derivar3 26s ease-in-out infinite alternate;
}

.aurora .luz.l4 {
  top: 30%;
  right: -14%;
  width: 34vw;
  height: 34vw;
  max-width: 480px;
  max-height: 480px;
  background: radial-gradient(circle, #b68cff6b 0, #b68cff38 28%, #b68cff00 68%);
  animation: derivar2 18s ease-in-out infinite alternate-reverse;
}

.aurora .grao {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='a'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='3' stitchTiles='stitch' type='fractalNoise'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");
  background-size: 260px 260px;
  mix-blend-mode: overlay;
  opacity: .45;
}

.aurora .vinheta {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, transparent 45%, rgba(5, 3, 10, .7) 100%);
}

@keyframes derivar1 {
  0% { transform: translate(0) scale(1); }
  to { transform: translate(8vw, 6vh) scale(1.12); }
}

@keyframes derivar2 {
  0% { transform: translate(0) scale(1); }
  to { transform: translate(-7vw, 8vh) scale(1.15); }
}

@keyframes derivar3 {
  0% { transform: translate(0) scale(1); }
  to { transform: translate(6vw, -5vh) scale(1.08); }
}

/* ---------- Bolha (vidro) ---------- */
.bolha {
  position: relative;
  background: var(--bolha-fundo);
  border: 1px solid var(--bolha-borda);
  box-shadow: var(--bolha-sombra);
  border-radius: var(--raio-card);
}

.bolha.pilula {
  border-radius: var(--raio-pilula);
}

/* ---------- Cartão ---------- */
.cartao.bolha {
  isolation: isolate;
  background: linear-gradient(180deg, #1a132edb, #0c0816f0);
  box-shadow: inset 0 1px #ffffff1a, inset 0 -1px #00000059, 0 18px 44px #04020a80;
  transition: transform .26s var(--curva), box-shadow .26s var(--curva), border-color .26s var(--curva);
}

.cartao.bolha::before,
.cartao.bolha::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
}

.cartao.bolha::before {
  left: 0;
  top: -30%;
  width: 100%;
  height: 90%;
  background: radial-gradient(ellipse at 50% 50%, color-mix(in srgb, var(--tom, var(--cor-roxo)) 26%, transparent) 0, transparent 62%);
  opacity: .5;
  transition: opacity .26s var(--curva);
}

.cartao.bolha::after {
  inset: 0;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='a'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='3' stitchTiles='stitch' type='fractalNoise'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  mix-blend-mode: overlay;
  opacity: .22;
  border-radius: inherit;
}

.cartao.bolha.interativo:hover {
  border-color: color-mix(in srgb, var(--tom, var(--cor-roxo)) 34%, var(--bolha-borda-forte));
}

.cartao.bolha.interativo:hover::before {
  opacity: .85;
}

/* ---------- Selo ---------- */
.selo.bolha {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #0a061494;
  border: 1px solid var(--bolha-borda-forte);
  border-radius: var(--raio-pilula);
  box-shadow: var(--bolha-sombra-leve);
  font-size: var(--f1);
  color: var(--cor-roxo-claro);
}

.selo.bolha .icone {
  width: 13px;
  min-width: 13px;
  height: 13px;
}

.selo.bolha.verde {
  border-color: color-mix(in srgb, var(--cor-verde) 38%, transparent);
  background: color-mix(in srgb, var(--cor-verde) 12%, rgba(10, 6, 20, .58));
  color: var(--cor-verde);
}

/* Ícones SVG em traço */
.icone {
  display: inline-block;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Botões ---------- */
.botao-marca {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  height: 56px;
  padding: 0 30px;
  border: 1px solid hsla(0, 0%, 100%, .12);
  border-radius: var(--raio-controle);
  background: var(--degrade-marca);
  box-shadow: var(--brilho-roxo);
  font-size: var(--f3);
  color: var(--cor-branco-fixo);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .25);
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: transform .25s var(--curva), box-shadow .35s ease, border-color .25s;
}

.botao-marca::before,
.botao-marca::after {
  content: "";
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.botao-marca::before {
  inset: 0;
  background: linear-gradient(180deg, #ffffff38, #ffffff0a 50%, #b01fff59);
  transition: opacity .35s ease;
  z-index: -1;
}

.botao-marca::after {
  top: -40%;
  left: -60%;
  width: 45%;
  height: 180%;
  background: linear-gradient(105deg, transparent, hsla(0, 0%, 100%, 0) 35%, hsla(0, 0%, 100%, .45) 50%, hsla(0, 0%, 100%, 0) 65%, transparent);
  transform: translate(0) skew(-12deg);
  z-index: 0;
}

.botao-marca span,
.botao-marca .icone {
  position: relative;
  z-index: 1;
}

.botao-marca:hover {
  border-color: #ffffff47;
  box-shadow: var(--brilho-roxo-hover);
  transform: translateY(-2px) scale(1.01);
}

.botao-marca:hover::before {
  opacity: 1;
}

.botao-marca:hover::after {
  animation: varrer-brilho .9s cubic-bezier(.2, .7, .3, 1) forwards;
}

.botao-marca:active {
  transform: translateY(0) scale(.99);
  transition-duration: .08s;
}

.botao-vidro {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  padding: 0 30px;
  background: #ffffff0d;
  border: 1px solid var(--bolha-borda);
  border-radius: var(--raio-controle);
  box-shadow: var(--bolha-sombra-leve);
  font-size: var(--f3);
  color: var(--cor-texto);
  white-space: nowrap;
  transition: background .25s, border-color .25s, transform .25s;
}

.botao-vidro:hover {
  background: #ffffff17;
  border-color: var(--bolha-borda-forte);
  transform: translateY(-2px);
}

@keyframes varrer-brilho {
  0% { opacity: 0; transform: translate(0) skew(-12deg); }
  15% { opacity: 1; }
  to { opacity: 0; transform: translate(360%) skew(-12deg); }
}

/* ---------- Cabeçalho de seção ---------- */
.titulo-secao {
  font-size: 46px;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--cor-texto);
  text-wrap: balance;
}

.cabecalho-secao {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 760px;
  margin: 0 auto 56px;
  text-align: center;
}

.cabecalho-secao p {
  font-size: var(--f4);
  line-height: 1.5;
  color: var(--cor-cinza);
  text-wrap: balance;
}

/* ---------- Vitrine (faixa ondulada usada no início e na chamada) ---------- */
.vitrine {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.vitrine .trilho {
  display: flex;
  align-items: center;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  gap: 18px;
  width: max-content;
  will-change: transform;
}

.vitrine .item {
  --y: 0px;
  --r: 0deg;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 180px;
  min-width: 180px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--bolha-borda);
  box-shadow: var(--bolha-sombra-leve);
  border-radius: 14px;
  overflow: hidden;
  transform: translateY(var(--y)) rotate(var(--r));
}

/* Capa de aula */
.vitrine .item.capa {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 2px;
  padding: 12px 14px;
  background:
    radial-gradient(120% 90% at 100% 0, color-mix(in srgb, var(--tom) 60%, transparent) 0, transparent 60%),
    linear-gradient(160deg, color-mix(in srgb, var(--tom) 28%, #0e0b17) 0, #0e0b17 75%);
}

.vitrine .item.capa::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(hsla(0, 0%, 100%, .05) 1px, transparent 1px), linear-gradient(90deg, hsla(0, 0%, 100%, .05) 1px, transparent 1px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 80%);
  mask-image: linear-gradient(180deg, #000, transparent 80%);
}

.vitrine .item.capa small {
  position: relative;
  font-size: var(--f0);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--tom) 55%, #fff);
}

.vitrine .item.capa strong {
  position: relative;
  font-size: var(--f3);
  line-height: 1.15;
  color: var(--cor-branco-fixo);
}

.vitrine .item.capa .reproduzir {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff1f;
  border: 1px solid #ffffff2e;
}

.vitrine .item.capa .reproduzir::after {
  content: "";
  margin-left: 2px;
  border-left: 7px solid #fff;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

/* Ícone flutuante */
.vitrine .item.icone-vitrine {
  width: 132px;
  min-width: 132px;
  aspect-ratio: 1;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
  background: none;
}

.orbe {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 26px;
  color: var(--cor-branco-fixo);
  background:
    radial-gradient(circle at 30% 20%, #ffffff59, transparent 45%),
    linear-gradient(160deg, color-mix(in srgb, var(--tom, var(--cor-roxo)) 90%, #fff) 0, var(--tom, var(--cor-roxo)) 45%, color-mix(in srgb, var(--tom, var(--cor-roxo)) 55%, #000) 100%);
  border: 1px solid #ffffff38;
  box-shadow: inset 0 2px 0 #ffffff4d, inset 0 -6px 14px #00000059, 0 0 26px color-mix(in srgb, var(--tom, var(--cor-roxo)) 55%, transparent), 0 14px 22px rgba(8, 4, 20, .6);
  transform: rotate(-6deg);
}

.orbe .icone {
  width: 40px;
  height: 40px;
  stroke-width: 1.8;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35));
}

@media screen and (max-width: 1000px) {
  .vitrine {
    height: 260px;
  }

  .vitrine .trilho {
    gap: 14px;
  }

  .vitrine .item {
    width: 150px;
    min-width: 150px;
  }

  .vitrine .item.capa strong {
    font-size: var(--f2);
  }

  .vitrine .item.icone-vitrine {
    width: 104px;
    min-width: 104px;
  }

  .orbe {
    width: 68px;
    height: 68px;
    border-radius: 20px;
  }

  .orbe .icone {
    width: 32px;
    height: 32px;
  }
}

/* ---------- Revelar ao rolar (só com JS ativo) ---------- */
.js .revelar {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
  transition-delay: calc(var(--i, 0) * .07s);
}

.js .revelado .revelar,
.js .revelar.revelado {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Pausar animações fora da tela (ativado pelo JS) ---------- */
.fora-da-tela,
.fora-da-tela *,
.fora-da-tela *::before,
.fora-da-tela *::after {
  animation-play-state: paused !important;
}

/* ---------- Responsivo ---------- */
@media screen and (max-width: 1000px) {
  /* No celular a aurora fica parada para poupar GPU e bateria */
  .aurora .luz {
    animation: none !important;
  }

  .container-site {
    padding: 0 24px;
  }

  .titulo-secao {
    font-size: 32px;
  }

  .cabecalho-secao {
    gap: 12px;
    margin-bottom: 38px;
  }

  .cabecalho-secao p {
    font-size: var(--f3);
  }

  .botao-marca,
  .botao-vidro {
    height: 52px;
    font-size: var(--f2);
  }
}

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

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

  .js .revelar {
    opacity: 1;
    transform: none;
  }
}
