/* =========================================================
   DelSol IT Service — styles.css
   1. Tokens  2. Base  3. Utilidades  4. Componentes
   5. Secciones  6. Keyframes  7. Responsive  8. Reduced motion
   ========================================================= */

/* ---------- 1. TOKENS ---------- */
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

:root {
  --primary: #0A8BD0;          /* azul "Sol" del logo */
  --secondary: #032264;        /* azul marino "Del" */
  --accent: #F39A1E;           /* naranja de los rayos */
  --bg: #F5F8FD;
  --surface: #FFFFFF;
  --surface-dark: #040C2B;
  --text: #0A1838;
  --muted: #55628A;

  --primary-light: #5BBEFF;
  --accent-light: #FFD36E;
  --line: color-mix(in srgb, var(--secondary) 10%, transparent);
  --shadow-color: color-mix(in srgb, var(--secondary) 22%, transparent);
  --shadow-soft: 0 10px 30px -12px var(--shadow-color);
  --shadow-lift: 0 30px 60px -20px color-mix(in srgb, var(--primary) 45%, transparent);

  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --ease-smooth: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-bouncy: cubic-bezier(0.68, -0.55, 0.26, 1.55);
  --dur-fast: 300ms;
  --dur-slow: 800ms;

  --radius: 28px;
  --radius-sm: 20px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
h1 {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
}
h3 { font-size: 1.35rem; font-weight: 700; }
p { margin: 0; font-size: 1.125rem; line-height: 1.7; }

h2 em, .manifesto em {
  font-style: normal;
  background: linear-gradient(100deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section--dark h2 em {
  background-image: linear-gradient(100deg, var(--primary-light), var(--accent-light));
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

::selection { background: var(--accent); color: var(--secondary); }

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--secondary);
  color: #fff;
  border-radius: 999px;
  translate: 0 -200%;
  transition: translate var(--dur-fast) var(--ease-smooth);
}
.skip-link:focus { translate: 0 0; }

/* ---------- 3. UTILIDADES ---------- */
.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.section {
  position: relative;
  padding-block: clamp(80px, 12vw, 150px);
  overflow: clip;
}

.section--dark {
  background: var(--surface-dark);
  color: #E7ECFA;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
}
.eyebrow::before {
  content: '';
  width: 28px; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
}
.eyebrow--light { color: var(--accent-light); }

.section-head { margin-bottom: clamp(40px, 6vw, 72px); max-width: 760px; }
.section-head h2 { color: inherit; }
.section-head--center { text-align: center; margin-inline: auto; }
.section-head--center .eyebrow { justify-content: center; }
.section-head--split {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px 64px;
  align-items: end;
  max-width: none;
}
.section-head__lead { color: var(--muted); }
.section-head .section-head__lead { margin-top: 20px; }
.section-head--split .section-head__lead { margin-top: 0; }

.icon {
  width: 24px; height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.glass {
  background: color-mix(in srgb, #fff 14%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid color-mix(in srgb, #fff 26%, transparent);
}
.glass--dark {
  background: color-mix(in srgb, #fff 7%, transparent);
  border-color: color-mix(in srgb, #fff 14%, transparent);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* Reveal on scroll (solo con JS; sin JS todo es visible) */
.js .reveal {
  opacity: 0;
  translate: 0 40px;
  transition:
    opacity var(--dur-slow) var(--ease-smooth) calc(var(--d, 0) * 100ms),
    translate var(--dur-slow) var(--ease-smooth) calc(var(--d, 0) * 100ms);
}
.js .reveal.is-visible { opacity: 1; translate: 0 0; }

/* Blobs animados — overflow: clip, NUNCA hidden */
.blobs {
  position: absolute;
  inset: 0;
  overflow: clip;
  pointer-events: none;
  z-index: 0;
}
.blob {
  position: absolute;
  width: clamp(380px, 45vw, 680px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  animation: blob-float 20s ease-in-out infinite alternate;
  will-change: translate, scale;
}
.blob--a { background: var(--primary); top: -20%; left: -12%; }
.blob--b { background: var(--accent); bottom: -30%; right: -10%; animation-duration: 24s; opacity: 0.4; }
.blob--c { background: var(--primary-light); top: 10%; right: -18%; animation-duration: 18s; opacity: 0.45; }
.blob--d { background: #3B5BDB; top: 30%; left: 35%; animation-duration: 26s; opacity: 0.35; }
.section > .container, .stats > .container { position: relative; z-index: 1; }

/* ---------- 4. COMPONENTES ---------- */

/* Botones (translate/scale individuales para no chocar con el magnetismo) */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 30px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  transition:
    scale var(--dur-fast) var(--ease-smooth),
    box-shadow var(--dur-fast) var(--ease-smooth),
    background-color var(--dur-fast) var(--ease-smooth),
    color var(--dur-fast) var(--ease-smooth),
    translate 600ms var(--ease-bouncy);
}
.btn:hover { scale: 1.04; }
.btn:active { scale: 0.97; }
.btn .icon { width: 20px; height: 20px; transition: translate var(--dur-fast) var(--ease-smooth); }
.btn:hover .icon { translate: 4px 0; }

.btn--sun {
  background: linear-gradient(120deg, var(--accent), var(--accent-light));
  color: var(--secondary);
  box-shadow: 0 12px 30px -10px color-mix(in srgb, var(--accent) 75%, transparent);
}
.btn--sun:hover { box-shadow: 0 18px 40px -10px color-mix(in srgb, var(--accent) 90%, transparent); }

.btn--ghost {
  background: color-mix(in srgb, #fff 10%, transparent);
  color: #fff;
  border: 1px solid color-mix(in srgb, #fff 35%, transparent);
}
.btn--ghost:hover { background: color-mix(in srgb, #fff 20%, transparent); }

.btn--sm { padding: 11px 22px; font-size: 0.95rem; }
.btn--block { width: 100%; }

/* Glow giratorio */
/* El relleno va en padding-box y el aro conic en border-box; el halo
   difuso (::after) se enmascara para que solo se vea por fuera del botón */
.btn--glow {
  --glow: conic-gradient(from var(--angle), var(--accent), var(--primary-light), var(--primary), var(--accent-light), var(--accent));
  isolation: isolate;
  border: 2px solid transparent;
  background:
    linear-gradient(120deg, var(--accent), var(--accent-light)) padding-box,
    var(--glow) border-box;
  animation: spin-angle 4s linear infinite;
}
.btn--glow::after {
  content: '';
  position: absolute;
  inset: -16px;
  z-index: -1;
  padding: 16px;
  border-radius: 999px;
  background: conic-gradient(from var(--angle), var(--accent), var(--primary-light), var(--primary), var(--accent-light), var(--accent));
  filter: blur(14px);
  opacity: 0.7;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: glow-pulse 2.6s ease-in-out infinite alternate;
  will-change: opacity;
  pointer-events: none;
}

.magnetic { will-change: translate; }

/* Selector de idioma */
.lang {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--secondary) 8%, transparent);
}
.lang__thumb {
  position: absolute;
  top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: var(--secondary);
  box-shadow: 0 4px 12px -4px var(--shadow-color);
  transition: translate 450ms var(--ease-bouncy);
}
.lang[data-active="en"] .lang__thumb { translate: 100% 0; }
.lang__btn {
  position: relative;
  z-index: 1;
  min-width: 40px;
  padding: 6px 10px;
  border: 0;
  background: none;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color var(--dur-fast) var(--ease-smooth);
}
.lang__btn[aria-pressed="true"] { color: #fff; }

/* Card link con flecha deslizante */
.card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 18px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--primary);
}
.card__link .arrow { display: inline-block; transition: translate var(--dur-fast) var(--ease-bouncy); }
.card:hover .card__link .arrow,
.card.is-active .card__link .arrow,
.resource:hover .card__link .arrow,
.card__link:hover .arrow { translate: 6px 0; }

/* ---------- 5. SECCIONES ---------- */

/* NAVBAR ISLA */
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 100;
  width: min(1200px, 100% - 32px);
  translate: -50% 0;
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 12px 10px 22px;
  border-radius: 999px;
  background: color-mix(in srgb, #fff 62%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid color-mix(in srgb, #fff 60%, transparent);
  transition:
    padding var(--dur-fast) var(--ease-smooth),
    background-color var(--dur-fast) var(--ease-smooth),
    box-shadow var(--dur-fast) var(--ease-smooth);
}
.nav.is-scrolled .nav__inner {
  padding: 6px 8px 6px 18px;
  background: color-mix(in srgb, #fff 88%, transparent);
  box-shadow: 0 16px 40px -18px var(--shadow-color);
}
.nav__logo img {
  height: 50px;
  width: auto;
  transition: height var(--dur-fast) var(--ease-smooth);
}
.nav.is-scrolled .nav__logo img { height: 40px; }

.nav__links { display: flex; gap: 30px; }
.nav__links a {
  position: relative;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--secondary);
  transition: color var(--dur-fast) var(--ease-smooth);
}
.nav__links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  scale: 0 1;
  transform-origin: left;
  transition: scale var(--dur-fast) var(--ease-smooth);
}
.nav__links a:hover { color: var(--primary); }
.nav__links a:hover::after, .nav__links a.is-current::after { scale: 1 1; }

.nav__actions { display: flex; align-items: center; gap: 12px; }

.nav__burger {
  display: none;
  position: relative;
  width: 46px; height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--secondary);
}
.nav__burger span {
  position: absolute;
  left: 13px; right: 13px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: translate var(--dur-fast) var(--ease-smooth), rotate var(--dur-fast) var(--ease-smooth);
}
.nav__burger span:first-child { translate: 0 -4px; }
.nav__burger span:last-child { translate: 0 4px; }
.nav__burger[aria-expanded="true"] span:first-child { translate: 0 0; rotate: 45deg; }
.nav__burger[aria-expanded="true"] span:last-child { translate: 0 0; rotate: -45deg; }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
  padding: 120px 32px 48px;
  background: radial-gradient(circle at 80% 0%, color-mix(in srgb, var(--primary) 35%, transparent), transparent 55%),
              radial-gradient(circle at 0% 100%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 50%),
              var(--surface-dark);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-smooth);
}
.mobile-menu.is-open { opacity: 1; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 8px; }
.mobile-menu nav a {
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 3rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  opacity: 0;
  translate: 0 20px;
  transition: opacity 500ms var(--ease-smooth), translate 500ms var(--ease-smooth), color var(--dur-fast);
}
.mobile-menu.is-open nav a { opacity: 1; translate: 0 0; }
.mobile-menu.is-open nav a:nth-child(2) { transition-delay: 40ms; }
.mobile-menu.is-open nav a:nth-child(3) { transition-delay: 80ms; }
.mobile-menu.is-open nav a:nth-child(4) { transition-delay: 120ms; }
.mobile-menu.is-open nav a:nth-child(5) { transition-delay: 160ms; }
.mobile-menu.is-open nav a:nth-child(6) { transition-delay: 200ms; }
.mobile-menu nav a:hover { color: var(--accent-light); }
.mobile-menu .btn { align-self: flex-start; }

/* HERO */
.hero {
  --p: 0;
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: 150px 120px;
  background: var(--surface-dark);
  color: #fff;
  overflow: clip;
}
.hero__media {
  position: absolute;
  inset: 0;
  scale: calc(1 + var(--p) * 0.15);
  opacity: calc(1 - var(--p) * 0.6);
}
.hero.is-leaving .hero__media { filter: blur(calc(var(--p) * 8px)); }
.hero__waves, .hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__waves {
  background:
    radial-gradient(circle 45vmax at 78% 32%, rgba(243, 154, 30, 0.45), rgba(243, 154, 30, 0.12) 40%, transparent),
    linear-gradient(135deg, #040C2B, #06184A 60%, #0A2A6B);
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, color-mix(in srgb, var(--surface-dark) 55%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface-dark) 60%, transparent) 0%, color-mix(in srgb, var(--surface-dark) 30%, transparent) 45%, var(--surface-dark) 100%);
}
.hero__content {
  position: relative;
  z-index: 1;
  translate: 0 calc(var(--p) * -80px);
  opacity: calc(1 - var(--p) * 1.3);
}
.hero__title {
  max-width: 11ch;
  margin-bottom: 28px;
  font-size: clamp(3rem, 8vw, 5.6rem);
  text-wrap: balance;
}
.shine {
  background: linear-gradient(90deg, var(--accent), var(--accent-light), var(--primary-light), var(--accent-light), var(--accent));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}
.hero__lead {
  max-width: 560px;
  margin-bottom: 40px;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  color: color-mix(in srgb, #fff 82%, transparent);
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 16px; }

/* Hero en dos columnas: texto + mockup animado */
.hero__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: center;
}

/* ===== Mockup: un sitio que se construye y se adapta (escritorio -> tablet -> movil) ===== */
.hero__visual {
  --w1: 440px; --h1: 290px;   /* escritorio */
  --w2: 290px; --h2: 340px;   /* tablet */
  --w3: 168px; --h3: 330px;   /* movil */
  --cycle: 12s;
  --start: 2.8s;
  position: relative;
  display: grid;
  grid-template-rows: 370px auto auto;
  justify-items: center;
  gap: 16px;
  width: 470px;
  contain: layout;
}
.hero__visual::before {
  content: '';
  position: absolute;
  inset: 10% 5% 25%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--primary) 45%, transparent), transparent 70%);
  filter: blur(40px);
}

.device {
  container: device / inline-size;
  align-self: end;
  display: flex;
  flex-direction: column;
  width: var(--w1);
  height: var(--h1);
  padding: 0 8px 8px;
  border-radius: 18px;
  background: color-mix(in srgb, #fff 10%, transparent);
  border: 1px solid color-mix(in srgb, #fff 22%, transparent);
  box-shadow:
    0 40px 80px -30px rgba(0, 0, 0, 0.75),
    0 0 90px -20px color-mix(in srgb, var(--primary) 55%, transparent);
  overflow: clip;
  animation: device-morph var(--cycle) var(--ease-smooth) var(--start) infinite both;
}
.device__bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 4px;
}
.device__bar i { flex: none; width: 8px; height: 8px; border-radius: 50%; opacity: 0.85; }
.device__bar i:nth-child(1) { background: #FF6B6B; }
.device__bar i:nth-child(2) { background: #FFC24B; }
.device__bar i:nth-child(3) { background: #4ADE80; }
.device__url {
  flex: 1;
  min-width: 0;
  margin-left: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, #fff 12%, transparent);
  font-size: 10px;
  line-height: 1.4;
  color: color-mix(in srgb, #fff 75%, transparent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.device__screen {
  flex: 1;
  min-height: 0;
  border-radius: 12px;
  background: var(--bg);
  overflow: clip;
}

.mock { display: grid; gap: 10px; padding: 10px; }
.mock__nav { display: flex; align-items: center; justify-content: space-between; height: 16px; }
.mock__logo { width: 40px; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--secondary), var(--primary)); }
.mock__links { display: flex; gap: 6px; }
.mock__links i { width: 20px; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--secondary) 35%, transparent); }
.mock__burger {
  display: none;
  width: 14px;
  height: 10px;
  border-block: 2px solid var(--secondary);
  background: linear-gradient(var(--secondary), var(--secondary)) center / 100% 2px no-repeat;
}
.mock__hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 10px; align-items: center; }
.mock__text { display: grid; gap: 6px; align-content: center; }
.mock__h { height: 11px; border-radius: 4px; background: var(--secondary); }
.mock__h--short { width: 65%; background: linear-gradient(90deg, var(--accent), var(--primary)); }
.mock__p {
  width: 90%;
  height: 5px;
  margin: 4px 0 10px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--muted) 40%, transparent);
  box-shadow: 0 9px 0 color-mix(in srgb, var(--muted) 25%, transparent);
}
.mock__btn {
  width: 56px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--accent), var(--accent-light));
  box-shadow: 0 4px 10px -3px var(--accent);
}
.mock__img {
  position: relative;
  height: 96px;
  border-radius: 10px;
  background: linear-gradient(160deg, #0A2A6B, var(--secondary));
  overflow: clip;
}
.mock__sun {
  position: absolute;
  left: 50%;
  bottom: -20px;
  width: 54px;
  height: 54px;
  margin-left: -27px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-light), var(--accent) 65%);
  box-shadow: 0 0 30px var(--accent);
}
.mock__sun::before {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: repeating-conic-gradient(color-mix(in srgb, var(--accent-light) 85%, transparent) 0 5deg, transparent 5deg 20deg);
  -webkit-mask: radial-gradient(circle, transparent 54%, #000 56%, #000 72%, transparent 74%);
  mask: radial-gradient(circle, transparent 54%, #000 56%, #000 72%, transparent 74%);
  animation: rays 16s linear infinite;
}
.mock__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mock__cards span {
  position: relative;
  height: 44px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 6px 14px -8px var(--shadow-color);
}
.mock__cards span::before {
  content: '';
  position: absolute;
  left: 8px; top: 8px;
  width: 12px; height: 12px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--primary) 35%, transparent);
}
.mock__cards span:nth-child(2)::before { background: color-mix(in srgb, var(--accent) 45%, transparent); }
.mock__cards span::after {
  content: '';
  position: absolute;
  left: 8px; right: 8px; bottom: 9px;
  height: 4px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--muted) 30%, transparent);
}

