/* ============================================================
   SHARED · Milano Engenharia
   Header, footer, wa-float, eyebrow, section-head — used on
   every page except Home (Home keeps its own home.css for now).
   ============================================================ */

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body.site {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-canvas);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ============================================================
   HEADER · floating pill on scroll
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(6,11,22,0.55) 0%, rgba(6,11,22,0.25) 60%, rgba(6,11,22,0) 100%);
  transition: top var(--dur-base) var(--ease-out),
              padding var(--dur-base) var(--ease-out),
              background var(--dur-base) var(--ease-out);
}
/* On non-Home pages the header sits over a light canvas, so the
   resting state needs a dark background or the white nav text vanishes. */
.site-header.is-solid {
  background: var(--ink-900);
  border-bottom: 1px solid var(--ink-800);
}

.site-header.scrolled {
  top: 16px;
  background: transparent;
  pointer-events: none;
}
.site-header.scrolled .header-topbar { display: none; }
.site-header.scrolled .header-inner {
  pointer-events: auto;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px 10px 24px;
  background: rgba(10, 22, 40, 0.48);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 2px;
  box-shadow: 0 10px 40px rgba(6, 11, 22, 0.35);
}
.site-header.scrolled .header-logo { height: 36px; }
@media (max-width: 900px) {
  .site-header.scrolled { top: 8px; }
}

/* Top utility bar */
.header-topbar {
  border-bottom: none;
  background: rgba(6,11,22,0.35);
}
.topbar-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 8px var(--container-pad);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-300);
}
.topbar-item {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  white-space: nowrap;
}
.topbar-item svg { color: var(--signal-500); }
.topbar-link { text-decoration: none; transition: color var(--dur-fast); }
.topbar-link:hover { color: var(--ink-0); }
.topbar-sep {
  width: 3px; height: 3px;
  background: var(--ink-500);
  flex-shrink: 0;
}
.topbar-item:nth-child(1) { margin-right: auto; }
@media (max-width: 900px) {
  .header-topbar { display: none; }
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 16px var(--container-pad);
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  position: relative;
}
.header-brand {
  display: flex; align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.header-logo {
  height: 44px; width: auto;
  display: block;
}
.dark-logo { display: none; }

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  margin-left: auto;
}
.nav-link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-0);
  text-decoration: none;
  letter-spacing: 0.01em;
  padding: 8px 2px;
  position: relative;
  transition: color var(--dur-fast);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--signal-500);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-base) var(--ease-out);
}
.nav-link:hover { color: var(--ink-0); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.active { color: var(--ink-0); }
.nav-link.active::after { transform: scaleX(1); }

.header-cta { margin-left: var(--sp-2); }

.header-burger {
  display: none;
  background: transparent;
  border: 1px solid var(--ink-700);
  width: 44px; height: 44px;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  margin-left: auto;
}
.header-burger span {
  width: 20px; height: 1.5px;
  background: var(--ink-0);
  transition: transform var(--dur-base) var(--ease-out),
              opacity var(--dur-fast);
}
.header-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.header-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.header-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-drawer {
  position: fixed;
  inset: 76px 0 0 0;
  background: var(--ink-900);
  transform: translateY(-100%);
  transition: transform var(--dur-slow) var(--ease-out);
  z-index: 90;
  overflow-y: auto;
  pointer-events: none;
  visibility: hidden;
}
.mobile-drawer.open {
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}
.drawer-nav {
  display: flex;
  flex-direction: column;
  padding: var(--sp-8) var(--container-pad);
  gap: 0;
}
.drawer-link {
  display: block;
  padding: var(--sp-5) 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  color: var(--ink-0);
  text-decoration: none;
  border-bottom: 1px solid var(--ink-800);
  letter-spacing: -0.01em;
  position: relative;
  transition: color var(--dur-fast) var(--ease-out);
}
.drawer-link.active { color: var(--signal-400); }
.drawer-cta { margin-top: var(--sp-6); align-self: flex-start; }

/* ============================================================
   SHARED · eyebrow + section head
   ============================================================ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: var(--sp-5);
}
.eyebrow .dot {
  width: 7px; height: 7px;
  background: var(--signal-500);
  flex-shrink: 0;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  margin-bottom: var(--sp-16);
  align-items: end;
}
@media (min-width: 900px) {
  .section-head {
    grid-template-columns: 1.4fr 1fr;
    gap: var(--sp-20);
  }
}
.section-h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 4.5vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
  color: var(--text-primary);
  text-transform: none;
}
.section-sub {
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
  max-width: 44ch;
  text-wrap: pretty;
}

/* ============================================================
   SHARED · page hero (used on non-home pages)
   ============================================================ */
.page-hero {
  background: var(--ink-900);
  color: var(--ink-0);
  position: relative;
  overflow: hidden;
  padding: clamp(160px, 22vh, 240px) 0 clamp(48px, 7vh, 72px);
  isolation: isolate;
  min-height: clamp(400px, 56vh, 560px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.page-hero > .container { width: 100%; }
.page-hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  opacity: 0.55;
  filter: saturate(0.85) contrast(1.05);
}
.page-hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to right,
    rgba(10, 22, 40, 0.92) 0%,
    rgba(10, 22, 40, 0.85) 35%,
    rgba(10, 22, 40, 0.4) 72%,
    rgba(10, 22, 40, 0) 100%);
  pointer-events: none;
}
.page-hero::before {
  content: "";
  position: absolute; inset: 0;
  z-index: 2;
  background-image:
    linear-gradient(var(--ink-800) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink-800) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.18;
  mask-image: radial-gradient(ellipse at 20% 100%, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 20% 100%, black 0%, transparent 70%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 3; }

.page-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-300);
  margin: 0 0 var(--sp-6);
}
.page-hero-eyebrow .dot {
  width: 7px; height: 7px;
  background: var(--signal-500);
}

