/* ============================================================
   ROM — Design System (Construções & Engenharia)
   HTML/CSS/JS puro — sem build
   ============================================================ */

:root {
  --black: #0e0e10;
  --black-soft: #16171a;
  --ink: #1d1f24;
  --gray-900: #1f2329;
  --gray-700: #3a3f47;
  --gray-500: #6b7280;
  --gray-300: #c9ced6;
  --gray-100: #f1f3f6;
  --concrete: #e7e3dc;
  --white: #ffffff;
  --gold: #f4b82b;
  --gold-deep: #d99a13;
  --gold-soft: #fff4d6;

  --accent: var(--gold);
  --accent-deep: var(--gold-deep);

  --radius: 16px;
  --radius-lg: 22px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(14,14,16,.06), 0 2px 8px rgba(14,14,16,.05);
  --shadow: 0 10px 30px rgba(14,14,16,.10);
  --shadow-lg: 0 24px 60px rgba(14,14,16,.18);
  --container: 1180px;
  --header-h: 76px;

  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --display: "Sora", "Inter", system-ui, sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* engenharia theme variant overrides accent to a steel/blue tone */
[data-brand="engenharia"] {
  --accent: #2f6df0;
  --accent-deep: #1f4fbf;
  --gold-soft: #e9f0ff;
}

* { box-sizing: border-box; }

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

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

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

h1, h2, h3 { font-family: var(--display); line-height: 1.1; letter-spacing: -.02em; margin: 0; font-weight: 700; }
p { margin: 0; }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-deep);
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--accent);
  display: inline-block;
}
.eyebrow--light { color: var(--gold); }

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--tight { padding: clamp(48px, 6vw, 80px) 0; }
.section__head { max-width: 720px; margin-bottom: 48px; }
.section__head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin: 14px 0 16px; }
.section__head p { color: var(--gray-500); font-size: 1.08rem; }
.section--dark { background: var(--black); color: var(--white); }
.section--dark .section__head p { color: var(--gray-300); }
.section--alt { background: var(--gray-100); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--accent);
  --btn-fg: var(--black);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  padding: 15px 26px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
  box-shadow: 0 8px 22px rgba(244,184,43,.28);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(244,184,43,.38); }
.btn:active { transform: translateY(0); }
.btn svg { width: 20px; height: 20px; }
.btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.35);
  box-shadow: none;
}
.btn--ghost:hover { background: rgba(255,255,255,.10); box-shadow: none; }
.btn--dark { background: var(--black); color: var(--white); box-shadow: var(--shadow); }
.btn--dark:hover { box-shadow: var(--shadow-lg); }
.btn--lg { padding: 18px 34px; font-size: 1.08rem; }
.btn--block { width: 100%; }

[data-brand="engenharia"] .btn { box-shadow: 0 8px 22px rgba(47,109,240,.30); --btn-fg: #fff; }
[data-brand="engenharia"] .btn:hover { box-shadow: 0 14px 30px rgba(47,109,240,.42); }

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background .3s, box-shadow .3s, backdrop-filter .3s;
}
.header__inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.header.is-scrolled {
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(160%) blur(12px);
  box-shadow: var(--shadow-sm);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand__logo {
  width: 44px; height: 44px; border-radius: 12px; object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.brand__name { font-family: var(--display); font-weight: 800; font-size: 1.18rem; line-height: 1; color: var(--white); letter-spacing: -.01em; }
.brand__tag { display: block; font-family: var(--font); font-weight: 600; font-size: .64rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-top: 4px; }
.header.is-scrolled .brand__name { color: var(--ink); }
[data-brand="engenharia"] .brand__tag { color: var(--accent); }

.nav { display: flex; align-items: center; gap: 30px; }
.nav__links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  font-weight: 600; font-size: .96rem; color: rgba(255,255,255,.9);
  position: relative; padding: 4px 0; transition: color .2s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--accent); transition: width .25s var(--ease);
}
.nav__links a:hover::after { width: 100%; }
.header.is-scrolled .nav__links a { color: var(--gray-700); }
.header.is-scrolled .nav__links a:hover { color: var(--ink); }

.nav__cta { display: inline-flex; }
.nav__toggle {
  display: none; width: 46px; height: 46px; border: none; background: rgba(255,255,255,.12);
  border-radius: 12px; cursor: pointer; position: relative;
}
.header.is-scrolled .nav__toggle { background: var(--gray-100); }
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 2px;
  background: var(--white); transform: translate(-50%,-50%); transition: .25s var(--ease);
}
.header.is-scrolled .nav__toggle span,
.header.is-scrolled .nav__toggle span::before,
.header.is-scrolled .nav__toggle span::after { background: var(--ink); }
.nav__toggle span::before { transform: translate(-50%,-8px); }
.nav__toggle span::after { transform: translate(-50%,6px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  color: var(--white);
  padding-top: var(--header-h);
  overflow: hidden;
  background: var(--black);
}
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center 38%;
  transform: scale(1.06);
  animation: heroZoom 18s ease-out forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(105deg, rgba(8,8,10,.92) 0%, rgba(8,8,10,.78) 38%, rgba(8,8,10,.30) 72%, rgba(8,8,10,.55) 100%);
}
.hero__overlay::after {
  content:""; position:absolute; inset:0;
  background: radial-gradient(120% 80% at 80% 110%, rgba(244,184,43,.18), transparent 55%);
}
[data-brand="engenharia"] .hero__overlay::after { background: radial-gradient(120% 80% at 80% 110%, rgba(47,109,240,.22), transparent 55%); }