/* El layout del mockup se reacomoda de verdad segun el ancho del "dispositivo" */
@container device (max-width: 340px) {
  .mock__hero { grid-template-columns: 1fr; }
  .mock__img { order: -1; height: 72px; }
  .mock__cards { grid-template-columns: 1fr 1fr; }
  .mock__cards span:last-child { grid-column: span 2; }
}
@container device (max-width: 240px) {
  .device__bar i { display: none; }
  .device__url { margin: 0; text-align: center; }
  .device__screen { border-radius: 16px; }
  .mock__links { display: none; }
  .mock__burger { display: block; }
  .mock__cards { grid-template-columns: 1fr; }
  .mock__cards span:last-child { grid-column: auto; }
  .mock__cards span { height: 34px; }
}

/* Construccion: los bloques aparecen uno a uno; los titulos se "escriben" */
.js .hero__visual .b {
  animation: build-in 700ms var(--ease-bouncy) both;
  animation-delay: calc(900ms + var(--i) * 140ms);
}
.js .hero__visual .mock__h.b { animation-name: build-type; animation-timing-function: var(--ease-smooth); }

.device__label {
  display: grid;
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-light);
}
.device__label span {
  grid-area: 1 / 1;
  text-align: center;
  animation: var(--cycle) var(--ease-smooth) var(--start) infinite both;
}
.device__label span:nth-child(1) { animation-name: label-desktop; }
.device__label span:nth-child(2) { animation-name: label-tablet; }
.device__label span:nth-child(3) { animation-name: label-mobile; }

