/* =============================================================================
   Maré Transportes — Design System
   Identidade: navy profundo #050517 + verde neon #00FF00
   Sem framework, sem build. Tokens em custom properties.
   ============================================================================= */

/* ---------- 1. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 6rem; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, picture, svg, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
/* Precisa vencer o display dos componentes abaixo (.card, .track-msg…) */
[hidden] { display: none !important; }
h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -0.025em; font-weight: 800; text-wrap: balance; }
p { text-wrap: pretty; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- 2. TOKENS ---------- */
:root {
  /* Marca — fixos nos dois temas */
  --navy-950: #050517;
  --navy-900: #08081d;
  --navy-850: #0b0b24;
  --navy-800: #12122f;
  --navy-700: #1b1b42;
  --navy-600: #26265c;

  --accent:      #00ff00;   /* neon — só em acento, nunca em área grande */
  --accent-600:  #00d93d;   /* gradiente / hover */
  --accent-700:  #00a83a;
  --accent-ink:  #067a2e;   /* verde legível sobre fundo claro */

  --danger: #ef4444;
  --warn:   #f59e0b;
  --info:   #38bdf8;

  /* Tipografia fluida */
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fs-display: clamp(2.75rem, 1.4rem + 5.4vw, 5rem);
  --fs-h1:      clamp(2.15rem, 1.3rem + 3.4vw, 3.5rem);
  --fs-h2:      clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem);
  --fs-h3:      clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
  --fs-lead:    clamp(1.05rem, 0.98rem + 0.4vw, 1.25rem);
  --fs-body:    1rem;
  --fs-sm:      0.9rem;
  --fs-xs:      0.8rem;

  /* Espaçamento */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;  --sp-4: 1rem;
  --sp-5: 1.5rem;   --sp-6: 2rem;     --sp-7: 3rem;     --sp-8: 4rem;
  --sp-9: 6rem;
  --section-y: clamp(4rem, 2rem + 7vw, 7.5rem);
  --shell: 1200px;
  --gutter: clamp(1.15rem, 0.6rem + 2vw, 2.5rem);

  /* Formas */
  --r-sm: 8px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-full: 999px;

  --shadow-sm: 0 1px 2px rgba(5, 5, 23, .06), 0 2px 8px rgba(5, 5, 23, .04);
  --shadow-md: 0 4px 12px rgba(5, 5, 23, .08), 0 12px 32px rgba(5, 5, 23, .07);
  --shadow-lg: 0 12px 28px rgba(5, 5, 23, .12), 0 32px 64px rgba(5, 5, 23, .12);
  --glow: 0 0 0 1px rgba(0, 255, 0, .35), 0 8px 32px rgba(0, 255, 0, .18);

  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* Tema claro (padrão) */
:root, :root[data-theme="light"] {
  --bg:        #ffffff;
  --bg-elev:   #f6f8fa;
  --bg-sunken: #eef1f5;
  --text:      #0d1020;
  --text-mut:  #5a6274;
  --text-soft: #858da0;
  --border:    #e4e8ee;
  --border-str:#d2d8e2;
  --on-accent: #050517;
  --accent-txt: var(--accent-ink);
  --shadow-card: var(--shadow-sm);
}

/* Tema escuro */
:root[data-theme="dark"] {
  --bg:        #050517;
  --bg-elev:   #0b0b24;
  --bg-sunken: #03030f;
  --text:      #eef1f7;
  --text-mut:  #9aa3ba;
  --text-soft: #6f7891;
  --border:    rgba(255, 255, 255, .09);
  --border-str:rgba(255, 255, 255, .16);
  --on-accent: #050517;
  --accent-txt: var(--accent);
  --shadow-card: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #050517; --bg-elev: #0b0b24; --bg-sunken: #03030f;
    --text: #eef1f7; --text-mut: #9aa3ba; --text-soft: #6f7891;
    --border: rgba(255,255,255,.09); --border-str: rgba(255,255,255,.16);
    --accent-txt: var(--accent);
    --shadow-card: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
  }
}

