/* =========================================
   APB Executive Drivers — stylesheet

   Mobile primeiro (valores em px). A partir de 901px o layout segue o
   canvas do designer (1024 × 576 por seção): o font-size raiz escala com
   a viewport, então 1rem = 16px do design e as medidas do PDF viram rem
   diretamente (px do design ÷ 16).
   ========================================= */
:root {
  --bg-dark: #222222;
  --text: #ffffff;
  --cream: #eaeae5;
  --field: #f9f7f0;
  --yellow: #f1e000;
  --green: #00bd5e;
  --red: #ff5757;
  --orange: #ff751f;
  --amber: #ffbd57;
  --hairline: rgba(255, 255, 255, .55);
  --gutter: 24px;
  /* Telegraf e HK Grotesk (fontes do PDF) não são gratuitas; usamos
     substitutos próximos (Sora ~ Telegraf, Hanken Grotesk ~ HK Grotesk). */
  --font-display: 'Sora', 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-body: 'Hanken Grotesk', 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; }

html, body { overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

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

a { text-decoration: none; color: inherit; }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* [hidden] precisa vencer o display: grid/flex dos componentes */
[hidden] { display: none !important; }

.container {
  position: relative;
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Traço branco que atravessa a tela inteira (a seção corta o excesso) */
.hero,
.solutions,
.process,
.quote { position: relative; overflow: hidden; }

.hero__bottom::after,
.section-title::after,
.quote__head::after {
  content: '';
  position: absolute;
  left: -100vw;
  right: -100vw;
  height: 1px;
  background: var(--hairline);
  pointer-events: none;
}

/* ---------- Tipografia de seção ---------- */
.section-title {
  position: relative;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.01em;
  margin: 0 0 40px;
}
.section-title::after { bottom: -20px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 700;
  border-radius: 999px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--contact {
  background: var(--cream);
  color: #000;
  font-size: 13px;
  padding: 4px 18px 4px 4px;
}
.btn--contact:hover { box-shadow: 0 8px 20px rgba(0, 0, 0, .35); }

/* Ícone do WhatsApp: círculo verde com o glifo branco, como no PDF */
.icon-wa {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  flex: none;
}
.icon-wa svg { width: 70%; height: 70%; }

.btn--submit {
  background: var(--yellow);
  color: #000;
  text-transform: uppercase;
  font-size: 15px;
  padding: 13px 24px;
}
.btn--submit:hover { background: #fff04d; box-shadow: 0 10px 22px rgba(241, 224, 0, .25); }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Destaque por linha (efeito "fundo do texto" do Canva) */
.hero__text > span,
.step__txt {
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
/* texto acima de todos os fundos de linha (senão a linha seguinte o cobre) */
.hero__text > span > span,
.step__txt > span { position: relative; }

/* =========================================
   HERO
   ========================================= */
.hero__bg {
  position: absolute;
  inset: 0;
  background: url('../assets/img/img_00.png') 70% 80% / cover no-repeat;
  filter: grayscale(1);
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, .5) 60%, rgba(0, 0, 0, .65) 100%);
}
.hero__inner { position: relative; z-index: 1; padding-top: 64px; }
.hero__logo { width: 160px; margin: 0 0 20px -6px; }
.hero__title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.015em;
  margin: 0 0 18px;
}
.hero__text {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.32;
  margin: 0 0 0 2px;
}
.hero__text > span {
  background: rgba(30, 30, 30, .7);
  padding: 2px 6px;
  border-radius: 5px;
}
.hero__tagline {
  font-size: 14px;
  line-height: 1.12;
  margin: 0;
  text-align: right;
}
/* Faixa inferior: traço + botão Contato + tagline à direita */
.hero__bottom {
  position: relative;
  margin-top: 48px;
  padding: 26px 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.hero__bottom::after { top: 0; }

/* =========================================
   SOLUÇÕES
   ========================================= */
.solutions { padding: 56px 0 64px; }
.solutions__bg {
  position: absolute;
  inset: 0;
  background: url('../assets/img/img_04.png') center / cover no-repeat;
  filter: grayscale(.4) brightness(.8);
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 209 / 345;
  min-width: 0;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .35);
  transition: transform .3s ease;
}
.card:hover { transform: translateY(-6px); }
.card img { width: 100%; height: 100%; object-fit: cover; }

/* Etiquetas: posição alternada em cada cartão, como no PDF */
.card__tag {
  position: absolute;
  left: 9%;
  max-width: 84%;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(40, 42, 38, .72);
  white-space: nowrap;
}
.card:nth-of-type(1) .card__tag { top: 19%; }
.card:nth-of-type(2) .card__tag { top: 9%; }
.card:nth-of-type(3) .card__tag { top: 31%; left: 13%; }
.card:nth-of-type(4) .card__tag { top: 42%; left: 34%; }

.card__link {
  position: absolute;
  right: 10%;
  bottom: 6.5%;
  background: var(--cream);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  transition: background .18s ease;
}
.card__link:hover { background: var(--yellow); }

/* =========================================
   PROCESSO
   ========================================= */
.process { padding: 56px 0 72px; }
.process__bg {
  position: absolute;
  inset: 0;
  background: url('../assets/img/img_09.png') center / cover no-repeat;
  filter: brightness(.85);
}

.steps { position: relative; }
.steps__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.step {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 23px;
  line-height: 1.14;
  white-space: nowrap;
}
.step__txt {
  padding: 4px 9px;
  border-radius: 7px;
}
.step--red .step__txt    { background: var(--red); }
.step--orange .step__txt { background: var(--orange); }
.step--yellow .step__txt { background: var(--amber); }
.step--green .step__txt  { background: var(--green); }

/* Zig-zag no mobile: passos alternam esquerda/direita */
.step--orange, .step--green { align-self: flex-end; }

.step-arrow { display: none; }
.step-arrow__line,
.step-arrow-m__line {
  fill: none;
  stroke: #fff;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Setas mobile: presas à lateral da caixa de destino, então a ponta
   sempre para a ~15px do texto, qualquer que seja a largura da caixa */
.steps__list { max-width: 342px; align-items: flex-start; }
.step { position: relative; }
.step + .step { margin-top: 68px; }
.step-arrow-m {
  position: absolute;
  top: -57px;
  right: calc(100% + 4px);
  width: 100px;
  height: 76px;
  overflow: visible;
  pointer-events: none;
}
.step-arrow-m--flip { right: auto; left: calc(100% + 4px); transform: scaleX(-1); }

/* =========================================
   COTAÇÃO
   ========================================= */
.quote { padding: 48px 0 72px; background: var(--bg-dark); }

.quote__head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 20px;
}
.quote__head::after { bottom: 0; }
.quote__head .section-title { margin: 0; color: #e9e9e4; }
.quote__head .section-title::after { display: none; }
.quote__logo { width: 120px; }

.quote__sub { margin: 0 0 28px; font-size: 16px; line-height: 1.35; }
.quote__cta { font-size: 15px; padding: 6px 22px 6px 6px; }
.quote__cta .icon-wa { width: 30px; height: 30px; }

/* ---------- Formulário ---------- */
.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 14px;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; grid-column: 1 / -1; }
#form-quote .field:has(#cidade),
#form-quote .field:has(#estado) { grid-column: auto; }
.field--obs { order: 1; }
.field--submit { order: 2; }

.field label { font-size: 16px; padding-left: 4px; }
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  color: #1a1a1a;
  background: var(--field);
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 0 16px;
  height: 40px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23555' stroke-width='2'/%3E%3C/svg%3E") right 16px center / 11px no-repeat; }
.field textarea { height: 120px; padding: 12px 16px; border-radius: 20px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(241, 224, 0, .2);
}
.was-validated .field input:invalid, .was-validated .field select:invalid {
  border-color: var(--red);
}

.field--submit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: 8px;
}
.field--submit .btn--submit { width: 100%; }

/* =========================================
   WHATSAPP FLUTUANTE
   ========================================= */
.wa-float {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .35);
  transition: transform .2s ease, box-shadow .2s ease;
}
.wa-float svg { width: 30px; height: 30px; }
.wa-float::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--green);
  animation: wa-pulse 2.2s ease-out infinite;
}
.wa-float:hover { transform: scale(1.08); box-shadow: 0 14px 32px rgba(0, 0, 0, .45); }

