/* ============================================================
   MARCOS ANDRADE ALVES — PWA
   ============================================================ */

:root {
  --ink:        #1c1b19;
  --ink-2:      #26231f;
  --ink-3:      #34302a;
  --paper:      #f4efe7;
  --paper-2:    #eae2d5;
  --stone:      #cfc4b2;
  --rust:       #b4552e;
  --rust-light: #d4723f;
  --sand:       #d9a84b;
  --wa:         #25d366;
  --wa-dark:    #128c7e;
  --white:      #fffdf9;
  --display:    'Arial Narrow', 'Roboto Condensed', 'Helvetica Neue', Arial, sans-serif;
  --body:       'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --shadow:     0 18px 50px rgba(0, 0, 0, .16);
  --header-h:   76px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; }

.container { width: min(1180px, 100% - 40px); margin-inline: auto; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-family: var(--display);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 14px;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: -.01em;
}

h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h3 { font-size: 1.45rem; letter-spacing: .01em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 3px;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.btn-sm  { padding: 11px 18px; font-size: .78rem; }
.btn-lg  { padding: 16px 26px; font-size: .95rem; }
.btn-xl  { padding: 20px 38px; font-size: 1.1rem; }

.btn-wa { background: var(--wa); color: #06251a; box-shadow: 0 8px 26px rgba(37, 211, 102, .28); }
.btn-wa:hover { background: #2ee675; transform: translateY(-2px); box-shadow: 0 12px 32px rgba(37, 211, 102, .4); }

.btn-ghost { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,.5); }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: var(--white); transform: translateY(-2px); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  background: rgba(28, 27, 25, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: background .3s ease;
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo { height: 48px; width: 48px; object-fit: cover; border-radius: 3px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-family: var(--display); font-size: .98rem; letter-spacing: .06em; color: var(--white); white-space: nowrap; }
.brand-text small { font-family: var(--display); font-size: .6rem; letter-spacing: .22em; color: var(--sand); }

.nav { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.nav a {
  font-family: var(--display);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.75);
  position: relative;
  padding: 6px 0;
  transition: color .2s ease;
}
.nav a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--rust-light); transition: width .25s ease;
}
.nav a:hover, .nav a.active { color: var(--white); }
.nav a:hover::after, .nav a.active::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 12px; }

.menu-toggle { display: none; background: none; border: 0; padding: 8px; }
.menu-toggle span { display: block; width: 26px; height: 2px; background: var(--white); margin: 5px 0; transition: .25s ease; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: max(720px, 100svh);
  display: flex;
  align-items: center;
  color: var(--white);
  padding: calc(var(--header-h) + 60px) 0 90px;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background: url('assets/hero.jpeg') center/cover no-repeat;
  transform: scale(1.06);
  animation: heroZoom 18s ease-out forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero-overlay {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(20,19,17,.96) 0%, rgba(20,19,17,.82) 42%, rgba(20,19,17,.35) 100%),
    linear-gradient(0deg, rgba(20,19,17,.9) 0%, transparent 45%);
}
.hero::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  background: var(--rust); z-index: 1;
}
.hero-content { position: relative; z-index: 2; }

.hero .eyebrow { color: var(--sand); }
.hero h1 {
  font-size: clamp(3.2rem, 9vw, 7.8rem);
  line-height: .88;
  letter-spacing: -.02em;
  margin-bottom: 24px;
  text-shadow: 0 8px 40px rgba(0,0,0,.5);
}
.hero h1 span { color: var(--rust-light); }
.hero-desc { max-width: 560px; font-size: 1.05rem; color: rgba(255,255,255,.86); margin-bottom: 28px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 16px;
  padding: 12px 24px 12px 12px;
  border: 1px solid rgba(217,168,75,.5);
  background: rgba(28,27,25,.5);
  margin-bottom: 34px;
}
.badge-number {
  font-family: var(--display); font-size: 2.6rem; font-weight: 800;
  color: var(--sand); line-height: 1;
  padding-right: 16px; border-right: 1px solid rgba(217,168,75,.4);
}
.badge-text { font-family: var(--display); font-size: .72rem; letter-spacing: .18em; line-height: 1.4; color: rgba(255,255,255,.8); }
.badge-text strong { color: var(--white); font-size: .9rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.scroll-hint {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  width: 26px; height: 42px; border: 1px solid rgba(255,255,255,.4); border-radius: 14px;
  z-index: 2; display: grid; place-items: start center; padding-top: 8px;
}
.scroll-hint span { width: 3px; height: 8px; background: var(--sand); border-radius: 2px; animation: scrollDot 1.8s infinite; }
@keyframes scrollDot { 0%,100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(14px); opacity: 0; } }

