/* ==========================================================================
   C. Brum Metalúrgica — Landing Page
   ========================================================================== */

:root {
  --navy: #0B1F4B;
  --navy-light: #12295e;
  --navy-translucent: rgba(11, 31, 75, 0.88);
  --gold: #FFC400;
  --gold-dark: #E0A800;
  --white: #FFFFFF;
  --whatsapp: #25D366;
  --whatsapp-dark: #1EBE57;
  --text-body: #2b2f3a;
  --radius: 14px;
  --shadow-soft: 0 10px 30px rgba(11, 31, 75, 0.15);
  --shadow-card: 0 8px 24px rgba(11, 31, 75, 0.1);
  --font-head: "Oswald", sans-serif;
  --font-body: "Inter", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  text-transform: uppercase;
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: .5px;
}

p { margin: 0 0 1em; }

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.container--narrow { max-width: 800px; }

.section { padding: 90px 0; }
.section--dark {
  background: var(--navy);
  color: rgba(255,255,255,.9);
  position: relative;
  overflow: hidden;
}
.section--dark::before {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(115deg, rgba(255,196,0,.05) 0 2px, transparent 2px 60px);
  pointer-events: none;
}
.section--dark p { color: rgba(255,255,255,.82); }

.section__title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  text-align: center;
}
.section__title--light { color: var(--white); text-align: left; }
.section__subtitle {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 50px;
  color: #555;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 22px; height: 22px; }

.btn--yellow {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 6px 16px rgba(255,196,0,.35);
}
.btn--yellow:hover { background: var(--gold-dark); }

.btn--outline-yellow {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}
.btn--outline-yellow:hover { background: rgba(255,196,0,.1); }

.btn--whatsapp {
  background: var(--whatsapp);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(37,211,102,.4);
}
.btn--whatsapp:hover { background: var(--whatsapp-dark); }

.btn--lg { padding: 18px 34px; font-size: 1.05rem; }
.btn--xl { padding: 22px 44px; font-size: 1.2rem; }

.badge-gold {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-family: var(--font-head);
  text-transform: uppercase;
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: 1px;
  padding: 8px 18px;
  border-radius: 999px;
  margin-bottom: 22px;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  border-bottom: 1px solid rgba(255,196,0,.15);
  transition: box-shadow .2s ease;
}
/* backdrop-filter lives on a pseudo-element (not the header itself) because
   backdrop-filter/filter/transform on an ancestor redefines the containing
   block for position:fixed descendants — it broke the fixed mobile nav panel
   (nav is nested inside header), collapsing it to the header's own height. */
.header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--navy-translucent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  gap: 20px;
}
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo__svg { height: 42px; width: auto; }
.logo__text-main {
  font-family: var(--font-head);
  font-size: 27px;
  font-weight: 700;
  fill: var(--gold);
}
.logo__text-sub {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 2px;
  fill: var(--white);
}
.nav {
  display: flex;
  gap: 30px;
  margin-left: auto;
  margin-right: 30px;
}
.nav a {
  color: var(--white);
  font-family: var(--font-head);
  text-transform: uppercase;
  font-size: .9rem;
  letter-spacing: .5px;
  position: relative;
  padding: 6px 0;
}
.nav a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width .25s ease;
}
.nav a:hover::after { width: 100%; }

.header__cta { flex-shrink: 0; font-size: .82rem; padding: 12px 22px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 26px; height: 2.5px;
  background: var(--gold);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 78px;
}
.hero__bg {
  position: absolute; inset: 0;
  z-index: -1;
  overflow: hidden;
}
.hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 65%;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(11,31,75,.95) 15%, rgba(11,31,75,.75) 55%, rgba(11,31,75,.45) 100%);
}
.hero__content { max-width: 720px; padding: 60px 20px; }
.hero__title {
  color: var(--white);
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
  margin-bottom: .4em;
}
.hero__subtitle {
  color: rgba(255,255,255,.88);
  font-size: 1.08rem;
  max-width: 600px;
  margin-bottom: 2em;
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 2.2em;
}
.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  list-style: none;
  padding: 0; margin: 0;
  color: var(--gold);
  font-weight: 600;
  font-size: .95rem;
}

/* ==========================================================================
   NUMBERS BAR
   ========================================================================== */
