/* =====================================================================
   BR Postal · base do site (tokens, tipografia e componentes)
   Cores, tipografia e componentes seguem o Manual da Marca v1.0.
   ===================================================================== */

:root {
  /* Paleta institucional (manual, p. 7) */
  --azul-velocidade: #0D7BFF;   /* símbolo, ícones, barras gráficas */
  --azul-confianca: #00388B;    /* títulos, botões e links com texto */
  --azul-nevoa: #EAF3FF;        /* fundos de apoio e cartões */
  --grafite: #0B1A33;           /* texto corrido */

  /* Derivados (mesmo matiz, para estados e bordas) */
  --confianca-hover: #002B6E;
  --velocidade-suave: #CFE4FF;
  --texto-suave: #4A5A75;       /* 7:1 sobre branco */
  --borda: #D6E3F5;
  --branco: #FFFFFF;
  --erro: #B42318;
  --erro-fundo: #FEF3F2;

  /* Tipografia: Chronica Pro no manual; Montserrat é a alternativa livre mais próxima.
     Com licença web da Chronica, troque só esta linha. */
  --fonte: "Montserrat", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --raio-sm: 10px;
  --raio: 16px;
  --raio-lg: 24px;
  --sombra: 0 1px 2px rgba(11, 26, 51, .06), 0 12px 32px -12px rgba(11, 26, 51, .18);
  --sombra-lg: 0 2px 4px rgba(11, 26, 51, .06), 0 32px 64px -24px rgba(0, 56, 139, .35);
  --largura: 1200px;
  --header-h: 72px;

  /* Curvas (Emil Kowalski): ease-out forte para respostas, ease-in-out para movimento na tela */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--fonte);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 500;
  color: var(--grafite);
  background: var(--branco);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video, iframe { display: block; max-width: 100%; }
a { color: var(--azul-confianca); }
h1, h2, h3, h4, p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* Menos movimento, não zero: cores e opacidade continuam; deslocamentos saem. */
  .btn:active, .shortcut:active { transform: none !important; }
}

.container { width: 100%; max-width: var(--largura); margin-inline: auto; padding-inline: 20px; }
@media (min-width: 768px) { .container { padding-inline: 32px; } }

@media (min-width: 1024px) { .mobile-only { display: none !important; } }
.brand { min-height: 44px; }
.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: 16px; top: -48px; z-index: 100; background: var(--azul-confianca); color: #fff; padding: 10px 16px; border-radius: var(--raio-sm); font-weight: 700; }
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--azul-velocidade); outline-offset: 3px; border-radius: 6px; }

