/* ==========================================================================
   Serpema Máquinas — home
   Base: grade de 12 colunas do Figma, agora com mais respiro (container de
   1360px, gutters de 32px). Só a faixa laranja e Unidades são painéis arredondados.
   ========================================================================== */

:root {
  --navy: #12326e;
  --navy-dark: #0c2554;
  --blue: #1c3d79;
  --orange: #ef7c1a;
  --orange-dark: #d8690c;
  --muted: #586e85;
  --hero-text: #d7e5f2;
  --footer-text: #c5d4e2;
  --card-bg: #f3f5f8;
  --line: #e3e8ef;
  --border: #d7dfe7;
  --white: #fff;

  /* Helvetica Now Display (Figma) é licenciada; Inter Tight é a alternativa gratuita mais próxima.
     Com a licença web, basta colocar "Helvetica Now Display" na frente desta lista. */
  --font-display: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font-body: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --font-label: "Manrope", "DM Sans", Arial, sans-serif;

  --container: 1360px;
  --pad-x: clamp(20px, 4vw, 48px);
  --gutter: clamp(16px, 1.7vw, 32px);
  --section-y: clamp(80px, 7.3vw, 140px);
  --header-h: 88px;

  --panel-x: clamp(10px, 1.46vw, 28px);
  --radius-panel: clamp(22px, 2.1vw, 40px);
  --radius-card: 20px;

  --ease: cubic-bezier(.2, .75, .2, 1);
  --ease-expo: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
svg { flex: none; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
address { font-style: normal; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
}
.skip-link:focus { top: 16px; }

.container {
  width: min(var(--container), 100% - 2 * var(--pad-x));
  margin-inline: auto;
}

.section { padding-block: var(--section-y); }
.section--navy { background: var(--navy); color: var(--white); }

/* Painel arredondado, destacado do fundo (Unidades e faixa laranja) */
.panel {
  position: relative;
  margin-inline: var(--panel-x);
  border-radius: var(--radius-panel);
  overflow: hidden;
}

.media-cover { width: 100%; object-fit: cover; }

/* Rolagem suave (Lenis) */
html.lenis,
html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto !important; } /* quem suaviza é o Lenis, não o navegador */
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }

/* Fotos com parallax: ficam 14% maiores para deslizar dentro da moldura */
[data-parallax] { overflow: hidden; border-radius: var(--radius-card); }
[data-parallax] img { scale: 1.14; will-change: translate; }

.zoom { overflow: hidden; border-radius: var(--radius-card); background: var(--card-bg); }
.zoom img { height: 100%; transition: transform 1s var(--ease); }
.zoom:hover img { transform: scale(1.06); }

/* ---------- Tipografia ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--orange);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.eyebrow--light { color: #ff9b47; }

.title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(30px, 1.2rem + 1.6vw, 48px);
  line-height: 1.06;
  letter-spacing: -0.012em;
  text-transform: uppercase;
  color: var(--blue);
}
.title--light { color: var(--white); }

.lead {
  font-size: clamp(18px, 1rem + .35vw, 22px);
  line-height: 1.4;
  font-weight: 500;
  color: var(--navy);
}
.lead--bold { font-weight: 700; }

.text {
  font-size: 18px;
  line-height: 1.55;
  color: #2c4670;
}
.text--lg { font-size: clamp(18px, 1rem + .3vw, 21px); line-height: 1.5; }
.text--light { color: rgba(255, 255, 255, .86); }
.text--muted { font-family: var(--font-body); font-size: 16px; line-height: 1.7; color: var(--muted); }

/* ---------- Botões ---------- */
.btn {
  --bg: var(--orange);
  --bg-hover: var(--orange-dark);
  --fg: var(--white);
  --ic-bg: var(--white);
  --ic-fg: var(--orange);
  --shadow: rgba(239, 124, 26, .55);

  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  height: 56px;
  padding: 0 8px 0 26px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  box-shadow: 0 14px 30px -16px var(--shadow);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .005em;
  white-space: nowrap;
  cursor: pointer;
  transition: translate .45s var(--ease), scale .2s var(--ease), box-shadow .45s var(--ease);
}
/* preenchimento que nasce do ícone */
.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 28px;
  z-index: -1;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-hover);
  transform: translate(50%, -50%) scale(0);
  transition: transform .7s var(--ease);
}
/* translate/scale separados para não brigar com o transform da animação de entrada */
.btn:hover { translate: 0 -2px; box-shadow: 0 20px 36px -18px var(--shadow); }
.btn:hover::before { transform: translate(50%, -50%) scale(55); }
.btn:active { translate: 0; scale: .98; }

