/* ==========================================================================
   M&R SOLUCIONES INTEGRALES — DESIGN SYSTEM & STYLESHEET
   Sovereign Editorial Architecture for SG-SST Landing Page
   ========================================================================== */

/* =========================================
   1. DESIGN TOKENS (CSS Custom Properties)
   ========================================= */
:root {
  /* Surface Colors */
  --surface: #f8f9ff;
  --surface-lowest: #ffffff;
  --surface-low: #eff4ff;
  --surface-container: #e6eeff;
  --surface-high: #dce9ff;

  /* Primary Branding (Midnight Navy) */
  --primary: #001f3f;
  --primary-dark: #000d1a;
  --primary-container: #001f3f;
  --on-primary: #ffffff;

  /* Accent Colors (Gold / Ochre) */
  --tertiary: #090500;
  --on-tertiary-container: #a3813d;
  --tertiary-fixed-dim: #e9c176;

  /* Text & On-Surface Colors */
  --on-surface: #0f1c2d;
  --on-surface-variant: #43474e;

  /* Outlines & Borders */
  --outline: #74777f;
  --outline-variant: #c4c6cf;

  /* Typography Stacks: Plus Jakarta Sans (Authority Display) & Manrope (Crisp Editorial Body) */
  --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Spacing Grid & Units */
  --container-max: 1280px;
  --gutter: 24px;
  --margin-desktop: 48px;
  --section-gap: 88px;
}

/* =========================================
   2. RESET & BASE ELEMENTS
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
}

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

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

/* Keyboard focus indicator — visible on Tab, not on mouse click */
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Respect the OS-level "reduce motion" preference */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .animate-on-scroll,
  .navbar,
  .btn-float-back-to-top {
    animation-timeline: none;
    transition: none;
    opacity: 1;
    transform: none;
    visibility: visible;
  }

  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================
   3. TYPOGRAPHY HIERARCHY
   ========================================= */
.display-lg {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.5vw, 3.1rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--primary-container);
}

.headline-md {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--primary-container);
}

.headline-sm {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--primary-container);
}

.body-lg {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--on-surface-variant);
}

.body-md {
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 400;
  line-height: 1.6;
}

.label-md {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kicker {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
}

/* =========================================
   4. LAYOUT & CONTAINERS
   ========================================= */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--margin-desktop);
  padding-right: var(--margin-desktop);
}

.section {
  padding: var(--section-gap) 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 3.5rem;
}

.section-header .kicker {
  margin-bottom: 0.85rem;
  display: block;
}

.section-header p {
  margin-top: 1rem;
  font-size: 1.05rem;
  color: var(--on-surface-variant);
  line-height: 1.65;
}

/* =========================================
   5. FIXED NAVBAR (Stitch Style)
   ========================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 76px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 31, 63, 0.08);
}

/* Shrink + shadow the navbar as the page scrolls — driven by scroll position,
   no JS/scroll-listener needed. Falls back to the static state above on
   browsers without scroll-driven animation support (~16% globally in 2026). */
@supports (animation-timeline: scroll()) {
  @keyframes navbar-on-scroll {
    from {
      height: 76px;
      background: rgba(255, 255, 255, 0.92);
      box-shadow: none;
    }
    to {
      height: 68px;
      background: rgba(255, 255, 255, 0.98);
      box-shadow: 0 4px 20px rgba(0, 31, 63, 0.06);
    }
  }

  .navbar {
    animation: navbar-on-scroll linear both;
    animation-timeline: scroll(root);
    animation-range: 0 80px;
  }
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-brand img {
  height: 42px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
}

.nav-link {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--on-surface-variant);
  transition: color 0.25s ease;
  position: relative;
  padding: 0.3rem 0;
}

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

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

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

.nav-cta-btn {
  min-height: 42px;
  padding: 0 1.35rem;
  font-size: 0.86rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #25d366;
  /* Navy instead of white text: WCAG AA needs 4.5:1 for this text size and
     white-on-#25d366 only reaches ~2:1. Navy-on-#25d366 reaches ~8.3:1. */
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
  transition: all 0.3s ease;
}

.nav-cta-btn:hover {
  background-color: #1fb855;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
}

/* Mobile Menu Toggle (CSS-only checkbox hack — no JS required).
   Visually hidden (not display:none) so it stays focusable and reachable
   by keyboard and screen-reader users — Tab + Space toggles the menu. */
