/* ==========================================================================
   GRUPO OLIVEIRA — Empreendimentos Imobiliários
   Identidade: vinho + bege, tipografia serifada institucional, parallax.
   ========================================================================== */

:root {
  --vinho-950: #2E0810;
  --vinho-900: #4A0E17;
  --vinho-800: #6B1424;
  --vinho-700: #7F1B2E;
  --vinho-600: #9A2A3D;
  --vinho-500: #B23A50;

  --gold: #C9A15A;
  --gold-light: #E4C98A;

  --bege-50: #FBF7EF;
  --bege-100: #F5EEDF;
  --bege-200: #EAE0C9;
  --bege-300: #DCCBA3;

  --ink: #2A1A16;
  --ink-soft: #5A423C;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Poppins', Arial, sans-serif;

  --container: 1180px;
  --radius: 4px;
  --shadow-soft: 0 20px 50px -20px rgba(46, 8, 16, 0.35);
  --shadow-card: 0 12px 30px -12px rgba(46, 8, 16, 0.25);

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bege-50);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--vinho-900); line-height: 1.15; font-weight: 700; }

::selection { background: var(--gold); color: var(--vinho-950); }

/* Grão sutil global (imagem WebP tileável) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url('../img/texture-grain.webp') repeat;
  opacity: .05;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: multiply;
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1.is-visible { transition-delay: .12s; }
.reveal-delay-2.is-visible { transition-delay: .24s; }
.reveal-delay-3.is-visible { transition-delay: .36s; }

/* ---------- Eyebrow / kicker ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 30px; height: 1px; background: var(--gold); display: inline-block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .5px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s var(--ease), color .35s var(--ease);
}
.btn-primary { background: var(--gold); color: var(--vinho-950); }
.btn-primary:hover { background: var(--gold-light); transform: translateY(-3px); box-shadow: 0 14px 28px -10px rgba(201,161,90,.55); }
.btn-outline { border: 1.5px solid var(--bege-200); color: var(--bege-50); }
.btn-outline:hover { background: rgba(245,238,223,.12); transform: translateY(-3px); }
.btn-dark { background: var(--vinho-900); color: var(--bege-50); }
.btn-dark:hover { background: var(--vinho-800); transform: translateY(-3px); box-shadow: var(--shadow-card); }
.btn-block { width: 100%; justify-content: center; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 22px 0;
  transition: background .4s var(--ease), padding .4s var(--ease), box-shadow .4s var(--ease);
}
.header .container { display: flex; align-items: center; justify-content: space-between; }
.header.is-scrolled {
  background: rgba(251, 247, 239, .92);
  backdrop-filter: blur(10px);
  padding: 12px 0;
  box-shadow: 0 8px 30px -14px rgba(46,8,16,.25);
}
.header .logo-dark { display: none; }
.header .logo-light { display: block; }
.header.is-scrolled .logo-dark { display: block; }
.header.is-scrolled .logo-light { display: none; }
.header .logo-mark { width: 190px; height: auto; transition: width .35s var(--ease); }
.header.is-scrolled .logo-mark { width: 160px; }

.nav { display: flex; align-items: center; gap: 40px; }
.nav-links { display: flex; gap: 34px; }
.nav-links a {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .5px;
  color: var(--bege-100);
  position: relative;
  padding: 6px 0;
  transition: color .3s;
}
.nav-links a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 0; height: 1.5px;
  background: var(--gold);
  transition: width .3s var(--ease);
}
.nav-links a:hover::after { width: 100%; }
.header.is-scrolled .nav-links a { color: var(--vinho-900); }
.header.is-scrolled .nav-links a:hover { color: var(--vinho-700); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 30px; z-index: 1100; }
.nav-toggle span { height: 2px; background: var(--bege-100); border-radius: 2px; transition: all .3s var(--ease); }
.header.is-scrolled .nav-toggle span { background: var(--vinho-900); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--vinho-950);
}
.hero-layer {
  position: absolute;
  inset: -10% -10% -10% -10%;
  background-size: cover;
  background-position: center;
  will-change: transform;
}
.hero-layer--sky { background-image: url('../img/hero-sky.webp'); }
.hero-layer--arches { background-image: url('../img/hero-arches.webp'); background-position: bottom; opacity: .5; }
.hero-layer--skyline { background-image: url('../img/hero-skyline.webp'); background-position: bottom; bottom: -10%; }
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(46,8,16,.35) 0%, rgba(46,8,16,.55) 55%, rgba(46,8,16,.92) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 120px;
  max-width: 760px;
}
.hero .eyebrow { color: var(--gold-light); }
.hero h1 {
  font-size: clamp(38px, 5.4vw, 68px);
  color: var(--bege-50);
  margin-bottom: 22px;
}
.hero h1 em { color: var(--gold-light); font-style: normal; }
.hero p.lead {
  color: var(--bege-200);
  font-size: 17.5px;
  max-width: 560px;
  margin-bottom: 38px;
}
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 70px; }

.hero-stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  border-top: 1px solid rgba(245,238,223,.18);
  padding-top: 30px;
  max-width: 900px;
}
.stat-num { font-family: var(--font-display); font-size: 34px; color: var(--gold-light); font-weight: 700; }
.stat-label { font-size: 12.5px; color: var(--bege-200); letter-spacing: .5px; margin-top: 4px; }

.scroll-cue {
  position: absolute;
  bottom: 34px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--bege-200);
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
}
.scroll-cue .line { width: 1px; height: 34px; background: linear-gradient(var(--gold), transparent); animation: scrollcue 1.8s infinite; }
@keyframes scrollcue { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ==========================================================================
   SEÇÃO GENÉRICA
   ========================================================================== */
