/* ============================================================================
   PRISMA — camada de design system
   Estende (não substitui) assets/css/components.css e o components.css do
   genlabs.aura.build. Carregue este arquivo POR ÚLTIMO.
   Tema: vidro escuro + refração neon. Base herdada: #020205 / .glass-panel.
   ========================================================================= */

/* --- tokens ------------------------------------------------------------- */
:root {
  /* superfícies */
  --ds-void: #020205;
  --ds-surface: #0d0d12;
  --ds-surface-2: #14141c;

  /* espectro (a refração do prisma) */
  --ds-indigo: #6366f1;
  --ds-indigo-deep: #4f46e5;
  --ds-violet: #a855f7;
  --ds-pink: #ec4899;
  --ds-pink-deep: #db2777;
  --ds-amber: #fbbf24;
  --ds-emerald: #34d399;
  --ds-cyan: #22d3ee;
  --ds-sky: #0ea5e9;
  --ds-rose: #f43f5e;

  --ds-spectrum: linear-gradient(90deg,
      var(--ds-indigo) 0%,
      var(--ds-violet) 16%,
      var(--ds-pink) 32%,
      var(--ds-amber) 48%,
      var(--ds-emerald) 64%,
      var(--ds-cyan) 82%,
      var(--ds-indigo) 100%);

  /* elevação / raios */
  --ds-r-sm: 0.75rem;
  --ds-r-md: 1.25rem;
  --ds-r-lg: 2rem;
  --ds-r-xl: 2.5rem;
  --ds-r-pill: 9999px;

  /* motion */
  --ds-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ds-ease-spring: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Os blobs decorativos sangram para fora da janela por desenho (blob-2 fica em
   right:-5%, blob-1 em top:-10%). Sem isto o navegador abre barras de rolagem
   nos dois eixos. Todo o scroll da página acontece dentro de
   #main-scroll-container, então o documento não precisa rolar em eixo nenhum —
   e `overflow: hidden` nos dois evita que esconder um eixo transforme o outro
   em `auto`, que foi o que empurrou o cabeçalho fixo para fora da tela. */
html,
body { overflow: hidden; }

/* --- tipografia --------------------------------------------------------- */
/* Inter para texto, Space Mono para dados/rótulos. As duas famílias vêm de
   css2_1aa00095e743.css (local) com CDN do Google Fonts como reserva. */
.t-display,
.t-h1 {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(2.5rem, 5.4vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-transform: none;
}
.t-h2 {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.t-h3 {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 500;
  font-size: 1.75rem;
  line-height: 1.15;
  letter-spacing: -0.022em;
}
.t-h4 {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.t-h5 {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.t-h6 {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-weight: 700;
  font-size: 0.75rem;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.t-body-lg {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 300;
  font-size: 1.125rem;
  line-height: 1.7;
  letter-spacing: -0.005em;
}
.t-body {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 400;
  font-size: 0.9375rem;
  line-height: 1.65;
  letter-spacing: 0;
}
.t-body-sm {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 400;
  font-size: 0.8125rem;
  line-height: 1.6;
  letter-spacing: 0;
}
.t-caption {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-weight: 400;
  font-size: 0.6875rem;
  line-height: 1.5;
  letter-spacing: 0.08em;
}
.t-label {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-weight: 700;
  font-size: 0.625rem;
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.t-helper {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 400;
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0.01em;
}
.t-code {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-weight: 400;
  font-size: 0.8125rem;
  line-height: 1.7;
  letter-spacing: 0;
}

/* texto refratado — o espectro atravessando a palavra */
.text-spectrum {
  background: var(--ds-spectrum);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: spectrum-slide 9s linear infinite;
}
.text-glow-neon {
  text-shadow: 0 0 24px rgba(99, 102, 241, 0.55), 0 0 60px rgba(168, 85, 247, 0.28);
}

/* --- fundos animados ---------------------------------------------------- */

/* blobs extras, no mesmo padrão de .blob-1/2/3 de components.css */
.blob-4 {
  background: #a855f7;
  width: 420px;
  height: 420px;
  top: 55%;
  right: 25%;
  opacity: 0.28;
  animation-delay: -3s;
}
.blob-5 {
  background: #22d3ee;
  width: 340px;
  height: 340px;
  bottom: 12%;
  left: 18%;
  opacity: 0.22;
  animation-delay: -7s;
}

/* aurora: manto espectral que respira atrás de cada seção */
.aurora {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 520px;
  pointer-events: none;
  opacity: 0.5;
  filter: blur(90px);
  background:
    radial-gradient(40% 60% at 20% 40%, rgba(99, 102, 241, 0.55), transparent 70%),
    radial-gradient(35% 55% at 55% 30%, rgba(168, 85, 247, 0.45), transparent 70%),
    radial-gradient(35% 55% at 80% 55%, rgba(34, 211, 238, 0.35), transparent 70%);
  background-size: 200% 200%;
  animation: aurora-shift 22s ease-in-out infinite alternate;
  z-index: 0;
}
.aurora-warm {
  background:
    radial-gradient(40% 60% at 25% 45%, rgba(236, 72, 153, 0.42), transparent 70%),
    radial-gradient(35% 55% at 65% 30%, rgba(251, 191, 36, 0.3), transparent 70%),
    radial-gradient(35% 55% at 85% 60%, rgba(99, 102, 241, 0.4), transparent 70%);
}
.aurora-cool {
  background:
    radial-gradient(40% 60% at 18% 50%, rgba(52, 211, 153, 0.35), transparent 70%),
    radial-gradient(38% 58% at 60% 35%, rgba(14, 165, 233, 0.4), transparent 70%),
    radial-gradient(35% 55% at 88% 55%, rgba(168, 85, 247, 0.35), transparent 70%);
}

/* feixe: a assinatura — a luz que o prisma abre em espectro */
.beam {
  position: absolute;
  left: -10%;
  width: 120%;
  height: 160px;
  pointer-events: none;
  background: var(--ds-spectrum);
  background-size: 250% 100%;
  filter: blur(58px);
  opacity: 0.32;
  transform: rotate(-5deg);
  animation: spectrum-slide 14s linear infinite, beam-breathe 9s ease-in-out infinite alternate;
  z-index: 0;
}

/* régua espectral — o feixe reduzido a 1px, separa as dobras */
.spectrum-rule {
  height: 1px;
  width: 100%;
  border: 0;
  background: var(--ds-spectrum);
  background-size: 300% 100%;
  animation: spectrum-slide 11s linear infinite;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  opacity: 0.7;
}

/* malha de pontos + varredura de scanline para o fundo das seções */
.mesh-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent 75%);
  mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent 75%);
  opacity: 0.5;
}
.scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.scanline::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.045), transparent);
  animation: scan 7s linear infinite;
}

/* holofote que segue o cursor (vars --mx/--my vindas do JS) */
.spotlight::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.5s var(--ds-ease);
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%),
      rgba(255, 255, 255, 0.09), transparent 62%);
  z-index: 1;
}
.spotlight:hover::before { opacity: 1; }

