/* Página de curso: Introducción a Data Science (solo empresas). Identidad propia: el pizarrón de
   una clase magistral, con trazos de tiza, notas pegadas y títulos subrayados a mano. */
.c-introduccion-data-science {
  --ids-board: #17352f; --ids-chalk: #eef3ea; --ids-yellow: #f2d57a; --ids-pink: #f3a0a8; --ids-blue: #9fd3f0;
  --ids-note: #fff2b3; --ids-note-ink: #3b3218;
}
:root[data-theme="dark"] .c-introduccion-data-science { --ids-board: #10261f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .c-introduccion-data-science { --ids-board: #10261f; } }

.c-introduccion-data-science .c-hero h1 { font-size: clamp(2.2rem, 1.3rem + 3vw, 3.8rem); max-width: 16ch; }
.c-introduccion-data-science .cs-step-n { font-style: italic; font-weight: 600; letter-spacing: .02em; }
.c-introduccion-data-science h2 em, .c-introduccion-data-science .c-hero h1 em {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8 C 50 2, 90 11, 140 5 S 190 6, 198 4' fill='none' stroke='%23e0a92e' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 100% .32em; background-position: 0 100%; padding-bottom: .08em;
}

/* Etiqueta de curso exclusivo para empresas */
.c-solo-emp { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600; color: var(--ink); background: color-mix(in srgb, var(--ids-yellow) 40%, var(--surface)); border: 1px solid color-mix(in srgb, #e0a92e 50%, var(--line)); }
.c-solo-emp::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: #e0a92e; }

/* ---------- Portada ---------- */
.ids-hand { left: -24px; bottom: 10%; max-width: 270px; display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; font-weight: 600; line-height: 1.35; animation: c-in .7s .6s cubic-bezier(.2, .8, .2, 1) both, ids-raise 4s 1.4s ease-in-out infinite; }
.ids-hand small { display: block; font-weight: 500; }
.ids-hand-ico { font-size: 1.4rem; line-height: 1; transform-origin: 50% 90%; animation: ids-wave 4s 1.4s ease-in-out infinite; }
.ids-chalk { display: block; white-space: nowrap; right: -10px; top: -16px; padding: 10px 16px; background: var(--ids-board); border-color: transparent; color: var(--ids-chalk); font-style: italic; font-weight: 600; animation: c-in .7s .85s cubic-bezier(.2, .8, .2, 1) both; }
.ids-chalk b { color: var(--ids-yellow); font-size: 1.1rem; }
@keyframes ids-raise { 50% { transform: translateY(-6px); } }
@keyframes ids-wave { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-14deg); } 80% { transform: rotate(10deg); } 90% { transform: rotate(-6deg); } }

/* ---------- Historia ---------- */
.c-introduccion-data-science .s2, .c-introduccion-data-science .s4 { display: block; }
.c-introduccion-data-science .s5 { padding: 7%; }
.c-introduccion-data-science .s1.scene { background: var(--surface); }
.ids-stage { font-size: .9rem; }
/* Escenas de pizarrón: fondo verde con polvo de tiza */
.c-introduccion-data-science .s2.scene, .c-introduccion-data-science .s3.scene, .c-introduccion-data-science .s5.scene {
  background: radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, .07), transparent 60%), var(--ids-board); color: var(--ids-chalk);
}
.c-introduccion-data-science .s4.scene { background: repeating-linear-gradient(90deg, transparent 0 46px, color-mix(in srgb, var(--line) 50%, transparent) 46px 47px), var(--sky); }

