/* 
  EnviroAsset Licenciamento Municipal - SaaS Landing Page
  Design System Aligned with Software UI
*/

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

:root {
  /* ========== CORES BRAND (Baseado no Software) ========== */
  --bg-main: #F8FAFC; /* Light gray UI background */
  --bg-panel: #FFFFFF; /* Pure white for cards/sections */
  
  --color-primary: #10B981; /* Verde "Protocolar Pedido" */
  --color-primary-hover: #059669;
  
  --color-secondary: #3B82F6; /* Azul do Logo/Tabs */
  --color-secondary-hover: #2563EB;
  
  --text-main: #1E293B; /* Slate 800 - Texto principal escuro */
  --text-muted: #64748B; /* Slate 500 - Texto secundário */
  
  --border-color: #E2E8F0; /* Slate 200 */
  
  /* ========== CORES SAAS ========== */
  --status-warning: #F59E0B; 
  --status-info: #3B82F6; 
  --status-error: #EF4444; 
  --status-success: #10B981; 
  
  --alert-info: #EFF6FF;
  --alert-warning: #FFFBEB;
  --alert-error: #FEF2F2;
  --alert-success: #ECFDF5;
  
  /* ========== TIPOGRAFIA ========== */
  --font-family-primary: 'Inter', sans-serif;
  --font-family-heading: 'Outfit', sans-serif;
  
  /* Layout */
  --container-max-width: 1200px;
  --header-height: 80px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 40px;
  --spacing-xl: 60px;
  --spacing-3xl: 120px;
  
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  --border-radius-full: 9999px;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --transition-normal: 0.3s ease;
  --transition-ultra: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
img, video { max-width: 100%; height: auto; display: block; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-family-primary);
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-family-heading); font-weight: 700; color: var(--text-main); line-height: 1.2; }
h1 { font-size: clamp(32px, 6vw, 64px); letter-spacing: -0.02em; }
h2 { font-size: clamp(28px, 5vw, 48px); letter-spacing: -0.02em; }
h3 { font-size: clamp(20px, 3vw, 24px); font-weight: 600; }

.text-center { text-align: center; }

.section-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  margin-top: var(--spacing-sm);
  max-width: 800px;
  margin-left: auto; margin-right: auto;
}

.badge-label {
    display: inline-block;
    padding: 6px 12px;
    background: var(--alert-info);
    color: var(--color-secondary);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--border-radius-full);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-sm);
}

.container { max-width: var(--container-max-width); margin: 0 auto; padding: 0 var(--spacing-md); }
.section { padding: var(--spacing-3xl) 0; background: var(--bg-panel); }
.section-alt { background-color: var(--bg-main); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color);}

.grid { display: grid; gap: var(--spacing-lg); }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); align-items: center; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ========== HEADER & NAVIGATION (Glassmorphism) ========== */
.glass-header {
  position: fixed; /* Floats over hero video */
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
}
.glass-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  height: 64px;
}

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

.header-logo {
  height: 40px;
  transition: height 0.3s ease;
}
.glass-header.scrolled .header-logo {
  height: 36px;
}

/* Desktop Nav */
.desktop-nav ul {
  display: flex;
  list-style: none;
  gap: 32px;
  margin: 0;
  padding: 0;
}
.nav-link {
  color: #64748B;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  padding: 8px 0;
  position: relative;
  transition: color 0.2s ease;
}
.nav-link:hover {
  color: #0F172A;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0%;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 2px;
}
.nav-link:hover::after {
  width: 100%;
}

/* Hamburger Menu Button */
.mobile-menu-btn {
  display: none; /* hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  flex-direction: column;
  gap: 5px;
}
.mobile-menu-btn span {
  display: block;
  width: 26px;
  height: 2px;
  background: #0F172A;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-menu-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.mobile-menu-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile Nav — full-screen overlay (OUTSIDE header to avoid iOS Safari stacking bugs) ── */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000; /* well above header (1000) */
  display: flex;
  justify-content: flex-end;
  visibility: hidden;
  pointer-events: none;
}
.mobile-nav-overlay.active {
  visibility: visible;
  pointer-events: auto;
}

/* Dim backdrop */
.mobile-nav-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 20, 40, 0.5);
  opacity: 0;
  transition: opacity 0.35s ease;
  -webkit-tap-highlight-color: transparent;
}
.mobile-nav-overlay.active .mobile-nav-backdrop {
  opacity: 1;
}