/* ============================================================
   TICKER
   ============================================================ */
.ticker { background: var(--rust); color: var(--white); overflow: hidden; padding: 13px 0; }
.ticker-track {
  display: flex; width: max-content; gap: 26px; align-items: center;
  animation: ticker 38s linear infinite;
}
.ticker-track span {
  font-family: var(--display); font-size: .82rem; font-weight: 800;
  letter-spacing: .2em; white-space: nowrap;
}
.ticker-track i { font-size: .55rem; color: var(--sand); font-style: normal; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ============================================================
   SOBRE
   ============================================================ */
.sobre { background: var(--paper); padding: 110px 0; }
.sobre-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 80px; align-items: center; }

.logo-stage { text-align: center; }
.logo-frame {
  position: relative; display: inline-block; padding: 26px;
  background: var(--ink); box-shadow: var(--shadow);
}
.logo-frame img { width: 100%; max-width: 330px; aspect-ratio: 1; object-fit: cover; }
.corner { position: absolute; width: 26px; height: 26px; border: 3px solid var(--sand); }
.corner.tl { top: -8px; left: -8px; border-right: 0; border-bottom: 0; }
.corner.tr { top: -8px; right: -8px; border-left: 0; border-bottom: 0; }
.corner.bl { bottom: -8px; left: -8px; border-right: 0; border-top: 0; }
.corner.br { bottom: -8px; right: -8px; border-left: 0; border-top: 0; }
.logo-caption {
  font-family: var(--display); font-size: .72rem; letter-spacing: .22em;
  color: var(--rust); margin-top: 30px; font-weight: 700;
}

.sobre-text h2 { font-size: clamp(2.4rem, 5vw, 4rem); margin-bottom: 24px; }
.sobre-text h2 em { color: var(--rust); font-style: normal; }
.sobre-text p { color: #5c554b; margin-bottom: 16px; font-size: 1.02rem; }

.sobre-stats { display: flex; gap: 46px; margin: 34px 0 30px; padding: 26px 0; border-top: 1px solid var(--stone); border-bottom: 1px solid var(--stone); }
.stat { display: flex; flex-direction: column; }
.stat-value { font-family: var(--display); font-size: 3rem; font-weight: 800; color: var(--ink); line-height: 1; }
.stat-label { font-family: var(--display); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--rust); margin-top: 6px; }

.link-wa { color: var(--rust); font-weight: 700; border-bottom: 2px solid var(--rust); padding-bottom: 3px; font-size: .95rem; }
.link-wa span { display: inline-block; transition: transform .2s ease; }
.link-wa:hover span { transform: translateX(5px); }

/* ============================================================
   SERVIÇOS
   ============================================================ */
.servicos { background: var(--paper-2); padding: 110px 0; }
.section-head { max-width: 640px; margin-bottom: 54px; }
.section-head p:last-child { color: #5c554b; font-size: 1.05rem; }
.section-head--light { color: var(--white); }
.section-head--light .eyebrow { color: var(--sand); }
.section-head--light p:last-child { color: rgba(255,255,255,.7); }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card {
  background: var(--white); padding: 34px 26px 30px;
  border-top: 4px solid var(--rust);
  box-shadow: 0 6px 24px rgba(0,0,0,.05);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow); border-color: var(--sand); }