body {
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}

::selection { background: var(--accent); color: var(--navy-950); }

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

/* ---------- 3. LAYOUT ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.shell--wide { max-width: 1380px; }
.section { padding-block: var(--section-y); position: relative; }
.section--elev   { background: var(--bg-elev); }
.section--sunken { background: var(--bg-sunken); }

/* Seções sempre escuras, independente do tema */
.section--ink {
  background: var(--navy-950);
  color: #eef1f7;
  --text: #eef1f7;
  --text-mut: #9aa3ba;
  --text-soft: #6f7891;
  --border: rgba(255,255,255,.1);
  --border-str: rgba(255,255,255,.18);
  --bg-elev: rgba(255,255,255,.035);
  --accent-txt: var(--accent);
}

.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--wide-left  { grid-template-columns: 1.15fr .85fr; }
  .split--wide-right { grid-template-columns: .85fr 1.15fr; }
}

.stack   { display: flex; flex-direction: column; gap: var(--sp-4); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }

/* ---------- 4. TIPOGRAFIA ---------- */
.display { font-size: var(--fs-display); font-weight: 900; letter-spacing: -0.04em; line-height: 1.02; }
.h1 { font-size: var(--fs-h1); }
.h2 { font-size: var(--fs-h2); }
.h3 { font-size: var(--fs-h3); font-weight: 700; }
.lead { font-size: var(--fs-lead); color: var(--text-mut); line-height: 1.6; max-width: 62ch; }
.muted { color: var(--text-mut); }
.small { font-size: var(--fs-sm); }
.accent-text { color: var(--accent-txt); }

/* Palavra em destaque com sublinhado neon */
.mark {
  color: var(--accent-txt);
  position: relative;
  white-space: nowrap;
}
.mark::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: .06em;
  height: .12em;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: .55;
  border-radius: 2px;
}

/* Rótulo de seção */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-txt);
  margin-bottom: var(--sp-3);
}
.eyebrow::before {
  content: "";
  width: 24px; height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.section-head { max-width: 720px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head .lead { margin-top: var(--sp-4); }
.section-head--center .lead { margin-inline: auto; }

/* ---------- 5. BOTÕES ---------- */
.btn {
  --btn-bg: var(--accent);
  --btn-fg: var(--navy-950);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: .85rem 1.6rem;
  border-radius: var(--r-full);
  font-weight: 700;
  font-size: var(--fs-sm);
  letter-spacing: .01em;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1.5px solid transparent;
  transition: transform .2s var(--ease-out), box-shadow .25s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease);
  will-change: transform;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--glow); }
.btn:active { transform: translateY(0); }
.btn .ico { width: 1.05em; height: 1.05em; flex: none; }

.btn--lg { padding: 1.05rem 2.1rem; font-size: var(--fs-body); }
.btn--sm { padding: .6rem 1.15rem; font-size: var(--fs-xs); }

.btn--outline {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  border-color: var(--border-str);
}
.btn--outline:hover { border-color: var(--accent); color: var(--accent-txt); box-shadow: none; }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  border-color: transparent;
}
.btn--ghost:hover { background: var(--bg-elev); box-shadow: none; }

.btn--wa { --btn-bg: #25d366; --btn-fg: #04210f; }
.btn--block { width: 100%; }

/* Link com seta que desliza */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--accent-txt);
}
.link-arrow .ico { transition: transform .25s var(--ease-out); width: 1.05em; height: 1.05em; }
.link-arrow:hover .ico { transform: translateX(4px); }

/* ---------- 6. CARDS ---------- */
.card {
  display: block; /* usado também em <a> */
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: var(--shadow-card);
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease), border-color .3s var(--ease);
  position: relative;
  height: 100%;
}
.section--elev .card, .section--ink .card { background: var(--bg-elev); }
.card--hover:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: var(--shadow-md);
}
.card__icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent-txt);
  margin-bottom: var(--sp-4);
}
.card__icon .ico { width: 24px; height: 24px; }
.card h3 { margin-bottom: var(--sp-3); }
.card p { color: var(--text-mut); font-size: var(--fs-sm); }

