/* =============================================================
   ABERTURA — "Premiada 4x"  (celular e computador, 1x por visita)
   Logo, título e selos empilhados num bloco centralizado na tela
   (veja js/intro.js para tempos e regras).
   Performance: tudo anima só transform/opacity (roda na placa de vídeo),
   inclusive o "portal" e a "íris", que são círculos que mudam de escala.
   Os textos ficam no index.html, logo no início do <body>.
   ============================================================= */
.intro { display: none; }
html.has-intro, html.has-intro body { overflow: hidden; }
html.has-intro .intro {
  display: block; position: fixed; inset: 0; z-index: 99999; overflow: hidden;
  background: transparent; color: #fff; -webkit-tap-highlight-color: transparent; cursor: pointer;
  --teal: #1D4ED8; --purple: #FA8A0C; --bg: #C2460A; --pill-dark: #E8620C; --pill-ink: #C2460A;
  /* tamanhos reais da tela (px) vêm do js/intro.js */
  --W: 100vw; --H: 100vh; --D: 200vmax; --D2: 200vmax;
}

/* íris: círculo do tamanho da diagonal; na saída ele encolhe até sumir */
.intro__iris {
  position: absolute; width: var(--D2); height: var(--D2);
  left: calc(50% - var(--D2) / 2); top: calc(50% - var(--D2) / 2);
  border-radius: 50%; overflow: hidden; -webkit-mask-image: -webkit-radial-gradient(white, black);
}
.intro__stage {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 0 3vh;
  position: absolute; width: var(--W); height: var(--H);
  left: calc(var(--D2) / 2 - var(--W) / 2); top: calc(var(--D2) / 2 - var(--H) / 2);
  background: radial-gradient(70% 50% at 50% 30%, #E8620C, #141055 75%);
  transform-origin: 50% 50%;
}

/* portal: círculo que nasce da estrela e cresce até cobrir a tela */
.intro__portal {
  position: absolute; width: var(--D); height: var(--D);
  left: calc(50% - var(--D) / 2); top: calc(27% - var(--D) / 2);
  border-radius: 50%; overflow: hidden; -webkit-mask-image: -webkit-radial-gradient(white, black);
  opacity: 0;   /* o js/intro.js anima: o círculo cresce e o conteúdo compensa (fica parado) */
}
.intro__scene {
  position: absolute; width: var(--W); height: var(--H);
  left: calc(var(--D) / 2 - var(--W) / 2); top: calc(var(--D) / 2 - var(--H) * .27);
  background: radial-gradient(90% 60% at 50% 45%, #E8620C 0%, #C2460A 45%, #161257 100%); transform-origin: 50% 27%;
}
.intro__glow { position: absolute; inset: 0; background: radial-gradient(55% 32% at 50% 48%, rgba(250,138,12,.5), rgba(194,70,10,0) 70%); }
.intro__pic { display: none; }   /* foto do mago desligada (celular e computador) */
.intro__pic-off { position: absolute; top: 5%; left: -.84%; width: 102%; aspect-ratio: 850 / 804; transform-origin: 50% 45%; }
.intro__pic picture, .intro__pic img { display: block; width: 100%; height: 100%; }
.intro__pic::after {   /* esfuma as bordas da foto no fundo roxo */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(194,70,10,0) 16%, rgba(194,70,10,0) 62%, var(--bg) 96%);
}
.intro__flash { position: absolute; inset: 0; background: #fff; opacity: 0; mix-blend-mode: soft-light; }

/* estrela da logo */
.intro__star { position: absolute; left: 50%; top: 27%; width: 110px; height: 110px; margin: -55px 0 0 -55px; overflow: visible; }
.intro__star path { fill: none; stroke: url(#introStarGrad); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round;
                    stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 10px rgba(29,78,216,.8)); }
.intro__burst { position: absolute; inset: 0; pointer-events: none; }
.intro__burst i { position: absolute; left: 50%; top: 27%; width: 4px; height: 4px; margin: -2px; border-radius: 50%; background: #fff;
                  box-shadow: 0 0 10px 3px var(--c, var(--teal)); opacity: 0; }

.intro__logo { position: relative; width: 170px; margin: 0 0 22px; opacity: 0; }

/* título */
.intro__head { position: relative; text-align: center; padding: 0 20px; }
.intro__eyebrow { display: inline-flex; align-items: center; gap: 7px; font: 700 11.5px/1 "Onest", system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); opacity: 0; transform: translateY(8px); }
.intro__title { margin: 10px 0 0; font: 800 31px/1.08 "Plus Jakarta Sans", system-ui, sans-serif; letter-spacing: -.035em; opacity: 0; transform: translateY(14px); }
.intro__title .light { font-weight: 300; }
.intro__count { display: inline-block; min-width: 1.6em; color: var(--teal); }
.intro__count.bump { animation: introBump .35s cubic-bezier(.3,1.8,.5,1); }

/* selos */
.intro__awards { position: relative; width: 300px; margin-top: 24px; display: grid; gap: 9px; }
.intro__award { position: relative; display: flex; height: 52px; border-radius: 12px; overflow: hidden; color: var(--pill-ink);
                background: var(--teal); box-shadow: 0 14px 26px -14px rgba(0,0,0,.6); opacity: 0; }
.intro__award:nth-child(odd)  { transform: translateX(-70px) scale(.9); }
.intro__award:nth-child(even) { transform: translateX(70px) scale(.9); }
.intro__year { flex: 0 0 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
               background: var(--pill-dark); color: #fff; font: 800 12px/1 "Plus Jakarta Sans", system-ui, sans-serif; }
.intro__txt { display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 0 14px; text-align: left; }
.intro__txt b { display: flex; align-items: center; gap: 6px; font: 800 14.5px/1 "Plus Jakarta Sans", system-ui, sans-serif; }
.intro__txt small { font: 600 11.5px/1 "Onest", system-ui, sans-serif; opacity: .8; }
.intro__award::after {   /* brilho que passa (só transform) */
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent);
  transform: translateX(-160%) skewX(-20deg);
}
.intro svg.i { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.intro__skip .on-mouse { display: none; }
@media (hover: hover) and (pointer: fine) { .intro__skip .on-touch { display: none; } .intro__skip .on-mouse { display: inline; } }
.intro__skip { position: absolute; left: 0; right: 0; bottom: 2%; text-align: center; font: 500 12px "Onest", system-ui, sans-serif; color: rgba(255,255,255,.5); opacity: 0; }

/* ---------------- LINHA DO TEMPO ---------------- */
.intro.play .intro__star path { animation: introDraw .65s .1s cubic-bezier(.6,0,.2,1) forwards; }
.intro.play .intro__star      { animation: introStar .65s .75s cubic-bezier(.7,0,.3,1) forwards; }
.intro.play .intro__flash     { animation: introFlash .8s .85s ease-out forwards; }
.intro.play .intro__pic       { animation: introSettle 1.8s .85s cubic-bezier(.16,1,.3,1) both; }
.intro.play .intro__burst i   { animation: introFly .9s .9s cubic-bezier(.1,.8,.3,1) forwards; }
.intro.play .intro__logo      { animation: introDrop .55s 1.15s cubic-bezier(.2,.9,.3,1.2) forwards; }
.intro.play .intro__eyebrow   { animation: introRise .5s 1.25s cubic-bezier(.2,.8,.2,1) forwards; }
.intro.play .intro__title     { animation: introRise .55s 1.35s cubic-bezier(.2,.8,.2,1) forwards; }
.intro.play .intro__award     { animation: introLand .55s calc(1.8s + var(--i) * .32s) cubic-bezier(.2,1.25,.4,1) forwards; }
.intro.play .intro__award::after { animation: introSweep .8s calc(3.5s + var(--i) * .1s) ease-in-out forwards; }
.intro.play .intro__skip      { animation: introRise .6s 1.6s ease-out forwards; }
/* portal e íris: animados pelo js/intro.js (círculo muda de escala, conteúdo compensa) */
/* pulou (toque) ou internet lenta: some rápido */
.intro.skip                   { animation: introFade .3s ease-out forwards; }

/* versão leve (celular bem simples): sem estrela/faíscas, só fades */
.intro.lite .intro__star, .intro.lite .intro__burst { display: none; }
.intro.lite .intro__portal { opacity: 0; }
.intro.lite.play .intro__portal { animation: introFadeIn .5s .8s ease-out forwards; }
.intro.lite.play .intro__pic { animation: none; }
.intro.lite.out { animation: introFade .45s ease-out forwards; }

@keyframes introDraw   { to { stroke-dashoffset: 0; } }
@keyframes introStar   { to { transform: rotate(135deg) scale(9); opacity: 0; } }
@keyframes introFlash  { 0% { opacity: .55; } 100% { opacity: 0; } }
@keyframes introSettle { from { transform: scale(1.25); } to { transform: scale(1); } }
@keyframes introFly    { 0% { opacity: 1; transform: translate(0,0) scale(1); } 100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(.3); } }
@keyframes introDrop   { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes introRise   { to { opacity: 1; transform: none; } }
@keyframes introLand   { to { opacity: 1; transform: none; } }
@keyframes introSweep  { to { transform: translateX(360%) skewX(-20deg); } }
@keyframes introBump   { 40% { transform: scale(1.35); } }
@keyframes introFade   { to { opacity: 0; } }
@keyframes introFadeIn { to { opacity: 1; } }

/* telas baixas (iPhone SE, Android pequeno): tudo um pouco mais compacto */
@media (max-width: 768px) and (max-height: 640px) {
  .intro__logo { width: 140px; margin-bottom: 16px; }
  .intro__title { font-size: 27px; }
  .intro__awards { margin-top: 18px; gap: 7px; }
  .intro__award { height: 46px; }
}

/* ---------------- COMPUTADOR / TELA LARGA ----------------
   mesma pilha centralizada, maior, com os selos em grade 2×2 */
@media (min-width: 769px) {
  .intro__logo { width: 180px; margin-bottom: 30px; }
  .intro__eyebrow { font-size: 13px; }
  .intro__title { margin-top: 14px; font-size: clamp(38px, 3.8vw, 58px); }
  .intro__awards { width: max-content; margin-top: 32px; grid-template-columns: repeat(2, max-content); gap: 12px; }
  .intro__award { height: 62px; border-radius: 14px; }
  .intro__year { flex-basis: 64px; font-size: 13px; }
  .intro__txt { padding: 0 18px; gap: 4px; white-space: nowrap; }
  .intro__txt b { font-size: clamp(13px, 1.15vw, 16px); }
  .intro__txt small { font-size: clamp(11px, .9vw, 12.5px); }
  .intro__skip { bottom: 6%; font-size: 13px; }
  .intro__star, .intro__burst i { left: 50%; top: 50%; }
}
@media (min-width: 769px) and (max-height: 700px) {
  .intro__logo { margin-bottom: 22px; }
  .intro__title { font-size: clamp(34px, 3.2vw, 46px); }
  .intro__awards { margin-top: 24px; }
  .intro__award { height: 54px; }
}

@media (prefers-reduced-motion: reduce) { html.has-intro .intro { display: none; } }

/* logo da Age Fibra em branco sobre o fundo escuro da abertura */
.intro__logo { filter: none; }   /* logo Age Fibra (SVG oficial, laranja) */
