/* ==========================================================================
   HEMISFERY STUDIO — SISTEMA DE DISEÑO MINIMALISTA & MICRO-INTERACCIONES 3D
   Tipografías locales (/fonts): Aptly (700, 900) & All Round Gothic (400, 700)
   Paleta estricta: #ffffff (lienzo), #212121 (tinta/oscuro), #3366cc (acento)
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Tipografías Locales (@font-face — Únicamente las 4 variantes esenciales)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Aptly';
  src: url('fonts/aptly/Aptly-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Aptly';
  src: url('fonts/aptly/Aptly-Black.otf') format('opentype');
  font-weight: 800 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'All Round Gothic';
  src: url('fonts/All%20Round%20Gothic/AllRoundGothic-Book.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'All Round Gothic';
  src: url('fonts/All%20Round%20Gothic/AllRoundGothic-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-canvas: #ffffff;
  --color-ink: #212121;
  --color-ink-muted: rgba(33, 33, 33, 0.72);
  --color-accent: #3366cc;
  --color-accent-tint-4: rgba(51, 102, 204, 0.04);
  --color-accent-tint-6: rgba(51, 102, 204, 0.06);
  --color-accent-border: rgba(51, 102, 204, 0.16);
  --color-accent-glow: rgba(51, 102, 204, 0.35);
  --font-display: 'Aptly', sans-serif;
  --font-body: 'All Round Gothic', sans-serif;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
  background-color: var(--color-canvas);
  color: var(--color-ink);
}

body {
  background-color: var(--color-canvas);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-weight: 400;
  margin: 0;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, .font-display-aptly {
  font-family: var(--font-display);
}

/* Regla tipográfica para descripciones: All Round Gothic 400, strong en 700 y máximo 60ch */
.desc-copy {
  font-family: var(--font-body);
  font-weight: 400;
  max-width: 60ch;
  color: var(--color-ink-muted);
  line-height: 1.65;
}

.desc-copy strong {
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--color-ink);
}

/* Espaciado vertical amplio entre secciones: 76px en móvil, 120px en escritorio */
.section-spacing {
  padding-top: 76px;
  padding-bottom: 76px;
}

@media (min-width: 1024px) {
  .section-spacing {
    padding-top: 120px;
    padding-bottom: 120px;
  }
}

/* Superficie secundaria con tinte suave #3366cc (4%-6%) */
.surface-tint-soft {
  background-color: var(--color-accent-tint-4);
  border-top: 1px solid rgba(51, 102, 204, 0.1);
  border-bottom: 1px solid rgba(51, 102, 204, 0.1);
}

/* --------------------------------------------------------------------------
   1. Barra de progreso superior (Scroll Progress Bar)
   -------------------------------------------------------------------------- */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--color-accent);
  z-index: 10000;
  transition: width 0.08s ease-out;
  box-shadow: 0 0 10px var(--color-accent-glow);
}

/* --------------------------------------------------------------------------
   2. Navegación Inteligente (Smart Header Hide/Show)
   -------------------------------------------------------------------------- */
header {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, box-shadow 0.2s ease;
  will-change: transform;
}

header.nav-hidden {
  transform: translateY(-100%);
}

/* Logotipo Oficial de Hemisfery Studio (Isotipo en Header y Footer — Cambio automático Claro/Oscuro) */
.brand-logo-header {
  height: 34px;
  width: auto;
  object-fit: contain;
}

.brand-logo-footer {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.logo-light {
  display: block;
}

.logo-dark {
  display: none;
}

[data-theme="dark"] .logo-light {
  display: none;
}

[data-theme="dark"] .logo-dark {
  display: block;
}

/* Botón circular minimalista de cambio de tema (#theme-toggle, 40px x 40px) */
.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(51, 102, 204, 0.06);
  border: 1px solid rgba(51, 102, 204, 0.2);
  color: #212121;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.theme-toggle-btn:hover {
  background-color: rgba(51, 102, 204, 0.14);
  border-color: #3366cc;
  color: #3366cc;
  transform: translateY(-1px);
}

.theme-toggle-btn:active {
  transform: scale(0.94);
}