/* Card numerado (01, 02...) */
.card__num {
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: .18em;
  color: var(--accent-txt);
  opacity: .8;
  margin-bottom: var(--sp-3);
  display: block;
}

/* Card com imagem */
.tile {
  display: block; /* usado também em <a> */
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--navy-900);
  isolation: isolate;
}
.tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease-out), filter .5s var(--ease);
  filter: saturate(.75) brightness(.8);
}
.tile:hover img { transform: scale(1.06); filter: saturate(1) brightness(.92); }
.tile::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(5,5,23,.94) 8%, rgba(5,5,23,.5) 45%, rgba(5,5,23,.12) 100%);
  z-index: 1;
}
.tile__body {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: clamp(1.15rem, 2.5vw, 1.6rem);
  color: #fff;
}
.tile__body h3 { color: #fff; font-size: 1.15rem; margin-bottom: .3rem; }
.tile__body p { color: rgba(255,255,255,.72); font-size: var(--fs-xs); line-height: 1.5; }
.tile--tall { aspect-ratio: 3 / 4; }

/* ---------- 7. PILLS / BADGES ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: .4rem .95rem;
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent-txt);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}
.pill .ico { width: 14px; height: 14px; }
.pill--neutral {
  background: var(--bg-elev);
  color: var(--text-mut);
  border-color: var(--border);
}

/* Ponto pulsante "ao vivo" */
.dot-live {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  position: relative;
  flex: none;
}
.dot-live::after {
  content: "";
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  animation: ping 2s var(--ease-out) infinite;
}
@keyframes ping {
  0%   { transform: scale(.6); opacity: .9; }
  80%, 100% { transform: scale(1.7); opacity: 0; }
}

/* ---------- 8. NAVBAR ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: color-mix(in srgb, var(--navy-950) 82%, transparent);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,.07);
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease), padding .3s var(--ease);
  color: #fff;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--navy-950) 96%, transparent);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  height: 76px;
  transition: height .3s var(--ease);
}
.nav.is-scrolled .nav__inner { height: 66px; }

/* A logo é PNG transparente com o texto "MARÉ" em azul-escuro. Sobre a navbar
   navy ela praticamente desaparece — daí a placa branca por baixo. */
.nav__brand { display: flex; align-items: center; flex: none; }
.nav__brand img {
  height: 48px;
  width: auto;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
  padding: 7px 13px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .28);
  transition: height .3s var(--ease), transform .25s var(--ease-out);
}
.nav__brand:hover img { transform: translateY(-1px); }
.nav.is-scrolled .nav__brand img { height: 44px; }

/* Versão maior, usada no rodapé */
.nav__brand img.brand-mark--lg {
  height: 58px;
  border-radius: 14px;
  padding: 9px 16px;
}

.nav__links { display: none; align-items: center; gap: var(--sp-1); }
@media (min-width: 1024px) { .nav__links { display: flex; } }

.nav__link {
  padding: .55rem .9rem;
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: rgba(255,255,255,.78);
  transition: color .2s var(--ease), background-color .2s var(--ease);
  position: relative;
}
.nav__link:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav__link[aria-current="page"] { color: var(--accent); font-weight: 600; }
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%; transform: translateX(-50%);
  bottom: .1rem;
  width: 16px; height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.nav__actions { display: flex; align-items: center; gap: var(--sp-2); }

.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  color: rgba(255,255,255,.85);
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.icon-btn:hover { background: rgba(255,255,255,.1); color: var(--accent); }
.icon-btn .ico { width: 20px; height: 20px; }
.nav__cta { display: none; }
@media (min-width: 768px) { .nav__cta { display: inline-flex; } }
.nav__burger { display: grid; }
@media (min-width: 1024px) { .nav__burger { display: none; } }

