/* Lumina Studio — maquetación principal */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    color: #fff;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    background: #0B0C12;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: normal; }
button { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ================= Fondo (cielo Lumina) =================
   Noche: degradado violeta profundo + auroras doradas/violetas + rejilla de bloques
   + motas de luz que ascienden y un horizonte pixelado (dibujados en js/app.js → sky()). */
.sky {
    position: fixed; inset: 0; z-index: -1; overflow: hidden;
    background: linear-gradient(180deg, #1A1633 0%, #120F24 40%, #0B0A15 75%, #07060D 100%);
    transition: background .6s;
}
.sky canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sky__aurora { position: absolute; inset: -20%; filter: blur(60px); opacity: .55; transition: opacity .6s; }
.sky__aurora::before, .sky__aurora::after { content: ""; position: absolute; border-radius: 50%; }
.sky__aurora::before {
    left: 8%; top: 4%; width: 46%; height: 38%;
    background: radial-gradient(closest-side, rgba(255, 214, 110, .30), transparent);
    animation: auroraA 38s ease-in-out infinite alternate;
}
.sky__aurora::after {
    right: 2%; top: 18%; width: 52%; height: 44%;
    background: radial-gradient(closest-side, rgba(124, 92, 255, .34), transparent);
    animation: auroraB 46s ease-in-out infinite alternate;
}
@keyframes auroraA { to { transform: translate(10%, 8%) scale(1.15); } }
@keyframes auroraB { to { transform: translate(-12%, -6%) scale(.9); } }
.sky__grid {
    position: absolute; inset: 0;
    background:
        linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px) 0 0 / 48px 48px,
        linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px) 0 0 / 48px 48px;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 35%, #000 60%, transparent 92%);
            mask-image: linear-gradient(180deg, transparent 0%, #000 35%, #000 60%, transparent 92%);
}
html[data-theme="day"] .sky { background: linear-gradient(180deg, #4E86F0 0%, #7FAEFF 45%, #BFD7FF 78%, #F3E2C4 100%); }
html[data-theme="day"] .sky__aurora { opacity: .35; }
html[data-theme="day"] .sky__grid { opacity: .5; }

/* ================= Barra superior ================= */
.topbar {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; gap: 12px;
    height: var(--header-h);
    padding: 0 18px;
    background: linear-gradient(rgba(70, 68, 84, .94), rgba(52, 50, 64, .94));
    -webkit-backdrop-filter: blur(8px);
            backdrop-filter: blur(8px);
    border-bottom: 3px solid #1E1E1F;
    box-shadow: inset 0 -3px 0 rgba(255,255,255,.08), 0 2px 0 rgba(255, 226, 122, .22), 0 6px 18px rgba(0,0,0,.35);
}
.topbar__logo {
    flex: none; display: flex; align-items: center; gap: 10px;
    text-decoration: none;
    box-shadow: none;
}
.topbar__logo img {
    width: 54px; height: 54px; object-fit: cover;
    border: 2px solid var(--gray-100);
}
.topbar__brand { font-family: var(--font-title); font-size: 20px; line-height: 1; text-shadow: 2px 2px 0 #000; }
.topbar__brand small { display: block; font-family: var(--font-body); font-size: 12px; color: var(--gray-30); text-shadow: none; margin-top: 4px; letter-spacing: 2px; }
/* Navegación centrada (en lugar de pegada al logo) */
.topbar__nav { display: flex; gap: 8px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 8px; }
.topbar__nav::-webkit-scrollbar { display: none; }
.topbar__nav .btn { min-width: 124px; }
.topbar__actions { flex: none; display: flex; gap: 8px; align-items: center; padding-bottom: 4px; }

/* Controles flotantes: volver arriba, sonido y ajustes */
.dock {
    position: fixed; right: 18px; bottom: 18px; z-index: 60;
    display: flex; flex-direction: column; gap: 8px;
    padding: 8px 8px 4px;
    background: rgba(20, 18, 32, .78);
    border: 2px solid #1E1E1F;
    box-shadow: inset 0 2px rgba(255,255,255,.08), 0 6px 0 rgba(0,0,0,.35);
    -webkit-backdrop-filter: blur(6px);
            backdrop-filter: blur(6px);
}
.dock .btn { --h: 42px; width: 44px; }
.dock__top img { transition: transform .2s; }
.dock__top.is-swapping img { transform: scale(.6); }
.topbar__menu { display: none; }
.icon-svg { width: 22px; height: 22px; shape-rendering: crispEdges; }

/* ================= Contenedor ================= */
.page { width: min(1680px, 100% - 48px); margin: 0 auto; padding: 28px 0 60px; }
.page--narrow { width: min(1180px, 100% - 48px); }
.view-enter { animation: viewIn .25s ease-out; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Encabezado de sección:  ◆ Título ━━━━━━━━━━╸ (línea que se desvanece) */
.section { margin-top: 44px; }
.section:first-child { margin-top: 0; }
.section__head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.section__title {
    display: flex; align-items: center; gap: 12px;
    padding: 6px 14px 6px 10px;
    background: linear-gradient(90deg, rgba(10, 9, 18, .9), rgba(10, 9, 18, .55));
    border-left: 4px solid var(--lumina);
    font-size: 22px;
    white-space: nowrap;
}
.section__title::before {
    content: ""; width: 9px; height: 9px; flex: none;
    background: var(--lumina);
    transform: rotate(45deg);
    box-shadow: 0 0 8px rgba(255, 226, 122, .7);
}
.section__line {
    flex: 1; height: 3px;
    background: linear-gradient(90deg, var(--gray-50) 0%, rgba(140,141,144,.35) 60%, transparent 100%);
}

/* ================= Hero ================= */
.hero {
    display: grid; grid-template-columns: 300px 1fr; gap: 36px; align-items: center;
    padding: 34px;
}
.hero__logo { width: 100%; aspect-ratio: 1; object-fit: cover; border: 4px solid var(--gray-100); box-shadow: 0 0 60px rgba(255, 226, 122, .18); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.hero__kicker { color: var(--lumina); font-size: 16px; letter-spacing: 3px; }
.hero__title { font-family: var(--font-title); font-size: clamp(38px, 5.5vw, 72px); line-height: 1.05; margin: 8px 0 14px; text-shadow: 4px 4px 0 #000; }
.hero__text { max-width: 760px; color: var(--gray-20); font-size: 18px; margin: 0 0 22px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.stat { min-width: 160px; padding: 10px 16px; background: rgba(0,0,0,.45); border-left: 4px solid var(--green-30); }
.stat b { display: block; font-family: var(--font-title); font-size: 26px; font-weight: normal; }
.stat span { color: var(--gray-40); font-size: 14px; }

/* ================= Tarjetas ================= */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
    position: relative; display: flex; flex-direction: column;
    background: var(--gray-70);
    border: 2px solid var(--gray-100);
    box-shadow: 0 6px 0 rgba(0,0,0,.35);
    text-decoration: none; color: #fff;
    cursor: pointer;
    transition: transform .12s, border-color .12s;
}
.card:hover, .card:focus-visible { transform: translateY(-3px); border-color: var(--lumina); box-shadow: 0 6px 0 rgba(0,0,0,.35), 0 0 22px rgba(255, 226, 122, .18); outline: none; }
.card__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.card:hover .card__media img { transform: scale(1.04); }
.card__badge { position: absolute; left: 8px; bottom: 8px; box-shadow: 2px 2px 0 rgba(0,0,0,.5); }
.card__body { padding: 10px 12px 12px; box-shadow: inset 0 2px rgba(255,255,255,.12); }
.card__title { font-size: 19px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.card__dl { color: var(--gray-30); font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
.grid--3 .card__title { font-size: 22px; }

/* ================= Buscador ================= */
.search { padding: 20px; }
.search .field { font-size: 18px; padding: 14px 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
    border: 2px solid transparent; cursor: pointer;
    font-family: var(--font-body); font-size: 15px;
    padding: 2px 8px 3px;
}
.chip[aria-pressed="true"] { border-color: #fff; outline: 2px solid #000; }
.chip--all { background: var(--gray-30); color: #1E1E1F; }
.empty { padding: 40px; text-align: center; color: var(--gray-30); }
.empty img { width: 64px; image-rendering: pixelated; display: block; margin: 0 auto 12px; }

.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 28px; }
.pager__pages { display: flex; background: rgba(0,0,0,.5); }
.pager__page { width: 46px; height: 46px; border: 0; background: transparent; color: #fff; cursor: pointer; font-family: var(--font-body); font-size: 18px; }
.pager__page + .pager__page { border-left: 2px solid rgba(255,255,255,.08); }
.pager__page[aria-current="true"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 3px; background: rgba(255,255,255,.08); }

/* ================= Ficha de proyecto ================= */
.detail-top { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(320px, 1fr); gap: 20px; }
.detail-banner { aspect-ratio: 16 / 9; background: #000; border: 2px solid var(--gray-100); overflow: hidden; }
.detail-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-info { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.detail-info__title { display: flex; gap: 14px; align-items: center; }
.detail-info__title img { width: 64px; height: 64px; border: 2px solid var(--gray-100); flex: none; }
.detail-info h1 { font-family: var(--font-title); font-size: clamp(26px, 2.6vw, 38px); line-height: 1.1; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-meta { color: var(--gray-30); font-size: 15px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.detail-meta span + span::before { content: "|"; margin-right: 14px; color: var(--gray-60); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Caja “Descargar ahora” (referencia) */
.getbox { margin-top: auto; padding: 14px 18px 18px; background: #3C3C3E; border: 3px solid #E5E5E5; box-shadow: inset 0 0 0 3px #1E1E1F; text-align: center; }
.getbox__title { font-family: var(--font-title); font-size: clamp(26px, 2.4vw, 36px); color: #BDBDBD; text-shadow: 3px 3px 0 #1E1E1F; letter-spacing: 2px; border-bottom: 4px solid #BDBDBD; padding-bottom: 8px; margin-bottom: 14px; }
.getbox .btn { width: 100%; }

.detail-summary { margin-top: 20px; padding: 18px 22px; font-size: 19px; }
.detail-body { width: min(1180px, 100%); margin: 0 auto; }

/* Videos */
.videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.yt-lite {
    position: relative; aspect-ratio: 16 / 9; width: 100%; max-width: 760px; margin: 16px auto;
    background: #000 center / cover no-repeat; border: 2px solid var(--gray-100); cursor: pointer;
}
.videos .yt-lite { margin: 0; max-width: none; }
.yt-lite::before { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 60%, rgba(0,0,0,.6)); }
.yt-lite__play {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 76px; height: 54px; background: #CA3636; border: 3px solid #1E1E1F;
    box-shadow: inset 0 -5px #AD1D1D, inset 3px 3px rgba(255,255,255,.25);
}
.yt-lite__play::after { content: ""; position: absolute; left: 30px; top: 13px; border-left: 20px solid #fff; border-top: 12px solid transparent; border-bottom: 12px solid transparent; }
.yt-lite:hover .yt-lite__play { background: #DF5050; }
.yt-lite iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Descripción importada de CurseForge */
.desc { padding: 26px 30px; font-size: 17px; line-height: 1.65; overflow-wrap: anywhere; }
.desc__note { display: flex; gap: 10px; align-items: center; margin: -6px 0 18px; padding: 8px 12px; background: rgba(46,107,229,.18); border-left: 4px solid var(--blue-20); color: var(--gray-20); font-size: 14px; }
.desc .desc__note img { width: 16px; margin: 0; border: 0; background: none; cursor: default; }
.desc h1 { font-family: var(--font-title); font-size: 24px; margin: 26px 0 10px; line-height: 1.3; }
.desc h1:first-child, .desc hr:first-child + h1 { margin-top: 0; }
.desc h2 { font-size: 19px; margin: 18px 0 8px; color: var(--gray-10); }
.desc h3 { font-size: 17px; margin: 10px 0 6px; color: var(--lumina); }
.desc h4 { font-size: 16px; margin: 4px 0; font-weight: normal; }
.desc p { margin: 8px 0; }
.desc ul { padding-left: 22px; margin: 8px 0; }
.desc li { margin: 4px 0; }
.desc li::marker { content: "■  "; color: var(--green-30); font-size: 12px; }
.desc hr { border: 0; height: 4px; background: var(--gray-60); margin: 26px 0; }
.desc img { display: block; height: auto; margin: 12px auto; border: 2px solid var(--gray-100); background: rgba(255,255,255,.03); cursor: zoom-in; }
.desc code { background: rgba(255,255,255,.1); padding: 1px 5px; font-size: 14px; }
.desc a { color: var(--blue-10); }
.desc.is-collapsed { max-height: 1500px; overflow: hidden; position: relative; }
.desc.is-collapsed::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 180px; background: linear-gradient(transparent, rgba(14,14,18,1)); }
.desc-more { display: flex; justify-content: center; margin-top: -24px; position: relative; z-index: 2; }

/* Lista de descargas */
.downloads { padding: 6px 0; }
.dl-row { display: flex; align-items: center; gap: 16px; padding: 12px 18px; }
.dl-row + .dl-row { border-top: 2px solid rgba(255,255,255,.06); }
.dl-row__icon { width: 34px; height: 34px; flex: none; }
.dl-row__text { flex: 1; min-width: 0; }
.dl-row__text b { display: block; font-weight: normal; font-size: 18px; }
.dl-row__text small { color: var(--gray-40); font-size: 14px; }
.dl-row .btn { min-width: 240px; }

/* Compatibilidad */
.compat { display: flex; flex-wrap: wrap; gap: 0; }
.compat__item { display: flex; align-items: center; gap: 10px; padding: 12px 22px; border-right: 2px solid rgba(255,255,255,.06); }
.compat__item img { width: 14px; }

/* ================= Sobre mí ================= */
.about { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
.about__card { padding: 24px; text-align: center; }
.about__avatar { width: 160px; height: 160px; border: 4px solid var(--gray-100); image-rendering: pixelated; display: block; margin: 0 auto 14px; background: var(--gray-80); }
.about__name { font-family: var(--font-title); font-size: 30px; }
.about__role { color: var(--gray-30); margin: 4px 0 16px; }
.about__text { padding: 26px 30px; font-size: 18px; line-height: 1.7; }
.about__text p { margin: 0 0 14px; }
.about__text strong { color: var(--lumina); font-weight: normal; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: var(--gray-50); }
.timeline li { position: relative; margin-bottom: 14px; padding: 14px 18px; }
.timeline li::before { content: ""; position: absolute; left: -26px; top: 22px; width: 12px; height: 12px; background: var(--gray-30); border: 2px solid var(--gray-100); }
.timeline li.is-now::before { background: var(--green-30); }
.timeline b { display: inline-block; font-weight: normal; padding: 1px 8px; background: rgba(0,0,0,.5); margin-bottom: 6px; }
.faq details { padding: 0; }
.faq details + details { margin-top: 10px; }
.faq summary { cursor: pointer; padding: 14px 18px; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-title); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 18px 16px; color: var(--gray-20); }
.warn { display: flex; gap: 12px; padding: 14px 18px; border-left: 4px solid var(--orange-10); background: rgba(255,179,102,.12); }

/* Redes sociales */
.socials { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.social {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px;
    background: var(--gray-70); border: 2px solid var(--gray-100);
    box-shadow: inset 0 -4px var(--gray-80), inset 2px 2px rgba(255,255,255,.12);
    color: #fff; text-decoration: none; cursor: pointer; text-align: left; font-family: var(--font-body);
}
.social:hover { background: var(--gray-60); }
.social:active { box-shadow: inset 2px 2px rgba(255,255,255,.12); transform: translateY(3px); }
.social__icon { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 2px solid var(--gray-100); }
.social__icon svg { width: 26px; height: 26px; }
.social b { display: block; font-weight: normal; font-size: 18px; }
.social small { color: var(--gray-30); font-size: 14px; }

/* ================= Modales / paneles laterales ================= */
.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.7); display: none; }
.overlay.is-open { display: block; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal {
    position: fixed; z-index: 100; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: min(620px, 100% - 24px); max-height: calc(100vh - 40px); overflow: auto;
    background: var(--gray-70); border: 2px solid var(--gray-100);
    box-shadow: inset 0 2px rgba(255,255,255,.15), 0 10px 0 rgba(0,0,0,.4);
    display: none;
}
.modal.is-open { display: block; animation: pop .18s ease-out; }
@keyframes pop { from { transform: translate(-50%, -46%) scale(.97); opacity: 0; } }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; background: var(--gray-80); border-bottom: 2px solid var(--gray-100); }
.modal__head h2 { font-family: var(--font-title); font-size: 26px; }
.modal__body { padding: 20px 18px 22px; display: grid; gap: 14px; }
.modal__body label { display: grid; gap: 6px; font-size: 15px; color: var(--gray-20); }
.modal__hint { font-size: 14px; color: var(--gray-30); margin: 0; }

.drawer {
    position: fixed; z-index: 100; bottom: 18px; right: 88px;
    max-height: calc(100vh - var(--header-h) - 36px); overflow: auto;
    width: min(440px, 100% - 28px);
    background: var(--gray-70); border: 2px solid var(--gray-100);
    box-shadow: inset 0 2px rgba(255,255,255,.15), 0 10px 0 rgba(0,0,0,.4);
    display: none;
}
.drawer.is-open { display: block; animation: slideIn .18s ease-out; }
@keyframes slideIn { from { transform: translate(20px, 10px); opacity: 0; } }
.opt { display: flex; align-items: center; gap: 14px; padding: 10px 4px; cursor: pointer; background: none; border: 0; color: #fff; width: 100%; text-align: left; font-family: var(--font-body); }
.opt__diamond { width: 26px; height: 26px; flex: none; transform: rotate(45deg) scale(.75); background: var(--gray-40); border: 3px solid var(--gray-100); box-shadow: inset 2px 2px rgba(255,255,255,.5); }
.opt[aria-checked="true"] .opt__diamond { background: var(--green-30); }
.opt__preview { width: 92px; height: 50px; flex: none; border: 2px solid var(--gray-100); }
.opt__preview--system { background: linear-gradient(90deg, #7FAEFF 50%, #1A1633 50%); }
.opt__preview--day { background: linear-gradient(#4E86F0, #BFD7FF 75%, #F3E2C4); }
.opt__preview--night { background: radial-gradient(circle at 30% 35%, #FFE27A 1px, transparent 2px), radial-gradient(circle at 70% 60%, #fff 1px, transparent 2px), radial-gradient(ellipse at 80% 20%, rgba(124,92,255,.5), transparent 60%), #120F24; }
.opt b { display: block; font-weight: normal; font-size: 18px; }
.opt small { color: var(--gray-30); font-size: 14px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 4px; }
.setting-row input[type="range"] { width: 150px; accent-color: var(--green-30); }
.drawer__sep { height: 2px; background: var(--gray-100); box-shadow: 0 2px rgba(255,255,255,.1); margin: 8px 0; }

/* Visor de imágenes */
.lightbox { position: fixed; inset: 0; z-index: 120; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.88); padding: 60px 80px; }
.lightbox.is-open { display: flex; animation: fade .15s; }
.lightbox img { max-width: 100%; max-height: 100%; border: 2px solid var(--gray-100); background: #000; }
.lightbox__close { position: absolute; top: 14px; right: 14px; }
.lightbox__prev, .lightbox__next { position: absolute; top: 50%; margin-top: -22px; }
.lightbox__prev { left: 16px; }
.lightbox__next { right: 16px; }
.lightbox__count { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); padding: 2px 10px; background: rgba(0,0,0,.7); }

/* Toast */
.toasts { position: fixed; z-index: 130; left: 50%; top: calc(var(--header-h) + 14px); transform: translateX(-50%); display: grid; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; min-width: 280px; padding: 12px 16px; background: var(--gray-80); border: 2px solid var(--gray-100); box-shadow: inset 0 2px rgba(255,255,255,.12), 0 6px 0 rgba(0,0,0,.4); animation: toastIn .2s ease-out; }
.toast img { width: 32px; height: 32px; image-rendering: pixelated; }
.toast b { display: block; font-weight: normal; color: var(--lumina); }
.toast.is-leaving { animation: toastOut .2s ease-in forwards; }
@keyframes toastIn { from { transform: translateY(-16px); opacity: 0; } }
@keyframes toastOut { to { transform: translateY(-16px); opacity: 0; } }

/* ================= Pie ================= */
.footer {
    display: grid; justify-items: center; gap: 14px;
    padding: 26px 22px 30px; text-align: center;
    background: linear-gradient(rgba(8,7,14,.75), rgba(8,7,14,.95));
    border-top: 3px solid #1E1E1F;
    box-shadow: inset 0 3px 0 rgba(255,255,255,.06);
    font-size: 14px; color: var(--gray-30);
}
.footer__brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-title); font-size: 18px; color: #fff; }
.footer__brand img { width: 34px; height: 34px; border: 2px solid #1E1E1F; }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.footer__legal { color: var(--gray-40); font-size: 13px; }

/* ================= Aviso de cookies ================= */
.cc {
    --cc-bg: var(--gray-70);
    position: fixed; z-index: 110; left: 18px; bottom: 18px;
    width: min(440px, 100% - 36px);
    background: var(--cc-bg); border: 2px solid var(--gray-100);
    box-shadow: inset 0 2px rgba(255,255,255,.15), 0 10px 0 rgba(0,0,0,.4);
    transform: translateY(calc(100% + 40px)); opacity: 0;
}
.cc[hidden] { display: none; }
.cc.is-open { animation: ccIn .55s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.cc.is-leaving { animation: ccOut .35s ease-in forwards; }
@keyframes ccIn {
    0% { transform: translateY(calc(100% + 40px)); opacity: 0; }
    60% { opacity: 1; }
    100% { transform: none; opacity: 1; }
}
@keyframes ccOut { from { transform: none; opacity: 1; } to { transform: translateY(calc(100% + 40px)); opacity: 0; } }
.cc__head { display: flex; align-items: center; gap: 14px; padding: 12px 18px; background: var(--gray-80); border-bottom: 2px solid var(--gray-100); }
.cc__head h2 { font-family: var(--font-title); font-size: 24px; color: var(--lumina); }
.cc__icon { position: relative; width: 48px; height: 48px; flex: none; margin-top: -30px; filter: drop-shadow(0 4px 0 rgba(0,0,0,.35)); }
.cc__cookie { width: 48px; height: 48px; animation: ccBob 2.4s ease-in-out infinite; }
.cc__bite { opacity: 0; }
.cc.is-eaten .cc__bite { opacity: 1; }
.cc.is-eaten .cc__cookie { animation: ccChomp .4s steps(2) both; }
@keyframes ccBob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-6px) rotate(6deg); } }
@keyframes ccChomp { 0% { transform: scale(1.25) rotate(-10deg); } 100% { transform: scale(1) rotate(0); } }
/* Migas que caen de la galleta */
.cc__crumbs { position: absolute; left: 30px; top: 18px; width: 40px; height: 40px; pointer-events: none; }
.cc__crumbs i { position: absolute; top: 0; width: 4px; height: 4px; background: #C98B4B; opacity: 0; animation: ccCrumb 2.4s ease-in infinite; }
.cc__crumbs i:nth-child(1) { left: 6px; animation-delay: .2s; }
.cc__crumbs i:nth-child(2) { left: 18px; background: #3B2210; animation-delay: .9s; }
.cc__crumbs i:nth-child(3) { left: 28px; animation-delay: 1.5s; }
.cc__crumbs i:nth-child(4) { left: 12px; background: #E0A865; animation-delay: 2s; }
.cc.is-eaten .cc__crumbs i { animation: ccBurst .45s ease-out forwards; }
.cc.is-eaten .cc__crumbs i:nth-child(odd) { --dx: -22px; }
.cc.is-eaten .cc__crumbs i:nth-child(even) { --dx: 22px; }
@keyframes ccCrumb { 0% { opacity: 0; transform: translateY(0); } 15% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(30px); } }
@keyframes ccBurst { 0% { opacity: 1; transform: translate(0, -8px); } 100% { opacity: 0; transform: translate(var(--dx), -34px) rotate(90deg); } }
.cc__main { padding: 16px 18px 16px; display: grid; gap: 14px; }
.cc__main p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--gray-20); }
.cc__main p b { font-weight: normal; color: #fff; }
.cc__prefs { display: grid; gap: 4px; padding: 6px 10px; background: rgba(0,0,0,.18); border: 2px solid var(--gray-100); animation: fade .2s; }
.cc__prefs[hidden] { display: none; }
.cc__prefs .setting-row b { display: block; font-weight: normal; }
.cc__prefs .setting-row small { display: block; color: var(--gray-30); font-size: 13px; }
.cc__prefs .switch[disabled] { opacity: .6; cursor: not-allowed; }
.cc__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cc__actions .btn { width: 100%; font-family: var(--font-title); letter-spacing: .5px; }
.cc__more { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cc__link { background: none; border: 0; padding: 0; color: var(--blue-10); font-family: var(--font-body); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cc__link:hover { color: #fff; }

/* ================= Páginas legales ================= */
.legal { padding: 26px 30px; font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; color: var(--gray-20); }
.legal__updated { display: inline-block; margin-bottom: 6px; padding: 2px 8px; font-size: 13px; color: var(--gray-30); background: rgba(255,255,255,.06); }
.legal h2 { font-family: var(--font-title); font-size: 21px; margin: 28px 0 8px; color: #fff; letter-spacing: .3px; }
.legal h2::before { content: "◆ "; color: var(--green-30); }
.legal p { margin: 8px 0; }
.legal ul { padding-left: 22px; margin: 8px 0; }
.legal li { margin: 4px 0; }
.legal li::marker { content: "■  "; color: var(--green-30); font-size: 12px; }
.legal b { font-weight: normal; color: #fff; }
.legal a:not(.btn), .legal .cc__link { color: var(--blue-10); font-size: inherit; }
.legal table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 14px; }
.legal th, .legal td { text-align: left; padding: 8px 10px; border: 2px solid var(--gray-100); vertical-align: top; }
.legal th { background: var(--gray-80); font-weight: normal; color: var(--lumina); }
.legal__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* Enlaces legales en la esquina inferior izquierda del pie */
.footer { position: relative; padding-bottom: 54px; }
.footer__corner { position: absolute; left: 22px; bottom: 16px; display: flex; gap: 4px; align-items: center; font-size: 13px; }
.footer__corner a, .footer__corner button { background: none; border: 0; padding: 2px 4px; color: var(--gray-40); font-family: var(--font-body); font-size: 13px; text-decoration: none; cursor: pointer; }
.footer__corner a:hover, .footer__corner button:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer__corner span { color: var(--gray-60); }

/* ================= Responsive ================= */
@media (max-width: 1280px) {
    .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .topbar__brand { display: none; }
}
@media (max-width: 1024px) {
    .topbar__nav { position: fixed; top: var(--header-h); left: 0; right: 0; flex-direction: column; margin: 0; padding: 14px; background: var(--gray-70); border-bottom: 4px solid var(--gray-50); display: none; }
    .topbar__nav.is-open { display: flex; }
    .topbar__nav .btn { width: 100%; }
    .topbar__menu { display: inline-flex; }
    .grid, .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-top, .about { grid-template-columns: 1fr; }
    .hero { grid-template-columns: 1fr; text-align: center; }
    .hero__logo { width: 220px; margin: 0 auto; }
    .hero__text { margin-left: auto; margin-right: auto; }
    .hero__actions, .stats { justify-content: center; }
}
@media (max-width: 640px) {
    :root { --header-h: 64px; }
    .page { width: calc(100% - 24px); padding-top: 18px; }
    .topbar { padding: 0 10px; gap: 6px; }
    .topbar__logo img { width: 44px; height: 44px; }
    .topbar__contact span { display: none; }
    .topbar__contact { padding: 0 0 6px; width: 48px; }
    .dock { right: 10px; bottom: 10px; padding: 6px 6px 2px; gap: 6px; }
    .dock .btn { --h: 38px; width: 40px; }
    .dock #soundBtn { display: none; } /* en móvil el sonido se controla desde Ajustes */
    .drawer { left: 10px; right: 68px; bottom: 10px; width: auto; }
    .grid, .grid--3 { grid-template-columns: 1fr; }
    .hero { padding: 22px 16px; }
    .desc, .about__text { padding: 18px 16px; }
    .dl-row { flex-wrap: wrap; }
    .dl-row .btn { width: 100%; min-width: 0; }
    .lightbox { padding: 60px 10px; }
    .section__title { font-size: 18px; }
    .cc { left: 10px; bottom: 10px; width: auto; right: 68px; }
    .cc__head h2 { font-size: 20px; }
    .cc__main { padding: 14px; }
    .legal { padding: 18px 16px; }
    .legal table, .legal tbody, .legal tr, .legal td { display: block; }
    .legal thead { display: none; }
    .legal tr { border: 2px solid var(--gray-100); margin-bottom: 8px; }
    .legal td { border: 0; padding: 4px 10px; }
}
@media (max-width: 1024px) {
    .footer { padding-bottom: 30px; }
    .footer__corner { position: static; flex-wrap: wrap; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .cc.is-open { transform: none; opacity: 1; }
}