.page-hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 var(--sp-6);
  color: var(--ink-0);
  text-wrap: balance;
  max-width: 18ch;
  text-transform: none;
}
.page-hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1.55;
  color: var(--ink-200);
  margin: 0;
  max-width: 56ch;
  text-wrap: pretty;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--ink-950);
  color: var(--ink-200);
  padding: clamp(64px, 9vh, 96px) 0 0;
  border-top: 1px solid var(--ink-800);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: var(--sp-12);
  padding-bottom: var(--sp-16);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-10); } }
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-10); text-align: center; }
  .footer-logo { margin-left: auto; margin-right: auto; }
  .footer-list { align-items: center; }
  .footer-list a { justify-content: center; }
  .footer-contact li { justify-content: center; }
  .footer-bottom { justify-content: center; text-align: center; }
  .footer-bottom-right { flex-direction: column; align-items: center; gap: var(--sp-4); width: 100%; }
}

.footer-logo {
  height: 96px; width: auto;
  margin-bottom: var(--sp-6);
  display: block;
}
.footer-addr {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.08em;
  color: var(--ink-400);
  text-transform: uppercase;
}
.footer-h4 {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-0);
  margin: 0 0 var(--sp-5);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--ink-800);
}
.footer-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.footer-list a {
  color: var(--ink-200);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--dur-fast);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
}
.footer-list a:hover { color: var(--signal-500); }
.footer-contact li { display: flex; align-items: center; gap: var(--sp-3); }
.footer-contact svg { color: var(--ink-500); flex-shrink: 0; }

.footer-bottom {
  padding: var(--sp-5) 0;
  border-top: 1px solid var(--ink-800);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-6);
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-400);
  text-transform: uppercase;
}
.footer-crea { color: var(--ink-300); }
.footer-bottom-right { display: inline-flex; align-items: center; gap: var(--sp-6); flex-wrap: wrap; }
/* Crédito LDNA S/A — discreto, à direita no desktop; realça no hover */
.footer-ldna { display: inline-flex; align-items: center; opacity: 0.5; transition: opacity var(--dur-fast); }
.footer-ldna:hover { opacity: 1; }
.footer-ldna img { height: 22px; width: auto; display: block; }

/* ============================================================
   WHATSAPP FLOAT
   ============================================================ */
.wa-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: #25d366;
  color: #fff;
  border-radius: 999px;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.25),
    0 2px 6px rgba(0, 0, 0, 0.15),
    0 0 0 3px rgba(255, 255, 255, 0.08);
  transition: transform var(--dur-base) var(--ease-out);
  text-decoration: none;
}
.wa-float::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  background: #25d366;
  opacity: 0.25;
  z-index: -1;
  animation: wa-pulse 2.4s ease-out infinite;
}
@keyframes wa-pulse {
  0%   { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(1.4); opacity: 0; }
}
.wa-float:hover { transform: translateY(-2px) scale(1.03); }

/* ============================================================
   RESPONSIVE — shared
   ============================================================ */
@media (max-width: 900px) {
  .header-nav, .header-cta { display: none; }
  .header-burger { display: flex; }
  .header-logo { height: 36px; }
  .mobile-drawer { inset: 76px 0 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .wa-float::after { animation: none; }
}
