/* ============================================================
   /tools — hub-only styles (loaded AFTER redirect-checker.css)
   Page shell (.tools-page, .tools-hero, .product-cta) is inherited
   from redirect-checker.css. This sheet adds:
     - tier filter chips
     - tier sections (Free / Tokens)
     - tier badges + tool-card upgrades
     - hub FAQ block
   Design tokens (--neon-cyan, --neon-magenta, --clip-*) come from
   /static/landing/styles.css via public_base.html.
   ============================================================ */

/* ----------------------------------------------------------------
   Hub container — wider than single-tool LPs (grid needs the width)
---------------------------------------------------------------- */

.tools-hub-page {
    max-width: 1120px;
}

/* ----------------------------------------------------------------
   Tier filter chips — single counts + filter control under the hero
   (the buttons double as the at-a-glance tally: All = total)
---------------------------------------------------------------- */

.tier-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tier-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    clip-path: var(--clip-button);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.tier-chip:hover {
    background: rgba(0, 245, 212, 0.06);
    border-color: rgba(0, 245, 212, 0.25);
    color: var(--text-primary);
}

.tier-chip.is-active {
    background: rgba(0, 245, 212, 0.12);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 14px rgba(0, 245, 212, 0.18);
}

.tier-chip-count {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    padding: 2px 7px;
    background: rgba(0, 0, 0, 0.35);
    color: inherit;
    clip-path: var(--clip-badge);
}

.tier-chip.is-active .tier-chip-count {
    background: rgba(0, 245, 212, 0.22);
}

/* ----------------------------------------------------------------
   Tier sections
---------------------------------------------------------------- */

.tier-section {
    margin: 0 0 56px;
}

.tier-section[hidden] {
    display: none;
}

.tier-section-header {
    margin: 0 0 26px;
    padding-bottom: 14px;
    position: relative;
}

.tier-section-header::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 52px;
    height: 2px;
    background: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 245, 212, 0.5);
}

.tier-section[data-tier="tokens"] .tier-section-header::after {
    background: var(--neon-magenta);
    box-shadow: 0 0 10px rgba(247, 37, 133, 0.5);
}

.tier-section-header h2 {
    font-family: var(--font-display);
    font-size: 28px;
    line-height: 1.2;
    margin: 0 0 10px;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.tier-section-header h2 .tier-section-count {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 12px;
    letter-spacing: 0.04em;
    vertical-align: middle;
}

.tier-section-header p {
    margin: 0;
    font-size: 14.5px;
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    max-width: 660px;
    line-height: 1.55;
}

/* ----------------------------------------------------------------
   Tools grid — override redirect-checker.css base
---------------------------------------------------------------- */

.tools-hub-page .tools-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    margin-bottom: 0;
}

.tools-hub-page .tool-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px 22px 56px;
    background: rgba(20, 22, 30, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    clip-path: var(--clip-card);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    position: relative;
    min-height: 240px;
}

.tools-hub-page .tool-card:hover {
    transform: translateY(-3px);
}

.tools-hub-page .tool-card[data-tier="free"]:hover {
    border-color: rgba(0, 245, 212, 0.45);
    box-shadow: 0 10px 26px rgba(0, 245, 212, 0.12);
}

.tools-hub-page .tool-card[data-tier="tokens"]:hover {
    border-color: rgba(247, 37, 133, 0.45);
    box-shadow: 0 10px 26px rgba(247, 37, 133, 0.12);
}

.tools-hub-page .tool-card h3 {
    font-family: var(--font-display);
    font-size: 17px;
    line-height: 1.25;
    margin: 4px 0 0;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.tools-hub-page .tool-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    flex-grow: 1;
}

/* ----------------------------------------------------------------
   Tier badge (top-right corner of card)
---------------------------------------------------------------- */

.tier-badge {
    display: inline-block;
    align-self: flex-start;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    padding: 4px 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    clip-path: var(--clip-badge);
}

.tier-badge-free {
    background: rgba(0, 245, 212, 0.14);
    color: #5af0cb;
    border: 1px solid rgba(0, 245, 212, 0.25);
}

.tier-badge-tokens {
    background: rgba(247, 37, 133, 0.12);
    color: #ff7ab0;
    border: 1px solid rgba(247, 37, 133, 0.3);
}

/* ----------------------------------------------------------------
   "What you get" deliverable sub-line
---------------------------------------------------------------- */

.tool-deliverable {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding-top: 4px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.tool-card[data-tier="free"] .tool-deliverable {
    color: rgba(90, 240, 203, 0.7);
}

.tool-card[data-tier="tokens"] .tool-deliverable {
    color: rgba(255, 122, 176, 0.7);
}

.tools-hub-page .tool-link {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 0;
    overflow: hidden;
    color: var(--neon-cyan);
    background: rgba(0, 245, 212, 0.1);
    border: 1px solid rgba(0, 245, 212, 0.3);
    clip-path: var(--clip-badge);
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.tools-hub-page .tool-link::after {
    content: "\2192";
    font-family: var(--font-mono);
    font-size: 16px;
    line-height: 1;
}

.tools-hub-page .tool-card:hover .tool-link {
    transform: translateX(3px);
    box-shadow: 0 0 14px rgba(0, 245, 212, 0.35);
}

.tools-hub-page .tool-card[data-tier="tokens"] .tool-link {
    color: var(--neon-magenta);
    background: rgba(247, 37, 133, 0.1);
    border-color: rgba(247, 37, 133, 0.3);
}

.tools-hub-page .tool-card[data-tier="tokens"]:hover .tool-link {
    box-shadow: 0 0 14px rgba(247, 37, 133, 0.35);
}

/* ----------------------------------------------------------------
   Hub FAQ — uses native <details> (no JS, no flash)
---------------------------------------------------------------- */

.hub-faq {
    margin: 56px 0 0;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hub-faq h2 {
    font-family: var(--font-display);
    font-size: 24px;
    margin: 0 0 24px;
    color: var(--text-primary);
}

.hub-faq details {
    background: rgba(20, 22, 30, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    clip-path: var(--clip-card);
    margin-bottom: 12px;
    padding: 18px 22px;
    transition: border-color 0.2s;
}

.hub-faq details[open] {
    border-color: rgba(0, 245, 212, 0.3);
}

.hub-faq summary {
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.hub-faq summary::-webkit-details-marker {
    display: none;
}

.hub-faq summary::after {
    content: "+";
    font-family: var(--font-mono);
    font-size: 22px;
    color: var(--neon-cyan);
    line-height: 1;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.hub-faq details[open] summary::after {
    transform: rotate(45deg);
}

.hub-faq details p {
    margin: 14px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
}

/* ----------------------------------------------------------------
   Responsive — mobile tweaks
---------------------------------------------------------------- */

@media (max-width: 640px) {
    .tier-filter {
        gap: 8px;
        margin-bottom: 32px;
    }

    .tier-chip {
        padding: 8px 14px;
        font-size: 11px;
    }

    .tier-section {
        margin-bottom: 44px;
    }

    .tier-section-header h2 {
        font-size: 19px;
    }

    .tools-hub-page .tools-grid {
        gap: 14px;
        grid-template-columns: 1fr;
    }

    .tools-hub-page .tool-card {
        min-height: 0;
        padding: 20px;
    }

    .hub-faq h2 {
        font-size: 21px;
    }
}

/* ----------------------------------------------------------------
   Reduced motion — kill transitions
---------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .tier-chip,
    .tools-hub-page .tool-card,
    .hub-faq details,
    .hub-faq summary::after {
        transition: none;
    }

    .tools-hub-page .tool-card:hover {
        transform: none;
    }
}