/* Escena 1 */
.ids-meet { margin: 0; font-family: var(--f-data); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ids-people { position: absolute; left: 6%; right: 6%; top: 18%; bottom: 26%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; align-items: end; }
.ids-people .p { display: grid; justify-items: center; gap: 10px; transition: opacity .5s, transform .5s; }
.ids-people .p:nth-child(2) { transition-delay: .12s; } .ids-people .p:nth-child(3) { transition-delay: .24s; } .ids-people .p:nth-child(4) { transition-delay: .36s; }
.ids-people .p:nth-child(odd) { margin-bottom: 18%; }
.ids-people i { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: .8rem; color: #fff; background: var(--brand); }
.ids-people .p2 i { background: var(--teal); } .ids-people .p3 i { background: #c98a1b; } .ids-people .p4 i { background: var(--muted); }
.ids-b { position: relative; padding: 8px 10px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-size: .78rem; line-height: 1.3; text-align: center; }
.ids-b b { color: var(--accent); }
.ids-b::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 10px; height: 10px; translate: -50% 0; rotate: 45deg; background: var(--bg); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ids-q { position: absolute; left: 6%; right: 6%; bottom: 7%; margin: 0; padding: 10px 14px; border-radius: 12px; text-align: center; font-style: italic; font-weight: 700; color: var(--ink); background: color-mix(in srgb, var(--ids-yellow) 45%, var(--surface)); --d: .6s; }
.cs-stage:not([data-step="1"]) .ids-people .p { opacity: 0; transform: translateY(16px); }
.cs-stage:not([data-step="1"]) .ids-q { opacity: 0; }

/* Escena 2: anillos dibujados con tiza */
.ids-rings { position: absolute; left: 6%; top: 6%; width: 64%; height: 80%; overflow: visible; }
.ids-rings ellipse { fill: none; stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.2s ease; }
.ids-rings .r1 { stroke: var(--ids-chalk); } .ids-rings .r2 { stroke: var(--ids-yellow); transition-delay: .3s; } .ids-rings .r3 { stroke: var(--ids-pink); transition-delay: .6s; }
.cs-stage[data-step="2"] .ids-rings ellipse { stroke-dashoffset: 0; }
.ids-tag { position: absolute; left: 38%; translate: -50% 0; font-style: italic; font-weight: 600; font-size: .9rem; white-space: nowrap; transition: opacity .5s; }
.ids-tag.tg1 { top: 16%; } .ids-tag.tg2 { top: 35%; color: var(--ids-yellow); transition-delay: .5s; } .ids-tag.tg3 { top: 60%; color: var(--ids-pink); transition-delay: .8s; }
.cs-stage:not([data-step="2"]) .ids-tag { opacity: 0; }
.ids-side { position: absolute; right: 5%; top: 30%; width: 26%; margin: 0; font-size: .82rem; line-height: 1.4; font-style: italic; color: var(--ids-blue); --d: 1s; }
.ids-side u { text-decoration-color: var(--ids-yellow); text-underline-offset: 3px; }
.cs-stage:not([data-step="2"]) .ids-side { opacity: 0; transform: translateX(10px); }

/* Escena 3: ciclo con notas pegadas */
.ids-board-t { margin: 0; font-style: italic; font-weight: 600; font-size: .95rem; color: var(--ids-yellow); }
.ids-board-t--ink { color: var(--ink); }
.ids-loop { position: absolute; left: 50%; top: 54%; width: 46%; translate: -50% -50%; overflow: visible; }
.ids-loop circle, .ids-loop path { fill: none; stroke: var(--ids-chalk); stroke-width: 2; stroke-linecap: round; }
.ids-loop circle { stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.4s ease; }
.cs-stage[data-step="3"] .ids-loop circle { stroke-dashoffset: 0; }
.ids-note { position: absolute; width: 26%; padding: 7px 8px; border-radius: 3px; font-size: .74rem; font-weight: 600; line-height: 1.25; text-align: center; color: var(--ids-note-ink); background: var(--ids-note); box-shadow: 0 6px 12px -6px rgba(0, 0, 0, .5); transition: opacity .4s, transform .5s cubic-bezier(.2, .8, .2, 1); }
.ids-note.n1 { left: 37%; top: 17%; rotate: -2deg; }
.ids-note.n2 { right: 5%; top: 30%; rotate: 3deg; transition-delay: .15s; }
.ids-note.n3 { right: 5%; top: 64%; rotate: -2deg; transition-delay: .3s; }
.ids-note.n4 { left: 37%; bottom: 6%; rotate: 2deg; transition-delay: .45s; background: #ffd6da; }
.ids-note.n5 { left: 5%; top: 64%; rotate: -3deg; transition-delay: .6s; }
.ids-note.n6 { left: 5%; top: 30%; rotate: 2deg; transition-delay: .75s; background: #cdeefc; }
.cs-stage:not([data-step="3"]) .ids-note { opacity: 0; transform: translateY(-14px) scale(.9); }
.ids-center { position: absolute; left: 50%; top: 54%; translate: -50% -50%; width: 30%; text-align: center; font-size: .78rem; font-style: italic; line-height: 1.3; color: var(--ids-chalk); --d: .9s; }
.ids-center b { color: var(--ids-yellow); }
.cs-stage:not([data-step="3"]) .ids-center { opacity: 0; }

/* Escena 4: tarjetas fijadas */
.ids-cases { position: absolute; left: 6%; right: 6%; top: 18%; bottom: 7%; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.ids-cases .c { position: relative; display: grid; align-content: start; gap: 6px; padding: 18px 14px 12px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 20px -14px rgba(16, 42, 67, .5); font-size: .86rem; font-weight: 600; line-height: 1.35; transition: opacity .5s, transform .6s cubic-bezier(.2, .8, .2, 1); }
.ids-cases .c::before { content: ""; position: absolute; left: 50%; top: -6px; width: 14px; height: 14px; translate: -50% 0; border-radius: 50%; background: #d94b4b; box-shadow: 0 2px 3px rgba(0, 0, 0, .35); }
.ids-cases .c2::before { background: var(--teal); } .ids-cases .c3::before { background: #e0a92e; } .ids-cases .c4::before { background: var(--accent); }
.ids-cases small { font-family: var(--f-data); font-weight: 400; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.ids-cases .c1 { rotate: -1.5deg; } .ids-cases .c2 { rotate: 1.5deg; transition-delay: .1s; } .ids-cases .c3 { rotate: 1deg; transition-delay: .2s; } .ids-cases .c4 { rotate: -1deg; transition-delay: .3s; }
.cs-stage:not([data-step="4"]) .ids-cases .c { opacity: 0; transform: translateY(-20px); }

/* Escena 5: Venn */
.ids-venn { position: absolute; left: 50%; top: 52%; width: 64%; translate: -50% -50%; overflow: visible; }
.ids-venn circle { fill-opacity: .14; stroke-width: 2; transition: opacity .6s, transform .8s cubic-bezier(.2, .8, .2, 1); transform-origin: 150px 110px; }
.ids-venn .v1 { fill: var(--ids-yellow); stroke: var(--ids-yellow); } .ids-venn .v2 { fill: var(--ids-blue); stroke: var(--ids-blue); transition-delay: .12s; } .ids-venn .v3 { fill: var(--ids-pink); stroke: var(--ids-pink); transition-delay: .24s; }
.cs-stage:not([data-step="5"]) .ids-venn circle { opacity: 0; transform: scale(.6); }
.ids-vl { position: absolute; font-style: italic; font-weight: 600; font-size: .8rem; line-height: 1.2; transition: opacity .5s .5s; }
.ids-vl.l1 { left: 6%; top: 22%; width: 22%; color: var(--ids-yellow); }
.ids-vl.l2 { right: 6%; top: 24%; color: var(--ids-blue); }
.ids-vl.l3 { left: 50%; bottom: 7%; translate: -50% 0; color: var(--ids-pink); }
.ids-vc { position: absolute; left: 50%; top: 47%; translate: -50% -50%; text-align: center; font-family: var(--f-display); font-weight: 700; font-size: .86rem; line-height: 1.1; color: #fff; --d: .8s; }
.cs-stage:not([data-step="5"]) .ids-vl, .cs-stage:not([data-step="5"]) .ids-vc { opacity: 0; }
.ids-ok { position: absolute; right: 6%; top: 7%; margin: 0; padding: 6px 12px; border-radius: 999px; font-size: .78rem; font-weight: 600; color: var(--ids-board); background: var(--ids-chalk); --d: 1s; }
.cs-stage:not([data-step="5"]) .ids-ok { opacity: 0; transform: translateY(-8px); }

/* ---------- Programa ---------- */
.c-introduccion-data-science .unit-n { font-style: italic; text-transform: none; letter-spacing: .02em; font-family: var(--f-body); font-weight: 600; }
.c-introduccion-data-science .unit-grid { grid-auto-flow: dense; }
.c-introduccion-data-science .ids-unit-ia { background: var(--ids-board); border-color: transparent; color: var(--ids-chalk); }
.c-introduccion-data-science .ids-unit-ia h3 { color: #fff; font-size: 1.5rem; }
.c-introduccion-data-science .ids-unit-ia ul { color: var(--ids-chalk); font-size: 1.05rem; }
.c-introduccion-data-science .ids-unit-ia .unit-n { color: var(--ids-yellow); }
.c-introduccion-data-science .ids-unit-ia li::before { background: var(--ids-yellow); }
.c-introduccion-data-science .ids-unit-ia .ai-tag { color: #3b2a7a; background: #e4dcff; }
.ids-dots { grid-template-columns: repeat(4, 34px); gap: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .ids-hand { left: -8px; max-width: 230px; font-size: .8rem; }
}
@media (max-width: 560px) {
  .ids-stage { font-size: .74rem; }
  .ids-hand { bottom: -18px; max-width: 210px; font-size: .74rem; padding: 9px 12px; }
  .ids-chalk { right: -4px; }
  .ids-people { top: 14%; bottom: 28%; gap: 4px; }
  .ids-people i { width: 32px; height: 32px; font-size: .64rem; }
  .ids-b { font-size: .6rem; padding: 5px 5px; }
  .ids-q { font-size: .74rem; padding: 7px 10px; bottom: 5%; }
  .ids-tag { font-size: .66rem; } .ids-tag.tg1 { top: 18%; }
  .ids-side { font-size: .62rem; width: 28%; right: 3%; }
  .ids-board-t { font-size: .74rem; }
  .ids-note { font-size: .56rem; padding: 4px 4px; width: 27%; }
  .ids-center { font-size: .6rem; }
  .ids-loop { width: 44%; }
  .ids-cases { gap: 8px; top: 16%; } .ids-cases .c { padding: 12px 9px 8px; font-size: .66rem; gap: 3px; } .ids-cases small { font-size: .54rem; }
  .ids-vl { font-size: .6rem; } .ids-vc { font-size: .64rem; } .ids-ok { font-size: .6rem; padding: 4px 8px; top: 5%; }
  .ids-venn { width: 58%; }
}
@media (prefers-reduced-motion: reduce) {
  .ids-hand, .ids-hand-ico, .ids-chalk { animation: none !important; }
  .ids-rings ellipse, .ids-loop circle, .ids-note, .ids-cases .c, .ids-venn circle, .ids-people .p, .ids-tag, .ids-vl { transition: none !important; }
}
