/* ===== Tokens ===== */
:root {
  --primary: #A11D1D;
  --primary-dark: #7A1515;
  --primary-light: #C82D2D;
  --accent: #1B4D8C;
  --accent-dark: #123763;
  --white: #FFFFFF;
  --bg-light: #F6F5F4;
  --text: #221A1A;
  --text-muted: #5A5252;
  --border: rgba(161, 29, 29, 0.18);
  --radius: 14px;
  --shadow: 0 10px 30px rgba(20, 10, 10, 0.10);
  --header-h: 76px;
}

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

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Poppins', 'Inter', sans-serif;
  line-height: 1.2;
  margin: 0 0 .5em;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .98rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-whatsapp-header {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
  padding: 10px 20px;
  font-size: .9rem;
}
.btn-whatsapp-header:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--white);
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: box-shadow .3s ease, background .3s ease;
}
.header.is-scrolled {
  box-shadow: 0 6px 24px rgba(20, 10, 10, 0.10);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand { display: flex; align-items: center; height: 100%; }
.brand-logo { height: 52px; width: auto; }

.nav {
  display: flex;
  gap: 28px;
  flex: 1;
  justify-content: center;
}
.nav a {
  color: var(--text);
  font-weight: 500;
  font-size: .98rem;
  position: relative;
  padding: 6px 2px;
}
.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav a:hover { color: var(--primary); }
.nav a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  isolation: isolate;
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--header-h) 0 0;
  box-sizing: border-box;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(20,10,10,0.55) 0%, rgba(20,10,10,0.72) 55%, rgba(20,10,10,0.85) 100%),
    linear-gradient(120deg, rgba(161,29,29,0.35), rgba(27,77,140,0.35));
}

.hero-inner { max-width: 780px; }

.hero-logo {
  height: 92px;
  margin: 0 auto 24px;
  border-radius: 16px;
  background: rgba(255,255,255,0.95);
  padding: 10px 16px;
}

.hero h1 {
  font-size: clamp(2rem, 4.2vw, 2.9rem);
  color: var(--white);
  font-weight: 800;
}

.hero h2 {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  max-width: 640px;
  margin: 0 auto 18px;
}

.hero-slogan {
  color: #FFD9D9;
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-outline-dark {
  color: var(--white);
  border-color: rgba(255,255,255,0.7);
}
.btn-outline-dark:hover {
  background: var(--white);
  color: var(--primary-dark);
  border-color: var(--white);
}

.hero-anim {
  opacity: 0;
  transform: translateY(22px);
  animation: heroIn .8s ease forwards;
  animation-delay: var(--d, 0s);
}

@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Sections ===== */
.section { padding: 84px 0; position: relative; }
.section-alt { background: var(--bg-light); }

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  text-align: center;
  color: var(--text);
}
.section-title-left { text-align: left; }
.section-title-on-dark { color: var(--white); }

.section-lead {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
}
.section-lead-left { margin: 0; text-align: left; }

/* ===== Sobre: text + image ===== */
.sobre-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 44px;
  align-items: center;
  margin-bottom: 56px;
}
.sobre-image img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ===== Textured (light) background section ===== */
.section-textured { overflow: hidden; }
.section-texture-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.08;
  z-index: 0;
}
.section-textured .container { position: relative; z-index: 1; }

/* ===== Dark image-backed section ===== */
.section-dark { color: var(--white); overflow: hidden; }
.section-dark-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -2;
}
.section-dark-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,8,8,0.86), rgba(15,8,8,0.9));
  z-index: -1;
}
.section-dark .container { position: relative; z-index: 1; }

.section-dark .feature-card {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.6);
  border-left: 4px solid var(--accent);
  color: var(--white);
  transition: background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.section-dark .feature-card h3 { color: var(--white); }
.section-dark .feature-card p { color: rgba(255,255,255,0.85); }
.section-dark .feature-card:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-4px);
}
.section-dark .feature-card:hover p { color: rgba(255,255,255,0.95); }

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

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

/* ===== Missão / Visão / Valores ===== */
.mvv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.mvv-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 26px;
  box-shadow: var(--shadow);
}
.mvv-card h3 {
  color: var(--primary);
  font-size: 1.2rem;
}
.mvv-card p { color: var(--text-muted); margin: 0; }