/* Menú desplegable móvil (#mobile-menu-drawer) */
.mobile-menu-drawer {
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(51, 102, 204, 0.14);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.mobile-theme-btn {
  background-color: rgba(51, 102, 204, 0.08);
  border: 1px solid rgba(51, 102, 204, 0.22);
  color: #212121;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Indicador dinámico de navegación y estados de enlaces (.nav-link) */
.nav-link {
  position: relative;
  color: #424242;
  font-weight: 600;
  padding-bottom: 2px;
  transition: color 0.25s ease;
}

.nav-link:hover {
  color: #212121;
}

.nav-link.is-active {
  color: #3366cc;
  font-weight: 700;
}

#nav-active-line {
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2.5px;
  background-color: #3366cc;
  border-radius: 9999px;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              width 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.25s ease;
  will-change: transform, width, opacity;
}

/* --------------------------------------------------------------------------
   3. Efecto de aparición con desenfoque (Blur Reveal por sección)
   -------------------------------------------------------------------------- */
.section-blur-reveal {
  opacity: 0;
  filter: blur(14px);
  transform: translateY(35px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, filter, transform;
}

.section-blur-reveal.is-visible {
  opacity: 1;
  filter: none;
  transform: none;
  will-change: auto;
}

/* --------------------------------------------------------------------------
   4. Primera Sección (Hero Centrado, Palabra Eco al 4% y Visual GIF 28px)
   -------------------------------------------------------------------------- */
#hero-section {
  position: relative;
  width: 100%;
  background-color: #ffffff;
  overflow: hidden;
}

.hero-headline-wrap {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Palabra eco gigante muy tenue (#3366cc al 4%) detrás del titular */
.hero-echo-word {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -54%);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(4.75rem, 15vw, 13.5rem);
  line-height: 0.85;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: rgba(51, 102, 204, 0.04);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.hero-main-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.65rem, 5.6vw, 4.85rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: #212121;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* Jerarquía de botones píldora en Hero */
.btn-pill-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background-color: #3366cc;
  color: #ffffff;
  font-family: var(--font-body);
  font-weight: 700;
  border: 1px solid #3366cc;
  box-shadow: 0 10px 24px -6px rgba(51, 102, 204, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn-pill-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -6px rgba(51, 102, 204, 0.45);
}

.btn-pill-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background-color: transparent;
  color: #212121;
  font-family: var(--font-body);
  font-weight: 700;
  border: 1px solid #212121;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.btn-pill-outline:hover {
  transform: translateY(-2px);
  border-color: #3366cc;
  color: #3366cc;
  background-color: var(--color-accent-tint-4);
}

/* Carrusel Interactivo Estilo Abanico Abierto en el Hero (6 Cartas Visibles en Arco) */
.hero-fan-carousel {
  position: relative;
  width: 100%;
  max-width: 1160px;
  margin-left: auto;
  margin-right: auto;
  padding: 0.75rem 0 0.5rem;
  overflow: visible;
  user-select: none;
}

.hero-fan-stage {
  position: relative;
  width: 100%;
  max-width: 580px;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  perspective: 1400px;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-fan-card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 28px;
  background-color: #ffffff;
  border: 1px solid rgba(51, 102, 204, 0.18);
  box-shadow: 0 20px 48px -14px rgba(51, 102, 204, 0.16),
              0 8px 20px -6px rgba(33, 33, 33, 0.06);
  overflow: hidden;
  cursor: pointer;
  transform-origin: center bottom;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.9s ease,
              box-shadow 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.4s ease;
  will-change: transform, opacity;
}

/* 6 posiciones visibles escalonadas en abanico abierto */
.hero-fan-card.fan-pos-0 {
  transform: translateX(0%) translateY(0px) scale(1) rotate(0deg);
  z-index: 60;
  opacity: 1;
  border-color: rgba(51, 102, 204, 0.32);
  box-shadow: 0 28px 64px -14px rgba(51, 102, 204, 0.24),
              0 10px 26px -6px rgba(33, 33, 33, 0.08);
}

.hero-fan-card.fan-pos-left-1 {
  transform: translateX(-22%) translateY(10px) scale(0.90) rotate(-5deg);
  z-index: 50;
  opacity: 0.92;
}

.hero-fan-card.fan-pos-right-1 {
  transform: translateX(22%) translateY(10px) scale(0.90) rotate(5deg);
  z-index: 50;
  opacity: 0.92;
}

.hero-fan-card.fan-pos-left-2 {
  transform: translateX(-42%) translateY(24px) scale(0.80) rotate(-10deg);
  z-index: 40;
  opacity: 0.82;
}

.hero-fan-card.fan-pos-right-2 {
  transform: translateX(42%) translateY(24px) scale(0.80) rotate(10deg);
  z-index: 40;
  opacity: 0.82;
}

.hero-fan-card.fan-pos-right-3 {
  transform: translateX(58%) translateY(40px) scale(0.70) rotate(14deg);
  z-index: 30;
  opacity: 0.68;
}

.hero-fan-card.fan-pos-left-1:hover,
.hero-fan-card.fan-pos-right-1:hover,
.hero-fan-card.fan-pos-left-2:hover,
.hero-fan-card.fan-pos-right-2:hover,
.hero-fan-card.fan-pos-right-3:hover {
  opacity: 1;
  border-color: rgba(51, 102, 204, 0.45);
}

.hero-fan-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 28px;
  opacity: 1;
  filter: none;
  pointer-events: none;
}

/* Puntos indicadores inferiores tipo píldora (#3366cc) */
.hero-fan-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  margin-top: 3.25rem;
}