.btn__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ic-bg);
  color: var(--ic-fg);
}
.btn__icon svg { width: 18px; height: 18px; transition: transform .5s var(--ease); }
.btn:hover .btn__icon svg { transform: rotate(-45deg); }

.btn--navy {
  --bg: var(--navy);
  --bg-hover: var(--blue);
  --ic-bg: var(--orange);
  --ic-fg: var(--white);
  --shadow: rgba(18, 50, 110, .55);
}
.btn--ghost {
  --bg: rgba(255, 255, 255, .08);
  --bg-hover: rgba(255, 255, 255, .16);
  --ic-bg: rgba(255, 255, 255, .16);
  --ic-fg: var(--white);
  --shadow: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .8); }
.btn--sm { height: 48px; gap: 12px; padding: 0 6px 0 20px; font-size: 15px; }
.btn--sm .btn__icon { width: 36px; height: 36px; }
.btn--sm::before { right: 24px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

.arrow {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), opacity .3s, transform .35s var(--ease);
}
.arrow svg { width: 20px; height: 20px; }
.arrow--prev svg { transform: rotate(180deg); }
.arrow:hover:not(:disabled) { background: var(--navy); border-color: var(--navy); color: var(--white); }
.arrow:active:not(:disabled) { transform: scale(.94); }
.arrow:disabled { opacity: .35; cursor: default; }

/* ---------- Animações de entrada ao rolar ---------- */
.js [data-reveal] {
  --d: calc(var(--i, 0) * 110ms);
  opacity: 0;
  transform: translate3d(0, 36px, 0);
  transition:
    opacity .9s var(--ease) var(--d),
    transform 1.2s var(--ease-expo) var(--d),
    clip-path 1.4s var(--ease-expo) var(--d),
    translate .45s var(--ease),
    scale .2s var(--ease),
    box-shadow .45s var(--ease);
}
.js [data-reveal="image"] {
  transform: scale(.96);
  clip-path: inset(10% 6% 10% 6% round 28px);
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 0 0 round 0);
}

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  transition: height .45s var(--ease), box-shadow .45s var(--ease), background-color .45s var(--ease);
}
.site-header.is-scrolled {
  height: 72px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 10px 30px -18px rgba(18, 50, 110, .35);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
}
.header__brand img { width: 200px; transition: width .45s var(--ease); }
.is-scrolled .header__brand img { width: 172px; }

.header__nav ul { display: flex; gap: 30px; }
.header__nav ul a {
  position: relative;
  display: block;
  padding: 8px 0;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--blue);
  transition: color .3s var(--ease);
}
.header__nav ul a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease);
}
.header__nav ul a:hover::after,
.header__nav ul a.is-active::after { transform: scaleX(1); transform-origin: left; }
.header__nav ul a.is-active { color: var(--navy); }
.header__quote-mobile,
.header__toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(560px, calc(100svh - var(--header-h)), 760px);
  overflow: hidden;
  background: var(--navy);
}
.hero__media { position: absolute; inset: 0; will-change: transform; }
.hero__bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
  transform: scale(1.12);
  transition: transform 2.6s var(--ease-expo);
}
.hero.is-ready .hero__bg,
html:not(.js) .hero__bg { transform: scale(1.02); }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(12, 37, 84, .72) 0%, rgba(12, 37, 84, .35) 38%, rgba(12, 37, 84, 0) 62%),
    linear-gradient(0deg, rgba(12, 37, 84, .45) 0%, rgba(12, 37, 84, 0) 30%);
  pointer-events: none;
}
.hero__content { position: relative; z-index: 2; padding-block: 72px; will-change: transform, opacity; }