.section { padding: 120px 0; position: relative; }
.section-head { max-width: 620px; margin-bottom: 64px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 42px); }
.section-head p { color: var(--ink-soft); margin-top: 16px; font-size: 16px; }

/* ---------- SOBRE ---------- */
.about {
  background-image: url('../img/about-pattern.webp');
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
}
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.about-visual { position: relative; }
.about-card {
  background: var(--vinho-900);
  border-radius: var(--radius);
  padding: 46px 40px;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}
.about-card::after {
  content: "";
  position: absolute; inset: 0;
  background: url('../img/hero-arches.webp') bottom/cover no-repeat;
  opacity: .35;
}
.about-card-inner { position: relative; z-index: 1; }
.about-card .cnpj-line { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid rgba(245,238,223,.15); color: var(--bege-100); font-size: 14px; }
.about-card .cnpj-line span:first-child { color: var(--bege-200); opacity: .75; }
.about-card .cnpj-line:last-child { border-bottom: none; }
.about-card h3 { color: var(--gold-light); font-size: 20px; margin-bottom: 18px; }

.about-body p { color: var(--ink-soft); margin-bottom: 18px; font-size: 15.5px; }
.about-body p strong { color: var(--vinho-800); }
.about-values { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 34px; }
.value-item { border-left: 2px solid var(--gold); padding-left: 16px; }
.value-item h4 { font-size: 15.5px; color: var(--vinho-800); margin-bottom: 4px; }
.value-item p { font-size: 13.5px; color: var(--ink-soft); }

/* ---------- ÁREAS DE ATUAÇÃO ---------- */
.services { background: var(--bege-50); }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.service-card {
  background: var(--bege-100);
  border: 1px solid var(--bege-200);
  border-radius: var(--radius);
  padding: 40px 32px;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), background .45s var(--ease);
  position: relative;
}
.service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-card); background: var(--bege-50); }
.service-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--vinho-900);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
}
.service-icon svg { width: 26px; height: 26px; stroke: var(--gold-light); }
.service-card h3 { font-size: 19px; margin-bottom: 12px; }
.service-card p { font-size: 14.5px; color: var(--ink-soft); }
.service-card .tag {
  display: inline-block; margin-top: 18px; font-size: 11px; letter-spacing: 1.2px;
  color: var(--vinho-700); text-transform: uppercase; font-weight: 600;
  border: 1px solid var(--vinho-700); border-radius: 20px; padding: 5px 12px;
}

/* ---------- DIFERENCIAIS ---------- */
.diff { background: var(--vinho-950); position: relative; overflow: hidden; }
.diff::before {
  content: ""; position: absolute; inset: 0;
  background: url('../img/hero-arches.webp') center/cover no-repeat;
  opacity: .3;
}
.diff .section-head h2, .diff .section-head p { color: var(--bege-100); }
.diff .section-head p { color: var(--bege-200); }
.diff-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.diff-item { text-align: center; padding: 20px; }
.diff-num { font-family: var(--font-display); font-size: 42px; color: var(--gold); margin-bottom: 12px; }
.diff-item h4 { color: var(--bege-50); font-size: 16px; margin-bottom: 10px; }
.diff-item p { color: var(--bege-200); font-size: 13.5px; }

/* ---------- UNIDADES ---------- */
.branches { background: var(--bege-50); }
.branches-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.branch-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  box-shadow: var(--shadow-card);
}
.branch-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform .7s var(--ease);
}
.branch-card:hover .branch-bg { transform: scale(1.08); }
.branch-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(46,8,16,0) 20%, rgba(46,8,16,.92) 100%); }
.branch-content { position: relative; z-index: 1; padding: 32px; color: var(--bege-50); width: 100%; }
.branch-content .eyebrow { color: var(--gold-light); margin-bottom: 8px; }
.branch-content h3 { color: var(--bege-50); font-size: 22px; margin-bottom: 10px; }
.branch-content address { font-style: normal; font-size: 13.5px; color: var(--bege-200); margin-bottom: 6px; line-height: 1.5; }
.branch-content .cnpj { font-size: 12.5px; color: var(--gold-light); letter-spacing: .3px; }

