/* DeskNow: página de download.
   Tokens, tipografia, herói com vidro 3D, mundo claro e rodapé. */

@font-face {
  font-family: "Geist";
  src: url("assets/Geist-Variavel.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Ângulo de entrada do vidro (animável) */
@property --ent {
  syntax: "<angle>";
  inherits: true;
  initial-value: 0deg;
}

:root {
  --noite: #110E18;
  --purpura: #2C2148;
  --eletrico: #4F5BE8;
  --ciano: #0CBAE7;
  --lilas: #897EF6;
  --nevoa: #F1F0FA;
  --tinta: #17132B;
  --apagado: #5F5A78;      /* texto secundário no claro (AA sobre névoa) */
  --anel: var(--ciano);    /* anel de foco: ciano no escuro, elétrico no claro */
  --pad: clamp(1.25rem, 5vw, 4rem);
  --raio-mundo: clamp(2rem, 5vw, 4rem);
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--noite);
  color: #fff;
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(1.125rem, 1.05rem + 0.2vw, 1.25rem);
  line-height: 1.5;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
p, h1, h2, h3, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--anel);
  outline-offset: 3px;
  border-radius: 6px;
}

.pular {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.75rem 1.25rem;
  background: #fff;
  color: var(--tinta);
  font-weight: 600;
  border-radius: 999px;
}
.pular:focus { top: 1rem; }

.cont {
  width: min(100% - 2 * var(--pad), 76rem);
  margin-inline: auto;
}

/* ---------- Botão e link (classes únicas, sem seletores de seção) ---------- */

.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  padding: 0.75rem 2rem;
  border-radius: 999px;
  background: var(--eletrico);
  color: #fff;
  font: 600 1rem/1.2 "Geist", system-ui, sans-serif;
  text-decoration: none;
  box-shadow: 0 10px 30px -10px rgba(79, 91, 232, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.botao:hover { background: #4A56DF; transform: translateY(-2px); }
.botao:active { transform: translateY(0); }

.link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: underline;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
}
.link:hover { text-decoration-thickness: 2px; }
.link--claro { color: var(--eletrico); }

/* ---------- Herói ---------- */

.heroi {
  --anel: #FFFFFF;  /* branco: o ciano some sobre o canto ciano do degradê */
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--raio-mundo) + 3rem);
  color: #fff;
  /* O cartão da logo reconstruído: noite (sup. esq.), púrpura (sup. dir.),
     ciano (inf. esq.), lilás (inf. dir.), índigo no centro. A primeira camada
     escurece a coluna de texto para manter o contraste do branco. */
  background:
    radial-gradient(60% 55% at 14% 62%, rgba(17, 14, 24, 0.62), transparent 100%),
    radial-gradient(65% 70% at 0% 0%, var(--noite) 0%, transparent 100%),
    radial-gradient(65% 70% at 100% 0%, var(--purpura) 0%, transparent 100%),
    radial-gradient(60% 55% at 0% 100%, var(--ciano) 0%, transparent 100%),
    radial-gradient(70% 75% at 100% 100%, var(--lilas) 0%, transparent 100%),
    #343F89;
}

/* Grão leve (SVG embutido, sem arquivo externo) */
.heroi::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.14;
  mix-blend-mode: overlay;
  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='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.topo {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem var(--pad);
}
.topo__logo { display: inline-flex; min-height: 2.75rem; align-items: center; }
.topo__logo img { width: 8.75rem; height: auto; }
.topo__nav { display: flex; align-items: center; gap: clamp(0.5rem, 2.5vw, 2rem); }
.topo__link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 0.5rem;
  color: #fff;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  opacity: 0.92;
}
.topo__link:hover { opacity: 1; text-decoration: underline; text-underline-offset: 0.3em; }

.heroi__miolo {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1rem, 4vh, 3rem) var(--pad) 0;
  outline: none;
}