.hero__title {
  max-width: 760px;
  font-size: clamp(42px, 2.1rem + 3vw, 84px);
  font-weight: 800;
  line-height: .95;
  letter-spacing: -0.025em;
  color: var(--white);
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__title .line > span { display: block; }
.hero__title .line--accent { color: var(--orange); }
.hero__text {
  max-width: 520px;
  margin-top: 22px;
  font-size: clamp(17px, 1rem + .3vw, 20px);
  font-weight: 500;
  line-height: 1.45;
  color: var(--hero-text);
}
.hero__actions { margin-top: 36px; }

/* entrada do hero */
.js .hero .line > span { transform: translateY(108%); transition: transform 1.2s var(--ease-expo); }
.js .hero .line--accent > span { transition-delay: .12s; }
.js .hero__text,
.js .hero__actions {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .9s var(--ease), transform 1.1s var(--ease-expo);
}
.js .hero__text { transition-delay: .35s; }
.js .hero__actions { transition-delay: .5s; }
.js .hero.is-ready .line > span,
.js .hero.is-ready .hero__text,
.js .hero.is-ready .hero__actions { opacity: 1; transform: none; }

/* ---------- Categorias (portfólio) ---------- */
.categorias__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  column-gap: calc(var(--gutter) * 2);
  align-items: center;
}
.categorias__intro { padding-bottom: 76px; } /* centraliza com os cards, sem contar a barra de navegação */
.categorias__intro .title { max-width: 430px; }
.categorias__intro .lead { max-width: 410px; margin-top: 20px; }
.categorias__intro .btn { margin-top: 36px; }

.carousel__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2 * var(--gutter)) / 3);
  gap: var(--gutter);
  padding-block: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  cursor: grab;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.carousel__track.is-dragging .cat-card { pointer-events: none; }

.carousel__bar { display: flex; align-items: center; gap: 28px; margin-top: 24px; }
.carousel__progress { position: relative; flex: 1; height: 3px; overflow: hidden; border-radius: 3px; background: var(--line); }
.carousel__progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 40%;
  border-radius: 3px;
  background: var(--orange);
  transition: transform .25s linear;
}
.carousel__nav { display: flex; gap: 12px; }

.cat-card {
  position: relative;
  aspect-ratio: 279 / 505;
  overflow: hidden;
  border-radius: var(--radius-card);
  scroll-snap-align: start;
  background: var(--card-bg);
}
.cat-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.cat-card::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(to top, rgba(8, 22, 52, .78), transparent);
  pointer-events: none;
  transition: opacity .5s var(--ease);
}
.cat-card:hover img { transform: scale(1.07); }
.cat-card__label {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--white);
}
.cat-card__go {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--orange);
  opacity: 0;
  transform: translateX(-10px) scale(.8);
  transition: opacity .45s var(--ease), transform .55s var(--ease);
}
.cat-card__go svg { width: 18px; height: 18px; }
.cat-card:hover .cat-card__go { opacity: 1; transform: none; }
.cat-card__link { display: block; height: 100%; color: inherit; }
.carousel__track.is-dragging .cat-card__link { pointer-events: none; }

/* ---------- Seções em duas colunas (A Serpema, Assistência) ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 630fr) minmax(0, 542fr);
  column-gap: 8.4375%;
  align-items: center;
}
.split__content .lead,
.split__content .text { margin-top: 24px; }
.split__content .btn { margin-top: 36px; }

.sobre__foto { aspect-ratio: 630 / 560; border-radius: var(--radius-card); }

.assist-mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
.assist-mosaic__main { grid-column: 1 / -1; aspect-ratio: 630 / 330; }
.assist-mosaic__main img { object-position: 50% 0; }
.assist-mosaic > .zoom:not(.assist-mosaic__main) { aspect-ratio: 305 / 210; }

/* ---------- Unidades ---------- */
.unidades__head { margin-bottom: 64px; }
.unidades__head .text { max-width: 540px; }

.units {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gutter);
}
.unit {
  padding: 14px 14px 26px;
  border-radius: 24px;
  background: var(--white);
  color: var(--navy);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}
