/* ============================================================
   Bari Despachante — identidade azul royal/navy derivada do logo
   ============================================================ */

@font-face {
  font-family: 'Lexend';
  src: url('../assets/fonts/lexend-var-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('../assets/fonts/sourcesans3-var-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --brand: #0050C9;
  --brand-bright: #007DEE;
  --brand-dark: #0040BD;
  --navy-900: #061638;
  --navy-800: #0D2A69;
  --whats: #1EBE5D;
  --whats-dark: #17A34A;
  --ink: #0F172A;
  --ink-soft: #475569;
  --bg: #F7F9FC;
  --white: #FFFFFF;
  --line: #E2E8F0;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(6, 22, 56, .08);
  --shadow-md: 0 10px 30px rgba(6, 22, 56, .10);
  --font-head: 'Lexend', system-ui, sans-serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
  --header-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; }

.container {
  width: min(1160px, 100% - 2.5rem);
  margin-inline: auto;
}
.container--narrow { width: min(820px, 100% - 2.5rem); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn--whats {
  background: var(--whats);
  color: #fff;
  box-shadow: 0 6px 18px rgba(30, 190, 93, .35);
}
.btn--whats:hover { background: var(--whats-dark); }
.btn--ghost {
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, .55);
}
.btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.btn--sm { padding: .5rem 1.1rem; font-size: .9rem; }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.header__logo { display: flex; align-items: center; }
.header__logo img { height: 46px; width: auto; }
@media (min-width: 768px) {
  .header__logo img { height: 60px; }
}
.header__nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.header__nav > a:not(.btn) {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: .95rem;
  color: var(--ink);
  text-decoration: none;
  transition: color .2s ease;
}
.header__nav > a:not(.btn):hover { color: var(--brand); }
.header__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}
.header__toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.header__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.header__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--navy-900);
}
.hero__bg,
.hero__bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero__bg img {
  object-fit: cover;
  object-position: center;
  will-change: transform;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(6, 22, 56, .84) 0%, rgba(6, 22, 56, .52) 38%, rgba(6, 22, 56, .16) 58%, rgba(6, 22, 56, 0) 74%);
}
.hero__content {
  position: relative;
  z-index: 1;
  padding: calc(var(--header-h) + 3rem) 0 4rem;
  max-width: 640px;
  margin-left: max((100% - 1160px) / 2, 1.25rem);
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-head);
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: #BFDBFE;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(191, 219, 254, .35);
  border-radius: 999px;
  padding: .45rem 1rem;
  margin-bottom: 1.5rem;
}
.hero__badge img {
  width: 15px;
  height: 18px;
}
.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -.01em;
}
.hero h1 em {
  font-style: normal;
  color: var(--brand-bright);
}
.hero__sub {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: #CBD5E1;
  margin: 1.25rem 0 2.25rem;
  max-width: 54ch;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
}