/* Manchete gigante: cada linha sobe por trás de uma máscara */
.manchete {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.045em;
  line-height: 0.86;
  font-size: clamp(3.6rem, 12.5vw, 11.5rem);
  margin-bottom: clamp(1.5rem, 4vh, 2.75rem);
}
.manchete__linha {
  display: block;
  overflow: hidden;
  padding: 0.04em 0.04em 0.06em 0;
  margin-block: -0.04em;
}
.manchete__linha > span {
  display: block;
  animation: sobe-linha 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}
.manchete__linha:nth-child(2) > span { animation-delay: 0.12s; }
.manchete__linha:nth-child(3) > span { animation-delay: 0.24s; }

@keyframes sobe-linha {
  from { transform: translateY(105%); }
}

.apoio {
  max-width: 34rem;
  margin-bottom: 2rem;
  color: #fff;
}

.acao { position: relative; max-width: 34rem; }
.acao__inicio { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; }
.acao__inicio[hidden] { display: none; }
.acao__meta { font-size: 1rem; max-width: 30rem; }
.acao__aviso { font-weight: 600; font-size: 1.25rem; }

/* Painel "O download começou" */
.painel:empty { display: none; }
.painel {
  padding: 1.5rem;
  border-radius: 1.5rem;
  background: rgba(17, 14, 24, 0.62);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.painel.painel--visivel { opacity: 1; transform: none; }
.painel__t {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 1rem;
}
.painel__passos { counter-reset: p; display: grid; gap: 0.6rem; margin-bottom: 1rem; }
.painel__passos li { counter-increment: p; display: grid; grid-template-columns: 2rem 1fr; gap: 0.5rem; font-size: 1rem; }
.painel__passos li::before {
  content: counter(p);
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: #fff;
  color: var(--eletrico);
  font-weight: 800;
  font-size: 0.95rem;
}
.painel__aviso { font-size: 1rem; margin-bottom: 0.5rem; }

/* ---------- Vidro 3D ---------- */

.vidro {
  --s: clamp(11rem, 25vw, 25rem);
  position: absolute;
  z-index: 4; /* acima da manchete: o vidro borra o texto que passa atrás */
  right: clamp(1.5rem, 6vw, 7rem);
  top: clamp(6rem, 17vh, 11rem);
  width: calc(var(--s) * 1.4);
  height: calc(var(--s) * 1.4);
  pointer-events: none;
}
.vidro__flutua {
  position: absolute;
  inset: 0;
  animation: flutua 6s ease-in-out infinite alternate;
}
@keyframes flutua {
  from { transform: translate3d(0, -0.6rem, 0); }
  to   { transform: translate3d(0, 0.8rem, 0); }
}

/* Formas duras atrás do vidro: dão o que borrar e refratar */
.disco {
  position: absolute;
  left: 4%;
  top: 6%;
  width: calc(var(--s) * 0.78);
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(140deg, #fff 0%, var(--ciano) 38%, var(--eletrico) 100%);
  opacity: 0.95;
}
.disco--2 {
  left: auto;
  right: 0;
  top: auto;
  bottom: -2%;
  width: calc(var(--s) * 0.42);
  background: linear-gradient(140deg, var(--lilas), #fff);
}

.placa {
  --z: 0px;
  --tinta-vidro: rgba(12, 186, 231, 0.5);
  position: absolute;
  width: var(--s);
  height: var(--s);
  border-radius: calc(var(--s) * 0.21);
  background:
    radial-gradient(90% 90% at 25% 15%, var(--tinta-vidro), transparent 70%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.05) 55%, rgba(255, 255, 255, 0.16));
  -webkit-backdrop-filter: blur(14px) saturate(1.7) brightness(1.08);
  backdrop-filter: blur(14px) saturate(1.7) brightness(1.08);
  box-shadow:
    inset 2px 3px 1px -1px rgba(255, 255, 255, 0.75),
    inset -2px -3px 2px -1px rgba(255, 255, 255, 0.28),
    0 2.5rem 4rem -1.5rem rgba(10, 8, 30, 0.55);
  transform:
    perspective(1100px)
    rotateX(calc(16deg + var(--ent) * 0.4))
    rotateY(calc(-26deg - var(--ent)))
    rotateZ(-4deg)
    translateZ(var(--z));
  animation: gira-entrada 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.7s backwards;
}
.placa--a { left: 0; top: 0; }
.placa--b {
  --z: 60px;
  --tinta-vidro: rgba(137, 126, 246, 0.65);
  left: calc(var(--s) * 0.33);
  top: calc(var(--s) * 0.33);
}
/* Aro fino em degradê: a borda do vidro */
.placa::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.12) 38%, rgba(255, 255, 255, 0.08) 62%, rgba(255, 255, 255, 0.7));
  -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);
}
/* Brilho especular */
.placa::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(70% 38% at 22% 6%, rgba(255, 255, 255, 0.6), transparent 100%),
    linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.22) 48%, transparent 58%);
  mix-blend-mode: screen;
}
/* Miolo rebaixado: lembra o quadrado vazado do símbolo */
.placa__miolo {
  position: absolute;
  inset: 14%;
  border-radius: calc(var(--s) * 0.1);
  background: rgba(17, 14, 24, 0.14);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.3),
    inset 3px 5px 10px rgba(10, 8, 30, 0.35),
    inset -2px -2px 4px rgba(255, 255, 255, 0.25);
}

