/*
 * Agencia FX - Premium CSS Design System (Montserrat Typography Edition)
 * Aesthetic: Dark Editorial, Cinematic Boutique Consultative, Apple-inspired Precision
 * Font Family: Montserrat (Black 900, Extra Bold 800, Bold 700, Light 300)
 */

/* Import Montserrat via Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,300&display=swap');

/* Variable Tokens - Premium Dark Theme */
:root {
  /* Color Palette - Deep Slate Charcoal & Champagne Cream */
  --bg-primary: #1C1E24;       /* Deep Slate Charcoal (from reference image) */
  --bg-secondary: #232731;     /* Medium Slate Charcoal (cards/left sidebar) */
  --bg-darker: #131519;        /* Near Pitch Slate Black */
  
  --text-primary: #FFFFFF;     /* Solid White */
  --text-secondary: #C0C5D0;   /* Legible Soft Lavender/Blue Gray */
  --text-muted: #808694;       /* Muted Slate Gray */
  
  /* Brand Accent */
  --accent-cream: #EAD9B8;     /* Sophisticated Champagne Gold/Cream */
  --accent-cream-light: #F2E7D2;
  --accent-cream-bg: rgba(234, 217, 184, 0.08);
  
  --border-light: rgba(255, 255, 255, 0.06);
  --border-dark: rgba(255, 255, 255, 0.03);

  /* Typography - Unified Montserrat System */
  --font-sans: 'Montserrat', system-ui, -apple-system, sans-serif;
  --font-title: 'Montserrat', sans-serif;
  --font-sub: 'Montserrat', sans-serif;

  /* Spacing Grid */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2.5rem;
  --spacing-xl: 4rem;
  --spacing-xxl: 8rem;

  /* Layout Constants */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 16px;

  /* Animations & Transitions */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Styles & Accessibility Layout Stability */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
  scroll-behavior: smooth;
  /* Prevent layout shift during dialog/modal openings */
  scrollbar-gutter: stable;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

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

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cream);
}

/* Typography Styles with Montserrat */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  color: var(--text-primary);
  line-height: 1.15;
}

h1 {
  /* Montserrat Black 900 - Striking, bold & modern geometric look */
  font-size: clamp(2.5rem, 5.5vw, 4.85rem);
  font-weight: 900;
  letter-spacing: -0.03em; /* Tight, premium letter-spacing */
}

h2 {
  font-size: clamp(1.85rem, 3.8vw, 2.5rem);
  font-weight: 800; /* Extra Bold */
  margin-bottom: var(--spacing-md);
  letter-spacing: -0.02em;
}

h3 {
  font-family: var(--font-sub);
  font-weight: 700; /* Bold */
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  letter-spacing: -0.01em;
}

p {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 400; /* Montserrat Regular */
  color: var(--text-secondary);
  line-height: 1.7;
}

strong {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--accent-cream);
}

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

/* ---------------------------------------------------- */
/* SECTION BACKGROUND VIDEO MECHANICS                   */
/* ---------------------------------------------------- */
.section {
  padding: var(--spacing-xl) 0;
  position: relative;
  overflow: clip; /* Clip video backgrounds */
  z-index: 1;
  border-bottom: 1px solid var(--border-dark);
  background-color: transparent !important; /* Forces all sections to be transparent to reveal backdrop videos */
}

@media (min-width: 1024px) {
  .section {
    padding: var(--spacing-xxl) 0;
  }
}

.section-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* Above body background, behind relative content container */
  overflow: hidden;
  pointer-events: none;
}

.section-bg-video video,
.section-bg-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Grayscale, high contrast, dark but beautifully visible for premium backdrop */
  filter: grayscale(100%) contrast(1.15) brightness(0.35);
  opacity: 0.25; /* Highly visible but elegant presence */
  transition: opacity var(--transition-slow);
}

/* Specialize Cases Section Image for maximum visibility and gold brilliance with high CSS specificity */
.section.cases-section.reveal-element.active .section-bg-video img,
.cases-section .section-bg-video img {
  filter: contrast(1.2) brightness(0.85) !important; /* Retain rich gold champagne colors and make it highly visible */
  opacity: 0.82 !important; /* Premium prominent visibility */
}

