/* index.css — Homepage-specific styles
   Accessibility: Web Accessibility Cookbook (O'Reilly)
   Security:      Web Application Security 2nd Ed (O'Reilly)  */

/* ---- Max-width constraint for home page ---- */
body.home main {
    max-width: 1260px;
    padding: 0 30px;
}

/* ---- Hero section ---- */
.hero-section {
    padding: 10px 20px 52px;
    text-align: center;
}

.hero-title {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-green);
    font-size: 3rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 0 20px rgba(var(--accent-green-rgb), 0.8),
                 0 0 40px rgba(var(--accent-green-rgb), 0.3);
    margin: 0 0 14px;
}

.hero-tagline {
    color: var(--text-subtle);
    font-size: 1.05rem;
    max-width: 520px;
    margin: 0 auto 40px;
    line-height: 1.6;
    font-family: 'Roboto', sans-serif;
}

/* ---- Stats row ---- */
.hero-stats {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 0;
}

.stat-item {
    text-align: center;
    padding: 0 40px;
}

.stat-item + .stat-item {
    border-left: 1px solid var(--dark-panel-alt);
}

.stat-num {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--accent-green);
    text-shadow: 0 0 12px rgba(var(--accent-green-rgb), 0.6);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-lbl {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-subtle);
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
}

/* ---- Content sections ---- */
/* aria-labelledby on each section — Web Accessibility Cookbook ch. 2 */
.content-section {
    max-width: 1200px;
    margin: 0 auto 50px;
    width: 100%;
    text-align: left;
}

.section-heading {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-subtle);
    margin: 0 0 22px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.section-heading::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--dark-panel-alt);
}

/* ---- Image wrapper (same pattern as GM_Screen-hub.css) ---- */
.card-img-wrap {
    position: relative;
    overflow: hidden;
}

.img-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(to bottom, transparent, var(--dark-panel));
    pointer-events: none;
}

/* Image hover zoom — Web Accessibility Cookbook ch. 10 */
@media (prefers-reduced-motion: no-preference) {
    .card-img-wrap .preview-image {
        transition: transform 0.45s ease;
    }
    .preview-card:hover .card-img-wrap .preview-image {
        transform: scale(1.06);
    }
}

@media (prefers-reduced-motion: reduce) {
    .card-img-wrap .preview-image {
        transition: none;
    }
}

/* ---- Category badge ---- */
.card-category {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #fff;
    font-family: 'Roboto', sans-serif;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.cat-campaign { background: rgba(120, 50,  0,   0.85); } /* amber-brown */
.cat-tools    { background: rgba(0,   70,  150, 0.85); } /* deep blue   */

/* ---- Card-as-link pattern ---- */
/* Web Accessibility Cookbook ch. 7 — ::after fills the card via position:absolute
   relative to .preview-card (nearest position:relative ancestor from site.css) */
.preview-card {
    cursor: default;
}

.preview-link::after {
    content: '';
    position: absolute;
    inset: 0;
    cursor: pointer;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }
    .stat-item {
        padding: 0 24px;
    }
    .stat-num {
        font-size: 1.8rem;
    }
    body.home main {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.7rem;
        letter-spacing: 1.5px;
    }
    .hero-tagline {
        font-size: 0.9rem;
    }
    .stat-item {
        padding: 0 16px;
    }
    .stat-item + .stat-item {
        border-left: none;
        border-top: 1px solid var(--dark-panel-alt);
        padding-top: 16px;
    }
    .hero-stats {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }
    .section-heading {
        font-size: 0.72rem;
        letter-spacing: 2px;
    }
}
