/* ============================================
   MARQUARTE ENGENHARIA — Design System & Styles
   Mobile-first | Dark Theme | Green Palette
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --bg-primary: #0A1A14;
  --bg-secondary: #0F2B1F;
  --bg-card: #132F22;
  --bg-card-hover: #1A3D2D;
  --green-dark: #0F6B4E;
  --green-medium: #1A9E6F;
  --green-light: #2ED19A;
  --bege-cta: #D4A853;
  --bege-cta-hover: #E0BC6E;
  --text-primary: #F0F0F0;
  --text-secondary: #A0B8AC;
  --text-muted: #6B8A78;
  --white: #FFFFFF;
  --overlay: rgba(10, 26, 20, 0.85);

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --section-padding: 4rem 1.25rem;
  --container-max: 1200px;
  --gap-sm: 0.75rem;
  --gap-md: 1.5rem;
  --gap-lg: 3rem;
  --gap-xl: 5rem;

  /* Borders & Shadows */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-btn: 0 4px 15px rgba(26, 158, 111, 0.3);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* --- Reset --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul, ol { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 700;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --- Section Utilities --- */
.section {
  padding: var(--section-padding);
}

.section-title {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  text-align: center;
  margin-bottom: 0.75rem;
}

.section-title span {
  color: var(--green-light);
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto var(--gap-lg);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--green-medium);
  color: var(--white);
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  background: var(--green-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 209, 154, 0.4);
}

.btn-cta {
  background: var(--bege-cta);
  color: var(--bg-primary);
  box-shadow: 0 4px 15px rgba(212, 168, 83, 0.3);
}

.btn-cta:hover {
  background: var(--bege-cta-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 168, 83, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--green-light);
  border: 2px solid var(--green-medium);
}

.btn-outline:hover {
  background: var(--green-medium);
  color: var(--white);
  transform: translateY(-2px);
}

.btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ============================================
   HEADER / NAV
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: all var(--transition-base);
  background: transparent;
}

.header.scrolled {
  background: rgba(10, 26, 20, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.6rem 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 1001;
}

.logo img {
  height: 45px;
  width: auto;
  max-width: 180px;
}

@media (max-width: 768px) {
  .logo img {
    height: 35px;
    max-width: 140px;
  }
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-menu a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.25rem 0;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--green-light);
  transition: width var(--transition-base);
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--white);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

.nav-cta {
  display: none;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  width: 26px;
  height: 2.5px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Nav */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: var(--bg-secondary);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    transition: right var(--transition-base);
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.5);
  }

  .nav-menu.open {
    right: 0;
  }

  .nav-menu a {
    font-size: 1.15rem;
  }

  .nav-cta {
    display: inline-flex;
  }
}

@media (min-width: 769px) {
  .hamburger { display: none; }
  .nav-cta { display: inline-flex; }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 7rem 1.25rem 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 26, 20, 0.92) 0%,
    rgba(15, 43, 31, 0.85) 50%,
    rgba(10, 26, 20, 0.90) 100%
  );
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 650px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(15, 107, 78, 0.3);
  border: 1px solid rgba(46, 209, 154, 0.25);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--green-light);
  margin-bottom: 1.5rem;
  backdrop-filter: blur(4px);
}

.hero-badge svg {
  width: 16px;
  height: 16px;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1.25rem;
  line-height: 1.1;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--green-light), var(--green-medium));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 520px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(107, 138, 120, 0.2);
}

.hero-stat h3 {
  font-size: 1.75rem;
  color: var(--green-light);
  font-weight: 800;
}

.hero-stat p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.services {
  background: var(--bg-secondary);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-md);
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.service-card {
  background: var(--bg-card);
  border: 1px solid rgba(46, 209, 154, 0.08);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--green-medium), var(--green-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.service-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(46, 209, 154, 0.15);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(15, 107, 78, 0.3), rgba(26, 158, 111, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--green-light);
}

.service-icon svg {
  width: 28px;
  height: 28px;
}

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: var(--white);
}

.service-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ============================================
   ANALYSIS SECTION
   ============================================ */
.analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .analysis-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .analysis-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.analysis-item {
  background: var(--bg-card);
  border: 1px solid rgba(46, 209, 154, 0.08);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: all var(--transition-base);
}

.analysis-item:hover {
  border-color: rgba(46, 209, 154, 0.2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.analysis-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(15, 107, 78, 0.25), rgba(46, 209, 154, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-light);
}

.analysis-icon svg {
  width: 22px;
  height: 22px;
}

.analysis-item h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

/* ============================================
   HOW IT WORKS (TIMELINE)
   ============================================ */
.how-it-works {
  background: var(--bg-secondary);
}

.timeline {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--green-medium), var(--green-light), var(--green-medium));
  opacity: 0.3;
}

.timeline-item {
  display: flex;
  gap: 1.5rem;
  padding-bottom: 2.5rem;
  position: relative;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-number {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-dark), var(--green-medium));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--white);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 20px rgba(26, 158, 111, 0.25);
}

.timeline-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  color: var(--white);
}

.timeline-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   DIFFERENTIALS
   ============================================ */
.differentials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-md);
  max-width: 1000px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .differentials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .differentials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.diff-card {
  background: var(--bg-card);
  border: 1px solid rgba(46, 209, 154, 0.08);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: all var(--transition-base);
}

.diff-card:hover {
  border-color: rgba(46, 209, 154, 0.2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.diff-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(15, 107, 78, 0.3), rgba(26, 158, 111, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--green-light);
}

.diff-icon svg {
  width: 22px;
  height: 22px;
}

.diff-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--white);
}

.diff-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  background: linear-gradient(135deg, var(--green-dark), #0A4E38);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(46, 209, 154, 0.06);
}

.cta-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(46, 209, 154, 0.04);
}

.cta-section .container {
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  margin-bottom: 1rem;
  color: var(--white);
}

.cta-section p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 550px;
  margin: 0 auto 2rem;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: #071510;
  padding: 3.5rem 1.25rem 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(107, 138, 120, 0.15);
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 1rem;
  max-width: 300px;
  line-height: 1.7;
}

.footer h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--green-light);
}

.footer-contact li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-contact svg {
  width: 18px;
  height: 18px;
  color: var(--green-light);
  flex-shrink: 0;
}

.footer-bottom {
  max-width: var(--container-max);
  margin: 1.5rem auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-bottom a {
  color: var(--text-muted);
}

.footer-bottom a:hover {
  color: var(--green-light);
}

/* ============================================
   WHATSAPP FLOAT BUTTON
   ============================================ */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  transition: all var(--transition-base);
  cursor: pointer;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.55);
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  color: var(--white);
}

.whatsapp-float::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #25D366;
  animation: wpp-pulse 2s infinite;
  z-index: -1;
}

@keyframes wpp-pulse {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (min-width: 769px) {
  :root {
    --section-padding: 6rem 2rem;
  }
}

@media (min-width: 1024px) {
  :root {
    --section-padding: 7rem 2rem;
  }
}

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

  .hero-stats {
    gap: 1.5rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cta-buttons .btn {
    width: 100%;
    max-width: 300px;
  }
}

/* Nav overlay for mobile */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}