/* ---------- Tipografia: quatro papéis ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--azul-confianca);
}
.eyebrow::before { content: ""; width: 20px; height: 3px; border-radius: 3px; background: var(--azul-velocidade); }
.display {
  font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4rem);
  font-weight: 800; line-height: 1.08; letter-spacing: -0.035em; text-wrap: balance;
}
.title {
  font-size: clamp(1.75rem, 1.25rem + 2vw, 2.75rem);
  font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; text-wrap: balance;
  color: var(--azul-confianca);
}
.lead { font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); line-height: 1.6; color: var(--texto-suave); text-wrap: pretty; }
.body { font-size: 1.0625rem; line-height: 1.7; color: var(--texto-suave); text-wrap: pretty; }
.section { padding-block: clamp(64px, 8vw, 112px); }
.section-head { max-width: 720px; display: grid; gap: 14px; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: 0 1.4rem; border-radius: 999px; border: 1.5px solid transparent;
  font-size: 1rem; font-weight: 700; letter-spacing: -0.005em; text-decoration: none; white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--azul-confianca); color: #fff; }
.btn-primary:hover { background: var(--confianca-hover); }
.btn-ghost { border-color: rgba(0, 56, 139, .25); color: var(--azul-confianca); background: transparent; }
.btn-ghost:hover { border-color: var(--azul-confianca); background: rgba(0, 56, 139, .04); }
.btn-light { background: #fff; color: var(--azul-confianca); }
.btn-light:hover { background: var(--azul-nevoa); }
.btn-outline-light { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.btn-sm { min-height: 44px; padding: 0 1.05rem; font-size: .9375rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Cabeçalho (estrutura comum; cada variação define o visual) ---------- */
.site-header { position: sticky; top: 0; z-index: 50; transition: box-shadow 200ms ease, background-color 200ms ease; }
/* --bar-h é do CSS (altura da barra); --header-h é medida pelo JS e só serve de deslocamento (âncoras, sticky). */
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--bar-h, 64px); }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand .logo-full { height: 78px; width: auto; }       /* 120px de largura: tamanho mínimo do manual */
.brand .logo-symbol { height: 36px; width: auto; display: none; }
.nav { display: none; align-items: center; gap: 28px; }
.nav a { font-size: .9375rem; font-weight: 600; text-decoration: none; color: inherit; white-space: nowrap; opacity: .85; transition: opacity 150ms ease; }
.nav a:hover { opacity: 1; }
.header-actions { display: none; align-items: center; gap: 10px; }
.menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 999px; border: 0; background: transparent; color: inherit; font-size: 1.25rem; }
.mobile-menu { position: absolute; inset-inline: 0; top: 100%; background: #fff; color: var(--grafite); box-shadow: 0 24px 48px -24px rgba(11, 26, 51, .35); transition: opacity 200ms ease, transform 250ms cubic-bezier(.2, .8, .2, 1); }
.mobile-menu[data-open="false"] { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.mobile-menu nav { display: grid; padding: 8px 20px 24px; }
.mobile-menu nav a:not(.btn) { display: flex; align-items: center; min-height: 52px; font-size: 1.0625rem; font-weight: 600; color: var(--grafite); text-decoration: none; border-bottom: 1px solid var(--borda); }
.mobile-menu .menu-ctas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
@media (max-width: 1023px) {
  :root { --bar-h: 64px; }
  .brand .logo-full { display: none; }     /* abaixo do mínimo do logo completo: só o símbolo */
  .brand .logo-symbol { display: block; }
}
@media (min-width: 1024px) {
  :root { --bar-h: 90px; }   /* logo completo com 120px de largura (mínimo do manual) */
  .nav, .header-actions { display: flex; }
  .menu-toggle, .mobile-menu { display: none; }
}

/* ---------- Formulário de cotação ---------- */
.quote-form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; align-content: start; }
.field label { font-size: .875rem; font-weight: 700; color: var(--grafite); }
.field .unit-wrap { position: relative; }
.field input {
  width: 100%; min-height: 50px; padding: 0 14px; border-radius: 12px;
  border: 1.5px solid var(--borda); background: #fff; font-size: 1rem; font-weight: 600;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field input::placeholder { color: #8C9AB3; font-weight: 500; }
.field input:hover { border-color: #B8CBE6; }
.field input:focus { outline: none; border-color: var(--azul-velocidade); box-shadow: 0 0 0 4px rgba(13, 123, 255, .18); }
.field .unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: .875rem; font-weight: 700; color: var(--texto-suave); pointer-events: none; }
.field .unit-wrap input { padding-right: 44px; }
.field .unit-wrap.is-prefix .unit { left: 14px; right: auto; color: var(--azul-confianca); }
.field .unit-wrap.is-prefix input { padding-left: 46px; padding-right: 14px; font-variant-numeric: tabular-nums; }
.field .hint { font-size: .8125rem; color: var(--texto-suave); min-height: 1.2em; }
.field .error { font-size: .8125rem; font-weight: 600; color: var(--erro); }
.field input[aria-invalid="true"] { border-color: var(--erro); }
.field input::-webkit-outer-spin-button, .field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field input[type=number] { -moz-appearance: textfield; }
.quote-fineprint { font-size: .8125rem; color: var(--texto-suave); }

/* ---------- Resultado da cotação ---------- */
.q-state { display: flex; align-items: center; gap: 12px; padding: 20px; border-radius: var(--raio); background: var(--azul-nevoa); font-weight: 600; }
.q-state.is-error { background: var(--erro-fundo); color: var(--erro); }
.q-spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--velocidade-suave); border-top-color: var(--azul-velocidade); animation: q-spin .8s linear infinite; }
@keyframes q-spin { to { transform: rotate(360deg); } }
.q-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.q-title { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; color: var(--azul-confianca); }
.q-route { font-size: .9375rem; color: var(--texto-suave); }
.q-sort { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--azul-nevoa); }
.q-sort button { min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; font-size: .875rem; font-weight: 700; color: var(--texto-suave); }
.q-sort button[aria-pressed="true"] { background: #fff; color: var(--azul-confianca); box-shadow: 0 1px 3px rgba(11, 26, 51, .12); }
.q-list { display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }
.q-option {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
  padding: 16px 18px; border-radius: var(--raio); background: #fff; border: 1.5px solid var(--borda);
}
.q-option.is-best { border-color: var(--azul-velocidade); box-shadow: 0 0 0 3px rgba(13, 123, 255, .12); }
.q-logo { position: relative; width: 84px; height: 56px; display: grid; place-items: center; border-radius: 12px; background: #fff; border: 1px solid var(--borda); overflow: hidden; }
.q-logo img { position: absolute; inset: 8px 10px; width: calc(100% - 20px); height: calc(100% - 16px); object-fit: contain; }
.q-logo span { font-size: .8125rem; font-weight: 800; color: var(--azul-confianca); }
.q-name { font-weight: 800; letter-spacing: -0.01em; }
.q-days { font-size: .9375rem; color: var(--texto-suave); }
.q-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.q-badge { font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--azul-nevoa); color: var(--azul-confianca); }
.q-badge.is-fast { background: var(--azul-confianca); color: #fff; }
.q-price { text-align: right; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; color: var(--azul-confianca); font-variant-numeric: tabular-nums; white-space: nowrap; }
.q-price small { display: block; font-size: .75rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--texto-suave); }
.q-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 16px 18px; border-radius: var(--raio); background: var(--azul-nevoa); }
.q-foot p { font-weight: 600; }
@media (max-width: 560px) {
  .q-option { grid-template-columns: auto 1fr; }
  .q-option { gap: 12px 14px; }
  .q-logo { width: 72px; height: 50px; }
  .q-price { grid-column: 1 / -1; text-align: left; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--borda); }
  .q-price small { display: inline; }
}

