/* ==========================================================================
   RadarNav — sistema de design do site institucional
   Conceito: "painel noturno" — para-brisa em rodovia à noite.
   Azul profundo do ícone, âmbar como luz de alerta, serifa editorial
   contra sans técnica. Fontes auto-hospedadas (nenhuma requisição a
   terceiros: a página de privacidade não pode vazar IP de quem a lê).
   ========================================================================== */

/* ---------- fontes ---------- */

@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('fonts/plex-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('fonts/plex-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- tokens ---------- */

:root {
  --ink-1000: #03060E;
  --ink-950: #060B18;
  --ink-900: #0A1124;
  --ink-800: #101A33;
  --ink-700: #1A2846;

  --blue-700: #0B47C7;
  --blue-600: #0F5BE0;
  --blue-500: #2A7BF0;
  --blue-300: #7FB4FF;

  --amber: #FFB020;
  --amber-soft: #FFC96B;
  --green: #34D07F;
  --red: #FF4D4D;

  --paper: #EDF2FB;
  --paper-dim: #A8B8D4;
  --paper-faint: #6B7C9C;

  --line: rgba(127, 180, 255, 0.14);
  --line-strong: rgba(127, 180, 255, 0.28);

  --display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans: 'IBM Plex Sans', 'Helvetica Neue', Helvetica, sans-serif;

  --measure: 68ch;
  --shell: 1120px;
  --pad: clamp(1.25rem, 5vw, 3rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(1rem, 0.97rem + 0.16vw, 1.075rem);
  line-height: 1.72;
  color: var(--paper);
  background: var(--ink-950);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Atmosfera: brilho de farol + grão sutil, fixos atrás de tudo.
   Empilhamento explícito — fundo na camada 0, conteúdo na camada 1 (ver `main`
   e `.site-foot`) — em vez de z-index negativo, que só não encobre o texto
   enquanto o body mantiver fundo próprio. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(15, 91, 224, 0.32), transparent 62%),
    radial-gradient(60% 50% at 88% 8%, rgba(255, 176, 32, 0.1), transparent 70%),
    linear-gradient(180deg, var(--ink-900) 0%, var(--ink-950) 45%, var(--ink-1000) 100%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* conteúdo sempre acima da camada de atmosfera */
main,
.site-foot {
  position: relative;
  z-index: 1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--blue-300);
  text-decoration-color: rgba(127, 180, 255, 0.35);
  text-underline-offset: 0.22em;
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}

a:hover {
  color: var(--amber-soft);
  text-decoration-color: var(--amber);
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- tipografia ---------- */

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.75rem, 1.8rem + 4.6vw, 5.25rem);
}

h2 {
  font-size: clamp(1.9rem, 1.45rem + 2.1vw, 2.9rem);
  margin-block: 3.25rem 1rem;
}

h3 {
  font-size: clamp(1.3rem, 1.15rem + 0.7vw, 1.6rem);
  margin-block: 2.25rem 0.6rem;
}

p {
  margin-block: 0 1.15em;
  text-wrap: pretty;
}

strong {
  font-weight: 600;
  color: #fff;
}

/* rótulo técnico — voz de instrumento */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.eyebrow::before {
  content: '';
  width: 1.9rem;
  height: 1px;
  background: linear-gradient(90deg, var(--amber), transparent);
  flex: none;
}

.lede {
  font-size: clamp(1.1rem, 1.02rem + 0.42vw, 1.32rem);
  line-height: 1.62;
  color: var(--paper-dim);
  max-width: 46ch;
}

/* ---------- layout ---------- */

.shell {
  width: min(100% - var(--pad) * 2, var(--shell));
  margin-inline: auto;
}

.prose {
  max-width: var(--measure);
}

/* ---------- cabeçalho ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  background: rgba(6, 11, 24, 0.72);
  border-bottom: 1px solid var(--line);
}

.site-head .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.85rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--paper);
  text-decoration: none;
}

.brand:hover {
  color: var(--paper);
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 2px 12px rgba(11, 71, 199, 0.55);
}

.site-nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  font-size: 0.92rem;
}

.site-nav a {
  color: var(--paper-dim);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--paper);
}

.site-nav a[aria-current='page'] {
  text-shadow: 0 0 20px rgba(255, 176, 32, 0.5);
}

/* ---------- hero ---------- */

.hero {
  padding-block: clamp(3.5rem, 8vw, 7rem) clamp(2rem, 4vw, 3.5rem);
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(3rem, 7vw, 5rem);
  align-items: center;
}

@media (min-width: 62rem) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.hero h1 {
  margin-bottom: 1.4rem;
}

.hero h1 em {
  font-style: italic;
  color: var(--amber-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.25rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
    background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  color: #fff;
  box-shadow: 0 8px 30px rgba(11, 71, 199, 0.42);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(11, 71, 199, 0.55);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--paper-dim);
  background: rgba(16, 26, 51, 0.5);
}

.btn-ghost:hover {
  color: var(--paper);
  border-color: var(--amber);
  background: rgba(16, 26, 51, 0.85);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--paper-faint);
}