.mobile-menu-checkbox {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mobile-menu-checkbox:focus-visible ~ .nav-container .nav-mobile-toggle {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 8px;
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
  padding: 0.5rem;
  align-items: center;
  justify-content: center;
}

.nav-mobile-toggle .material-symbols-outlined {
  font-size: 30px;
}

.nav-mobile-toggle .icon-close {
  display: none;
}

.mobile-menu-checkbox:checked ~ .nav-container .nav-mobile-toggle .icon-menu {
  display: none;
}

.mobile-menu-checkbox:checked ~ .nav-container .nav-mobile-toggle .icon-close {
  display: inline-flex;
}

/* Mobile Menu Drawer */
.mobile-menu {
  position: fixed;
  top: 76px;
  left: 0;
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 31, 63, 0.1);
  box-shadow: 0 10px 30px rgba(0, 31, 63, 0.1);
  padding: 1.5rem 1.25rem;
  display: none;
  flex-direction: column;
  gap: 1rem;
  z-index: 999;
}

.mobile-menu-checkbox:checked ~ .mobile-menu {
  display: flex;
}

.mobile-menu a {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-container);
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(0, 31, 63, 0.05);
}

/* =========================================
   6. BUTTONS & CTAs
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  min-height: 52px;
  padding: 0 1.8rem;
  border-radius: 9999px;
  white-space: nowrap;
  touch-action: manipulation;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 4px 18px rgba(0, 31, 63, 0.2);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  box-shadow: 0 8px 25px rgba(0, 31, 63, 0.35);
  transform: translateY(-2px);
}

.btn-ghost {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-ghost:hover {
  background-color: rgba(0, 31, 63, 0.06);
  transform: translateY(-2px);
}

.btn-whatsapp {
  background-color: #25d366;
  /* Navy instead of white text: WCAG AA needs 4.5:1 for this text size and
     white-on-#25d366 only reaches ~2:1. Navy-on-#25d366 reaches ~8.3:1. */
  color: var(--primary);
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp:hover {
  background-color: #1fb855;
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.5);
  transform: translateY(-2px);
}

.btn-white {
  background-color: #ffffff;
  color: var(--primary);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-white:hover {
  background-color: var(--surface-low);
  transform: translateY(-2px);
}

.btn-outline-white {
  background-color: transparent;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-outline-white:hover {
  border-color: rgba(255, 255, 255, 0.85);
  background-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

/* =========================================
   7. HERO SECTION
   ========================================= */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
  background: linear-gradient(175deg, var(--surface-low) 0%, var(--surface) 65%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-kicker {
  margin-bottom: 1.3rem;
  display: inline-block;
  background-color: rgba(0, 31, 63, 0.07);
  padding: 0.4rem 1rem;
  border-radius: 9999px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 4.8vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--primary-container);
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.12rem;
  line-height: 1.7;
  color: var(--on-surface-variant);
  max-width: 560px;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-bottom: 2.75rem;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(0, 31, 63, 0.1);
}

.hero-trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--on-surface-variant);
  font-weight: 600;
}

.hero-trust-item .material-symbols-outlined {
  font-size: 20px;
  color: var(--on-tertiary-container);
}

.hero-trust-divider {
  width: 1px;
  height: 22px;
  background-color: var(--outline-variant);
}

/* Hero Visual Card */
.hero-visual {
  position: relative;
  z-index: 2;
}

.hero-card {
  background: var(--surface-lowest);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 31, 63, 0.08), 0 2px 8px rgba(0, 31, 63, 0.04);
  border: 1px solid rgba(0, 31, 63, 0.08);
}

.hero-card-image {
  width: 100%;
  background: #ffffff;
  padding: 2.75rem 2rem 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: 1px solid var(--surface-container);
}

.hero-card-logo {
  width: 100%;
  max-width: 380px;
}

.hero-card-body {
  padding: 1.85rem 2rem 2.25rem;
}

.hero-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary-container);
  margin-bottom: 0.65rem;
}