/* --- surgimento --------------------------------------------------------- */

/* revelação no scroll (JS adiciona .is-visible) */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px) scale(0.985);
  filter: blur(7px);
  transition:
    opacity 0.95s var(--ds-ease),
    transform 0.95s var(--ds-ease),
    filter 0.95s var(--ds-ease);
  transition-delay: var(--d, 0ms);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

/* surgimento imediato no load (usado na primeira dobra) */
.rise {
  animation: rise 1.1s var(--ds-ease) both;
  animation-delay: var(--d, 0ms);
}
.rise-blur {
  animation: rise-blur 1.3s var(--ds-ease) both;
  animation-delay: var(--d, 0ms);
}
/* a linha do título que se abre a partir do feixe */
.split-line {
  display: block;
  overflow: hidden;
}
.split-line > span {
  display: block;
  animation: line-up 1.15s var(--ds-ease) both;
  animation-delay: var(--d, 0ms);
}

/* --- botões ------------------------------------------------------------- */
/* Nota de arquitetura: .btn usa apenas ::before (brilho) e nunca overflow:hidden,
   para que .tt::after (tooltip) possa escapar da caixa do botão. */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  padding: 0.875rem 1.5rem;
  border-radius: var(--ds-r-pill);
  transition:
    transform 0.35s var(--ds-ease-spring),
    box-shadow 0.35s var(--ds-ease),
    background-color 0.35s var(--ds-ease),
    color 0.35s var(--ds-ease),
    opacity 0.2s linear;
}
.btn:active { transform: translateY(1px) scale(0.985); }
.btn[disabled],
.btn.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  filter: saturate(0.25);
}

