/* HOPE Agência — seções 7 (Diagnóstico) e 8 (Próximo passo): cenas com planeta e efeitos de rolagem. */

/* Estrelas (geradas por js/cenas.js) */
.estrelas { position: absolute; inset: -4% 0; pointer-events: none; }
.estrelas i { position: absolute; width: var(--s); height: var(--s); border-radius: 50%; background: var(--hope-ouro-claro); opacity: 0.45; animation: pisca var(--d) ease-in-out var(--a) infinite; }
@keyframes pisca { 50% { opacity: 0.08; transform: scale(0.6); } }

/* Planeta em CSS: aparece só quando não há WebGL (a classe sem-webgl vem de orb.js / cenas.js) */
.planeta-css { display: none; position: absolute; inset: 30%; border-radius: 50%; background: radial-gradient(circle at 36% 30%, #F4E6BF 0, #C9A961 22%, #2C5A48 60%, #0B1C16 100%); box-shadow: 0 0 120px rgb(201 169 97 / 0.4), inset -24px -30px 60px rgb(8 20 15 / 0.7); }
.sem-webgl .planeta-css { display: block; }
.sem-webgl [data-planeta] { display: none; }

/* =========================================================
   7 — DIAGNÓSTICO
   ========================================================= */
.cena { position: relative; background: var(--hope-noite-profunda); border-block: 1px solid var(--hope-linha); }
.cena__pin { position: relative; overflow: hidden; isolation: isolate; min-height: 100svh; display: grid; align-items: center; padding-block: calc(var(--altura-topo) + 0.75rem) 1.5rem; }
.cena__fundo { position: absolute; inset: 0; z-index: -1; }
.cena__brilho { position: absolute; inset: 0; background: radial-gradient(52% 62% at 74% 50%, rgb(201 169 97 / 0.15), transparent 66%), radial-gradient(40% 50% at 0% 100%, rgb(46 107 85 / 0.3), transparent 70%); }
.cena__grade { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 4vw, 5rem); align-items: center; max-width: 1400px; }
.cena__texto { display: grid; gap: clamp(0.7rem, 1.8vh, 1.4rem); align-content: center; justify-items: start; }
.cena__texto h2 { font-size: clamp(1.9rem, 0.5rem + 2.4vw, 3.3rem); max-width: none; line-height: 1.05; }
.cena__texto h2 .nq { white-space: nowrap; }
.cena__texto .texto-grande { font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem); max-width: 40ch; }

.cena__areas { list-style: none; margin: 0.4rem 0 0; padding: 0; display: grid; gap: 4px; width: min(100%, 520px); }
.cena__areas li { position: relative; display: grid; grid-template-columns: 2.2rem 1fr auto; align-items: center; gap: 12px; padding: clamp(5px, 1vh, 9px) 14px clamp(7px, 1.2vh, 11px); border-radius: 12px; border: 1px solid transparent; opacity: 0.42; transition: opacity 400ms, background 400ms, border-color 400ms; }
.cena__areas li.on { opacity: 1; }
.cena__areas li.atual { background: rgb(201 169 97 / 0.09); border-color: rgb(201 169 97 / 0.4); }
.cena__n { font-family: var(--fonte-mono); font-size: var(--texto-xs); color: var(--hope-texto-suave); }
.cena__areas li.atual .cena__n, .cena__areas li.on .cena__n { color: var(--hope-ouro); }
.cena__areas strong { display: block; font-family: var(--fonte-display); font-weight: 400; font-size: 1.2rem; line-height: 1.1; color: var(--hope-offwhite); }
.cena__areas small { display: block; font-size: var(--texto-xs); color: var(--hope-texto-suave); }
.cena__areas b { font-family: var(--fonte-display); font-weight: 300; font-size: 1.6rem; line-height: 1; min-width: 2.2ch; text-align: right; color: var(--hope-offwhite); font-variant-numeric: tabular-nums; }
.cena__barra { position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--hope-linha); overflow: hidden; }
.cena__barra span { display: block; height: 100%; background: var(--hope-ouro); transform-origin: left; box-shadow: 0 0 8px var(--hope-ouro); }
.cena__cta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 0.4rem; }