/* ===== Produtos ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.product-card {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s ease;
}
.product-card:hover { transform: translateY(-4px); }

.product-thumb {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.product-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: contain;
  background: var(--bg-light);
}

.product-thumb-tip {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(15, 8, 8, 0.55);
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}
.product-thumb:hover .product-thumb-tip,
.product-thumb:focus-visible .product-thumb-tip {
  opacity: 1;
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
  padding: 24px;
}
.lightbox[hidden] { display: none; }

.lightbox-img {
  max-width: min(90vw, 1100px);
  max-height: 78vh;
  object-fit: contain;
  border-radius: 6px;
  background: var(--bg-light);
}

.lightbox-caption {
  margin-top: 16px;
  color: var(--white);
  font-size: .95rem;
  text-align: center;
  max-width: 90vw;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: 0;
  color: var(--white);
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px;
}
.lightbox-close:hover { color: var(--primary); }

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: 0;
  color: var(--white);
  font-size: 1.4rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
}
.lightbox-arrow:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

@media (max-width: 640px) {
  .lightbox-arrow { width: 40px; height: 40px; font-size: 1.1rem; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-close { top: 10px; right: 12px; }
}

.product-card figcaption {
  padding: 18px 20px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}

.product-card-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 32px 24px;
  background: var(--primary);
  color: var(--white);
}
.product-card-cta h3 { color: var(--white); margin: 0; font-size: 1.15rem; }
.product-card-cta p { color: rgba(255,255,255,0.9); margin: 0; }
.product-card-cta .btn-primary {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
}
.product-card-cta .btn-primary:hover {
  background: var(--bg-light);
  color: var(--primary-dark);
  border-color: var(--bg-light);
}

/* ===== Diferenciais ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow);
}
.feature-card h3 { font-size: 1.05rem; color: var(--text); }
.feature-card p { color: var(--text-muted); margin: 0; font-size: .95rem; }

/* ===== Contato ===== */
.contato-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: stretch;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.info-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}
.info-list strong { color: var(--primary); font-size: .95rem; }
.info-list span, .info-list a { color: var(--text-muted); }
.info-list a { color: var(--accent); font-weight: 600; }
.info-list a:hover { text-decoration: underline; }

.contato-map {
  min-height: 340px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* ===== Footer ===== */
.footer {
  background: var(--text);
  color: rgba(255,255,255,0.85);
  padding: 56px 0 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-logo {
  height: 64px;
  margin-bottom: 12px;
  padding: 10px 16px;
  background: var(--white);
  border-radius: 10px;
  display: block;
}
.footer-brand p { color: rgba(255,255,255,0.7); max-width: 280px; }

.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { color: rgba(255,255,255,0.85); }
.footer-nav a:hover { color: var(--white); text-decoration: underline; }

.footer-contact p { margin: 0 0 10px; color: rgba(255,255,255,0.85); }
.footer-contact a { color: rgba(255,255,255,0.85); }
.footer-contact a:hover { color: var(--white); text-decoration: underline; }

.footer-bottom {
  text-align: center;
  padding: 20px 0 28px;
  font-size: .85rem;
  color: rgba(255,255,255,0.55);
}

#montesite-footer-badge { background: var(--text); }

/* ===== WhatsApp floating button ===== */
.whatsapp-float {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  z-index: 900;
  transition: background .2s ease;
}
.whatsapp-float:hover { background: #1DA851; color: var(--white); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .mvv-grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .contato-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; text-align: left; }
  .sobre-grid { grid-template-columns: 1fr; }
  .sobre-image { order: -1; }
  .section-title-left, .section-lead-left { text-align: center; }
}

@media (max-width: 720px) {
  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 18px 24px;
    gap: 14px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .btn-whatsapp-header { display: none; }
  .products-grid, .cards-grid { grid-template-columns: 1fr; }
  .hero { min-height: 620px; }
  .hero-logo { height: 72px; }
  .section { padding: 64px 0; }
  .contato-map { min-height: 280px; }
}

@media (max-width: 420px) {
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
}

/* Short/landscape phones: 100vh from a mobile browser chrome can feel too tall */
@media (max-height: 480px) and (orientation: landscape) {
  .hero { height: auto; min-height: 100vh; padding: calc(var(--header-h) + 32px) 0 40px; }
}