/* Soften the dark overlay vignette for Cases Section to let the golden background shine through clearly */
.cases-section .section-bg-video .video-overlay {
  background: radial-gradient(circle, transparent 45%, rgba(28, 30, 36, 0.5) 100%),
              linear-gradient(to bottom, rgba(28, 30, 36, 0.05), rgba(28, 30, 36, 0.55)) !important;
}

/* Specialize Services Section Image for absolute gold brilliance and high visibility with high CSS specificity */
.section.services-section.reveal-element.active .section-bg-video img,
.services-section .section-bg-video img {
  filter: contrast(1.15) brightness(0.62) !important; /* Elegant subtle brightness, golden tones preserved */
  opacity: 0.52 !important; /* Soft premium presence, not distracting */
}

/* Soften the dark overlay vignette for Services Section to let the golden animation shine through vibrantly */
.services-section .section-bg-video .video-overlay {
  background: radial-gradient(circle, transparent 35%, rgba(28, 30, 36, 0.65) 100%),
              linear-gradient(to bottom, rgba(28, 30, 36, 0.05), rgba(28, 30, 36, 0.6)) !important;
}

.hero-foreground-video-wrapper img#heroBgMedia {
  filter: contrast(1.05) brightness(1.02); /* Crisp premium contrast and bright colors */
  opacity: 1; /* Solid, bright, and prominent foreground presence */
  will-change: transform; /* Optimizes GPU hardware-acceleration for scroll scrub */
  transform-origin: center center;
}

.section-bg-video .video-overlay {
  position: absolute;
  inset: 0;
  /* Dark vignette blending outer edges into deep primary background */
  background: radial-gradient(circle, transparent 20%, var(--bg-primary) 100%),
              linear-gradient(to bottom, rgba(28, 30, 36, 0.5), var(--bg-primary));
  pointer-events: none;
}

/* ---------------------------------------------------- */
/* REUSABLE UI COMPONENTS                               */
/* ---------------------------------------------------- */

/* Layout Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  position: relative;
  z-index: 2; /* Sits above the background video vignette */
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--spacing-lg);
  }
}

/* Premium Buttons - Montserrat Bold Uppercase style */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.85rem;
  font-family: var(--font-sub);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--border-radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--accent-cream);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background-color: var(--accent-cream-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(234, 217, 184, 0.15);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border-color: var(--accent-cream);
}

.btn-secondary:hover {
  background-color: var(--accent-cream);
  color: var(--bg-primary);
  transform: translateY(-2px);
}

/* Links with Montserrat Bold details */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-sub);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--accent-cream);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.text-link svg {
  transition: transform var(--transition-fast);
}

.text-link:hover {
  color: var(--text-primary);
}

.text-link:hover svg {
  transform: translateX(4px);
}

/* Section Header (Editorial Style) */
.section-header {
  max-width: 650px;
  margin-bottom: var(--spacing-xl);
}

.section-header.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Eyebrow - Montserrat Bold Style */
.eyebrow {
  display: inline-block;
  font-family: var(--font-sub);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-cream);
  margin-bottom: var(--spacing-sm);
}

/* Card Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

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

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

/* Premium Card Component (Refined Editorial Dark Style) */
.card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-sm);
  padding: var(--spacing-lg);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cream);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  background-color: #272B36; /* Subtle lighter state */
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  background-color: var(--accent-cream-bg);
  color: var(--accent-cream);
  margin-bottom: var(--spacing-md);
}

.card h3 {
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.card p {
  color: var(--text-secondary);
}

/* ---------------------------------------------------- */
/* SECTION SPECIFIC STYLES                              */
/* ---------------------------------------------------- */

/* 2. Hero Section (Full Height Centered Sticky Scroll-Jack Layout) */
#heroScrollWrapper {
  height: 250dvh; /* Scroll scrubbing duration / height */
  position: relative;
  background-color: var(--bg-primary);
}