/* brilho que varre o botão no hover — o gradiente é recortado pelo próprio
   border-radius do ::before, então dispensa overflow:hidden no botão */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(100deg,
      transparent 38%,
      rgba(255, 255, 255, 0.45) 50%,
      transparent 62%);
  background-size: 260% 100%;
  background-position: 175% 0;
  background-repeat: no-repeat;
}
.btn:hover::before { animation: sheen 0.85s var(--ds-ease); }

/* pulso emitido no clique (JS adiciona .is-pressed por 450ms) */
.btn.is-pressed { animation: press-flash 0.45s var(--ds-ease); }

/* primário — o botão neon */
.btn-neon {
  color: #fff;
  background: linear-gradient(135deg, var(--ds-indigo-deep), var(--ds-violet) 55%, var(--ds-pink));
  background-size: 180% 180%;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16) inset,
    0 10px 34px -10px rgba(99, 102, 241, 0.85),
    0 0 44px -18px rgba(236, 72, 153, 0.9);
  animation: gradient-pan 7s ease infinite;
}
.btn-neon:hover {
  transform: translateY(-3px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.26) inset,
    0 18px 46px -12px rgba(99, 102, 241, 1),
    0 0 70px -16px rgba(236, 72, 153, 1);
}

/* secundário — vidro */
.btn-glass {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-3px);
  box-shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.9), 0 0 34px -14px rgba(255, 255, 255, 0.4);
}

/* terciário — só contorno espectral, ganha preenchimento no hover */
.btn-outline {
  color: rgba(255, 255, 255, 0.8);
  background: transparent;
  border: 1px solid transparent;
  background-image:
    linear-gradient(rgba(2, 2, 5, 0.9), rgba(2, 2, 5, 0.9)),
    var(--ds-spectrum);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  background-size: 100% 100%, 300% 100%;
  animation: spectrum-slide 8s linear infinite;
}
.btn-outline:hover {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 0 34px -10px rgba(168, 85, 247, 0.9);
}

/* fantasma — texto puro */
.btn-ghost {
  color: rgba(255, 255, 255, 0.55);
  background: transparent;
  padding-left: 1rem;
  padding-right: 1rem;
}
.btn-ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

/* destrutivo */
.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, var(--ds-rose), #9f1239);
  box-shadow: 0 10px 30px -12px rgba(244, 63, 94, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}
.btn-danger:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px -12px rgba(244, 63, 94, 1);
}

/* tamanhos */
.btn-sm { padding: 0.5rem 1rem; font-size: 0.75rem; }
.btn-lg { padding: 1.0625rem 2rem; font-size: 0.9375rem; }
.btn-icon { padding: 0; width: 2.75rem; height: 2.75rem; }

/* --- campos de formulário ---------------------------------------------- */
.field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8125rem 1.125rem;
  border-radius: var(--ds-r-md);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.4s var(--ds-ease), box-shadow 0.4s var(--ds-ease), background-color 0.4s var(--ds-ease);
}
.field:hover { border-color: rgba(255, 255, 255, 0.2); }
.field:focus-within {
  border-color: rgba(99, 102, 241, 0.75);
  background: rgba(99, 102, 241, 0.06);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14), 0 0 30px -10px rgba(99, 102, 241, 0.85);
}
.field input,
.field textarea,
.field select {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: #fff;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(255, 255, 255, 0.28); }
.field-pill { border-radius: var(--ds-r-pill); }
.field-invalid {
  border-color: rgba(244, 63, 94, 0.65);
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}
.field-invalid:focus-within {
  border-color: rgba(244, 63, 94, 0.9);
  background: rgba(244, 63, 94, 0.06);
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.18), 0 0 30px -10px rgba(244, 63, 94, 0.9);
}
.field-valid { border-color: rgba(52, 211, 153, 0.55); }
.field-disabled { opacity: 0.35; pointer-events: none; }