.unit { transition: translate .45s var(--ease), box-shadow .45s var(--ease); }
.unit:hover { translate: 0 -6px; box-shadow: 0 30px 50px -30px rgba(0, 0, 0, .55); }
.unit__img { aspect-ratio: 380 / 245; border-radius: 16px; }
.unit__tag,
.unit__city,
.unit__map { margin-inline: 10px; }
.unit__tag {
  margin-top: 22px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--orange);
}
.unit__city {
  margin-top: 6px;
  font-size: clamp(22px, 1.1rem + .5vw, 28px);
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
}
.unit__map {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
  cursor: pointer;
  transition: color .3s var(--ease), gap .3s var(--ease);
}
.unit__map svg { width: 18px; height: 18px; color: var(--orange); }
.unit__map:hover { color: var(--orange); gap: 12px; }

/* ---------- Entregas ---------- */
.entregas { padding-bottom: calc(var(--section-y) * .5); }
.entregas__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  column-gap: calc(var(--gutter) * 2);
  align-items: center;
}
.entregas__intro .text { max-width: 430px; margin-top: 24px; }
.entregas__intro .btn { margin-top: 36px; }

.mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--gutter);
  aspect-ratio: 880 / 560;
}
.mosaic__item {
  position: relative;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--card-bg);
  cursor: zoom-in;
}
.mosaic__item--tall { grid-row: span 2; }
.mosaic__item img { height: 100%; transition: transform 1.1s var(--ease); }
.mosaic__item:hover img { transform: scale(1.06); }
.mosaic__zoom {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--navy);
  opacity: 0;
  transform: scale(.7);
  transition: opacity .4s var(--ease), transform .5s var(--ease);
}
.mosaic__zoom svg { width: 20px; height: 20px; }
.mosaic__item:hover .mosaic__zoom,
.mosaic__item:focus-visible .mosaic__zoom { opacity: 1; transform: none; }
.mosaic__more {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 2px;
  background: rgba(18, 50, 110, .55);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: background-color .5s var(--ease);
}
.mosaic__more strong { font-family: var(--font-display); font-size: 44px; font-weight: 900; letter-spacing: -0.02em; line-height: 1; }
.mosaic__item:hover .mosaic__more { background: rgba(18, 50, 110, .72); }

/* ---------- Blog ---------- */
.blog { padding-top: calc(var(--section-y) * .5); }
.blog__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}
.blog__head .text { max-width: 360px; }
.posts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gutter);
  margin-top: 56px;
}
.post a { display: block; }
.post__img { aspect-ratio: 413 / 300; }
.post__cat {
  margin-top: 24px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--orange);
}
.post__title {
  margin-top: 12px;
  font-size: clamp(20px, 1rem + .4vw, 24px);
  font-weight: 700;
  line-height: 1.28;
  color: var(--blue);
  transition: color .3s var(--ease);
}
.post__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}
.post__more svg { width: 18px; height: 18px; color: var(--orange); transition: transform .45s var(--ease); }
.post a:hover .post__title { color: var(--orange); }
.post a:hover .post__more svg { transform: translateX(6px); }

/* ---------- Chamada para contato ---------- */
.cta {
  margin-bottom: clamp(48px, 5vw, 96px);
  padding-block: clamp(88px, 7.3vw, 140px);
  background: var(--orange);
  text-align: center;
}
.cta__title {
  font-size: clamp(30px, 1.2rem + 2.3vw, 60px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  color: var(--white);
}
.cta .btn { margin-top: 36px; }

/* ---------- Mapa ---------- */
.mapa { background: var(--navy); }
.mapa__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px;
}
.mapa__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  color: var(--white);
}
.mapa__label svg { width: 22px; height: 22px; color: var(--orange); }
.mapa__tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.mapa__tabs::-webkit-scrollbar { display: none; }
.mapa__tabs button {
  flex: none;
  height: 42px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.mapa__tabs button:hover { border-color: rgba(255, 255, 255, .6); }
.mapa__tabs button[aria-selected="true"] { border-color: var(--orange); background: var(--orange); }
.mapa__frame { display: block; width: 100%; height: 480px; border: 0; background: #e9e9e9; }

/* ---------- Rodapé ---------- */
.site-footer {
  padding-block: clamp(64px, 5vw, 96px) 32px;
  background: var(--navy);
  color: var(--footer-text);
  font-family: var(--font-body);
  font-size: 14px;
}
.footer__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px var(--gutter);
}
.footer__brand img { width: 200px; }
.footer__brand p { margin-top: 16px; line-height: 1.6; }
.footer__brand a { display: inline-block; margin-top: 20px; color: var(--white); }
.footer__brand a,
.footer__links a { background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat; transition: background-size .45s var(--ease), color .3s; }
.footer__brand a:hover,
.footer__links a:hover { background-size: 100% 1px; color: var(--orange); }

.footer__title {
  margin-bottom: 18px;
  font-family: var(--font-label);
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
}
.footer__col address { display: grid; line-height: 1.75; }
.footer__col address strong { color: var(--white); }
.footer__col address span + strong { margin-top: 12px; }
.footer__links { display: grid; gap: 10px; justify-items: start; }
.footer__links a { line-height: 1.5; color: var(--white); }

.footer__bottom {
  display: flex;
  justify-content: flex-end;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .14);
}
.footer__top { display: inline-flex; align-items: center; gap: 10px; color: var(--white); font-weight: 700; }
.footer__top svg { width: 18px; height: 18px; transform: rotate(-90deg); transition: transform .45s var(--ease); color: var(--orange); }
.footer__top:hover svg { transform: rotate(-90deg) translateX(4px); }