.status-pill::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 0 rgba(255, 176, 32, 0.6);
  animation: pulse 2.6s ease-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 176, 32, 0.55);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(255, 176, 32, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 176, 32, 0);
  }
}

/* ---------- linha de aproximação (assinatura do produto) ---------- */

.gauge {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.6rem 1.5rem 1.4rem;
  background: linear-gradient(165deg, rgba(16, 26, 51, 0.9), rgba(6, 11, 24, 0.75));
  box-shadow: 0 24px 60px rgba(3, 6, 14, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  max-width: 22rem;
  margin-inline: auto;
}

.gauge-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.gauge-type {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

.gauge-limit {
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--paper);
  line-height: 1;
}

.gauge-limit span {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--paper-faint);
  margin-left: 0.3rem;
}

/* marcador do radar: fica no topo, é o ponto que você está alcançando */
.gauge-target {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.55rem;
}

.gauge-target svg {
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
}

.gauge-target::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--amber), transparent);
}

.gauge-track {
  position: relative;
  height: 12.5rem;
  border-radius: 10px;
  background: rgba(3, 6, 14, 0.78);
  border: 1px solid var(--line);
  overflow: hidden;
}

/* a barra sobe em direção ao radar e muda de cor conforme encosta */
.gauge-fill {
  position: absolute;
  inset: auto 0 0 0;
  border-radius: 9px;
  height: 10%;
  background: var(--green);
  animation: approach 7.5s var(--ease) infinite;
}

@keyframes approach {
  0% {
    height: 10%;
    background: var(--green);
    box-shadow: 0 0 18px rgba(52, 208, 127, 0.25);
  }
  40% {
    background: var(--green);
  }
  62% {
    height: 66%;
    background: var(--amber);
    box-shadow: 0 0 26px rgba(255, 176, 32, 0.4);
  }
  88% {
    height: 100%;
    background: var(--red);
    box-shadow: 0 0 34px rgba(255, 77, 77, 0.5);
  }
  94% {
    height: 100%;
    opacity: 1;
  }
  97% {
    opacity: 0.1;
  }
  100% {
    height: 10%;
    background: var(--green);
    opacity: 1;
  }
}

/* escala: rótulos fora da barra, como num instrumento — sempre legíveis */
.gauge-scale {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: stretch;
}

.gauge-ticks {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-block: 0.15rem;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  color: var(--paper-faint);
  text-align: right;
  white-space: nowrap;
}

.gauge-ticks span {
  display: block;
  line-height: 1;
}

.gauge-ticks span:first-child {
  color: var(--amber);
}

.gauge-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--paper-faint);
}

.gauge-speed {
  font-family: var(--display);
  font-size: 2rem;
  color: var(--paper);
  line-height: 1;
}

.gauge-speed span {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--paper-faint);
  margin-left: 0.28rem;
}

/* ---------- divisor: faixa de rodovia ---------- */

.road-rule {
  height: 3px;
  border: 0;
  margin-block: clamp(2rem, 4.5vw, 3.5rem);
  background-image: linear-gradient(
    90deg,
    var(--line-strong) 0 34px,
    transparent 34px 62px
  );
  background-size: 62px 100%;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

/* ---------- cartões de recurso ---------- */

.cards {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  margin-top: 2.5rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem 1.4rem;
  background: linear-gradient(165deg, rgba(16, 26, 51, 0.62), rgba(6, 11, 24, 0.42));
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.card h3 {
  margin-block: 0 0.5rem;
  font-size: 1.22rem;
}

.card p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--paper-dim);
  line-height: 1.62;
}

.card-mark {
  width: 2.1rem;
  height: 2.1rem;
  margin-bottom: 1rem;
  color: var(--amber);
}

