/* ==========================================================================
   EMR Projetos — Engenharia Estrutural
   Reconstrução sem Webflow · Persona C (Estruturado de Alto Contraste)
   Paleta original da marca preservada.
   ========================================================================== */

:root {
  --dark:      #21242d;   /* grafite escuro — fundo principal escuro */
  --dark-2:    #191b22;   /* variação mais profunda */
  --graphite:  #2c3038;   /* superfície escura elevada */
  --accent:    #4d694c;   /* verde EMR — cor de acento */
  --accent-2:  #5f8060;   /* verde claro (hover) */
  --accent-dk: #294228;   /* verde escuro */
  --haze:      #f4f5f8;   /* fundo claro */
  --white:     #ffffff;
  --ink:       #21242d;   /* texto sobre claro */
  --grey-1:    #4d5464;
  --grey-2:    #8e94a2;
  --grey-3:    #c0c4cd;
  --grey-4:    #e2e4eb;
  --line:      rgba(255,255,255,.10);

  --font-head: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;

  --wrap: 1200px;
  --radius: 14px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; font-weight: 600; letter-spacing: -.02em; }
strong { font-weight: 600; color: inherit; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.section { padding: clamp(64px, 9vw, 130px) 0; }
.arrow { display: inline-block; transition: transform .3s var(--ease); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  position: relative;
  padding-left: 30px;
}
.eyebrow::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 22px; height: 2px; background: var(--accent); transform: translateY(-50%);
}
.eyebrow-light { color: #a9c3a4; }
.eyebrow-light::before { background: #a9c3a4; }

.section-title { font-size: clamp(1.7rem, 3.4vw, 2.6rem); color: var(--ink); }
.accent-text { color: var(--accent); }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 600; font-size: .95rem;
  padding: 13px 26px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; transition: all .3s var(--ease); white-space: nowrap;
}
.btn-lg { padding: 16px 34px; font-size: 1rem; }
.btn-accent { background: var(--accent); color: var(--white); }
.btn-accent:hover { background: var(--accent-dk); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(41,66,40,.35); }
.btn-accent:hover .arrow { transform: translateX(4px); }
.btn-ghost-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,.35); }
.btn-ghost-light:hover { background: rgba(255,255,255,.10); border-color: var(--white); }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .35s var(--ease), box-shadow .35s var(--ease), padding .35s var(--ease);
  padding: 14px 0;
}
.site-header.scrolled {
  background: rgba(25,27,34,.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand-logo { height: 46px; width: auto; transition: height .35s var(--ease); }
.site-header.scrolled .brand-logo { height: 40px; }

.nav-menu { display: flex; align-items: center; gap: 34px; }
.nav-link {
  font-family: var(--font-head); font-weight: 500; font-size: .95rem;
  color: rgba(255,255,255,.88); position: relative; padding: 4px 0;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px;
  background: var(--accent-2); transition: width .3s var(--ease);
}
.nav-link:hover { color: var(--white); }
.nav-link:hover::after { width: 100%; }
.nav-cta { margin-left: 6px; }
.nav-cta svg { flex-shrink: 0; }

.menu-toggle {
  display: none; flex-direction: column; gap: 5px; width: 42px; height: 42px;
  background: none; border: 0; cursor: pointer; padding: 10px; align-items: center; justify-content: center;
}
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--white); transition: all .3s var(--ease); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  color: var(--white); overflow: hidden; padding: 120px 0 80px;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(180deg, rgba(25,27,34,.72), rgba(25,27,34,.86)),
    linear-gradient(120deg, rgba(41,66,40,.55) 0%, rgba(25,27,34,0) 55%),
    url("../images/header-emr.avif") center/cover no-repeat;
}
.hero-grid {
  position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, #000 40%, transparent 100%);
}
.hero-inner { position: relative; }
.hero-title {
  font-size: clamp(2.2rem, 6vw, 4.2rem); font-weight: 700; max-width: 16ch; margin: 6px 0 0;
}
.hero-lead {
  font-size: clamp(1rem, 1.5vw, 1.18rem); color: rgba(255,255,255,.82);
  max-width: 60ch; margin-top: 26px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.4); border-radius: 14px;
  display: flex; justify-content: center; padding-top: 8px;
}
.scroll-cue span { width: 4px; height: 8px; border-radius: 2px; background: var(--white); animation: scrollcue 1.6s var(--ease) infinite; }
@keyframes scrollcue { 0%{opacity:0;transform:translateY(-4px);} 40%{opacity:1;} 80%,100%{opacity:0;transform:translateY(10px);} }

