/* ============================================================
   Engemax Incorporadora — estilos base
   Consome tokens de tokens.css. Sem lógica/JS aqui.
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  overflow-x: hidden; /* contém o drawer off-canvas (translateX 100%) e evita scroll horizontal */
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--offwhite);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  line-height: 1.08;
  font-weight: 500;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* Acessível por leitor de tela, oculto visualmente */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.section-title {
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  text-align: center;
  color: var(--ink);
}

/* ---- Botões ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .18s ease, background .25s ease, border-color .25s ease, color .25s ease;
}
.btn--sm { padding: 9px 18px; font-size: .85rem; }
.btn--primary { background: var(--orange); color: var(--white); }
.btn--primary:hover { background: var(--orange-dark); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--white); border-color: var(--white-40); }
.btn--ghost:hover { background: var(--white-12); transform: translateY(-2px); }

/* ---- Reveal ao rolar (IntersectionObserver) ---- */
/* Só esconde quando há JS (classe .js no <html>); sem JS, tudo aparece. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---- Foco acessível ---- */
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 50;
  color: var(--white);
  display: flex;
  align-items: center;
  transition: background .35s ease, box-shadow .35s ease, height .35s ease;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.site-header__logo img {
  height: 40px;
  width: auto;
  transition: height .35s ease;
}
/* Header escuro ao rolar — mantém a logo BRANCA legível em toda a página */
.site-header.scrolled {
  background: rgba(43, 43, 43, .92);
  backdrop-filter: blur(10px) saturate(120%);
  box-shadow: 0 1px 0 var(--white-12), 0 8px 30px rgba(0, 0, 0, .25);
  height: 64px;
}
.site-header.scrolled .site-header__logo img { height: 34px; }

/* Header sólido desde o topo em páginas internas (logo branco precisa de fundo escuro) */
.site-header--solid {
  background: rgba(43, 43, 43, .92);
  backdrop-filter: blur(10px) saturate(120%);
  box-shadow: 0 1px 0 var(--white-12), 0 8px 30px rgba(0, 0, 0, .25);
}

.site-nav__list { display: flex; gap: 30px; align-items: center; }
.site-nav__list a:not(.btn) {
  font-size: .92rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--white);
  position: relative;
  padding-block: 6px;
}
.site-nav__list a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--orange);
  transition: width .28s ease;
}
.site-nav__list a:not(.btn):hover::after { width: 100%; }

.nav-toggle { display: none; }

@media (max-width: 920px) {
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 6px;
    z-index: 60;
  }
  .nav-toggle span {
    width: 28px; height: 2px;
    background: var(--white);
    transition: transform .3s ease, opacity .3s ease;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  /* Overlay do tamanho da viewport que CLIPA o painel deslizante (sem overflow horizontal) */
  .site-nav {
    position: fixed;
    inset: 0;
    overflow: hidden;
    display: block;
    background: rgba(43, 43, 43, 0);
    pointer-events: none;
    transition: background .4s ease;
  }
  .site-nav.open { background: rgba(43, 43, 43, .5); pointer-events: auto; }
  .site-nav__list {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: min(82vw, 340px);
    background: var(--ink);
    transform: translateX(100%);
    transition: transform .4s cubic-bezier(.65, 0, .35, 1);
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    padding: 104px 40px 40px;
    box-shadow: -20px 0 60px rgba(0, 0, 0, .4);
    pointer-events: auto;
  }
  .site-nav.open .site-nav__list { transform: translateX(0); }
  .site-nav__list a:not(.btn) { font-size: 1.15rem; }
  body.nav-open { overflow: hidden; }
}

/* ============================================================
   HERO
   ============================================================ */
.shot .hero { min-height: 680px !important; }
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(56px, 10vh, 120px);
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
}
.hero__media {
  position: absolute;
  inset: -8% 0;
  z-index: -2;
  background-image: var(--hero-img);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  will-change: transform;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(43, 43, 43, .55) 0%, rgba(43, 43, 43, 0) 32%),
    linear-gradient(8deg, rgba(43, 43, 43, .92) 4%, rgba(43, 43, 43, .45) 42%, rgba(43, 43, 43, .12) 75%);
}
/* Molduras de canto — detalhe "editorial" */
.hero__frame {
  position: absolute;
  width: 46px; height: 46px;
  border: 1.5px solid var(--white-40);
  z-index: 1;
  pointer-events: none;
}
.hero__frame--tl { top: 26px; left: 26px; border-right: 0; border-bottom: 0; }
.hero__frame--br { bottom: 26px; right: 26px; border-left: 0; border-top: 0; border-color: var(--orange); }