.hero__inner { position: relative; z-index: 2; width: 100%; }
.hero__content { max-width: 760px; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
  padding: 8px 16px; border-radius: 999px;
  font-size: .82rem; font-weight: 600; letter-spacing: .02em;
  margin-bottom: 26px;
}
.hero__badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(244,184,43,.25); }
[data-brand="engenharia"] .hero__badge .dot { box-shadow: 0 0 0 4px rgba(47,109,240,.25); }

.hero h1 {
  font-size: clamp(2.4rem, 5.6vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -.03em;
  margin-bottom: 22px;
  text-wrap: balance;
}
.hero h1 .hl { color: var(--accent); }
.hero__sub {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: rgba(255,255,255,.85);
  max-width: 620px;
  margin-bottom: 34px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 44px; }

.hero__proof { display: flex; flex-wrap: wrap; gap: 14px 38px; align-items: center; }
.proof-item { display: flex; flex-direction: column; }
.proof-item strong { font-family: var(--display); font-size: 1.7rem; line-height: 1; }
.proof-item span { font-size: .82rem; color: rgba(255,255,255,.72); margin-top: 4px; }
.proof-sep { width: 1px; height: 38px; background: rgba(255,255,255,.20); }

.hero__scroll {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 2; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255,255,255,.6); display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hero__scroll .mouse { width: 22px; height: 36px; border: 2px solid rgba(255,255,255,.5); border-radius: 12px; position: relative; }
.hero__scroll .mouse::after { content:""; position:absolute; left:50%; top:7px; width:3px; height:7px; background: var(--accent); border-radius:2px; transform: translateX(-50%); animation: scrollDot 1.6s infinite; }
@keyframes scrollDot { 0%{opacity:0; transform: translate(-50%,0);} 40%{opacity:1;} 80%{opacity:0; transform: translate(-50%,10px);} 100%{opacity:0;} }

/* ---------- Trust strip ---------- */
.trust {
  background: var(--black-soft);
  color: var(--white);
  border-top: 1px solid rgba(255,255,255,.06);
}
.trust__row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 26px 0; }
.trust__item { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: .95rem; }
.trust__item svg { width: 26px; height: 26px; color: var(--accent); flex: none; }

/* ---------- Services ---------- */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
  position: relative;
  overflow: hidden;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--gold-soft); }
.card__icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: grid; place-items: center; margin-bottom: 20px;
  background: var(--gold-soft); color: var(--accent-deep);
}
.card__icon svg { width: 28px; height: 28px; }
.card h3 { font-size: 1.28rem; margin-bottom: 10px; }
.card p { color: var(--gray-500); font-size: .98rem; }
.card__tag { margin-top: 16px; font-size: .82rem; font-weight: 700; color: var(--accent-deep); display: inline-flex; align-items:center; gap:6px; }