/* ==========================================================================
   SOBRE
   ========================================================================== */
.sobre { background: var(--white); }
.sobre-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(30px, 6vw, 80px); align-items: start; }
.sobre-text p { color: var(--grey-1); margin-bottom: 16px; font-size: 1.05rem; }
.sobre-text p:last-child { margin-bottom: 0; }

.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin-top: clamp(46px, 6vw, 72px);
}
.stat {
  background: var(--haze); border: 1px solid var(--grey-4); border-radius: var(--radius);
  padding: 30px 28px; position: relative; overflow: hidden;
}
.stat::before { content: ""; position: absolute; left: 0; top: 0; width: 4px; height: 0; background: var(--accent); transition: height .5s var(--ease); }
.stat:hover::before { height: 100%; }
.stat-num { display: block; font-family: var(--font-head); font-size: 2.6rem; font-weight: 700; color: var(--accent); line-height: 1; }
.stat-label { display: block; margin-top: 12px; color: var(--grey-1); font-size: .95rem; }

/* ==========================================================================
   SERVIÇOS
   ========================================================================== */
.servicos { background: var(--dark); color: var(--white); position: relative; }
.servicos .section-title { color: var(--white); }
.section-head { max-width: 640px; margin-bottom: 54px; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--graphite); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 38px 34px; transition: transform .4s var(--ease), border-color .4s var(--ease), background .4s var(--ease);
  overflow: hidden;
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius);
  background: radial-gradient(120% 100% at 100% 0%, rgba(77,105,76,.22), transparent 60%);
  opacity: 0; transition: opacity .4s var(--ease);
}
.card:hover { transform: translateY(-6px); border-color: rgba(95,128,96,.6); background: #30353f; }
.card:hover::after { opacity: 1; }
.card-num { font-family: var(--font-head); font-size: 1rem; font-weight: 700; color: var(--accent-2); letter-spacing: .1em; }
.card h3 { font-size: 1.32rem; margin: 16px 0 14px; color: var(--white); position: relative; }
.card p { color: rgba(255,255,255,.68); font-size: .98rem; margin-bottom: 26px; flex-grow: 1; position: relative; }
.card-link { font-family: var(--font-head); font-weight: 600; font-size: .92rem; color: var(--accent-2); display: inline-flex; gap: 8px; position: relative; }
.card:hover .card-link .arrow { transform: translateX(5px); }

/* ==========================================================================
   DIFERENCIAIS
   ========================================================================== */
.diferenciais { background: var(--haze); }
.dif-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(34px, 6vw, 80px); align-items: center; }
.dif-media { position: relative; }
.dif-media img { border-radius: var(--radius); width: 100%; object-fit: cover; box-shadow: 0 30px 60px rgba(33,36,45,.2); }
.dif-media::before {
  content: ""; position: absolute; inset: -14px auto auto -14px; width: 90px; height: 90px;
  border-top: 3px solid var(--accent); border-left: 3px solid var(--accent); border-radius: 6px 0 0 0; z-index: 2;
}
.dif-media-badge {
  position: absolute; right: -10px; bottom: 26px; background: var(--accent); color: var(--white);
  font-family: var(--font-head); font-weight: 600; font-size: .9rem; padding: 12px 22px; border-radius: 999px;
  box-shadow: 0 14px 30px rgba(41,66,40,.35);
}
.dif-text p { color: var(--grey-1); margin-bottom: 16px; }
.dif-text .btn { margin-top: 12px; }

/* ==========================================================================
   INSTAGRAM
   ========================================================================== */
.instagram-section { background: var(--white); text-align: center; }
.instagram-section .section-head { margin-inline: auto; }
.ig-handle { display: inline-flex; gap: 8px; font-family: var(--font-head); font-weight: 600; color: var(--accent); margin-top: 6px; }
.ig-handle:hover .arrow { transform: translateX(5px); }
.ig-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px;
  max-width: 1400px; margin: 44px auto 0; padding-inline: 24px;
}
.ig-item { position: relative; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; }
.ig-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.ig-item::after {
  content: ""; position: absolute; inset: 0; background: rgba(41,66,40,.55);
  opacity: 0; transition: opacity .35s var(--ease);
}
.ig-item:hover img { transform: scale(1.08); }
.ig-item:hover::after { opacity: 1; }

/* ==========================================================================
   CONTATO
   ========================================================================== */