/* switch */
.switch {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: var(--ds-r-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: background 0.4s var(--ds-ease), box-shadow 0.4s var(--ds-ease);
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.4s var(--ds-ease-spring);
}
.switch.is-on {
  background: linear-gradient(135deg, var(--ds-indigo), var(--ds-violet));
  box-shadow: 0 0 24px -6px rgba(99, 102, 241, 0.9);
}
.switch.is-on::after { transform: translateX(20px); }

/* --- cartões ------------------------------------------------------------ */
.card {
  position: relative;
  overflow: hidden;
  border-radius: var(--ds-r-lg);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition:
    transform 0.55s var(--ds-ease),
    background-color 0.55s var(--ds-ease),
    border-color 0.55s var(--ds-ease),
    box-shadow 0.55s var(--ds-ease);
}
.card:hover {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.95);
}
/* halo espectral que acende na borda superior.
   Fica em ::after porque .spotlight ocupa o ::before do mesmo cartão. */
.card-neon::after {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: var(--ds-spectrum);
  background-size: 300% 100%;
  opacity: 0;
  transition: opacity 0.5s var(--ds-ease);
  animation: spectrum-slide 6s linear infinite;
}
.card-neon:hover::after { opacity: 1; }
.card-neon:hover { box-shadow: 0 30px 70px -34px rgba(99, 102, 241, 0.8); }

/* cartão que inclina seguindo o cursor (vars do JS) */
.tilt {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.5s var(--ds-ease);
  transform-style: preserve-3d;
  will-change: transform;
}

/* --- badges ------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 0.5rem;
  border: 1px solid;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: box-shadow 0.4s var(--ds-ease), transform 0.4s var(--ds-ease);
}
.badge:hover { transform: translateY(-2px); }
.badge-pill { border-radius: var(--ds-r-pill); padding-inline: 0.875rem; }
.badge-indigo { color: #c7d2fe; background: rgba(99, 102, 241, 0.12); border-color: rgba(99, 102, 241, 0.32); }
.badge-indigo:hover { box-shadow: 0 0 22px -6px rgba(99, 102, 241, 0.95); }
.badge-violet { color: #e9d5ff; background: rgba(168, 85, 247, 0.12); border-color: rgba(168, 85, 247, 0.32); }
.badge-violet:hover { box-shadow: 0 0 22px -6px rgba(168, 85, 247, 0.95); }
.badge-pink { color: #fbcfe8; background: rgba(236, 72, 153, 0.12); border-color: rgba(236, 72, 153, 0.32); }
.badge-pink:hover { box-shadow: 0 0 22px -6px rgba(236, 72, 153, 0.95); }
.badge-emerald { color: #a7f3d0; background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.32); }
.badge-emerald:hover { box-shadow: 0 0 22px -6px rgba(52, 211, 153, 0.95); }
.badge-amber { color: #fde68a; background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.32); }
.badge-amber:hover { box-shadow: 0 0 22px -6px rgba(251, 191, 36, 0.95); }
.badge-cyan { color: #a5f3fc; background: rgba(34, 211, 238, 0.12); border-color: rgba(34, 211, 238, 0.32); }
.badge-cyan:hover { box-shadow: 0 0 22px -6px rgba(34, 211, 238, 0.95); }
.badge-rose { color: #fecdd3; background: rgba(244, 63, 94, 0.12); border-color: rgba(244, 63, 94, 0.32); }
.badge-rose:hover { box-shadow: 0 0 22px -6px rgba(244, 63, 94, 0.95); }
.badge-neutral { color: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.12); }

/* ponto pulsante de status, herdado do "Mercado ao vivo" do genlabs */
.pulse-dot {
  position: relative;
  display: inline-flex;
  width: 0.5rem;
  height: 0.5rem;
  flex: none;
}
.pulse-dot::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.75;
  animation: ping 1.9s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.pulse-dot::after {
  content: '';
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

/* --- tooltip ------------------------------------------------------------ */
.tt { position: relative; }
.tt::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, 6px);
  padding: 0.4375rem 0.75rem;
  border-radius: 0.625rem;
  white-space: nowrap;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(13, 13, 18, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.95), 0 0 26px -14px rgba(99, 102, 241, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s var(--ds-ease), transform 0.28s var(--ds-ease);
  z-index: 60;
}
.tt:hover::after,
.tt:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }

.tt-bottom::after { bottom: auto; top: calc(100% + 10px); transform: translate(-50%, -6px); }
.tt-bottom:hover::after,
.tt-bottom:focus-visible::after { transform: translate(-50%, 0); }