.numbers { background: var(--gold); }
.numbers__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 45px 20px;
  text-align: center;
}
.numbers__value {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}
.numbers__value--text { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.numbers__label {
  display: block;
  margin-top: 8px;
  font-weight: 600;
  color: var(--navy);
  font-size: .92rem;
}

/* ==========================================================================
   CARDS / SOLUÇÕES
   ========================================================================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 26px;
  box-shadow: var(--shadow-card);
  border: 1px solid #eee;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(11,31,75,.16);
}
.card__icon {
  width: 56px; height: 56px;
  margin-bottom: 18px;
}
.card__icon svg { width: 100%; height: 100%; }

.card__icon--photo {
  width: 100%;
  height: 120px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  background-color: #ddd;
}
.card__icon--photo img { display: none; }
.card h3 { font-size: 1.15rem; }
.card p { color: #555; font-size: .95rem; }
.card__link {
  display: inline-block;
  margin-top: 10px;
  font-weight: 700;
  color: var(--navy);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 2px;
}
.card__link:hover { color: var(--gold-dark); }

/* ==========================================================================
   POR QUE ESCOLHER
   ========================================================================== */
.porque__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 20px;
}
.porque__item { text-align: center; }
.porque__item svg { width: 54px; height: 54px; margin-bottom: 14px; }
.porque__item h3 { color: var(--white); font-size: 1.1rem; }
.porque__closing {
  text-align: center;
  font-family: var(--font-head);
  color: var(--gold);
  font-size: 1.4rem;
  font-style: italic;
  margin-top: 50px;
  text-transform: none;
}

/* ==========================================================================
   GALERIA
   ========================================================================== */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gallery__item {
  position: relative;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #ddd;
}
.gallery__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.gallery__item:hover img { transform: scale(1.08); }

/* Manual pan/zoom crop for source images that carry a logo/text panel
   we need to crop out — background-position % is resolution-independent
   (it maps 0-100% to the full over/under-scan range), unlike object-position. */
.gallery__photo {
  position: absolute; inset: 0;
  background-repeat: no-repeat;
  transition: transform .4s ease;
}
.gallery__item:hover .gallery__photo { transform: scale(1.08); }
.gallery__caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(11,31,75,.92), transparent);
  color: var(--white);
  font-size: .82rem;
  font-weight: 600;
  padding: 22px 12px 10px;
  text-align: left;
}
.obras__cta { text-align: center; margin-top: 50px; }

.lightbox {
  position: fixed; inset: 0;
  background: rgba(11,31,75,.94);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 1000;
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease;
  padding: 30px;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: min(90vw, 900px);
  max-height: 75vh;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
}
.lightbox__caption { color: var(--white); margin-top: 16px; font-weight: 600; }
.lightbox__close {
  position: absolute; top: 20px; right: 28px;
  background: none; border: none;
  color: var(--gold);
  font-size: 2.6rem;
  line-height: 1;
  cursor: pointer;
}

/* ==========================================================================
   CONSULTOR
   ========================================================================== */
.consultor__grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 40px;
}
.consultor__text p { font-size: 1.05rem; margin-bottom: 1.6em; }
.consultor__photo {
  position: relative;
  justify-self: center;
}
.consultor__photo img {
  max-width: 380px;
  width: 100%;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.35));
}