.hero-fan-dot {
  height: 10px;
  width: 10px;
  border-radius: 9999px;
  background-color: rgba(51, 102, 204, 0.22);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              background-color 0.35s ease,
              box-shadow 0.35s ease;
}

.hero-fan-dot:hover {
  background-color: rgba(51, 102, 204, 0.5);
}

.hero-fan-dot.is-active {
  width: 34px;
  background-color: #3366cc;
  box-shadow: 0 0 12px rgba(51, 102, 204, 0.4);
}

@media (max-width: 900px) {
  .hero-fan-stage {
    max-width: 72%;
  }
  .hero-fan-card.fan-pos-left-1 {
    transform: translateX(-13%) translateY(8px) scale(0.90) rotate(-4deg);
  }
  .hero-fan-card.fan-pos-right-1 {
    transform: translateX(13%) translateY(8px) scale(0.90) rotate(4deg);
  }
  .hero-fan-card.fan-pos-left-2 {
    transform: translateX(-25%) translateY(18px) scale(0.80) rotate(-8deg);
  }
  .hero-fan-card.fan-pos-right-2 {
    transform: translateX(25%) translateY(18px) scale(0.80) rotate(8deg);
  }
  .hero-fan-card.fan-pos-right-3 {
    transform: translateX(35%) translateY(28px) scale(0.70) rotate(11deg);
  }
}

#hero-3d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   5. Tarjetas con Profundidad 3D & Iconos 3D (Fondo #ffffff, Bordes 24px)
   -------------------------------------------------------------------------- */
.clay-surface {
  position: relative;
  z-index: 10;
  background-color: #ffffff;
  border-radius: 24px;
  border: 1px solid rgba(51, 102, 204, 0.14);
  box-shadow: 0 12px 32px -12px rgba(33, 33, 33, 0.05),
              0 4px 16px -4px rgba(51, 102, 204, 0.04);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.tilt-card {
  position: relative;
  z-index: 10;
  overflow: hidden;
  border-radius: 24px;
  transform-style: preserve-3d;
  perspective: 1000px;
  will-change: transform;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.25s ease;
}

.tilt-card:hover {
  border-color: rgba(51, 102, 204, 0.38);
  box-shadow: 0 22px 44px -15px rgba(51, 102, 204, 0.16);
}

.tilt-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.9) 0%, transparent 65%);
  transition: opacity 0.2s ease;
  z-index: 20;
}

@media (hover: none), (pointer: coarse) {
  .tilt-card {
    transform: none !important;
  }
  .tilt-glare {
    display: none;
  }
}

/* Contenedor de Icono 3D en tarjeta: Fondo #ffffff limpio, bordes redondeados 20px y object-contain */
.service-mockup-stage {
  position: relative;
  border-radius: 20px;
  background-color: #ffffff;
  border: 1px solid rgba(51, 102, 204, 0.14);
  box-shadow: inset 0 0 24px rgba(51, 102, 204, 0.03);
  overflow: hidden;
}

.mockup-3d-icon-orb {
  background: #ffffff;
  border: 1px solid rgba(51, 102, 204, 0.22);
  box-shadow: 0 4px 12px rgba(51, 102, 204, 0.1);
}

.mockup-3d-figure {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 20px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tilt-card:hover .mockup-3d-figure {
  transform: scale(1.06) translateY(-4px);
}

/* Miniatura 3D en el encabezado del modal (#service-modal) */
.modal-header-3d-thumb {
  background-color: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(51, 102, 204, 0.18);
}

/* 5.1 Estela Ancha y Gran Cohete 3D en Sección Servicios (Ghost + Spotlight Reveal) */
.services-trail-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
  --trail-x: -999px;
  --trail-y: -999px;
}

.services-trail-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.services-trail-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.services-rocket-3d {
  position: absolute;
  top: 48px;
  right: clamp(24px, 5vw, 88px);
  height: 248px;
  width: auto;
  display: block;
  transform: rotate(12deg);
  transform-origin: center center;
  pointer-events: none;
}

.trail-fade-stop {
  stop-color: #3366cc;
}

.thruster-stop-hi {
  stop-color: #464952;
}

.thruster-stop-mid {
  stop-color: #212121;
}

.thruster-stop-lo {
  stop-color: #121316;
}

.services-trail-halo {
  opacity: 0.36;
}

.services-trail-core {
  opacity: 1;
}

/* Tono base tenue en Modo Claro: opacity 0.07 */
.services-trail-base {
  opacity: 0.07;
  transition: opacity 0.35s ease;
}

