/* ============================================================
   KOI COMUNICACIÓN — futuro.css
   Estilos de la presentación "El futuro de KOI" (scrollytelling +
   modo presentación). Depende de tokens.css + styles.css.
   ============================================================ */

/* La presentación vive sobre fondo oscuro (cinematográfico) en ambos temas.
   Regla del manual: sobre negro, la marca vive en VERDE y BLANCO (nunca azul). */
.deck {
  background:
    radial-gradient(1000px 680px at 85% -8%, rgba(90,249,85,.09), transparent 62%),
    radial-gradient(820px 600px at -10% 104%, rgba(226,5,111,.10), transparent 62%),
    linear-gradient(150deg, #261E3D 0%, #241E2F 50%, var(--negro) 100%);
  color: #fff; position: relative;
}

/* Barra de progreso de la presentación */
.deck-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 130; background: var(--grad-verde); box-shadow: 0 0 14px rgba(90,249,85,.55); transition: width .4s var(--ease); }

/* Capítulo = pantalla completa */
.fchapter {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  padding: clamp(4.5rem, 10vh, 8rem) 0; overflow: hidden; isolation: isolate;
  scroll-margin-top: 0;
}
.fchapter__inner { position: relative; z-index: 2; max-width: 62rem; }
.fchapter--center .fchapter__inner { margin-inline: auto; text-align: center; }

/* Fondo por capítulo: blobs de color + patrón */
.fchapter__bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.fchapter__blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; mix-blend-mode: screen; animation: fBlob 22s var(--ease) infinite; }
@keyframes fBlob { 0%,100%{ transform: translate(0,0) scale(1);} 50%{ transform: translate(5%,-4%) scale(1.12);} }
.fchapter__grid { position: absolute; inset: 0; opacity: .4; background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size: 34px 34px; mask-image: radial-gradient(120% 80% at 50% 40%, #000 40%, transparent 75%); }
@media (prefers-reduced-motion: reduce) { .fchapter__blob { animation: none; } }

/* Tipografía cinematográfica */
.fkicker { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 500; font-size: .82rem; letter-spacing: .16em; text-transform: uppercase; color: var(--verde); background: rgba(90,249,85,.12); border: 1px solid rgba(90,249,85,.3); padding: .45rem 1rem; border-radius: var(--r-pill); margin-bottom: 1.4rem; }
.fnum { font-family: var(--font-display); font-weight: 700; font-size: .9rem; color: rgba(255,255,255,.45); letter-spacing: .1em; display: block; margin-bottom: .6rem; }
.ftitle { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 6vw, 5rem); line-height: 1.02; letter-spacing: -.03em; margin: 0 0 1.2rem; }
/* Highlights sobre oscuro: sólidos en verde (marca) y rosa (pop puntual) */
.ftitle .g { color: var(--verde); }
.ftitle .w { color: var(--rosa); }
.ftitle .v { color: var(--verde); }
.flead { font-size: clamp(1.15rem, 1.9vw, 1.5rem); line-height: 1.55; color: rgba(255,255,255,.86); max-width: 46ch; }
.fchapter--center .flead { margin-inline: auto; }
.fstat { font-family: var(--font-display); font-weight: 700; font-size: clamp(3rem, 9vw, 7rem); line-height: 1; color: var(--verde); }
.fstat__label { color: rgba(255,255,255,.75); font-size: 1.05rem; margin-top: .4rem; }
.fcta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }
.fchapter--center .fcta { justify-content: center; }

/* Grid de tarjetas dentro de un capítulo (servicios / fases) */
.fgrid { display: grid; gap: 1rem; margin-top: 2rem; }
.fgrid--3 { grid-template-columns: repeat(3, 1fr); }
.fgrid--4 { grid-template-columns: repeat(4, 1fr); }
.fcard { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: var(--r-lg); padding: 1.4rem; text-align: left; transition: transform .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease); text-decoration: none; color: #fff; }
.fcard:hover { transform: translateY(-6px); background: rgba(90,249,85,.1); border-color: var(--verde); }
.fcard__ico { width: 46px; height: 46px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--grad-verde); color: var(--negro); margin-bottom: .9rem; }
.fcard__ico svg { width: 24px; height: 24px; }
.fcard h3 { font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 .3rem; }
.fcard p { font-size: .95rem; color: rgba(255,255,255,.78); margin: 0; }
@media (max-width: 860px) { .fgrid--3, .fgrid--4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .fgrid--3, .fgrid--4 { grid-template-columns: 1fr; } }

/* Lista de fases / timeline vertical */
.fsteps { display: grid; gap: 1rem; margin-top: 2rem; }
.fstep { display: flex; gap: 1.1rem; align-items: flex-start; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: var(--r-md); padding: 1.1rem 1.3rem; }
.fstep__n { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; background: var(--grad-verde); color: var(--negro); }
.fstep h3 { font-family: var(--font-display); font-size: 1.1rem; margin: 0 0 .2rem; }
.fstep p { margin: 0; color: rgba(255,255,255,.78); font-size: .95rem; }

/* Reveal dentro de la presentación */
.fchapter [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.fchapter.is-active [data-reveal] { opacity: 1; transform: none; }

/* Navegación por puntos (fija a la derecha) */
.fdots { position: fixed; right: clamp(10px, 2vw, 22px); top: 50%; transform: translateY(-50%); z-index: 120; display: flex; flex-direction: column; gap: .7rem; }
.fdot { width: 11px; height: 11px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); background: transparent; cursor: pointer; padding: 0; transition: all .25s var(--ease); }
.fdot:hover { border-color: #fff; transform: scale(1.2); }
.fdot.is-active { background: var(--verde); border-color: transparent; box-shadow: 0 0 12px rgba(90,249,85,.6); }
@media (max-width: 640px) { .fdots { display: none; } }

/* Botón "Modo presentación" + flechas */
.deck-controls { position: fixed; bottom: clamp(14px, 3vw, 26px); left: 50%; transform: translateX(-50%); z-index: 120; display: flex; align-items: center; gap: .6rem; background: rgba(34,30,34,.72); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.14); border-radius: var(--r-pill); padding: .4rem .5rem; }
.deck-controls .darrow { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); border: 0; color: #fff; cursor: pointer; transition: background .2s var(--ease); }
.deck-controls .darrow:hover { background: rgba(255,255,255,.18); }
.deck-controls .darrow svg { width: 20px; height: 20px; }
.present-btn { display: inline-flex; align-items: center; gap: .5ch; font-family: var(--font-display); font-weight: 700; font-size: .9rem; color: var(--negro); background: var(--grad-verde); border: 0; border-radius: var(--r-pill); padding: .55rem 1.1rem; cursor: pointer; }
.present-btn svg { width: 18px; height: 18px; }

/* ---- MODO PRESENTACIÓN (pantalla completa, tipo keynote) ---- */
:root.presenting .site-header, :root.presenting .wa-float, :root.presenting .site-footer { display: none !important; }
:root.presenting .deck { height: 100vh; overflow-y: auto; scroll-snap-type: y mandatory; scroll-behavior: smooth; }
:root.presenting .fchapter { height: 100vh; min-height: 100vh; scroll-snap-align: start; scroll-snap-stop: always; }
:root.presenting body { overflow: hidden; }

/* En scroll normal (no presentación) también damos un snap suave y opcional */
.deck { scroll-snap-type: y proximity; }
.fchapter { scroll-snap-align: start; }
@media (prefers-reduced-motion: reduce) { .deck { scroll-snap-type: none; } }