.hero__content { position: relative; z-index: 2; max-width: 760px; width: 100%; min-width: 0; }
.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--white);
}
.hero__eyebrow .rule { width: 42px; height: 2px; background: var(--orange); display: inline-block; }
.hero__title {
  font-size: clamp(3.2rem, 11vw, 8rem);
  letter-spacing: -.01em;
  margin: 18px 0 22px;
  text-shadow: 0 2px 40px rgba(0, 0, 0, .35);
}
.hero__tagline {
  font-size: clamp(1.05rem, 2.3vw, 1.4rem);
  font-weight: 300;
  line-height: 1.55;
  max-width: 50ch;
  color: var(--white-70);
}
.hero__cta { display: flex; gap: 16px; margin-top: 38px; flex-wrap: wrap; }

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 2;
}
.hero__scroll-line {
  display: block;
  width: 1px; height: 54px;
  background: linear-gradient(var(--white-40), transparent);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 40%;
  background: var(--orange);
  animation: scrollCue 2.2s ease-in-out infinite;
}
@keyframes scrollCue {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(280%); }
}

/* Entrada escalonada no load */
.hero__eyebrow, .hero__title, .hero__tagline, .hero__cta {
  opacity: 0;
  transform: translateY(26px);
  animation: heroIn .9s cubic-bezier(.2, .7, .2, 1) forwards;
}
.hero__title { animation-delay: .12s; }
.hero__tagline { animation-delay: .26s; }
.hero__cta { animation-delay: .4s; }
@keyframes heroIn {
  to { opacity: 1; transform: none; }
}

@media (max-width: 920px) {
  /* Remove as molduras de canto no mobile: a do topo ficava atrás do logo no scroll */
  .hero__frame { display: none; }
}
@media (max-width: 640px) {
  .hero { padding-bottom: 84px; }
  .hero__eyebrow { font-size: .68rem; letter-spacing: .1em; flex-wrap: wrap; }
  .hero__eyebrow .rule { width: 28px; }
  .hero__tagline { font-size: 1rem; }
  .hero__cta { width: 100%; gap: 12px; }
  .hero__cta .btn { flex: 1 1 100%; justify-content: center; }
}

/* ============================================================
   ELEMENTOS COMPARTILHADOS
   ============================================================ */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 18px;
}
.eyebrow .rule { width: 38px; height: 2px; background: var(--orange); display: inline-block; }
.eyebrow--center { justify-content: center; }

.section-lead {
  text-align: center;
  color: var(--ink-70);
  max-width: 56ch;
  margin: 16px auto 0;
  font-size: 1.05rem;
}

/* ============================================================
   QUEM SOMOS
   ============================================================ */
.quem-somos { padding-block: var(--section-y); background: var(--offwhite); }
.quem-somos__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.quem-somos__media { position: relative; }
.quem-somos__media img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: var(--radius);
}
.quem-somos__tag {
  position: absolute;
  left: 0; bottom: 28px;
  background: var(--orange);
  color: var(--white);
  font-weight: 600;
  font-size: .9rem;
  padding: 12px 22px;
  border-radius: 0 999px 999px 0;
  box-shadow: 0 12px 30px rgba(216, 89, 10, .3);
}
.quem-somos__text h2 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  color: var(--ink);
  margin: 6px 0 24px;
}
.quem-somos__text p { color: var(--ink-70); margin-bottom: 16px; max-width: 52ch; }

.pilares {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: clamp(48px, 6vw, 80px);
}
.pilar {
  padding: 28px 24px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--ink-12);
  transition: transform .3s ease, box-shadow .3s ease;
}
.pilar:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(43, 43, 43, .1); }
.pilar__ico { display: block; width: 38px; height: 2px; background: var(--orange); font-size: 0; line-height: 0; }
.pilar h3 { font-size: 1.3rem; margin: 14px 0 8px; color: var(--ink); }
.pilar p { color: var(--ink-70); font-size: .95rem; }