/* ---------- conteúdo longo (política / suporte) ---------- */

.page-head {
  padding-block: clamp(3rem, 8vw, 5.5rem) clamp(1.5rem, 4vw, 2.5rem);
}

.page-head h1 {
  font-size: clamp(2.4rem, 1.7rem + 3.2vw, 4rem);
}

.updated {
  font-size: 0.84rem;
  color: var(--paper-faint);
  margin-top: 1.1rem;
}

.prose h2 {
  padding-top: 0.4rem;
  border-top: 1px solid var(--line);
}

.prose ul,
.prose ol {
  padding-left: 1.15rem;
  margin-block: 0 1.3em;
}

.prose li {
  margin-bottom: 0.55em;
  padding-left: 0.2rem;
}

.prose li::marker {
  color: var(--amber);
}

/* tabela de bases legais — rola no celular sem quebrar a página */
.table-wrap {
  overflow-x: auto;
  margin-block: 1.5rem 2rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(6, 11, 24, 0.5);
  -webkit-overflow-scrolling: touch;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  font-size: 0.9rem;
}

th,
td {
  text-align: left;
  padding: 0.85rem 1rem;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  background: rgba(16, 26, 51, 0.7);
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

/* destaque de aviso/nota */
.callout {
  border-left: 2px solid var(--amber);
  border-radius: 0 12px 12px 0;
  padding: 1.15rem 1.35rem;
  margin-block: 1.75rem;
  background: linear-gradient(90deg, rgba(255, 176, 32, 0.09), transparent 80%);
}

.callout p:last-child {
  margin-bottom: 0;
}

/* ---------- suporte: bloco de contato ---------- */

.contact {
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: clamp(1.6rem, 4vw, 2.5rem);
  background: linear-gradient(165deg, rgba(16, 26, 51, 0.85), rgba(6, 11, 24, 0.6));
  margin-block: 0.25rem 3rem;
}

.contact-mail {
  font-family: var(--display);
  font-size: clamp(1.45rem, 1.15rem + 1.5vw, 2.2rem);
  color: var(--amber-soft);
  text-decoration: none;
  word-break: break-word;
  display: inline-block;
  margin-block: 0.3rem 0.8rem;
}

.contact-mail:hover {
  color: var(--amber);
}

.faq {
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  padding: 1.15rem 2rem 1.15rem 0;
  font-weight: 600;
  font-size: 1.02rem;
  list-style: none;
  position: relative;
  transition: color 0.2s var(--ease);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '';
  position: absolute;
  right: 0.35rem;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid var(--amber);
  border-bottom: 1.5px solid var(--amber);
  transform: translateY(-60%) rotate(45deg);
  transition: transform 0.25s var(--ease);
}

.faq details[open] summary::after {
  transform: translateY(-25%) rotate(-135deg);
}

.faq summary:hover {
  color: var(--amber-soft);
}

.faq-body {
  padding-bottom: 1.25rem;
  color: var(--paper-dim);
  max-width: var(--measure);
}

.faq-body p:last-child {
  margin-bottom: 0;
}

/* ---------- rodapé ---------- */

.site-foot {
  margin-top: clamp(4rem, 10vw, 7rem);
  border-top: 1px solid var(--line);
  padding-block: 2.5rem 3.5rem;
  font-size: 0.88rem;
  color: var(--paper-faint);
}

.site-foot .shell {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2.5rem;
  justify-content: space-between;
  align-items: flex-start;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.foot-links a {
  color: var(--paper-dim);
  text-decoration: none;
}

.foot-links a:hover {
  color: var(--amber-soft);
}

.credits {
  max-width: 40ch;
  line-height: 1.6;
}

/* ---------- revelação na entrada ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: rise 0.85s var(--ease) both;
  }

  .reveal-1 { animation-delay: 0.05s; }
  .reveal-2 { animation-delay: 0.16s; }
  .reveal-3 { animation-delay: 0.27s; }
  .reveal-4 { animation-delay: 0.38s; }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(18px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

@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;
  }
}

/* ---------- utilitário de acessibilidade ---------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--amber);
  color: var(--ink-1000);
  padding: 0.75rem 1.15rem;
  font-weight: 600;
  border-radius: 0 0 8px 0;
  z-index: 100;
}

.skip:focus {
  left: 0;
  color: var(--ink-1000);
}