/* Slide-in panel from right */
.mobile-nav-panel {
  position: relative;
  width: min(85vw, 320px);
  height: 100%;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px);
  box-shadow: -8px 0 40px rgba(10, 20, 40, 0.18);
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-nav-overlay.active .mobile-nav-panel {
  transform: translateX(0);
}

/* Panel header: logo + close button */
.mobile-nav-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #F1F5F9;
  flex-shrink: 0;
  min-height: 64px;
}
.mobile-nav-logo {
  height: 32px;
  width: auto;
}
.mobile-nav-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: #F8FAFC;
  border-radius: 10px;
  cursor: pointer;
  color: #475569;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease;
}
.mobile-nav-close:hover,
.mobile-nav-close:active {
  background: #E2E8F0;
  color: #0F172A;
}

/* Nav links */
.mobile-nav {
  flex: 1;
  padding: 12px 0;
}
.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.mobile-nav li {
  border-bottom: 1px solid #F8FAFC;
}
.mobile-nav-link {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 18px 24px;
  font-size: 17px;
  font-weight: 700;
  color: #1E293B;
  text-decoration: none;
  letter-spacing: -0.01em;
  transform: translateX(16px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.15s ease,
              color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  min-height: 56px; /* comfortable tap target */
}
.mobile-nav-link:active {
  background: #F8FAFC;
  color: var(--color-primary);
}
.mobile-nav-overlay.active .mobile-nav-link {
  transform: translateX(0);
  opacity: 1;
}
.mobile-nav-overlay.active li:nth-child(1) .mobile-nav-link { transition-delay: 0.08s; }
.mobile-nav-overlay.active li:nth-child(2) .mobile-nav-link { transition-delay: 0.13s; }
.mobile-nav-overlay.active li:nth-child(3) .mobile-nav-link { transition-delay: 0.18s; }
.mobile-nav-overlay.active li:nth-child(4) .mobile-nav-link { transition-delay: 0.23s; }
.mobile-nav-overlay.active li:nth-child(5) .mobile-nav-link { transition-delay: 0.28s; }

/* Bottom CTA */
.mobile-nav-panel-footer {
  padding: 20px 24px;
  padding-bottom: max(20px, env(safe-area-inset-bottom, 20px));
  border-top: 1px solid #F1F5F9;
  flex-shrink: 0;
}
.mobile-nav-cta {
  width: 100% !important;
  justify-content: center;
  font-size: 15px !important;
  padding: 16px 20px !important;
  border-radius: 14px !important;
}

/* Desktop/Mobile breakpoint for nav */
@media (max-width: 1024px) {
  .desktop-nav { display: none; }
  .mobile-menu-btn { display: flex; }
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; font-size: 16px; font-weight: 600;
  border-radius: var(--border-radius-md); text-decoration: none;
  transition: var(--transition-normal); cursor: pointer; border: none;
}
.btn-cta-premium {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
  padding: 16px 32px;
  font-size: 18px;
  font-weight: 700;
  border-radius: 16px;
  box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.4), 0 0 0 1px rgba(16, 185, 129, 0.1);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.btn-cta-premium:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 40px -10px rgba(16, 185, 129, 0.5), 0 0 20px rgba(16, 185, 129, 0.2);
  background: linear-gradient(135deg, #34D399 0%, #059669 100%);
}
.btn-cta-premium:active {
  transform: translateY(-1px) scale(0.98);
}

#header-btn { padding: 10px 20px; white-space: nowrap; }
.footer-locations { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }

/* ========== MOBILE OVERRIDES (≤768px) — UI UX Pro Max ========== */
@media (max-width: 768px) {

    /* ── Scroll Animations (faster, earlier trigger) ── */
    .reveal-on-scroll {
        transition-duration: 0.5s !important;
        transform: translateY(20px);
    }
    .stagger-1 { transition-delay: 0.05s !important; }
    .stagger-2 { transition-delay: 0.08s !important; }
    .stagger-3 { transition-delay: 0.12s !important; }
    .stagger-4 { transition-delay: 0.16s !important; }

    /* ── Base Layout ── */
    .container { padding: 0 20px; }
    .section { padding: 64px 0; }

    /* ── Typography ── */
    h1 {
        font-size: clamp(28px, 8.5vw, 40px);
        line-height: 1.15;
        letter-spacing: -0.02em;
        word-wrap: break-word;
    }
    h2 {
        font-size: clamp(26px, 7vw, 34px);
        line-height: 1.2;
        letter-spacing: -0.02em;
    }
    h3 { font-size: clamp(20px, 5.5vw, 26px); }
    .section-subtitle { font-size: 16px; line-height: 1.65; }

    /* ── Header ── */
    header .logo img { height: 36px !important; }
    #header-btn {
        width: auto !important;
        font-size: 13px !important;
        padding: 10px 16px !important;
        white-space: nowrap !important;
        min-height: 44px;
    }

    /* ── Hero Section ── */
    .hero-saas {
        min-height: 100svh;
        padding: 72px 0 48px;
        align-items: flex-start;
        padding-top: max(72px, env(safe-area-inset-top, 0px) + 72px);
    }
    .hero-overlay {
        background: linear-gradient(160deg,
            rgba(255,255,255,0.96) 0%,
            rgba(255,255,255,0.88) 60%,
            rgba(255,255,255,0.6) 100%) !important;
    }
    .hero-container {
        flex-direction: column;
        text-align: center;
        padding: 0 20px;
        width: 100%;
    }
    .hero-content {
        max-width: 100%;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .hero-content h1 {
        font-size: clamp(26px, 7vw, 36px) !important;
        line-height: 1.18 !important;
        margin-bottom: 14px;
    }
    .hero-content .section-subtitle {
        font-size: 15px;
        line-height: 1.6;
        max-width: 92%;
        color: var(--text-muted);
    }
    .hero-stats-badge {
        padding: 7px 14px;
        font-size: 12px;
        margin-bottom: 16px;
        justify-content: center;
        width: auto;
        max-width: 100%;
        text-align: center;
        white-space: normal;
    }
    /* CTA row full-width on mobile */
    .hero-cta-row {
        width: 100% !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        margin-top: 24px !important;
    }
    /* CTA buttons in hero */
    .hero-content > div[style*="display: flex"] {
        width: 100%;
        flex-direction: column;
        align-items: center;
    }
    .hero-content .btn {
        width: 100%;
        max-width: 340px;
        min-height: 54px;
        font-size: 16px;
        border-radius: 14px;
    }

    /* ── General Buttons ── */
    .btn, .btn-cta-premium {
        width: 100% !important;
        max-width: 100% !important;
        justify-content: center;
        min-height: 54px;
        font-size: 15px;
        border-radius: 14px;
        padding: 16px 20px !important;
        box-sizing: border-box;
    }

    /* ── Bento Cards (O Problema section) ── */
    .modern-card {
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 0 !important;
        align-self: stretch !important;
        padding: 28px 24px !important;
        border-radius: 28px !important;
    }
    .modern-card-container {
        gap: 16px !important;
    }
    .dark-card-content {
        flex-direction: column !important;
        gap: 20px !important;
    }

    /* ── Sticky Stack (Benefícios) ── */
    .sticky-stack-layout {
        flex-direction: column !important;
        gap: 32px !important;
    }
    .sticky-info {
        position: relative !important;
        top: 0 !important;
        margin-bottom: 24px;
    }
    .sticky-cards-container {
        gap: 48px !important;
        padding-bottom: 60px !important;
    }
    .sticky-card {
        position: sticky !important;
        top: 100px !important;
        padding: 40px 24px !important;
        border-radius: 32px !important;
        box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.1), 0 20px 50px rgba(0, 0, 0, 0.1) !important;
    }
    .card-number {
        font-size: 64px !important;
        margin-bottom: 20px !important;
    }

    /* ── Bimodal Cards (Funcionalidades) ── */
    .bimodal-card {
        display: flex !important;
        flex-direction: column !important;
        border-radius: 16px !important;
    }
    .bimodal-image {
        border-right: none !important;
        border-bottom: 1px solid var(--border-color);
        padding: 8px !important;
        height: auto !important;
    }
    .bimodal-card.reverse .bimodal-image {
        border-left: none !important;
        border-bottom: 1px solid var(--border-color);
        order: -1;
    }
    .bimodal-content {
        padding: 24px 20px !important;
        text-align: left;
    }
    .feature-list li {
        text-align: left;
    }

    /* ── CTA Section ── */
    .cta-btn-group {
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;
    }
    .cta-highlight-card {
        min-width: 100% !important;
        width: 100% !important;
    }
    .cta-highlights-row {
        flex-direction: column !important;
        gap: 16px !important;
    }

    /* ── Timeline ── */
    .interactive-timeline { margin-left: 24px; }
    .interactive-timeline > div[style*="left: 50%"],
    #timeline-progress { left: 0 !important; }
    .timeline-row {
        justify-content: flex-end !important;
        margin-bottom: 48px;
    }
    .timeline-card {
        width: calc(100% - 40px) !important;
        text-align: left !important;
        padding: 28px 20px !important;
        border-radius: 20px !important;
        transform: none !important; /* Remove desktop zig-zag offset */
    }
    .timeline-dot { left: 0 !important; }
    .step-title { font-size: 22px !important; }
    .step-desc { font-size: 15px !important; }

    /* ── Footer ── */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 36px;
        text-align: center;
    }
    .footer-grid > div { display: flex; flex-direction: column; align-items: center; }
    .footer-grid p { margin-left: auto; margin-right: auto; }
    .footer-locations {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
        text-align: center;
    }
}

