/* ==========================================
   TIERSTRATEGY — TAXONOMÍA TIER
========================================== */

.tier-page {
    width: min(calc(100% - 56px), 1180px);
    margin: 0 auto;
    padding: 72px 0 90px;
    color: var(--ts-text, #11182c);
}

.tier-header {
    margin-bottom: 52px;
}

.tier-header h1 {
    margin: 0 0 16px;
    color: var(--ts-text, #11182c);
    font-size: clamp(2.6rem, 6vw, 4rem);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.tier-description {
    max-width: 720px;
    margin: 0;
    color: var(--ts-text-soft, #647795);
    font-size: 1.1rem;
    line-height: 1.6;
}

.tier-pokemon-section h2 {
    margin: 0 0 28px;
    color: var(--ts-text, #11182c);
    font-size: clamp(1.9rem, 4vw, 2.5rem);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.025em;
}


/* Filtros */

.tier-filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin: 0 0 32px;
    padding: 22px;
    border: 1px solid var(--ts-border, #dbe2ee);
    border-radius: 20px;
    background: var(--ts-bg, #ffffff);
}

.tier-filters label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.tier-filters label > span {
    color: var(--ts-text, #11182c);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
}

.tier-filters input,
.tier-filters select {
    width: 100%;
    min-height: 46px;
    box-sizing: border-box;
    padding: 10px 13px;
    border: 1px solid var(--ts-border, #dbe2ee);
    border-radius: 12px;
    background: var(--ts-bg, #ffffff);
    color: var(--ts-text, #11182c);
    font: inherit;
    font-size: 0.95rem;
    line-height: 1.3;
    outline: none;
}

.tier-filters input::placeholder {
    color: var(--ts-text-soft, #647795);
    opacity: 0.85;
}

.tier-filters input:focus,
.tier-filters select:focus {
    border-color: var(--ts-blue, #2864e8);
    box-shadow: 0 0 0 3px rgba(40, 100, 232, 0.08);
}

.tier-filter-empty {
    margin: 0 0 28px;
    padding: 18px 20px;
    border: 1px solid var(--ts-border, #dbe2ee);
    border-radius: 16px;
    background: var(--ts-surface, #f5f7fa);
    color: var(--ts-text-soft, #647795);
    font-size: 1rem;
    line-height: 1.5;
}


/* Grid */

.tier-pokemon-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.tier-pokemon-card {
    min-width: 0;
}

.tier-pokemon-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    height: 100%;
    box-sizing: border-box;
    padding: 28px 26px 30px;
    border: 1px solid var(--ts-border, #dbe2ee);
    border-radius: 24px;
    background: var(--ts-bg, #ffffff);
    color: var(--ts-text, #11182c);
    transition:
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.tier-pokemon-card:hover {
    border-color: var(--ts-blue, #2864e8);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(17, 24, 44, 0.06);
}

.tier-pokemon-card .pokemon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.tier-pokemon-card .pokemon-link:focus-visible {
    outline: 2px solid var(--ts-blue, #2864e8);
    outline-offset: 4px;
    border-radius: 12px;
}


/* Sprite */

.tier-pokemon-card .pokemon-sprite {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 170px;
    margin-bottom: 18px;
}

.tier-pokemon-card .pokemon-sprite-img {
    display: block;
    width: min(100%, 180px);
    height: 170px;
    object-fit: contain;
}


/* Nombre */

.tier-pokemon-card .pokemon-name {
    width: 100%;
    margin: 0 0 16px;
    color: var(--ts-text, #11182c);
    font-size: 1.65rem;
    font-weight: 400;
    line-height: 1.2;
    text-align: center;
}


/* Tipos */

.tier-pokemon-card .pokemon-types {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    margin-bottom: 22px;
}

.tier-pokemon-card .pokemon-types .type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--ts-surface, #f5f7fa);
    color: var(--ts-text, #11182c);
    font-size: 0.95rem;
    line-height: 1;
    text-decoration: none;
}

.tier-pokemon-card .pokemon-types .type-link {
    color: inherit;
    text-decoration: none;
}

.tier-pokemon-card .pokemon-types .type-link:hover {
    text-decoration: none;
}

.tier-pokemon-card .pokemon-types .type-link:focus-visible {
    outline: 2px solid var(--ts-blue, #2864e8);
    outline-offset: 3px;
}


/* Estadísticas */

.tier-pokemon-card .pokemon-base-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    margin-top: auto;
}

.tier-pokemon-card .pokemon-base-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    padding: 9px 11px;
    border-radius: 10px;
    background: var(--ts-surface, #f5f7fa);
}

.tier-pokemon-card .pokemon-base-stat-name {
    color: var(--ts-text-soft, #647795);
    font-size: 0.82rem;
    line-height: 1.2;
}

.tier-pokemon-card .pokemon-base-stat-value {
    color: var(--ts-text, #11182c);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
}

.tier-pokemon-grid > p {
    margin: 0;
    color: var(--ts-text-soft, #647795);
    font-size: 1.1rem;
    line-height: 1.6;
}


/* Tablet */

@media (max-width: 1050px) {

    .tier-page {
        width: min(calc(100% - 48px), 900px);
        padding: 64px 0 80px;
    }

    .tier-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tier-pokemon-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* Móvil */

@media (max-width: 600px) {

    .tier-page {
        width: min(calc(100% - 40px), 520px);
        padding: 56px 0 70px;
    }

    .tier-header {
        margin-bottom: 42px;
    }

    .tier-header h1 {
        margin-bottom: 14px;
        font-size: clamp(2.3rem, 11vw, 3.2rem);
    }

    .tier-description {
        font-size: 1rem;
    }

    .tier-pokemon-section h2 {
        margin-bottom: 24px;
        font-size: 1.9rem;
    }

    .tier-filters {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-bottom: 28px;
        padding: 18px;
        border-radius: 18px;
    }

    .tier-pokemon-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .tier-pokemon-card {
        padding: 28px 24px 26px;
        border-radius: 22px;
    }

    .tier-pokemon-card .pokemon-sprite {
        min-height: 165px;
        margin-bottom: 18px;
    }

    .tier-pokemon-card .pokemon-sprite-img {
        width: min(100%, 175px);
        height: 165px;
    }

    .tier-pokemon-card .pokemon-name {
        font-size: 1.65rem;
    }

    .tier-pokemon-card .pokemon-base-stats {
        gap: 7px;
    }

    .tier-pokemon-card .pokemon-base-stat {
        padding: 8px 10px;
    }
}
