/* ==========================================================================
   Sercon Soluções — sistema visual do site
   Derivado do Manual de Identidade Sercon 2026, revisão 01.
   Cada valor aqui tem página de origem no manual, anotada no comentário.
   Não altere um token sem conferir o manual: o site é aplicação, não fonte.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */

:root {
  /* Cor — manual p. 13. Azul é estrutura, vermelho é ênfase, grafite é texto. */
  --navy:      #262261;
  --red:       #ED1C24;
  --graphite:  #231F20;
  --gray:      #F1F1F2;
  --white:     #FFFFFF;

  /* Derivadas, só para régua e texto de apoio. Não são cores de marca. */
  --rule:      #DCD9D3;
  --muted:     #5C5C66;
  --navy-12:   rgba(38, 34, 97, 0.12);

  /* Grid — manual p. 16. Margem 1/12 da largura, 12 colunas,
     calha 1/2 da margem, linha de base 1/4 da margem. */
  --margin:    clamp(20px, 8.3333vw, 120px);
  --gutter:    calc(var(--margin) / 2);
  --baseline:  calc(var(--margin) / 4);
  --measure:   720px;          /* texto corrido ≤ 8 das 12 colunas */

  /* Ritmo vertical */
  --section:   clamp(64px, 9vw, 130px);

  /* Tipografia — manual p. 17.
     Rubik 600 com −3% de tracking em título, Rubik 400 a 1,55 em texto,
     IBM Plex Mono em dado e cota. */
  --font-sans: "Rubik", Arial, Helvetica, sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, "Courier New", monospace;

  --t-display: clamp(2.5rem, 5.6vw, 4.75rem);
  --t-h2:      clamp(1.9rem, 3.4vw, 3rem);
  --t-h3:      clamp(1.35rem, 1.9vw, 1.75rem);
  --t-body:    1.25rem;        /* 20 px — a referência lê 20; o site antigo lia 15 */
  --t-small:   1rem;
  --t-eyebrow: 0.8125rem;      /* 13 px */

  --lh-body:   1.55;           /* entrelinha fixada no manual */
  --lh-tight:  1.06;
}

/* --------------------------------------------------------------------------
   2. BASE
   -------------------------------------------------------------------------- */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--graphite);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.03em;     /* −3%, manual p. 17 */
  line-height: var(--lh-tight);
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: var(--t-display); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); line-height: 1.2; }

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

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--navy); color: var(--white); }

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--navy); color: var(--white);
  padding: 1rem 1.5rem; font-weight: 500;
}
.skip:focus { left: 0; }

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   3. LAYOUT
   -------------------------------------------------------------------------- */

.wrap {
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--margin);
}

.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * 0.7); }

.section--navy    { background: var(--navy);     color: var(--white); }
.section--graphite{ background: var(--graphite); color: var(--white); }
.section--gray    { background: var(--gray); }

:where(.section--navy, .section--graphite) a:not(.btn) { color: var(--white); }

/* Fio de abertura de seção — o único lugar onde o vermelho aparece sozinho */
.eyebrow {
  display: flex; align-items: center; gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: var(--t-eyebrow);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 calc(var(--baseline) * 1.5);
}
.eyebrow::before {
  content: "";
  width: 28px; height: 3px;
  background: var(--red);
  flex: 0 0 auto;
}
.hero .eyebrow,
.section--navy .eyebrow,
.section--graphite .eyebrow { color: rgba(255, 255, 255, 0.72); }

.lead {
  font-size: clamp(1.35rem, 2vw, 1.6rem);
  line-height: 1.42;
  font-weight: 400;
}

.muted { color: var(--muted); }
.section--navy .muted, .section--graphite .muted, .footer .muted { color: rgba(255, 255, 255, 0.72); }

