/* ============================================================
   tools-index.css — ML Tools directory page
   Brand: dark bg, gold accent, Inter font, 14px radius
   ============================================================ */

/* ---- Hero ---- */
.dir-hero {
    padding: 80px 20px 40px;
    text-align: center;
}
.dir-hero .hero-title {
    font-size: clamp(2.2rem, 6vw, 3.6rem);
    font-weight: 800;
    color: var(--text);
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}
.dir-hero .hero-title .accent { color: var(--accent); }
.dir-hero .hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.65;
}

/* ---- Tool Card Grid ---- */
.dir-grid-section {
    padding: 20px 20px 80px;
}
.dir-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 28px;
    max-width: 900px;
    margin: 0 auto;
}

.tool-card {
    background: var(--surface, #0f0f0f);
    border: 1px solid var(--border, #2a2a2a);
    border-radius: var(--radius, 14px);
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.tool-card:hover {
    border-color: var(--accent, #ffd700);
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(255, 215, 0, 0.08);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent, #ffd700);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}
.tool-card:hover::before { opacity: 1; }

/* ---- Tool Preview (image area) ---- */
.tool-preview {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--surface-soft, #161616);
    position: relative;
}
.tool-illustration {
    width: 100%;
    height: 100%;
    display: block;
    transition: transform 0.3s ease;
}
.tool-card:hover .tool-illustration {
    transform: scale(1.03);
}

/* ---- Tool Body ---- */
.tool-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 12px;
}
.tool-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text, #f5f5f5);
    margin: 0;
}
.tool-body p {
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--text-muted, #c9c9c9);
    margin: 0;
    flex: 1;
}

/* ---- Tags ---- */
.tool-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.tool-tags .tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    padding: 4px 10px;
    border-radius: 20px;
    color: var(--color-yellow, #f5c518);
    background: rgba(245, 197, 24, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.15);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ---- Launch Button ---- */
.btn-launch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--accent, #ffd700);
    color: var(--bg, #000);
    border-radius: var(--radius, 14px);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    margin-top: 4px;
    align-self: flex-start;
    box-shadow: 0 6px 18px rgba(255, 215, 0, 0.12);
}
.btn-launch:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(255, 215, 0, 0.24);
}
.btn-launch:active {
    transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .dir-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .tool-preview {
        height: 160px;
    }
}
