/* ==========================================================================
   Elastobras — English site
   Direção visual: folha de dados técnica. A tipografia mono carrega a
   personalidade; o resto é disciplinado e quieto.
   ========================================================================== */

:root {
  --ink:    #16181B;   /* preto fosco de borracha vulcanizada */
  --paper:  #FAFAF8;   /* off-white */
  --milk:   #ECEAE5;   /* silicone não curado — painéis */
  --steel:  #5A6572;   /* aço-ferramenta — texto secundário */
  --brand:  #3E4095;   /* azul Elastobras — amostrado do logo oficial */
  --graphite: #373435;  /* cinza do logotipo */
  --oxide:  #3E4095;   /* alias: acento = azul da marca */
  --rule:   #D5D2CB;   /* fio de 1px */

  /* Tipografia.
     ATENÇÃO: substituir por Archivo + IBM Plex Mono AUTO-HOSPEDADAS antes
     de publicar. Não usar o CDN do Google Fonts — ver README, seção RGPD. */
  --display: "Helvetica Neue", "Arial Narrow", Helvetica, Arial, sans-serif;
  --body:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --measure: 68ch;
  --gutter:  clamp(1.25rem, 5vw, 4rem);
  --maxw:    1180px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --- Acessibilidade -------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--oxide);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  background: var(--ink);
  color: var(--paper);
  padding: .75rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0; top: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* --- Layout ----------------------------------------------------------- */

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

section { padding-block: clamp(3rem, 7vw, 5.5rem); }
section + section { border-top: 1px solid var(--rule); }

/* --- Cabeçalho -------------------------------------------------------- */

.masthead {
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
}
.masthead .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.1rem;
}

.wordmark {
  display: block;
  line-height: 0;
}
.wordmark img {
  height: clamp(30px, 4.6vw, 40px);
  width: auto;
  display: block;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(.9rem, 2.5vw, 1.8rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
nav a {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--steel);
  text-decoration: none;
  padding-block: .2rem;
  border-bottom: 1px solid transparent;
}
nav a:hover { color: var(--ink); border-bottom-color: var(--oxide); }
nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* --- Hero: bloco de título de desenho técnico -------------------------- */

.hero { padding-block: clamp(3rem, 8vw, 6rem) clamp(2rem, 5vw, 3rem); }

.eyebrow {
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--oxide);
  margin: 0 0 1.4rem;
}

h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.1rem, 6.5vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: -.022em;
  margin: 0 0 .5rem;
  max-width: 22ch;
}

.subhead {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.15rem, 3vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--steel);
  margin: 0 0 2rem;
  max-width: 30ch;
}

.lede {
  font-size: clamp(1.02rem, 2vw, 1.16rem);
  line-height: 1.55;
  max-width: 56ch;
  margin: 0 0 2.2rem;
}

/* Faixa de dados — a assinatura da página.
   Cinco números crus, tratados como bloco de título de desenho. */
.datastrip {
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.datastrip div {
  padding: 1rem 1.1rem 1.15rem;
  border-right: 1px solid var(--rule);
}
.datastrip div:last-child { border-right: 0; }
.datastrip dt {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--steel);
  margin: 0 0 .45rem;
}
.datastrip dd {
  font-family: var(--mono);
  font-size: clamp(1.35rem, 3.2vw, 1.75rem);
  font-weight: 600;
  line-height: 1;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

/* --- Tipografia de conteúdo ------------------------------------------- */

h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.6vw, 2.1rem);
  line-height: 1.12;
  letter-spacing: -.015em;
  margin: 0 0 1.4rem;
  max-width: 24ch;
}

h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: .01em;
  margin: 2.2rem 0 .5rem;
}

p { max-width: var(--measure); margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--ink); text-decoration-color: var(--oxide); text-underline-offset: .18em; }

.note {
  font-size: .95rem;
  color: var(--steel);
  max-width: 60ch;
}

/* --- Painel: usado para o bloco de mistura interna --------------------- */

