/* =========================================================
   Calstamp — Estamparia de Metal e Usinagem
   Folha de estilo principal
   ========================================================= */

:root {
  --navy: #13294B;
  --navy-deep: #0B1A31;
  --navy-mid: #2A3F63;
  --navy-line: #24375A;
  --red: #C4161C;
  --red-dark: #A31217;
  --ground: #F4F3F0;
  --white: #FFFFFF;
  --ink: #15181D;
  --muted: #4A515C;
  --line: #D9D6CF;
  --line-soft: #ECEAE5;
  --ph: #E3E0DA;
  --ph-ink: #5A606A;
  --on-dark: #C9D3E0;
  --on-dark-soft: #AFC0DA;

  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --pad-x: 64px;
  --section-y: 96px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.02;
  color: var(--navy);
}
p { margin: 0; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--red); color: var(--white); padding: 12px 16px; z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; color: var(--white); }

.container { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--pad-x); }

/* ---------- Tipografia utilitária ---------- */
.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
}
.eyebrow--light { color: #8FA3C0; }
.h2 { font-size: clamp(36px, 4.4vw, 52px); }
.lead { font-size: 17px; line-height: 1.65; color: var(--muted); max-width: 62ch; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.section-head > div { display: flex; flex-direction: column; gap: 12px; }
.link-strong { font-weight: 600; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body); font-weight: 600; font-size: 16px;
  padding: 16px 26px; text-decoration: none; border: 1px solid transparent;
  cursor: pointer; transition: background-color .15s ease, color .15s ease;
}
.btn--red { background: var(--red); color: var(--white); }
.btn--red:hover { background: var(--red-dark); color: var(--white); }
.btn--ghost-light { border-color: #8FA3C0; color: var(--white); font-weight: 500; }
.btn--ghost-light:hover { background: var(--white); color: var(--navy); }
.btn--ghost { border-color: var(--navy); color: var(--navy); font-weight: 500; }
.btn--ghost:hover { background: var(--navy); color: var(--white); }
.btn--white { background: var(--white); color: var(--red-dark); }
.btn--white:hover { background: var(--navy-deep); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- Cabeçalho ---------- */
.topbar { background: var(--navy-deep); color: #E6ECF4; font-size: 13px; }
.topbar .container { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar a { color: #E6ECF4; text-decoration: none; }
.topbar a:hover { color: var(--white); text-decoration: underline; }
.topbar__iso { font-family: var(--font-mono); letter-spacing: 0.08em; }

.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .container { min-height: 84px; display: flex; align-items: center; gap: 32px; }
.brand img { height: 72px; width: auto; }

.nav { flex: 1; align-self: stretch; display: flex; justify-content: center; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; }
.nav a {
  display: flex; align-items: center; height: 100%;
  padding-top: 3px; border-bottom: 3px solid transparent;
  font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none;
}
.nav a:hover { color: var(--red); }
.nav a[aria-current="page"] { color: var(--red); border-bottom-color: var(--red); }
.header-cta { font-size: 14px; padding: 14px 20px; white-space: nowrap; }

.menu-toggle {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--navy); color: var(--navy);
  font: 600 14px var(--font-body); padding: 10px 14px; cursor: pointer;
}

/* ---------- Hero das páginas internas ---------- */
.page-hero { background: var(--navy); color: var(--white); padding: 72px 0 64px; }
.page-hero .container { display: flex; flex-direction: column; gap: 16px; }
.breadcrumb { font-family: var(--font-mono); font-size: 13px; color: var(--on-dark-soft); }
.breadcrumb a { color: var(--on-dark-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--white); }
.page-hero h1 { color: var(--white); font-size: clamp(44px, 5.6vw, 68px); }
.page-hero p { font-size: 18px; color: #D5DEEA; max-width: 60ch; }

/* ---------- Espaço reservado para foto ---------- */
.ph {
  background: var(--ph); color: var(--ph-ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  text-align: center; padding: 16px;
}
.ph svg { width: 30px; height: 30px; }

/* ---------- Seções ---------- */
.section { padding: var(--section-y) 0; }
.section--white { background: var(--white); }
.section--dark { background: var(--navy-deep); color: var(--white); }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--tight-top { padding-top: 0; }

.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 20px; }

/* ---------- Home: hero ---------- */
.home-hero { background: var(--navy); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 640px; }
.home-hero__text { padding: 88px var(--pad-x); display: flex; flex-direction: column; justify-content: center; gap: 28px; color: var(--white); }
.home-hero h1 { color: var(--white); font-size: clamp(48px, 5.4vw, 76px); line-height: 0.98; }
.home-hero p { font-size: 19px; line-height: 1.55; color: #D5DEEA; max-width: 540px; }

/* ---------- Faixa de números ---------- */
.stats { background: var(--white); border-bottom: 1px solid var(--line); }
.stats .container { padding-top: 36px; padding-bottom: 36px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat strong { font-family: var(--font-display); font-weight: 700; font-size: clamp(36px, 3.4vw, 48px); line-height: 1; color: var(--navy); }
.stat--red strong { color: var(--red); }
.stat span { font-size: 15px; color: var(--muted); }

/* ---------- Cards ---------- */
.card { background: var(--white); border: 1px solid var(--line); display: flex; flex-direction: column; }
.card__body { padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 10px; }
.card__body h3 { font-size: 30px; }
.card__body p { font-size: 15px; line-height: 1.55; color: var(--muted); }
.card--cta { background: var(--red); border-color: var(--red); color: var(--white); text-decoration: none; padding: 32px 28px; justify-content: flex-end; gap: 12px; }
.card--cta:hover { background: var(--red-dark); color: var(--white); }
.card--cta strong { font-family: var(--font-display); font-size: 34px; line-height: 1; }
.card--cta span { font-size: 15px; }

/* Serviços (cards grandes) */
.service .card__body { padding: 32px 36px 36px; gap: 16px; }
.service h2 { font-size: 40px; }
.service p { font-size: 16px; }
.bullets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bullets li { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.bullets li::before { content: ""; width: 8px; height: 8px; background: var(--red); flex-shrink: 0; }
.service .link-strong { margin-top: 8px; }
.card--cta-lg { padding: 48px 44px; gap: 16px; }
.card--cta-lg strong { font-size: 52px; }
.card--cta-lg span { font-size: 18px; }
.card--cta-lg .fake-btn { align-self: flex-start; background: var(--white); color: var(--red-dark); font-weight: 600; padding: 18px 30px; margin-top: 8px; }

/* Home: blocos do potencial fabril */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tile { background: var(--navy); border: 1px solid var(--navy-line); padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.tile strong { font-family: var(--font-display); font-size: 34px; line-height: 1.05; }
.tile span { font-size: 14px; color: var(--on-dark); }
.section--dark .lead { color: var(--on-dark); }

/* Certificado */
.cert-card { background: var(--ground); border: 1px solid var(--line); padding: 48px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.cert-card strong { font-family: var(--font-display); font-size: clamp(52px, 5vw, 72px); line-height: 1; color: var(--navy); }
.cert-card small { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }

/* Logos de clientes */
.logos { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.logo-slot { height: 110px; background: var(--white); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; padding: 16px; }
.logo-slot img { width: auto; max-width: 100%; max-height: 100%; }
.logos--lg { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.logos--lg .logo-slot { height: 180px; padding: 24px; }

/* Faixa vermelha */
.cta-band { background: var(--red); color: var(--white); }
.cta-band .container { padding-top: 64px; padding-bottom: 64px; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { color: var(--white); font-size: clamp(34px, 3.6vw, 48px); }
.cta-band p { font-size: 18px; margin-top: 10px; }
.cta-box { background: var(--red); color: var(--white); padding: 48px 56px; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-box h2 { color: var(--white); font-size: clamp(32px, 3.2vw, 44px); }
.cta-box p { font-size: 17px; margin-top: 8px; }

/* ---------- Quem Somos ---------- */
.value-card { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--navy); padding: 36px; display: flex; flex-direction: column; gap: 14px; }
.value-card--red { border-top-color: var(--red); }
.value-card h3 { font-size: 32px; }
.value-card p, .value-card li { font-size: 16px; line-height: 1.65; color: var(--muted); }
.value-card ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.story .photo { height: 480px; }
.story p { font-size: 17px; line-height: 1.7; color: var(--muted); }

/* ---------- Potencial Fabril ---------- */
.sector-nav { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 84px; z-index: 40; }
.sector-nav .container { padding-top: 16px; padding-bottom: 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sector-nav__label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; color: var(--muted); margin-right: 8px; }
.chip { border: 1px solid var(--navy); color: var(--navy); text-decoration: none; font-size: 14px; font-weight: 500; padding: 9px 14px; }
.chip:hover { background: var(--navy); color: var(--white); }
.chip--red { border-color: var(--red); color: var(--red); }
.chip--red:hover { background: var(--red); color: var(--white); }

.sectors { display: flex; flex-direction: column; gap: 48px; padding: 72px 0 24px; }
.sector { background: var(--white); border: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 420px; scroll-margin-top: 170px; }
.sector__text { padding: 48px 56px; display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.sector__text h2 { font-size: clamp(40px, 4vw, 52px); line-height: 1; }
.sector__text p { font-size: 19px; line-height: 1.6; color: var(--ink); }
.highlights { display: flex; gap: 16px; flex-wrap: wrap; }
.highlight { flex: 1 1 160px; background: var(--ground); border-top: 3px solid var(--navy); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.highlight strong { font-family: var(--font-display); font-size: 36px; line-height: 1; color: var(--navy); }
.highlight span { font-size: 14px; color: var(--muted); }

/* ---------- Ferramentaria ---------- */
.step-card { background: var(--white); border: 1px solid var(--line); padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.step-card b { font-family: var(--font-display); font-size: 44px; line-height: 1; color: var(--red); }
.step-card h3 { font-size: 28px; }
.step-card p { font-size: 15px; line-height: 1.6; color: var(--muted); }
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.flow li { border-top: 3px solid var(--red); padding-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.flow small { font-family: var(--font-mono); font-size: 13px; color: #8FA3C0; }
.flow strong { font-family: var(--font-display); font-size: 26px; line-height: 1.1; }
.flow span { font-size: 14px; line-height: 1.5; color: var(--on-dark); }
.tag { font-family: var(--font-mono); font-size: 13px; color: var(--navy); background: #E6EBF2; padding: 10px 14px; }

.card.spec-card .photo { height: 340px; }
.spec-card .card__body { padding: 20px 24px 24px; gap: 12px; }
.spec-card h3 { font-size: 26px; }
.specs { margin: 0; }
.specs div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-family: var(--font-mono); text-align: right; }

/* ---------- Qualidade ---------- */
.cert-layout { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 72px; align-items: center; }
.cert-preview { height: 560px; background: var(--white); border: 1px solid var(--line); }
.cert-layout h2 { font-size: clamp(56px, 6vw, 80px); line-height: 1; }
.cert-details { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; max-width: 680px; }
.cert-details div { padding: 14px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.cert-details dt { font-size: 13px; color: var(--muted); }
.cert-details dd { margin: 0; font-family: var(--font-mono); font-size: 15px; }
.policy { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.policy li { display: flex; gap: 14px; font-size: 17px; line-height: 1.5; }
.policy li::before { content: ""; width: 10px; height: 10px; background: var(--red); flex-shrink: 0; margin-top: 8px; }
.card.inspect-card .photo { height: auto; aspect-ratio: 1 / 1; }
.inspect-card .card__body { padding: 20px 24px 24px; gap: 6px; }
.inspect-card h3 { font-size: 24px; }

/* ---------- Contato ---------- */
.contact-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; }
.form { background: var(--white); border: 1px solid var(--line); padding: 44px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 24px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; }
.field input, .field select, .field textarea {
  font: 15px var(--font-body); color: var(--ink);
  border: 1px solid #B9B5AC; background: var(--white); padding: 0 14px; height: 48px; border-radius: 0;
}
.field textarea { height: auto; padding: 14px; resize: vertical; }
.field input[type="file"] { border-style: dashed; padding: 11px 14px; font-size: 14px; }
.form .btn { grid-column: 1 / -1; justify-self: start; border: 0; padding: 18px 34px; }
.form-status { grid-column: 1 / -1; font-size: 15px; color: var(--navy); background: #E6EBF2; padding: 14px 16px; }
.form-status[hidden] { display: none; }
.contact-info { background: var(--navy); color: var(--white); padding: 40px; display: flex; flex-direction: column; gap: 22px; }
.contact-info div { display: flex; flex-direction: column; gap: 4px; }
.contact-info small { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; color: #8FA3C0; }
.contact-info a, .contact-info span { color: var(--white); font-size: 17px; text-decoration: none; }
.contact-info a:hover { text-decoration: underline; }
.map { display: block; width: 100%; height: 300px; border: 0; }

/* ---------- Rodapé ---------- */
.site-footer { background: var(--navy-deep); color: var(--on-dark); font-size: 14px; }
.site-footer .container { padding-top: 56px; padding-bottom: 28px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 48px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; line-height: 1.5; }
.footer-col h2 { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.14em; color: #8FA3C0; line-height: 1.4; }
.footer-col a { color: var(--white); text-decoration: none; }
.footer-col a:hover { text-decoration: underline; }
.footer-logo { align-self: flex-start; }
.footer-logo img { height: 68px; width: auto; }
.footer-btn { align-self: flex-start; border: 1px solid #4B628A; padding: 10px 14px; font-weight: 500; }
/* Redes sociais (Instagram / LinkedIn) - ficam abaixo do botao de certificado */
.social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.footer-col .social-link { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #4B628A; padding: 8px 12px; font-weight: 500; line-height: 1; }
.footer-col .social-link:hover { background: rgba(255,255,255,.07); text-decoration: none; }
.social-link svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.social-link svg .dot { fill: currentColor; stroke: none; }
.social-link--in svg { fill: currentColor; stroke: none; }
.social-link:focus-visible { outline: 2px solid #8FA3C0; outline-offset: 2px; }
.footer-bottom { border-top: 1px solid var(--navy-line); margin-top: 48px; padding-top: 20px; font-size: 13px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* =========================================================
   Responsivo
   ========================================================= */
@media (max-width: 1180px) {
  :root { --pad-x: 40px; }
  .nav ul { gap: 16px; }
  .nav a { font-size: 13px; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 32px; }
  .logos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  :root { --section-y: 72px; }
  .menu-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--white); border-bottom: 1px solid var(--line);
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: 8px var(--pad-x) 20px; }
  .nav a { height: auto; padding: 14px 0; border-bottom: 1px solid var(--line-soft); font-size: 16px; }
  .nav a[aria-current="page"] { border-bottom-color: var(--line-soft); }
  .site-header .container { position: relative; }
  .sector-nav { top: 84px; }

  .home-hero, .split, .sector, .cert-layout, .contact-layout { grid-template-columns: minmax(0, 1fr); }
  .home-hero__text { padding: 64px var(--pad-x); }
  .home-hero .photo { min-height: 280px; }
  .cert-preview { height: 420px; max-width: 420px; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats .container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { gap: 40px; }
}

@media (max-width: 720px) {
  :root { --pad-x: 20px; --section-y: 56px; }
  .topbar__iso { display: none; }
  .topbar .container { justify-content: center; text-align: center; padding-top: 8px; padding-bottom: 8px; }
  .brand img { height: 54px; }
  .site-header .container { min-height: 72px; }
  .sector-nav { position: static; }
  .grid--2, .grid--3, .grid--4, .tiles, .logos, .logos--lg, .form, .cert-details, .footer-grid, .flow { grid-template-columns: 1fr; }
  .stats .container { grid-template-columns: 1fr 1fr; gap: 24px; }
  .sector__text { padding: 32px 24px; }
  .form { padding: 24px; }
  .cta-box, .cert-card { padding: 32px 24px; }
  .card--cta-lg strong { font-size: 38px; }
  .service .card__body { padding: 24px; }
}

/* ---------- Fotos reais ---------- */
.photo { position: relative; overflow: hidden; background: var(--ph); min-width: 0; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .photo { height: 210px; }
.service .photo { height: 280px; }
.sector .photo { min-height: 300px; }
.sector .photo img, .home-hero .photo img { position: absolute; inset: 0; }
.sector:nth-child(even) > :first-child { order: 2; }
@media (max-width: 1024px) {
  .sector:nth-child(even) > :first-child { order: 0; }
  .sector .photo { min-height: 0; aspect-ratio: 16 / 10; }
}

/* Crédito do desenvolvedor no rodapé */
.footer-bottom .credit { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom .credit:hover { color: #FF4A50; }

/* Prévia do certificado ISO (PDF embutido, trocado pelo admin) */
.cert-preview--pdf { display: block; overflow: hidden; box-shadow: 0 18px 40px rgba(11, 26, 49, 0.12); }
.cert-preview--pdf object { display: block; width: 100%; height: 100%; border: 0; pointer-events: none; }
.cert-preview--pdf .ph { height: 100%; }