.hero-card-body p {
  font-size: 0.92rem;
  color: var(--on-surface-variant);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.hero-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.hero-stat {
  background: var(--surface-low);
  border-radius: 12px;
  padding: 1.1rem;
  text-align: center;
  border: 1px solid rgba(0, 31, 63, 0.04);
}

.hero-stat-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary-container);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.hero-stat-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--on-surface-variant);
  letter-spacing: 0.02em;
}

/* =========================================
   8. SOCIAL PROOF / STATS
   ========================================= */
.social-proof {
  background: var(--surface);
  border-top: 1px solid rgba(0, 31, 63, 0.06);
  border-bottom: 1px solid rgba(0, 31, 63, 0.06);
  padding: 2.5rem 0;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.proof-item {
  text-align: center;
  padding: 1.25rem 1rem;
  position: relative;
}

.proof-item + .proof-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: var(--outline-variant);
}

.proof-value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 800;
  color: var(--primary-container);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.proof-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--on-surface-variant);
}

/* =========================================
   9. QUIÉNES SOMOS
   ========================================= */
.about {
  background: var(--surface);
}

.about-grid {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: var(--gutter);
  align-items: start;
}

.about-title-col {
  position: sticky;
  top: 100px;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.about-lead {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--primary-container);
}

.about-text {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--on-surface-variant);
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.about-feature {
  background: var(--surface-container);
  padding: 1.75rem;
  border-radius: 14px;
}

.about-feature .material-symbols-outlined {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
  display: block;
}

.about-feature h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-container);
  margin-bottom: 0.4rem;
}

.about-feature p {
  font-size: 0.9rem;
  color: var(--on-surface-variant);
  line-height: 1.55;
}

/* =========================================
   10. POR QUÉ ELEGIRNOS
   ========================================= */
.value-props {
  background: var(--surface-lowest);
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.value-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
}

.value-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--surface-container);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: background 0.3s ease;
}

.value-item:hover .value-icon {
  background: var(--surface-high);
}

.value-icon .material-symbols-outlined {
  font-size: 2.2rem;
  color: var(--primary);
}

.value-item h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-container);
  margin-bottom: 0.75rem;
}

.value-item p {
  font-size: 0.94rem;
  color: var(--on-surface-variant);
  line-height: 1.65;
  max-width: 320px;
}

/* =========================================
   11. MID-PAGE CTA STRIP
   ========================================= */
.cta-strip {
  background: linear-gradient(135deg, var(--surface-high) 0%, var(--surface-container) 100%);
  padding: 3.2rem 0;
  border-top: 1px solid rgba(0, 31, 63, 0.08);
  border-bottom: 1px solid rgba(0, 31, 63, 0.08);
}

.cta-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cta-strip-text h3 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--primary-container);
  margin-bottom: 0.35rem;
}

.cta-strip-text p {
  font-size: 0.98rem;
  color: var(--on-surface-variant);
}

/* =========================================
   12. 5 GRANDES LÍNEAS DE SERVICIO
   ========================================= */
.services {
  background: var(--surface);
  position: relative;
  /* No overflow:hidden here: nothing in this section overflows it, and it was
     turning .services into a scroll container — which hijacked the anonymous
     view() timeline of .services-grid.animate-on-scroll below, pinning it
     permanently "revealed" instead of tracking real page scroll. */
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.service-card {
  background: var(--surface-lowest);
  border-radius: 16px;
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 31, 63, 0.06);
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: 16px;
}

.service-card:hover::before {
  opacity: 1;
}

.service-card > * {
  position: relative;
  z-index: 1;
}

.service-card .material-symbols-outlined {
  font-size: 2.5rem;
  color: var(--on-tertiary-container);
  margin-bottom: 1.5rem;
  transition: color 0.4s ease;
}

.service-card:hover .material-symbols-outlined {
  color: var(--tertiary-fixed-dim);
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--primary-container);
  margin-bottom: 0.75rem;
  transition: color 0.4s ease;
}

.service-card:hover h3 {
  color: var(--on-primary);
}

.service-card p {
  font-size: 0.92rem;
  color: var(--on-surface-variant);
  line-height: 1.65;
  flex-grow: 1;
  transition: color 0.4s ease;
  margin-bottom: 1.25rem;
}

.service-card:hover p {
  color: rgba(255, 255, 255, 0.85);
}

.service-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.service-card-tag {
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--surface-low);
  color: var(--primary);
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  transition: all 0.3s ease;
}

