/* ===========================================================================
   BGR Solados — site institucional
   Sistema visual "Rastro": as travas do solado do logotipo são o motivo que
   amarra a página. Toda marca gráfica — a estampa nas trocas de fundo, as
   réguas e os marcadores de lista — sai dos mesmos três tokens de trava, só
   muda a pressão. O amarelo é exclusivo do botão de WhatsApp.
   =========================================================================== */

@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-latin-variable.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --purple:       #6527C3;
  --purple-deep:  #4A1C93;
  --purple-ink:   #1D0A3C;
  --yellow:       #FFC900;
  --ink:          #16111F;
  --ink-soft:     #443E57;
  --paper:        #FFFFFF;
  --paper-warm:   #F5F2FB;

  /* texto de apoio sobre cada fundo escuro — medidos, não chutados */
  --on-purple:    #E9DEFB;
  --on-deep:      #E4D8F8;
  --on-ink:       #C6B7E2;

  /* filete discreto sobre fundo claro: roxo da marca rebaixado */
  --hairline:     rgba(101, 39, 195, 0.22);

  --focus:        var(--purple);

  /* a trava: uma só geometria para a página inteira */
  --lug-w:        clamp(23px, 3.6vw, 34px);
  --lug-gap:      clamp(8px, 1.2vw, 12px);
  --lug-skew:     -16deg;
  --lug-count:    9;      /* travas na régua da ficha — inteiro, ver .specs::before */
  --print-h:      clamp(13px, 1.9vw, 19px);

  --font:         'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --gutter:       clamp(1.25rem, 5vw, 4rem);
  --block:        clamp(3.5rem, 8.5vw, 6.5rem);
  --shell:        70rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1rem, 0.97rem + 0.18vw, 1.0625rem);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 { font-weight: 800; line-height: 1.04; letter-spacing: -0.022em; margin: 0; }
p { margin: 0; text-wrap: pretty; }
img, svg { max-width: 100%; }
.nowrap { white-space: nowrap; }

a:focus-visible,
.skip-link:focus {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* o skip link e o botão flutuante aparecem por cima de qualquer seção, clara ou
   roxa, então um anel de uma cor só some em metade dos casos: vão de anel duplo */
.skip-link:focus {
  outline: 3px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 9px #fff;
}
.wa-float:focus-visible {
  outline: 3px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 9px #fff, 0 10px 22px -12px rgba(0, 0, 0, 0.6);
}

/* --- a estampa: uma fileira de travas ------------------------------------- */

/* Marca a troca de fundo. A cor é a do bloco de onde o solado veio, impressa no
   bloco onde ele pisou — é isso que faz a transição ser rastro e não borda. */
.print {
  position: absolute;
  top: 0;
  left: -9%;
  right: -9%;
  height: var(--print-h);
  background: repeating-linear-gradient(
    90deg,
    var(--print-color) 0 var(--lug-w),
    transparent var(--lug-w) calc(var(--lug-w) + var(--lug-gap))
  );
  transform: skewX(var(--lug-skew));
  pointer-events: none;
}

/* --- pular para o conteúdo ------------------------------------------------ */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 50;
  padding: 0.8rem 1.25rem;
  background: var(--yellow);
  color: #000;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* --- botão de WhatsApp ---------------------------------------------------- */

/* Geometria de peça prensada: canto curto, sem pílula e sem sombra borrada. */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
  min-height: 52px;
  padding: 0.9rem 1.6rem;
  background: var(--yellow);
  color: #000;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.005em;
  text-decoration: none;
  border-radius: 6px;
  box-shadow: 0 6px 0 -1px rgba(0, 0, 0, 0.28);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.button:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 -1px rgba(0, 0, 0, 0.32);
}
.button:active { transform: translateY(4px); box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.3); }
.button__icon { width: 1.35em; height: 1.35em; fill: currentColor; flex: none; }
.button--lg {
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.2rem);
  padding: 1.05rem 2.1rem;
  min-height: 58px;
}

