/* ===================================================================
   EG²M — Arquitetura & Engenharia
   Sistema de design: claro, quente, editorial.
   Paleta "Areia & Terracota": creme + areia + terracota, texto café.
   =================================================================== */

:root {
  /* Superfícies claras */
  --paper:   #fdfbf7;   /* cartões / mais claro */
  --cream:   #fbf8f2;   /* base da página / hero */
  --bone:    #f4efe5;   /* seção alternada */
  --sand:    #efe7da;   /* faixa / superfície */
  --sand-2:  #e7dcc9;   /* areia mais profunda (hover/bordas) */

  /* Texto (café — sem preto) */
  --ink:      #3a322a;
  --ink-soft: #52483c;
  --espresso: #2c2620;  /* rodapé quente */
  --muted:    #847868;
  --muted-2:  #9c9081;
  --on-dark:  #ece3d4;  /* texto sobre o café do rodapé */

  /* Acento terracota */
  --terra:    #c06e4f;
  --terra-dk: #a4583c;
  --terra-lt: #d99e82;

  /* Linhas */
  --line:    #e5ddcd;
  --line-2:  #d8cdb8;
  --grid:    rgba(192,110,79,.10);  /* grelha do hero sobre claro */

  /* Tipografia */
  --serif: "Fraunces", "Times New Roman", serif;
  --sans:  "Jost", "Century Gothic", "Futura", system-ui, sans-serif;

  /* Métricas */
  --container: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 4px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --header-h: 78px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
sup { font-size: .62em; vertical-align: super; }
::selection { background: var(--terra); color: #fff; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(72px, 11vw, 150px); }
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 90px);
  align-items: start;
}

/* ---------- Tipografia utilitária ---------- */
.eyebrow {
  font-size: .74rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--terra-dk);
  font-weight: 500;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: .8rem;
}
.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--terra);
  display: inline-block;
}
/* modificadores antigos mantidos por compatibilidade (agora sobre fundo claro) */
.eyebrow-light { color: var(--terra-dk); }
.eyebrow-light::before { background: var(--terra); }

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -.01em;
  color: var(--ink);
  max-width: 18ch;
}
.section-title-light { color: var(--ink); }
.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 70px); }
.section-intro { color: var(--muted); margin-top: 1.4rem; font-size: 1.06rem; max-width: 56ch; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  font-family: var(--sans);
  font-weight: 500;
  font-size: .9rem;
  letter-spacing: .03em;
  padding: .95em 1.8em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .35s var(--ease);
  white-space: nowrap;
}
.btn-solid { background: var(--terra); color: #fff; }
.btn-solid:hover { background: var(--terra-dk); transform: translateY(-2px); box-shadow: 0 14px 26px -14px rgba(164,88,60,.6); }
.btn-line { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--ink);
  padding: .7em 1.4em;
  font-size: .85rem;
}
.btn-ghost:hover { border-color: var(--terra); color: var(--terra-dk); }
.btn-block { width: 100%; }

/* ===================================================================
   HEADER
   =================================================================== */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--terra), var(--terra-lt));
  z-index: 1000; transition: width .1s linear;
}
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background .4s var(--ease), box-shadow .4s var(--ease), height .4s var(--ease);
}
.site-header.scrolled {
  background: rgba(251,248,242,.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 var(--line);
  height: 66px;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; width: 100%; }

.brand { display: flex; flex-direction: column; line-height: 1; }
.site-header .brand {
  align-self: flex-start;            /* ancora no topo: a logo cresce por cima do hero, sem mexer no header */
  margin-top: 6px;
  margin-left: calc(-1 * clamp(6px, 1.6vw, 30px)); /* aproxima do canto da tela */
}
.brand-logo {
  height: 104px;
  width: auto;
  display: block;
  transition: height .4s var(--ease);
}
.site-header.scrolled .brand-logo { height: 56px; }
.brand-mark {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 3.5rem;
  letter-spacing: .02em;
  color: var(--ink);
}
.brand-mark sup { color: var(--terra); font-weight: 600; }
.brand-sub {
  font-size: .58rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: .35rem;
}

.nav { display: flex; gap: 2.2rem; margin-left: auto; margin-right: 1.5rem; }
.nav a {
  font-size: .88rem;
  font-weight: 400;
  letter-spacing: .02em;
  color: var(--ink-soft);
  position: relative;
  padding-block: .4rem;
  transition: color .3s var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--terra);
  transition: width .35s var(--ease);
}
.nav a:hover { color: var(--terra-dk); }
.nav a:hover::after, .nav a.active::after { width: 100%; }
.nav a.active { color: var(--terra-dk); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 8px; z-index: 950;
}
.nav-toggle span {
  width: 26px; height: 2px; background: var(--ink);
  transition: transform .35s var(--ease), opacity .25s var(--ease), background .3s var(--ease);
}
.nav-toggle.open span { background: var(--cream); }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===================================================================
   HERO (claro)
   =================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(125% 105% at 82% 12%, #fff 0%, var(--cream) 42%, var(--sand) 100%);
  color: var(--ink);
  /* margem de proteção: respiro no topo (header) e na base (antes da seção Escritório) */
  padding-top: calc(var(--header-h) + clamp(28px, 6vh, 64px));
  padding-bottom: clamp(96px, 16vh, 168px);
  overflow: hidden;
}
/* Grelha técnica / planta */
.hero-grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(110% 90% at 80% 0%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(110% 90% at 80% 0%, #000 0%, transparent 78%);
}
.hero::after {
  content: "";
  position: absolute; right: -8%; top: 50%; transform: translateY(-50%);
  width: 46vw; height: 46vw; max-width: 640px; max-height: 640px;
  border: 1px solid rgba(192,110,79,.16);
  border-radius: 50%;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; max-width: 920px; }

.hero-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.6rem, 7vw, 5.3rem);
  line-height: 1.02;
  letter-spacing: -.015em;
  margin-bottom: 1.8rem;
  color: var(--ink);
}
.hero-title em { font-style: italic; color: var(--terra); font-weight: 400; }
.hero-tagline {
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--terra-dk);
  margin-bottom: 1.1rem;
}
.hero-lead {
  font-size: clamp(1.02rem, 1.5vw, 1.25rem);
  color: var(--muted);
  max-width: 60ch;
  margin-bottom: 2.6rem;
  font-weight: 400;
}
.hero-lead strong { color: var(--ink-soft); font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 4rem; }