.card-icon { width: 58px; height: 58px; margin-bottom: 22px; }
.card-icon svg { width: 100%; height: 100%; fill: none; stroke: var(--rust); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin-bottom: 18px; font-size: 1.3rem; }
.card ul li {
  position: relative; padding-left: 18px; margin-bottom: 9px;
  font-size: .92rem; color: #5c554b; line-height: 1.5;
}
.card ul li::before { content: ''; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; background: var(--sand); transform: rotate(45deg); }

/* ============================================================
   GALERIA
   ============================================================ */
.trabalhos {
  background:
    linear-gradient(rgba(28,27,25,.97), rgba(28,27,25,.97)),
    var(--ink);
  padding: 110px 0 100px;
  color: var(--white);
}
.gallery { column-count: 4; column-gap: 10px; }
.gallery-item {
  break-inside: avoid; margin-bottom: 10px; position: relative;
  overflow: hidden; background: var(--ink-3); cursor: zoom-in;
}
.gallery-item img {
  width: 100%; height: auto; display: block;
  transition: transform .5s ease, filter .4s ease;
  filter: saturate(.85) contrast(1.02);
}
.gallery-item::after {
  content: '+'; position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--display); font-size: 2.4rem; color: var(--white);
  background: rgba(180,85,46,.55); opacity: 0; transition: opacity .3s ease;
}
.gallery-item:hover img { transform: scale(1.07); filter: saturate(1.05); }
.gallery-item:hover::after { opacity: 1; }

/* ============================================================
   CONTATO
   ============================================================ */
.contato { background: var(--rust); color: var(--white); padding: 110px 0; text-align: center; }
.contato .eyebrow { color: rgba(255,255,255,.8); }
.contato h2 { font-size: clamp(2.4rem, 6vw, 4.4rem); margin-bottom: 20px; }
.contato-inner > p:not(.eyebrow) { max-width: 540px; margin: 0 auto 30px; color: rgba(255,255,255,.9); font-size: 1.08rem; }
.wa-number {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--display); font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800;
  letter-spacing: .04em; margin-bottom: 34px;
  border-bottom: 2px solid rgba(255,255,255,.5); padding-bottom: 6px;
}
.wa-number svg { width: 28px; height: 28px; fill: currentColor; }
.btn-xl { background: var(--ink); color: var(--white); box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.btn-xl:hover { background: #2b2723; transform: translateY(-3px); box-shadow: 0 16px 38px rgba(0,0,0,.35); }
.btn-xl svg { fill: var(--wa); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--ink); color: rgba(255,255,255,.7); padding: 60px 0 26px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-brand { display: flex; align-items: center; gap: 16px; }
.footer-brand img { width: 64px; height: 64px; object-fit: cover; }
.footer-brand div { display: flex; flex-direction: column; }
.footer-brand strong { font-family: var(--display); color: var(--white); letter-spacing: .08em; font-size: 1.1rem; }
.footer-brand span { font-size: .82rem; color: rgba(255,255,255,.55); }
.footer-wa { font-family: var(--display); font-weight: 700; letter-spacing: .1em; color: var(--wa); white-space: nowrap; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 24px; font-size: .78rem; color: rgba(255,255,255,.45); }
.footer-credit { color: rgba(255,255,255,.35); }

/* ============================================================
   WHATSAPP FLUTUANTE
   ============================================================ */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--wa); color: #06251a;
  display: grid; place-items: center;
  box-shadow: 0 8px 26px rgba(0,0,0,.35);
  transition: transform .25s ease;
}
.wa-float:hover { transform: scale(1.1); }
.wa-float svg { width: 32px; height: 32px; fill: currentColor; }
.wa-pulse { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--wa); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

/* ============================================================
   INSTALL BAR
   ============================================================ */