.hero-section {
  position: sticky;
  top: 0;
  height: 100dvh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  z-index: 1;
  border-bottom: 1px solid var(--border-light);
  padding: 0;
}

.hero-container-foreground {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 5;
  padding: 0;
}

.hero-foreground-text {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 10;
  pointer-events: none;
  max-width: 90%;
  will-change: transform, opacity; /* Optimizes GPU rendering for scroll-driven animation */
  transition: transform 0.08s ease-out, opacity 0.08s ease-out; /* Damping buffer for butter-smooth scrubbing */
  opacity: 0; /* Hidden initially so it fades in elegantly on scroll */
  transform: translate3d(0, 40px, 0) scale(0.95); /* Pre-positioned for smooth slide-up reveal */
}

.hero-brand-title {
  font-family: var(--font-title);
  font-size: clamp(3.5rem, 8vw, 6.25rem);
  font-weight: 900;
  letter-spacing: -0.03em; /* Sophisticated tight typography */
  color: #E5E7EB; /* Premium very light gray for "Agencia" */
  text-transform: none;
  margin: 0;
  line-height: 1.05;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.7); /* Deep isolation shadow for perfect contrast over video */
}

.hero-brand-title .brand-fx {
  color: var(--accent-cream); /* Premium solid champagne cream matching subtitles */
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
}

.hero-subtitle {
  font-family: var(--font-sans);
  font-size: clamp(0.85rem, 2vw, 1.25rem);
  font-weight: 600; /* Bold geometric legibility */
  letter-spacing: 0.15em; /* Premium spacious editorial touch */
  color: var(--accent-cream); /* Warm champagne gold */
  text-transform: uppercase;
  margin: 0;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.85); /* Deep contrast glow */
}

.hero-foreground-video-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  background-color: #0c0d12;
}

.video-overlay-subtle {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(12, 13, 18, 0.25) 0%, rgba(12, 13, 18, 0.5) 100%);
  pointer-events: none;
  z-index: 2;
}

/* 3. Problems Section */
.problems-section {
  background-color: var(--bg-primary);
}

.problem-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-sm);
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  transition: all var(--transition-normal);
}

.problem-card:hover {
  border-color: var(--accent-cream);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

/* Scroll-driven Pinning & Staggered Slide-Up for Problem Cards (No Fade) */
.problems-pin-wrapper {
  position: relative;
  background-color: var(--bg-primary);
}

@media (min-width: 1024px) {
  .problems-pin-wrapper {
    height: 250vh; /* Scroll length for pinning */
  }

  .problems-pin-wrapper .problems-section {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Flow from the top to prevent clipping */
    align-items: stretch;
    overflow: hidden;
    margin: 0;
    padding: 120px 0 40px 0; /* Generous top padding to clear floating header, comfortable bottom padding */
    box-sizing: border-box;
  }

  /* Make header and typography more compact on Desktop to guarantee fitting in viewport */
  .problems-section .section-header {
    margin-bottom: 2rem; /* Reduced bottom margin */
    max-width: 800px;
  }

  .problems-section .section-header h2 {
    font-size: 2.2rem; /* Reduced from default 3rem */
    line-height: 1.2;
  }

  .problems-section .section-header p {
    font-size: 0.95rem;
    margin-top: 0.5rem;
  }

  /* Make problem cards compact and highly readable */
  .problems-section .problem-card {
    padding: 1.25rem 1.5rem; /* More compact padding */
    gap: 0.35rem;
    /* Always fully visible (opacity 1, NO FADE) */
    opacity: 1;
    /* Slides up from below the viewport (120vh) up to 0 as progress goes from 0 to 1 */
    transform: translateY(calc(120vh * (1 - var(--card-opacity, 0))));
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal), transform var(--transition-normal);
    will-change: transform;
  }

  .problems-section .problem-card h3 {
    font-size: 1.05rem; /* Compact title font size */
  }

  .problems-section .problem-card p {
    font-size: 0.88rem; /* Compact paragraph text */
    line-height: 1.45;
  }

  .problems-section .problem-card:hover {
    border-color: var(--accent-cream);
    /* Explicitly scale and elevate the card on hover */
    transform: translateY(-4px) scale(1.02) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  }
}