@keyframes gira-entrada {
  from { --ent: 60deg; opacity: 0; }
}

/* Janelinhas de vidro nas bordas */
.minis { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.mini {
  position: absolute;
  width: var(--w);
  aspect-ratio: 1.35;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.05) 60%, rgba(255, 255, 255, 0.14));
  -webkit-backdrop-filter: blur(8px) saturate(1.5);
  backdrop-filter: blur(8px) saturate(1.5);
  box-shadow: inset 1px 1.5px 1px rgba(255, 255, 255, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 1.5rem 2.5rem -1rem rgba(10, 8, 30, 0.5);
  transform: rotate(var(--r));
  animation: flutua 7s ease-in-out var(--d, 0s) infinite alternate;
}
.mini::before {            /* barra de título */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 24%;
  border-radius: 1rem 1rem 0 0;
  background: rgba(255, 255, 255, 0.2);
}
.mini::after {             /* brilho */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(80% 40% at 25% 0%, rgba(255, 255, 255, 0.4), transparent 100%);
}
.mini--1 { --w: 5.5rem; --r: -9deg; right: 3%; top: 8%; }
.mini--2 { --w: 4rem; --r: 12deg; right: 38%; top: 12%; --d: -2s; }
.mini--3 { --w: 6.5rem; --r: 7deg; right: 5%; bottom: 20%; --d: -4s; }
.mini--4 { --w: 3.5rem; --r: -14deg; left: 46%; bottom: 14%; --d: -1s; }

/* Celular: o vidro vai para trás da manchete, menor e mais transparente */
@media (max-width: 760px) {
  .topo__link--extra { display: none; }
  .vidro {
    --s: 9.5rem;
    z-index: 0;
    right: -1.5rem;
    top: 5rem;
    opacity: 0.55;
  }
  .minis { z-index: 0; opacity: 0.6; }
  .mini--2, .mini--4 { display: none; }
  .mini--1 { top: 40%; right: 4%; }
  .mini--3 { bottom: 12%; right: 3%; }
  .placa { backdrop-filter: blur(8px) saturate(1.5); -webkit-backdrop-filter: blur(8px) saturate(1.5); }
}

/* Sem backdrop-filter: vidro um pouco mais opaco */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .placa, .mini { background-color: rgba(120, 130, 230, 0.35); }
  .painel { background: rgba(17, 14, 24, 0.9); }
}

/* ---------- Mundo claro ---------- */

.mundo {
  --anel: var(--eletrico);
  position: relative;
  z-index: 4;
  margin-top: calc(var(--raio-mundo) * -1);
  border-radius: var(--raio-mundo);
  background: var(--nevoa);
  color: var(--tinta);
  transform-origin: 50% 0;
}