.grid { display: grid; gap: var(--gutter); }
@media (min-width: 900px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .grid--split { grid-template-columns: 5fr 7fr; gap: calc(var(--gutter) * 2); align-items: start; }
}
@media (min-width: 620px) and (max-width: 899px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

/* --------------------------------------------------------------------------
   4. BOTÕES
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: var(--t-eyebrow);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1.05rem 1.9rem;
  border: 2px solid transparent;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
}

.btn--primary { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn--primary:hover, .btn--primary:focus-visible { background: var(--red); border-color: var(--red); }

.btn--ghost { background: transparent; color: var(--graphite); border-color: var(--graphite); }
.btn--ghost:hover, .btn--ghost:focus-visible { background: var(--graphite); color: var(--white); }

.btn--light { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn--light:hover, .btn--light:focus-visible { background: transparent; color: var(--white); }

.btn--outline-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.5); }
.btn--outline-light:hover, .btn--outline-light:focus-visible { border-color: var(--white); background: rgba(255,255,255,0.1); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: calc(var(--baseline) * 2); }

/* Link de texto com seta */
.link-arrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: var(--t-eyebrow); font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--red);
  transition: gap 0.18s ease;
}
.link-arrow:hover { gap: 0.9rem; }
.link-arrow::after { content: "→"; font-size: 1.1em; line-height: 1; }

/* --------------------------------------------------------------------------
   5. CABEÇALHO
   -------------------------------------------------------------------------- */

.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--rule);
}

.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--gutter);
  min-height: 104px;
}

/* Altura mínima da assinatura em tela: 64 px em positivo — manual p. 10 e p. 18.
   Não reduzir, nem em rolagem, nem no celular. */
.header__logo img { height: 64px; width: auto; }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2.1rem); }

.nav__link {
  font-size: var(--t-small);
  font-weight: 500;
  text-decoration: none;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: border-color 0.18s ease;
}
.nav__link:hover, .nav__link:focus-visible { border-bottom-color: var(--red); }
.nav__link[aria-current="page"] { border-bottom-color: var(--navy); }

.header__cta { display: none; }
@media (min-width: 1080px) { .header__cta { display: inline-flex; } }

