/* Tema de temporada: Otoño de cobijita (config/theme.php = 'otono'). Noviembre 2026.
   Pedido de Ricardo al terminar Día de Muertos: "una lavadita de cara" para noviembre.
   Va encima de app.css y solo cambia lo que hace falta. Idea: tarde de otoño en la cobija de Emma:
   hojas que caen, cuadros de franela, bufanda tejida de rayas y el letrero de neón rosa de siempre.
   Colores: calabaza #e07a2e, terracota #c4522b, mostaza #e0a526, vino #7a2433, oliva #5b6b3a, durazno #f7dcc4.
   Dibujos: assets/img/hoja-arce.svg, hoja-hojita.svg y hojas-otono.svg (tools/dibujos/hojas.py). */

.tema-otono {
    --fondo: #fbf1e4;
    --papel: #fffdf9;
    --pelaje-claro: #f3dcc3;
    --pelaje: #ecc9a3;
    --pelaje-sombra: #d9a571;

    --calabaza: #e07a2e;
    --terracota: #c4522b;
    --mostaza: #e0a526;
    --vino: #7a2433;
    --oliva: #5b6b3a;
    --durazno: #f7dcc4;
    --crema: #fff6ea;

    --blog-fondo: #e3ead2;
    --blog-texto: #44522b;
    --noticia-fondo: #ffdcd0;
    --noticia-texto: #9a3416;
    --fotos-fondo: #fbe4b0;
    --fotos-texto: #7a4c00;
    --fanart-fondo: #f2dde4;
    --fanart-texto: #7a2433;

    /* Bufanda tejida: rayas de otoño que van bajo el encabezado y arriba del pie. */
    --bufanda: repeating-linear-gradient(90deg,
        var(--terracota) 0 34px, var(--mostaza) 34px 52px, var(--vino) 52px 80px,
        var(--calabaza) 80px 112px, var(--oliva) 112px 130px);
}

.tema-otono:not(.is-bare) {
    background: var(--fondo);
}

/* ---------- Encabezado con su bufanda ---------- */

.tema-otono .site-header {
    background: rgba(251, 241, 228, 0.94);
    border-bottom: 0;
}

.tema-otono .site-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 6px;
    background: var(--bufanda);
    pointer-events: none;
}

.tema-otono .brand img {
    border-color: var(--calabaza);
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--terracota);
}

.tema-otono .site-nav a:hover,
.tema-otono .account-button:hover {
    background: var(--durazno);
}

.tema-otono .site-nav a[aria-current="page"] {
    background: var(--terracota);
    color: #fff;
}

.tema-otono main {
    padding-top: 14px;
}

/* ---------- Botones ----------
   Igual que en el tema de Muertos: con :where() solo se cambia el botón de siempre; los que tienen su propio color
   (tarjetas del Club, resultado de la Lotería, "peligro" del panel) lo conservan y se siguen leyendo. */

:where(.tema-otono) .button:where(:not(.button--danger)):hover {
    background: var(--terracota);
    border-color: var(--terracota);
}

:where(.tema-otono) .button--ghost:hover {
    background: var(--durazno);
    border-color: var(--mascara);
    color: var(--mascara);
}

/* Tarjetas del Club (/club) en colores de otoño, con botón claro y letra oscura para que se lea. */
.tema-otono .club-games {
    background: var(--oliva);
    color: var(--crema);
    box-shadow: 0 6px 0 #3c4725;
}

.tema-otono .club-games .button {
    background: var(--mostaza);
    border-color: var(--mostaza);
    color: #2f3a1b;
}

.tema-otono .club-games--tops {
    background: var(--vino);
    box-shadow: 0 6px 0 #4d1520;
}

.tema-otono .club-games--tops .button {
    background: #ffd0df;
    border-color: #ffd0df;
    color: var(--vino);
}

.tema-otono .club-games--huesito {
    background: #8a3a1c;
    box-shadow: 0 6px 0 #5c260f;
}

.tema-otono .club-games--huesito .button {
    background: #ffe7c9;
    border-color: #ffe7c9;
    color: #8a3a1c;
}

.tema-otono .club-games:hover .button,
.tema-otono .club-games:focus-visible .button {
    background: #fff;
    border-color: #fff;
}

/* ---------- Portada: Emma en su cobija de franela ---------- */

.tema-otono .hero {
    isolation: isolate;
    background:
        repeating-linear-gradient(90deg,
            rgba(196, 82, 43, 0.13) 0 22px, transparent 22px 70px,
            rgba(122, 36, 51, 0.08) 70px 76px, transparent 76px 140px),
        repeating-linear-gradient(0deg,
            rgba(196, 82, 43, 0.13) 0 22px, transparent 22px 70px,
            rgba(122, 36, 51, 0.08) 70px 76px, transparent 76px 140px),
        var(--durazno);
    box-shadow: 0 8px 0 var(--calabaza);
}

/* Hojitas que caen despacio sobre la cobija */
.tema-otono .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: url("../img/hojas-otono.svg") 0 0 / 240px;
    opacity: 0.42;
    animation: hojas-caen 70s linear infinite;
}

@keyframes hojas-caen {
    from { background-position: 0 0; }
    to { background-position: -240px 960px; }
}

.hero-temporada {
    display: none;
}

