/* ==========================================================================
   TRIW ENGENHARIA - ESTILOS PRINCIPAIS
   Identidade: #383435 (Ink), #9ad11f (Accent Solar), #7cab18 (Accent Dark)
   ========================================================================== */

:root {
  --color-ink: #383435;
  --color-ink-light: #524e4f;
  --color-accent: #9ad11f;
  --color-accent-dark: #7cab18;
  --color-accent-glow: rgba(154, 209, 31, 0.45);
  --color-mist: #f8fafc;
  --color-surface: #ffffff;
  --header-height: 76px;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after {
  box-sizing: inherit;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--color-ink);
  background-color: var(--color-surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background Grids & Patterns */
.grid-lines {
  background-image: 
    linear-gradient(#383435 1px, transparent 1px),
    linear-gradient(90deg, #383435 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.045;
}

.grid-lines-dark {
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Header & Navigation */
header.scrolled {
  box-shadow: 0 4px 20px -2px rgba(56, 52, 53, 0.08);
  background-color: rgba(255, 255, 255, 0.96);
}

.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: width 0.25s ease;
  border-radius: 2px;
}

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

/* WhatsApp Floating & Pulse Animation */
@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(154, 209, 31, 0.65);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(154, 209, 31, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(154, 209, 31, 0);
  }
}

.wa-pulse {
  animation: pulse-ring 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.wa-float-badge {
  position: absolute;
  right: 64px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.group-wa:hover .wa-float-badge {
  opacity: 1;
  transform: translateY(-50%) translateX(-6px);
}

/* Solar Simulator Slider Styling */
.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 9999px;
  background: linear-gradient(to right, #9ad11f 0%, #9ad11f var(--range-percent, 25%), #e2e8f0 var(--range-percent, 25%), #e2e8f0 100%);
  outline: none;
  transition: background 0.15s ease-in-out;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #383435;
  border: 3px solid #9ad11f;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: #1e1c1d;
}

.range-slider::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #383435;
  border: 3px solid #9ad11f;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* FAQ Accordion Transitions */
.faq-trigger svg {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-trigger svg {
  transform: rotate(180deg);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
  opacity: 0;
}

.faq-item.active .faq-content {
  max-height: 400px;
  opacity: 1;
}

/* Card Hover Elevation */
.card-hover {
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.25s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -8px rgba(56, 52, 53, 0.08);
  border-color: rgba(154, 209, 31, 0.4);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Mobile Menu Transitions */
#mobile-menu {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

#mobile-menu.hidden-menu {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

#mobile-menu.visible-menu {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