/* --- hero ----------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(3rem, 9vw, 6.5rem) var(--gutter) clamp(3.5rem, 10vw, 7rem);
  background: var(--purple);
  color: #fff;
  --focus: #fff;
}

/* O rastro do solado, gigante, sangrando pela borda direita.
   tread.svg é branco: usado como imagem ele CLAREIA o roxo e derruba o
   contraste do texto por cima. Por isso o padrão é opacidade baixa, e onde há
   suporte a máscara ele vira impressão ESCURA — que aprofunda o roxo em vez de
   lavá-lo, e ainda lê melhor como marca prensada. */
.hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  right: -25%;
  bottom: -7%;
  width: min(96%, 22rem);
  aspect-ratio: 794 / 514;
  transform: rotate(-9deg);
  background: url('../assets/tread.svg') no-repeat center / contain;
  opacity: 0.09;
  pointer-events: none;
}
/* a partir daqui o rastro cabe inteiro e volta a ser lido como pegada, nao
   como mancha nem como caco no canto */
@media (min-width: 760px) {
  .hero::after {
    top: 50%;
    bottom: auto;
    width: 54%;
    right: -2%;
    opacity: 0.11;
    transform: translateY(-50%) rotate(-9deg);
  }
}

.hero__inner { max-width: var(--shell); margin-inline: auto; }

.hero__title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(1.6rem, 4vw, 2.5rem);
}

/* A placa branca: o logotipo tem "Solados" em preto, que sobre o roxo daria
   contraste 2,63. Sobre branco ele fica em 21. Placa de chapa, não cartão:
   canto curto e sombra curta e dura. */
.plaque {
  display: inline-block;
  padding: clamp(0.95rem, 3vw, 1.35rem) clamp(1.15rem, 4vw, 1.75rem);
  background: var(--paper);
  border-radius: 4px;
  box-shadow: 0 10px 0 -2px rgba(29, 10, 60, 0.45);
}
.plaque img { display: block; width: clamp(172px, 44vw, 258px); height: auto; }

.hero__headline {
  display: block;
  font-size: clamp(2.125rem, 1.3rem + 3.6vw, 3.875rem);
  text-wrap: balance;
  max-width: 15ch;
}
.hero__lead {
  margin-top: clamp(1.1rem, 3vw, 1.4rem);
  max-width: 33ch;
  font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.3125rem);
  color: var(--on-purple);
}

.hero__action {
  margin-top: clamp(1.9rem, 4.5vw, 2.75rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}
.hero__phone {
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.005em;
  color: var(--on-purple);
}

/* --- seções claras -------------------------------------------------------- */

.section {
  position: relative;
  overflow: hidden;
  padding: var(--block) var(--gutter);
  --print-color: var(--purple);
}
.section--specs { background: var(--paper-warm); }
.section__inner { max-width: var(--shell); margin-inline: auto; }

.section__title {
  font-size: clamp(1.75rem, 1.35rem + 1.9vw, 2.75rem);
  color: var(--purple-deep);
  text-wrap: balance;
}

.section__lead {
  margin-top: 1.25rem;
  max-width: 38rem;
  font-size: clamp(1.0625rem, 1rem + 0.45vw, 1.25rem);
  color: var(--ink-soft);
}

.prose {
  margin-top: 1.5rem;
  max-width: 40rem;
  display: grid;
  gap: 1.1rem;
}
.prose p { font-size: 1.0625rem; color: var(--ink-soft); }
/* a primeira frase é a definição da empresa: entra em corpo maior e em tinta cheia */
.prose p:first-child {
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.625rem);
  line-height: 1.34;
  font-weight: 500;
  letter-spacing: -0.014em;
  color: var(--ink);
}

/* grade editorial: título ancorado à esquerda, texto na coluna larga. É o que
   tira o vazio da direita sem inventar conteúdo para preencher.
   Vem depois das regras-base de propósito: mesma especificidade, quem fica é
   quem vem por último. */
