/* Plano Peças Usinagem — sistema travado em design.md (direção 2 "Fábrica à mostra").
 * Desenhado por referência do nicho; do Hallmark vale só o piso técnico
 * (mobile 320–768 sem rolagem lateral, contraste AA, honest-copy, LCP sem lazy, reduced-motion).
 */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/geist-latin.woff2") format("woff2");
}

:root {
  /* superfícies escuras (padrão) */
  --bg:        #111213;
  --bg-2:      #0B0C0D;
  --ink:       #F4F2EF;
  --muted:     #B4B1AC;
  --line:      rgba(244, 242, 239, .16);

  /* superfície clara (variante) */
  --paper:       #F4F2EF;
  --paper-ink:   #111213;
  --paper-muted: #55524E;
  --paper-line:  #DAD6D1;

  /* marca */
  --accent:       #F15C18;
  --accent-hover: #FF7434;
  --on-accent:    #16110E;

  /* véus da foto (derivados de --bg-2) */
  --veil-strong: rgba(11, 12, 13, .94);
  --veil-mid:    rgba(11, 12, 13, .80);
  --veil-soft:   rgba(11, 12, 13, .30);
  --veil-clear:  rgba(11, 12, 13, 0);

  /* tipo */
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* raio, movimento, ritmo */
  --radius: 6px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur-short: 120ms;
  --section-y: clamp(72px, 8vw, 120px);

  --focus: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { font-style: normal; margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { width: min(1200px, 100% - 48px); margin-inline: auto; }
@media (max-width: 480px) { .wrap { width: calc(100% - 32px); } }

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

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 50;
  background: var(--ink); color: var(--paper-ink);
  padding: 10px 16px; border-radius: var(--radius); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 16px; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: var(--on-accent);
  font-weight: 600; font-size: 16px; line-height: 1.2;
  padding: 15px 24px; border-radius: var(--radius);
  text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur-short) var(--ease-out);
}
.btn:hover { background: var(--accent-hover); }
.btn--sm { padding: 10px 16px; font-size: 15px; }
.btn svg { width: 20px; height: 20px; flex: none; fill: currentColor; }

.ghost {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); font-weight: 500; font-size: 16px; line-height: 1.2;
  padding: 14px 22px; border-radius: var(--radius);
  border: 1px solid var(--line); text-decoration: none; white-space: nowrap;
  transition: border-color var(--dur-short) var(--ease-out);
}
.ghost:hover { border-color: var(--ink); }

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(620px, 92vh, 820px);
  display: flex; flex-direction: column;
}
.hero__photo {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%;
  animation: hero-zoom 1.4s var(--ease-out) both;
}
@keyframes hero-zoom { from { transform: scale(1.05); } to { transform: scale(1); } }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, var(--veil-strong) 0%, var(--veil-mid) 42%, var(--veil-soft) 100%),
    linear-gradient(0deg, var(--veil-strong) 0%, var(--veil-clear) 38%);
}

.nav .wrap { display: flex; align-items: center; gap: 32px; min-height: 84px; }
.nav__logo { flex: none; }
.nav__logo img { height: 54px; width: auto; }
.nav ul { display: flex; gap: 28px; margin-right: auto; font-size: 15px; }
.nav ul a { color: var(--muted); text-decoration: none; transition: color var(--dur-short) var(--ease-out); }
.nav ul a:hover { color: var(--ink); }

.hero__content { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 56px 0 48px; }
.hero h1 {
  font-weight: 700; font-size: clamp(2.3rem, 3.6vw + 1rem, 4.5rem);
  line-height: 1.02; letter-spacing: -.035em; max-width: 15ch;
  overflow-wrap: anywhere; min-width: 0; margin-bottom: 22px; text-wrap: balance;
}
.hero__lede { font-size: 19px; color: var(--muted); max-width: 52ch; margin-bottom: 34px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.stats { border-top: 1px solid var(--line); }
.stats .wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: start; }
.stat { padding: 22px 24px 26px 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat b {
  display: block; font-weight: 600; font-size: clamp(2rem, 2vw + 1rem, 2.75rem);
  letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums;
}
.stat span { display: block; margin-top: 8px; font-size: 14px; color: var(--muted); max-width: 22ch; }
.stats .cap { padding: 26px 0 0 24px; text-align: right; max-width: 24ch; }

.cap { font-size: 13px; line-height: 1.45; color: var(--muted); }

/* ---------- faixa de clientes ---------- */
.proof { background: var(--bg-2); }
.proof .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 56px; min-height: 112px; padding: 24px 0; }
.proof p { font-size: 15px; color: var(--muted); }
.logos { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 52px; }
.logos img { height: 26px; width: auto; filter: brightness(0) invert(1); opacity: .82; }
.logos img.logo-mili { height: 34px; }

/* ---------- seções ---------- */
.section { padding: var(--section-y) 0; }
.section--paper {
  --focus: var(--paper-ink);
  background: var(--paper); color: var(--paper-ink);
}
.section--paper .cap { color: var(--paper-muted); }
.section--deep { background: var(--bg-2); }

.h2 {
  font-weight: 700; font-size: clamp(1.8rem, 2vw + 1rem, 2.75rem);
  line-height: 1.08; letter-spacing: -.03em; max-width: 22ch;
  overflow-wrap: anywhere; min-width: 0; text-wrap: balance;
}
.lead { font-size: 18px; color: var(--muted); max-width: 56ch; }
.section--paper .lead { color: var(--paper-muted); }
.section__head { display: grid; gap: 18px; margin-bottom: clamp(36px, 4vw, 56px); }

/* ---------- projetos ---------- */
.gallery {
  display: grid; gap: 20px;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}