/* ── Touch: remove hover transforms (no hover on touch) ── */
@media (hover: none) {
    .btn-primary:hover,
    .btn-secondary:hover,
    .btn-white:hover,
    .card:hover,
    .hover-lift:hover,
    .hover-float:hover {
        transform: none !important;
        box-shadow: inherit !important;
    }
    /* Replace with active-state feedback */
    .btn:active { transform: scale(0.97) !important; opacity: 0.92; }
    .card:active { transform: scale(0.99) !important; }
}

/* ========== INTERACTIONS ========== */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.08);
}

/* ========== HERO SECTION (Cinematográfico, mas com UI de Software) ========== */
.hero-saas {
  padding: 60px 0 80px;
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  background-color: var(--bg-main); /* Prevent harsh black flashes before video loads */
}
.hero-video-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; opacity: 0; animation: fadeIn 1s ease 0.5s forwards; }
@keyframes fadeIn { to { opacity: 1; } }
.hero-overlay {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  /* Light tint to match white interface while letting the video shine */
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0.2) 100%);
  z-index: 1;
}

.hero-container {
  z-index: 2;
  width: 100%;
  display: flex !important;
  align-items: center;
}
.hero-content {
  max-width: 800px;
}
.no-break { white-space: nowrap; }
@media (max-width: 900px) {
  .hero-container { flex-direction: column; text-align: center; }
  .hero-overlay { background: rgba(255, 255, 255, 0.85); }
  .hero-content { margin: 0 auto; max-width: 100%; }
}

