@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700&family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&display=swap');

html { scroll-behavior: smooth; }                /* 1 */

body {
    font-family: 'DM Sans', sans-serif;
    margin: 0;
    padding: 0 2em 2em;
    background-color: #0b1d3a;
    color: #ffffff;
    line-height: 1.6;
}

/* --- Fondo: estrellas con forma de estrella, en movimiento --- */
body::before,
body::after {
    content: "";
    position: fixed;                             /* 2 */
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

body::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cg fill='white'%3E%3Cpolygon fill-opacity='0.6' transform='translate(30,40) scale(0.8)' points='10,0 12.9,6.9 20,7.6 14.6,12.4 16.2,19.5 10,15.8 3.8,19.5 5.4,12.4 0,7.6 7.1,6.9'/%3E%3Cpolygon fill-opacity='0.5' transform='translate(120,15) scale(0.5)' points='10,0 12.9,6.9 20,7.6 14.6,12.4 16.2,19.5 10,15.8 3.8,19.5 5.4,12.4 0,7.6 7.1,6.9'/%3E%3Cpolygon fill-opacity='0.65' transform='translate(210,70) scale(1)' points='10,0 12.9,6.9 20,7.6 14.6,12.4 16.2,19.5 10,15.8 3.8,19.5 5.4,12.4 0,7.6 7.1,6.9'/%3E%3Cpolygon fill-opacity='0.5' transform='translate(270,150) scale(0.55)' points='10,0 12.9,6.9 20,7.6 14.6,12.4 16.2,19.5 10,15.8 3.8,19.5 5.4,12.4 0,7.6 7.1,6.9'/%3E%3Cpolygon fill-opacity='0.5' transform='translate(80,130) scale(0.6)' points='10,0 12.9,6.9 20,7.6 14.6,12.4 16.2,19.5 10,15.8 3.8,19.5 5.4,12.4 0,7.6 7.1,6.9'/%3E%3Cpolygon fill-opacity='0.6' transform='translate(160,200) scale(0.9)' points='10,0 12.9,6.9 20,7.6 14.6,12.4 16.2,19.5 10,15.8 3.8,19.5 5.4,12.4 0,7.6 7.1,6.9'/%3E%3Cpolygon fill-opacity='0.5' transform='translate(40,250) scale(0.55)' points='10,0 12.9,6.9 20,7.6 14.6,12.4 16.2,19.5 10,15.8 3.8,19.5 5.4,12.4 0,7.6 7.1,6.9'/%3E%3Cpolygon fill-opacity='0.55' transform='translate(240,260) scale(0.7)' points='10,0 12.9,6.9 20,7.6 14.6,12.4 16.2,19.5 10,15.8 3.8,19.5 5.4,12.4 0,7.6 7.1,6.9'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 300px 300px;
    animation: mover-a 70s linear infinite, titilar 4s ease-in-out infinite alternate;   /* 3 */
}

body::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='440' height='440'%3E%3Cg fill='%23d2beff'%3E%3Cpolygon fill-opacity='0.55' transform='translate(60,90) scale(0.65)' points='10,0 12.9,6.9 20,7.6 14.6,12.4 16.2,19.5 10,15.8 3.8,19.5 5.4,12.4 0,7.6 7.1,6.9'/%3E%3Cpolygon fill-opacity='0.6' transform='translate(190,30) scale(0.9)' points='10,0 12.9,6.9 20,7.6 14.6,12.4 16.2,19.5 10,15.8 3.8,19.5 5.4,12.4 0,7.6 7.1,6.9'/%3E%3Cpolygon fill-opacity='0.5' transform='translate(320,110) scale(0.55)' points='10,0 12.9,6.9 20,7.6 14.6,12.4 16.2,19.5 10,15.8 3.8,19.5 5.4,12.4 0,7.6 7.1,6.9'/%3E%3Cpolygon fill-opacity='0.6' transform='translate(250,230) scale(0.8)' points='10,0 12.9,6.9 20,7.6 14.6,12.4 16.2,19.5 10,15.8 3.8,19.5 5.4,12.4 0,7.6 7.1,6.9'/%3E%3Cpolygon fill-opacity='0.55' transform='translate(100,300) scale(0.95)' points='10,0 12.9,6.9 20,7.6 14.6,12.4 16.2,19.5 10,15.8 3.8,19.5 5.4,12.4 0,7.6 7.1,6.9'/%3E%3Cpolygon fill-opacity='0.5' transform='translate(380,340) scale(0.6)' points='10,0 12.9,6.9 20,7.6 14.6,12.4 16.2,19.5 10,15.8 3.8,19.5 5.4,12.4 0,7.6 7.1,6.9'/%3E%3Cpolygon fill-opacity='0.5' transform='translate(20,400) scale(0.5)' points='10,0 12.9,6.9 20,7.6 14.6,12.4 16.2,19.5 10,15.8 3.8,19.5 5.4,12.4 0,7.6 7.1,6.9'/%3E%3Cpolygon fill-opacity='0.55' transform='translate(180,390) scale(0.65)' points='10,0 12.9,6.9 20,7.6 14.6,12.4 16.2,19.5 10,15.8 3.8,19.5 5.4,12.4 0,7.6 7.1,6.9'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 440px 440px;
    animation: mover-b 110s linear infinite, titilar 6s ease-in-out infinite alternate-reverse;
}