/* A borda sobe e cresce ao rolar (só onde há animation-timeline) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .mundo {
      animation: mundo-sobe linear both;
      animation-timeline: view();
      animation-range: entry 0px entry 70vh;
    }
  }
}
@keyframes mundo-sobe {
  from { transform: translateY(9vh) scale(0.92); border-radius: calc(var(--raio-mundo) * 2.2); }
  to   { transform: none; border-radius: var(--raio-mundo); }
}

.secao { padding-block: clamp(4rem, 9vw, 8rem) 0; }
.secao:first-child { padding-top: clamp(5rem, 10vw, 9rem); }
.secao--fim { padding-bottom: clamp(4rem, 8vw, 7rem); }

.titulo {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.045em;
  line-height: 0.88;
  font-size: clamp(2.4rem, 6vw, 5rem);
  color: var(--tinta);
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

/* Passos: linhas finas, sem cartões */
.passos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
}
.passo { border-top: 2px solid var(--tinta); padding-top: 1rem; max-width: 24rem; }
.passo__n {
  display: block;
  font-weight: 900;
  font-size: clamp(3.5rem, 7vw, 5.5rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: var(--eletrico);
  margin-bottom: 0.75rem;
}
.passo__t { font-size: 1.5rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 0.5rem; }

/* Lista de sistemas */
.sistemas { border-bottom: 1px solid rgba(23, 19, 43, 0.25); }
.sistema {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) 1fr auto 5rem;
  grid-template-areas:
    "nome desc botao tam"
    ".    hash hash  hash";
  align-items: center;
  column-gap: 1.5rem;
  row-gap: 0.25rem;
  padding-block: 1.5rem;
  border-top: 1px solid rgba(23, 19, 43, 0.25);
}
.sistema__nome { grid-area: nome; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.sistema__desc { grid-area: desc; }
.sistema > .botao { grid-area: botao; }
.sistema__tam { grid-area: tam; font-size: 1rem; color: var(--apagado); text-align: right; }
.sistema > .hash { grid-area: hash; }
.sistema--breve { grid-template-areas: "nome desc"; grid-template-columns: minmax(8rem, 12rem) 1fr; padding-block: 1.1rem; }
.sistema--breve .sistema__nome,
.sistema--breve .sistema__desc { color: var(--apagado); font-weight: 600; }
.sistema--breve .sistema__nome { font-size: 1.25rem; font-weight: 700; }

.hash { font-size: 1rem; margin-top: 0.5rem; }
.hash summary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  cursor: pointer;
  color: var(--eletrico);
  font-weight: 600;
  list-style: none;
}
.hash summary::-webkit-details-marker { display: none; }
.hash summary::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}
.hash[open] summary::before { transform: rotate(45deg); }
.hash code {
  display: block;
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.5;
  word-break: break-all;
  padding: 0.5rem 0 0.75rem;
}

@media (max-width: 760px) {
  .sistema {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "nome nome"
      "desc desc"
      "botao tam"
      "hash hash";
    row-gap: 0.5rem;
  }
  .sistema > .botao { justify-self: start; margin-top: 0.5rem; }
  .sistema--breve { grid-template-columns: 1fr; grid-template-areas: "nome" "desc"; }
}

/* Você no controle */
.garantias {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-bottom: 1.5rem;
}
.garantias li { border-top: 2px solid var(--tinta); padding-top: 1rem; max-width: 24rem; font-weight: 500; }
.links { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; }

/* ---------- Rodapé ---------- */

.rodape {
  --anel: var(--ciano);
  margin-top: calc(var(--raio-mundo) * -1);
  padding: calc(var(--raio-mundo) + 2.5rem) 0 2.5rem;
  background: var(--noite);
  color: rgba(255, 255, 255, 0.88);
  font-size: 1rem;
}
.rodape__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; align-items: center; }
.rodape__links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.5rem; }
.rodape p { max-width: 38rem; }

/* ---------- Movimento reduzido: nada se move ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .painel { transform: none; }
}

/* O atributo hidden sempre vence as regras de display das classes */
[hidden] { display: none !important; }