.tema-otono .hero-temporada {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 5px 14px 5px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(196, 82, 43, 0.25);
    color: var(--vino);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.tema-otono .hero-temporada::before {
    content: "";
    width: 22px;
    height: 22px;
    background: url("../img/hoja-arce.svg") center / contain no-repeat;
}

.tema-otono .hero-hi {
    color: var(--terracota);
}

.tema-otono .hero-actions .button--ghost {
    background: rgba(255, 255, 255, 0.6);
}

.tema-otono .hero-social .social-link:hover {
    background: var(--terracota);
    --icono-hueco: var(--terracota);
}

/* Fotos como fotitos instantáneas pegadas en la cobija, con hojas alrededor. */
.tema-otono .hero-photos::before {
    background: radial-gradient(closest-side, rgba(255, 246, 234, 0.85), rgba(255, 246, 234, 0) 75%);
}

.tema-otono .hero-photo {
    border: 6px solid #fff;
    border-bottom-width: 18px;
    border-radius: 6px;
    box-shadow: 0 10px 20px rgba(91, 38, 15, 0.22);
}

.hero-flor {
    display: none;
}

.tema-otono .hero-flor {
    display: block;
    position: absolute;
    z-index: 2;
    width: 13%;
    aspect-ratio: 1;
    background: url("../img/hoja-arce.svg") center / contain no-repeat;
    filter: drop-shadow(0 3px 3px rgba(91, 38, 15, 0.3));
    animation: hoja-llega 0.9s cubic-bezier(0.34, 1.3, 0.64, 1) both;
    pointer-events: none;
}

.tema-otono .hero-flor:nth-child(even) {
    background-image: url("../img/hoja-hojita.svg");
}

.tema-otono .hero-flor--1 { left: 24%; top: -2%; --giro: -25deg; animation-delay: 0.7s; }
.tema-otono .hero-flor--2 { right: -3%; top: 28%; width: 11%; --giro: 35deg; animation-delay: 0.85s; }
.tema-otono .hero-flor--3 { left: -3%; top: 50%; width: 11%; --giro: -50deg; animation-delay: 1s; }
.tema-otono .hero-flor--4 { left: 42%; bottom: -1%; width: 12%; --giro: 20deg; animation-delay: 1.15s; }
.tema-otono .hero-flor--5 { right: 28%; top: -5%; width: 9%; --giro: 60deg; animation-delay: 1.3s; }
.tema-otono .hero-flor--6 { left: 38%; top: 41%; width: 8%; --giro: -15deg; animation-delay: 1.45s; }

/* Cada hoja cae desde arriba meciéndose y se queda en su lugar. */
@keyframes hoja-llega {
    0% { opacity: 0; transform: translate(-18px, -60px) rotate(calc(var(--giro) - 70deg)); }
    50% { opacity: 1; transform: translate(12px, -20px) rotate(calc(var(--giro) + 25deg)); }
    100% { opacity: 1; transform: translate(0, 0) rotate(var(--giro)); }
}

/* ---------- Listado ---------- */

.tema-otono .feed-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tema-otono .feed-heading::before,
.tema-otono .page-head h1::before {
    content: "";
    flex: none;
    width: 1em;
    height: 1em;
    background: url("../img/hoja-arce.svg") center / contain no-repeat;
    transform: rotate(-12deg);
}

.tema-otono .page-head h1 {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tema-otono .card {
    border-color: var(--pelaje-claro);
    box-shadow: 0 6px 0 var(--pelaje);
}

.tema-otono .card:hover,
.tema-otono .card:focus-within {
    box-shadow: 0 9px 0 var(--calabaza);
}

.tema-otono .card-media--empty {
    background-image: url("../img/hojas-otono.svg");
    background-size: 200px;
}

.tema-otono .pager-pages a[aria-current="page"] {
    background: var(--terracota);
    color: #fff;
}

/* ---------- Pie: tarde de otoño ---------- */

.tema-otono .site-footer {
    position: relative;
    margin-top: 40px;
    background:
        linear-gradient(180deg, rgba(91, 38, 15, 0.82), rgba(59, 36, 24, 0.9)),
        url("../img/hojas-otono.svg") 0 0 / 240px,
        #4a2a1a;
    color: var(--crema);
}

.tema-otono .site-footer::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 8px;
    background: var(--bufanda);
}

.tema-otono .site-footer-inner {
    padding-top: 40px;
}

.tema-otono .site-footer .tail {
    display: none;
}

.tema-adornos {
    display: none;
}

.tema-otono .tema-adornos {
    display: flex;
    justify-content: center;
    align-items: end;
    gap: 4px;
    margin-bottom: 10px;
}

.tema-otono .tema-adornos i {
    width: 34px;
    aspect-ratio: 1;
    background: url("../img/hoja-hojita.svg") center / contain no-repeat;
    transform: rotate(-30deg);
}

.tema-otono .tema-adornos i:nth-child(2) {
    width: 48px;
    background-image: url("../img/hoja-arce.svg");
    transform: none;
}

.tema-otono .tema-adornos i:nth-child(3) {
    transform: rotate(30deg) scaleX(-1);
}

.tema-otono .site-footer .social-link {
    background: rgba(255, 255, 255, 0.14);
    --icono-hueco: #5b2a14;
}

.tema-otono .site-footer .social-link:hover {
    background: var(--calabaza);
    --icono-hueco: var(--calabaza);
}

.tema-otono .site-footer a {
    color: var(--crema);
}

.tema-otono .site-footer-small {
    color: #e9d3bf;
}

/* ---------- Menos movimiento si así lo pide el teléfono ---------- */

@media (prefers-reduced-motion: reduce) {
    .tema-otono .hero::before,
    .tema-otono .hero-flor {
        animation: none;
    }

    .tema-otono .hero-flor {
        transform: rotate(var(--giro));
    }
}
