/* Movimento: o que veio do site anterior (abertura, logo, títulos que se
   montam, frases da posição, retratos em pontos, cursor, trilho de leitura)
   e o que veio do dark-moon (céu fixo com o planeta, mapa de órbitas,
   faixa corrida, borda com feixe de luz, brilho que segue o mouse, grão). */

/* ---------- Títulos que se montam (site anterior) ---------- */
.has-motion [data-reveal-style] .rv-w,
.has-motion [data-reveal-style] .rv-c {
  --k: clamp(0, calc((var(--p, 1) - var(--at, 0) * 0.55) * 2.6), 1);
  display: inline-block;
}
.has-motion [data-reveal-style] .rv-w { white-space: nowrap; }
.has-motion [data-reveal-style="assemble"] .rv-w {
  opacity: var(--k);
  filter: blur(calc((1 - var(--k)) * 6px));
  transform: translate(calc((1 - var(--k)) * var(--dx)), calc((1 - var(--k)) * var(--dy))) rotate(calc((1 - var(--k)) * var(--rot)));
}
.has-motion [data-reveal-style="chars"] .rv-c { opacity: var(--k); transform: translateY(calc((1 - var(--k)) * 0.6em)); }
.has-motion [data-reveal-style="flip"] .rv-w { opacity: var(--k); transform: perspective(500px) rotateX(calc((1 - var(--k)) * 90deg)); transform-origin: 50% 100%; }

/* ---------- Céu fixo da página inteira (dark-moon) ---------- */
.cosmos { position: fixed; inset: 0; z-index: -2; pointer-events: none; }
.cosmos canvas { display: block; width: 100%; height: 100%; }
.bg-dots { display: none !important; }

/* Grão de filme por cima de tudo, bem leve */
.grain { position: fixed; inset: -50%; z-index: 2300; pointer-events: none; opacity: 0.045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.has-motion .grain { animation: grain 1s steps(6) infinite; }
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-4%, 3%); } 40% { transform: translate(3%, -2%); }
  60% { transform: translate(-2%, -4%); } 80% { transform: translate(4%, 2%); } 100% { transform: translate(0, 0); }
}

/* ---------- Faixa corrida ---------- */
.marquee { overflow: hidden; padding: 22px 0; border-bottom: 1px solid var(--line-dark); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { display: flex; width: max-content; }
.marquee__list { display: flex; flex: none; align-items: center; gap: 36px; padding-right: 36px; }
.marquee__list li { display: flex; align-items: center; gap: 36px; font-size: clamp(18px, 2vw, 26px); font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; color: var(--on-dark); }
.marquee__list li::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 12px var(--sun); }
.has-motion .marquee__track { animation: marquee 38s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Mapa de órbitas (fixo na rolagem) ---------- */
.orbit { position: relative; }
.has-motion .orbit { height: 420vh; }
.orbit__sticky { position: relative; min-height: 100svh; overflow: hidden; }
.has-motion .orbit__sticky { position: sticky; top: 0; height: 100svh; }
.orbit__canvas { position: absolute; inset: 0; }
.orbit__canvas canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.orbit__canvas canvas:active { cursor: grabbing; }
.orbit__copy { position: relative; z-index: 1; display: grid; gap: 18px; padding-top: clamp(110px, 16vh, 150px); pointer-events: none; }
.orbit__copy h2 { max-width: 11ch; font-size: clamp(34px, 4.2vw, 60px); }
.orbit__copy .lead { max-width: 30ch; }
.orbit__hint { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 6px 14px; border-radius: 999px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line-dark); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-dark); }
.orbit__card {
  position: absolute; z-index: 2; left: max(var(--gutter), calc((100vw - var(--max)) / 2)); bottom: clamp(28px, 6vh, 56px);
  display: grid; gap: 8px; width: min(400px, calc(100vw - var(--gutter) * 2)); padding: 20px 22px;
  border-radius: 20px; background: color-mix(in srgb, var(--ink) 72%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px var(--line-dark), 0 30px 60px -30px rgb(0 0 0 / 0.8);
}
.orbit__step { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-dark-soft); font-variant-numeric: tabular-nums; }
.orbit__step b { color: var(--sun); }
.orbit__name { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.orbit__text { font-size: 15px; color: var(--on-dark); min-height: 3em; }
.orbit__dots { display: flex; gap: 8px; margin-top: 6px; }
.orbit__dots i { width: 22px; height: 3px; border-radius: 3px; background: var(--line-dark); transition: background 0.4s var(--ease); }
.orbit__dots i.is-on { background: var(--sun); }
.has-motion .orbit__card.is-swap .orbit__name, .has-motion .orbit__card.is-swap .orbit__text { animation: swap 0.5s var(--ease) both; }
@keyframes swap { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } }
@media (max-width: 860px) {
  .orbit__copy { padding-top: 96px; }
  .orbit__copy h2 { font-size: clamp(32px, 9vw, 44px); }
  .orbit__copy .lead { font-size: 16px; }
}