/* --- modal -------------------------------------------------------------- */
.ds-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ds-ease), visibility 0.4s;
}
.ds-modal.is-open { opacity: 1; visibility: visible; }
.ds-modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(2, 2, 5, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.ds-modal__card {
  position: relative;
  width: min(460px, 100%);
  border-radius: var(--ds-r-xl);
  padding: 2rem;
  transform: translateY(22px) scale(0.95);
  opacity: 0;
  transition: transform 0.55s var(--ds-ease-spring), opacity 0.45s var(--ds-ease);
}
.ds-modal.is-open .ds-modal__card { transform: none; opacity: 1; }

/* --- navegação ---------------------------------------------------------- */
.nav-pill {
  position: relative;
  padding: 0.5rem 1.25rem;
  border-radius: var(--ds-r-pill);
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.35s var(--ds-ease), background-color 0.35s var(--ds-ease);
}
.nav-pill:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.nav-pill.is-active { color: #fff; background: rgba(255, 255, 255, 0.1); }
.nav-pill.is-active::after {
  content: '';
  position: absolute;
  left: 26%;
  right: 26%;
  bottom: 3px;
  height: 1px;
  background: var(--ds-spectrum);
  background-size: 300% 100%;
  animation: spectrum-slide 6s linear infinite;
}

/* rail de abas: acende a base no estado ativo (usa .icon-btn de components.css).
   Sem overflow:hidden e usando ::before, para não brigar com .tt::after. */
.icon-btn { position: relative; }
.icon-btn::before {
  content: '';
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--ds-spectrum);
  background-size: 300% 100%;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.5s var(--ds-ease-spring);
  animation: spectrum-slide 6s linear infinite;
}
.icon-btn.active::before { transform: scaleX(1); }
.icon-btn.active { box-shadow: 0 0 34px -10px rgba(99, 102, 241, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.3) inset; }

/* painéis de conteúdo trocados por switchPanel() — reaproveita o keyframe
   fadeIn declarado em assets/css/components.css */
.panel-content { animation: fadeIn 0.5s ease-out forwards; }

/* --- marquee ------------------------------------------------------------ */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 34s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.logo-mark {
  filter: brightness(0) invert(1);
  opacity: 0.34;
  transition: opacity 0.45s var(--ds-ease), filter 0.45s var(--ds-ease);
}
.logo-mark:hover {
  opacity: 0.95;
  filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(99, 102, 241, 0.9));
}

/* --- amostras de cor ---------------------------------------------------- */
.swatch {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--ds-r-md);
  /* sem overflow:hidden — o tooltip de "copiar" precisa sair da caixa */
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: transform 0.45s var(--ds-ease), box-shadow 0.45s var(--ds-ease), border-color 0.45s var(--ds-ease);
}
.swatch:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 22px 44px -22px var(--sw, rgba(255, 255, 255, 0.6)), 0 0 34px -18px var(--sw, #fff);
}
.swatch__chip {
  display: block; /* é um <span>: sem isto, height/background não se aplicam */
  height: 76px;
  background: var(--sw);
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--ds-r-md) - 1px) calc(var(--ds-r-md) - 1px) 0 0;
}
.swatch__chip::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.32), transparent 55%);
  opacity: 0;
  transition: opacity 0.45s var(--ds-ease);
}
.swatch:hover .swatch__chip::after { opacity: 1; }

/* barra de espectro para gradientes */
.spectrum-bar {
  height: 56px;
  border-radius: var(--ds-r-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--ds-spectrum);
  background-size: 300% 100%;
  animation: spectrum-slide 10s linear infinite;
}

/* --- sparkline / dados -------------------------------------------------- */
.spark {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 52px;
}
.spark > i {
  display: block;
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: rgba(255, 255, 255, 0.18);
  transform-origin: bottom;
  animation: spark-rise 1.1s var(--ds-ease) both, spark-pulse 3.4s ease-in-out infinite;
  animation-delay: var(--d, 0ms), calc(var(--d, 0ms) + 1.1s);
}
.spark > i.is-peak {
  background: var(--ds-emerald);
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.75);
}