/* Menu do celular: <details>, sem JavaScript */
.menu { display: none; }
.menu > summary {
  list-style: none; cursor: pointer;
  font-family: var(--font-mono); font-size: var(--t-eyebrow);
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.9rem 0;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu[open] > summary { color: var(--red); }
.menu__panel {
  position: absolute; left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  padding: var(--baseline) var(--margin) calc(var(--baseline) * 3);
  display: flex; flex-direction: column; gap: 0.25rem;
}
.menu__panel .nav__link { font-size: 1.15rem; padding: 0.75rem 0; border-bottom: 1px solid var(--rule); }
.menu__panel .btn { margin-top: 1rem; justify-content: center; }

@media (max-width: 899px) {
  .header__nav { display: none; }
  .menu { display: block; }
  .header__logo img { height: 64px; }
}

/* --------------------------------------------------------------------------
   6. ABERTURA (hero)
   -------------------------------------------------------------------------- */

.hero {
  background: var(--navy);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

/* Grafismo do módulo, manual p. 15: é o único elemento que pode sangrar
   pela margem. Diagonal de 34,2°, aresta externa. */
.hero__graphism {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background:
    linear-gradient(124.2deg, transparent 0 62%, rgba(255,255,255,0.05) 62% 100%),
    linear-gradient(124.2deg, transparent 0 78%, rgba(237,28,36,0.16) 78% 79.6%, transparent 79.6%);
}

.hero__inner {
  position: relative;
  padding-block: clamp(72px, 12vw, 152px);
  max-width: 980px;
}

.hero h1 { margin-bottom: calc(var(--baseline) * 2); }
.hero h1 em {
  font-style: normal;
  color: var(--white);
  /* sublinhado que respeita descendente: com border-bottom a linha corta o "p"
     de "operação" quando o título quebra no celular. */
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 0.075em;
  text-underline-offset: 0.17em;
  text-decoration-skip-ink: none;
}

.hero__lead { color: rgba(255,255,255,0.82); max-width: var(--measure); }

/* --------------------------------------------------------------------------
   7. NÚMEROS
   -------------------------------------------------------------------------- */

.figures { border-top: 1px solid var(--rule); }
.figures__grid { display: grid; gap: calc(var(--gutter) * 1.2); }
@media (min-width: 620px) { .figures__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .figures__grid { grid-template-columns: repeat(4, 1fr); } }

.figure { border-top: 3px solid var(--navy); padding-top: calc(var(--baseline) * 1.5); }
.figure:first-child { border-top-color: var(--red); }

/* Dado e cota em IBM Plex Mono — manual p. 17.
   É o que distingue a Sercon de quem usa display grotesca em número. */
.figure__value {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(2.75rem, 5.2vw, 4.25rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--navy);
  display: block;
}
.figure__label {
  font-size: var(--t-small);
  font-weight: 500;
  margin-top: 0.6rem;
  display: block;
  max-width: 15ch;
}
.figure__ref {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: 0.5rem;
  display: block;
}

/* --------------------------------------------------------------------------
   8. DIVISÕES E FRENTES
   -------------------------------------------------------------------------- */

.division + .division { margin-top: calc(var(--section) * 0.8); }

.division__head { max-width: var(--measure); margin-bottom: calc(var(--baseline) * 1.9); }
.division__head h2 { margin-bottom: calc(var(--baseline) * 0.9); }

.fronts { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
@media (min-width: 720px)  { .fronts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .fronts { grid-template-columns: repeat(3, 1fr); } }

.front {
  background: var(--white);
  padding: calc(var(--baseline) * 1.5);
  display: flex; flex-direction: column; gap: 0.55rem;
}
.front__n {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  color: var(--navy);
}
.front h3 { margin: 0; }
.front p { font-size: 1.0625rem; line-height: 1.5; color: var(--muted); margin: 0; }

/* --------------------------------------------------------------------------
   9. MÉTODO — as 10 etapas
   -------------------------------------------------------------------------- */

.steps { counter-reset: step; display: grid; gap: 0; }
@media (min-width: 760px)  { .steps { grid-template-columns: repeat(2, 1fr); column-gap: calc(var(--gutter) * 2); } }
@media (min-width: 1180px) { .steps { grid-template-columns: repeat(2, 1fr); } }

.step {
  counter-increment: step;
  display: grid; grid-template-columns: 3.5rem 1fr; gap: 1.1rem;
  padding: calc(var(--baseline) * 0.95) 0;
  border-top: 1px solid var(--navy-12);
  align-items: baseline;
}
.section--navy .step { border-top-color: rgba(255,255,255,0.18); }

.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--navy);
}
.section--navy .step::before, .section--graphite .step::before { color: rgba(255,255,255,0.85); }
.step h3 { font-size: 1.1875rem; margin-bottom: 0.3rem; }
.step p { font-size: 1rem; line-height: 1.5; margin: 0; }

/* --------------------------------------------------------------------------
   10. OBRAS
   -------------------------------------------------------------------------- */

.works { display: grid; gap: calc(var(--gutter) * 1.2); }
@media (min-width: 680px)  { .works { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .works { grid-template-columns: repeat(4, 1fr); } }

.work { display: flex; flex-direction: column; text-decoration: none; }

.work__img {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--gray);
}
.work__img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.work:hover .work__img img { transform: scale(1.04); }

/* Marca d'água — manual p. 15: símbolo isolado, branco, inferior direita,
   4% da altura da imagem, 70% de opacidade. */
.work__img::after {
  content: "";
  position: absolute; right: 4%; bottom: 4%;
  width: calc(4% * 0.688 * 3);     /* proporção do símbolo 190,92 × 277,34 */
  aspect-ratio: 190.92 / 277.34;
  background: url("../img/marca/sercon-simbolo-branco.svg") no-repeat center / contain;
  opacity: 0.7;
  min-width: 14px;
}

.work__body { padding-top: 1.1rem; border-top: 3px solid var(--navy); margin-top: 1.1rem; }
.work__client {
  font-family: var(--font-mono);
  font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--navy);
  display: block; margin-bottom: 0.45rem;
}
.work__title { font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.work__meta { font-size: 0.9375rem; color: var(--muted); margin-top: 0.5rem; }

/* --------------------------------------------------------------------------
   11. CARTEIRA
   -------------------------------------------------------------------------- */

.roster {
  display: flex; flex-wrap: wrap; gap: 0.5rem 0;
  max-width: none;
}
.roster li {
  font-size: 1.0625rem;
  padding: 0.35rem 0;
}
.roster li::after {
  content: "·";
  margin: 0 0.75rem;
  color: var(--muted);
}
.roster li:last-child::after { content: ""; margin: 0; }

/* --------------------------------------------------------------------------
   12. CONFORMIDADE
   -------------------------------------------------------------------------- */

.norms { display: grid; gap: 1px; background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.18); }
@media (min-width: 620px) { .norms { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .norms { grid-template-columns: repeat(4, 1fr); } }

.norm { background: var(--navy); padding: calc(var(--baseline) * 1.6); }
.norm__code {
  font-family: var(--font-mono);
  font-size: 1.375rem; font-weight: 500; letter-spacing: 0.02em;
  display: block; margin-bottom: 0.4rem;
}
.norm__what { font-size: 0.9375rem; line-height: 1.45; color: rgba(255,255,255,0.78); }

/* --------------------------------------------------------------------------
   13. CONTATO
   -------------------------------------------------------------------------- */

.contact-list { display: grid; gap: calc(var(--baseline) * 2); }
@media (min-width: 720px) { .contact-list { grid-template-columns: repeat(2, 1fr); } }

.contact-item { border-top: 3px solid var(--red); padding-top: calc(var(--baseline) * 1.2); }
.contact-item__label {
  font-family: var(--font-mono);
  font-size: var(--t-eyebrow); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
  display: block; margin-bottom: 0.5rem;
}
.contact-item__value { font-size: clamp(1.15rem, 1.8vw, 1.5rem); font-weight: 500; letter-spacing: -0.02em; }
.contact-item__value a { text-decoration: none; border-bottom: 2px solid var(--navy-12); }
.contact-item__value a:hover { border-bottom-color: var(--red); }

.form { display: grid; gap: calc(var(--baseline) * 1.4); max-width: 640px; }
.field { display: grid; gap: 0.45rem; }
.field label { font-size: var(--t-small); font-weight: 500; }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 1.0625rem;
  padding: 0.85rem 1rem;
  border: 2px solid var(--rule);
  background: var(--white);
  color: var(--graphite);
  border-radius: 0;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--navy); outline: none;
}
.field textarea { min-height: 140px; resize: vertical; }
.field__hint { font-size: 0.875rem; color: var(--muted); }