/* ---------- Borda com feixe de luz girando (dark-moon "beam") ---------- */
@property --beam { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.beam { position: relative; }
.beam::before {
  content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--beam), transparent 0 70%, color-mix(in srgb, var(--sun) 40%, transparent) 80%, var(--sun) 88%, var(--paper) 90%, transparent 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.has-motion .beam::before { animation: beam 5s linear infinite; }
@keyframes beam { to { --beam: 360deg; } }

/* ---------- Brilho que segue o mouse nos cartões ---------- */
.glow { position: relative; isolation: isolate; }
.glow::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--sun) 14%, transparent), transparent 60%);
  transition: opacity 0.4s var(--ease);
}
.glow:hover::after { opacity: 1; }

/* ---------- Topo: entrada com desfoque (dark-moon) ---------- */
/* entrada com desfoque */
@keyframes rise-blur { from { opacity: 0; transform: translateY(18px); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }

/* ---------- Logo em linha no cabeçalho e no rodapé ---------- */
.top__logo .logo { width: 92px; color: var(--paper); }
.foot__brand .logo { width: 150px; color: var(--paper); }
.logo__dot { background: currentColor; }

/* ---------- Posição (frases que acendem, do site anterior) ---------- */
.stance__kicker { color: var(--sun); letter-spacing: 0.16em; text-transform: uppercase; font-size: 12px; }
.stance__sentence { font-size: clamp(30px, 0.8rem + 3vw, 64px) !important; }
.has-motion .stance__steps li { background: color-mix(in srgb, var(--sun) calc(var(--on) * 100%), color-mix(in srgb, var(--paper) 22%, transparent)); }

/* ---------- Retratos montados por pontos (site anterior) ---------- */
.dots { display: grid; gap: 14px; }
.dots:nth-child(2) { margin-top: 64px; }
.photo { position: relative; overflow: hidden; border-radius: 24px; background: var(--paper); }
.photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.photo__dots { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.photo--dots img { opacity: 0; }
.photo--dots.photo--focus img { opacity: 1; animation: portrait-focus 0.5s var(--ease-out) both; }
.photo--dots.photo--focus .photo__dots { opacity: 0; transition: opacity 0.4s var(--ease-out); }
@keyframes portrait-focus {
  0% { opacity: 0; filter: grayscale(1) blur(9px) brightness(1.15); transform: scale(1.04); }
  35% { opacity: 1; }
  100% { opacity: 1; filter: grayscale(1) contrast(1.05); transform: none; }
}
.photo__hud { position: absolute; inset: 0; pointer-events: none; }
.photo__ticks { position: absolute; left: 18%; right: 18%; top: 14px; display: flex; justify-content: space-between; align-items: flex-start; }
.photo__ticks i { width: 1px; height: 6px; background: color-mix(in srgb, var(--ink) 45%, transparent); }
.photo__ticks i.is-major { height: 11px; background: var(--ink); }
.photo__cross { position: absolute; top: 50%; width: 14px; height: 14px; translate: 0 -50%; }
.photo__cross::before, .photo__cross::after { content: ""; position: absolute; background: color-mix(in srgb, var(--ink) 60%, transparent); }
.photo__cross::before { left: 50%; top: 0; width: 1px; height: 100%; }
.photo__cross::after { top: 50%; left: 0; height: 1px; width: 100%; }
.photo__cross--l { left: 12px; }
.photo__cross--r { right: 12px; }
.dots figcaption { display: grid; gap: 2px; }
.dots figcaption strong { font-size: 18px; letter-spacing: -0.01em; }
.dots figcaption span { font-size: 14px; color: var(--on-dark-soft); }

.faq__head h2 { font-size: clamp(36px, 4.2vw, 60px); }
.has-intro .hero__copy > * { animation-play-state: paused; }