@media (max-width: 1023px) {
  .problems-pin-wrapper {
    height: auto;
  }

  .problems-pin-wrapper .problems-section {
    position: relative;
    height: auto;
    overflow: visible;
    padding: 100px 0 var(--spacing-xl) 0; /* Add top padding to clear mobile header */
  }

  .problems-section .problem-card {
    opacity: 1; /* Always fully visible (NO FADE) */
    transform: translateY(150px); /* Start translated down by 150px on mobile */
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), border-color var(--transition-normal);
    will-change: transform;
  }

  .problems-section .problem-card.mobile-active {
    transform: translateY(0); /* Slide into correct position on mobile */
  }

  /* Keep basic hover animation on mobile (touch taps) */
  .problems-section .problem-card.mobile-active:hover {
    border-color: var(--accent-cream);
    transform: translateY(-2px);
  }
}


.problem-card-num {
  font-family: var(--font-title);
  font-size: 0.95rem;
  color: var(--accent-cream);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.problem-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* 4. Value Proposition */
.value-section {
  background-color: var(--bg-primary);
}

.value-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.value-highlight {
  font-family: var(--font-title);
  font-size: clamp(1.65rem, 3.5vw, 2.65rem);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.value-highlight span {
  color: var(--accent-cream);
}

.value-text {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.value-text p {
  font-size: 1.05rem;
}

@media (min-width: 1024px) {
  .value-layout {
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--spacing-xxl);
  }
}

/* 5. Services Section */
.services-section {
  background-color: var(--bg-primary);
}

.service-card {
  background-color: var(--bg-secondary);
}

/* 6. Cómo Trabajamos (Timeline) */
.timeline-section {
  background-color: var(--bg-primary);
}

.timeline {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
  position: relative;
  margin-top: var(--spacing-xl);
}

.timeline-step {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  padding: var(--spacing-lg);
  border-left: 2px solid var(--border-light);
  transition: border-color var(--transition-normal);
  position: relative;
}

.timeline-step:hover {
  border-left-color: var(--accent-cream);
}

.timeline-num {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--accent-cream);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.timeline-step h3 {
  font-size: 1.3rem;
  font-weight: 700;
}

@media (min-width: 768px) {
  .timeline {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
  }
  .timeline-step {
    border-left: none;
    border-top: 2px solid var(--border-light);
    padding: var(--spacing-md) var(--spacing-xs) 0 0;
  }
  .timeline-step:hover {
    border-top-color: var(--accent-cream);
  }
}

/* 7. Casos de Uso / Escenarios */
.cases-section {
  background-color: var(--bg-primary);
}

.case-card {
  background-color: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.case-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 0.3rem 0.7rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--border-radius-sm);
  margin-bottom: var(--spacing-md);
}

.case-flow {
  margin: var(--spacing-md) 0;
  padding: var(--spacing-sm) 0;
  border-top: 1px dashed var(--border-light);
  border-bottom: 1px dashed var(--border-light);
}

.case-step {
  font-size: 0.85rem;
  margin-bottom: var(--spacing-xs);
}

.case-step strong {
  color: var(--accent-cream);
}

/* 8. Diferenciadores */
.diff-section {
  background-color: var(--bg-primary);
}

.diff-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
}

.diff-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

.diff-item {
  display: flex;
  gap: var(--spacing-sm);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--border-light);
}

.diff-item:last-child {
  border-bottom: none;
}

.diff-icon {
  color: var(--accent-cream);
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.diff-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: var(--spacing-xs);
}

@media (min-width: 1024px) {
  .diff-layout {
    grid-template-columns: 0.8fr 1.2fr;
    gap: var(--spacing-xxl);
  }
  .diff-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .diff-item {
    border-bottom: none;
    padding-bottom: 0;
  }
}

/* 9. Testimoniales / Qué Valoran */
.testimonials-section {
  background-color: var(--bg-primary);
}

.testimonial-quote {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
  position: relative;
}

