/* ===============================================
   PRESMONT — CSS
   Institucional clássico. Sério, corporativo, limpo.
   =============================================== */

:root {
  /* Cores */
  --c-primary: #1E3A6B;
  --c-primary-dark: #142A50;
  --c-accent: #2E9FD6;
  --c-accent-dark: #1F86B8;
  --c-bg: #FFFFFF;
  --c-bg-alt: #F5F7FB;
  --c-bg-dark: #0F1F3D;
  --c-text: #0F172A;
  --c-text-muted: #64748B;
  --c-text-light: #94A3B8;
  --c-border: #E2E8F0;
  --c-border-dark: #1F3357;

  /* Tipografia */
  --font-display: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --container: 1200px;
  --radius: 4px;
  --radius-lg: 8px;
  --header-h: 88px;

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.12);
}

/* -- Reset básico -- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s ease; }
button { font: inherit; cursor: pointer; border: none; background: none; }

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

/* ===============================================
   HEADER
   =============================================== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(255,255,255,0.98);
  backdrop-filter: saturate(180%) blur(10px);
  z-index: 100;
  transition: box-shadow .3s ease, background .3s ease;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--c-border);
}
.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.header__logo img {
  height: 56px;
  width: auto;
}
.header__nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-left: auto;
}
.header__nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--c-text);
  position: relative;
  padding: 0.5rem 0;
}
.header__nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  height: 2px;
  width: 0;
  background: var(--c-accent);
  transition: width .3s ease;
}
.header__nav a:hover { color: var(--c-primary); }
.header__nav a:hover::after { width: 100%; }
.header__toggle {
  display: none;
  width: 40px; height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}
.header__toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--c-text);
  transition: transform .3s ease, opacity .3s ease;
}
.header__toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header__toggle.is-active span:nth-child(2) { opacity: 0; }
.header__toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===============================================
   BOTÕES
   =============================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9375rem 1.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  border-radius: var(--radius);
  transition: all .25s ease;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
}
.btn--sm { padding: 0.625rem 1.25rem; font-size: 0.875rem; }
.btn--primary {
  background: var(--c-primary);
  color: #fff;
}
.btn--primary:hover {
  background: var(--c-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(30, 58, 107, 0.25);
}
.btn--ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.4);
}
.btn--ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
}
.btn--white {
  background: #fff;
  color: var(--c-primary);
}
.btn--white:hover {
  background: var(--c-bg-alt);
  transform: translateY(-1px);
}

/* ===============================================
   TIPOGRAFIA UTILITÁRIA
   =============================================== */
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 1rem;
  display: block;
}
.eyebrow--light { color: #7DD3FC; }

.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--c-text);
  margin-bottom: 1.25rem;
}
.section__title--light { color: #fff; }
.section__lead {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--c-text-muted);
  max-width: 60ch;
}
.section__lead + .section__lead { margin-top: 1rem; }
.section__lead--light { color: #CBD5E1; }
.section__lead--center { margin-left: auto; margin-right: auto; }
.section__head {
  max-width: 780px;
  margin-bottom: 3.5rem;
}
.section__head--center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* ===============================================
   SEÇÕES BASE
   =============================================== */
.section {
  padding: 6rem 0;
}
.section--white { background: var(--c-bg); }
.section--alt { background: var(--c-bg-alt); }
.section--dark { background: var(--c-bg-dark); color: #E2E8F0; }

/* ===============================================
   HERO
   =============================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 4rem) 0 6rem;
  overflow: hidden;
  color: #fff;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 31, 61, 0.7) 0%, rgba(15, 31, 61, 0.55) 40%, rgba(15, 31, 61, 0.85) 100%),
    linear-gradient(90deg, rgba(15, 31, 61, 0.6) 0%, rgba(15, 31, 61, 0.2) 100%);
}
.hero__content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  width: 100%;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: #fff;
  margin-bottom: 1.5rem;
}
.hero__lead {
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  line-height: 1.65;
  color: #E2E8F0;
  max-width: 620px;
  margin-bottom: 2.5rem;
}
.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero__actions .btn {
  min-width: 0;
}
.hero__scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 1.5px solid rgba(255,255,255,0.55);
  border-radius: 20px;
  z-index: 2;
  overflow: hidden;
}
.hero__scroll span {
  display: block;
  width: 3px; height: 8px;
  background: #fff;
  border-radius: 2px;
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  animation: scrollDot 2s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { top: 8px; opacity: 1; }
  60% { top: 22px; opacity: 0; }
  61% { top: 8px; opacity: 0; }
  100% { top: 8px; opacity: 1; }
}

/* ===============================================
   GRID 2 COLUNAS
   =============================================== */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

/* Números destacados (sobre) */
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--c-border);
  border: 1px solid var(--c-border);
}
.stat {
  padding: 2rem;
  background: var(--c-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 160px;
}
.stat__number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.25rem, 4vw, 3rem);
  line-height: 1;
  color: var(--c-primary);
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}
.stat__label {
  font-size: 0.9375rem;
  color: var(--c-text-muted);
  font-weight: 500;
}

