/* ============================================================
   P3D Engenharia — design system
   Industrial escuro + amarelo-segurança
   ============================================================ */

:root {
  --graphite:   #0E0E10;
  --graphite-2: #16171A;
  --graphite-3: #1E2024;
  --yellow:     #F2C200;
  --yellow-deep:#C99F00;
  --text:       #FAFAFA;
  --text-dim:   #9A9CA3;
  --line:       rgba(255, 255, 255, 0.09);
  --line-strong:rgba(255, 255, 255, 0.16);

  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --display: "Archivo", "Inter", sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;

  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 4px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: var(--graphite);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--yellow); color: var(--graphite); }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

section { position: relative; padding-block: clamp(72px, 11vw, 140px); }

.section-kicker {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--yellow);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.section-kicker::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--yellow);
  display: inline-block;
}

h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; }

.section-title {
  font-size: clamp(30px, 4.6vw, 52px);
  max-width: 18ch;
  margin-bottom: 22px;
}
.section-lead {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--text-dim);
  max-width: 56ch;
  line-height: 1.65;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  font-weight: 700;
  padding: 15px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
  text-transform: uppercase;
}
.btn--primary { background: var(--yellow); color: var(--graphite); }
.btn--primary:hover { background: #ffd21a; transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--yellow); color: var(--yellow); transform: translateY(-2px); }
.btn svg { width: 15px; height: 15px; }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center;
  height: 76px;
  transition: background .35s var(--ease), border-color .35s var(--ease), height .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: rgba(14, 14, 16, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  height: 66px;
}
.header .wrap { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 26px; width: auto; }
.nav { display: flex; align-items: center; gap: 34px; }
.nav a {
  font-size: 14px; color: var(--text-dim);
  font-weight: 500; letter-spacing: 0.01em;
  transition: color .2s var(--ease); position: relative;
}
.nav a:hover { color: var(--text); }
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px; background: var(--yellow);
  transition: width .25s var(--ease);
}
.nav a:hover::after { width: 100%; }
.header-actions { display: flex; align-items: center; gap: 18px; }

.menu-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: .3s var(--ease); }
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero { min-height: 100svh; display: flex; align-items: flex-end; padding-bottom: clamp(48px, 8vh, 96px); padding-top: 120px; overflow: hidden; }
.hero-video-wrap { position: absolute; inset: 0; z-index: -2; }
.hero-video-wrap video, .hero-video-wrap img {
  width: 100%; height: 100%; object-fit: cover;
}
.hero-overlay {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(14,14,16,0.55) 0%, rgba(14,14,16,0.25) 35%, rgba(14,14,16,0.85) 78%, var(--graphite) 100%),
    linear-gradient(90deg, rgba(14,14,16,0.7) 0%, rgba(14,14,16,0.15) 60%);
}
.hero .wrap { width: 100%; }
.hero-kicker {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--yellow);
  display: flex; align-items: center; gap: 12px; margin-bottom: 26px;
}
.hero-kicker::before { content: ""; width: 36px; height: 1px; background: var(--yellow); }
.hero h1 {
  font-size: clamp(38px, 7vw, 88px);
  line-height: 0.98; max-width: 16ch; margin-bottom: 28px;
}
.hero h1 .hl { color: var(--yellow); }
.hero-sub { font-size: clamp(17px, 1.7vw, 21px); color: #d6d7da; max-width: 58ch; line-height: 1.6; margin-bottom: 38px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 56px; }

.clients-strip {
  display: flex; align-items: center; gap: clamp(20px, 4vw, 52px);
  flex-wrap: wrap; padding-top: 30px; border-top: 1px solid var(--line);
}
.clients-strip .lbl { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); }
.clients-strip .name { font-family: var(--display); font-weight: 700; font-size: clamp(15px, 1.5vw, 19px); color: #cfd0d4; letter-spacing: 0.02em; white-space: nowrap; }
@media (max-width: 880px) {
  .clients-strip { gap: 12px 20px; }
  .clients-strip .lbl { flex-basis: 100%; }
  .clients-strip .name { font-size: 15px; }
}

/* ============================================================
   SERVIÇOS / CONCEITOS
   ============================================================ */
.svc-head { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 64px; }
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.svc-card {
  background: var(--graphite); padding: 40px 34px 44px;
  transition: background .3s var(--ease); position: relative; min-height: 280px;
  display: flex; flex-direction: column;
}
.svc-card:hover { background: var(--graphite-2); }
.svc-num { font-family: var(--mono); font-size: 13px; color: var(--yellow); letter-spacing: 0.1em; margin-bottom: 26px; }
.svc-icon { width: 34px; height: 34px; color: var(--yellow); margin-bottom: 22px; }
.svc-card h3 { font-size: 22px; margin-bottom: 14px; }
.svc-card p { font-size: 15.5px; color: var(--text-dim); line-height: 1.62; }
.svc-card .tag { margin-top: auto; padding-top: 22px; font-family: var(--mono); font-size: 12px; color: #6f7177; letter-spacing: 0.04em; }
.svc-card .tag b { color: #c9cace; font-weight: 700; }

/* ============================================================
   OBRAS / PORTFOLIO
   ============================================================ */
.obras { background: var(--graphite-2); border-block: 1px solid var(--line); }
.obras-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 56px; }
.obra {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--graphite);
  min-height: 380px; display: flex; flex-direction: column; justify-content: flex-end;
  isolation: isolate;
}
.obra img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .7s var(--ease); filter: saturate(1.02); }
.obra::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(14,14,16,0.05) 0%, rgba(14,14,16,0.55) 55%, rgba(14,14,16,0.95) 100%); }
.obra:hover img { transform: scale(1.05); }
.obra-body { padding: 30px 30px 32px; }
.obra-client { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--yellow); margin-bottom: 12px; }
.obra h3 { font-size: 24px; margin-bottom: 10px; }
.obra p { font-size: 15px; color: #c4c5c9; line-height: 1.55; max-width: 44ch; }
.obra-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.obra-tags span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; color: var(--text-dim); border: 1px solid var(--line-strong); padding: 5px 10px; border-radius: 2px; }
.obra--wide { grid-column: span 2; min-height: 420px; }