.panel {
  background: var(--milk);
  border-left: 3px solid var(--oxide);
  padding: clamp(1.5rem, 4vw, 2.4rem);
}
.panel h2 { margin-bottom: 1rem; }
.panel p { max-width: 60ch; }

/* --- Tabela de especificação: a assinatura ---------------------------- */

.spec {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: .84rem;
  font-variant-numeric: tabular-nums;
  margin: 1.5rem 0;
}
.spec caption {
  text-align: left;
  font-size: .7rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--steel);
  padding-bottom: .6rem;
}
.spec th, .spec td {
  border-bottom: 1px solid var(--rule);
  padding: .62rem .8rem .62rem 0;
  text-align: left;
  vertical-align: top;
}
.spec thead th {
  border-bottom: 1px solid var(--ink);
  font-weight: 600;
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
}
.spec tbody th { font-weight: 400; color: var(--steel); width: 34%; }
.spec tr:last-child td, .spec tr:last-child th { border-bottom: 1px solid var(--ink); }

.table-scroll { overflow-x: auto; }

/* --- Lista de materiais ----------------------------------------------- */

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: 0;
  margin: 1.4rem 0 0;
}
.chips li {
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .04em;
  border: 1px solid var(--rule);
  padding: .35rem .7rem;
  background: var(--paper);
}

/* --- Grade de mercados ------------------------------------------------ */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 0;
  border-top: 1px solid var(--ink);
}
.grid > article {
  padding: 1.6rem 1.6rem 1.8rem 0;
  border-bottom: 1px solid var(--rule);
  padding-right: 2rem;
}
.grid > article h3 { margin-top: 0; }
.grid > article p { font-size: .96rem; }

/* --- Rodapé ------------------------------------------------------------ */

footer {
  border-top: 2px solid var(--ink);
  padding-block: 2.5rem 3.5rem;
  font-size: .92rem;
}
.footgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}
footer h2 {
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--steel);
  margin: 0 0 .8rem;
}
footer address { font-style: normal; line-height: 1.65; }
.legal {
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: .74rem;
  color: var(--steel);
  line-height: 1.7;
}

/* --- Seletor de idioma ------------------------------------------------ */
/* Globo + nome de cada língua na própria língua. Bandeiras indicam país,
   não idioma (o espanhol da Argentina não é o da Espanha), por isso não são usadas. */

nav li.lang {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .35rem;
  color: var(--brand);
}
nav li.lang .globe { flex: none; margin-right: .15rem; }
nav li.lang a,
nav li.lang .cur {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .04em;
  text-transform: none;
  border: 1px solid var(--rule);
  padding: .22rem .55rem;
  color: var(--brand);
  text-decoration: none;
}
nav li.lang .cur { background: var(--brand); border-color: var(--brand); color: var(--paper); }
nav li.lang a:hover { border-color: var(--brand); background: var(--milk); }

@media (max-width: 640px) {
  nav li.lang { margin-left: 0; }
}

/* --- Tabelas de peças de reposição ------------------------------------ */
/* Códigos não quebram; no celular a tabela rola dentro de .table-scroll. */
.spec.parts { min-width: 620px; }
.spec.parts td:nth-child(2),
.spec.parts td:nth-child(3) { white-space: nowrap; }
.spec.parts td:nth-child(2) { font-weight: 600; }
.spec.famtab { min-width: 600px; }
.spec.famtab td:first-child { width: 44%; }
.spec.famtab td:nth-child(2) { font-weight: 600; }

/* --- Linhas de produto na página inicial ------------------------------ */
.grid.lines { margin-top: 1.4rem; }
.grid.lines h3 a { text-decoration: none; }
.grid.lines h3 a:hover { text-decoration: underline; text-decoration-color: var(--oxide); }
.grid.lines > article:first-child { background: var(--milk); border-left: 3px solid var(--oxide); padding-left: 1.2rem; }