/* Capa Spotlight Reveal en Modo Claro (radio amplio 280px, opacity 0.42 en el foco) */
.services-trail-reveal {
  opacity: 0;
  transition: opacity 0.35s ease;
  -webkit-mask-image: radial-gradient(
    280px circle at var(--trail-x, -999px) var(--trail-y, -999px),
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.55) 52%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: radial-gradient(
    280px circle at var(--trail-x, -999px) var(--trail-y, -999px),
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.55) 52%,
    rgba(0, 0, 0, 0) 100%
  );
}

.services-trail-bg.is-active .services-trail-reveal {
  opacity: 0.42;
}

@media (hover: none), (pointer: coarse) {
  .services-trail-reveal {
    display: none;
  }
}

@media (max-width: 1023px) {
  .services-rocket-3d {
    top: 30px;
    right: 20px;
    height: 196px;
  }
}

@media (max-width: 767px) {
  .services-trail-svg {
    width: 100%;
    height: 100%;
  }
  .services-rocket-3d {
    top: 18px;
    right: 12px;
    height: 130px;
  }
  .services-trail-base {
    opacity: 0.055;
  }
}

/* --------------------------------------------------------------------------
   6. Etiquetas Píldora Unificadas & Sección "Our Process" (Destello Azul)
   -------------------------------------------------------------------------- */
.section-pill-badge,
.process-glow-badge {
  border-radius: 9999px;
  border: none;
  background-color: rgba(51, 102, 204, 0.08);
  color: #3366cc;
  box-shadow: 0 6px 22px rgba(51, 102, 204, 0.24), 0 0 12px rgba(51, 102, 204, 0.12);
  backdrop-filter: blur(8px);
}

.section-pill-badge > span {
  color: inherit;
}

.process-minimal-timeline {
  width: 100%;
  padding: 4rem 1rem 2rem;
}

.process-line-wrapper {
  position: relative;
  width: 100%;
}

.process-rail-line {
  position: absolute;
  top: 14px;
  left: 5%;
  width: 90%;
  height: 2px;
  background: rgba(51, 102, 204, 0.18);
  border-radius: 2px;
  overflow: hidden;
  z-index: 1;
}

@keyframes railPulse {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

.process-rail-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--color-accent), #ffffff, var(--color-accent), transparent);
  box-shadow: 0 0 18px var(--color-accent);
  animation: railPulse 3.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.process-milestones-grid {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 2;
}

.process-milestone {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 140px;
}

.process-node-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid rgba(51, 102, 204, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(33, 33, 33, 0.05);
}

.process-node-core {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(33, 33, 33, 0.35);
  transition: all 0.3s ease;
}

.process-milestone:hover .process-node-dot,
.process-milestone.active .process-node-dot {
  border-color: var(--color-accent);
  box-shadow: 0 0 16px var(--color-accent-glow);
  transform: scale(1.15);
}

.process-milestone:hover .process-node-core,
.process-milestone.active .process-node-core {
  background: var(--color-accent);
}

.process-milestone-index {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.process-milestone-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #212121;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .process-rail-line { display: none; }
  .process-milestones-grid {
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
    padding-left: 1.5rem;
    border-left: 2px solid rgba(51, 102, 204, 0.25);
  }
  .process-milestone {
    flex-direction: row;
    gap: 1rem;
    text-align: left;
    max-width: 100%;
  }
  .process-node-dot { margin-bottom: 0; }
}

/* --------------------------------------------------------------------------
   7. Sección FAQ Minimalista (Acordeón Interactivo con Tilt 3D Sutil)
   -------------------------------------------------------------------------- */
.faq-item {
  position: relative;
  z-index: 10;
  overflow: hidden;
  background-color: #ffffff;
  border: 1px solid rgba(51, 102, 204, 0.14);
  border-radius: 24px;
  transition: transform 0.15s ease-out, border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.faq-item:hover {
  border-color: rgba(51, 102, 204, 0.35);
}

.faq-item.is-open {
  background-color: #f3f7ff;
  border-color: rgba(51, 102, 204, 0.38);
  box-shadow: 0 12px 28px -12px rgba(51, 102, 204, 0.14);
}

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

.faq-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  background-color: var(--color-accent-tint-6);
  color: #3366cc;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease, color 0.25s ease;
}

.faq-item.is-open .faq-icon-wrap {
  transform: rotate(180deg);
  background-color: #3366cc;
  color: #ffffff;
}

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

.faq-item.is-open .faq-panel {
  max-height: 320px;
  opacity: 1;
}

.faq-panel-inner {
  padding: 0 1.75rem 1.5rem;
}

/* --------------------------------------------------------------------------
   8. Cierre Oscuro Invertido (#212121) & Formulario Micro-Brief
   -------------------------------------------------------------------------- */