@media (max-width: 920px) {
  .quem-somos__grid { grid-template-columns: 1fr; }
  .quem-somos__media img { aspect-ratio: 16/10; }
  .pilares { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .pilares { grid-template-columns: 1fr; }
}

/* ============================================================
   EMPREENDIMENTOS (dobra portfólio)
   ============================================================ */
.empreendimentos { padding-block: var(--section-y); background: var(--white); }
.emp-head { margin-bottom: clamp(40px, 5vw, 64px); }
.emp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.emp-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/5;
  background: var(--ink);
}
.emp-card__media, .emp-card__media img { width: 100%; height: 100%; object-fit: cover; }
.emp-card__media img { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.emp-card:hover .emp-card__media img { transform: scale(1.07); }
.emp-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 40%, rgba(43, 43, 43, .9));
}
.emp-card__overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 22px 24px;
  color: var(--white);
  z-index: 1;
  transform: translateY(8px);
  transition: transform .4s ease;
}
.emp-card:hover .emp-card__overlay { transform: none; }
.emp-card__overlay h3 { font-size: 1.4rem; }
.emp-card__overlay p { font-size: .85rem; color: var(--white-70); margin-top: 4px; }
.emp-card__overlay::before {
  content: "";
  display: block;
  width: 32px; height: 3px;
  background: var(--orange);
  margin-bottom: 12px;
}

@media (max-width: 920px) {
  .emp-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding-bottom: 10px;
    margin-inline: calc(var(--pad-x) * -1);
    padding-inline: var(--pad-x);
    -webkit-overflow-scrolling: touch;
  }
  .emp-card { flex: 0 0 78%; scroll-snap-align: center; }
}

/* ============================================================
   LINHA DO TEMPO
   ============================================================ */
.historia { padding-block: var(--section-y); background: var(--offwhite); }
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  position: relative;
  margin-top: 16px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 70px; left: 0; right: 0;
  height: 2px;
  background: var(--ink-12);
}
.timeline__item { position: relative; }
.timeline__media {
  display: block;
  width: 140px; height: 140px;
  border-radius: 50%;
  border: 4px solid var(--orange);
  overflow: hidden;
  position: relative;
  z-index: 1;
  margin-bottom: 24px;
  background: var(--offwhite);
  box-shadow: 0 0 0 6px var(--offwhite), 0 14px 30px rgba(43, 43, 43, .15);
  transition: transform .35s ease;
}
.timeline__media img { width: 100%; height: 100%; object-fit: cover; }
.timeline__item:hover .timeline__media { transform: scale(1.05); }
.timeline__year {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--ink);
  display: block;
  margin-bottom: 8px;
}
.timeline__item p { color: var(--ink-70); font-size: .95rem; }

@media (max-width: 920px) {
  .timeline { grid-template-columns: 1fr; gap: 32px; }
  .timeline::before { top: 0; bottom: 0; left: 58px; right: auto; width: 2px; height: auto; }
  .timeline__item { padding-left: 148px; min-height: 116px; }
  .timeline__media { width: 116px; height: 116px; position: absolute; left: 0; top: 0; margin-bottom: 0; }
}

/* ============================================================
   BIG NUMBERS
   ============================================================ */
.numeros {
  position: relative;
  padding-block: var(--section-y);
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
}
/* Pattern de marca sutil ao fundo */
.numeros__pattern {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('../img/pattern-branco.webp') center / cover no-repeat;
  opacity: .09;
}
.emp-head--light .eyebrow { color: var(--orange); }
.numeros__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(32px, 6vw, 72px);
  text-align: center;
  margin-top: 8px;
}
.numero { position: relative; flex: 0 1 240px; }
.numero + .numero::before {
  content: "";
  position: absolute;
  left: calc(clamp(32px, 6vw, 72px) / -2); top: 18%;
  height: 64%;
  width: 1px;
  background: var(--white-12);
}
.numero__val {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6.5vw, 5rem);
  line-height: 1;
  color: var(--orange);
}
.numero__suf { font-family: var(--font-display); }
.numero__ph { opacity: .5; }
.numero__label {
  color: var(--white-70);
  margin-top: 12px;
  font-size: .95rem;
  letter-spacing: .02em;
}
@media (max-width: 760px) {
  .numeros__grid { gap: 44px 24px; }
  .numero + .numero::before { display: none; }
}

/* ============================================================
   INSTAGRAM
   ============================================================ */