.gallery figure { margin: 0; display: grid; grid-template-rows: 1fr auto; gap: 10px; min-width: 0; }
.gallery__img { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--paper-line); }
.gallery__img img { width: 100%; height: 100%; object-fit: cover; }
.gallery figure:not(.gallery__big) .gallery__img { aspect-ratio: 4 / 3; }
.gallery__big { grid-row: span 2; }
.gallery__big .gallery__img { min-height: 320px; }
.gallery__big .gallery__img img { position: absolute; inset: 0; }

.clients { margin-top: clamp(56px, 6vw, 88px); }
.clients h3 {
  font-weight: 700; font-size: clamp(1.35rem, 1vw + 1rem, 1.75rem);
  letter-spacing: -.02em; line-height: 1.15; margin-bottom: 28px;
}
.clients ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.clients li { border-top: 2px solid var(--paper-ink); padding-top: 18px; }
.clients h4 { font-weight: 700; font-size: 20px; letter-spacing: -.01em; margin-bottom: 8px; }
.clients p { color: var(--paper-muted); }

/* ---------- serviços ---------- */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
.service { border-top: 1px solid var(--line); padding: 28px 0 36px; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 0 16px; }
.service__n { color: var(--accent); font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; padding-top: 4px; }
.service h3 { font-weight: 600; font-size: 21px; letter-spacing: -.015em; line-height: 1.25; margin-bottom: 10px; }
.service p { color: var(--muted); max-width: 46ch; }

.materials { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.materials p { font-size: 15px; color: var(--muted); margin-right: 8px; }
.materials ul { display: flex; flex-wrap: wrap; gap: 10px; }
.materials li {
  font-size: 15px; font-weight: 500; padding: 7px 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
}

/* ---------- sobre ---------- */
.about { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(36px, 5vw, 80px); align-items: center; }
.about__text .h2 { margin-bottom: 24px; }
.about__text p + p { margin-top: 18px; }
.about__text p { font-size: 18px; max-width: 56ch; }
.about figure { margin: 0; display: grid; gap: 10px; }
.about figure img { border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* ---------- faq ---------- */
.faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 22px 0; font-weight: 600; font-size: 19px; letter-spacing: -.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 14px; height: 14px;
  background:
    linear-gradient(var(--accent), var(--accent)) center / 14px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) center / 2px 14px no-repeat;
  transition: transform var(--dur-short) var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding: 0 40px 24px 0; max-width: 60ch; }

/* ---------- contato ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(40px, 5vw, 80px); align-items: end; }
.contact .h2 { font-size: clamp(2rem, 2.6vw + 1rem, 3.25rem); max-width: 18ch; margin-bottom: 18px; }
.contact .lead { margin-bottom: 32px; }
.contact dl { margin: 0; display: grid; gap: 18px; }
.contact dl div { border-top: 1px solid var(--line); padding-top: 14px; }
.contact dt { font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.contact dd { margin: 0; font-size: 17px; }
.contact dd a { text-decoration: none; border-bottom: 1px solid var(--line); transition: border-color var(--dur-short) var(--ease-out); }
.contact dd a:hover { border-color: var(--ink); }
.contact dd a.map { display: inline-block; margin-top: 6px; font-size: 15px; color: var(--muted); }

/* ---------- rodapé ---------- */
.footer { background: var(--bg-2); border-top: 1px solid var(--line); padding: 36px 0 104px; }
.footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; }
.footer img { height: 40px; width: auto; }
.footer p { font-size: 14px; color: var(--muted); }

/* ---------- WhatsApp flutuante ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
  transition: background-color var(--dur-short) var(--ease-out);
}
.wa-float:hover { background: var(--accent-hover); }
.js-fab .wa-float { opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s linear 200ms, background-color var(--dur-short) var(--ease-out); }
.js-fab .wa-float.is-on { opacity: 1; visibility: visible; transform: none;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s, background-color var(--dur-short) var(--ease-out); }
.wa-float svg { width: 28px; height: 28px; fill: currentColor; }

/* ---------- responsivo ---------- */
@media (max-width: 960px) {
  .nav ul { display: none; }
  .nav .wrap { justify-content: space-between; }
  .stats .wrap { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats .cap { display: none; }
  .services { grid-template-columns: minmax(0, 1fr); }
  .about, .faq, .contact { grid-template-columns: minmax(0, 1fr); }
  .contact { align-items: start; }
  .clients ul { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 720px) {
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .gallery__big { grid-row: auto; }
  .gallery__big .gallery__img { min-height: 0; aspect-ratio: 4 / 3; }
}
@media (max-width: 600px) {
  .nav__logo img { height: 44px; }
  .hero__lede { font-size: 17px; }
  .hero::before {
    background: linear-gradient(0deg, rgba(11, 12, 13, .96) 0%, rgba(11, 12, 13, .84) 55%, rgba(11, 12, 13, .70) 100%);
  }
  .stats .wrap { grid-template-columns: minmax(0, 1fr); }
  .stat, .stat + .stat { padding: 16px 0; border-left: 0; border-top: 1px solid var(--line); }
  .stat:first-child { border-top: 0; }
  .proof .wrap { gap: 16px 40px; }
  .logos { gap: 20px 36px; }
  .service { grid-template-columns: minmax(0, 1fr); }
  .service__n { padding: 0 0 8px; }
  .faq summary { font-size: 17px; }
  .faq details p { padding-right: 0; }
}
@media (max-width: 380px) {
  .btn--sm { padding: 9px 12px; font-size: 14px; }
  .nav__logo img { height: 40px; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__photo { animation: none; }
  .btn, .ghost, .nav ul a, .wa-float, .js-fab .wa-float, .js-fab .wa-float.is-on, .faq summary::after, .contact dd a { transition: none; }
}