.service-card:hover .service-card-tag {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.service-card-wide {
  grid-column: span 2;
}

.service-card-wide-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: start;
}

/* =========================================
   13. DEEP DIVES (CASOS DE USO)
   ========================================= */
.deep-dives {
  background: var(--surface-lowest);
}

.deep-dive {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.deep-dive + .deep-dive {
  margin-top: 4.5rem;
}

.deep-dive.reversed .deep-dive-visual {
  order: -1;
}

.deep-dive.reversed .deep-dive-content {
  order: 1;
}

.deep-dive-visual {
  width: 100%;
  height: 360px;
  max-width: 540px;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
}

.deep-dive-card-frame {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 14px 35px rgba(0, 31, 63, 0.1);
}

.deep-dive-card-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 18px;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.deep-dive-visual:hover .deep-dive-card-frame img {
  transform: scale(1.03);
}

.deep-dive-content {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.deep-dive-content h3 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  color: var(--primary-container);
}

.deep-dive-content > p {
  font-size: 1.02rem;
  color: var(--on-surface-variant);
  line-height: 1.7;
}

.deep-dive-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.deep-dive-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.94rem;
  color: var(--on-surface-variant);
  line-height: 1.55;
}

.deep-dive-checklist li .material-symbols-outlined {
  color: var(--on-tertiary-container);
  font-size: 22px;
  margin-top: 2px;
  flex-shrink: 0;
}

/* =========================================
   14. SECTORES QUE ATENDEMOS
   ========================================= */
.sectors {
  background: var(--surface);
}

.sectors-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.sector-card {
  background: var(--surface-lowest);
  border-radius: 14px;
  padding: 1.6rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid rgba(0, 31, 63, 0.06);
  transition: all 0.3s ease;
}

.sector-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 31, 63, 0.08);
  border-color: rgba(0, 31, 63, 0.15);
}

.sector-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--surface-low);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sector-icon .material-symbols-outlined {
  font-size: 24px;
  color: var(--primary);
}

.sector-card h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-container);
  line-height: 1.3;
}

/* =========================================
   15. MODALIDADES DE CONTRATACIÓN
   ========================================= */
.modalities {
  background: var(--surface-lowest);
}

.modalities-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
}

.modality-card {
  background: var(--surface-low);
  border-radius: 14px;
  padding: 1.8rem 1.4rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid rgba(0, 31, 63, 0.05);
  transition: all 0.3s ease;
}

.modality-card:hover {
  background: var(--surface-container);
  transform: translateY(-3px);
}

.modality-card .material-symbols-outlined {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 0.85rem;
}

.modality-card h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-container);
  margin-bottom: 0.45rem;
}

.modality-card p {
  font-size: 0.85rem;
  color: var(--on-surface-variant);
  line-height: 1.5;
}

/* =========================================
   16. METODOLOGÍA PHVA
   ========================================= */
.methodology {
  background: var(--primary);
  color: var(--on-primary);
  position: relative;
  /* No overflow:hidden here: the ::before overlay below is already inset 0
     (can't overflow), and overflow:hidden was turning .methodology into a
     scroll container — hijacking the view() timeline of .phva-grid below,
     pinning it permanently "revealed" instead of tracking real page scroll. */
}

.methodology::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 20% 80%, rgba(175, 200, 240, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.methodology .section-header p {
  color: rgba(255, 255, 255, 0.82);
}

.methodology .display-lg,
.methodology .headline-md {
  color: var(--on-primary);
}

.phva-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.75rem;
  position: relative;
}

.phva-grid::before {
  content: "";
  position: absolute;
  top: 32px;
  left: 45px;
  right: 45px;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  z-index: 0;
}

.phva-step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 0.5rem;
}

.phva-num {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.35rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.phva-step h4 {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.65rem;
  color: var(--on-primary);
}

.phva-step p {
  font-size: 0.85rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

/* =========================================
   17. PLANES CORPORATIVOS
   ========================================= */
.pricing {
  background: var(--surface-lowest);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.85rem;
  align-items: stretch;
}

.plan-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  border-top: 4px solid var(--outline-variant);
  transition: transform 0.3s ease;
  border-x: 1px solid rgba(0, 31, 63, 0.05);
  border-b: 1px solid rgba(0, 31, 63, 0.05);
}

.plan-card:hover {
  transform: translateY(-5px);
}

.plan-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-container);
  margin-bottom: 0.45rem;
}