.hero-stats {
  display: flex; flex-wrap: wrap;
  gap: clamp(28px, 5vw, 64px);
  border-top: 1px solid var(--line-2);
  padding-top: 2.2rem;
}
.hero-stats li { display: flex; flex-direction: column; gap: .35rem; max-width: 200px; }
.hero-stats strong {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.5vw, 2.9rem);
  font-weight: 300;
  color: var(--terra-dk);
  line-height: 1;
}
.hero-stats span { font-size: .82rem; color: var(--muted); letter-spacing: .01em; }

.scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 1px solid var(--line-2); border-radius: 14px;
  display: flex; justify-content: center; padding-top: 8px; z-index: 2;
}
.scroll-hint span {
  width: 3px; height: 8px; border-radius: 2px; background: var(--terra);
  animation: scrollDot 1.8s infinite;
}
@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { opacity: 0; }
}

/* ===================================================================
   SOBRE
   =================================================================== */
.sobre { background: var(--cream); }
.sobre-text p { color: var(--muted); font-size: 1.08rem; margin-bottom: 1.3rem; }
.sobre-text strong { color: var(--ink); font-weight: 500; }
.founders {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
  margin-top: 2.4rem; padding-top: 2rem; border-top: 1px solid var(--line);
}
.founder { display: flex; flex-direction: column; gap: .25rem; }
.founder-name { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); }
.founder-role { font-size: .8rem; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; }

/* ===================================================================
   SERVIÇOS
   =================================================================== */
.servicos { background: var(--bone); border-top: 1px solid var(--line); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.service-card {
  background: var(--paper);
  padding: 2.4rem 2rem;
  display: flex; flex-direction: column;
  gap: .9rem;
  position: relative;
  transition: background .4s var(--ease);
  min-height: 220px;
}
.service-card:hover { background: var(--terra); }
.service-card .sc-num {
  font-family: var(--serif);
  font-size: .9rem;
  color: var(--terra);
  letter-spacing: .05em;
  transition: color .4s var(--ease);
}
.service-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.32rem;
  line-height: 1.2;
  color: var(--ink);
  transition: color .4s var(--ease);
}
.service-card p {
  font-size: .92rem;
  color: var(--muted);
  transition: color .4s var(--ease);
  margin-top: auto;
}
.service-card .sc-line {
  width: 28px; height: 2px; background: var(--terra);
  transition: width .4s var(--ease), background .4s var(--ease);
}
.service-card:hover h3,
.service-card:hover .sc-num { color: #fff; }
.service-card:hover p { color: rgba(255,255,255,.86); }
.service-card:hover .sc-line { width: 52px; background: rgba(255,255,255,.9); }

/* ===================================================================
   PROCESSO (faixa areia clara)
   =================================================================== */
.processo { background: var(--sand); color: var(--ink); }
.process-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-2);
  border: 1px solid var(--line-2);
}
.process-list li {
  background: var(--paper);
  padding: 2.6rem 1.8rem;
  display: flex; flex-direction: column; gap: 1rem;
  transition: background .4s var(--ease);
}
.process-list li:hover { background: #fff; }
.process-num {
  font-family: var(--serif);
  font-size: 2.6rem;
  font-weight: 300;
  color: var(--terra);
  line-height: 1;
}
.process-list h3 { font-family: var(--serif); font-weight: 400; font-size: 1.28rem; color: var(--ink); }
.process-list p { font-size: .9rem; color: var(--muted); }

/* ===================================================================
   DIFERENCIAIS
   =================================================================== */
.diferenciais { background: var(--cream); }
.diff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}
.diff-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.4rem 2rem;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
  position: relative;
  overflow: hidden;
}
.diff-card::before {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
  background: var(--terra); transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
}
.diff-card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px -28px rgba(58,50,42,.32); border-color: var(--terra-lt); }
.diff-card:hover::before { transform: scaleX(1); }
.diff-card h3 { font-family: var(--serif); font-weight: 500; font-size: 1.3rem; margin-bottom: .8rem; color: var(--ink); }
.diff-card p { color: var(--muted); font-size: .96rem; }