.hero-content { position: relative; z-index: 2; }
.hero-content h1 { 
    color: var(--text-main); 
    text-shadow: none; 
    font-weight: 800; 
    font-size: clamp(32px, 4.2vw, 48px); 
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}
.hero-content .section-subtitle { color: var(--text-muted); text-shadow: none; margin-left: 0; font-weight: 500; }

.hero-stats-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border-color);
    padding: 8px 16px; border-radius: var(--border-radius-full);
    font-size: 14px; font-weight: 600; margin-bottom: 24px;
    box-shadow: var(--shadow-md); color: var(--text-main);
}
.hero-stats-badge span { color: var(--color-primary); font-weight: 700; }

/* Dashboard Mockup - Aligned with the Software UI Screenshot */
.hero-dashboard-mockup { width: 100%; position: relative; }
.dashboard-frame {
    background: #FFFFFF;
    border-radius: var(--border-radius-md);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0,0,0,0.05);
    overflow: hidden;
}
.dashboard-header {
    height: 50px; background: #FFFFFF; border-bottom: 1px solid var(--border-color);
    display: flex; align-items: center; padding: 0 24px; gap: 16px;
}
.dashboard-header .search-bar {
  flex: 1; background: var(--bg-main); height: 32px; border-radius: 4px; max-width: 200px;
}
.header-title { font-weight: 700; font-size: 16px; color: var(--text-main); }

.dashboard-sidebar {
  width: 60px; background: #FFFFFF; border-right: 1px solid var(--border-color);
  display: flex; flex-direction: column; align-items: center; padding-top: 20px; gap: 20px;
}
.sidebar-item { width: 32px; height: 32px; background: var(--bg-main); border-radius: 4px; }
.sidebar-item.active { background: var(--alert-info); }

.dashboard-body-wrapper { display: flex; height: 300px; }
.dashboard-content { flex: 1; padding: 24px; background: var(--bg-main); overflow: hidden;}
.mockup-step { font-size: 18px; font-weight: 700; color: var(--text-main); margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid var(--color-secondary);}