.instagram { padding-block: var(--section-y); background: var(--offwhite); }
.instagram__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.section-title--left { text-align: left; }
.instagram__fallback {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
/* Quando o widget do Behold esta ativo, o fallback recebe [hidden] — garante o ocultamento (display:grid sobrepunha o hidden) */
.instagram__fallback[hidden] { display: none; }
.instagram__fallback li {
  aspect-ratio: 1;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(250,103,7,.12), rgba(43,43,43,.06)),
    url('../img/pattern.webp') center/120px repeat;
  border: 1px solid var(--ink-12);
}
.instagram__noscript { color: var(--ink-70); }
@media (max-width: 760px) {
  .instagram__fallback { grid-template-columns: repeat(3, 1fr); }
  .section-title--left { font-size: clamp(1.8rem, 9vw, 2.6rem); }
}

/* ============================================================
   RODAPÉ
   ============================================================ */
.site-footer { background: var(--ink); color: var(--white); }
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr 1.5fr;
  gap: clamp(28px, 4vw, 56px);
  padding-block: clamp(56px, 7vw, 96px);
}
.site-footer__logo { height: 46px; width: auto; margin-bottom: 20px; }
.site-footer__brand p { color: var(--white-70); font-size: .95rem; line-height: 1.7; max-width: 34ch; }
.site-footer__col h3 {
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .82rem;
  color: var(--orange);
  margin-bottom: 16px;
}
.site-footer__col p { color: var(--white-70); margin-bottom: 10px; font-size: .95rem; }
.site-footer__col a { color: var(--white-70); transition: color .2s ease; }
.site-footer__col a:hover { color: var(--orange); }
.site-footer__map iframe {
  width: 100%;
  height: 100%;
  min-height: 200px;
  border: 0;
  border-radius: var(--radius);
  filter: grayscale(.3);
}
.site-footer__bar { border-top: 1px solid var(--white-12); }
.site-footer__bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 22px;
  color: var(--white-40);
  font-size: .82rem;
}
.site-footer__bar-inner a { color: var(--white-70); }
.site-footer__bar-inner a:hover { color: var(--orange); }
.site-footer__legal-links { display: flex; gap: 18px; flex-wrap: wrap; }

@media (max-width: 920px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__map { grid-column: 1 / -1; min-height: 240px; }
}
@media (max-width: 560px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}

/* ============================================================
   PÁGINA: Política de Privacidade
   ============================================================ */
.legal {
  max-width: 800px;
  margin-inline: auto;
  padding: clamp(120px, 16vh, 200px) var(--pad-x) var(--section-y);
}
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 24px; }
.legal h2 { font-size: 1.3rem; margin: 32px 0 12px; }
.legal p { color: var(--ink-70); margin-bottom: 14px; }
.legal .back { display: inline-block; margin-top: 32px; color: var(--orange); font-weight: 600; }
.legal__title { color: var(--ink); line-height: 1.1; overflow-wrap: break-word; margin-bottom: 24px; }

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

/* ---- Conteudo de paginas internas (.prose: politica de privacidade etc.) ---- */
.page-content { background: var(--offwhite); }
.page-content .container { max-width: 820px; }
.page-content .section-title { margin-bottom: 28px; }
.prose { font-family: var(--font-body); color: var(--ink-70); font-size: 1.05rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3 { font-family: var(--font-display); color: var(--ink); line-height: 1.25; }
.prose h2 { font-size: 1.5rem; margin-top: 2.2em; margin-bottom: .2em; }
.prose h3 { font-size: 1.25rem; margin-top: 1.8em; margin-bottom: .2em; }
.prose p { margin: 0; }
.prose a { color: var(--orange); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--orange-dark); }
.prose ul, .prose ol { margin: 1.1em 0; padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .5em; }

/* ---- Botao flutuante de WhatsApp (fixo, acompanha a rolagem) ---- */
.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px 12px 16px;
  border-radius: 999px;
  background: #25D366;
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(37, 211, 102, .45);
  transition: transform .25s ease, box-shadow .25s ease;
}
.wa-float:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(37, 211, 102, .55); color: #fff; }
.wa-float svg { display: block; flex-shrink: 0; }
.wa-float__txt { white-space: nowrap; }
@media (max-width: 600px) {
  .wa-float { right: 14px; bottom: 14px; padding: 11px 16px; font-size: .82rem; gap: 8px; }
  .wa-float svg { width: 22px; height: 22px; }
}