.build-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.build-steps li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 6px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, #fff 8%, transparent);
  border: 1px solid color-mix(in srgb, #fff 16%, transparent);
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
}
.build-steps li::before {
  content: '\2713';
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: var(--secondary);
  font-size: 0.68rem;
  font-weight: 800;
}
.js .build-steps li {
  animation: chip-on 600ms var(--ease-bouncy) both;
  animation-delay: calc(2.1s + var(--i) * 220ms);
}

.hero__scroll {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 32px;
  translate: -50% 0;
  width: 28px; height: 46px;
  border: 2px solid color-mix(in srgb, #fff 55%, transparent);
  border-radius: 999px;
}
.hero__scroll span {
  position: absolute;
  top: 8px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  border-radius: 4px;
  background: var(--accent-light);
  animation: scroll-dot 1.8s var(--ease-smooth) infinite;
}

/* Videos lazy: aparecen al cargar; si dan 404, queda el fallback */
.lazy-video { opacity: 0; transition: opacity 1s var(--ease-smooth); }
.lazy-video.is-ready { opacity: 1; }

/* CIFRAS */
.stats {
  position: relative;
  padding-block: clamp(56px, 8vw, 96px);
  background: var(--bg);
  overflow: clip;
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 28px 26px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, #fff 84%, transparent);
  border: 1px solid color-mix(in srgb, #fff 90%, transparent);
  box-shadow: var(--shadow-soft);
}
.stat:nth-child(even) { margin-top: 32px; }
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(120deg, var(--secondary), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.stat__label { color: var(--muted); font-weight: 500; }

/* SERVICIOS — BENTO */
.services { background: var(--bg); padding-top: clamp(40px, 6vw, 80px); }
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(250px, auto);
  gap: 20px;
}
.bento__cell { grid-column: span 2; display: flex; }
.bento__cell--wide { grid-column: span 3; }
.bento__cell--xl { grid-column: span 3; grid-row: span 2; }

.card {
  --mx: 50%;
  --my: 50%;
  position: relative;
  flex: 1;
  display: flex;
  border-radius: var(--radius);
  background: color-mix(in srgb, #fff 88%, transparent);
  border: 1px solid color-mix(in srgb, #fff 95%, transparent);
  box-shadow: var(--shadow-soft);
  overflow: clip;
  isolation: isolate;
  transition:
    translate 500ms var(--ease-smooth),
    box-shadow 500ms var(--ease-smooth),
    color 500ms var(--ease-smooth);
}
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, #fff 22%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-smooth);
}
.card__fx {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity 600ms var(--ease-smooth);
}
.card__fx::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-dark) 25%, transparent), color-mix(in srgb, var(--surface-dark) 75%, transparent));
}
.card__video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
/* Especificidad: la regla de hover debe ganarle a .is-ready */
.card .card__video.is-ready { opacity: 0; }
.card:hover .card__video.is-ready,
.card.is-active .card__video.is-ready { opacity: 1; }