/* Menu mobile */
.nav__mobile {
  display: block;
  overflow: hidden;
  max-height: 0;
  transition: max-height .4s var(--ease-out);
  background: var(--navy-950);
  border-top: 1px solid rgba(255,255,255,.07);
}
.nav__mobile.is-open { max-height: 32rem; }
@media (min-width: 1024px) { .nav__mobile { display: none; } }
.nav__mobile ul { padding: var(--sp-3) 0 var(--sp-5); }
.nav__mobile a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem var(--gutter);
  font-weight: 500;
  color: rgba(255,255,255,.8);
  border-left: 2px solid transparent;
}
.nav__mobile a:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav__mobile a[aria-current="page"] { color: var(--accent); border-left-color: var(--accent); background: rgba(0,255,0,.05); }
.nav__mobile .ico { width: 16px; height: 16px; opacity: .5; }

/* ---------- 9. HERO ---------- */
.hero {
  position: relative;
  background: var(--navy-950);
  color: #fff;
  padding-top: clamp(8rem, 6rem + 8vw, 11rem);
  padding-bottom: clamp(4rem, 3rem + 6vw, 7rem);
  overflow: hidden;
  isolation: isolate;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    radial-gradient(rgba(0,255,0,.14) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: .5;
  mask-image: radial-gradient(ellipse 90% 70% at 70% 20%, #000 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 70% 20%, #000 10%, transparent 75%);
}
.hero__glow {
  position: absolute;
  z-index: -1;
  width: 46rem; height: 46rem;
  right: -14rem; top: -18rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,255,0,.13), transparent 62%);
  filter: blur(24px);
  pointer-events: none;
}
.hero__glow--2 {
  left: -18rem; top: auto; bottom: -22rem;
  width: 34rem; height: 34rem;
  background: radial-gradient(circle, rgba(0,120,255,.1), transparent 65%);
}
.hero .display { color: #fff; margin-bottom: var(--sp-5); }
.hero .lead { color: rgba(255,255,255,.72); }
.hero__actions { margin-top: var(--sp-6); gap: var(--sp-3); }

.hero__media {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.1);
  aspect-ratio: 4 / 3.4;
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(200deg, transparent 40%, rgba(5,5,23,.55));
}

/* Espaço reservado para foto que ainda não existe.
   Melhor um bloco desenhado com o nome do arquivo do que o ícone de
   imagem quebrada — e ainda serve de lista do que falta fotografar. */
.foto-vazia {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .75rem;
  padding: var(--sp-5);
  text-align: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(0, 255, 0, .07), transparent 60%),
    linear-gradient(150deg, var(--navy-700), var(--navy-950));
}
.foto-vazia .ico { width: 32px; height: 32px; color: var(--accent); opacity: .75; }
.foto-vazia p {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: rgba(255, 255, 255, .82);
  max-width: 24ch;
  line-height: 1.4;
}
.foto-vazia span {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .72rem;
  color: rgba(255, 255, 255, .5);
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .1);
  padding: .25rem .65rem;
  border-radius: var(--r-sm);
}
/* Sem imagem por baixo, o degradê de leitura só escureceria o bloco */
.hero__media.is-vazia::after, .tile.is-vazia::after { display: none; }

/* Cartão flutuante sobre a imagem */
.float-card {
  position: absolute;
  z-index: 3;
  background: color-mix(in srgb, var(--navy-950) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--r-md);
  padding: .85rem 1.1rem;
  box-shadow: 0 12px 32px rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  gap: .7rem;
  animation: floaty 5s ease-in-out infinite;
}
.float-card strong { display: block; font-size: var(--fs-sm); color: #fff; line-height: 1.3; white-space: nowrap; }
.float-card span { font-size: .72rem; color: rgba(255,255,255,.6); }
/* Ficam dentro dos limites: .hero__media usa overflow:hidden e cortaria a saliência */
.float-card--br { right: 1rem; bottom: 1.5rem; animation-delay: -2.5s; }
.float-card--tl { left: 1rem; top: 1.5rem; }
@media (max-width: 560px) { .float-card { display: none; } }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}