/* ===================================================================
   CONTATO (faixa areia clara)
   =================================================================== */
.contato { background: var(--bone); color: var(--ink); padding-bottom: 0; border-top: 1px solid var(--line); }
.contato-inner { padding-bottom: clamp(56px, 8vw, 96px); }
.contato-lead { color: var(--muted); font-size: 1.08rem; margin: 1.6rem 0 2.6rem; max-width: 48ch; }
.contato-blocks { display: flex; flex-direction: column; gap: 2rem; }
.contato-people { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem; }
.contato-block { display: flex; flex-direction: column; gap: .4rem; }
.cb-label { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--terra-dk); }
.cb-value { font-family: var(--serif); font-size: 1.32rem; color: var(--ink); line-height: 1.3; transition: color .3s var(--ease); }
a.cb-value:hover { color: var(--terra-dk); }
.cb-tag { font-size: .82rem; color: var(--terra-dk); margin-top: .2rem; transition: color .3s var(--ease); }
.cb-tag:hover { color: var(--terra); }

.contato-form-wrap {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.8rem, 3vw, 2.6rem);
  box-shadow: 0 30px 60px -40px rgba(58,50,42,.35);
}
.form-title { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; color: var(--ink); margin-bottom: 1.6rem; }
.field { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.2rem; }
.field label { font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  font-family: var(--sans);
  font-size: .96rem;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
  resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--terra); background: #fff;
  box-shadow: 0 0 0 3px rgba(192,110,79,.16);
}
.field select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23c06e4f' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.4rem; }
.form-note { font-size: .78rem; color: var(--muted); margin-top: 1rem; text-align: center; }

.map-wrap { height: clamp(280px, 40vw, 460px); width: 100%; filter: grayscale(.35) sepia(.12) contrast(1.02); border-top: 1px solid var(--line); }
.map-wrap iframe { display: block; }

/* ===================================================================
   FOOTER (café quente — ancora visual)
   =================================================================== */
.site-footer { background: var(--espresso); color: var(--muted-2); padding-top: clamp(48px, 7vw, 80px); }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.6rem;
  border-bottom: 1px solid rgba(236,227,212,.12);
  align-items: start;
}
.footer-brand .brand-mark { color: var(--on-dark); font-size: 1.7rem; }
.footer-brand .brand-mark sup { color: var(--terra-lt); }
.footer-brand .brand-sub { color: var(--muted-2); }
.footer-logo { height: 68px; width: auto; display: block; }
.footer-nav { display: flex; flex-direction: column; gap: .7rem; }
.footer-nav a { font-size: .92rem; color: var(--on-dark); transition: color .3s var(--ease); }
.footer-nav a:hover { color: var(--terra-lt); }
.footer-meta { font-size: .92rem; line-height: 1.9; color: var(--muted-2); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
  padding-block: 1.8rem;
  font-size: .82rem; color: var(--muted-2);
}
.back-top { transition: color .3s var(--ease); }
.back-top:hover { color: var(--terra-lt); }

/* ===================================================================
   WHATSAPP FLUTUANTE
   =================================================================== */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 800;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 30px -8px rgba(37,211,102,.6);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.wa-float:hover { transform: translateY(-4px) scale(1.05); }

/* ===================================================================
   REVEAL (scroll)
   =================================================================== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ===================================================================
   RESPONSIVO
   =================================================================== */
@media (max-width: 980px) {
  .process-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .grid-2 { grid-template-columns: 1fr; }
  .header-cta { display: none; }
  .brand-logo { height: 84px; }
  .site-header.scrolled .brand-logo { height: 48px; }
  .nav-toggle { display: flex; }
  .nav {
    position: fixed; inset: 0; top: 0;
    flex-direction: column; justify-content: center; align-items: center;
    gap: 2rem; margin: 0;
    background: rgba(44,38,32,.97);
    backdrop-filter: blur(8px);
    transform: translateX(100%);
    transition: transform .5s var(--ease);
  }
  .nav.open { transform: none; }
  .nav a { color: var(--on-dark); font-size: 1.4rem; font-family: var(--serif); }
  .nav a::after { background: var(--terra-lt); }
}
@media (max-width: 620px) {
  .process-list { grid-template-columns: 1fr; }
  .founders, .contato-people { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.8rem; }
  .hero-stats li { max-width: none; flex: 1 1 100%; }
  .hero::after { display: none; }
}