/* ---------- Why / features ---------- */
.why { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.why__media { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.why__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/5; }
.why__media .stamp {
  position: absolute; left: 20px; bottom: 20px; right: 20px;
  background: rgba(14,14,16,.72); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff; padding: 16px 18px; border-radius: 14px;
  display: flex; align-items: center; gap: 14px;
}
.why__media .stamp strong { font-family: var(--display); font-size: 1.5rem; color: var(--gold); }
[data-brand="engenharia"] .why__media .stamp strong { color: #9bc0ff; }

.feature-list { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 22px; }
.feature-list li { display: flex; gap: 16px; }
.feature-list .fi {
  width: 44px; height: 44px; flex: none; border-radius: 12px;
  background: var(--black); color: var(--accent); display: grid; place-items: center;
}
.feature-list .fi svg { width: 22px; height: 22px; }
.feature-list h4 { font-family: var(--display); font-size: 1.08rem; margin: 2px 0 4px; }
.feature-list p { color: var(--gray-500); font-size: .96rem; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 14px; }
.gallery a {
  position: relative; overflow: hidden; border-radius: 14px; cursor: pointer; background: var(--gray-100);
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gallery a:hover img { transform: scale(1.08); }
.gallery a::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(14,14,16,.55), transparent 55%);
  opacity: 0; transition: opacity .3s;
}
.gallery a:hover::after { opacity: 1; }
.gallery .cap {
  position: absolute; left: 14px; bottom: 12px; z-index: 2; color: #fff;
  font-weight: 600; font-size: .9rem; opacity: 0; transform: translateY(6px);
  transition: .3s var(--ease);
}
.gallery a:hover .cap { opacity: 1; transform: translateY(0); }
.gallery .wide { grid-column: span 2; }
.gallery .tall { grid-row: span 2; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about__media { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.about__media img { border-radius: 14px; box-shadow: var(--shadow); width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3/4; }
.about__media img:first-child { margin-top: 28px; }
.about p + p { margin-top: 16px; }
.signature { margin-top: 26px; display: flex; align-items: center; gap: 14px; }
.signature__avatar { width: 54px; height: 54px; border-radius: 50%; background: var(--black); color: var(--gold); display: grid; place-items: center; font-family: var(--display); font-weight: 800; }
.signature b { font-family: var(--display); display: block; }
.signature span { color: var(--gray-500); font-size: .9rem; }

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding: 30px 24px; border-radius: var(--radius); background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.section--dark .step h3 { color: #fff; }
.step__num { font-family: var(--display); font-weight: 800; font-size: 2.4rem; color: var(--accent); line-height: 1; margin-bottom: 14px; }
.step h3 { font-size: 1.15rem; margin-bottom: 8px; }
.step p { color: var(--gray-300); font-size: .94rem; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; border-radius: 28px; padding: clamp(40px,6vw,72px); color: #fff; isolation: isolate; }
.cta-band__bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; }
.cta-band::after { content:""; position:absolute; inset:0; z-index:-1; background: linear-gradient(100deg, rgba(8,8,10,.93), rgba(8,8,10,.72)); }
.cta-band h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); max-width: 640px; margin-bottom: 16px; }
.cta-band p { color: rgba(255,255,255,.85); max-width: 540px; margin-bottom: 30px; font-size: 1.08rem; }
.cta-band .btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Footer ---------- */
.footer { background: var(--black); color: rgba(255,255,255,.8); padding: 70px 0 30px; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer__brand .brand__name { color: #fff; }
.footer__brand p { margin-top: 16px; color: rgba(255,255,255,.6); max-width: 320px; font-size: .96rem; }
.footer h4 { font-family: var(--display); color: #fff; font-size: 1rem; margin-bottom: 18px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.footer a:hover { color: var(--accent); }
.footer__contact li { display: flex; align-items: flex-start; gap: 10px; font-size: .96rem; }
.footer__contact svg { width: 18px; height: 18px; color: var(--accent); margin-top: 3px; flex: none; }
.socials { display: flex; gap: 12px; margin-top: 18px; }
.socials a { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.08); display: grid; place-items: center; transition: .2s; }
.socials a:hover { background: var(--accent); color: var(--black); }
.socials svg { width: 20px; height: 20px; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 26px; font-size: .85rem; color: rgba(255,255,255,.5); }
.footer__bottom a { color: rgba(255,255,255,.7); }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 60px; height: 60px; border-radius: 50%;
  background: #25d366; color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(37,211,102,.5);
  transition: transform .2s var(--ease);
  animation: waPulse 2.6s infinite;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 32px; height: 32px; }
@keyframes waPulse { 0%{box-shadow:0 10px 30px rgba(37,211,102,.5),0 0 0 0 rgba(37,211,102,.45);} 70%{box-shadow:0 10px 30px rgba(37,211,102,.5),0 0 0 16px rgba(37,211,102,0);} 100%{box-shadow:0 10px 30px rgba(37,211,102,.5),0 0 0 0 rgba(37,211,102,0);} }

/* ---------- Lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 200; background: rgba(8,8,10,.92); display: none; align-items: center; justify-content: center; padding: 30px; }
.lb.is-open { display: flex; }
.lb img { max-width: 92vw; max-height: 86vh; border-radius: 12px; box-shadow: var(--shadow-lg); }
.lb__close { position: absolute; top: 22px; right: 26px; width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.12); border: none; color: #fff; font-size: 1.6rem; cursor: pointer; }

/* ---------- Reveal animation ---------- */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .why, .about { grid-template-columns: 1fr; gap: 36px; }
  .about__media img:first-child { margin-top: 0; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .trust__row { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: block; }
  .nav.is-open .nav__links {
    display: flex; flex-direction: column; gap: 4px;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: #fff; padding: 14px 24px 22px; box-shadow: var(--shadow-lg);
  }
  .nav.is-open .nav__links a { color: var(--ink); padding: 12px 0; border-bottom: 1px solid var(--gray-100); }
  .nav.is-open .nav__cta { display: flex; margin-top: 10px; }
  .nav.is-open .nav__links a::after { display: none; }

  .hero { min-height: 92svh; }
  .hero__proof { gap: 12px 24px; }
  .proof-item strong { font-size: 1.4rem; }
  .proof-sep { display: none; }
  .hero__actions .btn { width: 100%; }

  .grid--3, .grid--4, .grid--2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; }
  .gallery .wide, .gallery .tall { grid-column: auto; grid-row: auto; }
  .footer__top { grid-template-columns: 1fr; gap: 30px; }
  .hero__scroll { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; }
}