.micro-brief-dark-block {
  position: relative;
  z-index: 10;
  background-color: #212121;
  color: #ffffff;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 64px -16px rgba(33, 33, 33, 0.35);
}

.micro-brief-dark-card {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
}

.desc-copy-dark {
  font-family: var(--font-body);
  font-weight: 400;
  max-width: 60ch;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.65;
}

.desc-copy-dark strong {
  font-family: var(--font-body);
  font-weight: 700;
  color: #ffffff;
}

#micro-brief-form .brief-input-field {
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px !important;
  padding: 14px 16px;
  color: #ffffff;
  font-family: var(--font-body);
  line-height: 1.45;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

#micro-brief-form .brief-input-field.brief-input-with-icon {
  padding-right: 44px;
}

#micro-brief-form .brief-select-field {
  background-image: none;
}

.brief-input-field::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.brief-input-field option {
  background-color: #212121;
  color: #ffffff;
}

#micro-brief-form .brief-input-field:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #3366cc;
  box-shadow: 0 0 0 3px rgba(51, 102, 204, 0.28);
}

#micro-brief-form .brief-input-field.input-error {
  border-color: #ff6b6b;
  background-color: rgba(255, 107, 107, 0.08);
}

#micro-brief-form .brief-input-field.input-success {
  border-color: #3366cc;
}

/* Mini-píldora visual "OPCIONAL" para el campo 5 */
.brief-optional-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 9999px;
  background-color: rgba(51, 102, 204, 0.18);
  color: #6fa0ff;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   9. Ventana Modal de Servicios
   -------------------------------------------------------------------------- */