/* Barra de credibilidade abaixo do hero */
.hero__strip {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: var(--sp-6);
  border-top: 1px solid rgba(255,255,255,.1);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--sp-5);
}
.hero__strip div strong {
  display: block;
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem);
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -.03em;
  line-height: 1;
}
.hero__strip div span {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,.55);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 600;
}

/* Hero interno (páginas secundárias) */
.page-hero {
  background: var(--navy-950);
  color: #fff;
  padding-top: clamp(7.5rem, 6rem + 6vw, 9.5rem);
  padding-bottom: clamp(3rem, 2rem + 4vw, 5rem);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.page-hero .h1 { color: #fff; }
.page-hero .lead { color: rgba(255,255,255,.7); }
.breadcrumb {
  display: flex; align-items: center; gap: .5rem;
  font-size: var(--fs-xs);
  color: rgba(255,255,255,.45);
  margin-bottom: var(--sp-4);
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .ico { width: 13px; height: 13px; }

/* ---------- 10. MARQUEE DE LOGOS ---------- */
.logos { padding-block: clamp(2.5rem, 5vw, 3.5rem); border-block: 1px solid var(--border); background: var(--bg); }
.logos__title {
  text-align: center;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: var(--sp-6);
}
.marquee {
  display: flex;
  overflow: hidden;
  user-select: none;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  flex: none;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
  padding-right: clamp(2.5rem, 6vw, 5rem);
  min-width: max-content;
  animation: marquee var(--marquee-speed, 38s) linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* A faixa de clientes anda SEMPRE, mesmo com "reduzir movimento" ligado.
   Com os efeitos de animação do Windows desligados, o navegador avisa o site
   e a regra global do topo (prefers-reduced-motion) congelava a faixa.
   Decisão do dono do site: a faixa é lenta e para no hover, então fica
   em movimento. O resto das animações continua respeitando a preferência. */
@media (prefers-reduced-motion: reduce) {
  .marquee__track {
    animation-duration: var(--marquee-speed, 38s) !important;
    animation-iteration-count: infinite !important;
  }
}

.marquee img {
  width: auto;
  object-fit: contain;
  filter: grayscale(1);
  opacity: .55;
  transition: filter .3s var(--ease), opacity .3s var(--ease), transform .3s var(--ease-out);
}
.marquee a:hover img, .marquee img:hover { filter: grayscale(0); opacity: 1; transform: scale(1.05); }
:root[data-theme="dark"] .marquee img:not(.logo--clara) { filter: grayscale(1) brightness(0) invert(1); opacity: .45; }
:root[data-theme="dark"] .marquee a:hover img:not(.logo--clara),
:root[data-theme="dark"] .marquee img:not(.logo--clara):hover { filter: grayscale(0) brightness(1) invert(0); opacity: 1; }

/* Logo de tinta clara (branca): sem fundo escuro ela sumiria no tema claro.
   A VIP Cargas já vem com o fundo navy embutido no próprio PNG, então aqui
   só arredondamos os cantos — placa com padding criaria um anel de cor
   levemente diferente em volta.
   O dessaturado da regra base continua valendo, para ela acompanhar as
   outras na faixa. O que NÃO pode é a inversão do tema escuro: viraria um
   bloco branco com a logo preta. */
.marquee img.logo--clara,
.logo-grid__item img.logo--clara {
  background: var(--navy-950);
  border-radius: 10px;
}

/* Logo com versão própria para o tema escuro (campo "arquivoEscuro" em
   data/clientes.js). Em repouso as duas viram a mesma silhueta das outras;
   a diferença aparece no hover do tema escuro, que mostra as cores — e aí a
   tinta escura da versão normal sumiria no fundo. */
.logo--tema-escuro { display: none; }
:root[data-theme="dark"] .logo--tema-claro { display: none; }
:root[data-theme="dark"] .logo--tema-escuro { display: block; }

/* Grade de logos (página institucional)
   As linhas entre as células são o outline de cada item caindo dentro do
   gap de 1px — e não o fundo da grade aparecendo pelo gap. Assim as células
   vazias da última linha ficam com a cor da página, em vez de um bloco cinza. */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.logo-grid__item {
  background: var(--bg);
  outline: 1px solid var(--border);
  display: grid;
  place-items: center;
  padding: var(--sp-5) var(--sp-4);
  min-height: 120px;
  transition: background-color .25s var(--ease);
}
.logo-grid__item:hover { background: var(--bg-elev); }
.logo-grid__item img {
  max-height: 64px; width: auto;
  filter: grayscale(1); opacity: .6;
  transition: filter .3s var(--ease), opacity .3s var(--ease);
}
.logo-grid__item:hover img { filter: grayscale(0); opacity: 1; }
:root[data-theme="dark"] .logo-grid__item img:not(.logo--clara) { filter: grayscale(1) brightness(0) invert(1); opacity: .5; }
:root[data-theme="dark"] .logo-grid__item:hover img:not(.logo--clara) { filter: none; opacity: 1; }

/* ---------- 11. MÉTRICAS ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--sp-5);
  text-align: center;
}
.stat__value {
  font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent), var(--accent-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: var(--sp-2);
  font-variant-numeric: tabular-nums;
}
.stat__label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 600;
  color: var(--text-mut);
}

/* ---------- 12. TIMELINE / PASSOS ---------- */
.steps { display: grid; gap: 0; counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-5);
  padding-bottom: var(--sp-6);
  position: relative;
}
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 23px; top: 48px; bottom: 0;
  width: 1.5px;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--accent) 55%, transparent), transparent);
}
.step__badge {
  width: 47px; height: 47px;
  border-radius: var(--r-full);
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--accent-txt);
  font-weight: 800;
  font-size: var(--fs-sm);
  flex: none;
  z-index: 1;
}
.step__badge .ico { width: 20px; height: 20px; }
.step h3 { margin-bottom: var(--sp-2); }
.step p { color: var(--text-mut); font-size: var(--fs-sm); }

