/* Portada de kodyrastudio.com: hero con luces y portadas en movimiento, cifras, canales apilados, cinta, apps y llamada final.
   Sobre /styles.css. Las animaciones de aparición solo se activan con JS (html.js) y se quitan con prefers-reduced-motion. */
body.home { background: #07080C; overflow-x: clip; }
.kicker { text-transform: uppercase; letter-spacing: .18em; font-size: 13px; font-weight: 700; color: var(--muted); margin: 0 0 18px; }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head h2, .how h2, .final h2 { font-size: clamp(32px, 5vw, 58px); line-height: 1.04; letter-spacing: -1.6px; margin: 0 0 16px; text-wrap: balance; }
.section-head p { color: var(--muted); font-size: 19px; margin: 0; max-width: 60ch; }

/* Botones */
.b { display: inline-flex; align-items: center; gap: 8px; padding: 15px 24px; border-radius: 999px; font-weight: 700; text-decoration: none; transition: transform .2s ease, background .2s, box-shadow .2s; }
.b:hover { transform: translateY(-2px); }
.b-main { background: #F2F4F8; color: #07080C; box-shadow: 0 10px 40px -12px rgba(255,255,255,.45); }
.b-ghost { color: var(--text); border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.04); backdrop-filter: blur(6px); }
.b-ghost:hover { background: rgba(255,255,255,.1); }

/* Cabecera fija */
.nav { background: linear-gradient(rgba(7,8,12,.75), transparent); position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; gap: 24px; min-height: var(--alto-cab); padding: 0 max(16px, calc((100% - var(--ancho-web)) / 2 + 16px)); transition: background .3s, border-color .3s, backdrop-filter .3s; border-bottom: 1px solid transparent; }
.nav.solid { background: rgba(7,8,12,.72); backdrop-filter: blur(14px); border-color: rgba(255,255,255,.08); }
.nav .logo { margin-right: auto; }
.nav-links { display: flex; gap: 22px; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav-links a:hover { color: var(--text); }
@media (max-width: 640px) { .nav-links { display: none; } }

/* Hero */
.hero2 { position: relative; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); align-items: center; gap: 48px;
  padding: 110px max(16px, calc((100vw - 1160px) / 2 + 16px)) 90px; overflow: hidden; isolation: isolate; }
.aurora { position: absolute; inset: -20%; z-index: -1; filter: blur(70px) saturate(130%); opacity: .55; }
.aurora i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; mix-blend-mode: screen; animation: flotar 22s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { background: #7C5CFF; left: 0; top: 5%; }
.aurora i:nth-child(2) { background: #2EE6D6; right: 0; top: 0; animation-duration: 26s; animation-delay: -6s; }
.aurora i:nth-child(3) { background: #C0562F; left: 25%; bottom: -10%; animation-duration: 30s; animation-delay: -12s; }
.aurora i:nth-child(4) { background: #F2B705; right: 15%; bottom: 0; width: 30vmax; height: 30vmax; animation-duration: 24s; animation-delay: -3s; opacity: .7; }
.aurora i:nth-child(5) { background: #3DDC84; left: 40%; top: 20%; width: 26vmax; height: 26vmax; animation-duration: 28s; animation-delay: -9s; opacity: .6; }
@keyframes flotar { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(8vw, -6vh) scale(1.15); } 100% { transform: translate(-6vw, 8vh) scale(.9); } }
.hero2::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 30% 50%, transparent 0, rgba(7,8,12,.55) 60%, #07080C 100%); }
.hero-text h1 { font-size: clamp(42px, 5.4vw, 84px); line-height: .96; letter-spacing: -.045em; margin: 0 0 26px; font-weight: 800; }
.hero-text h1 > span { display: block; }
.h1b { color: rgba(242,244,248,.55); }
.rot { position: relative; display: block; height: 1.12em; overflow: hidden; }
.rot-w { position: absolute; left: 0; top: 0; white-space: nowrap; transform: translateY(130%); opacity: 0;
  background: linear-gradient(90deg, #7C5CFF, #2EE6D6 35%, #F2B705 70%, #FF7A59); -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: transform .8s cubic-bezier(.2,.8,.2,1), opacity .8s; padding-bottom: .08em; }
.rot-w.on { transform: none; opacity: 1; }
.rot-w.off { transform: translateY(-130%); opacity: 0; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: rgba(242,244,248,.78); max-width: 52ch; margin: 0 0 34px; text-wrap: pretty; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
/* En móvil, los dos botones del principio en la misma fila, a partes iguales (en pantallas muy estrechas el texto parte línea dentro del botón) */
@media (max-width: 520px) { .hero-cta { flex-wrap: nowrap; } .hero-cta .b { flex: 1 1 0; min-width: 0; justify-content: center; text-align: center; padding: 14px 12px; font-size: 15px; } }

/* Columnas de portadas que se deslizan */
.hero-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; height: 120vh; margin: -10vh 0; transform: rotate(-8deg);
  -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent); }
.hero-cols .col { display: flex; flex-direction: column; gap: 14px; animation: subir 46s linear infinite; }
.hero-cols .col1 { animation-direction: reverse; animation-duration: 54s; }
.hero-cols .col2 { animation-duration: 40s; }
.hero-cols img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 16px; box-shadow: 0 20px 50px -20px rgba(0,0,0,.8); }
@keyframes subir { to { transform: translateY(calc(-50% - 7px)); } }
.scroll-cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--muted); font-size: 13px; text-decoration: none; letter-spacing: .1em; text-transform: uppercase; }
.scroll-cue i { width: 1px; height: 44px; background: linear-gradient(var(--muted), transparent); animation: gota 2s ease-in-out infinite; transform-origin: top; }
@keyframes gota { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 860px) {
  .hero2 { grid-template-columns: 1fr; padding-top: 96px; padding-bottom: 110px; }
  .hero-cols { height: 300px; margin: 8px -16px 0; transform: rotate(-6deg) scale(1.1); grid-template-columns: repeat(3, 1fr); }
  .scroll-cue { display: none; }
}

/* Cifras */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 90px 16px 110px; }
.stat { border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; }
.stat b { display: block; font-size: clamp(56px, 9vw, 120px); line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff, rgba(255,255,255,.45)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { display: block; margin-top: 10px; color: var(--muted); font-size: 17px; }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; gap: 28px; padding: 60px 16px 80px; } }

/* Canales apilados */
.channels2 { padding-bottom: 20px; }
.stack { display: grid; gap: 0; }
.ch { --ch-bg: #151922; --ch-ink: #F2F4F8; --ch-accent: #4F8CFF;
  position: sticky; top: var(--ch-top, calc(88px + var(--i) * 18px)); margin-bottom: 9vh; min-height: min(560px, 78vh);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 32px; padding: clamp(28px, 4vw, 56px);
  border-radius: 34px; background: var(--ch-bg); color: var(--ch-ink); text-decoration: none; overflow: hidden;
  box-shadow: 0 -20px 60px -30px rgba(0,0,0,.8), inset 0 0 0 1px color-mix(in srgb, var(--ch-ink) 10%, transparent); }
.ch::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 400px at 100% 0%, color-mix(in srgb, var(--ch-accent) 16%, transparent), transparent 70%); pointer-events: none; }
.ch:last-child { margin-bottom: 0; }
.ch > * { position: relative; }
.ch-id { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.ch-id img { border-radius: 50%; box-shadow: 0 0 0 3px var(--ch-bg), 0 0 0 5px var(--ch-accent); }
.ch-id strong { display: block; font-size: 17px; }
.ch-id span { font-size: 14px; opacity: .65; }
.ch h3 { font-size: clamp(30px, 4vw, 52px); line-height: 1.02; letter-spacing: -.035em; margin: 0 0 16px; text-wrap: balance; }
.ch p { font-size: 18px; opacity: .78; margin: 0 0 28px; max-width: 42ch; }
.ch-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.ch-count b { font-size: 34px; letter-spacing: -.03em; color: var(--ch-accent); margin-right: 4px; }
.ch-count { opacity: .9; }
.ch-cta { display: inline-flex; padding: 12px 20px; border-radius: 999px; background: var(--ch-accent); color: var(--ch-bg); font-weight: 800; transition: transform .2s; }
.ch:hover .ch-cta { transform: translateX(4px); }
.ch-covers { position: relative; height: 100%; min-height: 380px; }
.ch-covers .cv { position: absolute; top: 50%; left: 50%; width: min(48%, 230px); height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 18px;
  box-shadow: 0 30px 60px -24px rgba(0,0,0,.65); transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.ch-covers .cv0 { transform: translate(-50%, -50%) rotate(0); z-index: 3; }
.ch-covers .cv1 { transform: translate(-105%, -46%) rotate(-9deg); z-index: 2; }
.ch-covers .cv2 { transform: translate(5%, -46%) rotate(9deg); z-index: 1; }
.ch:hover .cv1 { transform: translate(-118%, -48%) rotate(-12deg); }
.ch:hover .cv2 { transform: translate(18%, -48%) rotate(12deg); }
@media (max-width: 860px) {
  .ch { grid-template-columns: 1fr; top: var(--ch-top, calc(70px + var(--i) * 10px)); min-height: 0; gap: 8px; margin-bottom: 24px; padding: 22px 20px; border-radius: 26px; }
  .ch-id { margin-bottom: 14px; }
  .ch h3 { font-size: clamp(25px, 7.4vw, 40px); margin-bottom: 10px; }
  .ch p { font-size: 16px; margin-bottom: 16px; }
  .ch-count b { font-size: 26px; }
  .ch-cta { padding: 9px 16px; }
  .ch { container-type: inline-size; }
  .ch-covers { --cv-w: min(38cqw, 30svh); min-height: calc(var(--cv-w) * 1.25 + 40px); margin-top: 6px; }
  .ch-covers .cv { width: var(--cv-w); }
}
/* Al irse tapando, cada panel se aleja un poco (donde el navegador lo permite) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .ch { animation: alejar linear both; animation-timeline: view(); animation-range: exit 10% exit 90%; }
    @keyframes alejar { to { transform: scale(.92); filter: brightness(.6); } }
  }
}

/* Cinta de portadas */
.latest { padding: 70px 0 120px; }
@media (max-width: 860px) { .channels2 { padding-bottom: 0; } .latest { padding-top: 40px; } }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 16px; width: max-content; animation: cinta 80s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee img { width: 210px; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 16px; }
@keyframes cinta { to { transform: translateX(calc(-50% - 8px)); } }

/* Apps propias */
.apps2 { padding: 40px 16px 110px; }
.products { display: grid; gap: 18px; }
.product { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: clamp(24px, 5vw, 64px); padding: clamp(22px, 3vw, 40px) clamp(28px, 5vw, 64px);
  border-radius: 34px; text-decoration: none; color: inherit; overflow: hidden;
  background: radial-gradient(800px 400px at 0% 50%, rgba(79,140,255,.22), transparent 70%), #10131B; border: 1px solid rgba(255,255,255,.08); }
.product-icon { position: relative; }
.product-icon::before { content: ""; position: absolute; inset: -30%; border-radius: 50%; background: radial-gradient(rgba(79,140,255,.45), transparent 65%); animation: latir 3s ease-in-out infinite; }
@keyframes latir { 50% { transform: scale(1.12); opacity: .6; } }
.product-icon img { position: relative; width: clamp(96px, 14vw, 150px); height: auto; border-radius: 32px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.8); }
.product h3 { font-size: clamp(32px, 4.4vw, 56px); letter-spacing: -.035em; margin: 0 0 8px; }
.product p { color: var(--muted); font-size: 19px; margin: 0 0 16px; max-width: 46ch; }
.product .more { font-weight: 700; color: #7FB0FF; }
.product.soon .more { color: var(--subtle); }
@media (max-width: 640px) { .product { grid-template-columns: 1fr; text-align: center; justify-items: center; } }

/* Cómo trabajamos */
.how { padding: 40px 16px 120px; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
.how-item { padding: 30px; border-radius: 26px; background: #10131B; border: 1px solid rgba(255,255,255,.07); }
.how-item .n { font-size: 15px; font-weight: 800; letter-spacing: .1em; background: linear-gradient(90deg, #7C5CFF, #2EE6D6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.how-item h3 { font-size: 23px; margin: 14px 0 10px; letter-spacing: -.02em; }
.how-item p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .how-grid { grid-template-columns: 1fr; } }

/* Llamada final */
.final { text-align: center; margin-bottom: clamp(56px, 8vw, 90px); padding: clamp(28px, 4vw, 44px) 24px; border-radius: 32px; position: relative; overflow: hidden; isolation: isolate;
  background: #0D0F16; border: 1px solid rgba(255,255,255,.08); }
.final::before { content: ""; position: absolute; inset: -40%; z-index: -1; opacity: .5; filter: blur(60px);
  background: conic-gradient(from 0deg, #7C5CFF, #2EE6D6, #3DDC84, #F2B705, #C0562F, #7C5CFF); animation: girar 18s linear infinite; }
.final::after { content: ""; position: absolute; inset: 1px; z-index: -1; border-radius: 31px; background: rgba(9,10,15,.82); }
@keyframes girar { to { transform: rotate(1turn); } }
.final h2 { font-size: clamp(24px, 3vw, 34px); margin: 0 0 8px; letter-spacing: -.02em; }
.final p { color: rgba(242,244,248,.78); font-size: 17px; margin: 0 auto 18px; max-width: 46ch; }
.home footer.bottom { margin-top: 0; padding-left: 16px; padding-right: 16px; } /* aquí el pie es el propio .wrap: su padding lateral lo pisaba footer.bottom */

/* Aparición al hacer scroll (solo con JS) */
.js [data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity .9s ease var(--d, 0s), transform .9s cubic-bezier(.2,.8,.2,1) var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js .ch .ch-info > *, .js .ch .ch-covers { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.js .ch.is-in .ch-info > *, .js .ch.is-in .ch-covers { opacity: 1; transform: none; }
.js .ch.is-in .ch-info > :nth-child(2) { transition-delay: .08s; } .js .ch.is-in .ch-info > :nth-child(3) { transition-delay: .16s; }
.js .ch.is-in .ch-info > :nth-child(4) { transition-delay: .24s; } .js .ch.is-in .ch-covers { transition-delay: .2s; }
.hero-text > * { animation: entrar 1s cubic-bezier(.2,.8,.2,1) both; }
.hero-text > :nth-child(2) { animation-delay: .1s; } .hero-text > :nth-child(3) { animation-delay: .25s; } .hero-text > :nth-child(4) { animation-delay: .4s; }
.hero-cols { animation: aparecer 1.6s ease .3s both; }
@keyframes entrar { from { opacity: 0; transform: translateY(30px); } }
@keyframes aparecer { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .aurora i, .hero-cols .col, .marquee-track, .scroll-cue i, .final::before, .product-icon::before, .hero-text > *, .hero-cols { animation: none !important; }
  .js [data-reveal], .js .ch .ch-info > *, .js .ch .ch-covers { opacity: 1; transform: none; transition: none; }
  .marquee { overflow-x: auto; }
}

/* Pausar el movimiento (WCAG 2.2.2): discreto, abajo a la derecha, bajo las columnas de portadas */
.pausa { position: absolute; right: max(16px, calc((100vw - 1160px) / 2 + 16px)); bottom: 22px; z-index: 2; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: rgba(7,8,12,.7); color: #C9CFDB; cursor: pointer; }
.pausa:hover { color: var(--text); background: rgba(7,8,12,.92); }
.pausa:focus-visible { color: var(--text); outline: 2px solid var(--text); outline-offset: 2px; }
.pausa-tx { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pausa-ic { width: 7px; height: 9px; border-left: 2px solid currentColor; border-right: 2px solid currentColor; }
.pausa[aria-pressed="true"] .pausa-ic { width: 0; height: 0; border: 0; border-left: 8px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; margin-left: 2px; }
.parado *, .parado *::before, .parado *::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) { .pausa { display: none; } }

/* Móvil: el logo y los idiomas caben hasta en 320 px; las tarjetas se apilan también aquí (si una no cabe, el script de la portada la deja subir hasta verla entera) */
@media (max-width: 400px) { .nav { gap: 8px; } .nav .logo svg { height: 1.05em !important; } .nav .langs button { padding: 4px 6px; min-width: 32px; } }
@media (max-width: 860px) and (max-height: 760px) { html:not(.js) .ch { position: relative; top: auto; margin-bottom: 16px; } }

/* Las cabeceras de sección, alineadas con el resto de la página */
.section-head.wrap { max-width: var(--ancho-web); margin-left: auto; margin-right: auto; }
.section-head.wrap > * { max-width: 760px; }
