/* Página: Analytics Awareness (para empresas). Identidad propia: un glosario que se ordena.
   Palabras sueltas que se acomodan en un mapa de conceptos, signo § y versalitas, acento ámbar. */
.c-analytics-awareness { --ak: #a8650a; --ak-soft: #f4c46a; --ak-bg: color-mix(in srgb, #f4c46a 16%, var(--surface)); }
:root[data-theme="dark"] .c-analytics-awareness { --ak: #f2b65c; --ak-soft: #a8650a; --ak-bg: color-mix(in srgb, #f4c46a 10%, var(--surface)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .c-analytics-awareness { --ak: #f2b65c; --ak-soft: #a8650a; --ak-bg: color-mix(in srgb, #f4c46a 10%, var(--surface)); } }

.c-analytics-awareness .c-hero h1 { font-size: clamp(2.1rem, 1.25rem + 2.7vw, 3.4rem); max-width: 18ch; }
.c-analytics-awareness h1 em, .c-analytics-awareness h2 em { color: var(--ak); }
.c-solo-emp { display: inline-block; margin: 0; padding: 4px 0; font-size: .78rem; font-weight: 700; letter-spacing: .08em; font-variant: small-caps; text-transform: lowercase; color: var(--ak); border-bottom: 2px solid var(--ak-soft); }
.c-analytics-awareness .cs-step-n { font-family: Georgia, "Times New Roman", serif; font-size: 1.3rem; font-weight: 700; color: var(--ak); letter-spacing: 0; }
.c-analytics-awareness .unit-n { color: var(--ak); font-variant: small-caps; text-transform: lowercase; letter-spacing: .1em; font-size: .86rem; }

/* ---------- Portada: término que cambia ---------- */
.ak-term { position: absolute; left: -24px; bottom: -26px; display: grid; gap: 4px; padding: 12px 18px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); animation: c-in .8s .5s cubic-bezier(.2, .8, .2, 1) both; }
.ak-term small { font-size: .72rem; color: var(--muted); font-weight: 600; }
.ak-words { display: grid; height: 1.5em; overflow: hidden; font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; color: var(--ak); }
.ak-words span { grid-area: 1 / 1; opacity: 0; transform: translateY(100%); animation: ak-word 12.5s infinite; white-space: nowrap; }
.ak-words span:nth-child(2) { animation-delay: 2.5s; } .ak-words span:nth-child(3) { animation-delay: 5s; } .ak-words span:nth-child(4) { animation-delay: 7.5s; } .ak-words span:nth-child(5) { animation-delay: 10s; }
@keyframes ak-word { 0% { opacity: 0; transform: translateY(100%); } 3%, 17% { opacity: 1; transform: none; } 20%, 100% { opacity: 0; transform: translateY(-100%); } }

/* ---------- Historia ---------- */
.ak-stage { font-size: .86rem; }
.c-analytics-awareness .s1 { background: none; }
.c-analytics-awareness .s2, .c-analytics-awareness .s4 { display: block; }
.c-analytics-awareness .s5 { padding: 7%; }

/* Escena 1: sopa de palabras */
.ak-w { position: absolute; font-family: var(--f-display); font-weight: 700; color: color-mix(in srgb, var(--ink) 75%, transparent); white-space: nowrap; }
.w1 { left: 8%; top: 10%; font-size: 1.9rem; transform: rotate(-6deg); }
.w2 { right: 12%; top: 8%; font-size: 2.4rem; color: var(--ak); --d: .05s; }
.w3 { left: 30%; top: 30%; font-size: 1.4rem; transform: rotate(4deg); --d: .1s; }
.w4 { left: 10%; top: 48%; font-size: 2.1rem; color: var(--accent); --d: .15s; }
.w5 { right: 8%; top: 48%; font-size: 1.2rem; transform: rotate(-3deg); --d: .2s; }
.w6 { left: 38%; top: 60%; font-size: 1rem; color: var(--muted); --d: .25s; }
.w7 { left: 6%; top: 70%; font-size: 1.1rem; color: var(--teal); transform: rotate(5deg); --d: .3s; }
.w8 { right: 10%; top: 30%; font-size: .95rem; color: var(--muted); transform: rotate(8deg); --d: .35s; }
.ak-q { position: absolute; right: 7%; bottom: 7%; max-width: 60%; padding: 10px 14px; border-radius: 14px 14px 4px 14px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: .86rem; --d: .5s; }
.cs-stage:not([data-step="1"]) .s1 .ak-w { opacity: 0; transform: scale(.6); }
.cs-stage:not([data-step="1"]) .s1 .ak-q { opacity: 0; transform: translateY(12px); }

/* Escena 2: mapa de conceptos */
.ak-map { position: absolute; left: 6%; top: 8%; width: 52%; aspect-ratio: 1; }
.ak-ring { position: absolute; border-radius: 50%; display: grid; justify-items: center; align-content: start; transition: transform .7s cubic-bezier(.2, .8, .2, 1), opacity .5s; }
.ak-ring > span { margin-top: 8%; font-size: .72rem; font-weight: 700; text-align: center; line-height: 1.15; max-width: 80%; }
.ak-ring.ia { inset: 0; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 2px solid var(--accent); color: var(--accent); }
.ak-ring.ml { left: 14%; right: 14%; top: 24%; bottom: 4%; background: color-mix(in srgb, var(--teal) 16%, var(--surface)); border: 2px solid var(--teal); color: var(--ink); transition-delay: .15s; }
.ak-ring.dl { left: 22%; right: 22%; top: 34%; bottom: 8%; background: var(--ak-bg); border: 2px solid var(--ak); color: var(--ak); transition-delay: .3s; }
.ak-ring.dl > span { margin-top: 30%; }
.ak-ds { position: absolute; right: -8%; top: 52%; width: 42%; aspect-ratio: 1; border-radius: 50%; border: 2px dashed var(--ak); display: grid; place-items: center; transition: transform .7s .45s cubic-bezier(.2, .8, .2, 1), opacity .5s .45s; }
.ak-ds span { font-size: .7rem; font-weight: 700; color: var(--ak); padding: 2px 6px; border-radius: 6px; background: var(--surface); translate: 18% 10%; }
.ak-side { position: absolute; right: 6%; top: 8%; width: 30%; display: grid; gap: 8px; --d: .4s; }
.ak-def { display: grid; gap: 2px; padding: 8px 10px; border-left: 3px solid var(--ak-soft); background: var(--surface); border-radius: 0 8px 8px 0; font-size: .72rem; line-height: 1.3; }
.ak-def b { font-size: .76rem; } .ak-def span { color: var(--muted); }
.cs-stage:not([data-step="2"]) .ak-ring, .cs-stage:not([data-step="2"]) .ak-ds { transform: scale(.5); opacity: 0; }
.cs-stage:not([data-step="2"]) .s2 .ak-side { opacity: 0; transform: translateX(16px); }

/* Escena 3: fuentes */
.c-analytics-awareness .s3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 10%; }
.ak-src { display: grid; gap: 6px; padding: 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); position: relative; z-index: 1; }
.ak-src small { font-variant: small-caps; text-transform: lowercase; font-weight: 700; letter-spacing: .08em; color: var(--ak); font-size: .86rem; }
.ak-src span { padding: 5px 9px; border-radius: 8px; font-size: .76rem; font-weight: 600; background: var(--surface); border: 1px solid var(--line); }
.ak-src.ext { --d: .2s; }
.ak-org { position: relative; z-index: 1; aspect-ratio: 1; border-radius: 50%; display: grid; place-content: center; text-align: center; gap: 4px; padding: 10px; background: var(--deep); color: var(--on-deep); border: 2px solid var(--ak-soft); --d: .1s; box-shadow: 0 0 0 10px color-mix(in srgb, var(--ak-soft) 30%, transparent); }
.ak-org b { font-size: .86rem; line-height: 1.15; } .ak-org span { font-size: .66rem; opacity: .75; }
.ak-flow { position: absolute; inset: 0; width: 100%; height: 100%; }
.ak-flow path { stroke: var(--ak); stroke-width: 2; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; animation: c-flow 1.2s linear infinite; }
.cs-stage:not([data-step="3"]) .s3 .ak-src, .cs-stage:not([data-step="3"]) .s3 .ak-org { opacity: 0; transform: scale(.9); }