/* ---------- 13. FORMULÁRIOS ---------- */
.form-grid { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid--2 { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: .45rem; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-mut);
  text-transform: uppercase;
  letter-spacing: .07em;
}
.field label .req { color: var(--danger); }
.input {
  width: 100%;
  padding: .85rem 1.05rem;
  border-radius: var(--r-md);
  background: var(--bg);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: var(--fs-sm);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.input::placeholder { color: var(--text-soft); }
.input:focus {
  outline: none;
  border-color: var(--accent-600);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.input:user-invalid { border-color: var(--danger); }
textarea.input { resize: vertical; min-height: 120px; line-height: 1.6; }
select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23858da0' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.6rem;
}
.form-note { font-size: var(--fs-xs); color: var(--text-soft); }

/* ---------- 14. RASTREIO ---------- */
.track-box {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.track-form {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: 1fr;
}
@media (min-width: 780px) { .track-form { grid-template-columns: 1fr 1fr auto; align-items: end; } }

.track-msg {
  display: none;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
  padding: .8rem 1rem;
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.track-msg.is-visible { display: flex; }
.track-msg--error {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: #b91c1c;
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
}
:root[data-theme="dark"] .track-msg--error { color: #fca5a5; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .track-msg--error { color: #fca5a5; }
}
.track-msg .ico { width: 18px; height: 18px; flex: none; }

.track-result { display: none; margin-top: var(--sp-6); padding-top: var(--sp-6); border-top: 1px solid var(--border); }
.track-result.is-visible { display: block; animation: fade-up .5s var(--ease-out) both; }

.track-status {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}
.track-status__label { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .12em; color: var(--text-soft); font-weight: 700; margin-bottom: .3rem; }
.track-status__value { font-size: 1.3rem; font-weight: 800; color: var(--accent-txt); letter-spacing: -.02em; }
.track-status__loc { font-weight: 600; }
.track-status__time { font-size: var(--fs-sm); color: var(--text-mut); }

.progress {
  height: 9px;
  border-radius: var(--r-full);
  background: var(--bg-sunken);
  overflow: hidden;
  border: 1px solid var(--border);
}
.progress__bar {
  height: 100%;
  width: 0%;
  border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--accent-700), var(--accent));
  transition: width 1.1s var(--ease-out);
  box-shadow: 0 0 12px rgba(0,255,0,.5);
}
.progress-legend {
  display: flex;
  justify-content: space-between;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-soft);
  margin-top: var(--sp-3);
  font-weight: 600;
}
.progress-legend span { flex: 1; text-align: center; }
.progress-legend span:first-child { text-align: left; }
.progress-legend span:last-child { text-align: right; }