.cena__palco { position: relative; width: min(100%, 74vh, 680px); aspect-ratio: 1; justify-self: center; }
.cena__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cena__radar { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.radar__anel { fill: none; stroke: var(--hope-linha); stroke-width: 1; }
.radar__eixo { stroke: var(--hope-linha); stroke-width: 1; }
.radar__feixe { stroke: var(--hope-ouro); stroke-width: 1; stroke-dasharray: 2 5; opacity: 0; }
.radar__area { fill: rgb(201 169 97 / 0.18); stroke: var(--hope-ouro); stroke-width: 2; stroke-linejoin: round; filter: drop-shadow(0 0 10px rgb(201 169 97 / 0.4)); }
.radar__ponto { fill: var(--hope-ouro-claro); filter: drop-shadow(0 0 6px var(--hope-ouro)); opacity: 0; }
.radar__rotulo { font-family: var(--fonte-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; fill: var(--hope-texto-suave); transition: fill 300ms; }
.radar__rotulo.on { fill: var(--hope-offwhite); }
.cena__nota { position: absolute; left: 0; top: 0; display: grid; gap: 8px; }
.cena__nota strong { font-family: var(--fonte-display); font-weight: 300; font-size: clamp(3rem, 2rem + 3vw, 4.6rem); line-height: 1; color: var(--hope-offwhite); font-variant-numeric: tabular-nums; }
.cena__nota span { font-family: var(--fonte-mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--hope-texto-suave); }

/* =========================================================
   8 — PRÓXIMO PASSO
   ========================================================= */
.proximo { position: relative; overflow: hidden; isolation: isolate; min-height: 100svh; display: grid; align-items: start; text-align: center; padding-block: clamp(5rem, 3rem + 6vw, 9rem) clamp(3rem, 6vw, 6rem); background: linear-gradient(to bottom, var(--hope-noite), var(--hope-noite-profunda)); border-top: 1px solid var(--hope-linha); }
.proximo__estrelas { z-index: -2; }
.proximo__faixa { position: absolute; z-index: 0; left: 0; bottom: 7%; display: flex; width: max-content; white-space: nowrap; font-family: var(--fonte-display); font-weight: 300; font-size: clamp(4rem, 11vw, 10rem); line-height: 1; color: transparent; -webkit-text-stroke: 1px rgb(201 169 97 / 0.28); pointer-events: none; user-select: none; }
.proximo__inner { position: relative; z-index: 1; display: grid; justify-items: center; gap: 1.6rem; }
.proximo__titulo { max-width: 17ch; margin-inline: auto; font-size: clamp(2.5rem, 1.5rem + 3.6vw, 5rem); }
.proximo__titulo .pal { display: inline-block; will-change: opacity, transform; }
.proximo .texto-grande { margin-inline: auto; }
.proximo .passos { list-style: none; margin: 0.5rem 0 0.5rem; padding: 2.6rem 0 0; position: relative; width: min(900px, 100%); display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; text-align: left; }
.passos__linha { position: absolute; left: 0; right: 0; top: 8px; height: 1px; background: var(--hope-linha); }
.passos__linha::after { content: ""; position: absolute; left: 0; right: 0; top: -0.5px; height: 2px; background: linear-gradient(90deg, transparent, var(--hope-ouro)); transform-origin: left; transform: scaleX(var(--p, 0)); box-shadow: 0 0 10px rgb(201 169 97 / 0.6); }
.passos li { position: relative; display: grid; gap: 4px; opacity: 0.45; transition: opacity 500ms; }
.passos li.on { opacity: 1; }
.passos li::before { content: ""; position: absolute; top: -2.6rem; left: 0; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--hope-linha); background: var(--hope-noite); transition: background 400ms, border-color 400ms, box-shadow 400ms; }
.passos li.on::before { background: var(--hope-ouro); border-color: var(--hope-ouro); box-shadow: 0 0 16px rgb(201 169 97 / 0.8); }
.passos strong { font-family: var(--fonte-display); font-weight: 400; font-size: 1.5rem; color: var(--hope-offwhite); line-height: 1.1; }
.passos small { font-size: var(--texto-s); color: var(--hope-texto-suave); max-width: 26ch; }
.proximo .grupo-botoes { justify-content: center; }
[data-magnetico] { will-change: transform; }

/* =========================================================
   Responsivo
   ========================================================= */
@media (max-width: 900px) {
  .cena__pin { min-height: auto; padding-block: 5rem 4rem; }
  .cena__texto h2 .nq { white-space: nowrap; }
  .cena__texto h2 { font-size: clamp(1.55rem, 0.7rem + 4.4vw, 2.5rem); }
  .cena__grade { display: flex; flex-direction: column; gap: 1.5rem; }
  .cena__texto { display: contents; }
  .cena__texto > .rotulo { order: 1; }
  .cena__texto > h2 { order: 2; }
  .cena__texto > .texto-grande { order: 3; }
  .cena__palco { order: 4; width: min(84%, 400px); margin-block: 1rem; }
  .cena__areas { order: 5; width: 100%; }
  .cena__cta { order: 6; }
  .cena__nota strong { font-size: 2.8rem; }
  .radar__rotulo { font-size: 12px; }
  .proximo { padding-block: 5rem 4rem; }
  .proximo .passos { grid-template-columns: 1fr; padding: 0 0 0 2.4rem; gap: 1.4rem; width: min(420px, 100%); }
  .passos__linha { left: 7px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .passos__linha::after { top: 0; left: -0.5px; right: auto; width: 2px; height: auto; bottom: 0; background: linear-gradient(180deg, transparent, var(--hope-ouro)); transform-origin: top; transform: scaleY(var(--p, 0)); }
  .passos li::before { top: 4px; left: -2.4rem; }
  .proximo .grupo-botoes { width: 100%; }
  .proximo .grupo-botoes .botao { flex: 1 1 100%; }
}
/* Título do Próximo passo: "Vamos construir a próxima fase" numa linha só em telas médias e grandes */
@media (min-width: 760px) { .proximo__titulo { max-width: none; } .proximo__titulo .nq { white-space: nowrap; } }
@media (prefers-reduced-motion: reduce) {
  .estrelas i { animation: none; }
}

/* =========================================================
   Próximo passo — interações
   ========================================================= */
/* Passos: a bolinha acende quando o mouse passa por cima do passo (ou o foco chega nele) */
.proximo .passos li { cursor: default; transition: opacity 400ms, transform 400ms; }
.proximo .passos li::before { transition: background 300ms, border-color 300ms, box-shadow 300ms, transform 300ms; }
.proximo .passos li:hover, .proximo .passos li:focus-within { opacity: 1; transform: translateY(-3px); }
.proximo .passos li:hover::before, .proximo .passos li:focus-within::before { background: var(--hope-ouro); border-color: var(--hope-ouro); box-shadow: 0 0 20px rgb(201 169 97 / 0.9), 0 0 0 6px rgb(201 169 97 / 0.16); transform: scale(1.18); }
.proximo .passos li:hover strong { color: var(--hope-ouro-claro); }

/* Brilho dourado que segue o cursor + contorno da faixa que acende por perto */
.proximo__cursor { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 500ms; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgb(201 169 97 / 0.16), transparent 70%); }
.proximo.com-cursor .proximo__cursor { opacity: 1; }
.proximo__faixa--luz { -webkit-text-stroke: 1.5px rgb(244 230 191 / 0.95); opacity: 0; transition: opacity 400ms; -webkit-mask-image: radial-gradient(300px circle at var(--mx, -999px) var(--my, -999px), #000 0, transparent 100%); mask-image: radial-gradient(300px circle at var(--mx, -999px) var(--my, -999px), #000 0, transparent 100%); }
.proximo.com-cursor .proximo__faixa--luz { opacity: 1; }
.proximo__halo.pulsa { animation: pulsoHalo 800ms ease-out; }
@keyframes pulsoHalo { 40% { filter: brightness(2.1); } }

/* Frentes: o visitante marca por onde quer começar */
.frentes { display: grid; justify-items: center; gap: 0.9rem; margin-top: 0.4rem; max-width: 760px; }
.frentes__titulo { margin: 0; font-family: var(--fonte-display); font-size: clamp(1.25rem, 1rem + 0.8vw, 1.6rem); color: var(--hope-offwhite); line-height: 1.2; }
.frentes__titulo span { display: block; margin-top: 4px; font-family: var(--fonte-texto); font-size: var(--texto-s); color: var(--hope-texto-suave); }
.frentes__lista { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.frentes__lista li { animation: flutua 6s ease-in-out calc(var(--i) * -0.8s) infinite; }
.frentes__lista button { display: inline-flex; align-items: center; gap: 0.6em; padding: 0.7em 1.15em 0.7em 1em; border-radius: 999px; border: 1px solid rgb(201 169 97 / 0.4); background: rgb(18 41 31 / 0.88); color: var(--hope-offwhite); font-family: var(--fonte-mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; transition: background 250ms, color 250ms, border-color 250ms, box-shadow 250ms, transform 250ms; }
.frentes__lista button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgb(201 169 97 / 0.5); transition: background 250ms, box-shadow 250ms; }
.frentes__lista button:hover { border-color: var(--hope-ouro); transform: translateY(-2px) scale(1.04); box-shadow: 0 0 22px rgb(201 169 97 / 0.35); }
.frentes__lista button:hover::before { background: var(--hope-ouro); box-shadow: 0 0 10px var(--hope-ouro); }
.frentes__lista button[aria-pressed="true"] { background: var(--hope-ouro); border-color: var(--hope-ouro); color: var(--hope-noite); box-shadow: 0 0 26px rgb(201 169 97 / 0.55); }
.frentes__lista button[aria-pressed="true"]::before { background: var(--hope-noite); box-shadow: none; }
.frentes__resumo { margin: 0; min-height: 3em; max-width: 52ch; font-size: var(--texto-s); color: var(--hope-texto-suave); transition: color 300ms; }
.frentes__resumo.on { color: var(--hope-ouro-claro); }
@keyframes flutua { 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .frentes__lista li { animation: none; } .proximo__halo.pulsa { animation: none; } }
@media (max-width: 900px) { .frentes__lista button { font-size: 0.7rem; } .proximo__cursor, .proximo__faixa--luz { display: none; } }

/* =========================================================
   Palco do planeta com as frentes em órbita
   ========================================================= */
.frentes { width: min(1040px, 100%); max-width: none; margin-top: clamp(1.5rem, 4vw, 3.5rem); }
.palco { position: relative; width: 100%; aspect-ratio: 1.75; margin-block: 0.5rem; will-change: transform; }
.palco__halo { position: absolute; left: 50%; top: 50%; width: 120%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: radial-gradient(circle, rgb(201 169 97 / 0.26) 0%, rgb(201 169 97 / 0.08) 34%, transparent 62%); pointer-events: none; }
.palco__halo.pulsa { animation: pulsoHalo 800ms ease-out; }
.proximo__planeta { position: absolute; left: 50%; top: 50%; width: 100%; aspect-ratio: 1; translate: -50% -50%; pointer-events: none; }
.proximo__planeta canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.proximo__planeta .planeta-css { inset: 26%; }
.orbita { position: absolute; inset: 0; list-style: none; margin: 0; padding: 0; }
.orbita li { position: absolute; left: 50%; top: 50%; translate: -50% -50%; will-change: transform; }
/* posição inicial (antes do JS e com "reduzir movimento"): chips espalhados na elipse */
.orbita li { --a: calc(var(--i) * 45deg); }
@supports (translate: calc(cos(1deg) * 1px)) {
  .orbita li:not([style*="transform"]) { translate: calc(-50% + cos(var(--a)) * 44cqw) calc(-50% + sin(var(--a)) * 14cqw); }
}
.palco { container-type: inline-size; }
.orbita button { display: inline-flex; align-items: center; gap: 0.6em; padding: 0.7em 1.15em 0.7em 1em; border-radius: 999px; border: 1px solid rgb(201 169 97 / 0.4); background: rgb(18 41 31 / 0.9); color: var(--hope-offwhite); font-family: var(--fonte-mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; cursor: pointer; transition: background 250ms, color 250ms, border-color 250ms, box-shadow 250ms; }
.orbita button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgb(201 169 97 / 0.5); transition: background 250ms, box-shadow 250ms; }
.orbita button:hover, .orbita button:focus-visible { border-color: var(--hope-ouro); box-shadow: 0 0 24px rgb(201 169 97 / 0.4); }
.orbita button:hover::before, .orbita button:focus-visible::before { background: var(--hope-ouro); box-shadow: 0 0 10px var(--hope-ouro); }
.orbita button[aria-pressed="true"] { background: var(--hope-ouro); border-color: var(--hope-ouro); color: var(--hope-noite); box-shadow: 0 0 28px rgb(201 169 97 / 0.6); }
.orbita button[aria-pressed="true"]::before { background: var(--hope-noite); box-shadow: none; }
@media (max-width: 700px) {
  .palco { aspect-ratio: 1.1; margin-bottom: 9.5rem; }
  .proximo__planeta { width: 135%; }
  .orbita { inset: auto; left: 0; right: 0; top: calc(100% + 0.5rem); display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
  .orbita li { position: static; translate: none !important; transform: none !important; opacity: 1 !important; z-index: auto !important; }
  .palco__halo { width: 160%; }
  .orbita button { font-size: 0.7rem; }
}
@media (prefers-reduced-motion: reduce) { .palco { will-change: auto; } }