@keyframes mover-a {
    from { background-position: 0 0; }
    to   { background-position: 300px 300px; }
}

@keyframes mover-b {
    from { background-position: 0 0; }
    to   { background-position: -440px 440px; }
}

@keyframes titilar {
    from { opacity: 0.5; }
    to   { opacity: 1; }
}

h1, h2 { font-family: 'Outfit', sans-serif; color: #ffffff; }
h3 { font-family: 'DM Sans', sans-serif; font-size: 1em; }
section { scroll-margin-top: 8em; }

/* --- Cabecera fija --- */
header {
    position: sticky;                            /* 4 */
    top: 0;
    z-index: 10;
    text-align: center;
    padding: 1em 0 0.8em;
    background: rgba(11, 29, 58, 0.8);
    backdrop-filter: blur(10px);                 /* 5 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

header h1 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    text-shadow: 0 0 20px rgba(165, 136, 244, 0.7);   /* 6 */
    letter-spacing: 1px;                         /* 7 */
    animation: aparecer 1.2s ease-out;           /* 8 */
}

@keyframes aparecer {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8em;
    margin-top: 0.8em;
}

nav a {
    padding: 0.4em 1.3em;
    border-radius: 50px;
    background-color: #a588f4;
    color: #0b1d3a;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s, background-color 0.2s;   /* 9 */
}

nav a:hover {
    background-color: #ffffff;
    transform: translateY(-3px);                 /* 10 */
}

/* --- Contenedor: tareas | texto | tareas --- */
#container {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 2em;
    align-items: start;
    max-width: 1300px;
    margin: 2.5em auto;
}

.intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: sticky;                            /* 11 */
    top: 9em;
}

.boton {
    margin-top: 1.5em;
    padding: 0.9em 2.5em;
    border-radius: 50px;
    background: linear-gradient(135deg, #a588f4, #7f9cf5);   /* 12 */
    color: #0b1d3a;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(165, 136, 244, 0.35);        /* 13 */
    transition: transform 0.25s, box-shadow 0.25s;
}

.boton:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 28px rgba(165, 136, 244, 0.6);
}

/* --- Galerías de tareas (cuadrados grandes, 4 por lado) --- */
.galeria {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5em;
}

.tarjeta {
    background-color: #2e2060;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.tarjeta a { display: block; color: inherit; text-decoration: none; }

.tarjeta img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;                         /* 14 */
    object-fit: cover;                           /* 15 */
    filter: grayscale(70%);                      /* 16 */
    transition: filter 0.3s;
}

.tarjeta h3 { text-align: center; padding: 0.5em 0; margin: 0; }

.tarjeta:hover {
    transform: rotate(-2deg) scale(1.04);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
.tarjeta:hover img { filter: grayscale(0%); }

/* --- Barras (izquierda) + playlist (derecha) --- */
.bloques {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2em;
    max-width: 1100px;
    margin: 4em auto;
}

.barras {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}

.bloque {
    text-align: center;
    padding: 2em 1.5em;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.15));
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
}

.bloque:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 40px rgba(124, 90, 214, 0.5);
}

.sobre { background-color: #2e2060; }
.herramientas { background-color: #43318a; }
.contacto { background-color: #5b3fb0; }
.contacto a { color: #ffffff; }

.etiquetas {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8em;
    padding: 0;
    list-style: none;
}

.etiquetas li {
    padding: 0.4em 1.2em;
    border-radius: 50px;
    background-color: rgba(255, 255, 255, 0.15);
}

/* --- Playlist --- */
.tema-aparte {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1.5em 1em;
    border-radius: 20px;
    background: linear-gradient(160deg, #a588f4, #6a4bc4);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.tema-aparte iframe {
    width: 100%;
    border: 0;
    border-radius: 12px;
}

footer { text-align: center; opacity: 0.7; }

/* --- Responsivo: tablet --- */
@media (max-width: 1000px) {
    #container { grid-template-columns: 1fr; }
    .intro { order: -1; position: static; }
    .galeria { grid-template-columns: repeat(3, 1fr); }
    .bloques { grid-template-columns: 1fr; }
}

/* --- Responsivo: celular --- */
@media (max-width: 600px) {
    body { padding: 0 1em 1em; }
    .galeria { grid-template-columns: 1fr; }
}

/* --- Accesibilidad: sin animaciones si el usuario las desactiva --- */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