.history { margin-top: var(--sp-6); }
.history__list { max-height: 320px; overflow-y: auto; padding-right: .4rem; display: grid; gap: .6rem; }
.history__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--sp-3);
  align-items: baseline;
  padding: .8rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
}
.history__item:first-child { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.history__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-soft); align-self: center; }
.history__item:first-child .history__dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.history__time { color: var(--text-soft); font-size: var(--fs-xs); white-space: nowrap; font-variant-numeric: tabular-nums; }
.history__loc { display: block; color: var(--text-soft); font-size: var(--fs-xs); }

/* Scrollbar discreta */
.history__list::-webkit-scrollbar { width: 6px; }
.history__list::-webkit-scrollbar-track { background: transparent; }
.history__list::-webkit-scrollbar-thumb { background: var(--border-str); border-radius: 3px; }

/* Spinner do botão */
.spinner {
  width: 1.05em; height: 1.05em;
  border: 2px solid rgba(5,5,23,.25);
  border-top-color: var(--navy-950);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 15. FAQ ---------- */
.faq { border-top: 1px solid var(--border); }
.faq__item { border-bottom: 1px solid var(--border); }
.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: 1.35rem 0;
  text-align: left;
  font-weight: 700;
  font-size: var(--fs-body);
  color: var(--text);
  transition: color .2s var(--ease);
}
.faq__q:hover { color: var(--accent-txt); }
.faq__q .ico { width: 20px; height: 20px; flex: none; transition: transform .3s var(--ease-out); color: var(--accent-txt); }
.faq__item.is-open .faq__q .ico { transform: rotate(45deg); }
.faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease-out); }
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__a > div { overflow: hidden; }
.faq__a p { color: var(--text-mut); font-size: var(--fs-sm); padding-bottom: 1.35rem; max-width: 70ch; }