/* Green dashed cards mirroring 'Upload de Documentos' step */
.doc-card {
  background: #ECFDF5; border: 1px dashed #10B981; border-radius: 6px;
  height: 40px; margin-bottom: 12px; display: flex; align-items: center; padding: 0 16px;
  justify-content: space-between;
}
.doc-card .text { width: 60%; height: 8px; background: rgba(16, 185, 129, 0.2); border-radius: 4px; }
.doc-card .tag { background: #10B981; color: white; font-size: 10px; padding: 2px 8px; border-radius: 12px; font-weight: 600; }

.mockup-btn {
  background: var(--color-primary); width: 120px; height: 36px; border-radius: 6px;
  margin-top: 16px; margin-left: auto; display: block;
}

/* ========== COMPONENTES ========== */
.card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  transition: var(--transition-normal); height: 100%;
}
.card:hover {
  border-color: var(--color-secondary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.card-icon {
  width: 56px; height: 56px;
  background: var(--alert-info);
  color: var(--color-secondary);
  border-radius: var(--border-radius-md);
  display: flex; align-items: center; justify-content: center; margin-bottom: var(--spacing-md);
}
.card-icon svg { width: 28px; height: 28px; }

/* Destaque Metricas */
.metric-highlight {
  font-size: 40px; font-family: var(--font-family-heading); font-weight: 700;
  color: var(--color-secondary);
  display: block; margin-bottom: 8px;
}

/* Section Nova Lei (Destaque) */
.law-banner {
  background: var(--alert-warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-xl);
  display: flex; gap: var(--spacing-lg); align-items: center;
  position: relative; overflow: hidden;
}
@media (max-width: 768px) { .law-banner { flex-direction: column; text-align: center; } }
.law-timer { background: #FFFFFF; padding: 16px 24px; border-radius: var(--border-radius-md); border: 1px solid var(--border-color); display: inline-flex; align-items: center; gap: 12px; box-shadow: var(--shadow-sm); }

/* Bimodal Cards */
.bimodal-container { display: flex; flex-direction: column; gap: var(--spacing-lg); margin-top: var(--spacing-xl); }
.bimodal-card {
  display: grid; grid-template-columns: 1fr;
  background: #FFFFFF; border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 900px) {
    .bimodal-card { grid-template-columns: 1.35fr 0.65fr; align-items: center; }
    .bimodal-card.reverse { direction: rtl; }
    .bimodal-card.reverse > * { direction: ltr; }
}
.bimodal-content { padding: var(--spacing-lg); }
.bimodal-image { padding: var(--spacing-md); display: flex; justify-content: center; background: var(--bg-main); height: 100%; border-right: 1px solid var(--border-color); }
.bimodal-card.reverse .bimodal-image { border-right: none; border-left: 1px solid var(--border-color); }
.bimodal-image img { width: 100%; border-radius: var(--border-radius-md); box-shadow: var(--shadow-md); }

.feature-list { list-style: none; margin-top: var(--spacing-md); }
.feature-list li { display: flex; gap: 12px; margin-bottom: 16px; color: var(--text-main); font-weight: 500; }
.feature-list li svg { width: 24px; height: 24px; color: var(--color-primary); flex-shrink: 0; }

/* ANIMATIONS */
.reveal-on-scroll { 
    opacity: 0; 
    transform: translateY(40px) scale(0.98); 
    filter: blur(4px);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1); 
}
.reveal-on-scroll.active { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
    filter: blur(0);
}
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }

/* TIMELINE */
.timeline { display: grid; gap: 32px; position: relative; padding: 40px 0; }
@media (min-width: 768px) {
    .timeline { grid-template-columns: repeat(4, 1fr); text-align: center; }
    .timeline::before { content: ''; position: absolute; top: 70px; left: 10%; right: 10%; height: 2px; background: var(--border-color); z-index: 0; }
}
.timeline-step { display: flex; flex-direction: column; align-items: center; position: relative; z-index: 1; }
.step-number {
    width: 60px; height: 60px; border-radius: 50%;
    background: #FFFFFF; color: var(--color-secondary); border: 2px solid var(--color-secondary);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 700; font-family: var(--font-family-heading);
    margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.step-duration { display: inline-block; margin-top: 8px; padding: 4px 12px; background: var(--alert-info); border-radius: 12px; font-size: 12px; font-weight: 600; color: var(--color-secondary); }

/* Section UI Extensions */
.section-dark { background-color: var(--color-secondary); color: #FFFFFF; }
.section-dark h2, .section-dark h3, .section-dark p { color: #FFFFFF; }

/* FOOTER */
footer { background: #0F172A; color: #F8FAFC; padding: var(--spacing-xl) 0 var(--spacing-md); }
footer a { color: #94A3B8; text-decoration: none; transition: var(--transition-normal); }
footer a:hover { color: #FFFFFF; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 40px; margin-bottom: 24px; }
@media(max-width: 768px) { .footer-grid { grid-template-columns: 1fr; } }

/* ========== SLIDE-IN ANIMATIONS (Desktop) ========== */
.slide-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.slide-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.slide-in-left.active,
.slide-in-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* ── Mobile: reduce slide travel to prevent horizontal overflow ── */
@media (max-width: 768px) {
    .slide-in-left {
        transform: translateX(-16px);
        transition-duration: 0.55s !important;
    }
    .slide-in-right {
        transform: translateX(16px);
        transition-duration: 0.55s !important;
    }

    /* Hero CTA row — stacked, centered */
    .hero-cta-row {
        flex-direction: column !important;
        align-items: center !important;
        width: 100%;
    }
    .hero-cta-row .btn {
        width: 100%;
        max-width: 340px;
        min-height: 54px;
        font-size: 16px;
        border-radius: 14px;
    }

    /* Customização section grid — force single column */
    .grid.grid-2 {
        grid-template-columns: 1fr !important;
    }
    /* CTA buttons — override inline width: auto on mobile */
    .cta-btn-group .btn {
        width: 100% !important;
        padding: 18px 24px !important;
        border-radius: 14px !important;
    }

    /* Bimodal container spacing */
    .bimodal-container {
        gap: 20px !important;
        margin-top: 32px !important;
    }

    /* Section bento margin fix */
    .section-bento { padding: 64px 0 !important; }

    /* Como Funciona section spacing */
    .section-timeline-start { padding-top: 80px !important; }
    .interactive-timeline > div:last-child .timeline-card { margin-bottom: 0 !important; }
}

/* ===================================================
   HERO DYNAMIC TITLE — phrase 1 → phrase 2 on load
   =================================================== */

.hero-dyn-title {
    position: relative;
    margin-bottom: 20px;
    /* height driven by JS during transition */
}

.hdt-frame {
    font-family: var(--font-family-heading);
    font-size: clamp(32px, 4.2vw, 48px);
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

/* Phrase 1 — in normal flow, sets container height */
.hdt-frame-1 { position: relative; }

/* ── Word-by-word reveal ── */
.hdt-w {
    display: inline-block;
    opacity: 0;
    transform: translateY(12px);
    filter: blur(5px);
    animation: hdt-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: calc(0.3s + var(--i) * 0.13s);
}

@keyframes hdt-in {
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.hdt-br { display: block; height: 0; }

.hdt-g { color: #10B981; }
.hdt-b { color: var(--color-secondary); }

/* Phrase 1 exit — sweeps up */
.hdt-frame-1.hdt-exit {
    animation: hdt-frame-out 0.5s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

@keyframes hdt-frame-out {
    to { opacity: 0; transform: translateY(-22px); filter: blur(7px); }
}

/* Phrase 2 — absolute until JS moves it to flow; words animate on .hdt-enter */
.hdt-frame-2 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    pointer-events: none;
}

.hdt-frame-2.hdt-enter {
    opacity: 1;
    pointer-events: auto;
}

/* Frame 2 words — triggered when parent gets .hdt-enter */
.hdt-w2 {
    display: inline-block;
    opacity: 0;
    transform: translateY(12px);
    filter: blur(5px);
}

.hdt-frame-2.hdt-enter .hdt-w2 {
    animation: hdt-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: calc(0.1s + var(--i) * 0.13s);
}

/* Phrase 3 — absolute until JS moves it to flow; smooth whole-frame transition */
.hdt-frame-3 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(22px);
    filter: blur(7px);
    pointer-events: none;
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.75s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.hdt-frame-3.hdt-enter {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    pointer-events: auto;
}

/* ── Mobile — iPhone 14 and similar (≤ 768px) ── */
@media (max-width: 768px) {
    /* Container: full width, no overflow */
    .hero-dyn-title {
        width: 100%;
        margin-bottom: 16px;
    }

    /* Tighter font so long words ("Transparência", "Plataforma") don't overflow */
    .hdt-frame {
        font-size: clamp(22px, 5.8vw, 28px) !important;
        line-height: 1.2 !important;
        letter-spacing: -0.015em !important;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* Slightly more breathing room between lines on mobile */
    .hdt-br { height: 2px; }
}