/* ---------- Credibilidade ---------- */
.cred {
  position: relative;
  z-index: 2;
  margin-top: -3.5rem;
}
.cred__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.cred__item {
  background: var(--white);
  padding: 1.6rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .8rem;
  color: var(--brand);
}
.cred__item picture { align-self: flex-start; line-height: 0; }
.cred__item img { height: 34px; width: auto; }
.cred__item p {
  font-size: .95rem;
  color: var(--ink-soft);
  line-height: 1.45;
}
.cred__item strong {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Seções ---------- */
.section { padding: 5.5rem 0; }
.section__head {
  max-width: 640px;
  margin-bottom: 3rem;
}
.section__tag {
  font-family: var(--font-head);
  font-size: .82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--brand);
  margin-bottom: .6rem;
}
.section__head h2, .sobre__text h2 {
  font-size: clamp(1.65rem, 3vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -.01em;
}
.section__lead {
  color: var(--ink-soft);
  margin-top: .8rem;
  font-size: 1.1rem;
}

/* ---------- Serviços ---------- */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  transition: border-color .2s ease, box-shadow .25s ease, transform .25s ease;
}
.card:hover {
  border-color: rgba(0, 80, 201, .35);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.card__icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: linear-gradient(135deg, rgba(0, 125, 238, .12), rgba(0, 64, 189, .12));
  margin-bottom: .4rem;
}
.card h3 {
  font-size: 1.15rem;
  font-weight: 600;
}
.card p {
  font-size: .97rem;
  color: var(--ink-soft);
  flex-grow: 1;
}
.card__cta {
  font-family: var(--font-head);
  font-size: .88rem;
  font-weight: 600;
  color: var(--whats-dark);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.card__cta::after {
  content: '→';
  transition: transform .2s ease;
}
.card:hover .card__cta::after { transform: translateX(4px); }
.services__note {
  margin-top: 2.2rem;
  color: var(--ink-soft);
}
.services__note a {
  color: var(--brand);
  font-weight: 600;
}

/* ---------- Sobre ---------- */
.sobre { background: var(--white); }
.sobre__grid {
  display: grid;
  grid-template-columns: 46% 1fr;
  gap: 3.5rem;
  align-items: center;
}
.sobre__media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
}
.sobre__media figcaption {
  font-size: .85rem;
  color: var(--ink-soft);
  margin-top: .7rem;
}
.sobre__text p:not(.section__tag) {
  color: var(--ink-soft);
  margin-top: 1rem;
}
.sobre__text h2 { margin-top: .2rem; }
.sobre__list {
  list-style: none;
  margin-top: 1.5rem;
  display: grid;
  gap: .65rem;
}
.sobre__list li {
  position: relative;
  padding-left: 1.9rem;
  font-weight: 500;
}
.sobre__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .28rem;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 60% no-repeat;
}

/* ---------- Avaliações Google ---------- */
.section__head--center {
  margin-inline: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .9rem;
}
.section__head--center .section__lead { margin-top: 0; }
.reviews__glogo { height: 34px; width: auto; }
.reviews__stars {
  display: flex;
  gap: .35rem;
}
.reviews__carousel { position: relative; }
.reviews__track {
  display: flex;
  gap: 1.3rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: .3rem .2rem 1rem;
}
.reviews__track::-webkit-scrollbar { display: none; }
.reviews__slide {
  flex: 0 0 min(480px, 88%);
  scroll-snap-align: center;
  margin: 0;
}
.reviews__slide img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  background: var(--white);
}
.reviews__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--brand);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: background-color .2s ease, color .2s ease, opacity .2s ease;
}
.reviews__arrow:hover { background: var(--brand); color: #fff; }
.reviews__arrow[disabled] { opacity: .35; cursor: default; }
.reviews__arrow[disabled]:hover { background: var(--white); color: var(--brand); }
.reviews__arrow--prev { left: -23px; }
.reviews__arrow--next { right: -23px; }
.reviews__dots {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: .4rem;
}
.reviews__dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: #C7D4E8;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}
.reviews__dots button.is-active {
  background: var(--brand);
  transform: scale(1.25);
}
.reviews__all {
  text-align: center;
  margin-top: 1.8rem;
}
.reviews__all a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
}
.reviews__all a:hover { text-decoration: underline; }

/* ---------- FAQ ---------- */
.faq { background: var(--white); }
.faq__list {
  display: grid;
  gap: .8rem;
}
.faq__list details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 1.4rem;
  transition: border-color .2s ease;
}
.faq__list details[open] { border-color: rgba(0, 80, 201, .35); }
.faq__list summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.02rem;
  padding: 1.15rem 0;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  position: relative;
}
.faq__icon::before,
.faq__icon::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  background: var(--brand);
  border-radius: 2px;
  transition: transform .25s ease;
}
.faq__icon::before { width: 14px; height: 2px; }
.faq__icon::after { width: 2px; height: 14px; }
details[open] .faq__icon::after { transform: rotate(90deg); }
.faq__list details p {
  color: var(--ink-soft);
  padding-bottom: 1.25rem;
  max-width: 65ch;
}

/* ---------- Contato ---------- */
.contato__grid {
  display: grid;
  grid-template-columns: minmax(320px, 440px) 1fr;
  gap: 2.5rem;
  align-items: start;
}
.contato__list {
  list-style: none;
  margin-top: 1.8rem;
  display: grid;
  gap: 1.2rem;
}
.contato__list li {
  display: flex;
  gap: .9rem;
  color: var(--ink-soft);
}
.contato__list svg { flex: 0 0 auto; color: var(--brand); margin-top: .15rem; }
.contato__social {
  display: flex;
  gap: 1.6rem;
  margin-top: 1.8rem;
}
.contato__social a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  transition: color .2s ease;
}
.contato__social a:hover { color: var(--brand); }
.contato__social svg { color: var(--brand); }
.contato__map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}
.contato__map iframe {
  width: 100%;
  height: 380px;
  border: 0;
  display: block;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--navy-900);
  color: #94A3B8;
  padding: 4rem 0 0;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.3fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}