/* ============================================================
   PROCESSO
   ============================================================ */
.proc-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 56px; }
.proc-step { background: var(--graphite); padding: 34px 26px 40px; position: relative; }
.proc-step .n { font-family: var(--mono); font-size: 30px; font-weight: 700; color: var(--graphite-3); -webkit-text-stroke: 1px var(--yellow); color: transparent; margin-bottom: 22px; display: block; }
.proc-step h4 { font-size: 17px; margin-bottom: 10px; }
.proc-step p { font-size: 14px; color: var(--text-dim); line-height: 1.55; }

/* ============================================================
   SOBRE / STATS
   ============================================================ */
.sobre-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.sobre p { color: var(--text-dim); font-size: 17px; line-height: 1.7; margin-bottom: 18px; }
.sobre p strong { color: var(--text); font-weight: 600; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.stat { background: var(--graphite-2); padding: 32px 28px; }
.stat .num { font-family: var(--display); font-weight: 800; font-size: clamp(34px, 4.4vw, 52px); color: var(--yellow); line-height: 1; letter-spacing: -0.03em; }
.stat .lbl { font-size: 14px; color: var(--text-dim); margin-top: 12px; line-height: 1.4; }

/* ============================================================
   CONTATO
   ============================================================ */
.contato { background: var(--graphite-2); border-top: 1px solid var(--line); }
.contato-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 80px); }
.contato h2 { font-size: clamp(30px, 4.4vw, 50px); margin-bottom: 20px; max-width: 14ch; }
.contato h2 .hl { color: var(--yellow); }
.contato-lead { color: var(--text-dim); font-size: 18px; line-height: 1.6; margin-bottom: 34px; max-width: 44ch; }
.contact-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; padding: 18px 0; border-top: 1px solid var(--line); }
.contact-item svg { width: 20px; height: 20px; color: var(--yellow); flex-shrink: 0; margin-top: 3px; }
.contact-item .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 4px; }
.contact-item .v { font-size: 16px; color: var(--text); }
.contact-item a.v:hover { color: var(--yellow); }

.form { display: flex; flex-direction: column; gap: 16px; }
.form label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); margin-bottom: -8px; }
.form input, .form textarea {
  background: var(--graphite); border: 1px solid var(--line-strong); color: var(--text);
  padding: 14px 16px; border-radius: var(--radius); font-family: var(--sans); font-size: 15px;
  transition: border-color .2s var(--ease); width: 100%;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--yellow); }