@keyframes wa-pulse {
  0% { transform: scale(1); opacity: .7; }
  70% { transform: scale(1.45); opacity: 0; }
  100% { transform: scale(1.45); opacity: 0; }
}

/* Telas mobile maiores / tablet retrato: limita a largura do conteúdo */
@media (min-width: 560px) and (max-width: 900px) {
  :root { --gutter: 48px; }
  .container { max-width: 680px; }
  .cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card__tag, .card__link { font-size: 12px; }
}

@media (max-width: 359px) {
  :root { --gutter: 18px; }
  .hero__title { font-size: 28px; }
  .step { font-size: 20px; }
  .card__tag { font-size: 9px; }
}

/* =========================================
   DESKTOP — canvas do design (1024 × 576 por seção)
   ========================================= */
@media (min-width: 901px) {
  html { font-size: min(calc(100vw / 64), 25px); }

  .container { max-width: 64rem; padding-inline: 5.125rem; }

  .section-title { font-size: 1.9375rem; line-height: 1.03; margin: 0; }

  .hero,
  .solutions,
  .process,
  .quote { height: 36rem; padding: 0; }

  /* ---------- Hero ---------- */
  .hero__bg { background-position: center 80%; }
  .hero__overlay {
    background: linear-gradient(90deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, .12) 50%, rgba(0, 0, 0, 0) 100%);
  }
  .hero__inner { height: 100%; padding: 8.1875rem 0 0 3.3125rem; }
  .hero__logo { width: 12.875rem; margin: 0 0 .75rem .3125rem; }
  .hero__title { font-size: 2.25rem; line-height: 1.03; margin: 0 0 1.375rem; }
  .hero__text { font-size: 1.25rem; line-height: 1.05; margin-left: .25rem; }
  .hero__text > span { padding: .0625rem .3125rem .125rem; border-radius: .3125rem; background: rgba(30, 30, 30, .62); }

  .hero__bottom {
    position: absolute;
    top: 26.25rem;
    left: 0;
    right: 6.5rem;
    margin: 0;
    padding: 1.9375rem 0 0;
    align-items: center;
    justify-content: flex-end;
    gap: 3.75rem;
  }
  .hero .btn--contact { margin-top: -.625rem; }
  .hero__tagline { font-size: .9375rem; line-height: 1.07; }

  .btn--contact { font-size: .75rem; gap: .5rem; padding: .1875rem 1.125rem .1875rem .25rem; }
  .icon-wa { width: 1.375rem; height: 1.375rem; }

  /* ---------- Soluções ---------- */
  .solutions .section-title { padding-top: 3.75rem; }
  .solutions .section-title::after { bottom: auto; top: 9.8125rem; }
  .cards {
    position: absolute;
    top: 10.8125rem;
    left: 7.6875rem;
    width: 54.375rem;
    grid-template-columns: repeat(4, 1fr);
    gap: .75rem;
  }
  .card { box-shadow: 0 .75rem 1.75rem rgba(0, 0, 0, .35); }
  .card__tag { font-size: .6875rem; padding: .125rem .4375rem .1875rem; border-radius: .3125rem; }
  .card:nth-of-type(1) .card__tag { top: 19%; left: 15%; }
  .card:nth-of-type(2) .card__tag { top: 9%;  left: 15%; }
  .card:nth-of-type(3) .card__tag { top: 31%; left: 20%; }
  .card:nth-of-type(4) .card__tag { top: 42%; left: 34%; }
  .card__link { font-size: .625rem; padding: .25rem .75rem .3125rem; right: 1.375rem; bottom: 1.375rem; }

  /* ---------- Processo ---------- */
  .process .container { height: 100%; }
  .process .section-title { padding-top: 1.875rem; }
  .process .section-title::after { bottom: auto; top: 8.4375rem; }

  .steps { position: absolute; inset: 0; }
  .step-arrow {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
  }
  .steps__list { display: block; }
  .step-arrow-m { display: none; }
  .step + .step { margin-top: 0; }

  .step { position: absolute; font-size: 1.9375rem; line-height: 1.03; }
  .step__txt { padding: .375rem .6875rem; border-radius: .5rem; }
  .step--red    { left: 4.6875rem;  top: 14.1875rem; }
  .step--yellow { left: 28.125rem;  top: 12.5625rem; }
  .step--orange { left: 12.1875rem; top: 24.6875rem; }
  .step--green  { left: 41.75rem;   top: 20.9375rem; }

  /* ---------- Cotação ---------- */
  .quote__head {
    height: 9.8125rem;
    padding: 1.875rem 0 0;
    margin: 0 -.625rem 0 0;
  }
  .quote__head .section-title { margin-top: .25rem; }
  .quote__logo { width: 13rem; margin-right: -.75rem; }
  .quote__sub { font-size: 1.125rem; margin: .875rem 0 0; }
  /* sem o form a seção não precisa da altura do canvas */
  .quote { height: auto; padding-bottom: 5rem; }
  .quote__cta { margin-top: 2rem; font-size: 1rem; padding: .3125rem 1.5rem .3125rem .3125rem; gap: .625rem; }
  .quote__cta .icon-wa { width: 1.875rem; height: 1.875rem; }

  .form {
    margin: 3rem 0 0 -1.3125rem;
    grid-template-columns: 11.5rem 11.5rem 15.4375rem 13.375rem;
    column-gap: 1.5rem;
    row-gap: 1.3125rem;
  }
  .field { gap: .4375rem; grid-column: auto; order: 0; }
  .field label { font-size: 1.125rem; font-weight: 400; line-height: 1.2; padding-left: .125rem; }
  .field input,
  .field select,
  .field textarea { height: 2.0625rem; font-size: .9375rem; padding: 0 1rem; border-width: .125rem; }
  .field select { background-position: right 1rem center; background-size: .6875rem; }
  .field textarea { height: 7.375rem; padding: .625rem 1rem; border-radius: 1.25rem; resize: none; }

  #form-quote .field:has(#nome)     { grid-area: 1 / 1 / 2 / 3; }
  #form-quote .field:has(#telefone) { grid-area: 1 / 3; }
  #form-quote .field:has(#email)    { grid-area: 2 / 1 / 3 / 3; }
  #form-quote .field:has(#tipo)     { grid-area: 2 / 3; }
  #form-quote .field:has(#cidade)   { grid-area: 3 / 1; }
  #form-quote .field:has(#estado)   { grid-area: 3 / 2; }
  #form-quote .field:has(#data)     { grid-area: 3 / 3; }
  .field--obs                       { grid-area: 1 / 4 / 3 / 5; }
  #form-quote .field:has(#telefone) input,
  #form-quote .field:has(#tipo) select { width: 13.3125rem; }
  #form-quote .field:has(#data) input  { width: 11.5rem; }

  .field--submit {
    grid-area: 3 / 4;
    position: relative;
    justify-content: flex-end;
    margin: 0;
  }
  .field--submit .btn--submit {
    width: 12.0625rem;
    height: 2.75rem;
    padding: 0;
    font-size: 1rem;
    margin-bottom: -.125rem;
  }
  .field--submit .btn--contact {
    position: absolute;
    top: calc(100% + 1.75rem);
    left: 50%;
    translate: -50% 0;
  }

  .wa-float { right: 1.5rem; bottom: 1.5rem; width: 3.5rem; height: 3.5rem; }
  .wa-float svg { width: 1.9rem; height: 1.9rem; }
}