.contato { background: var(--haze); }
.contato .section-head { max-width: 720px; }
.contato-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.contato-card {
  background: var(--white); border: 1px solid var(--grey-4); border-radius: var(--radius);
  padding: 36px 30px; transition: transform .35s var(--ease), box-shadow .35s var(--ease); display: flex; flex-direction: column;
}
.contato-card:hover { transform: translateY(-5px); box-shadow: 0 22px 44px rgba(33,36,45,.12); }
.contato-icon {
  width: 56px; height: 56px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(77,105,76,.12); color: var(--accent); margin-bottom: 22px;
}
.contato-card h3 { font-size: 1.2rem; color: var(--ink); }
.contato-card p { color: var(--grey-2); font-size: .92rem; margin: 4px 0 16px; }
.contato-value { margin-top: auto; font-family: var(--font-head); font-weight: 600; color: var(--accent); font-size: .95rem; display: inline-flex; gap: 6px; align-items: baseline; }
.contato-card:hover .arrow { transform: translateX(4px); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { background: var(--dark-2); color: var(--white); }
.footer-social {
  display: flex; justify-content: center; gap: 14px; padding: 34px 0; border-bottom: 1px solid var(--line);
}
.social-link {
  width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.06); color: rgba(255,255,255,.8); transition: all .3s var(--ease);
}
.social-link:hover { background: var(--accent); color: var(--white); transform: translateY(-3px); }

.footer-main {
  display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap;
  padding: 44px 24px;
}
.footer-brand img { height: 50px; width: auto; }
.footer-nav { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-nav a { font-family: var(--font-head); font-weight: 500; font-size: .95rem; color: rgba(255,255,255,.75); transition: color .25s; }
.footer-nav a:hover { color: var(--white); }

.footer-bottom { border-top: 1px solid var(--line); }
.footer-bottom-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 22px 24px; font-size: .86rem; color: rgba(255,255,255,.55);
}
.credit { color: rgba(255,255,255,.6); transition: color .25s; }
.credit:hover { color: var(--white); }
.credit strong { color: var(--accent-2); }

/* ---------- WhatsApp flutuante ---------- */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 30px rgba(37,211,102,.45); transition: transform .3s var(--ease);
  animation: waPulse 2.6s ease-in-out infinite;
}
.wa-float:hover { transform: scale(1.08); }
@keyframes waPulse { 0%,100%{box-shadow:0 12px 30px rgba(37,211,102,.45);} 50%{box-shadow:0 12px 30px rgba(37,211,102,.45),0 0 0 12px rgba(37,211,102,0);} }

/* ==========================================================================
   REVEAL (IntersectionObserver)
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.cards .card.reveal:nth-child(2), .contato-card.reveal:nth-child(2) { transition-delay: .08s; }
.cards .card.reveal:nth-child(3), .contato-card.reveal:nth-child(3) { transition-delay: .16s; }
.cards .card.reveal:nth-child(4) { transition-delay: .24s; }

/* ==========================================================================
   RESPONSIVO
   ========================================================================== */
@media (max-width: 940px) {
  .nav-menu {
    position: fixed; inset: 0 0 auto 0; top: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(25,27,34,.98); backdrop-filter: blur(14px); padding: 96px 24px 32px;
    transform: translateY(-100%); transition: transform .4s var(--ease); box-shadow: 0 20px 40px rgba(0,0,0,.4);
  }
  .nav-menu.open { transform: translateY(0); }
  .nav-link { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .nav-link::after { display: none; }
  .nav-cta { margin: 22px 0 0; justify-content: center; }
  .menu-toggle { display: flex; z-index: 101; }
  .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); }

  .sobre-grid, .dif-grid { grid-template-columns: 1fr; }
  .dif-media { max-width: 520px; }
  .cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .contato-grid { grid-template-columns: 1fr; }
  /* faixa do Instagram vira rolagem horizontal, mantendo uma linha só */
  .ig-grid {
    display: flex; grid-template-columns: none; gap: 12px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    padding-bottom: 8px; -webkit-overflow-scrolling: touch;
  }
  .ig-item { flex: 0 0 42%; scroll-snap-align: start; }
}
@media (max-width: 560px) {
  .ig-item { flex-basis: 62%; }
  .footer-main { flex-direction: column; text-align: center; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
  .hero { min-height: auto; padding-top: 130px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue span, .wa-float { animation: none; }
  html { scroll-behavior: auto; }
}