.testimonial-quote::before {
  content: '“';
  font-size: 3.5rem;
  color: rgba(234, 217, 184, 0.12);
  position: absolute;
  top: -2rem;
  left: -0.8rem;
  font-family: var(--font-title);
  font-weight: 900;
}

.testimonial-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.testimonial-meta span {
  color: var(--accent-cream);
}

/* 10. FAQ (Accordion) */
.faq-section {
  background-color: var(--bg-primary);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-light);
  padding: var(--spacing-md) 0;
}

.faq-item:first-child {
  border-top: 1px solid var(--border-light);
}

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 0.5rem 0;
}

.faq-trigger h3 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.faq-trigger:hover h3 {
  color: var(--accent-cream);
}

.faq-icon {
  color: var(--text-muted);
  transition: transform var(--transition-normal);
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
  color: var(--accent-cream);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal);
}

.faq-item.open .faq-content {
  max-height: 500px; /* Fallback for non-JS execution */
}

.faq-content p {
  color: var(--text-secondary);
  margin: 0;
  padding: 0.5rem 0 1.25rem 0; /* Stable padding that is always measured correctly by scrollHeight */
}

/* 11. Final CTA Banner */
.cta-final-section {
  background-color: var(--bg-primary);
  padding-bottom: var(--spacing-xl);
}

.cta-banner {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-sm);
  padding: var(--spacing-xl) var(--spacing-md);
  text-align: center;
  position: relative;
  overflow: clip;
}

.cta-banner-content {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  position: relative;
  z-index: 2;
}

.cta-banner-content h2 {
  color: var(--text-primary);
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
}

.cta-banner-content p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.cta-banner-content .btn {
  margin-top: var(--spacing-xs);
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(234, 217, 184, 0.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

@media (min-width: 768px) {
  .cta-banner {
    padding: var(--spacing-xxl) var(--spacing-lg);
  }
}

/* 12. Footer */
.site-footer {
  background-color: var(--bg-darker);
  color: var(--text-secondary);
  padding: var(--spacing-xl) 0 var(--spacing-md) 0;
  border-top: 1px solid var(--border-light);
  font-size: 0.9rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.footer-brand .logo {
  color: var(--text-primary);
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.footer-brand .logo .logo-fx {
  color: var(--accent-cream);
  font-weight: 900;
  margin-left: 0.08rem;
}

.footer-tagline {
  color: var(--text-muted);
  max-width: 320px;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-lg);
}

.footer-col h4 {
  font-family: var(--font-sans);
  color: var(--text-primary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--spacing-md);
  font-weight: 700;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: var(--text-muted);
}

.footer-contact-info a {
  transition: color var(--transition-fast);
}

.footer-contact-info a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: var(--spacing-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--text-muted);
  font-size: 0.8rem;
}

@media (min-width: 768px) {
  .footer-top {
    grid-template-columns: 1fr 1.5fr;
  }
  .footer-links-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-bottom {
    flex-direction: row;
  }
}

/* ---------------------------------------------------- */
/* DIALOG MODAL & FORM STYLING (Premium Dark Slate)     */
/* ---------------------------------------------------- */
dialog {
  margin: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  width: 92%;
  max-width: 580px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  padding: 0;
  overflow: clip;
}

dialog::backdrop {
  background-color: rgba(19, 21, 25, 0.6);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

dialog[open]::backdrop {
  opacity: 1;
}

/* Dialog open keyframe animation */
dialog[open] {
  animation: modal-appear var(--transition-normal) forwards;
}

@keyframes modal-appear {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Dialog Header */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--border-light);
}

.modal-header h2 {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.btn-close-modal {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
  border-radius: 50%;
}

.btn-close-modal:hover {
  color: var(--accent-cream);
  background-color: var(--bg-primary);
}

.modal-body {
  padding: var(--spacing-lg);
  max-height: 80dvh;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.modal-intro {
  margin-bottom: var(--spacing-md);
  font-size: 0.95rem;
}

/* Form Styles */
.diagnostic-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.75rem 0.9rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent-cream);
  box-shadow: 0 0 0 3px rgba(234, 217, 184, 0.12);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
  border-top: 1px solid var(--border-light);
  padding-top: var(--spacing-md);
}

/* Success State Styles */
.form-success-container {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-lg);
  gap: var(--spacing-md);
}

.form-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: var(--accent-cream-bg);
  color: var(--accent-cream);
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-success-container h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.5rem;
}