.install-bar {
  position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 160%);
  z-index: 95; display: flex; align-items: center; gap: 12px;
  background: var(--ink); color: var(--white); padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.15); box-shadow: var(--shadow);
  border-radius: 6px; font-size: .88rem; max-width: calc(100% - 30px);
  transition: transform .45s cubic-bezier(.2,.9,.3,1.2);
}
.install-bar.show { transform: translate(-50%, 0); }
.install-bar img { border-radius: 4px; }
.install-bar button {
  border: 0; border-radius: 3px; padding: 8px 14px;
  font-family: var(--display); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .75rem;
}
#installBtn { background: var(--sand); color: var(--ink); }
#installClose { background: transparent; color: rgba(255,255,255,.6); font-size: 1.4rem; line-height: 1; padding: 4px 8px; }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(12,11,10,.96);
  display: flex; align-items: center; justify-content: center;
  padding: 60px 76px;
}
.lightbox[hidden] { display: none; }
.lb-figure { max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lb-figure img { max-width: 100%; max-height: calc(100vh - 130px); object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lb-figure figcaption { color: rgba(255,255,255,.7); font-family: var(--display); letter-spacing: .14em; font-size: .78rem; text-transform: uppercase; display: flex; gap: 18px; }
#lbCounter { color: var(--sand); }
.lb-close, .lb-nav {
  position: absolute; background: rgba(255,255,255,.08); color: var(--white);
  border: 1px solid rgba(255,255,255,.2); border-radius: 50%;
  display: grid; place-items: center; transition: background .2s ease;
}
.lb-close:hover, .lb-nav:hover { background: var(--rust); }
.lb-close { top: 20px; right: 22px; width: 44px; height: 44px; font-size: 2rem; line-height: 1; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 50px; height: 50px; font-size: 1.4rem; }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .gallery { column-count: 3; }
  .sobre-grid { gap: 50px; }
  .nav { gap: 18px; }
}

@media (max-width: 860px) {
  :root { --header-h: 68px; }
  .brand-text small { display: none; }
  .brand-text strong { font-size: .82rem; }

  .menu-toggle { display: block; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(28,27,25,.97); backdrop-filter: blur(12px);
    padding: 12px 20px 22px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    transform: translateY(-140%); opacity: 0; pointer-events: none;
    transition: transform .3s ease, opacity .3s ease;
  }
  .nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: .9rem; }
  .nav a::after { display: none; }

  .header-actions .btn-wa span { display: none; }
  .header-actions .btn-wa { padding: 10px 12px; }
  .header-actions .btn-wa svg { width: 22px; height: 22px; }

  .hero { min-height: 660px; }
  .sobre-grid { grid-template-columns: 1fr; text-align: center; }
  .logo-stage { order: 2; }
  .sobre-stats { justify-content: center; }
  .gallery { column-count: 3; }
}

@media (max-width: 600px) {
  .container { width: min(100% - 32px, 1180px); }
  .hero { padding-top: calc(var(--header-h) + 44px); min-height: 620px; }
  .hero h1 { font-size: clamp(2.9rem, 13vw, 4.6rem); }
  .hero-desc { font-size: .95rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-overlay { background: linear-gradient(90deg, rgba(20,19,17,.94), rgba(20,19,17,.68)), linear-gradient(0deg, rgba(20,19,17,.92), transparent 50%); }
  .scroll-hint { display: none; }

  .section, .sobre, .servicos, .trabalhos, .contato { padding: 74px 0; }
  .cards { grid-template-columns: 1fr; }
  .gallery { column-count: 2; column-gap: 7px; }
  .gallery-item { margin-bottom: 7px; }
  .sobre-stats { gap: 26px; }
  .stat-value { font-size: 2.4rem; }

  .footer-inner, .footer-bottom { flex-direction: column; text-align: center; }
  .wa-float { right: 16px; bottom: 16px; width: 54px; height: 54px; }
  .wa-float svg { width: 28px; height: 28px; }
  .install-bar { bottom: 84px; left: 16px; right: 16px; transform: translateY(200%); max-width: none; }
  .install-bar.show { transform: translateY(0); }
  .install-bar span { flex: 1; }

  .lightbox { padding: 60px 12px 80px; }
  .lb-nav { width: 40px; height: 40px; top: auto; bottom: 18px; transform: none; }
  .lb-prev { left: 18px; }
  .lb-next { right: 18px; }
  .lb-figure img { max-height: calc(100vh - 170px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