/* anel orbital decorativo */
.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  animation: orbit-spin 26s linear infinite;
  pointer-events: none;
}
.orbit::after {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ds-cyan);
  box-shadow: 0 0 14px var(--ds-cyan);
}

/* tecla */
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  padding: 0.125rem 0.375rem;
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom-width: 2px;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.625rem;
  color: rgba(255, 255, 255, 0.6);
}

/* linha de especificação tipográfica */
.spec-row {
  display: grid;
  gap: 0.25rem 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  transition: background-color 0.45s var(--ds-ease), padding-left 0.45s var(--ds-ease);
}
.spec-row:hover {
  background: rgba(255, 255, 255, 0.02);
  padding-left: 0.75rem;
}
@media (min-width: 900px) {
  .spec-row { grid-template-columns: minmax(0, 1fr) 300px; align-items: baseline; }
}

/* tabela de tokens */
.token-table { width: 100%; border-collapse: collapse; }
.token-table th,
.token-table td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}
.token-table tbody tr { transition: background-color 0.35s var(--ds-ease); }
.token-table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }

/* --- acessibilidade ----------------------------------------------------- */
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--ds-cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- keyframes ---------------------------------------------------------- */
@keyframes spectrum-slide {
  from { background-position: 0% 50%; }
  to { background-position: 300% 50%; }
}
@keyframes gradient-pan {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes aurora-shift {
  0% { background-position: 0% 0%; transform: translate3d(0, 0, 0) scale(1); }
  100% { background-position: 100% 100%; transform: translate3d(-3%, 2%, 0) scale(1.12); }
}
@keyframes beam-breathe {
  0% { opacity: 0.2; transform: rotate(-5deg) scaleY(0.9); }
  100% { opacity: 0.42; transform: rotate(-3deg) scaleY(1.15); }
}
@keyframes scan {
  0% { top: -180px; }
  100% { top: 100%; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}
@keyframes rise-blur {
  from { opacity: 0; transform: translateY(34px) scale(0.97); filter: blur(12px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes line-up {
  from { transform: translateY(110%) rotate(3deg); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes sheen {
  from { background-position: 175% 0; }
  to { background-position: -75% 0; }
}
@keyframes press-flash {
  0% { filter: brightness(1.55); }
  100% { filter: brightness(1); }
}
@keyframes ping {
  75%, 100% { transform: scale(2.4); opacity: 0; }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes spark-rise {
  from { transform: scaleY(0); opacity: 0; }
  to { transform: scaleY(1); opacity: 1; }
}
@keyframes spark-pulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; transform: scaleY(1.08); }
}
@keyframes orbit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes caret {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
.caret { animation: caret 1.05s steps(1) infinite; }

/* --- animações decorativas contínuas custam caro em telas compactas -----
   MEDIDO EM IPHONE 16 PRO MAX (2026-09-08): `.aurora` (usado em TODAS as
   dobras — Sobre, Serviços, Processo, Portfólio, CTA Final, Rodapé,
   Confiança) e `.blob` (Hero) combinam `filter: blur(90px)` num elemento
   grande (até 600px) com uma animação INFINITA que muda
   `background-position`/`transform` a cada frame, sem NENHUMA pausa por
   visibilidade — ao contrário do Kinetic Grid da Hero (que hiberna via
   IntersectionObserver), estas rodam para sempre, em toda dobra ao mesmo
   tempo, independente de estar em cena ou de o usuário estar rolando.
   `.scanline::before` (Hero) soma um terceiro looping, mais barato (sem
   blur) mas ainda assim contínuo e sem pausa.

   Isso é diferente do ajuste de `prefers-reduced-motion` logo abaixo: aqui
   a motivação é performance de repaint num dispositivo real, não uma
   preferência de acessibilidade — por isso o gatilho é largura, não
   `prefers-reduced-motion`. Abaixo de 900px as três animações ficam
   estáticas (a posição inicial do próprio keyframe, sem `animation` — o
   brilho continua visível, só para de se mover). Desktop mantém a
   atmosfera animada aprovada, sem nenhuma mudança. */
@media (max-width: 899px) {
  .blob, .aurora, .scanline::before { animation: none !important; }
}

/* --- respeito a prefers-reduced-motion ---------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; filter: none; }
  .blob, .aurora, .beam, .scanline::before, .marquee__track { animation: none !important; }
}