.service-modal-backdrop {
  background: rgba(33, 33, 33, 0.68);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.service-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.service-modal-window {
  background: #ffffff;
  border-radius: 28px;
  box-shadow: 0 25px 50px -12px rgba(33, 33, 33, 0.28);
  transform: scale(0.95) translateY(12px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-modal-backdrop.is-open .service-modal-window {
  transform: scale(1) translateY(0);
}

/* 9.1 Bloques Minimalistas Internos del Modal (Sin bordes innecesarios) */
.modal-main-goal-box {
  background-color: rgba(51, 102, 204, 0.05);
  border-radius: 24px;
  padding: 28px;
  border: none;
}

.modal-process-rail {
  position: absolute;
  top: 15px;
  left: 24px;
  right: 24px;
  height: 1px;
  background-color: rgba(51, 102, 204, 0.2);
  pointer-events: none;
  z-index: 1;
}

.modal-step-pill-wrap {
  display: inline-flex;
  background-color: #ffffff;
  padding-right: 10px;
}

.modal-step-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 14px;
  border-radius: 9999px;
  background-color: rgba(51, 102, 204, 0.1);
  color: #3366cc;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}

.modal-matrix-col {
  border-radius: 24px;
  padding: 28px;
  border: none;
}

.modal-matrix-problem-col {
  background-color: #f7f9fc;
  color: #212121;
}

.modal-matrix-solution-col {
  background-color: rgba(51, 102, 204, 0.06);
  color: #212121;
}

.modal-matrix-importance-col {
  background-color: #212121;
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   10. Efecto de Destello Ambiental Seguidor del Cursor (#3366cc)
   -------------------------------------------------------------------------- */
#cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    circle,
    rgba(51, 102, 204, 0.16) 0%,
    rgba(51, 102, 204, 0.05) 45%,
    transparent 72%
  );
  filter: blur(20px);
  opacity: 0;
  transition: opacity 0.4s ease;
  will-change: transform, opacity;
}

@media (hover: none), (pointer: coarse) {
  #cursor-glow {
    display: none;
  }
}

/* ==========================================================================
   11. MODO OSCURO ([data-theme="dark"]) — Paleta Oficial Hemisfery Studio
   Fondo: #16171a | Tarjetas: #212121 | Acentos claros: #6fa0ff | CTA: #3366cc
   ========================================================================== */

/* Transiciones suaves de tema (0.3s ease) */
body,
main,
section,
header,
footer,
.clay-surface,
.faq-item,
.service-modal-window,
.modal-matrix-col,
.modal-main-goal-box,
.micro-brief-dark-block,
.brief-input-field,
.btn-pill-outline,
.process-glow-badge,
.process-node-dot,
.desc-copy,
h1, h2, h3, h4, h5 {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Mantener la transición fluida del header inteligente y tarjetas tilt */
header {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.tilt-card {
  transition: transform 0.15s ease-out, box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

/* Variables raíz en Modo Oscuro */
[data-theme="dark"] {
  --color-canvas: #16171a;
  --color-ink: #ffffff;
  --color-ink-muted: #c5cad3;
  --color-accent-tint-4: rgba(111, 160, 255, 0.05);
  --color-accent-tint-6: rgba(111, 160, 255, 0.1);
  --color-accent-border: rgba(255, 255, 255, 0.08);
  color-scheme: dark;
}

/* Fondo principal de página (#16171a) */
[data-theme="dark"],
[data-theme="dark"] body,
[data-theme="dark"] main,
[data-theme="dark"] #hero-section,
[data-theme="dark"] footer {
  background-color: #16171a !important;
  color: #ffffff;
}

[data-theme="dark"] .surface-tint-soft {
  background-color: rgba(255, 255, 255, 0.02);
  border-top-color: rgba(255, 255, 255, 0.08);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* TopNavBar en Modo Oscuro: rgba(22, 23, 26, 0.82) + blur(14px) */
[data-theme="dark"] header.site-header {
  background-color: rgba(22, 23, 26, 0.82) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .site-brand-name {
  color: #ffffff !important;
}

[data-theme="dark"] .nav-link {
  color: #c5cad3;
}

[data-theme="dark"] .nav-link:hover {
  color: #ffffff;
}

[data-theme="dark"] .nav-link.is-active {
  color: #6fa0ff;
}

[data-theme="dark"] #nav-active-line {
  background-color: #6fa0ff;
}

[data-theme="dark"] .theme-toggle-btn {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

[data-theme="dark"] .theme-toggle-btn:hover {
  background-color: rgba(111, 160, 255, 0.16);
  border-color: #6fa0ff;
  color: #6fa0ff;
}

[data-theme="dark"] #mobile-menu-toggle {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

[data-theme="dark"] .mobile-menu-drawer {
  background-color: rgba(22, 23, 26, 0.96);
  border-top-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .mobile-nav-link {
  color: #ffffff !important;
}

[data-theme="dark"] .mobile-theme-btn {
  background-color: rgba(111, 160, 255, 0.12);
  border-color: rgba(111, 160, 255, 0.28);
  color: #ffffff;
}

/* Titulares (#ffffff) y Descripciones (#c5cad3 con <strong> en #ffffff) */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] .hero-main-title,
[data-theme="dark"] .process-milestone-title {
  color: #ffffff !important;
}

[data-theme="dark"] .desc-copy {
  color: #c5cad3 !important;
}

[data-theme="dark"] .desc-copy strong {
  color: #ffffff !important;
}

/* Acentos de texto y badges en #6fa0ff (manteniendo CTAs principales en #3366cc con texto #ffffff) */
[data-theme="dark"] h1 .text-\[\#3366cc\],
[data-theme="dark"] h2 .text-\[\#3366cc\],
[data-theme="dark"] #servicios .text-\[\#3366cc\],
[data-theme="dark"] #nosotros .text-\[\#3366cc\],
[data-theme="dark"] #metodologia .text-\[\#3366cc\],
[data-theme="dark"] #faq .text-\[\#3366cc\],
[data-theme="dark"] #hero-section .text-\[\#3366cc\],
[data-theme="dark"] #service-modal .text-\[\#3366cc\],
[data-theme="dark"] #privacy-modal .text-\[\#3366cc\],
[data-theme="dark"] .process-milestone-index {
  color: #6fa0ff !important;
}

/* Excepción: mantener el color original en badges dentro de las cajas blancas de iconos 3D */
[data-theme="dark"] .service-mockup-stage .text-\[\#3366cc\] {
  color: #3366cc !important;
}

/* Gran Cohete 3D y Estela Ancha en Servicios en Modo Oscuro (Contrast Reveal permanente: opacity 0.24) */
[data-theme="dark"] .services-trail-reveal {
  display: none;
}

[data-theme="dark"] .services-trail-base {
  opacity: 0.24;
}

[data-theme="dark"] .trail-fade-stop {
  stop-color: #6fa0ff;
}

[data-theme="dark"] .services-trail-halo {
  opacity: 0.36;
}

[data-theme="dark"] .services-trail-core {
  opacity: 1;
}

[data-theme="dark"] .thruster-stop-hi {
  stop-color: #6f7991;
}

[data-theme="dark"] .thruster-stop-mid {
  stop-color: #3f4659;
}

[data-theme="dark"] .thruster-stop-lo {
  stop-color: #262b38;
}

/* Hero en Modo Oscuro */
[data-theme="dark"] .hero-echo-word {
  color: rgba(111, 160, 255, 0.06);
}

[data-theme="dark"] .btn-pill-outline {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
}

[data-theme="dark"] .btn-pill-outline:hover {
  border-color: #6fa0ff;
  color: #6fa0ff;
  background-color: rgba(111, 160, 255, 0.08);
}

[data-theme="dark"] .hero-fan-card {
  background-color: #212121;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 56px -14px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .hero-fan-card.fan-pos-0 {
  border-color: rgba(111, 160, 255, 0.5);
  box-shadow: 0 28px 64px -14px rgba(51, 102, 204, 0.38),
              0 12px 28px -8px rgba(0, 0, 0, 0.55);
}

[data-theme="dark"] .hero-fan-card.fan-pos-left-1:hover,
[data-theme="dark"] .hero-fan-card.fan-pos-right-1:hover,
[data-theme="dark"] .hero-fan-card.fan-pos-left-2:hover,
[data-theme="dark"] .hero-fan-card.fan-pos-right-2:hover,
[data-theme="dark"] .hero-fan-card.fan-pos-right-3:hover {
  border-color: rgba(111, 160, 255, 0.45);
}

[data-theme="dark"] .hero-fan-dot {
  background-color: rgba(111, 160, 255, 0.25);
}

[data-theme="dark"] .hero-fan-dot:hover {
  background-color: rgba(111, 160, 255, 0.55);
}

[data-theme="dark"] .hero-fan-dot.is-active {
  background-color: #6fa0ff;
  box-shadow: 0 0 14px rgba(111, 160, 255, 0.48);
}

[data-theme="dark"] #hero-section .rounded-full.bg-\[\#3366cc\]\/\[0\.04\] {
  background-color: #212121;
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] #hero-section .text-\[\#212121\] {
  color: #ffffff !important;
}

[data-theme="dark"] #hero-section .text-\[\#212121\]\/70 {
  color: #c5cad3 !important;
}

/* Superficies de Tarjetas (Servicios, Nosotros, FAQ): #212121 + borde rgba(255,255,255,0.08) */
[data-theme="dark"] .clay-surface,
[data-theme="dark"] .faq-item {
  background-color: #212121 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 14px 36px -12px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .tilt-card:hover,
[data-theme="dark"] .faq-item:hover,
[data-theme="dark"] .faq-item.is-open {
  border-color: rgba(111, 160, 255, 0.35) !important;
  box-shadow: 0 20px 44px -14px rgba(51, 102, 204, 0.25);
}

[data-theme="dark"] .faq-item.is-open {
  background-color: #272a32 !important;
}

[data-theme="dark"] .clay-surface .text-\[\#212121\]\/70 {
  color: #c5cad3 !important;
}

[data-theme="dark"] .clay-surface .border-t {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

/* Contenedor de los 6 iconos 3D de Servicios y Miniatura del Modal: SIEMPRE #ffffff limpio */
[data-theme="dark"] .service-mockup-stage,
[data-theme="dark"] .modal-header-3d-thumb {
  background-color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}

/* Etiquetas Píldora Unificadas y Our Process en Modo Oscuro */
[data-theme="dark"] .section-pill-badge,
[data-theme="dark"] .process-glow-badge {
  background-color: rgba(51, 102, 204, 0.16);
  color: #6fa0ff;
  border: none;
  box-shadow: 0 6px 24px rgba(51, 102, 204, 0.35);
}

[data-theme="dark"] .section-pill-badge .bg-\[\#3366cc\] {
  background-color: #6fa0ff;
}

[data-theme="dark"] .process-rail-line {
  background: rgba(255, 255, 255, 0.14);
}

[data-theme="dark"] .process-node-dot {
  background-color: #212121;
  border-color: rgba(111, 160, 255, 0.45);
}

[data-theme="dark"] .process-node-core {
  background-color: #6fa0ff;
}

/* FAQ en Modo Oscuro */
[data-theme="dark"] .faq-icon-wrap {
  background-color: rgba(111, 160, 255, 0.14);
  color: #6fa0ff;
}

[data-theme="dark"] .faq-item.is-open .faq-icon-wrap {
  background-color: #3366cc;
  color: #ffffff;
}

/* Bloque final Micro-Brief en Modo Oscuro: #212121 con borde rgba(111, 160, 255, 0.25) e inputs #16171a */
[data-theme="dark"] .micro-brief-dark-block {
  background-color: #212121;
  border-color: rgba(111, 160, 255, 0.25);
  box-shadow: 0 28px 64px -16px rgba(0, 0, 0, 0.55);
}

[data-theme="dark"] .micro-brief-dark-block .text-\[\#3366cc\] {
  color: #6fa0ff !important;
}

[data-theme="dark"] #micro-brief-form .brief-input-field {
  background-color: #16171a;
  border-color: rgba(255, 255, 255, 0.14);
  border-radius: 14px !important;
  color: #ffffff;
}

[data-theme="dark"] #micro-brief-form .brief-input-field:focus {
  background-color: #16171a;
  border-color: #6fa0ff;
  box-shadow: 0 0 0 3px rgba(111, 160, 255, 0.22);
}

[data-theme="dark"] #micro-brief-form .brief-input-field.input-success {
  border-color: #6fa0ff;
}

[data-theme="dark"] .brief-input-field option {
  background-color: #16171a;
  color: #ffffff;
}

/* Ventana Modal (#service-modal) en Modo Oscuro */
[data-theme="dark"] .service-modal-backdrop {
  background: rgba(10, 11, 14, 0.78);
}

[data-theme="dark"] .service-modal-window,
[data-theme="dark"] .service-modal-window > div,
[data-theme="dark"] #modal-scroll-container {
  background-color: #212121 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff;
}

[data-theme="dark"] #modal-close-btn,
[data-theme="dark"] #privacy-modal-close-btn {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

[data-theme="dark"] #modal-close-btn:hover,
[data-theme="dark"] #privacy-modal-close-btn:hover {
  background-color: #3366cc;
}

[data-theme="dark"] #modal-service-counter,
[data-theme="dark"] #service-modal .text-\[\#212121\]\/70,
[data-theme="dark"] #service-modal .text-\[\#212121\]\/75,
[data-theme="dark"] #service-modal .text-\[\#212121\]\/80,
[data-theme="dark"] #service-modal .text-\[\#212121\]\/85,
[data-theme="dark"] #service-modal .text-\[\#212121\]\/65 {
  color: #c5cad3 !important;
}

[data-theme="dark"] #modal-main-goal,
[data-theme="dark"] #service-modal .text-\[\#212121\],
[data-theme="dark"] #privacy-modal .text-\[\#212121\] {
  color: #ffffff !important;
}

[data-theme="dark"] .modal-main-goal-box {
  background-color: rgba(51, 102, 204, 0.14);
}

[data-theme="dark"] .modal-step-pill-wrap {
  background-color: #212121;
}

[data-theme="dark"] .modal-step-pill {
  background-color: rgba(111, 160, 255, 0.16);
  color: #6fa0ff;
}

[data-theme="dark"] .modal-process-rail {
  background-color: rgba(111, 160, 255, 0.22);
}

/* Superficies internas del modal: Problema (#282a30), Solución (rgba(51,102,204,0.14)), Importancia (#141518 + #6fa0ff) */
[data-theme="dark"] .modal-matrix-problem-col {
  background-color: #282a30 !important;
  color: #ffffff;
}

[data-theme="dark"] .modal-matrix-problem-col .bg-\[\#212121\]\/\[0\.06\] {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

[data-theme="dark"] .modal-matrix-solution-col {
  background-color: rgba(51, 102, 204, 0.14) !important;
  color: #ffffff;
}

[data-theme="dark"] .modal-matrix-importance-col {
  background-color: #141518 !important;
  border: 1px solid rgba(111, 160, 255, 0.18);
  color: #ffffff;
}

[data-theme="dark"] #modal-prev-btn,
[data-theme="dark"] #modal-next-btn {
  background-color: #282a30 !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
}

[data-theme="dark"] #modal-prev-btn:hover,
[data-theme="dark"] #modal-next-btn:hover {
  border-color: #6fa0ff !important;
  color: #6fa0ff !important;
}