/* ==========================================================================
   COMO FUNCIONA
   ========================================================================== */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 26px; left: 6%; right: 6%;
  height: 3px;
  background: repeating-linear-gradient(to right, var(--gold) 0 10px, transparent 10px 18px);
  z-index: 0;
}
.timeline__step { text-align: center; position: relative; z-index: 1; }
.timeline__num {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.timeline__step h3 { font-size: 1.05rem; }
.timeline__step p { color: #555; font-size: .92rem; }

/* ==========================================================================
   ONDE ATENDEMOS
   ========================================================================== */
.atendemos__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.atendemos__text p { font-size: 1rem; }
.atendemos__map { text-align: center; }
.map-svg { width: 100%; max-width: 380px; height: auto; }
.map-svg__label {
  font-family: var(--font-head);
  font-size: 34px;
  fill: rgba(255,196,0,.18);
  font-weight: 700;
}
.map-pin { cursor: pointer; }
.map-pin circle:first-child { transition: r .2s ease; }
.map-pin:hover circle:first-child { r: 10; }
.map-legend {
  display: flex;
  justify-content: center;
  gap: 22px;
  list-style: none;
  padding: 0; margin: 18px 0 0;
  flex-wrap: wrap;
  font-size: .85rem;
  color: rgba(255,255,255,.85);
}
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot--gold { background: var(--gold); }
.dot--white { background: var(--white); }
.dot--green { background: var(--whatsapp); }

/* ==========================================================================
   FAQ
   ========================================================================== */
.accordion__item {
  border-bottom: 1px solid #e4e4e4;
}
.accordion__trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  text-align: left;
  padding: 22px 4px;
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--navy);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}
.accordion__icon {
  font-size: 1.4rem;
  color: var(--gold-dark);
  transition: transform .25s ease;
  flex-shrink: 0;
  margin-left: 16px;
}
.accordion__item.is-open .accordion__icon { transform: rotate(45deg); }
.accordion__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.accordion__panel p { padding: 0 4px 22px; color: #555; }

/* ==========================================================================
   CTA FINAL
   ========================================================================== */
.cta-final {
  position: relative;
  background: var(--gold);
  padding: 90px 0;
  overflow: hidden;
  text-align: center;
}
.cta-final__diagonals {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(115deg, rgba(11,31,75,.08) 0 18px, transparent 18px 60px);
}
.cta-final__content { position: relative; }
.cta-final h2 {
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  margin-bottom: .3em;
}
.cta-final p {
  font-size: 1.1rem;
  color: var(--navy);
  font-weight: 600;
  margin-bottom: 1.6em;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { background: var(--navy); color: rgba(255,255,255,.75); padding: 55px 0 0; }
.footer__inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer__brand p { margin-top: 14px; max-width: 280px; font-size: .9rem; }
.footer__info p { font-size: .9rem; }
.footer__links { display: flex; gap: 20px; margin-top: 10px; }
.footer__links a {
  font-weight: 600;
  color: var(--gold);
}
.footer__links a:hover { text-decoration: underline; }
.footer__copy {
  text-align: center;
  font-size: .82rem;
  padding: 18px 20px 90px;
  color: rgba(255,255,255,.5);
}

/* ==========================================================================
   WHATSAPP FLOATING BUTTON
   ========================================================================== */
.whatsapp-float {
  position: fixed;
  bottom: 26px; right: 26px;
  width: 62px; height: 62px;
  background: var(--whatsapp);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  box-shadow: 0 8px 24px rgba(37,211,102,.5);
  z-index: 600;
  animation: wa-pulse 2.4s infinite;
}
.whatsapp-float svg { width: 32px; height: 32px; }
.whatsapp-float__tooltip {
  position: absolute;
  right: 76px;
  background: var(--navy);
  color: var(--white);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.whatsapp-float:hover .whatsapp-float__tooltip { opacity: 1; transform: translateX(0); }

@keyframes wa-pulse {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,.55), 0 8px 24px rgba(37,211,102,.5); }
  70% { box-shadow: 0 0 0 16px rgba(37,211,102,0), 0 8px 24px rgba(37,211,102,.5); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0), 0 8px 24px rgba(37,211,102,.5); }
}

/* ==========================================================================
   MOBILE STICKY BAR
   ========================================================================== */
.mobile-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 590;
  background: var(--navy);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 20px rgba(0,0,0,.2);
}
.mobile-bar__btn { width: 100%; }

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

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .whatsapp-float { animation: none; }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .porque__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav { position: fixed; top: 78px; left: 0; right: 0; bottom: 0;
    margin: 0;
    background: var(--navy); flex-direction: column; gap: 0;
    padding: 10px 24px 30px;
    transform: translateX(100%);
    transition: transform .3s ease;
    overflow-y: auto;
  }
  .nav.is-open { transform: translateX(0); }
  .nav a { padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 1.05rem; }
  .nav-toggle { display: flex; }
  .header__cta { display: none; }

  .consultor__grid { grid-template-columns: 1fr; text-align: center; }
  .consultor__photo { order: -1; }
  .atendemos__grid { grid-template-columns: 1fr; }
  .atendemos__text { text-align: center; }
  .section__title--light { text-align: center; }

  .timeline { grid-template-columns: 1fr; gap: 34px; }
  .timeline::before { display: none; }

  .mobile-bar { display: block; }
  .whatsapp-float { bottom: 92px; }
}

@media (max-width: 480px) {
  .btn { white-space: normal; text-align: center; line-height: 1.3; }
}

@media (max-width: 640px) {
  .section { padding: 60px 0; }
  .cards-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .porque__grid { grid-template-columns: 1fr; }
  .numbers__grid { grid-template-columns: repeat(2, 1fr); }
  .hero { min-height: 92vh; }
  .hero__ctas { flex-direction: column; align-items: stretch; }
  .hero__ctas .btn { width: 100%; }
}