/* ---------- Galeria (lightbox) ---------- */
.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--white);
}
.lightbox[open] { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 24px; animation: fade-in .35s var(--ease); }
.lightbox::backdrop { background: rgba(6, 16, 38, .92); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox__figure { display: grid; justify-items: center; gap: 14px; min-width: 0; }
.lightbox__figure img { max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; border-radius: 14px; }
.lightbox__figure img.is-changing { animation: photo-in .55s var(--ease-expo); }
.lightbox__figure figcaption { font-family: var(--font-body); font-size: 14px; color: var(--footer-text); }
.lightbox .arrow { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .25); color: var(--white); }
.lightbox .arrow:hover { background: var(--orange); border-color: var(--orange); }
.lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: var(--white);
  cursor: pointer;
  transition: background-color .3s, transform .4s var(--ease);
}
.lightbox__close:hover { background: rgba(255, 255, 255, .22); transform: rotate(90deg); }
@keyframes fade-in { from { opacity: 0; } }
@keyframes photo-in { from { opacity: 0; transform: scale(.96); } }

/* ==========================================================================
   Responsivo
   ========================================================================== */

/* Menu recolhido */
@media (max-width: 1240px) {
  :root { --header-h: 76px; }
  .site-header.is-scrolled { height: 68px; }

  .header__brand img,
  .is-scrolled .header__brand img { width: 168px; }
  .header__quote { display: none; }
  .header__toggle {
    display: inline-grid;
    align-content: center;
    gap: 5px;
    width: 46px;
    height: 46px;
    padding: 0 11px;
    border: 0;
    border-radius: 50%;
    background: var(--card-bg);
    cursor: pointer;
  }
  .header__toggle span { display: block; height: 2.5px; border-radius: 2px; background: var(--blue); transition: transform .35s var(--ease), opacity .25s; }
  .header__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .header__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .header__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

  .header__nav {
    position: absolute;
    top: calc(100% + 8px);
    left: var(--panel-x);
    right: var(--panel-x);
    display: grid;
    gap: 20px;
    padding: 12px 24px 24px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 30px 60px -24px rgba(18, 50, 110, .35);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px) scale(.98);
    transform-origin: top center;
    transition: opacity .3s var(--ease), transform .45s var(--ease), visibility .3s;
  }
  .header__nav.is-open { visibility: visible; opacity: 1; transform: none; }
  .header__nav ul { flex-direction: column; gap: 0; }
  .header__nav ul a { padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 18px; }
  .header__nav ul a::after { display: none; }
  .header__nav ul a.is-active { color: var(--orange); }
  .header__quote-mobile { display: inline-flex; justify-content: space-between; width: 100%; }

  .hero::before {
    background:
      linear-gradient(90deg, rgba(12, 37, 84, .9) 0%, rgba(12, 37, 84, .6) 55%, rgba(12, 37, 84, .15) 90%),
      linear-gradient(0deg, rgba(12, 37, 84, .5) 0%, rgba(12, 37, 84, 0) 35%);
  }
}