/* Footer en Modo Claro y Modo Oscuro */
.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(33, 33, 33, 0.7);
  transition: color 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-social-link:hover,
.footer-social-link:focus-visible {
  color: #3366cc;
  transform: translateY(-2px);
}

[data-theme="dark"] footer {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] footer a,
[data-theme="dark"] footer p {
  color: #c5cad3 !important;
}

[data-theme="dark"] footer a:hover,
[data-theme="dark"] .footer-social-link:hover,
[data-theme="dark"] .footer-social-link:focus-visible {
  color: #6fa0ff !important;
}

[data-theme="dark"] .footer-social-link:hover,
[data-theme="dark"] .footer-social-link:focus-visible {
  transform: translateY(-2px);
}

[data-theme="dark"] footer .border-t {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

/* ==========================================================================
   12. Accesibilidad: Movimiento Reducido (WCAG AA — prefers-reduced-motion)
   Suaviza y pausa animaciones continuas sin alterar posiciones ni estética
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  .section-blur-reveal {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    transition: none !important;
  }

  .animate-ping,
  .process-rail-glow {
    animation: none !important;
  }

  #cursor-glow,
  .services-trail-reveal,
  .tilt-glare {
    display: none !important;
  }

  .tilt-card,
  .tilt-card:hover .mockup-3d-figure,
  .hero-fan-card,
  .faq-panel,
  .faq-icon-wrap,
  .service-modal-backdrop,
  .service-modal-window,
  .footer-social-link,
  header {
    transition-duration: 0.01ms !important;
  }
}