/* ---------------------------------------------------- */
/* SCROLL REVEAL UTILITIES                              */
/* ---------------------------------------------------- */

/* Individual inner element reveals */
.reveal-element {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.reveal-element.active {
  opacity: 1;
  transform: translateY(0);
}

/* Full-section smooth fade-in reveals (no shifting to prevent layout gaps) */
section.section.reveal-element {
  opacity: 0;
  transform: none !important;
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

section.section.reveal-element.active {
  opacity: 1;
}

/* Section Background Video Parallax Zoom Fade-In Reveal */
.section.reveal-element .section-bg-video img,
.section.reveal-element .section-bg-video video {
  opacity: 0 !important;
  transform: scale(1.08) translate3d(0, 0, 0);
  transition: opacity 1.6s cubic-bezier(0.16, 1, 0.3, 1), transform 1.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.section.reveal-element.active .section-bg-video img,
.section.reveal-element.active .section-bg-video video {
  opacity: 0.25 !important; /* Premium cinematic backdrop visibility */
  transform: scale(1) translate3d(0, 0, 0);
}

/* ---------------------------------------------------- */
/* FLOATING GLASSMORPHIC HEADER / NAVBAR STYLING       */
/* ---------------------------------------------------- */
.site-header {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1100px;
  height: 4.5rem;
  background-color: rgba(28, 30, 36, 0.7);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-lg);
  z-index: 100;
  transition: all var(--transition-normal);
}

.site-header.scrolled {
  top: 0.5rem;
  width: 95%;
  height: 4rem;
  background-color: rgba(19, 21, 25, 0.9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.05);
}

.header-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-lg);
}

.header-logo {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  transition: transform var(--transition-fast);
}

.header-logo:hover {
  transform: scale(1.02);
}

.header-logo .logo-fx {
  color: var(--accent-cream);
  font-weight: 900;
}

.header-nav {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
  padding: 0.4rem 0;
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--accent-cream);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--accent-cream);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition-fast);
}

.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.btn-header-cta {
  background-color: var(--accent-cream);
  color: var(--bg-primary);
  border: 1px solid var(--accent-cream);
  border-radius: var(--border-radius-sm);
  padding: 0.65rem 1.35rem;
  font-family: var(--font-sub);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-header-cta:hover {
  background-color: var(--accent-cream-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(234, 217, 184, 0.25);
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background var(--transition-fast);
}

.mobile-menu-toggle:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

@media (max-width: 900px) {
  .header-nav {
    display: none;
    position: absolute;
    top: 5rem;
    left: 5%;
    width: 90%;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-md);
    flex-direction: column;
    padding: var(--spacing-md);
    gap: var(--spacing-sm);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    z-index: 110;
  }

  .header-nav.active {
    display: flex;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .btn-header-cta {
    display: none;
  }
}

/* ---------------------------------------------------- */
/* OPTIMIZED CANVAS & SCROLLYTELLING HERO STYLING       */
/* ---------------------------------------------------- */
#heroCanvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-slides-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

.hero-slide {
  position: absolute;
  opacity: 0;
  transform: translate3d(0, 30px, 0) scale(0.97);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 85%;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  pointer-events: auto;
}

.hero-slide-title {
  font-family: var(--font-title);
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-shadow: 0 10px 45px rgba(0, 0, 0, 0.85);
  line-height: 1.1;
}

.hero-slide-desc {
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 1.8vw, 1.35rem);
  font-weight: 500;
  color: var(--accent-cream);
  text-transform: none;
  letter-spacing: 0.05em;
  max-width: 700px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.95);
  line-height: 1.5;
}

/* Scroll indicator mouse styling */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 10;
  color: var(--text-secondary);
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}