.card__body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(26px, 3vw, 36px);
}
.card h3 { color: var(--secondary); transition: color 500ms var(--ease-smooth); }
.card p { color: var(--muted); font-size: 1.02rem; transition: color 500ms var(--ease-smooth); }
.bento__cell--xl .card h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.bento__cell--xl .card p { font-size: 1.125rem; max-width: 46ch; }
.bento__cell--xl .card__body { justify-content: flex-end; }

.card__icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  margin-bottom: 6px;
  border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 16%, transparent), color-mix(in srgb, var(--accent) 16%, transparent));
  color: var(--primary);
  transition: background-color 500ms, color 500ms;
}
.bento__cell--xl .card__icon { margin-bottom: auto; width: 64px; height: 64px; border-radius: 20px; }
.bento__cell--xl .card__icon .icon { width: 30px; height: 30px; }

.card__list {
  display: grid;
  gap: 10px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.card__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  color: var(--text);
  transition: color 500ms var(--ease-smooth);
}
.card__list li::before {
  content: '';
  flex: none;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}

/* Hover / activo (táctil) */
.card:hover, .card.is-active {
  translate: 0 -6px;
  box-shadow: var(--shadow-lift);
  color: #fff;
}
.card:hover::after, .card.is-active::after { opacity: 1; }
.card:hover .card__fx, .card.is-active .card__fx { opacity: 1; }
.card:hover h3, .card.is-active h3,
.card:hover .card__list li, .card.is-active .card__list li { color: #fff; }
.card:hover p, .card.is-active p { color: color-mix(in srgb, #fff 82%, transparent); }
.card:hover .card__link, .card.is-active .card__link { color: var(--accent-light); }
.card:hover .card__icon, .card.is-active .card__icon { background: color-mix(in srgb, #fff 16%, transparent); color: var(--accent-light); }

/* Tarjeta destacada a lo ancho: SEO para IA (siempre oscura) */
.bento__cell--full { grid-column: 1 / -1; }
.card--feature {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 24px;
  color: #fff;
  border-color: color-mix(in srgb, var(--primary-light) 30%, transparent);
}
.card--feature .card__fx { opacity: 1; }
.card--feature h3 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.4rem); }
.card--feature p { color: color-mix(in srgb, #fff 82%, transparent); font-size: 1.1rem; max-width: 52ch; }
.card--feature .card__list li { color: #fff; }
.card--feature .card__link { color: var(--accent-light); }

.badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, #fff 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-light) 45%, transparent);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-light);
}
.badge .icon { width: 18px; height: 18px; }

.ai-chat {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 14px;
  margin: clamp(0px, 3vw, 36px);
  padding: 24px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface-dark) 70%, transparent);
  border: 1px solid color-mix(in srgb, #fff 14%, transparent);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}
.ai-chat__tag {
  justify-self: start;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, #fff 55%, transparent);
}
.ai-chat .ai-chat__msg {
  max-width: 92%;
  padding: 14px 16px;
  border-radius: 18px;
  font-size: 0.98rem;
  line-height: 1.55;
  color: #fff;
}
.ai-chat__msg--user {
  justify-self: end;
  border-bottom-right-radius: 6px;
  background: linear-gradient(120deg, var(--primary), #3B5BDB);
}
.ai-chat__msg--ai {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-bottom-left-radius: 6px;
  background: color-mix(in srgb, #fff 10%, transparent);
}
.ai-chat__msg--ai strong { color: var(--accent-light); }
.ai-chat__dot {
  flex: none;
  width: 22px; height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background: conic-gradient(from var(--angle), var(--accent), var(--primary-light), var(--accent-light), var(--accent));
  animation: spin-angle 3s linear infinite;
}
/* Los mensajes aparecen al revelarse la tarjeta */
.js .reveal .ai-chat__msg { opacity: 0; translate: 0 14px; transition: opacity 600ms var(--ease-smooth), translate 600ms var(--ease-smooth); }
.js .reveal.is-visible .ai-chat__msg--user { opacity: 1; translate: 0 0; transition-delay: 500ms; }
.js .reveal.is-visible .ai-chat__msg--ai { opacity: 1; translate: 0 0; transition-delay: 1300ms; }

/* Malla de degradados (fallback de los videos de tarjeta) */
.mesh {
  position: absolute;
  inset: -20%;
  background-color: var(--secondary);
  animation: mesh-move 14s ease-in-out infinite alternate;
  will-change: translate;
}
.mesh--1 {
  background-image:
    radial-gradient(at 15% 20%, var(--primary) 0, transparent 45%),
    radial-gradient(at 85% 30%, var(--accent) 0, transparent 40%),
    radial-gradient(at 50% 90%, #3B5BDB 0, transparent 50%);
}
.mesh--2 {
  background-image:
    radial-gradient(at 80% 15%, var(--primary-light) 0, transparent 45%),
    radial-gradient(at 20% 80%, var(--accent) 0, transparent 45%),
    radial-gradient(at 60% 50%, var(--primary) 0, transparent 55%);
}
.mesh--3 {
  background-image:
    radial-gradient(at 30% 10%, var(--accent-light) 0, transparent 40%),
    radial-gradient(at 90% 90%, var(--primary) 0, transparent 50%),
    radial-gradient(at 10% 70%, #3B5BDB 0, transparent 45%);
}

/* SECCIÓN INMERSIVA */
.immersive {
  --p: 0;
  --grow: 0;
  position: relative;
  height: 250vh;
  background: var(--surface-dark);
  color: #fff;
}
.immersive__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: grid;
  place-items: center;
  overflow: clip;
}
.immersive__media {
  position: absolute;
  inset: 0;
  clip-path: inset(calc((1 - var(--grow)) * 16%) calc((1 - var(--grow)) * 20%) round calc((1 - var(--grow)) * 32px + 0px));
  background: var(--secondary);
}
.immersive__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.immersive__shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--surface-dark) 55%, transparent), color-mix(in srgb, var(--surface-dark) 20%, transparent) 75%);
}
.aurora { position: absolute; inset: 0; overflow: clip; }
.aurora span {
  position: absolute;
  width: 55%;
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0.75;
  filter: blur(70px);
  animation: aurora 18s ease-in-out infinite alternate;
  will-change: translate, scale;
}
.aurora span:nth-child(1) { background: var(--primary); top: -10%; left: -5%; }
.aurora span:nth-child(2) { background: var(--accent); bottom: -20%; right: -5%; animation-duration: 22s; animation-delay: -6s; }
.aurora span:nth-child(3) { background: #3B5BDB; top: 30%; left: 30%; animation-duration: 16s; animation-delay: -3s; }
.aurora span:nth-child(4) { background: var(--accent-light); top: -20%; right: 10%; width: 35%; animation-duration: 25s; opacity: 0.5; }

.immersive__content { position: relative; z-index: 1; max-width: 1000px; text-align: center; }
.immersive__content .eyebrow { justify-content: center; }
.manifesto {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.2vw, 3.3rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.manifesto .word {
  opacity: 0.15;
  transition: opacity 400ms var(--ease-smooth);
}
.manifesto .word.is-lit { opacity: 1; }
.manifesto em { background: none; color: var(--accent-light); font-style: normal; }
.manifesto em .word.is-lit { text-shadow: 0 0 30px color-mix(in srgb, var(--accent) 60%, transparent); }

/* PROCESO */
.process { background: var(--surface); }
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.step {
  position: relative;
  padding: 32px 28px 36px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--line);
}
.step:nth-child(2) { margin-top: 48px; }
.step:nth-child(3) { margin-top: 96px; }
.step:nth-child(4) { margin-top: 144px; }
.step__num {
  display: block;
  margin-bottom: 26px;
  font-family: var(--font-display);
  font-size: 3.6rem;
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--primary);
}
.step h3 { margin-bottom: 10px; color: var(--secondary); }
.step p { color: var(--muted); font-size: 1.02rem; }
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 58px;
  right: -24px;
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
}

/* TESTIMONIOS — MARQUEE */
.testimonials { background: var(--bg); }
.marquee {
  display: grid;
  gap: 20px;
  overflow: clip;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__row { display: flex; width: max-content; }
.marquee__track {
  display: flex;
  gap: 20px;
  padding-right: 20px;
  width: max-content;
}
.marquee__row { animation: marquee 45s linear infinite; }
.marquee__row--reverse { animation-direction: reverse; animation-duration: 52s; }
.marquee:hover .marquee__row { animation-play-state: paused; }

.quote {
  flex: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  width: min(420px, 80vw);
  margin: 0;
  padding: 30px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.quote blockquote { margin: 0; font-size: 1.05rem; line-height: 1.65; color: var(--text); }
.quote figcaption { display: flex; align-items: center; gap: 14px; }
.quote figcaption strong { display: block; font-family: var(--font-display); color: var(--secondary); }
.quote figcaption small { color: var(--muted); font-size: 0.88rem; }
.quote__avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
}

/* COTIZADOR */
.quiz-section { background: var(--surface-dark); }
.quiz-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}
.quiz-intro h2 { margin-bottom: 20px; color: #fff; }
.quiz-intro p { color: color-mix(in srgb, #fff 72%, transparent); max-width: 440px; }

.quiz {
  position: relative;
  padding: clamp(24px, 4vw, 44px);
  border-radius: var(--radius);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.6);
}
.quiz__top { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.quiz__counter {
  flex: none;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-light);
}
.quiz__bar {
  flex: 1;
  height: 6px;
  border-radius: 6px;
  background: color-mix(in srgb, #fff 12%, transparent);
  overflow: clip;
}
.quiz__bar span {
  display: block;
  height: 100%;
  width: 20%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--primary-light));
  transition: width 600ms var(--ease-smooth);
}
.quiz__step { display: none; margin: 0; padding: 0; border: 0; min-width: 0; }
.quiz__step.is-current { display: block; animation: step-in 500ms var(--ease-smooth); }
.no-js .quiz__step { display: block; margin-bottom: 28px; }
.quiz legend {
  margin-bottom: 20px;
  padding: 0;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 700;
  color: #fff;
}
.quiz__hint { margin: -10px 0 16px; font-size: 0.95rem; color: color-mix(in srgb, #fff 60%, transparent); }

.options { display: grid; gap: 12px; }
.options--grid { grid-template-columns: 1fr 1fr; }
.option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, #fff 14%, transparent);
  background: color-mix(in srgb, #fff 4%, transparent);
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--dur-fast), background-color var(--dur-fast), translate var(--dur-fast) var(--ease-smooth);
}
.option:hover { border-color: color-mix(in srgb, var(--accent) 60%, transparent); translate: 4px 0; }
.option input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
}
.option::before {
  content: '';
  flex: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, #fff 40%, transparent);
  transition: border-color var(--dur-fast), background-color var(--dur-fast), box-shadow var(--dur-fast);
}
.option:has(input[type="checkbox"])::before { border-radius: 6px; }
.option:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.option:has(input:checked)::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 3px var(--surface-dark);
}
.option:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }

.quiz__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.quiz__nav [hidden] { display: none; }
.quiz__error { min-height: 1.4em; margin-top: 12px; font-size: 0.95rem; color: var(--accent-light); }

.quiz__result { text-align: left; animation: step-in 600ms var(--ease-smooth); }
.quiz__result:focus { outline: none; }
.quiz__result-icon img { width: 64px; height: 64px; margin-bottom: 12px; animation: float-card 5s ease-in-out infinite; }
.quiz__result-title { font-size: clamp(1.5rem, 3vw, 2rem); color: #fff; margin-bottom: 12px; }
.quiz__result-text { color: color-mix(in srgb, #fff 80%, transparent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; padding: 0; list-style: none; }
.chips li {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  background: color-mix(in srgb, var(--primary) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary-light) 40%, transparent);
  color: #DDF1FF;
}
.quiz__tip {
  padding: 16px 18px;
  border-left: 3px solid var(--accent);
  border-radius: 0 14px 14px 0;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  font-size: 1rem;
  color: color-mix(in srgb, #fff 88%, transparent);
}
.quiz__result-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* RECURSOS */
.resources { background: var(--surface); }
.resources__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 20px;
}
.resource {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  text-align: left;
  overflow: clip;
  transition: translate 500ms var(--ease-smooth), box-shadow 500ms var(--ease-smooth), border-color 500ms;
}
.resource:first-child {
  background: linear-gradient(140deg, color-mix(in srgb, var(--primary) 12%, var(--bg)), color-mix(in srgb, var(--accent) 14%, var(--bg)));
}
.resource:hover { translate: 0 -6px; box-shadow: var(--shadow-lift); border-color: transparent; }
.resource h3 { color: var(--secondary); }
.resource p { color: var(--muted); font-size: 1rem; overflow-wrap: anywhere; }
.resource__icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  margin-bottom: 10px;
  border-radius: 16px;
  background: var(--secondary);
  color: var(--accent-light);
}

/* POR QUÉ — TARJETAS OSCURAS */
.why { background: var(--bg); }
.why__layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.why .section-head { position: sticky; top: 140px; margin-bottom: 0; }
.why__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.why__grid > :nth-child(even) { translate: 0 48px; }
.js .why__grid > .reveal:nth-child(even) { translate: 0 88px; }
.js .why__grid > .reveal.is-visible:nth-child(even) { translate: 0 48px; }
.why__grid > div { display: flex; }
.feature {
  position: relative;
  flex: 1;
  padding: 34px 30px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--primary) 40%, transparent), transparent 55%),
    var(--surface-dark);
  color: #fff;
  overflow: clip;
  box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--secondary) 80%, transparent);
  transition: translate 500ms var(--ease-smooth);
}
.feature:hover { translate: 0 -6px; }
.feature::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 70%, transparent), transparent 40%, color-mix(in srgb, var(--primary-light) 50%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
.feature__num {
  display: block;
  margin-bottom: 48px;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--accent-light);
}
.feature h3 { margin-bottom: 10px; }
.feature p { font-size: 1rem; color: color-mix(in srgb, #fff 75%, transparent); }

/* FAQ */
.faq { background: var(--surface); padding-top: clamp(120px, 16vw, 200px); }
.faq__layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.faq .section-head { margin-bottom: 0; }
.faq__list { display: grid; gap: 14px; }
.faq details {
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--line);
  transition: background-color var(--dur-fast), box-shadow var(--dur-fast);
}
.faq details[open] { background: var(--surface); box-shadow: var(--shadow-soft); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--secondary);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  flex: none;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
  font-size: 1.4rem;
  font-weight: 500;
  transition: rotate var(--dur-fast) var(--ease-bouncy), background-color var(--dur-fast), color var(--dur-fast);
}
.faq details[open] summary::after { rotate: 45deg; background: var(--accent); color: var(--secondary); }
.faq details p { padding: 0 26px 24px; color: var(--muted); font-size: 1.05rem; }