/* Tablet */
@media (max-width: 1024px) {
  .categorias__grid,
  .entregas__grid { grid-template-columns: 1fr; row-gap: 48px; }
  .categorias__intro { padding-bottom: 0; }
  .categorias__intro .title,
  .categorias__intro .lead,
  .entregas__intro .text { max-width: 640px; }
}

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; row-gap: 48px; }
  .unidades__head { row-gap: 20px; margin-bottom: 40px; }
  .blog__head { flex-direction: column; align-items: flex-start; gap: 16px; }

  .carousel__track { grid-auto-columns: calc((100% - var(--gutter)) / 2.3); }

  .units,
  .posts {
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: 76%;
    margin-inline: calc(-1 * var(--pad-x));
    padding: 8px var(--pad-x) 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--pad-x);
    scrollbar-width: none;
  }
  .units::-webkit-scrollbar,
  .posts::-webkit-scrollbar { display: none; }
  .unit,
  .post { scroll-snap-align: start; }
  .posts { margin-top: 40px; }

  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }

  .mapa__bar { flex-direction: column; align-items: flex-start; }
  .mapa__tabs { max-width: 100%; }
  .mapa__frame { height: 400px; }
}

/* Celular */
@media (max-width: 600px) {
  .hero { min-height: calc(100svh - var(--header-h)); align-items: flex-end; }
  .hero__content { padding-block: 64px 96px; }
  .hero__bg { object-position: 64% center; }
  .hero::before {
    background: linear-gradient(180deg, rgba(12, 37, 84, .35) 0%, rgba(12, 37, 84, .7) 45%, rgba(12, 37, 84, .95) 100%);
  }

  .btn { width: 100%; justify-content: space-between; }
  .btn-row { flex-direction: column; gap: 12px; }

  .carousel__track { grid-auto-columns: 72%; }
  .carousel__bar { gap: 16px; }
  .units,
  .posts { grid-auto-columns: 86%; }

  .mosaic { aspect-ratio: auto; grid-template-rows: repeat(2, 160px); gap: 12px; }
  .mosaic__more strong { font-size: 34px; }

  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { justify-content: flex-start; margin-top: 40px; }

  .lightbox[open] { grid-template-columns: 1fr 1fr; padding: 72px 16px 24px; }
  .lightbox__figure { grid-column: 1 / -1; grid-row: 1; }
  .lightbox__prev { justify-self: end; }
}

/* ==========================================================================
   Peças comuns à home e às páginas de modelo
   ========================================================================== */

/* ---------- Botão verde do WhatsApp ---------- */
.btn--wa {
  --bg: #25d366;
  --bg-hover: #1ebe5b;
  --ic-bg: var(--white);
  --ic-fg: #1ebe5b;
  --shadow: rgba(37, 211, 102, .55);
}
.btn .btn__icon .ic-static { width: 20px; height: 20px; }
.btn:hover .btn__icon .ic-static { transform: scale(1.12); } /* WhatsApp e download não giram como a seta */

/* ---------- WhatsApp flutuante (acompanha a rolagem) ---------- */
.wa-float {
  position: fixed;
  right: clamp(16px, 2vw, 28px);
  bottom: clamp(16px, 2vw, 28px);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0;
  height: 60px;
  padding: 0 16px;
  border-radius: 999px;
  background: #25d366;
  color: var(--white);
  box-shadow: 0 18px 40px -14px rgba(37, 211, 102, .8);
  transition: gap .45s var(--ease), padding .45s var(--ease), translate .45s var(--ease), background-color .3s;
}
.wa-float::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: #25d366;
  animation: wa-pulse 2.6s var(--ease) infinite;
}
.wa-float svg { width: 28px; height: 28px; }
.wa-float__label {
  max-width: 0;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  transition: max-width .45s var(--ease);
}
.wa-float:hover { gap: 10px; padding: 0 22px 0 18px; background: #1ebe5b; translate: 0 -2px; }
.wa-float:hover .wa-float__label { max-width: 220px; }
@keyframes wa-pulse {
  0% { opacity: .55; transform: scale(1); }
  70%, 100% { opacity: 0; transform: scale(1.35); }
}

/* ---------- Seletor de idioma ---------- */
.lang {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
}
.lang button {
  min-width: 34px;
  height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--blue);
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.lang button:hover { color: var(--orange); }
.lang button.is-active { background: var(--navy); color: var(--white); }
.header__nav { margin-inline: auto; }

/* chinês: fontes do sistema para os ideogramas e sem o espaçamento negativo dos títulos */
:lang(zh) body,
:lang(zh) .btn { font-family: var(--font-display), "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }
:lang(zh) .title,
:lang(zh) .hero__title,
:lang(zh) .cta__title { letter-spacing: 0; }

/* ---------- Links com seta e dados dos posts (home e blog) ---------- */
.m-head__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  transition: color .3s var(--ease), gap .3s var(--ease);
}
.m-head__link svg { width: 18px; height: 18px; color: var(--orange); }
.m-head__link:hover { color: var(--orange); gap: 14px; }
.blog__side { display: grid; justify-items: start; gap: 18px; max-width: 420px; }
.post__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-family: var(--font-body); font-size: 13px; color: var(--muted); }

