/* ==========================================================================
   JAC Engenharia e Construções — site estático
   Paleta da marca (Manual de Identidade Visual, Ago 2011):
     castanho  #896C64   creme  #FDE9C8
   Acento quente derivado dos cabeçalhos do manual.
   ========================================================================== */

:root {
  --brown: #896C64;
  --brown-dark: #5b463f;
  --brown-darker: #3d2f2a;
  --cream: #fde9c8;
  --cream-soft: #fbf4ea;
  --cream-line: #efe2cf;
  --accent: #e0913f;
  --accent-dark: #c5772a;
  --ink: #2c2420;
  --muted: #7c6f66;
  --white: #ffffff;

  --maxw: 1180px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(61, 47, 42, .07);
  --shadow-md: 0 14px 40px rgba(61, 47, 42, .12);
  --shadow-lg: 0 30px 70px rgba(61, 47, 42, .18);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream-soft);
  line-height: 1.65;
  font-size: 17px;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 26px; }
.section { padding: 104px 0; position: relative; }
.section--tint { background: var(--white); }
.section--brown {
  background: linear-gradient(160deg, var(--brown-dark), var(--brown-darker));
  color: var(--cream);
}
.eyebrow {
  display: inline-block;
  font-size: .80rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 16px;
}
.section--brown .eyebrow { color: var(--accent); }
.section-title {
  font-size: clamp(1.9rem, 3.6vw, 2.85rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--brown-darker);
  max-width: 16ch;
}
.section--brown .section-title { color: var(--cream); }
.section-lead {
  margin-top: 20px;
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 60ch;
}
.section--brown .section-lead { color: rgba(253, 233, 200, .82); }
.center { text-align: center; }
.center .section-title, .center .section-lead { margin-left: auto; margin-right: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .98rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .25s, color .25s;
  will-change: transform;
}
.btn:hover { transform: translateY(-3px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 10px 26px rgba(224, 145, 63, .38); }
.btn--primary:hover { background: var(--accent-dark); box-shadow: 0 16px 34px rgba(197, 119, 42, .45); }
.btn--ghost { border-color: rgba(253, 233, 200, .45); color: var(--cream); }
.btn--ghost:hover { background: rgba(253, 233, 200, .12); }
.btn--outline { border-color: var(--brown); color: var(--brown-dark); }
.btn--outline:hover { background: var(--brown); color: #fff; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding: 18px 0;
  transition: background .4s var(--ease), padding .4s var(--ease), box-shadow .4s var(--ease);
}
.site-header.scrolled {
  background: rgba(251, 244, 234, .92);
  backdrop-filter: blur(12px);
  padding: 10px 0;
  box-shadow: var(--shadow-sm);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand img { width: 46px; height: 46px; transition: width .3s var(--ease); }
.brand-name { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name strong { font-size: 1.18rem; font-weight: 800; color: var(--brown-darker); letter-spacing: .01em; }
.brand-name span { font-size: .62rem; letter-spacing: .26em; text-transform: uppercase; color: var(--brown); font-weight: 600; }
/* light header over hero before scroll */
.site-header:not(.scrolled) .brand-name strong { color: var(--cream); }
.site-header:not(.scrolled) .brand-name span { color: rgba(253, 233, 200, .8); }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-size: .95rem; font-weight: 600; color: var(--brown-darker);
  position: relative; padding: 4px 0; transition: color .25s;
}
.site-header:not(.scrolled) .nav-links > li > a { color: rgba(253, 233, 200, .92); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--accent); transition: width .3s var(--ease);
}
.nav-links a:hover::after { width: 100%; }

.nav-right { display: flex; align-items: center; gap: 18px; }
.lang-switch { display: flex; gap: 4px; align-items: center; font-weight: 700; font-size: .85rem; }
.lang-switch a { color: var(--muted); padding: 4px 7px; border-radius: 7px; transition: .2s; }
.lang-switch a.active { color: #fff; background: var(--brown); }
.site-header:not(.scrolled) .lang-switch a { color: rgba(253, 233, 200, .7); }
.site-header:not(.scrolled) .lang-switch a.active { background: var(--accent); color: #fff; }
.nav-cta { }
.site-header:not(.scrolled) .nav-cta.btn--outline { border-color: rgba(253,233,200,.5); color: var(--cream); }
.site-header:not(.scrolled) .nav-cta.btn--outline:hover { background: rgba(253,233,200,.14); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 30px; height: 24px; position: relative; }
.nav-toggle span { position: absolute; left: 0; height: 2.5px; width: 100%; background: var(--brown-darker); border-radius: 2px; transition: .3s var(--ease); }
.site-header:not(.scrolled) .nav-toggle span { background: var(--cream); }
.nav-toggle span:nth-child(1) { top: 2px; }
.nav-toggle span:nth-child(2) { top: 11px; }
.nav-toggle span:nth-child(3) { top: 20px; }
body.menu-open .nav-toggle span:nth-child(1) { top: 11px; transform: rotate(45deg); }
body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav-toggle span:nth-child(3) { top: 11px; transform: rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  color: var(--cream);
  background:
    linear-gradient(125deg, rgba(45,36,32,.92) 0%, rgba(91,70,63,.78) 45%, rgba(224,145,63,.42) 100%),
    radial-gradient(1200px 600px at 78% 18%, rgba(224,145,63,.30), transparent 60%),
    #3d2f2a;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -180px; top: 50%; transform: translateY(-50%);
  width: 760px; height: 760px;
  background: url("../assets/img/logo-watermark.png") center/contain no-repeat;
  opacity: .08; pointer-events: none;
  animation: spin 90s linear infinite;
}
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }
.hero-inner { position: relative; z-index: 2; padding: 140px 0 90px; max-width: 760px; }
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.3rem); line-height: 1.05; font-weight: 800;
  letter-spacing: -.02em; margin-bottom: 24px;
}
.hero h1 .hl { color: var(--accent); }
.hero p.lead { font-size: clamp(1.08rem, 2vw, 1.3rem); color: rgba(253,233,200,.88); max-width: 56ch; margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.hero-scroll {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 2;
  font-size: .72rem; letter-spacing: .25em; text-transform: uppercase; color: rgba(253,233,200,.6);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hero-scroll::after { content: ""; width: 1px; height: 38px; background: linear-gradient(rgba(253,233,200,.6), transparent); animation: drop 1.8s ease-in-out infinite; }
@keyframes drop { 0%,100% { opacity: .3; } 50% { opacity: 1; } }

/* ---------- stats ---------- */
.stats { background: var(--brown-darker); color: var(--cream); }
.stats .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; padding-top: 56px; padding-bottom: 56px; }
.stat { text-align: center; padding: 8px 6px; position: relative; }
.stat:not(:last-child)::after { content: ""; position: absolute; right: -15px; top: 14%; height: 72%; width: 1px; background: rgba(253,233,200,.16); }
.stat .num { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; color: var(--accent); line-height: 1; }
.stat .num small { font-size: .55em; }
.stat .label { margin-top: 10px; font-size: .9rem; color: rgba(253,233,200,.78); letter-spacing: .02em; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.about-text p { margin-bottom: 18px; color: #5a4f47; }
.about-text p.note {
  margin-top: 26px; padding: 18px 22px; border-left: 4px solid var(--accent);
  background: var(--cream-soft); border-radius: 0 12px 12px 0; font-size: .96rem; color: var(--muted);
}
.about-visual { position: relative; }
.about-card {
  background: linear-gradient(155deg, var(--brown), var(--brown-dark)); color: var(--cream);
  border-radius: var(--radius-lg); padding: 42px 38px; box-shadow: var(--shadow-md);
  position: relative; overflow: hidden;
}
.about-card::before {
  content: ""; position: absolute; right: -60px; bottom: -60px; width: 230px; height: 230px;
  background: url("../assets/img/logo-watermark.png") center/contain no-repeat; opacity: .14;
}
.about-card h3 { font-size: 1.35rem; margin-bottom: 18px; position: relative; }
.about-values { display: grid; gap: 14px; position: relative; }
.about-values li { display: flex; gap: 12px; align-items: flex-start; font-size: .98rem; color: rgba(253,233,200,.9); }
.about-values li b { color: #fff; }
.tick { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: .7rem; margin-top: 3px; }

/* ---------- services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 56px; }
.service-card {
  background: var(--white); border: 1px solid var(--cream-line); border-radius: var(--radius);
  padding: 36px 30px; box-shadow: var(--shadow-sm);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s;
  position: relative; overflow: hidden;
}
.service-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease);
}
.service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); border-color: transparent; }
.service-card:hover::before { transform: scaleX(1); }
.service-ico {
  width: 56px; height: 56px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 22px;
  background: linear-gradient(145deg, var(--cream), var(--cream-line)); color: var(--brown-dark);
}
.service-ico svg { width: 28px; height: 28px; }
.service-card h3 { font-size: 1.22rem; color: var(--brown-darker); margin-bottom: 12px; }
.service-card p { font-size: .97rem; color: var(--muted); }
.service-tag {
  display: inline-block; margin-top: 16px; font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent-dark); background: rgba(224,145,63,.10);
  padding: 5px 12px; border-radius: 999px;
}

/* ---------- portfolio ---------- */
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px; }
.project {
  position: relative; border-radius: var(--radius); overflow: hidden; min-height: 320px;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 28px;
  color: #fff; box-shadow: var(--shadow-sm);
  background: linear-gradient(160deg, var(--brown), var(--brown-darker));
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.project:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.project::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(45,36,32,.85), rgba(45,36,32,.15)); z-index: 1; }
.project--a { background-image: linear-gradient(160deg, rgba(91,70,63,.5), rgba(61,47,42,.5)), url("../assets/img/proj-ernesto.jpg"); background-size: cover; background-position: center; }
.project--b { background-image: linear-gradient(160deg, rgba(91,70,63,.5), rgba(61,47,42,.5)), url("../assets/img/proj-azuaga.jpg"); background-size: cover; background-position: center; }
.project--c { background-image: linear-gradient(160deg, rgba(91,70,63,.5), rgba(61,47,42,.5)), url("../assets/img/proj-coevo.jpg"); background-size: cover; background-position: center; }
.project > * { position: relative; z-index: 2; }
.project .kicker { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.project h3 { font-size: 1.5rem; margin-bottom: 6px; }
.project p { font-size: .92rem; color: rgba(253,233,200,.85); }
.project .arrow { position: absolute; top: 26px; right: 26px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; background: rgba(253,233,200,.16); display: grid; place-items: center; transition: .3s var(--ease); }
.project:hover .arrow { background: var(--accent); transform: rotate(-45deg); }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; }
.contact-info h3 { font-size: 1.4rem; color: var(--cream); margin-bottom: 26px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 24px; }
.contact-item .ci-ico { flex: none; width: 46px; height: 46px; border-radius: 12px; background: rgba(224,145,63,.18); color: var(--accent); display: grid; place-items: center; }
.contact-item .ci-ico svg { width: 22px; height: 22px; }
.contact-item .ci-label { font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; color: rgba(253,233,200,.6); margin-bottom: 3px; }
.contact-item a, .contact-item p { color: var(--cream); font-size: 1.02rem; }
.contact-item a:hover { color: var(--accent); }

.contact-form { background: var(--cream-soft); border-radius: var(--radius-lg); padding: 38px; box-shadow: var(--shadow-md); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .82rem; font-weight: 600; color: var(--brown-dark); margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--cream-line); border-radius: 11px;
  font-family: inherit; font-size: .97rem; color: var(--ink); background: #fff; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(224,145,63,.15); }
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: .82rem; color: var(--muted); margin-top: 6px; }

/* ---------- footer ---------- */
.site-footer { background: #2a201c; color: rgba(253,233,200,.72); padding: 64px 0 28px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(253,233,200,.12); }
.footer-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.footer-brand img { width: 50px; height: 50px; }
.footer-brand strong { font-size: 1.15rem; color: var(--cream); }
.footer-about p { font-size: .94rem; max-width: 42ch; }
.footer-col h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); margin-bottom: 18px; }
.footer-col li { margin-bottom: 11px; }
.footer-col a { font-size: .95rem; transition: color .2s; }
.footer-col a:hover { color: var(--cream); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 24px; font-size: .85rem; }
.footer-bottom .legal { color: rgba(253,233,200,.5); }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .services-grid, .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .stats .container { grid-template-columns: repeat(2, 1fr); gap: 36px 20px; }
  .stat:nth-child(2)::after { display: none; }
}
@media (max-width: 760px) {
  .nav-links {
    position: fixed; inset: 0 0 0 auto; width: min(80vw, 320px);
    background: var(--brown-darker); flex-direction: column; align-items: flex-start;
    padding: 100px 34px 40px; gap: 22px; transform: translateX(100%); transition: transform .4s var(--ease);
    box-shadow: var(--shadow-lg);
  }
  body.menu-open .nav-links { transform: none; }
  .nav-links > li > a, .site-header:not(.scrolled) .nav-links > li > a { color: var(--cream); font-size: 1.1rem; }
  .nav-toggle { display: block; z-index: 110; }
  .nav-cta { display: none; }
  .section { padding: 76px 0; }
  .services-grid, .portfolio-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 30px; }
  .hero::after { width: 460px; right: -160px; }
}