/* CONTACTO */
.contact { background: var(--surface-dark); }
.contact__layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
}
.contact h2 { color: #fff; margin-bottom: 20px; }
.contact__lead { color: color-mix(in srgb, #fff 72%, transparent); margin-bottom: 36px; max-width: 460px; }
.contact__list { display: grid; gap: 20px; margin: 0 0 32px; padding: 0; list-style: none; }
.contact__list li { display: flex; align-items: flex-start; gap: 16px; }
.contact__list small {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, #fff 55%, transparent);
}
.contact__list a, .contact__list li > span > span { color: #fff; font-weight: 500; overflow-wrap: anywhere; }
.contact__list a:hover { color: var(--accent-light); }
.contact__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 14px;
  background: color-mix(in srgb, #fff 8%, transparent);
  border: 1px solid color-mix(in srgb, #fff 12%, transparent);
  color: var(--accent-light);
}
.socials { display: flex; gap: 12px; }
.socials a {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: color-mix(in srgb, #fff 8%, transparent);
  color: #fff;
  transition: background-color var(--dur-fast), color var(--dur-fast);
}
.socials a:hover { background: var(--accent); color: var(--secondary); }

.contact-form {
  display: grid;
  gap: 18px;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.6);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; }
.field > span { font-size: 0.9rem; font-weight: 600; color: color-mix(in srgb, #fff 80%, transparent); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, #fff 16%, transparent);
  background: color-mix(in srgb, #fff 6%, transparent);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  transition: border-color var(--dur-fast), background-color var(--dur-fast), box-shadow var(--dur-fast);
}
.field select option { color: var(--text); }
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: color-mix(in srgb, #fff 10%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent);
}
.field input:user-invalid, .field textarea:user-invalid, .field select:user-invalid { border-color: #FF8A80; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { min-height: 1.5em; font-size: 0.98rem; font-weight: 500; color: color-mix(in srgb, #fff 80%, transparent); }
.form-status.is-success { color: #7CF0B0; }
.form-status.is-error { color: #FFB4A8; }
.contact-form button[disabled] { opacity: 0.7; pointer-events: none; }

/* PANEL "SABER MÁS" (dialog lateral en escritorio, hoja inferior en móvil) */
button.card__link {
  align-self: flex-start;
  padding: 18px 0 0;
  border: 0;
  background: none;
  font-size: 1rem;
  cursor: pointer;
}

.btn--line {
  background: transparent;
  color: var(--secondary);
  border: 1.5px solid color-mix(in srgb, var(--secondary) 22%, transparent);
}
.btn--line:hover { border-color: var(--primary); color: var(--primary); }

.sheet {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(640px, 100%);
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  overflow: visible;
}
.sheet::backdrop {
  background: color-mix(in srgb, var(--surface-dark) 60%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fade-in 300ms var(--ease-smooth);
}
.sheet.is-closing::backdrop { animation: fade-out 280ms var(--ease-smooth) forwards; }
.sheet__panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--radius) 0 0 var(--radius);
  background: var(--surface);
  box-shadow: -30px 0 80px -20px rgba(4, 12, 43, 0.5);
  overflow: clip;
  animation: sheet-in 500ms var(--ease-smooth);
}
.sheet.is-closing .sheet__panel { animation: sheet-out 280ms var(--ease-smooth) forwards; }

.sheet__head {
  position: relative;
  flex: none;
  padding: 36px 32px 32px;
  background: var(--secondary);
  color: #fff;
  overflow: clip;
  isolation: isolate;
}
.sheet__head .mesh { z-index: -2; opacity: 0.9; }
.sheet__head::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--surface-dark) 55%, transparent));
}
.sheet__head-inner { display: flex; align-items: center; gap: 18px; padding-right: 48px; }
.sheet__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 60px; height: 60px;
  border-radius: 18px;
  background: color-mix(in srgb, #fff 14%, transparent);
  border: 1px solid color-mix(in srgb, #fff 25%, transparent);
  color: var(--accent-light);
}
.sheet__icon .icon { width: 28px; height: 28px; }
.sheet__eyebrow { margin-bottom: 8px; }
.sheet__title { font-size: clamp(1.6rem, 4vw, 2.2rem); color: #fff; }
.sheet__close {
  position: absolute;
  top: 20px; right: 20px;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 1px solid color-mix(in srgb, #fff 25%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, #fff 10%, transparent);
  color: #fff;
  transition: background-color var(--dur-fast), rotate var(--dur-fast) var(--ease-bouncy);
}
.sheet__close:hover { background: color-mix(in srgb, #fff 22%, transparent); rotate: 90deg; }

.sheet__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 32px;
}
.sheet__body h3 {
  margin: 34px 0 14px;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}
.sheet__lead { font-size: 1.15rem; line-height: 1.7; color: var(--text); }

.sheet__list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.sheet__list li {
  position: relative;
  padding: 14px 16px 14px 48px;
  border-radius: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
}
.sheet__list li::before {
  content: '\2713';
  position: absolute;
  left: 14px; top: 15px;
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: var(--secondary);
  font-size: 0.75rem;
  font-weight: 800;
}
.sheet__list strong { color: var(--secondary); }

.sheet__table { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); }
.sheet__table table { width: 100%; min-width: 460px; border-collapse: collapse; font-size: 0.95rem; }
.sheet__table th, .sheet__table td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.sheet__table tr:last-child th, .sheet__table tr:last-child td { border-bottom: 0; }
.sheet__table thead th {
  font-family: var(--font-display);
  font-size: 0.85rem;
  background: var(--bg);
  color: var(--muted);
}
.sheet__table thead th:last-child { background: var(--secondary); color: var(--accent-light); }
.sheet__table tbody th { font-weight: 600; color: var(--secondary); width: 28%; }
.sheet__table td { color: var(--muted); }
.sheet__table td:last-child { color: var(--text); font-weight: 500; background: color-mix(in srgb, var(--accent) 8%, transparent); }

.sheet__benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.benefit {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 18px 16px;
  border-radius: 18px;
  background: var(--surface-dark);
  color: #fff;
}
.benefit__num { font-family: var(--font-display); font-size: 0.8rem; font-weight: 800; color: var(--accent-light); }
.benefit strong { font-family: var(--font-display); font-size: 1.02rem; }
.benefit p { font-size: 0.9rem; line-height: 1.55; color: color-mix(in srgb, #fff 72%, transparent); }

.sheet__who {
  margin-top: 34px;
  padding: 20px 22px;
  border-left: 3px solid var(--accent);
  border-radius: 0 16px 16px 0;
  background: color-mix(in srgb, var(--primary) 7%, transparent);
}
.sheet__who h3 { margin-top: 0; }
.sheet__who p { font-size: 1.02rem; color: var(--text); }

.sheet__foot {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 32px 24px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}
.sheet__foot .btn { flex: 1 1 200px; }

/* FOOTER */
.footer {
  padding: 80px 0 32px;
  background: #020719;
  color: color-mix(in srgb, #fff 70%, transparent);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid color-mix(in srgb, #fff 10%, transparent);
}
.footer__brand img { width: 150px; height: auto; margin-bottom: 18px; }
.footer__brand p { max-width: 300px; font-size: 1rem; }
.footer h3 {
  margin-bottom: 18px;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
}
.footer ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.footer a, .link-btn { transition: color var(--dur-fast); overflow-wrap: anywhere; }
.footer a:hover, .link-btn:hover { color: var(--accent-light); }
.link-btn { padding: 0; border: 0; background: none; color: inherit; text-align: left; }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  font-size: 0.92rem;
}
.footer__bottom p { font-size: inherit; }

/* Fade breve al cambiar idioma (solo main, footer y links del nav) */
main, .footer, .nav__links, .mobile-menu nav { transition: opacity 180ms ease; }
.is-switching main, .is-switching .footer, .is-switching .nav__links, .is-switching .mobile-menu nav { opacity: 0; }

/* Rendimiento: el JS marca .is-paused en secciones fuera de pantalla */
.is-paused, .is-paused *, .is-paused *::before, .is-paused *::after {
  animation-play-state: paused !important;
}

/* ---------- 6. KEYFRAMES ---------- */
@keyframes spin-angle { to { --angle: 360deg; } }
@keyframes glow-pulse { from { opacity: 0.4; } to { opacity: 0.85; } }
@keyframes shimmer { to { background-position: 300% 0; } }
@keyframes blob-float {
  0%   { translate: 0 0; scale: 1; }
  50%  { translate: 6vw 4vh; scale: 1.12; }
  100% { translate: -4vw 8vh; scale: 0.92; }
}
@keyframes aurora {
  0%   { translate: 0 0; scale: 1; }
  50%  { translate: 20% 15%; scale: 1.25; }
  100% { translate: -10% 25%; scale: 0.9; }
}
@keyframes mesh-move {
  0%   { translate: 0 0; }
  100% { translate: 6% -6%; }
}
@keyframes float-card {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}
@keyframes scroll-dot {
  0% { translate: 0 0; opacity: 1; }
  80% { translate: 0 16px; opacity: 0; }
  100% { translate: 0 0; opacity: 0; }
}
@keyframes marquee { to { translate: -50% 0; } }
@keyframes device-morph {
  0%, 26%   { width: var(--w1); height: var(--h1); border-radius: 18px; }
  34%, 58%  { width: var(--w2); height: var(--h2); border-radius: 22px; }
  66%, 90%  { width: var(--w3); height: var(--h3); border-radius: 28px; }
  98%, 100% { width: var(--w1); height: var(--h1); border-radius: 18px; }
}
@keyframes label-desktop {
  0%, 27%   { opacity: 1; translate: 0 0; }
  31%, 94%  { opacity: 0; translate: 0 -8px; }
  98%, 100% { opacity: 1; translate: 0 0; }
}
@keyframes label-tablet {
  0%, 31%   { opacity: 0; translate: 0 8px; }
  35%, 58%  { opacity: 1; translate: 0 0; }
  62%, 100% { opacity: 0; translate: 0 -8px; }
}
@keyframes label-mobile {
  0%, 63%   { opacity: 0; translate: 0 8px; }
  67%, 90%  { opacity: 1; translate: 0 0; }
  94%, 100% { opacity: 0; translate: 0 -8px; }
}
@keyframes build-in {
  from { opacity: 0; scale: 0.6; }
  to   { opacity: 1; scale: 1; }
}
@keyframes build-type {
  from { clip-path: inset(0 100% 0 0 round 4px); }
  to   { clip-path: inset(0 0 0 0 round 4px); }
}
@keyframes chip-on {
  from { opacity: 0; translate: 0 10px; scale: 0.8; }
  to   { opacity: 1; translate: 0 0; scale: 1; }
}
@keyframes rays { to { rotate: 360deg; } }
@keyframes sheet-in { from { translate: 100% 0; } to { translate: 0 0; } }
@keyframes sheet-out { from { translate: 0 0; } to { translate: 100% 0; } }
@keyframes sheet-up { from { translate: 0 100%; } to { translate: 0 0; } }
@keyframes sheet-down { from { translate: 0 0; } to { translate: 0 100%; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

@keyframes step-in {
  from { opacity: 0; translate: 24px 0; }
  to { opacity: 1; translate: 0 0; }
}

/* ---------- 7. RESPONSIVE ---------- */
@media (max-width: 1180px) {
  .hero__visual {
    --w1: 380px; --h1: 262px;
    --w2: 270px; --h2: 320px;
    --w3: 160px; --h3: 310px;
    width: 400px;
    grid-template-rows: 340px auto auto;
  }
}

@media (max-width: 1140px) {
  .nav__links { gap: 18px; }
  .nav__links a { font-size: 0.9rem; }
  .nav__inner { gap: 14px; }
}

@media (max-width: 1000px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: block; }

  .section-head--split { grid-template-columns: 1fr; }

  .stats__grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(even) { margin-top: 0; }

  .bento { grid-template-columns: 1fr 1fr; }
  .bento__cell, .bento__cell--wide { grid-column: span 1; }
  .bento__cell--xl { grid-column: span 2; grid-row: span 1; min-height: 380px; }
  .bento__cell:nth-last-child(2), .bento__cell--full { grid-column: span 2; }
  .card--feature { grid-template-columns: 1fr; }
  .ai-chat { margin: 0 clamp(26px, 3vw, 36px) clamp(26px, 3vw, 36px); }

  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(n) { margin-top: 0; }
  .step:nth-child(even) { margin-top: 40px; }
  .step::after { display: none; }

  .quiz-layout, .contact__layout, .faq__layout, .why__layout { grid-template-columns: 1fr; }
  .why .section-head { position: static; }

  .resources__grid { grid-template-columns: 1fr 1fr; }
  .resource:first-child { grid-column: span 2; }

  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: span 2; }

  .hero__content { grid-template-columns: 1fr; }
  .hero__visual { justify-self: center; margin-top: 16px; }
}

@media (max-width: 640px) {
  :root { --radius: 24px; }
  .nav { top: 10px; width: calc(100% - 20px); }
  .nav__inner { padding: 6px 6px 6px 16px; }
  .nav__logo img { height: 40px; }
  .nav.is-scrolled .nav__logo img { height: 36px; }
  .nav__actions { gap: 8px; }

  .hero { flex-direction: column; align-items: stretch; justify-content: center; padding-block: 120px 64px; }
  .hero__ctas .btn { flex: 1 1 100%; }
  .hero__visual { zoom: 0.76; }

  .sheet { inset: auto 0 0 0; width: 100%; height: 92vh; height: 92dvh; }
  .sheet__panel { border-radius: var(--radius) var(--radius) 0 0; animation-name: sheet-up; }
  .sheet.is-closing .sheet__panel { animation-name: sheet-down; }
  .sheet__head { padding: 28px 20px 24px; }
  .sheet__head-inner { gap: 14px; }
  .sheet__icon { width: 48px; height: 48px; border-radius: 14px; }
  .sheet__close { top: 14px; right: 14px; }
  .sheet__body { padding: 24px 20px; }
  .sheet__benefits { grid-template-columns: 1fr; }
  .sheet__foot { padding: 14px 20px 20px; }
  .hero__scroll { display: none; }

  .stats__grid { gap: 14px; }
  .stat { padding: 22px 18px; }

  .bento { grid-template-columns: 1fr; }
  .bento__cell, .bento__cell--wide, .bento__cell--xl,
  .bento__cell:nth-last-child(2), .bento__cell--full { grid-column: span 1; }
  .bento__cell--xl { min-height: 0; }

  .steps { grid-template-columns: 1fr; }
  .step:nth-child(even) { margin-top: 0; }

  .options--grid, .field-row { grid-template-columns: 1fr; }
  .quiz__result-actions .btn { flex: 1 1 100%; }

  .resources__grid { grid-template-columns: 1fr; }
  .resource:first-child { grid-column: span 1; }

  .why__grid { grid-template-columns: 1fr; }
  .why__grid > :nth-child(even),
  .js .why__grid > .reveal:nth-child(even) { translate: 0 40px; }
  .js .why__grid > .reveal.is-visible:nth-child(even) { translate: 0 0; }
  .faq { padding-top: clamp(80px, 12vw, 150px); }

  .footer__grid { grid-template-columns: 1fr; }
  .footer__brand { grid-column: span 1; }
}

/* ---------- 8. REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero__media, .hero__content { scale: 1; filter: none; opacity: 1; translate: none; }
  .js .reveal { opacity: 1; translate: none; }
  .js .why__grid > .reveal:nth-child(even) { translate: 0 48px; }
  .immersive { height: auto; }
  .immersive__sticky { position: relative; height: auto; min-height: 100vh; padding-block: 120px; }
  .immersive__media { clip-path: none; }
  .manifesto .word { opacity: 1; }
  .js .reveal .ai-chat__msg { opacity: 1; translate: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee__row { animation: none; flex-wrap: wrap; width: auto; }
  .marquee__track { flex-wrap: wrap; justify-content: center; width: auto; }
  .marquee__row--reverse, .marquee__track[aria-hidden="true"] { display: none; }
  .magnetic { translate: none !important; }
}