.plan-desc {
  font-size: 0.88rem;
  color: var(--on-surface-variant);
  margin-bottom: 1.85rem;
  line-height: 1.55;
}

.plan-features {
  list-style: none;
  flex-grow: 1;
  margin-bottom: 2rem;
}

.plan-features li {
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(0, 31, 63, 0.07);
  font-size: 0.92rem;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  color: var(--on-surface);
}

.plan-features li .material-symbols-outlined {
  font-size: 19px;
  color: var(--on-tertiary-container);
  margin-top: 2px;
  flex-shrink: 0;
}

.plan-card .btn {
  width: 100%;
  padding: 0 1.2rem;
  font-size: 0.88rem;
}

/* Featured plan */
.plan-featured {
  background: var(--primary);
  color: var(--on-primary);
  border-top-color: var(--tertiary-fixed-dim);
  position: relative;
  box-shadow: 0 20px 45px rgba(0, 31, 63, 0.25);
  transform: translateY(-8px);
}

.plan-featured:hover {
  transform: translateY(-12px);
}

.plan-featured h3 {
  color: var(--on-primary);
}

.plan-featured .plan-desc {
  color: rgba(255, 255, 255, 0.8);
}

.plan-featured .plan-features li {
  border-bottom-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.92);
}

.plan-featured .plan-features li .material-symbols-outlined {
  color: var(--tertiary-fixed-dim);
}

.plan-badge {
  position: absolute;
  top: 0;
  right: 1.75rem;
  background: var(--tertiary-fixed-dim);
  color: var(--tertiary);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.4rem 0.85rem;
  border-radius: 0 0 10px 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* =========================================
   18. FAQ ACCORDION
   ========================================= */
.faq {
  background: var(--surface);
}

.faq-container {
  max-width: 840px;
  margin: 0 auto;
}

/* <details>/<summary> native accordion — no JS required */
.faq-item {
  border-bottom: 1px solid rgba(0, 31, 63, 0.1);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--primary-container);
  transition: color 0.2s ease;
  touch-action: manipulation;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::marker {
  content: "";
}

.faq-question:hover {
  color: var(--primary);
}

.faq-question .material-symbols-outlined {
  font-size: 24px;
  color: var(--outline);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item[open] .faq-question .material-symbols-outlined {
  transform: rotate(180deg);
}

.faq-answer-inner {
  padding-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--on-surface-variant);
}

/* =========================================
   19. FINAL CTA & FOOTER
   ========================================= */
.final-cta {
  background: var(--primary);
  color: var(--on-primary);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.final-cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, var(--primary) 0%, rgba(0, 13, 26, 0.98) 100%);
  pointer-events: none;
}

.final-cta-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}

.final-cta-logo {
  margin-bottom: 2.25rem;
  display: flex;
  justify-content: center;
}

.final-cta-logo img {
  width: 100%;
  max-width: 320px;
  height: auto;
  background: #ffffff;
  padding: 1.2rem 1.8rem;
  border-radius: 14px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
  display: block;
}

.final-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 800;
  color: var(--on-primary);
  line-height: 1.18;
  margin-bottom: 1.15rem;
}

.final-cta-content > p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

.final-cta-tagline {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--tertiary-fixed-dim);
  margin-bottom: 2.5rem;
  display: block;
}

.final-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  justify-content: center;
}

.footer {
  position: relative;
  z-index: 1;
  background: var(--primary-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.8rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
}

/* =========================================
   20. FLOATING CONTROLS (Harmonized Dock) & ANIMATIONS
   ========================================= */
.floating-widgets {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Botón Volver Arriba — Liquid Glass Ultra (Contraste perfecto en fondos claros y oscuros) */
.btn-float-back-to-top {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px) saturate(190%);
  -webkit-backdrop-filter: blur(16px) saturate(190%);
  color: #001f3f;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 
    0 8px 24px rgba(0, 31, 63, 0.22),
    0 2px 6px rgba(0, 0, 0, 0.08),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.95),
    inset 0 -1.5px 2px rgba(0, 31, 63, 0.15);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  /* Fallback for browsers without scroll-driven animation support: always visible. */
  opacity: 1;
  visibility: visible;
}