/* Escena 4: proceso */
.ak-proc { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: p; }
.ak-proc li { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: .84rem; transition: opacity .4s, transform .5s, border-color .4s; }
.ak-proc li b { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; font-size: .72rem; background: var(--ak-bg); color: var(--ak); border: 1.5px solid var(--ak-soft); }
.ak-proc li:nth-child(1) { margin-left: 0; } .ak-proc li:nth-child(2) { margin-left: 4%; transition-delay: .1s; } .ak-proc li:nth-child(3) { margin-left: 8%; transition-delay: .2s; } .ak-proc li:nth-child(4) { margin-left: 12%; transition-delay: .3s; } .ak-proc li:nth-child(5) { margin-left: 16%; transition-delay: .4s; } .ak-proc li:nth-child(6) { margin-left: 20%; transition-delay: .5s; } .ak-proc li:nth-child(7) { margin-left: 24%; transition-delay: .6s; }
.ak-proc .end { background: var(--ak); color: #fff; border-color: var(--ak); }
:root[data-theme="dark"] .ak-proc .end { color: #2a1800; }
.ak-proc .end b { background: #fff; color: var(--ak); border-color: #fff; }
.cs-stage:not([data-step="4"]) .ak-proc li { opacity: 0; transform: translateX(-20px); transition-delay: 0s; }

/* Escena 5: procesos basados en datos */
.c-analytics-awareness .s5 { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 6%; }
.ak-cycle { position: relative; aspect-ratio: 1; }
.ak-cycle svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ak-cycle circle { fill: none; stroke: var(--line); stroke-width: 8; }
.ak-arc { fill: none; stroke: var(--ak); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 210; stroke-dashoffset: 210; transition: stroke-dashoffset 1.4s .3s ease; }
.cs-stage[data-step="5"] .ak-arc { stroke-dashoffset: 0; }
.ak-cycle > span { position: absolute; padding: 4px 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .72rem; font-weight: 600; white-space: nowrap; }
.ak-cycle .c1 { left: 50%; top: 0; translate: -50% 0; } .ak-cycle .c2 { right: -6%; top: 58%; } .ak-cycle .c3 { left: -6%; top: 58%; }
.ak-cycle b { position: absolute; inset: 30%; display: grid; place-content: center; text-align: center; font-size: .7rem; color: var(--muted); line-height: 1.2; }
.ak-cycle b em { font-style: normal; font-family: var(--f-display); font-size: 1.6rem; color: var(--ink); }
.ak-modes { display: grid; gap: 10px; --d: .4s; }
.ak-modes div { display: grid; gap: 2px; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.ak-modes small { font-variant: small-caps; text-transform: lowercase; letter-spacing: .08em; font-weight: 700; font-size: .84rem; color: var(--ak); }
.ak-modes span { font-size: .78rem; color: var(--muted); }
.ak-modes .rt { border-color: var(--ak-soft); }
.ak-modes .rt span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #1a9e5c; animation: ak-pulse 1.4s ease-in-out infinite; }
@keyframes ak-pulse { 50% { opacity: .2; } }
.cs-stage:not([data-step="5"]) .s5 .ak-cycle, .cs-stage:not([data-step="5"]) .s5 .ak-modes { opacity: 0; transform: translateY(14px); }

/* ---------- Programa y recorrido ---------- */
.ak-units { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.c-analytics-awareness .unit li::before { background: var(--ak-soft); }
.c-analytics-awareness .gain-list span { -webkit-text-stroke-color: var(--ak); }
.ak-road { grid-template-columns: 1.3fr 1fr 1fr; }
.ak-dots { display: flex; gap: 6px; margin-bottom: 6px; }
.ak-dots i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); transition: background-color .3s, border-color .3s; }
.road-leg.on .ak-dots i { background: var(--ak); border-color: var(--ak); }
.road-leg.on .ak-dots i:nth-child(n+4) { transition-delay: .15s; }

@media (max-width: 1000px) { .ak-units { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .ak-term { left: -8px; bottom: -22px; }
  .ak-road { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .ak-units { grid-template-columns: minmax(0, 1fr); }
  .ak-stage { font-size: .72rem; }
  .ak-words { font-size: .98rem; } .ak-term { padding: 9px 14px 10px; }
  .w1 { font-size: 1.3rem; } .w2 { font-size: 1.6rem; } .w3 { font-size: 1rem; left: 26%; } .w4 { font-size: 1.4rem; } .w5 { font-size: .9rem; } .w6 { font-size: .78rem; } .w7 { font-size: .84rem; } .w8 { font-size: .72rem; }
  .ak-q { font-size: .68rem; padding: 6px 10px; max-width: 72%; bottom: 5%; }
  .ak-map { width: 50%; left: 4%; top: 6%; } .ak-ring > span { font-size: .52rem; } .ak-ds span { font-size: .52rem; }
  .ak-side { width: 36%; right: 4%; top: 6%; gap: 4px; } .ak-def { padding: 4px 6px; font-size: .54rem; } .ak-def b { font-size: .58rem; }
  .c-analytics-awareness .s3 { gap: 5%; } .ak-src { padding: 6px; gap: 3px; } .ak-src small { font-size: .66rem; } .ak-src span { font-size: .56rem; padding: 3px 5px; }
  .ak-org b { font-size: .62rem; } .ak-org span { font-size: .5rem; } .ak-org { padding: 4px; box-shadow: 0 0 0 5px color-mix(in srgb, var(--ak-soft) 30%, transparent); }
  .ak-proc { gap: 3px; } .ak-proc li { padding: 3px 8px; font-size: .64rem; gap: 6px; } .ak-proc li b { width: 17px; height: 17px; font-size: .56rem; }
  .ak-cycle > span { font-size: .54rem; padding: 2px 6px; } .ak-cycle b { font-size: .52rem; } .ak-cycle b em { font-size: 1.05rem; }
  .ak-modes { gap: 5px; } .ak-modes div { padding: 6px 8px; } .ak-modes small { font-size: .66rem; } .ak-modes span { font-size: .6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ak-term, .ak-modes .rt span::before, .ak-flow path { animation: none !important; }
  .ak-words span { animation: none !important; }
  .ak-words span:first-child { opacity: 1; transform: none; }
  .ak-ring, .ak-ds, .ak-proc li, .ak-arc, .ak-dots i { transition: none !important; }
}