/* ==========================================================================
   Home — Max Bot (peças e oficina pelo WhatsApp)
   ========================================================================== */
.maxbot {
  position: relative;
  overflow: hidden;
  padding-bottom: 0;
  background: linear-gradient(160deg, #1b3a78 0%, var(--navy) 55%, #102d63 100%);
  color: var(--white);
}
.maxbot__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(380px, 42%, 600px);
  column-gap: clamp(32px, 4vw, 64px);
  align-items: end;
}
.maxbot__content { padding-bottom: clamp(64px, 5.5vw, 104px); }
.maxbot__content .text { max-width: 580px; margin-top: 24px; }

.maxbot__options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 32px;
}
.maxbot__options a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  transition: background-color .35s var(--ease), box-shadow .35s var(--ease), translate .35s var(--ease);
}
.maxbot__options a:hover { background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px rgba(255, 155, 71, .7); translate: 0 -3px; }
.maxbot__options .ic { flex: none; width: 22px; height: 22px; color: #ff9b47; }
.maxbot__options .go { display: none; }
.maxbot__actions { margin-top: 32px; }

.maxbot__how { margin-top: 32px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .14); }
.maxbot__how-title { font-family: var(--font-label); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.maxbot__how ol { display: grid; grid-template-columns: repeat(2, max-content); gap: 14px 48px; margin-top: 16px; }
.maxbot__how li { display: flex; align-items: center; gap: 10px; font-family: var(--font-body); font-size: 15px; color: rgba(255, 255, 255, .88); }
.maxbot__how b { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--orange); color: var(--white); font-family: var(--font-display); font-size: 13px; }