.form textarea { resize: vertical; min-height: 110px; }
.form .btn { justify-content: center; margin-top: 6px; }
.form-note { font-size: 12.5px; color: #6f7177; margin-top: 2px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { padding-block: 56px 34px; border-top: 1px solid var(--line); }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 44px; }
.footer .brand img { height: 30px; margin-bottom: 18px; }
.footer-tag { color: var(--text-dim); font-size: 15px; max-width: 36ch; line-height: 1.6; }
.footer-cols { display: flex; gap: clamp(40px, 6vw, 80px); flex-wrap: wrap; }
.footer-col h5 { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 16px; }
.footer-col a, .footer-col p { display: block; font-size: 14.5px; color: #c4c5c9; margin-bottom: 10px; line-height: 1.5; }
.footer-col a:hover { color: var(--yellow); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 26px; border-top: 1px solid var(--line); }
.footer-bottom p { font-size: 13px; color: #6f7177; }
.footer-bottom a { color: #6f7177; transition: color .2s var(--ease); }
.footer-bottom a:hover { color: var(--yellow); }

/* ============================================================
   PÁGINAS LEGAIS (privacidade / termos)
   ============================================================ */
.legal-header {
  position: sticky; top: 0; z-index: 100; height: 66px; display: flex; align-items: center;
  background: rgba(14,14,16,0.9); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.legal-header .wrap { display: flex; align-items: center; justify-content: space-between; }
.legal-header .brand img { height: 24px; }
.legal-header a.back { font-family: var(--mono); font-size: 13px; color: var(--text-dim); letter-spacing: .04em; }
.legal-header a.back:hover { color: var(--yellow); }

.legal { padding: clamp(56px, 9vw, 110px) 0 80px; }
.legal .wrap { max-width: 820px; }
.legal .kicker { font-family: var(--mono); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--yellow); margin-bottom: 18px; display: block; }
.legal h1 { font-size: clamp(32px, 5vw, 52px); margin-bottom: 16px; }
.legal .updated { font-family: var(--mono); font-size: 13px; color: var(--text-dim); margin-bottom: 48px; }
.legal h2 { font-size: clamp(20px, 2.4vw, 26px); margin: 44px 0 14px; padding-top: 26px; border-top: 1px solid var(--line); }
.legal h2:first-of-type { border-top: 0; padding-top: 0; }
.legal h3 { font-size: 18px; margin: 26px 0 10px; }
.legal p, .legal li { color: #c4c5c9; font-size: 16px; line-height: 1.72; margin-bottom: 14px; }
.legal ul { padding-left: 22px; margin-bottom: 14px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--yellow); text-decoration: underline; text-underline-offset: 3px; }
.legal a:hover { color: #ffd21a; }
.legal strong { color: var(--text); font-weight: 600; }
.legal .box { background: var(--graphite-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; margin: 22px 0; }
.legal .box p:last-child { margin-bottom: 0; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .scroll-hint .line { animation: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .proc-grid { grid-template-columns: repeat(2, 1fr); }
  .sobre-grid { grid-template-columns: 1fr; gap: 48px; }
  .contato-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav { position: fixed; inset: 66px 0 auto 0; flex-direction: column; align-items: flex-start;
    gap: 0; background: rgba(14,14,16,0.97); backdrop-filter: blur(16px); padding: 8px var(--gutter) 24px;
    border-bottom: 1px solid var(--line); transform: translateY(-120%); transition: transform .4s var(--ease); }
  .nav.open { transform: none; }
  .nav a { width: 100%; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .menu-toggle { display: block; }
  .header-actions .btn { display: none; }
  .svc-grid { grid-template-columns: 1fr; }
  .obras-grid { grid-template-columns: 1fr; }
  .obra--wide { grid-column: span 1; }
  .proc-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .hero { padding-top: 100px; }
}

/* ---- Floating WhatsApp ---- */
.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 950;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35), 0 0 0 0 rgba(37,211,102,0.5);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: wa-pulse 2.6s infinite;
}
.wa-float:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 30px rgba(0,0,0,0.45);
  color: #fff;
}
.wa-float svg { width: 32px; height: 32px; fill: #fff; }
@keyframes wa-pulse {
  0%   { box-shadow: 0 8px 24px rgba(0,0,0,0.35), 0 0 0 0 rgba(37,211,102,0.55); }
  70%  { box-shadow: 0 8px 24px rgba(0,0,0,0.35), 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 8px 24px rgba(0,0,0,0.35), 0 0 0 0 rgba(37,211,102,0); }
}
@media (prefers-reduced-motion: reduce) { .wa-float { animation: none; } }
@media (max-width: 600px) {
  .wa-float { right: 16px; bottom: 16px; width: 54px; height: 54px; }
  .wa-float svg { width: 30px; height: 30px; }
}