/* Only fade the button in past ~300–400px of scroll on browsers that support
   scroll-driven animations — no JS/scroll-listener needed. */
@supports (animation-timeline: scroll()) {
  @keyframes back-to-top-on-scroll {
    from {
      opacity: 0;
      visibility: hidden;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
    }
  }

  .btn-float-back-to-top {
    animation: back-to-top-on-scroll linear both;
    animation-timeline: scroll(root);
    animation-range: 300px 400px;
  }
}

.btn-float-back-to-top:hover {
  background: rgba(255, 255, 255, 0.92);
  color: #000d1a;
  transform: translateY(-3px) scale(1.04);
  box-shadow: 
    0 12px 30px rgba(0, 31, 63, 0.3),
    0 4px 10px rgba(0, 0, 0, 0.12),
    inset 0 2px 3px rgba(255, 255, 255, 1),
    inset 0 -1px 2px rgba(0, 31, 63, 0.2);
}

.btn-float-back-to-top .material-symbols-outlined {
  font-size: 24px;
  font-weight: 700;
  transition: transform 0.25s ease;
}

.btn-float-back-to-top:hover .material-symbols-outlined {
  transform: translateY(-2px);
}

/* Botón WhatsApp - Estilo Corporativo Limpio (Sin aros estridentes) */
.btn-float-whatsapp {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #25d366;
  /* Navy instead of white icon: WCAG AA needs 4.5:1 and white-on-#25d366
     only reaches ~2:1. Navy-on-#25d366 reaches ~8.3:1. */
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-float-whatsapp:hover {
  background-color: #1fb855;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5);
}

.btn-float-whatsapp svg {
  width: 26px;
  height: 26px;
}

.animate-on-scroll {
  /* Fallback for browsers without scroll-driven animation support: always visible. */
  opacity: 1;
}

/* Fade + rise each block in as it enters the viewport — no JS/IntersectionObserver
   needed. Browsers without support just keep the fallback above (always visible). */
@supports (animation-timeline: view()) {
  @keyframes reveal-on-view {
    from {
      opacity: 0;
      transform: translateY(24px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .animate-on-scroll {
    animation: reveal-on-view linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 60%;
  }
}

/* =========================================
   21. RESPONSIVE BREAKPOINTS
   ========================================= */
@media (max-width: 1080px) {
  .nav-links, .nav-cta-btn {
    display: none;
  }

  .nav-mobile-toggle {
    display: flex;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }

  .hero {
    padding: 100px 0 60px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-title-col {
    position: static;
  }

  .services-grid {
    grid-template-columns: 1fr 1fr;
  }

  .service-card-wide {
    grid-column: span 2;
  }

  .sectors-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .modalities-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .deep-dive {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .deep-dive.reversed .deep-dive-visual {
    order: 0;
  }

  .deep-dive-visual {
    height: 320px;
  }

  .phva-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .phva-grid::before {
    display: none;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }

  .plan-featured {
    transform: none;
  }

  .plan-featured:hover {
    transform: translateY(-4px);
  }
}

@media (max-width: 768px) {
  :root {
    --margin-desktop: 20px;
    --section-gap: 60px;
  }

  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero h1 {
    font-size: 2.15rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-trust {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .hero-trust-divider {
    display: none;
  }

  .proof-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .proof-item + .proof-item::before {
    display: none;
  }

  .value-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cta-strip-inner {
    flex-direction: column;
    text-align: center;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-card-wide {
    grid-column: span 1;
  }

  .service-card-wide-inner {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .sectors-grid {
    grid-template-columns: 1fr 1fr;
  }

  .modalities-grid {
    grid-template-columns: 1fr 1fr;
  }

  .phva-grid {
    grid-template-columns: 1fr 1fr;
  }

  .about-features {
    grid-template-columns: 1fr;
  }

  .hero-card-stats {
    grid-template-columns: 1fr 1fr;
  }

  .final-cta {
    padding: 70px 0;
  }

  .final-cta-actions {
    flex-direction: column;
  }

  .final-cta-actions .btn {
    width: 100%;
  }

  .footer-inner {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .sectors-grid {
    grid-template-columns: 1fr;
  }

  .modalities-grid {
    grid-template-columns: 1fr;
  }

  .phva-grid {
    grid-template-columns: 1fr;
  }
}
