/* ══════════════════════════════════════════════════════════════
   KAPTA DESIGN SYSTEM · v3 (naranja glow)
   Fuente de verdad de tokens y átomos.
   Extraído de ACTUALIZACIONES/DAVID TEST D + TY GRACIAS B
   (ambos comparten este bloque :root de forma idéntica).
   Última actualización: 6 agosto 2026

   USO: copia este archivo entero dentro del <style> del entregable.
   Va SIN !important — para landings inyectadas en page builder,
   ver la variante en patrones.md.
   ══════════════════════════════════════════════════════════════ */

/* ─── FUENTES ─────────────────────────────────────────────────
   En el <head>:
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap" rel="stylesheet">
   <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800;900&display=swap" rel="stylesheet">
   ───────────────────────────────────────────────────────────── */

:root {
  /* ── Backgrounds ── */
  --bg-primary:   #f5f0e8;   /* crema — fondo base modo claro */
  --bg-secondary: #ece7da;   /* crema apagada — secciones alternas */
  --bg-card:      #fffaf2;   /* card sobre crema */
  --bg-soft:      #faf6ee;   /* superficie suave intermedia */
  --bg-dark:      #090a0c;   /* fondo base modo oscuro */
  --bg-dark-2:    #111214;   /* oscuro elevado */
  --bg-dark-card: #18191c;   /* card sobre oscuro */

  /* ── Texto ── */
  --text-primary:     #141414;
  --text-secondary:   #3d4350;
  --text-muted:       #6a6a6a;
  --text-invert:      #ffffff;
  --text-invert-soft: rgba(255, 255, 255, 0.72);

  /* ── Acento ── */
  --accent:       #f05a18;   /* naranja KAPTA */
  --accent-dark:  #c74610;
  --accent-light: #ff7a2e;
  --accent-soft:  #fff0e8;   /* fondo de chips e iconos */

  /* ── Semánticos ── */
  --success: #16834a;
  --danger:  #c82f22;

  /* ── Bordes ── */
  --border:        rgba(20, 20, 20, 0.10);
  --border-strong: rgba(20, 20, 20, 0.20);
  --border-accent: rgba(240, 90, 24, 0.30);
  --border-dark:   rgba(255, 255, 255, 0.10);

  /* ── Glow — la firma visual de la marca ── */
  --accent-glow:      rgba(240, 90, 24, 0.32);
  --accent-glow-soft: rgba(240, 90, 24, 0.14);

  /* ── Sombras — TODAS llevan naranja, nunca gris puro ── */
  --shadow-card:       0 4px 20px rgba(240, 90, 24, 0.07), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-card-hover: 0 12px 40px rgba(240, 90, 24, 0.15), 0 2px 8px rgba(0,0,0,0.06);
  --shadow-form:       0 16px 56px rgba(240, 90, 24, 0.13), 0 0 70px rgba(240, 90, 24, 0.08);
  --shadow-dark-card:  0 24px 80px rgba(0, 0, 0, 0.40), 0 0 60px rgba(240, 90, 24, 0.10);

  /* ── Radios ── */
  --r-pill:  999px;
  --r-card:  22px;
  --r-panel: 30px;
  --r-md:    16px;
  --r-sm:    13px;

  /* ── Z-index ── */
  --z-base:   1;
  --z-raised: 10;
  --z-sticky: 100;
  --z-fixed:  1000;

  /* ── Easing canónico ── */
  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* ─── RESET & BASE ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }

