/* Gamoras · Escuela del espacio — cinematic, photography first. */
:root {
  --bg: #04060d;
  --bg2: #080c18;
  --card: #0d1324;
  --card2: #141b31;
  --line: rgba(190, 210, 255, 0.12);
  --line2: rgba(190, 210, 255, 0.22);
  --ink: #eef2fb;
  --ink2: #b9c2da;
  --muted: #7f8aa8;
  --accent: #ff8a3d;
  --accent2: #ffb27a;
  --sky: #7cc4ff;
  --ninos: #ffc35c;
  --principiante: #5ccfff;
  --experto: #b997ff;
  --lv: var(--accent);
  --r: 14px;
  --head: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --wrap: 1240px;
  color-scheme: dark;
}
.nivel-ninos { --lv: var(--ninos); }
.nivel-principiante { --lv: var(--principiante); }
.nivel-experto { --lv: var(--experto); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.7 var(--body); min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
main { flex: 1; }
a { color: var(--sky); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #b8dfff; }
img, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.1; letter-spacing: -0.02em; color: #fff; font-weight: 600; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.6rem); margin: 0.15em 0 0.3em; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.2rem); margin: 2.2em 0 0.6em; }
h3 { font-size: 1.25rem; margin: 1.7em 0 0.5em; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; color: #000; padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.kicker { display: block; margin: 0; color: var(--accent2); font: 600 0.74rem/1.4 var(--body); letter-spacing: 0.16em; text-transform: uppercase; }
.credit, .credit a { color: #6c7695; font-size: 0.78rem; text-decoration: none; }
.credit a:hover { color: var(--ink2); text-decoration: underline; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 30; background: rgba(4, 6, 13, 0.78); backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--line); transition: background 0.3s, border-color 0.3s; }
.has-hero .top { position: fixed; left: 0; right: 0; background: linear-gradient(rgba(4, 6, 13, 0.55), transparent); backdrop-filter: none; border-color: transparent; }
.has-hero .top.solid { background: rgba(4, 6, 13, 0.85); backdrop-filter: blur(14px) saturate(140%); border-color: var(--line); }
.top__in { max-width: var(--wrap); margin: 0 auto; padding: 12px 22px; display: flex; align-items: center; gap: 20px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.logo__txt { font: 600 1.2rem/1 var(--head); display: flex; flex-direction: column; letter-spacing: -0.01em; }
.logo__txt small { font: 500 0.64rem/1.5 var(--body); color: var(--ink2); letter-spacing: 0.14em; text-transform: uppercase; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav > a { color: var(--ink2); text-decoration: none; padding: 8px 13px; font-weight: 500; font-size: 0.95rem; border-radius: 8px; }
.nav > a:hover, .nav > a.on { color: #fff; }
.nav > a.on { box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.lvsw { display: inline-flex; margin-left: 14px; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); }
.lvsw .lv { color: var(--ink2); text-decoration: none; font-size: 0.84rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; }
.lvsw .lv:hover { color: #fff; }
.lvsw .lv.on { color: #05070f; }
.lv--ninos.on { background: var(--ninos); }
.lv--principiante.on { background: var(--principiante); }
.lv--experto.on { background: var(--experto); }
.langsw { position: relative; margin-left: 8px; }
.langsw summary { list-style: none; cursor: pointer; display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); }
.langsw summary::-webkit-details-marker { display: none; }
.langsw .lg { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; padding: 6px 11px; border-radius: 999px; background: #fff; color: #05070f; }
.langsw .lg::after { content: ''; display: inline-block; margin-left: 6px; border: 4px solid transparent; border-top-color: currentColor; transform: translateY(2px); }
.langsw__list { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; display: grid; grid-template-columns: repeat(3, minmax(108px, 1fr)); gap: 2px; padding: 8px; border-radius: 14px; background: #0b0f1c; border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6); }
.langsw .lgi { color: var(--ink2); text-decoration: none; font-size: 0.92rem; padding: 8px 10px; border-radius: 8px; white-space: nowrap; }
.langsw a.lgi:hover, .langsw a.lgi:focus-visible { color: #fff; background: rgba(255, 255, 255, 0.08); }
.langsw .lgi.on { color: #fff; font-weight: 700; background: rgba(255, 255, 255, 0.12); }
@media (max-width: 920px) { .langsw { margin: 10px 0 0; } .langsw__list { position: static; margin-top: 8px; grid-template-columns: repeat(2, 1fr); box-shadow: none; } }
.menu-btn { display: none; margin-left: auto; width: 44px; height: 40px; background: transparent; border: 1px solid var(--line2); border-radius: 10px; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.menu-btn span { display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px; }
@media (max-width: 920px) {
  .menu-btn { display: flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: rgba(4, 6, 13, 0.97); padding: 10px 16px 18px; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav > a { padding: 12px 8px; font-size: 1.05rem; }
  .nav > a.on { box-shadow: none; color: var(--accent2); }
  .lvsw { margin: 10px 0 0; justify-content: space-between; }
  .lvsw .lv { flex: 1; text-align: center; padding: 9px 6px; }
}

/* ---------- buttons, chips ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: #05070f; font: 600 0.98rem var(--body); padding: 12px 22px; border-radius: 999px; text-decoration: none; border: 0; cursor: pointer; transition: transform 0.15s, background 0.15s; }
.btn:hover { background: var(--accent2); color: #05070f; transform: translateY(-1px); }
.btn--big { padding: 15px 28px; font-size: 1.05rem; }
.btn--ghost { background: rgba(255, 255, 255, 0.08); color: #fff; border: 1px solid var(--line2); backdrop-filter: blur(6px); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.chip { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line2); color: var(--ink); text-decoration: none; font-size: 0.86rem; font-weight: 600; white-space: nowrap; transition: background 0.15s, border-color 0.15s; }
.chip:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--accent)); margin-right: 8px; }
.chip--ninos { --c: var(--ninos); }
.chip--principiante { --c: var(--principiante); }
.chip--experto { --c: var(--experto); }
.chip--ninos:hover { border-color: var(--ninos); }
.chip--principiante:hover { border-color: var(--principiante); }
.chip--experto:hover { border-color: var(--experto); }
.badge { display: inline-block; margin: 0 0 6px; padding: 5px 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; background: rgba(4, 6, 13, 0.5); color: var(--lv); border: 1px solid color-mix(in srgb, var(--lv) 55%, transparent); backdrop-filter: blur(6px); }
.badge--ninos { --lv: var(--ninos); }
.badge--principiante { --lv: var(--principiante); }
.badge--experto { --lv: var(--experto); }
.crumbs { font-size: 0.82rem; color: var(--ink2); display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.crumbs a { color: var(--ink2); text-decoration: none; }
.crumbs a:hover { color: #fff; }
.crumbs span[aria-hidden] { opacity: 0.4; }

/* ---------- home cover (full-screen video) ---------- */
.cover { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.cover__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; max-width: none; }
.cover__shade { position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 90% at 20% 100%, rgba(4, 6, 13, 0.85), transparent 60%), linear-gradient(0deg, var(--bg) 2%, rgba(4, 6, 13, 0.25) 45%, rgba(4, 6, 13, 0.55)); }
.cover__in { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px 13vh; }
.cover h1 { font-size: clamp(3rem, 9vw, 7.6rem); font-weight: 600; letter-spacing: -0.04em; line-height: 0.95; margin: 0.25em 0 0.35em; }
.cover__lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: #dbe2f3; max-width: 46ch; margin: 0 0 30px; }
.cover__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.cover__down { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); color: #fff; text-decoration: none; font-size: 1.3rem; opacity: 0.7; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, 8px); } }

/* ---------- page heroes ---------- */
.hero { position: relative; min-height: 64vh; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.hero--art { min-height: 78vh; }
.hero--mid { min-height: 70vh; }
.hero--short { min-height: 52vh; }
.hero__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; max-width: none; }
@media (prefers-reduced-motion: no-preference) { img.hero__media { animation: kenburns 30s ease-out both; } }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, var(--bg) 0%, rgba(4, 6, 13, 0.82) 22%, rgba(4, 6, 13, 0.25) 62%, rgba(4, 6, 13, 0.5) 100%); }
.hero__in { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 120px 22px 46px; }
.hero h1 { max-width: 20ch; }
.hero__lead { font-size: clamp(1.05rem, 1.6vw, 1.28rem); color: #d5ddf0; max-width: 60ch; margin: 0 0 18px; }
.hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; color: var(--ink2); font-size: 0.9rem; }
.switch { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hero__credit { max-width: var(--wrap); margin: -8px auto 0; padding: 0 22px 8px; text-align: right; color: #5d6787; font-size: 0.75rem; }
.hero__credit a { color: #5d6787; text-decoration: none; }

/* ---------- sections ---------- */
.band { max-width: var(--wrap); margin: 0 auto; padding: 40px 22px; width: 100%; }
.band--tight { padding-top: 10px; }
.band--narrow { max-width: 860px; }
.band--top { padding-top: 60px; }
.sec-h { margin: 0.6em 0 0.25em; font-size: clamp(1.7rem, 3.4vw, 2.7rem); }
.sec-p { color: var(--ink2); margin: 0 0 26px; font-size: 1.08rem; }
.sec-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.more { color: var(--ink2); text-decoration: none; font-weight: 600; white-space: nowrap; }
.more::after { content: ' →'; }
.more:hover { color: #fff; }

/* levels */
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; }
@media (max-width: 860px) { .levels { grid-template-columns: 1fr; } }
.level { position: relative; display: flex; align-items: flex-end; min-height: 440px; border-radius: var(--r); overflow: hidden; text-decoration: none; color: #fff; isolation: isolate; border: 1px solid var(--line); }
@media (max-width: 860px) { .level { min-height: 300px; } }
.level img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.level::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(4, 6, 13, 0.95) 8%, rgba(4, 6, 13, 0.15) 60%); }
.level:hover img { transform: scale(1.06); }
.level:hover { color: #fff; }
.level__in { display: flex; flex-direction: column; gap: 4px; padding: 26px; }
.level__age { color: var(--c); font: 600 0.78rem var(--body); text-transform: uppercase; letter-spacing: 0.14em; }
.level__name { font: 600 2.3rem/1 var(--head); letter-spacing: -0.03em; }
.level__d { color: #d5ddf0; margin-top: 6px; }
.level--ninos { --c: var(--ninos); }
.level--principiante { --c: var(--principiante); }
.level--experto { --c: var(--experto); }
.level::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--c); z-index: 1; transform: scaleX(0); transform-origin: left; transition: transform 0.5s; }
.level:hover::before { transform: scaleX(1); }

/* the route: alternating photo rows */
.route { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 22px; }
.row { display: grid; grid-template-columns: 1.25fr 1fr; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.row:nth-child(even) { grid-template-columns: 1fr 1.25fr; }
.row:nth-child(even) .row__media { order: 2; }
.row__media { position: relative; min-height: 300px; overflow: hidden; }
.row__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(0.2, 0.7, 0.2, 1); }
.row:hover .row__media img { transform: scale(1.05); }
.row__body { padding: 34px 36px; display: flex; flex-direction: column; justify-content: center; }
.row__n { font: 500 3.4rem/1 var(--head); color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.35); letter-spacing: -0.04em; margin-bottom: 14px; }
.row__t, .row .tl__t { margin: 0 0 10px; font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.row__t a, .tl__t a { color: #fff; text-decoration: none; }
.row__t a:hover, .tl__t a:hover { color: var(--accent2); }
.row__d, .tl__d { color: var(--ink2); margin: 0 0 18px; line-height: 1.6; }
.row__m { color: var(--muted); font-size: 0.85rem; margin: 0; }
@media (max-width: 860px) {
  .row, .row:nth-child(even) { grid-template-columns: 1fr; }
  .row:nth-child(even) .row__media { order: 0; }
  .row__media { min-height: 0; aspect-ratio: 16 / 9; }
  .row__body { padding: 22px 22px 26px; }
  .row__n { font-size: 2.4rem; margin-bottom: 8px; }
}
.tl__lv { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tl.known .tl__lv { display: none; }
.tl.known .tl__d { margin-bottom: 0; }
.tls { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.tl--card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; }
.tl--card .tl__t { margin: 0 0 6px; font-size: 1.2rem; }
.tl--card .tl__d { font-size: 0.95rem; margin-bottom: 14px; }

/* moments (video cards) */
.mcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 960px) { .mcards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .mcards { grid-template-columns: 1fr; } }
.mcards--big .mcard { aspect-ratio: 4 / 3; }
.mcard { position: relative; display: flex; align-items: flex-end; aspect-ratio: 16 / 10; border-radius: var(--r); overflow: hidden; text-decoration: none; color: #fff; isolation: isolate; border: 1px solid var(--line); background: var(--card); }
.mcard__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; max-width: none; transition: transform 0.8s; }
.mcard:hover .mcard__media { transform: scale(1.04); }
.mcard::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(4, 6, 13, 0.92) 5%, transparent 55%); }
.mcard::before { content: ''; position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border-radius: 50%; background: rgba(4, 6, 13, 0.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7l9 5-9 5z' fill='white'/%3E%3C/svg%3E") center / 20px no-repeat; border: 1px solid rgba(255, 255, 255, 0.35); backdrop-filter: blur(6px); }
.mcard__in { padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.mcard__t { font: 600 1.3rem/1.15 var(--head); letter-spacing: -0.01em; }
.mcard:hover { color: #fff; }

/* gallery */
.gallery { columns: 3 280px; column-gap: 14px; }
.gallery--home { columns: 4 240px; }
.gallery--row { columns: 4 220px; }
.gtile { position: relative; display: block; margin: 0 0 14px; break-inside: avoid; border-radius: 10px; overflow: hidden; text-decoration: none; background: var(--card); }
.gtile img { width: 100%; transition: transform 0.8s, filter 0.4s; }
.gtile:hover img { transform: scale(1.04); filter: brightness(1.1); }
.gtile__t { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 12px; background: linear-gradient(0deg, rgba(4, 6, 13, 0.9), transparent); color: #fff; font: 500 0.95rem/1.3 var(--head); opacity: 0; transform: translateY(6px); transition: opacity 0.3s, transform 0.3s; }
.gtile:hover .gtile__t, .gtile:focus .gtile__t { opacity: 1; transform: none; }
@media (hover: none) { .gtile__t { opacity: 1; transform: none; } }
.gtile.hide { display: none; }
.gfilter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.gfilter button { font: 600 0.9rem var(--body); color: var(--ink2); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line2); border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.gfilter button:hover { color: #fff; }
.gfilter button.on { background: #fff; color: #05070f; border-color: #fff; }
.lb { position: fixed; inset: 0; z-index: 60; background: rgba(2, 3, 8, 0.96); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.lb[hidden] { display: none; }
.lb img { max-width: 100%; max-height: 74vh; width: auto; object-fit: contain; border-radius: 6px; }
.lb__cap { max-width: 760px; text-align: center; margin-top: 16px; }
.lb__t { font: 600 1.4rem var(--head); color: #fff; margin: 0 0 6px; }
.lb__d { color: var(--ink2); margin: 0 0 6px; font-size: 0.98rem; }
.lb__btn { position: absolute; background: rgba(255, 255, 255, 0.1); border: 1px solid var(--line2); color: #fff; width: 46px; height: 46px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; }
.lb__btn:hover { background: rgba(255, 255, 255, 0.22); }
.lb__x { top: 18px; right: 18px; }
.lb__p { left: 18px; top: 50%; }
.lb__n { right: 18px; top: 50%; }
.lb__more { color: var(--sky); font-size: 0.9rem; }

/* photo page */
.photo { padding-top: 70px; }
.photo__img { background: #000; display: flex; justify-content: center; }
.photo__img img { max-height: 86vh; width: auto; max-width: 100%; object-fit: contain; }
.photo__text { max-width: 860px; margin: 0 auto; padding: 30px 22px 10px; }
.photo__text h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
.photo__nav { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 24px; font-size: 0.92rem; }
.photo__nav a { color: var(--ink2); text-decoration: none; }
.photo__nav a:hover { color: #fff; }

/* watch page (moment) */
.watch { padding-top: 76px; background: radial-gradient(80% 60% at 50% 0%, #10172e, var(--bg)); }
.watch__in { max-width: 1100px; margin: 0 auto; padding: 24px 22px 10px; }
.watch__player { border-radius: var(--r); overflow: hidden; background: #000; border: 1px solid var(--line); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9); }
.watch__player video { width: 100%; max-height: 72vh; }
.watch__text { max-width: 760px; padding-top: 24px; }
.watch__text h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
.watch__lead { font-size: 1.15rem; color: #d5ddf0; }

/* games: image cards */
.gcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; margin-top: 10px; }
.gcard { position: relative; display: flex; align-items: flex-end; min-height: 280px; border-radius: var(--r); overflow: hidden; text-decoration: none; color: #fff; isolation: isolate; border: 1px solid var(--line); background: var(--card); }
.gcard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 0.8s; }
.gcard::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(4, 6, 13, 0.96) 18%, rgba(4, 6, 13, 0.2) 75%); }
.gcard:hover img { transform: scale(1.05); }
.gcard:hover { color: #fff; }
.gcard__in { padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.gcard__t { font: 600 1.25rem/1.15 var(--head); }
.gcard__d { color: #c9d1e6; font-size: 0.9rem; line-height: 1.45; }

/* activities */
.acts { display: grid; gap: 16px; margin-top: 22px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.actividad { position: relative; display: flex; align-items: flex-end; min-height: 300px; border-radius: var(--r); overflow: hidden; text-decoration: none; color: #fff; isolation: isolate; border: 1px solid rgba(255, 138, 61, 0.35); margin: 34px 0; }
.acts .actividad { margin: 0; }
.actividad__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 0.8s; }
.actividad::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(4, 6, 13, 0.95) 20%, rgba(4, 6, 13, 0.35)); }
.actividad:hover .actividad__bg { transform: scale(1.04); }
.actividad:hover { color: #fff; }
.actividad__in { padding: 28px; display: flex; flex-direction: column; gap: 8px; max-width: 560px; align-items: flex-start; }
.actividad__t { font: 600 1.6rem/1.1 var(--head); }
.actividad__d { color: #d0d8ec; }

/* ---------- article ---------- */
.art { width: 100%; }
.art__grid { max-width: var(--wrap); margin: 0 auto; padding: 10px 22px 20px; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; }
@media (max-width: 1060px) { .art__grid { grid-template-columns: 1fr; gap: 0; } }
.toc { position: sticky; top: 90px; align-self: start; font-size: 0.88rem; padding-top: 40px; }
.toc__h { color: var(--muted); text-transform: uppercase; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; margin: 0 0 10px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line2); }
.toc li a { display: block; padding: 6px 14px; color: var(--muted); text-decoration: none; line-height: 1.35; border-left: 2px solid transparent; margin-left: -1px; }
.toc li a:hover, .toc li a.on { color: #fff; border-left-color: var(--lv); }
@media (max-width: 1060px) { .toc { position: static; padding: 18px 20px; background: var(--card); border-radius: var(--r); margin: 26px 0 0; border: 1px solid var(--line); } }
.prose { min-width: 0; max-width: 760px; }
.prose > p:first-child { margin-top: 36px; font-size: 1.18rem; color: #e3e9f6; }
.prose p, .prose li { color: #cfd7ea; }
.prose strong { color: #fff; font-weight: 600; }
.prose li { margin: 0.4em 0; }
.prose h2 { padding-top: 0.3em; }
.prose code { background: var(--card2); padding: 2px 6px; border-radius: 6px; font-size: 0.92em; color: #ffd8b8; }
.prose pre { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.nivel-ninos .prose { font-size: 1.14rem; }
/* figures and moments break out of the text column */
.fig { margin: 40px 0; width: min(1100px, calc(100vw - 44px)); }
.fig img { width: 100%; border-radius: 10px; background: var(--card2); }
.fig--tall { width: auto; }
.fig--tall img { width: auto; max-width: 100%; max-height: 720px; margin: 0 auto; }
.fig figcaption { font-size: 0.86rem; color: var(--muted); margin-top: 10px; line-height: 1.5; max-width: 760px; }
@media (max-width: 1060px) { .fig { width: 100%; } }
.moment { position: relative; margin: 48px 0; width: min(1100px, calc(100vw - 44px)); border-radius: var(--r); overflow: hidden; background: #000; border: 1px solid var(--line); isolation: isolate; }
@media (max-width: 1060px) { .moment { width: 100%; } }
.moment__video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.moment__cap { padding: 22px 26px 24px; background: linear-gradient(180deg, #0b1020, var(--card)); }
.moment__t { font: 600 1.6rem/1.15 var(--head); color: #fff !important; margin: 6px 0 8px; }
.moment__d { margin: 0 0 12px; }
.moment__a { display: inline-block; font-weight: 600; margin-right: 16px; }
.moment__a::after { content: ' →'; }
.table { overflow-x: auto; margin: 24px 0; border: 1px solid var(--line); border-radius: 12px; }
.table table { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
.table th, .table td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { background: var(--card2); color: #fff; font-family: var(--head); font-weight: 600; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.callout { margin: 28px 0; padding: 18px 22px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--sky); }
.callout p { margin: 0.4em 0; }
.callout--casa { border-left-color: #6ee7a8; }
.callout--ojo { border-left-color: var(--accent); }

/* quiz */
.quiz { margin: 56px 0 10px; padding: 28px 30px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.quiz h2 { margin-top: 0; }
.quiz__list { padding-left: 1.2em; margin: 0; }
.quiz__q { margin-bottom: 24px; }
.quiz__p { font-weight: 600; color: #fff !important; margin: 0 0 10px; }
.quiz__ops { display: flex; flex-wrap: wrap; gap: 8px; }
.quiz__op { font: inherit; font-size: 0.97rem; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card2); color: var(--ink); cursor: pointer; text-align: left; }
.quiz__op:hover:not(:disabled) { border-color: var(--lv); }
.quiz__op.ok { background: rgba(110, 231, 168, 0.16); border-color: #6ee7a8; color: #fff; }
.quiz__op.ko { background: rgba(255, 99, 99, 0.14); border-color: #ff7b7b; }
.quiz__op:disabled { cursor: default; }
.quiz__ex { margin: 10px 0 0; font-size: 0.95rem; color: var(--ink2) !important; }
.quiz__score { font: 600 1.15rem var(--head); color: var(--lv); margin: 0; }

/* pager with images */
.pager { max-width: var(--wrap); margin: 30px auto 0; padding: 0 22px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .pager { grid-template-columns: 1fr; } }
.pager__a { position: relative; display: flex; align-items: flex-end; min-height: 200px; border-radius: var(--r); overflow: hidden; text-decoration: none; color: #fff; isolation: isolate; border: 1px solid var(--line); background: var(--card); }
.pager__a img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 0.8s; opacity: 0.85; }
.pager__a::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(4, 6, 13, 0.95) 15%, rgba(4, 6, 13, 0.25)); }
.pager__a:hover img { transform: scale(1.05); }
.pager__a:hover { color: #fff; }
.pager__in { padding: 20px 22px; display: flex; flex-direction: column; gap: 4px; }
.pager__t { font: 600 1.3rem/1.2 var(--head); }

/* ---------- games ---------- */
.gamepage { max-width: 1060px; margin: 0 auto; padding: 0 22px 40px; width: 100%; }
.juego { margin: 40px 0; background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--r); overflow: hidden; }
.juego--big { margin-top: 10px; }
.juego__head { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--card); }
.juego__title { margin: 2px 0 0; font-size: 1.15rem; }
.juego__link { margin-left: auto; font-size: 0.85rem; white-space: nowrap; }
.juego__link::after { content: ' ↗'; }
.is-game .juego__link { display: none; }
.juego__stage { padding: 18px; min-height: 200px; }
.g-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 10px 0; }
.g-row label { font-size: 0.92rem; color: var(--ink2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.g-row input[type='range'] { width: 180px; accent-color: var(--accent); }
.g-row select, .g-row input[type='number'] { font: inherit; background: var(--card2); color: #fff; border: 1px solid var(--line2); border-radius: 8px; padding: 6px 10px; max-width: 100%; }
.g-row input[type='number'] { width: 90px; }
.g-btn { font: 600 0.95rem var(--body); padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card2); color: #fff; cursor: pointer; touch-action: manipulation; user-select: none; }
.g-btn:hover { border-color: var(--accent); }
.g-btn--go { background: var(--accent); color: #1a0d03; border-color: var(--accent); }
.g-btn--go:hover { background: var(--accent2); }
.g-btn.on { background: var(--sky); color: #04121a; border-color: var(--sky); }
.g-canvas { display: block; width: 100%; border-radius: 10px; background: #050816; touch-action: none; }
.g-msg { margin: 10px 0 0; padding: 12px 16px; border-radius: 10px; background: var(--card); color: var(--ink) !important; min-height: 1.6em; }
.g-msg.ok { background: rgba(110, 231, 168, 0.12); }
.g-msg.ko { background: rgba(255, 99, 99, 0.12); }
.g-out { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 12px 0; }
.g-stat { background: var(--card); border-radius: 10px; padding: 10px 12px; }
.g-stat b { display: block; font: 600 1.25rem var(--head); color: #fff; }
.g-stat span { font-size: 0.8rem; color: var(--muted); }
.g-bar { height: 14px; background: var(--card2); border-radius: 99px; overflow: hidden; position: relative; }
.g-bar > i { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 99px; transition: width 0.25s; }
.g-list { display: grid; gap: 8px; margin: 12px 0; }
.g-li { display: grid; grid-template-columns: 110px 1fr 120px; gap: 12px; align-items: center; font-size: 0.93rem; }
.g-li b { color: #fff; }
@media (max-width: 560px) { .g-li { grid-template-columns: 82px 1fr 92px; font-size: 0.85rem; } .g-row input[type='range'] { width: 140px; } }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); background: #020309; margin-top: 60px; }
.foot__in { max-width: var(--wrap); margin: 0 auto; padding: 50px 22px 16px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 860px) { .foot__in { grid-template-columns: 1fr 1fr; } .foot__col--brand { grid-column: 1 / -1; } }
.foot__col { display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; color: var(--muted); }
.foot__col a { color: var(--ink2); text-decoration: none; }
.foot__col a:hover { color: #fff; }
.foot__col p { margin: 0; max-width: 46ch; }
.foot__brand { font: 600 1.4rem var(--head); color: #fff !important; }
.foot__h { color: #fff !important; font-weight: 600; margin-bottom: 4px !important; }
.foot__legal { max-width: var(--wrap); margin: 0 auto; padding: 16px 22px 34px; color: #4e587a; font-size: 0.8rem; }
.credits li { font-size: 0.88rem; }

/* ---------- scroll reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .js .reveal.in { opacity: 1; transform: none; }
}
.foot__legal a { color: var(--ink2); }
.foot__legal a:hover { color: #fff; }

/* ---------- course progress bar (top: sticky under the menu; bottom: before the pager) ---------- */
.course { --c: var(--accent); background: rgba(6, 9, 20, 0.94); backdrop-filter: blur(14px) saturate(140%); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.course--ninos { --c: var(--ninos); }
.course--principiante { --c: var(--principiante); }
.course--experto { --c: var(--experto); }
.course--top { position: sticky; top: var(--toph, 61px); z-index: 25; }
.course--bottom { max-width: var(--wrap); margin: 50px auto 0; border: 1px solid var(--line); border-radius: var(--r); width: calc(100% - 44px); }
.course__in { max-width: var(--wrap); margin: 0 auto; padding: 10px 22px; display: flex; align-items: center; gap: 14px; }
.course--bottom .course__in { padding: 16px 20px; }
.course__name { display: flex; flex-direction: column; text-decoration: none; min-width: 170px; line-height: 1.25; }
.course__kicker { color: var(--muted); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.course__lv { color: var(--c); font: 600 1rem var(--head); }
.course__count { color: var(--ink2); font-size: 0.78rem; }
.course__name:hover .course__lv { text-decoration: underline; }
.course__steps { flex: 1; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(10, 1fr); position: relative; }
.course__steps::before, .course__steps::after { content: ''; position: absolute; top: 13px; left: 5%; height: 2px; border-radius: 2px; }
.course__steps::before { right: 5%; background: var(--line2); }
.course__steps::after { width: calc((var(--p) - 0.05) * 100%); background: var(--c); opacity: 0.7; }
.course__step a { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--muted); padding: 0 2px; }
.course__n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 600 0.8rem var(--head); background: #0b1022; border: 2px solid var(--line2); color: var(--ink2); transition: transform 0.15s, background 0.15s; }
.course__t { font-size: 0.72rem; line-height: 1.2; text-align: center; max-width: 12ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course__step a:hover { color: #fff; }
.course__step a:hover .course__n { transform: scale(1.12); border-color: var(--c); }
.course__step.past .course__n { border-color: color-mix(in srgb, var(--c) 70%, transparent); }
.course__step.seen .course__n { background: color-mix(in srgb, var(--c) 30%, #0b1022); border-color: var(--c); color: #fff; }
.course__step.seen .course__n::after { content: '✓'; position: absolute; transform: translate(11px, -11px); width: 15px; height: 15px; border-radius: 50%; background: var(--c); color: #05070f; font-size: 0.6rem; display: grid; place-items: center; }
.course__step.on .course__n { background: var(--c); border-color: var(--c); color: #05070f; transform: scale(1.18); box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 25%, transparent); }
.course__step.on .course__t { color: #fff; font-weight: 600; }
.course__arrow { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line2); display: grid; place-items: center; color: #fff; text-decoration: none; }
.course__arrow::before { font-size: 1.4rem; line-height: 1; margin-top: -2px; }
.course__arrow--prev::before { content: '‹'; }
.course__arrow--next::before { content: '›'; }
.course__arrow:hover { background: var(--c); border-color: var(--c); color: #05070f; }
.course__arrow.off { opacity: 0.25; }
@media (max-width: 920px) {
  .course__in { flex-wrap: wrap; gap: 8px 10px; padding: 8px 14px; }
  .course__name { min-width: 0; width: 100%; flex-direction: row; align-items: baseline; gap: 8px; }
  .course__kicker { display: none; }
  .course__t { display: none; }
  .course__steps::before, .course__steps::after { top: 12px; }
  .course__n { width: 24px; height: 24px; font-size: 0.72rem; }
  .course__arrow { width: 32px; height: 32px; }

}
.course--top { transition: opacity 0.25s, transform 0.25s; }
.course--top.hide { opacity: 0; transform: translateY(-8px); pointer-events: none; }
@media (max-width: 920px) {
  .course__in { gap: 6px 6px; }
  .course__steps { min-width: 0; }
  .course__step a { padding: 0; }
  .course__n { width: 22px; height: 22px; font-size: 0.68rem; }
  .course__steps::before, .course__steps::after { top: 11px; }
  .course__arrow { width: 28px; height: 28px; }
  .course__arrow::before { font-size: 1.15rem; }
  .course__step.on .course__n { transform: scale(1.12); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); }
  .course__step.seen .course__n::after { width: 12px; height: 12px; transform: translate(9px, -9px); font-size: 0.5rem; }
}

/* ---------- engineering: subject cards, worked examples ---------- */
.scards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.scards--big .scard { min-height: 380px; }
.scard { position: relative; display: flex; align-items: flex-end; min-height: 320px; border-radius: var(--r); overflow: hidden; text-decoration: none; color: #fff; isolation: isolate; border: 1px solid var(--line); background: var(--card); }
.scard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 0.8s; }
.scard::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(4, 6, 13, 0.95) 22%, rgba(4, 6, 13, 0.55) 55%, rgba(4, 6, 13, 0.05) 100%); }
.scard:hover img { transform: scale(1.05); }
.scard:hover { color: #fff; border-color: color-mix(in srgb, var(--experto) 60%, transparent); }
.scard__in { padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.scard .kicker { color: var(--experto); }
.scard__t { font: 600 1.45rem/1.15 var(--head); }
.scard__d { color: #c9d1e6; font-size: 0.92rem; line-height: 1.5; }
.scard__l { color: var(--muted); font-size: 0.8rem; margin-top: 4px; }
.callout--ejemplo { border-left-color: var(--experto); background: rgba(185, 151, 255, 0.07); }
.callout--ejemplo pre { margin: 10px 0; }
@media (max-width: 1180px) { .logo__txt small { display: none; } .nav > a { padding: 8px 9px; } .lvsw { margin-left: 8px; } }

/* Whole cards are clickable (Fer: «toda la card debe ser clickeable»): the title link is stretched over the card
   («stretched link»: one real link for Google), the level chips stay clickable above it. */
.row, .tl--card { position: relative; cursor: pointer; }
.row__body, .tl--card .tl__t { position: static; }
.row__t a::after, .row .tl__t a::after, .tl--card .tl__t a::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.tl__lv, .tl__lv .chip { position: relative; z-index: 2; }
.row:hover .row__t a, .row:hover .tl__t a, .tl--card:hover .tl__t a { color: var(--accent2); }
.row:hover { border-color: var(--line2); }
.tl--card:hover { border-color: var(--line2); }
.row__t a:focus-visible, .tl__t a:focus-visible { outline: none; }
.row:focus-within, .tl--card:focus-within { outline: 2px solid var(--accent2); outline-offset: 2px; }