.maxbot__ilink {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.maxbot__ilink > svg { flex: none; width: 26px; height: 26px; color: #ff9b47; }
.maxbot__ilink strong { display: block; font-size: 16px; }
.maxbot__ilink span { display: block; margin-top: 2px; font-family: var(--font-body); font-size: 14px; color: rgba(255, 255, 255, .7); }
.maxbot__ilink a { display: inline-flex; align-items: center; gap: 8px; flex: none; margin-left: auto; font-size: 15px; font-weight: 700; color: #ff9b47; transition: gap .3s var(--ease), color .3s; }
.maxbot__ilink a:hover { gap: 12px; color: var(--white); }
.maxbot__ilink a svg { width: 16px; height: 16px; }

.maxbot__media { position: relative; display: flex; justify-content: flex-end; }
.js .maxbot__media[data-reveal],
.js .maxbot__media[data-reveal].is-visible { clip-path: none; } /* sem recorte: o tigre passa da coluna */
/* o tigre pode passar um pouco da coluna e entrar na margem da direita */
.maxbot__media img { position: relative; z-index: 1; display: block; flex: none; width: min(640px, 100% + var(--pad-x)); height: auto; margin-right: calc(-1 * var(--pad-x)); }
.maxbot__badge {
  position: absolute;
  top: 54%;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 240px;
  padding: 12px 18px 12px 14px;
  border-radius: 999px;
  background: var(--white);
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  box-shadow: 0 24px 44px -22px rgba(0, 0, 0, .6);
  animation: max-flutua 4.5s ease-in-out infinite;
}
.maxbot__badge i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #25d366; box-shadow: 0 0 0 4px rgba(37, 211, 102, .25); }
@keyframes max-flutua { 50% { transform: translateY(-8px); } }

/* ==========================================================================
   Home — Allison Transmission
   ========================================================================== */
.allison__grid {
  display: grid;
  grid-template-columns: minmax(0, 542fr) minmax(0, 630fr);
  column-gap: 8.4375%;
  align-items: center;
}
.allison__content .lead,
.allison__content .text { margin-top: 24px; }
.allison__checks { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; margin-top: 32px; }
.allison__checks li { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--navy); }
.allison__checks svg { flex: none; width: 30px; height: 30px; padding: 7px; border-radius: 50%; background: rgba(239, 124, 26, .12); color: var(--orange); }
.allison__content .btn { margin-top: 36px; }

.allison__media { position: relative; margin: 0; }
.allison__photo { aspect-ratio: 1 / 1; border-radius: var(--radius-card); background: #161b22; }
.allison__photo img { height: 100%; }
.allison__badge {
  position: absolute;
  left: clamp(-40px, -2.5vw, -16px);
  bottom: 40px;
  padding: 22px 26px 20px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 30px 60px -30px rgba(18, 50, 110, .55);
}
.allison__badge img { width: 210px; height: auto; }
.allison__badge small { display: block; margin-top: 12px; font-family: var(--font-label); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------- Responsivo das partes novas ---------- */
@media (min-width: 1400px) {
  .maxbot__grid { grid-template-columns: minmax(0, 1fr) clamp(380px, 46%, 620px); }
}

@media (min-width: 1241px) and (max-width: 1439px) {
  /* notebook: o botão de cotação vira só o ícone para o seletor de idioma caber */
  .header__quote { gap: 0; padding: 0 6px; }
  .header__quote > span:first-child { display: none; }
  .header__nav ul { gap: 24px; }
}

@media (max-width: 1240px) {
  .lang { margin-right: 4px; }
}

@media (max-width: 1024px) {
  .maxbot__grid { grid-template-columns: minmax(0, 1fr); }
  .maxbot__media img { width: min(86%, 440px); }
  .maxbot__content { padding-bottom: 0; }
  .maxbot__media { margin-top: 40px; }
  .maxbot__media { justify-content: center; }
  .maxbot__media img { width: min(86%, 440px); margin-right: 0; }
  .maxbot__badge { right: 2%; }
  .allison__grid { grid-template-columns: minmax(0, 1fr); row-gap: 48px; }
  .allison__badge { left: 16px; }
}

@media (max-width: 600px) {
  .lang button { min-width: 30px; height: 28px; padding: 0 7px; font-size: 11.5px; }
  .maxbot__options { grid-template-columns: 1fr 1fr; gap: 10px; }
  .maxbot__options a { min-height: 58px; padding: 10px 12px; font-size: 14px; }
  .maxbot__how ol { grid-template-columns: 1fr; }
  .maxbot__ilink { flex-wrap: wrap; }
  .maxbot__ilink a { margin-left: 42px; }
  .maxbot__badge { top: 58%; max-width: 190px; font-size: 13px; }
  .allison__checks { grid-template-columns: 1fr; }
  .allison__badge { bottom: 16px; padding: 14px 16px 12px; }
  .allison__badge img { width: 150px; }
  .wa-float { height: 56px; padding: 0 14px; }
}

@media (max-width: 420px) {
  .header__brand img,
  .is-scrolled .header__brand img { width: 128px; }
  .header__inner { gap: 10px; }
  .lang { padding: 3px; }
  .lang button { min-width: 26px; height: 26px; padding: 0 6px; font-size: 11px; }
  /* celulares estreitos: textos longos dos botões quebram linha em vez de vazar */
  .btn { gap: 12px; padding-left: 20px; white-space: normal; line-height: 1.2; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { transition-duration: 0s !important; transition-delay: 0s !important; animation: none !important; }
  .wa-float::before { display: none; }
  .js [data-reveal],
  .js .hero .line > span,
  .js .hero__text,
  .js .hero__actions { opacity: 1; transform: none; clip-path: none; }
}
