/* ==========================================================================
   SURVEXIA 2026 — Estilos principales
   Paleta: Midnight #081A2F | Corporativo #0D4E91 | Gris #EEF2F7 | Blanco #FFFFFF
   Tipografía: Manrope
   ========================================================================== */

/* --- Variables CSS --- */
:root {
  --color-midnight: #081A2F;
  --color-midnight-light: #0B1F3A;
  --color-corporate: #0D4E91;
  --color-corporate-hover: #1E5AA8;
  --color-accent: #3B9FD9;
  --color-gray: #EEF2F7;
  --color-gray-muted: #8B9CB3;
  --color-white: #FFFFFF;
  --color-glass: rgba(255, 255, 255, 0.06);
  --color-glass-border: rgba(255, 255, 255, 0.12);
  --color-glass-light: rgba(255, 255, 255, 0.85);
  --color-glass-light-border: rgba(8, 26, 47, 0.08);

  --font-primary: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(8, 26, 47, 0.08);
  --shadow-md: 0 8px 32px rgba(8, 26, 47, 0.12);
  --shadow-lg: 0 16px 64px rgba(8, 26, 47, 0.18);
  --shadow-glow: 0 0 40px rgba(13, 78, 145, 0.25);

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);

  --header-height: 72px;
  --max-width: 1280px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-white);
  background-color: var(--color-midnight);
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* --- Accesibilidad --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  z-index: 10000;
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-corporate);
  color: var(--color-white);
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.skip-link:focus {
  top: var(--space-sm);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* --- Utilidades --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--color-gray-muted);
  max-width: 640px;
  margin-top: var(--space-sm);
}

/* --- Botones --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-corporate);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--color-corporate-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}

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

.btn-light {
  background: var(--color-white);
  color: var(--color-midnight);
}

.btn-light:hover {
  background: var(--color-gray);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-arrow::after {
  content: '→';
  transition: transform var(--transition-fast);
}

.btn-arrow:hover::after {
  transform: translateX(4px);
}

/* --- Header / Navegación --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  transition: background var(--transition-base), backdrop-filter var(--transition-base), box-shadow var(--transition-base);
}

.header.scrolled {
  background: rgba(8, 26, 47, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-glass-border);
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.header__logo img {
  height: 44px;
  width: auto;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.header__nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  position: relative;
}

.header__nav a:hover,
.header__nav a.active {
  color: var(--color-white);
}

.header__nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition-fast);
}

.header__nav a:hover::after {
  width: 100%;
}

.header__menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.header__menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  transition: all var(--transition-fast);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__background {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 26, 47, 0.7) 0%, rgba(8, 26, 47, 0.85) 50%, rgba(8, 26, 47, 0.95) 100%),
    radial-gradient(ellipse at 50% 0%, rgba(13, 78, 145, 0.3) 0%, transparent 60%);
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}

.hero__lines {
  position: absolute;
  inset: 0;
  opacity: 0.4;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: calc(var(--header-height) + var(--space-xl)) var(--space-md) var(--space-xl);
  max-width: 900px;
}

.hero__logo {
  width: 120px;
  height: 120px;
  margin: 0 auto var(--space-lg);
  opacity: 0;
  transform: scale(0.8);
  animation: heroLogoIn 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}

.hero__brand {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  margin-bottom: var(--space-md);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.8s forwards;
}

.hero__tagline {
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  font-weight: 500;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s cubic-bezier(0.4, 0, 0.2, 1) 1.2s forwards;
}

.hero__description {
  font-size: clamp(0.9375rem, 2vw, 1.0625rem);
  color: rgba(255, 255, 255, 0.65);
  max-width: 560px;
  margin: 0 auto var(--space-xl);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s cubic-bezier(0.4, 0, 0.2, 1) 1.5s forwards;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s cubic-bezier(0.4, 0, 0.2, 1) 1.8s forwards;
}

.hero__scroll {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 1s ease 2.5s forwards;
  z-index: 2;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--color-accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* --- Intro animación (marca dividida) --- */
.intro-split {
  padding: var(--space-3xl) 0;
  background: var(--color-midnight);
  overflow: hidden;
}

.intro-split__stage {
  position: relative;
  text-align: center;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.intro-split__brand {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
}

.intro-split__divider {
  width: 2px;
  height: 60px;
  background: linear-gradient(to bottom, var(--color-accent), transparent);
  margin: var(--space-sm) auto;
  transform-origin: top;
}

.intro-split__paths {
  display: flex;
  gap: var(--space-xl);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-lg);
}

.intro-split__path {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: var(--space-sm) var(--space-lg);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-md);
  background: var(--color-glass);
  backdrop-filter: blur(10px);
}

.intro-split__conclusion {
  margin-top: var(--space-xl);
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

/* --- Sección división (Marketing | Logística) --- */
.division {
  position: relative;
}

.division__split-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--color-corporate) 50%, var(--color-gray) 50%);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.division__split-bar.visible {
  transform: scaleX(1);
}

.division__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 600px;
}

.division__panel {
  position: relative;
  padding: var(--space-3xl) var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: flex var(--transition-slow);
}

.division__panel--marketing {
  background: linear-gradient(135deg, var(--color-midnight) 0%, var(--color-corporate) 100%);
}