.scroll-indicator.fade-out {
  opacity: 0;
  pointer-events: none;
}

.mouse-wheel {
  width: 20px;
  height: 32px;
  border: 2px solid var(--text-secondary);
  border-radius: 10px;
  position: relative;
}

.mouse-wheel::before {
  content: '';
  width: 4px;
  height: 8px;
  background-color: var(--accent-cream);
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
  animation: mouse-scroll 1.6s infinite;
}

@keyframes mouse-scroll {
  0% { opacity: 1; transform: translate(-50%, 0); }
  50% { opacity: 0.3; transform: translate(-50%, 6px); }
  100% { opacity: 1; transform: translate(-50%, 0); }
}

.scroll-text {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
}

/* ---------------------------------------------------- */
/* MOVING AMBIENT GLOW SYSTEM STYLING                   */
/* ---------------------------------------------------- */
.ambient-glow-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  will-change: transform;
  opacity: 0.32;
  mix-blend-mode: screen;
}

.glow-1 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(234, 217, 184, 0.15) 0%, transparent 70%);
  top: -50px;
  left: 10%;
  animation: float-glow-1 25s infinite alternate ease-in-out;
}

.glow-2 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(35, 39, 49, 0.65) 0%, transparent 70%);
  bottom: -100px;
  right: 10%;
  animation: float-glow-2 30s infinite alternate ease-in-out;
}

.glow-3 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(234, 217, 184, 0.12) 0%, transparent 70%);
  top: 30%;
  right: 20%;
  animation: float-glow-3 28s infinite alternate ease-in-out;
}

@keyframes float-glow-1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(80px, 40px) scale(1.1); }
  100% { transform: translate(-40px, 80px) scale(0.9); }
}

@keyframes float-glow-2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-60px, -80px) scale(0.9); }
  100% { transform: translate(80px, 40px) scale(1.15); }
}

@keyframes float-glow-3 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, -50px) scale(1.1); }
  100% { transform: translate(-80px, 60px) scale(0.95); }
}

/* ---------------------------------------------------- */
/* GLASSMORPHISM CARD COMPONENT OVERHAUL                 */
/* ---------------------------------------------------- */
.card, .problem-card {
  background: rgba(35, 39, 49, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  border-radius: var(--border-radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card:hover, .problem-card:hover {
  transform: translateY(-5px) scale(1.01);
  border-color: rgba(234, 217, 184, 0.3) !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35),
              0 0 25px rgba(234, 217, 184, 0.08);
  background: rgba(39, 43, 54, 0.6) !important;
}

.card::before, .problem-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(234, 217, 184, 0.06), transparent 50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.card:hover::before, .problem-card:hover::before {
  opacity: 1;
}

/* ---------------------------------------------------- */
/* NATIVE SCROLL-DRIVEN ANIMATIONS SYSTEM               */
/* ---------------------------------------------------- */
@supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
  
  /* Slowly scale down canvas as we scroll near the end of Hero */
  #heroCanvas {
    animation: zoom-out-canvas linear both;
    animation-timeline: scroll();
    animation-range: exit 0% exit 100%;
  }

  @keyframes zoom-out-canvas {
    to { transform: translate(-50%, -50%) scale(0.94); opacity: 0.75; }
  }

  /* Scroll-reveal element entry slide-in effects for reveal-element */
  .reveal-element {
    animation: slide-up-reveal auto linear both;
    animation-timeline: view();
    animation-range: entry 5% cover 25%;
  }

  @keyframes slide-up-reveal {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Specialize problem card scroll reveal with 3D tilt entry */
  .problems-section .problem-card.reveal-element {
    animation: problem-card-3d-reveal auto linear both;
    animation-timeline: view();
    animation-range: entry 8% cover 25%;
  }

  @keyframes problem-card-3d-reveal {
    from {
      opacity: 0;
      transform: perspective(1000px) rotateX(10deg) translateY(40px) scale(0.96);
    }
    to {
      opacity: 1;
      transform: perspective(1000px) rotateX(0deg) translateY(0) scale(1);
    }
  }
}