/* ===============================================
   SERVIÇOS
   =============================================== */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.service {
  background: #fff;
  border: 1px solid var(--c-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.service:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--c-accent);
}
.service__image {
  height: 200px;
  overflow: hidden;
  background: var(--c-bg-alt);
}
.service__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.service:hover .service__image img { transform: scale(1.05); }
.service__body {
  padding: 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.service__index {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--c-accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}
.service__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--c-text);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.service__body p {
  color: var(--c-text-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* Reordenar: 4 e 5 na segunda linha, colunas 1 e 2 (com 3ª vazia) */
.services > article:nth-child(4) { grid-column: 1 / 2; }
.services > article:nth-child(5) { grid-column: 2 / 3; }

/* ===============================================
   CLIENTES
   =============================================== */
.clients {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--c-border);
  background: var(--c-border);
  gap: 1px;
}
.client {
  background: #fff;
  padding: 2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  transition: background .3s ease;
}
.client:hover { background: var(--c-bg-alt); }
.client img {
  max-width: 100%;
  max-height: 60px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: filter .3s ease, opacity .3s ease;
}
.client:hover img {
  filter: grayscale(0);
  opacity: 1;
}

/* ===============================================
   GALERIA DE OBRAS
   =============================================== */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 240px;
  gap: 1rem;
}
.gallery__item {
  overflow: hidden;
  position: relative;
  background: var(--c-bg-alt);
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.gallery__item:hover img { transform: scale(1.08); }
.gallery__item--wide { grid-column: span 2; }
.gallery__item--tall { grid-row: span 2; }

/* ===============================================
   CONTATO
   =============================================== */
.contact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.contact__card {
  padding: 2.5rem 2rem;
  background: var(--c-bg-alt);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
}
.contact__card--cta {
  background: var(--c-primary);
  color: #fff;
}
.contact__label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
}
.contact__label--light { color: rgba(255,255,255,0.65); }
.contact__value {
  font-size: 1.0625rem;
  color: var(--c-text);
  line-height: 1.5;
}
.contact__value--light { color: #E2E8F0; }
.contact__value a {
  color: var(--c-primary);
  font-weight: 600;
  transition: color .2s ease;
}
.contact__value a:hover { color: var(--c-accent); }
.contact__card--cta .btn { margin-top: auto; align-self: flex-start; }

/* ===============================================
   FOOTER
   =============================================== */
.footer {
  background: var(--c-bg-dark);
  color: #CBD5E1;
  padding-top: 4rem;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 3rem;
  padding-bottom: 3rem;
}
.footer__brand img {
  height: 64px;
  width: auto;
  margin-bottom: 1rem;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.footer__brand p {
  color: #94A3B8;
  font-size: 0.9375rem;
}
.footer__col h4 {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
}
.footer__col a, .footer__col p {
  display: block;
  color: #94A3B8;
  font-size: 0.9375rem;
  margin-bottom: 0.625rem;
  line-height: 1.5;
}
.footer__col a:hover { color: var(--c-accent); }
.footer__bottom {
  border-top: 1px solid var(--c-border-dark);
  padding: 1.5rem 0;
}
.footer__bottom p {
  color: #64748B;
  font-size: 0.8125rem;
  text-align: center;
}

/* ===============================================
   FLOAT WHATSAPP
   =============================================== */
.wa-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
  transition: transform .3s ease, box-shadow .3s ease;
  animation: waPulse 2.5s ease-out infinite;
}
.wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 36px rgba(37, 211, 102, 0.55);
}
@keyframes waPulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.35); }
  50% { box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4), 0 0 0 16px rgba(37, 211, 102, 0); }
}

/* ===============================================
   RESPONSIVIDADE
   =============================================== */
@media (max-width: 960px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .services > article:nth-child(4) { grid-column: 1 / 2; }
  .services > article:nth-child(5) { grid-column: 2 / 3; }
  .clients { grid-template-columns: repeat(3, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; gap: 3rem; }
}

@media (max-width: 720px) {
  .section { padding: 4rem 0; }
  .section__head { margin-bottom: 2.5rem; }

  .header__toggle { display: flex; }
  .header .btn { display: none; }
  .header__nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.5rem 2rem;
    gap: 0;
    box-shadow: 0 20px 40px rgba(15,23,42,0.08);
    transform: translateY(-120%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    margin-left: 0;
  }
  .header__nav.is-open { transform: translateY(0); }
  .header__nav a {
    padding: 1rem 0;
    border-bottom: 1px solid var(--c-border);
  }
  .header__nav a::after { display: none; }

  .services { grid-template-columns: 1fr; }
  .services > article:nth-child(4),
  .services > article:nth-child(5) { grid-column: 1 / -1; }

  .clients { grid-template-columns: repeat(2, 1fr); }
  .client { min-height: 110px; padding: 1.5rem 1rem; }
  .client img { max-height: 44px; }

  .gallery {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }
  .gallery__item--wide, .gallery__item--tall {
    grid-column: auto;
    grid-row: auto;
  }

  .contact { grid-template-columns: 1fr; }

  .footer__inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer__bottom p { text-align: left; }

  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 1.5rem; min-height: 130px; }

  .hero { padding: calc(var(--header-h) + 3rem) 0 4rem; min-height: auto; }
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 340px;
  }
  .hero__actions .btn {
    width: 100%;
    padding: 1rem 1.25rem;
    white-space: normal;
    font-size: 0.9375rem;
  }
  .hero__scroll { display: none; }

  .wa-float { width: 52px; height: 52px; bottom: 1rem; right: 1rem; }
  .wa-float svg { width: 24px; height: 24px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