.division__panel--logistica {
  background: linear-gradient(135deg, var(--color-gray) 0%, #D8E2ED 100%);
  color: var(--color-midnight);
}

.division__panel::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.division__panel:hover::before {
  opacity: 1;
}

.division__panel--marketing::before {
  background: radial-gradient(circle at 30% 50%, rgba(59, 159, 217, 0.15), transparent 60%);
}

.division__panel--logistica::before {
  background: radial-gradient(circle at 70% 50%, rgba(13, 78, 145, 0.08), transparent 60%);
}

/* --- Tarjetas glassmorphism --- */
.card-glass {
  position: relative;
  z-index: 1;
  max-width: 480px;
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card-glass:hover {
  transform: translateY(-8px);
}

.card-glass--dark {
  background: var(--color-glass);
  border: 1px solid var(--color-glass-border);
  box-shadow: var(--shadow-lg);
}

.card-glass--dark:hover {
  box-shadow: var(--shadow-glow);
}

.card-glass--light {
  background: var(--color-glass-light);
  border: 1px solid var(--color-glass-light-border);
  box-shadow: var(--shadow-md);
}

.card-glass--light:hover {
  box-shadow: var(--shadow-lg);
}

.card-glass__icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-md);
  color: var(--color-accent);
}

.division__panel--logistica .card-glass__icon {
  color: var(--color-corporate);
}

.card-glass__title {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 700;
  margin-bottom: var(--space-xs);
  letter-spacing: -0.01em;
}

.card-glass__subtitle {
  font-size: 0.9375rem;
  opacity: 0.7;
  margin-bottom: var(--space-lg);
}

.card-glass__services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xs) var(--space-sm);
  margin-bottom: var(--space-lg);
}

.card-glass__services li {
  font-size: 0.8125rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.85;
}

.card-glass__services li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.division__panel--logistica .card-glass__services li {
  color: var(--color-midnight);
}

/* --- Por qué Survexia --- */
.why {
  padding: var(--space-3xl) 0;
  background: var(--color-midnight-light);
}

.why__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.why__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.why__item {
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  background: var(--color-glass);
  border: 1px solid var(--color-glass-border);
  text-align: center;
  transition: transform var(--transition-base), border-color var(--transition-base);
}

.why__item:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 159, 217, 0.3);
}

.why__item-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: rgba(13, 78, 145, 0.2);
  color: var(--color-accent);
}

.why__item h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.why__item p {
  font-size: 0.875rem;
  color: var(--color-gray-muted);
  line-height: 1.7;
}

/* --- Estadísticas --- */
.stats {
  padding: var(--space-3xl) 0;
  background: var(--color-midnight);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  text-align: center;
}

.stats__item {
  padding: var(--space-lg);
}

.stats__number {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--color-white), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-xs);
}

.stats__label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-gray-muted);
  letter-spacing: 0.02em;
}

/* --- Cita central --- */
.quote {
  padding: var(--space-3xl) var(--space-md);
  background: linear-gradient(180deg, var(--color-midnight) 0%, var(--color-midnight-light) 100%);
  text-align: center;
}

.quote__text {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.02em;
  max-width: 900px;
  margin: 0 auto var(--space-lg);
  color: rgba(255, 255, 255, 0.9);
}

.quote__text em {
  font-style: normal;
  color: var(--color-accent);
}

.quote__brand {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--color-gray-muted);
}

/* --- Footer --- */
.footer {
  padding: var(--space-2xl) 0 var(--space-lg);
  background: var(--color-midnight);
  border-top: 1px solid var(--color-glass-border);
}

.footer__cta {
  text-align: center;
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--color-glass-border);
  margin-bottom: var(--space-xl);
}

.footer__cta h2 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.footer__cta p {
  color: var(--color-gray-muted);
  margin-bottom: var(--space-lg);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer__brand img {
  height: 48px;
  margin-bottom: var(--space-sm);
}

.footer__brand p {
  font-size: 0.875rem;
  color: var(--color-gray-muted);
  max-width: 280px;
}

.footer__links h4,
.footer__contact h4 {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  color: rgba(255, 255, 255, 0.5);
}

.footer__links ul,
.footer__contact ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer__links a,
.footer__contact a {
  font-size: 0.875rem;
  color: var(--color-gray-muted);
  transition: color var(--transition-fast);
}

.footer__links a:hover,
.footer__contact a:hover {
  color: var(--color-white);
}

.footer__social {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-glass);
  border: 1px solid var(--color-glass-border);
  color: var(--color-gray-muted);
  transition: all var(--transition-fast);
}

.footer__social a:hover {
  background: var(--color-corporate);
  border-color: var(--color-corporate);
  color: var(--color-white);
  transform: translateY(-2px);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-glass-border);
  font-size: 0.8125rem;
  color: var(--color-gray-muted);
}

.footer__legal a {
  color: var(--color-gray-muted);
  margin-left: var(--space-md);
}

.footer__legal a:hover {
  color: var(--color-white);
}

/* --- WhatsApp flotante --- */
.whatsapp-fab {
  position: fixed;
  bottom: var(--space-md);
  right: var(--space-md);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: #25D366;
  color: var(--color-white);
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.whatsapp-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
}

.whatsapp-fab svg {
  width: 28px;
  height: 28px;
}

/* --- Placeholder pages --- */
.page-hero {
  padding: calc(var(--header-height) + var(--space-3xl)) 0 var(--space-2xl);
  text-align: center;
  background: linear-gradient(180deg, var(--color-midnight-light), var(--color-midnight));
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: var(--space-sm);
}

.page-content {
  padding: var(--space-2xl) 0 var(--space-3xl);
  color: rgba(255, 255, 255, 0.8);
}

.page-content p {
  max-width: 640px;
  margin: 0 auto var(--space-md);
  text-align: center;
}