/* ---------- 16. CTA ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  border-radius: var(--r-xl);
  padding: clamp(2rem, 5vw, 4rem);
  text-align: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: -50% -10% auto auto;
  width: 30rem; height: 30rem;
  background: radial-gradient(circle, rgba(0,255,0,.16), transparent 65%);
  z-index: -1;
}
.cta-band h2 { color: #fff; margin-bottom: var(--sp-4); }
.cta-band p { color: rgba(255,255,255,.72); max-width: 55ch; margin-inline: auto; }
.cta-band .cluster { justify-content: center; margin-top: var(--sp-6); }

/* ---------- 17. FOOTER ---------- */
.footer {
  background: var(--navy-950);
  color: rgba(255,255,255,.7);
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: var(--sp-8);
  padding-bottom: var(--sp-5);
}
.footer__grid {
  display: grid;
  gap: var(--sp-7);
  grid-template-columns: 1fr;
  padding-bottom: var(--sp-7);
}
@media (min-width: 720px)  { .footer__grid { grid-template-columns: 1.6fr 1fr 1fr; } }
@media (min-width: 1024px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr 1.3fr; } }
.footer h4 {
  color: #fff;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 700;
  margin-bottom: var(--sp-4);
}
.footer li + li { margin-top: .6rem; }
.footer a { font-size: var(--fs-sm); transition: color .2s var(--ease); }
.footer a:hover { color: var(--accent); }
.footer__about p { font-size: var(--fs-sm); color: rgba(255,255,255,.6); max-width: 40ch; margin-top: var(--sp-4); }
.footer__contact li { display: flex; gap: .7rem; align-items: flex-start; font-size: var(--fs-sm); }
.footer__contact .ico { width: 17px; height: 17px; color: var(--accent); flex: none; margin-top: .25rem; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: var(--sp-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: rgba(255,255,255,.45);
}
.footer__social { display: flex; gap: var(--sp-2); }
.footer__social a {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  border: 1px solid rgba(255,255,255,.12);
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.footer__social a:hover { background: var(--accent); border-color: var(--accent); color: var(--navy-950); }
.footer__social .ico { width: 17px; height: 17px; }

/* Assinatura do desenvolvedor */
.footer__sign {
  border-top: 1px solid rgba(255, 255, 255, .08);
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  text-align: right;
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, .38);
}
.footer__sign a {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: .06em;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.footer__sign a:hover,
.footer__sign a:focus-visible { border-bottom-color: currentColor; }
/* No celular o botão flutuante do WhatsApp fica no canto direito, bem em cima
   da assinatura alinhada à direita. À esquerda ela fica livre e alinha com o
   copyright. */
@media (max-width: 640px) {
  .footer__sign { text-align: left; }
}

/* ---------- 18. BOTÃO WHATSAPP FLUTUANTE ---------- */
.wa-float {
  position: fixed;
  right: clamp(1rem, 3vw, 1.75rem);
  bottom: clamp(1rem, 3vw, 1.75rem);
  z-index: 90;
  width: 56px; height: 56px;
  border-radius: var(--r-full);
  background: #25d366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 28px rgba(37,211,102,.45);
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease);
}
.wa-float:hover { transform: scale(1.08); box-shadow: 0 12px 36px rgba(37,211,102,.6); }
.wa-float svg { width: 28px; height: 28px; }

/* ---------- 19. ANIMAÇÕES DE ENTRADA ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: .09s; }
[data-reveal][data-delay="2"] { transition-delay: .18s; }
[data-reveal][data-delay="3"] { transition-delay: .27s; }
[data-reveal][data-delay="4"] { transition-delay: .36s; }
[data-reveal][data-delay="5"] { transition-delay: .45s; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 20. UTILITÁRIOS ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute;
  left: 50%; transform: translateX(-50%) translateY(-150%);
  top: .5rem; z-index: 200;
  background: var(--accent); color: var(--navy-950);
  padding: .6rem 1.2rem; border-radius: var(--r-full);
  font-weight: 700; font-size: var(--fs-sm);
  transition: transform .2s var(--ease-out);
}
.skip-link:focus { transform: translateX(-50%) translateY(0); }

.text-center { text-align: center; }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }
.mt-7 { margin-top: var(--sp-7); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-5 { margin-bottom: var(--sp-5); }
.mb-6 { margin-bottom: var(--sp-6); }
.hide-mobile { display: none; }
@media (min-width: 768px) { .hide-mobile { display: initial; } }

.check-list li {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  font-size: var(--fs-sm);
  color: var(--text-mut);
}
.check-list li + li { margin-top: var(--sp-3); }
.check-list .ico {
  width: 20px; height: 20px;
  color: var(--accent-txt);
  flex: none;
  margin-top: .15rem;
}
.check-list strong { color: var(--text); font-weight: 600; }

/* Tabela responsiva */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 520px; }
th, td { padding: .9rem 1.1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--text-soft); font-weight: 700; background: var(--bg-elev); }
tr:last-child td { border-bottom: 0; }

/* ---------- RASTREIO: dados da carga (vindos do CT-e) ---------- */
/* Separador "ou" entre a busca por NF e a busca por chave */
.track-ou {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-block: var(--sp-5);
  color: var(--text-soft);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: .14em;
}
.track-ou::before, .track-ou::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.track-carga {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-elev);
  margin-bottom: var(--sp-6);
}
.carga-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}
.carga-grid dt {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: .25rem;
}
.carga-grid dd {
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
  text-wrap: pretty;
}

/* Item de histórico quando ainda não há nenhuma ocorrência */
.history__item--vazio { color: var(--text-mut); }
.history__item--vazio strong { font-weight: 600; }