/* ---------- CTA / CONTATO ---------- */
.contact {
  background-image: url('../img/cta-bg.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--bege-50);
}
.contact .section-head p { color: var(--bege-200); }
.contact .section-head h2 { color: var(--bege-50); }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; }

.contact-info-item { display: flex; gap: 16px; margin-bottom: 30px; }
.contact-info-item .ico {
  width: 44px; height: 44px; flex: none; border-radius: 50%;
  background: rgba(201,161,90,.14); border: 1px solid rgba(201,161,90,.35);
  display: flex; align-items: center; justify-content: center;
}
.contact-info-item .ico svg { width: 19px; height: 19px; stroke: var(--gold-light); }
.contact-info-item h4 { font-size: 15px; color: var(--bege-50); margin-bottom: 4px; }
.contact-info-item p, .contact-info-item a { font-size: 13.5px; color: var(--bege-200); }
.contact-info-item a:hover { color: var(--gold-light); }

.contact-form {
  background: rgba(251,247,239,.06);
  border: 1px solid rgba(245,238,223,.16);
  backdrop-filter: blur(6px);
  border-radius: var(--radius);
  padding: 42px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 12.5px; letter-spacing: .5px; color: var(--bege-200); margin-bottom: 8px; text-transform: uppercase; }
.field input, .field select, .field textarea {
  width: 100%;
  background: rgba(251,247,239,.06);
  border: 1px solid rgba(245,238,223,.25);
  border-radius: var(--radius);
  padding: 13px 14px;
  color: var(--bege-50);
  font-family: var(--font-body);
  font-size: 14.5px;
  transition: border-color .3s, background .3s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: rgba(245,238,223,.4); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); background: rgba(251,247,239,.1); }
.field select option { color: var(--ink); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #d9534f; }
.field-error { font-size: 12px; color: #ffb4b0; margin-top: 6px; display: none; }
.field.has-error .field-error { display: block; }

.form-msg { margin-top: 18px; padding: 14px 16px; border-radius: var(--radius); font-size: 14px; display: none; }
.form-msg.show { display: block; }
.form-msg.success { background: rgba(94,163,105,.15); border: 1px solid rgba(94,163,105,.4); color: #bfe7c4; }
.form-msg.error { background: rgba(217,83,79,.15); border: 1px solid rgba(217,83,79,.4); color: #ffcac8; }

.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { background: var(--vinho-950); color: var(--bege-200); padding: 70px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 50px; margin-bottom: 50px; }
.footer .logo-mark { width: 200px; margin-bottom: 18px; }
.footer p.desc { font-size: 13.5px; color: var(--bege-200); opacity: .8; max-width: 320px; }
.footer h5 { color: var(--bege-50); font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 20px; font-family: var(--font-body); }
.footer-links li { margin-bottom: 12px; font-size: 14px; }
.footer-links a { color: var(--bege-200); opacity: .85; transition: opacity .3s, color .3s; }
.footer-links a:hover { opacity: 1; color: var(--gold-light); }
.footer-cnaes li { font-size: 13px; margin-bottom: 10px; color: var(--bege-200); opacity: .8; }
.footer-bottom { border-top: 1px solid rgba(245,238,223,.12); padding-top: 26px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--bege-200); opacity: .7; }
.footer-social { display: flex; gap: 12px; }
.footer-social a { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(245,238,223,.2); display: flex; align-items: center; justify-content: center; transition: background .3s, border-color .3s; }
.footer-social a:hover { background: var(--gold); border-color: var(--gold); }
.footer-social svg { width: 15px; height: 15px; stroke: var(--bege-100); }
.footer-social a:hover svg { stroke: var(--vinho-950); }
.back-to-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 500;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--vinho-900); border: 1px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .3s, transform .3s, visibility .3s, background .3s;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--vinho-800); }
.back-to-top svg { width: 18px; height: 18px; stroke: var(--gold-light); }

/* ==========================================================================
   RESPONSIVO
   ========================================================================== */
@media (max-width: 980px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 44px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .diff-grid { grid-template-columns: repeat(2, 1fr); }
  .branches-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed; top: 0; right: -100%; height: 100vh; width: min(78vw, 340px);
    background: var(--vinho-950); flex-direction: column; justify-content: center;
    align-items: flex-start; gap: 28px; padding: 40px; transition: right .45s var(--ease);
    box-shadow: -20px 0 50px rgba(0,0,0,.3);
  }
  .nav-links.open { right: 0; }
  .nav-links a { color: var(--bege-100); font-size: 16px; }
  .nav-toggle { display: flex; }
  .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); }
  .header.is-scrolled .nav-toggle.open span { background: var(--bege-100); }

  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: 1fr; }
  .diff-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .section { padding: 84px 0; }
  .about, .contact { background-attachment: scroll; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .hero-layer { transform: none !important; }
}