@media (min-width: 860px) {
  .section__inner {
    display: grid;
    grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
    column-gap: clamp(2.5rem, 5vw, 4rem);
    align-items: baseline;
  }
  .section__title { grid-column: 1; }
  /* A coluna do titulo ganha um pe: a mesma trava, em pressao media. So no
     desktop — no empilhado o titulo ja encosta no texto e a regua vira ruido.
     E so fora da ficha tecnica, onde a regua forte das colunas ja cumpre esse
     papel e duas reguas paralelas ficariam redundantes. */
  .section:not(.section--specs) .section__title::after {
    --rule-lug: calc(var(--lug-w) * 0.8);
    --rule-gap: calc(var(--lug-gap) * 0.8);
    content: '';
    display: block;
    width: calc(5 * (var(--rule-lug) + var(--rule-gap)) - var(--rule-gap));
    max-width: 100%;
    height: 12px;
    margin-top: clamp(1.25rem, 2.5vw, 1.75rem);
    background: repeating-linear-gradient(
      90deg,
      var(--purple) 0 var(--rule-lug),
      transparent var(--rule-lug) calc(var(--rule-lug) + var(--rule-gap))
    );
    transform: skewX(var(--lug-skew));
  }
  .prose, .section__lead { grid-column: 2; margin-top: 0; }
  .prose { max-width: 38rem; }
  .specs { grid-column: 1 / -1; }
}

/* --- o que fabricamos: ficha técnica -------------------------------------- */

.specs {
  position: relative;
  margin-top: clamp(2.75rem, 6vw, 4rem);
  display: grid;
  gap: 0;
}
/* A régua forte da ficha: a trava em pressão cheia, amarrando as três colunas.
   Aqui o período NÃO pode ser fixo como nas outras marcas: a régua termina junto
   com a terceira coluna, e período fixo nunca fecha exato numa largura que varia
   — sobrava sempre uma última trava cortada ao meio. O ladrilho é uma fração da
   largura, então cabe um número inteiro de travas em qualquer tela; o que varia
   de leve é a espessura, não a contagem. */
.specs::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--print-h);
  background-image: repeating-linear-gradient(
    90deg,
    var(--purple) 0 calc(72% / var(--lug-count)),
    transparent calc(72% / var(--lug-count)) calc(100% / var(--lug-count))
  );
  transform: skewX(var(--lug-skew));
}

.spec { padding-top: clamp(1.5rem, 3.5vw, 2.5rem); }
.spec + .spec { border-top: 1px solid var(--hairline); }

@media (min-width: 680px) {
  .specs { --lug-count: 20; grid-template-columns: repeat(3, 1fr); }
  .spec + .spec { border-top: 0; }
  /* os filetes ligam as colunas numa folha só, subindo até a régua;
     as travas já fazem todo o barulho necessário */
  .spec { padding-right: clamp(1.5rem, 3.5vw, 2.75rem); }
  .spec + .spec {
    border-left: 1px solid var(--hairline);
    padding-left: clamp(1.5rem, 3.5vw, 2.75rem);
  }
}

.spec__title {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--purple-deep);
}

.spec__list {
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
}
.spec__list li {
  position: relative;
  padding-left: 1.9rem;
  font-weight: 500;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  letter-spacing: -0.008em;
}
/* o marcador é uma trava do solado, desenhada em CSS — pressão mínima */
.spec__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 19px;
  height: 8px;
  border-radius: 2px;
  background: var(--purple);
  transform: skewX(var(--lug-skew));
}

/* --- contato -------------------------------------------------------------- */

.contact {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: var(--block) var(--gutter);
  background: var(--purple-deep);
  color: #fff;
  text-align: center;
  --focus: #fff;
  --print-color: var(--purple);
}
.contact::after {
  content: '';
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 52%;
  width: min(118%, 54rem);
  aspect-ratio: 794 / 514;
  transform: translate(-50%, -50%) rotate(6deg);
  background: url('../assets/tread.svg') no-repeat center / contain;
  opacity: 0.07;
  pointer-events: none;
}
.contact__inner { max-width: 42rem; margin-inline: auto; }
.contact__title { font-size: clamp(1.75rem, 1.35rem + 1.9vw, 2.75rem); text-wrap: balance; }
.contact .button { margin-top: clamp(1.75rem, 4vw, 2.25rem); }
.contact__phone {
  margin-top: 1.25rem;
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.005em;
  color: var(--on-deep);
}