.footer__brand img { width: 120px; margin-bottom: 1.1rem; }
.footer__brand p { font-size: .95rem; line-height: 1.6; }
.footer__nav {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.footer__nav a {
  color: #CBD5E1;
  text-decoration: none;
  font-family: var(--font-head);
  font-size: .95rem;
  transition: color .2s ease;
}
.footer__nav a:hover { color: #fff; }
.footer__contact p { font-size: .95rem; margin-bottom: .8rem; }
.footer__contact a { color: #fff; text-decoration: none; }
.footer__contact a:hover { text-decoration: underline; }
.footer__contact strong { color: #E2E8F0; }
.footer__bottom {
  border-top: 1px solid rgba(148, 163, 184, .18);
  padding: 1.4rem 0;
  font-size: .88rem;
}

/* ---------- Botão flutuante WhatsApp ---------- */
.whats-float {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 60;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--whats);
  color: #fff;
  box-shadow: 0 8px 24px rgba(23, 163, 74, .45);
  transition: background-color .2s ease, box-shadow .2s ease;
  animation: whats-in .5s ease .8s backwards;
}
.whats-float:hover {
  background: var(--whats-dark);
  box-shadow: 0 10px 28px rgba(23, 163, 74, .55);
}
.whats-float::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--whats);
  animation: whats-pulse 2.4s ease-out 1.6s 3;
  opacity: 0;
}
@keyframes whats-in {
  from { transform: translateY(80px); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}
@keyframes whats-pulse {
  0%   { transform: scale(1);   opacity: .7; }
  70%  { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* JS desligado ou motion reduzido: conteúdo sempre visível */
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Acessibilidade ---------- */
:focus-visible {
  outline: 3px solid var(--brand-bright);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__bg img { transform: none !important; }
}

/* ============================================================
   Responsivo
   ============================================================ */
@media (max-width: 1024px) {
  .cred__grid { grid-template-columns: repeat(2, 1fr); }
  .services__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .sobre__grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .contato__grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767px) {
  .section { padding: 3.8rem 0; }

  .header__toggle { display: flex; }
  .header__nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: .6rem 1.25rem 1.25rem;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform .25s ease, opacity .25s ease, visibility .25s;
  }
  .header__nav.is-open {
    transform: none;
    opacity: 1;
    visibility: visible;
  }
  .header__nav > a:not(.btn) {
    padding: .9rem .2rem;
    border-bottom: 1px solid var(--line);
    font-size: 1.05rem;
  }
  .header__nav .btn { margin-top: 1rem; justify-content: center; }

  .hero { min-height: 88svh; }
  .hero::after {
    background: linear-gradient(180deg, rgba(6, 22, 56, .80) 0%, rgba(6, 22, 56, .48) 42%, rgba(6, 22, 56, .14) 68%, rgba(6, 22, 56, .30) 100%);
  }
  .hero__content { padding: calc(var(--header-h) + 2.2rem) 0 3rem; }
  .hero__actions .btn { flex: 1 1 100%; }

  .cred { margin-top: -2.2rem; }
  .cred__grid { grid-template-columns: 1fr; }
  .cred__item { flex-direction: row; align-items: center; padding: 1.1rem 1.3rem; }
  .cred__item svg { flex: 0 0 auto; }
  .cred__item picture {
    flex: 0 0 32px;
    align-self: center;
    display: grid;
    place-items: center;
  }
  .cred__item img { height: 28px; width: auto; }

  .services__grid { grid-template-columns: 1fr; }
  .reviews__arrow { display: none; }
  .footer__inner { grid-template-columns: 1fr; gap: 2rem; }
  .contato__map iframe { height: 300px; }
  .whats-float { right: 1rem; bottom: 1rem; width: 56px; height: 56px; }
}
