/* Portal jbellido.es · v2.0 (Lanzador)
   Para añadir una aplicación no hace falta tocar este fichero:
   basta con copiar una tarjeta en index.html y elegir uno de los
   colores definidos más abajo (data-color). */

:root {
    color-scheme: light dark;

    --fondo: #f6f6f3;
    --texto: #16181d;
    --suave: #5b606a;
    --linea: #dcdcd6;
    --hover: rgb(0 0 0 / 0.05);
    --foco: #1d4ed8;
    --sombra-icono: 0 1px 2px rgb(0 0 0 / 0.14), 0 8px 18px -8px rgb(0 0 0 / 0.35);

    font-family:
        system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

@media (prefers-color-scheme: dark) {
    :root {
        --fondo: #131417;
        --texto: #f1f2f4;
        --suave: #a3a8b2;
        --linea: #2b2d33;
        --hover: rgb(255 255 255 / 0.06);
        --foco: #8ab4ff;
        --sombra-icono: inset 0 0 0 1px rgb(255 255 255 / 0.08);
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--fondo);
    color: var(--texto);
}

/* ---------- Estructura ---------- */

.portal {
    width: min(100% - 2rem, 48rem);
    min-height: 100vh;
    min-height: 100svh;
    margin-inline: auto;
    padding-block: 3rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cabecera {
    text-align: center;
}

.fecha {
    margin: 0 0 0.35rem;
    color: var(--suave);
    font-size: 0.95rem;
}

h1 {
    margin: 0;
    font-size: clamp(2.1rem, 7vw, 3.1rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

/* ---------- Rejilla de aplicaciones ---------- */

.apps {
    list-style: none;
    margin: 2.75rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1rem;
}

.apps > li {
    flex: 0 0 calc(50% - 0.5rem);
    display: flex;
}

@media (min-width: 40rem) {
    .apps > li {
        flex-basis: 11rem;
    }
}

.app {
    --tile: #475569;
    --glyph: #ffffff;

    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 1.25rem 0.75rem 1.1rem;
    border-radius: 1.25rem;
    color: inherit;
    text-align: center;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.15s ease;
}

.app:hover,
.app:active {
    background: var(--hover);
}

.app:focus-visible {
    outline: 3px solid var(--foco);
    outline-offset: 2px;
}

.app-icono {
    width: 4.25rem;
    height: 4.25rem;
    margin-bottom: 0.45rem;
    display: grid;
    place-items: center;
    border-radius: 1.2rem;
    background: var(--tile);
    color: var(--glyph);
    box-shadow: var(--sombra-icono);
    transition: transform 0.15s ease;
}

.app:hover .app-icono {
    transform: translateY(-2px);
}

.app-icono svg {
    width: 2.15rem;
    height: 2.15rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-nombre {
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.25;
}

.app-desc {
    color: var(--suave);
    font-size: 0.84rem;
    line-height: 1.35;
}

/* ---------- Colores de las aplicaciones ---------- */

.app[data-color="azul"]     { --tile: #2563eb; }
.app[data-color="turquesa"] { --tile: #0f766e; }
.app[data-color="ambar"]    { --tile: #b45309; }
.app[data-color="verde"]    { --tile: #1f6b47; }
.app[data-color="violeta"]  { --tile: #6d28d9; }
.app[data-color="coral"]    { --tile: #c2410c; }
.app[data-color="rosa"]     { --tile: #be185d; }
.app[data-color="pizarra"]  { --tile: #475569; }

@media (prefers-color-scheme: dark) {
    .app                        { --tile: #334155; --glyph: #dbe3ee; }
    .app[data-color="azul"]     { --tile: #1e3a8a; --glyph: #c7dbff; }
    .app[data-color="turquesa"] { --tile: #134e4a; --glyph: #a7f0e0; }
    .app[data-color="ambar"]    { --tile: #78400c; --glyph: #ffd9a3; }
    .app[data-color="verde"]    { --tile: #14532d; --glyph: #bdeccd; }
    .app[data-color="violeta"]  { --tile: #4c1d95; --glyph: #ddd0ff; }
    .app[data-color="coral"]    { --tile: #7c2d12; --glyph: #ffcdb5; }
    .app[data-color="rosa"]     { --tile: #831843; --glyph: #ffc8de; }
    .app[data-color="pizarra"]  { --tile: #334155; --glyph: #dbe3ee; }
}

/* ---------- Pie ---------- */

.pie {
    margin-top: 3.5rem;
    text-align: center;
    color: var(--suave);
    font-size: 0.85rem;
}

.pie a {
    display: inline-block;
    padding: 0.4rem 0.6rem;
    border-radius: 0.5rem;
    color: inherit;
    text-underline-offset: 0.2em;
}

.pie a:hover {
    color: var(--texto);
}

.pie a:focus-visible {
    outline: 3px solid var(--foco);
    outline-offset: 1px;
}

.atajos {
    margin: 0.5rem 0 0;
}

kbd {
    padding: 0.05rem 0.35rem;
    border: 1px solid var(--linea);
    border-radius: 0.3rem;
    font-family: inherit;
    font-size: 0.8rem;
}

/* Los atajos de teclado solo tienen sentido con teclado y ratón */
@media (hover: none), (pointer: coarse) {
    .atajos {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app,
    .app-icono {
        transition: none;
    }

    .app:hover .app-icono {
        transform: none;
    }
}