/* ---------- Banners (vídeos do painel): quadro segue a proporção ---------- */
.banner-frame { position: relative; overflow: hidden; border-radius: var(--raio-lg); background: var(--azul-confianca); aspect-ratio: var(--ratio, 16 / 9); max-height: 70svh; width: 100%; }
.banner-frame canvas { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); filter: blur(32px) saturate(1.2); opacity: .85; }
.banner-frame .slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 500ms ease; }
.banner-frame .slide.active { opacity: 1; }
/* Quadro fixo: tamanho do maior vídeo (16:9). A mídia preenche o quadro (cover), sem faixas
   nem fundo desfocado, e o layout não muda de altura a cada troca de banner. */
.banner-frame.is-fixed { aspect-ratio: 16 / 9; max-height: none; }
.banner-frame.is-fixed .slide { object-fit: cover; }
.banner-controls { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 12px; }
.banner-controls button { width: 44px; height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--azul-confianca); display: inline-grid; place-items: center; }
.banner-controls button:hover { background: var(--azul-nevoa); }
.banner-dot::before { content: ""; width: 10px; height: 10px; border-radius: 999px; background: #C3D3EA; transition: width 250ms ease, background-color 250ms ease; }
.banner-dot[aria-current="true"]::before { width: 28px; background: var(--azul-confianca); }

/* ---------- Conteúdo vindo do painel ---------- */
.partner { display: grid; place-items: center; height: 88px; padding: 18px 22px; border-radius: var(--raio); background: #fff; border: 1px solid var(--borda); }
/* Parede de logos monocromática: os logos do painel misturam versões brancas e coloridas,
   então todos viram silhueta escura e ganham a cor original no hover. */
.partner img { max-height: 44px; max-width: 132px; object-fit: contain; filter: brightness(0); opacity: .7; transition: opacity 150ms ease; }
.partner:hover img { opacity: 1; }
.partners-on-dark .partner { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); }
.partners-on-dark .partner img { filter: brightness(0) invert(1); opacity: .85; }

/* ---------- Carrossel contínuo de parceiros (transportadoras + marketplaces) ---------- */
.marquee { position: relative; 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; gap: 12px; width: max-content; list-style: none; margin: 0; padding: 4px 0; animation: marquee var(--marquee-dur, 40s) linear infinite; }
/* Logos coloridos e maiores; cartões do mesmo tamanho, o logo se ajusta dentro dele. */
.marquee-track .partner { --px: 26px; --py: 20px; position: relative; display: block; flex: 0 0 auto; width: 208px; height: 104px; padding: 0; background: #fff; border: 1px solid var(--borda); }
.marquee-track .partner img { position: absolute; left: var(--px); top: var(--py); width: calc(100% - 2 * var(--px)); height: calc(100% - 2 * var(--py)); max-width: none; max-height: none; object-fit: contain; filter: none; opacity: 1; }
@media (max-width: 767px) { .marquee-track .partner { --px: 20px; --py: 16px; width: 160px; height: 88px; } }
@keyframes marquee { to { transform: translateX(calc(-50% - 6px)); } }
.testimonial { display: grid; gap: 16px; align-content: start; padding: 28px; border-radius: var(--raio-lg); background: #fff; border: 1px solid var(--borda); }
.testimonial img { height: 32px; width: auto; object-fit: contain; }
.testimonial blockquote { margin: 0; font-size: 1.0625rem; line-height: 1.65; color: var(--grafite); }
.testimonial .who { font-weight: 800; color: var(--azul-confianca); }
.testimonial .role { font-size: .875rem; color: var(--texto-suave); }
.store { display: block; width: 100%; text-align: left; padding: 16px 18px; border-radius: var(--raio); border: 1.5px solid transparent; background: transparent; text-decoration: none; color: inherit; }
.store:hover { background: rgba(13, 123, 255, .06); }
.store[aria-pressed="true"] { border-color: var(--azul-velocidade); background: #fff; }
.store strong { display: block; font-weight: 800; color: var(--azul-confianca); }
.store span { display: block; font-size: .9375rem; color: var(--texto-suave); }
.store .phone { font-weight: 700; color: var(--grafite); }
.map-frame { border: 0; width: 100%; height: 100%; min-height: 360px; border-radius: var(--raio-lg); background: var(--azul-nevoa); }
.preview-tag { display: inline-block; font-size: .6875rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: #FDE68A; color: #713F12; }
.is-draft { outline: 2px dashed #F59E0B; outline-offset: 2px; }