/* --- o rastro como impressao escura --------------------------------------- */

/* Precisa vir DEPOIS de .hero::after e .contact::after: mesma especificidade,
   quem vale e quem vem por ultimo. Posto antes, so a mascara pegava e a
   imagem branca continuava por baixo — era o fallback rodando com mascara. */
@supports (mask-image: linear-gradient(#000, #000)) or (-webkit-mask-image: linear-gradient(#000, #000)) {
  .hero::after,
  .contact::after {
    background: var(--purple-ink);
    -webkit-mask: url('../assets/tread.svg') no-repeat center / contain;
    mask: url('../assets/tread.svg') no-repeat center / contain;
    opacity: 0.32;
  }
  /* no fecho o rastro e marca d'agua: o momento forte e o hero, e o texto
     aqui e centralizado, entao passa por cima da estampa inteira */
  .contact::after { opacity: 0.22; }
  @media (min-width: 760px) {
    .hero::after { opacity: 0.34; }
  }
}

/* --- rodapé --------------------------------------------------------------- */

.site-footer {
  position: relative;
  overflow: hidden;
  padding: clamp(2.75rem, 5vw, 3.5rem) var(--gutter) calc(clamp(2.75rem, 5vw, 3.5rem) + 4.5rem);
  background: var(--purple-ink);
  color: var(--on-ink);
  --focus: #fff;
  --print-color: var(--purple-deep);
}
@media (min-width: 720px) {
  .site-footer { padding-bottom: clamp(2.75rem, 5vw, 3.5rem); }
}
.site-footer__inner {
  max-width: var(--shell);
  margin-inline: auto;
  display: grid;
  gap: 0.6rem;
}
/* a marca no rodapé vai em branco: o mono cinza #3B3B3B dá 1,61 sobre o
   roxo-tinta, ilegível. Em branco dá 18,09. O nome sai do texto porque o
   próprio logotipo já o escreve — repetir seria dizer "BGR Solados" duas vezes. */
.site-footer__brand {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 2.5vw, 1.25rem);
  font-weight: 700;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  letter-spacing: -0.012em;
  color: #fff;
}
.site-footer__mark { width: clamp(104px, 20vw, 132px); height: auto; flex: none; }

/* Crédito discreto, como manda o CLAUDE.md. A 12px o #C6B7E2 ainda dá 9,71 de
   contraste sobre o roxo-tinta — folga de sobra sobre o mínimo de 4,5. O link
   vai sublinhado porque cor sozinha não marca link para quem não a distingue. */
.site-footer__credit {
  font-size: 0.75rem;
  letter-spacing: 0.01em;
}
.site-footer__credit a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.45);
  text-underline-offset: 0.2em;
}
.site-footer__credit a:hover {
  color: #fff;
  text-decoration-color: #fff;
}

@media (min-width: 720px) {
  .site-footer__inner {
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: 1.5rem;
  }
  .site-footer__credit { text-align: right; }
}

/* --- botão flutuante ------------------------------------------------------ */

.wa-float {
  position: fixed;
  z-index: 30;
  right: clamp(0.9rem, 3vw, 1.5rem);
  bottom: max(clamp(0.9rem, 3vw, 1.5rem), env(safe-area-inset-bottom, 0px));
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow);
  color: #000;
  box-shadow: 0 0 0 2px var(--purple-ink), 0 5px 0 -1px rgba(0, 0, 0, 0.35);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.wa-float svg { width: 28px; height: 28px; fill: currentColor; }
.wa-float:hover {
  transform: translateY(2px);
  box-shadow: 0 0 0 2px var(--purple-ink), 0 1px 0 -1px rgba(0, 0, 0, 0.4);
}

/* --- movimento reduzido --------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .button:hover, .button:active, .wa-float:hover { transform: none; }
}