body {
  background: var(--bg-primary);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
button { font-family: inherit; }

/* ─── LAYOUT ─────────────────────────────────────────────────── */
.section {
  position: relative;
  padding: 96px 7%;
  background: var(--bg-primary);
}
.section--alt  { background: var(--bg-secondary); }
.section--dark { background: var(--bg-dark); color: var(--text-invert); }

.container       { width: 100%; max-width: 1120px; margin-left: auto; margin-right: auto; }
.container--wide { max-width: 1280px; }

/* ─── TIPOGRAFÍA ─────────────────────────────────────────────── */
/* Display = Poppins 600-900. Cuerpo = Inter. */
.display {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.0;
}

.section-title {
  font-family: 'Poppins', 'Inter', sans-serif;
  max-width: 900px;
  margin: 0 auto 20px;
  text-align: center;
  font-size: clamp(34px, 4.4vw, 68px);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.section-subtitle {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  color: var(--text-secondary);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.55;
  text-wrap: pretty;
}
.section--dark .section-subtitle { color: var(--text-invert-soft); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

/* ─── BOTONES ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 15px 28px;
  border-radius: var(--r-pill);
  border: 0;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn-primary {
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px var(--accent-glow), 0 0 40px rgba(240, 90, 24, 0.22);
}

.btn-outline {
  color: var(--text-primary);
  background: rgba(255, 250, 242, 0.90);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
}
.btn-outline:hover {
  transform: translateY(-2px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-card-hover);
}

/* ─── CARDS ──────────────────────────────────────────────────── */
.card {
  padding: 30px;
  border-radius: var(--r-card);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s var(--ease), box-shadow 0.22s ease, border-color 0.22s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-card-hover);
}
.card h3 {
  font-family: 'Poppins', 'Inter', sans-serif;
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.04em;
  margin-bottom: 10px;
  text-wrap: balance;
}
.card p {
  color: var(--text-secondary);
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.55;
  text-wrap: pretty;
}

/* Card sobre fondo oscuro */
.card--dark {
  background: var(--bg-dark-card);
  border: 1px solid var(--border-dark);
  box-shadow: var(--shadow-dark-card);
}
.card--dark h3 { color: var(--text-invert); }
.card--dark p  { color: var(--text-invert-soft); }

/* Card seleccionada / destacada */
.card.is-active {
  background: #ffffff;
  border: 2px solid var(--accent);
  box-shadow: 0 14px 50px rgba(240, 90, 24, 0.16);
}

/* Foco accesible — obligatorio en cualquier card o botón interactivo */
.card:focus-visible,
.btn:focus-visible {
  outline: 3px solid rgba(240, 90, 24, 0.24);
  outline-offset: 4px;
}

/* ─── CHIPS E ICONOS ─────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.icon-box {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent);
}

/* ─── GLOW ORB — el efecto firma de KAPTA ────────────────────── */
/* Colocar como hijo posicionado dentro de un contenedor position:relative.
   Nunca más de uno por pantalla visible: el glow manda cuando es único. */
.glow-orb {
  position: absolute;
  width: 500px;
  height: 500px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: var(--r-pill);
  background: radial-gradient(circle, rgba(240, 90, 24, 0.13), transparent 68%);
  filter: blur(36px);
  z-index: 0;
  pointer-events: none;
}
.glow-orb--sm { width: 300px; height: 300px; filter: blur(28px); }
.glow-orb--lg { width: 720px; height: 720px; filter: blur(48px); }

/* Glow ambiental para secciones oscuras (va en background de la sección) */
.section--dark.has-ambient {
  background:
    radial-gradient(circle at 82% 10%, rgba(255, 122, 46, 0.07), transparent 30%),
    linear-gradient(180deg, #070809 0%, #0c0d0f 100%);
}

/* ─── GLASS ──────────────────────────────────────────────────── */
.glass {
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  background: rgba(255, 250, 242, 0.72);
  border: 1px solid var(--border);
}
.glass--dark {
  background: rgba(24, 25, 28, 0.62);
  border: 1px solid var(--border-dark);
}

/* ─── FOTOGRAFÍA ─────────────────────────────────────────────── */
/* Las fotos nunca van "crudas": se atenúan para que el texto mande. */
.photo       { object-fit: cover; filter: saturate(0.82) contrast(1.04) brightness(0.95); }
.photo--bw   { object-fit: cover; filter: grayscale(1) contrast(1.05); }
/* Fundido lateral para fotos que se integran en el fondo */
.photo--fade {
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 28%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 28%);
}

/* ─── ANIMACIÓN ──────────────────────────────────────────────── */
@keyframes kFadeUp  { from { opacity:0; transform:translateY(32px) }             to { opacity:1; transform:translateY(0) } }
@keyframes kFadeIn  { from { opacity:0 }                                        to { opacity:1 } }
@keyframes kSlideL  { from { opacity:0; transform:translateX(-48px) }            to { opacity:1; transform:translateX(0) } }
@keyframes kSlideR  { from { opacity:0; transform:translateX(48px) }             to { opacity:1; transform:translateX(0) } }
@keyframes kScaleIn { from { opacity:0; transform:scale(.88) }                   to { opacity:1; transform:scale(1) } }
/* Blur-up: la entrada característica de v3 */
@keyframes kBlurUp  { from { opacity:0; transform:translateY(26px); filter:blur(8px) } to { opacity:1; transform:translateY(0); filter:blur(0) } }
@keyframes kGrowW   { from { transform:scaleX(0) }                               to { transform:scaleX(1) } }
@keyframes kFloatGlow { 0%,100% { transform:translateY(0) scale(1); opacity:.5 } 50% { transform:translateY(-20px) scale(1.03); opacity:.9 } }

.au { opacity:0; animation: kFadeUp  .65s var(--ease) forwards }
.ai { opacity:0; animation: kFadeIn  .60s ease        forwards }
.al { opacity:0; animation: kSlideL  .65s var(--ease) forwards }
.ar { opacity:0; animation: kSlideR  .65s var(--ease) forwards }
.as { opacity:0; animation: kScaleIn .55s ease        forwards }
.ab { opacity:0; animation: kBlurUp  .55s var(--ease) forwards }
.agw{ animation: kGrowW .8s ease forwards; transform-origin:left }

.d0{animation-delay:0s}    .d1{animation-delay:.12s}  .d2{animation-delay:.24s}
.d3{animation-delay:.36s}  .d4{animation-delay:.48s}  .d5{animation-delay:.6s}
.d6{animation-delay:.72s}  .d7{animation-delay:.84s}  .d8{animation-delay:.96s}
.d9{animation-delay:1.08s}

/* ─── ACCESIBILIDAD — OBLIGATORIO EN TODA PIEZA ──────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .au, .ai, .al, .ar, .as, .ab { opacity: 1; }
}