/* --------------------------------------------------------------------------
   14. RODAPÉ
   -------------------------------------------------------------------------- */

.footer { background: var(--graphite); color: var(--white); padding-block: var(--section) calc(var(--baseline) * 4); }
.footer a { color: rgba(255,255,255,0.8); text-decoration: none; }
.footer a:hover { color: var(--white); text-decoration: underline; }

.footer__top { display: grid; gap: calc(var(--gutter) * 1.5); }
@media (min-width: 900px) { .footer__top { grid-template-columns: 4fr 3fr 4fr; } }

/* Em fundo escuro a assinatura é branca — manual p. 09. */
.footer__logo img { height: 64px; width: auto; margin-bottom: calc(var(--baseline) * 1.5); }

.footer__title {
  font-family: var(--font-mono);
  font-size: var(--t-eyebrow); letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 1rem;
}
.footer__list li { margin-bottom: 0.6rem; font-size: 1.0625rem; }

.footer__bottom {
  margin-top: calc(var(--section) * 0.6);
  padding-top: calc(var(--baseline) * 1.5);
  border-top: 1px solid rgba(255,255,255,0.18);
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; justify-content: space-between;
  font-size: 0.9375rem; color: rgba(255,255,255,0.6);
}

/* --------------------------------------------------------------------------
   15. BOTÃO FLUTUANTE DE WHATSAPP
   -------------------------------------------------------------------------- */

.wa {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--navy); color: var(--white);
  padding: 0.95rem 1.35rem;
  text-decoration: none;
  font-size: var(--t-eyebrow); font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  box-shadow: 0 6px 24px rgba(0,0,0,0.22);
  transition: background-color 0.18s ease;
}
.wa:hover { background: var(--red); }
.wa svg { width: 20px; height: 20px; fill: currentColor; }
@media (max-width: 520px) { .wa span { display: none; } .wa { padding: 1rem; border-radius: 0; } }

/* --------------------------------------------------------------------------
   16. IMPRESSÃO
   -------------------------------------------------------------------------- */

@media print {
  .header, .wa, .btn, .menu { display: none !important; }
  body { font-size: 11pt; color: #000; }
  .section--navy, .section--graphite, .norm { background: #fff !important; color: #000 !important; }
}