/* Em telas largas, o seletor de idioma fica no canto superior direito, na altura do logo. */
@media (min-width: 960px) {
  .masthead .wrap { position: relative; padding-top: 3.4rem; }
  nav li.lang { position: absolute; top: .9rem; right: var(--gutter); }
}

/* --- Figuras esquemáticas -------------------------------------------- */
.figs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.6rem;
  margin: 2.4rem 0 0;
}
.figs figure { margin: 0; }
.figs img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  background: var(--paper);
}
.figs figcaption {
  font-family: var(--mono);
  font-size: .74rem;
  line-height: 1.6;
  color: var(--steel);
  margin-top: .65rem;
  max-width: 62ch;
}

/* --- Faixa de contatos e foto da fábrica ------------------------------- */

.topbar { background: var(--brand); color: #fff; font-size: .8125rem; line-height: 1.3; }
.topbar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .1rem 1.5rem; padding-block: .3rem; }
.topbar .loc { display: inline-flex; align-items: center; gap: .4rem; }
.topbar ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.4rem; }
.topbar a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; padding: .4rem 0; }
.topbar a:hover, .topbar a:focus-visible { text-decoration: underline; }
.topbar svg { flex: none; }
@media (max-width: 700px) {
  .topbar .loc { display: none; }
  .topbar .wrap { justify-content: center; }
  .topbar ul { gap: 0 .6rem; justify-content: center; flex-wrap: nowrap; }
  .topbar a { padding: .55rem .1rem; }
  .topbar .t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .topbar svg { width: 20px; height: 20px; }
}
.photo { margin: 1.6rem 0 0; max-width: 820px; }
.photo img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); background: var(--milk); }
.photo figcaption { font-family: var(--mono); font-size: .74rem; line-height: 1.6; color: var(--steel); margin-top: .5rem; }

/* --- Botão e formulário de consulta ------------------------------------ */

[hidden] { display: none !important; }
.btn { display: inline-block; background: var(--brand); color: #fff; padding: .8rem 1.5rem; border: 0; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover, .btn:focus-visible { background: var(--ink); color: #fff; }
.btn[disabled] { opacity: .6; cursor: wait; }
.formwrap { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .formwrap { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; } }
.formgrid { display: grid; gap: 1.1rem 1.4rem; grid-template-columns: minmax(0, 1fr); position: relative; }
@media (min-width: 640px) { .formgrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.field.wide { grid-column: 1 / -1; }
.field label { display: block; font-weight: 600; margin-bottom: .25rem; }
.field .hint { display: block; font-size: .82rem; color: var(--steel); margin-bottom: .3rem; line-height: 1.4; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=file], .field select, .field textarea {
  width: 100%; font: inherit; padding: .65rem .75rem; border: 1px solid var(--steel); background: #fff; color: var(--ink); border-radius: 0; }
.field input:focus, .field select:focus, .field textarea:focus, .btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.req { color: var(--brand); }
.profile { border: 0; padding: 0; margin: 0 0 1.4rem; }
.profile legend { font-weight: 600; margin-bottom: .4rem; padding: 0; }
.profile label { display: block; margin: .35rem 0; }
.notice { background: var(--milk); border-left: 3px solid var(--oxide); padding: 1rem 1.2rem; max-width: 60ch; }
.error { background: #fff2f0; border-left: 3px solid #b3261e; padding: .8rem 1rem; color: #7a1712; margin: 0 0 1rem; }
.consent label { font-weight: 400; display: flex; gap: .6rem; align-items: flex-start; }
.consent input { margin-top: .3rem; width: auto; flex: none; }

/* --- Aviso de cookies ---------------------------------------------------- */
#cookiebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #fff; border-top: 3px solid var(--brand); padding: 1rem 1.2rem; display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; align-items: center; justify-content: space-between; box-shadow: 0 -4px 16px rgba(0,0,0,.12); }
#cookiebar p { margin: 0; max-width: 60ch; }
#cookiebar .btn { padding: .6rem 1.2rem; }
