/* home.css - split from app.css; load order fixed in index.html */
/* === HOME PAGE === */

/* sized to content height so the absolute bg can stretch the full page */
.home-page {
    position: relative;
    width: 100%;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10px 0 4px;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* glow behind the logo; only opacity animates (blur is static) */
.home-hero::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 46%;
    transform: translate(-50%, -50%);
    width: 52%;
    height: 62%;
    background: radial-gradient(ellipse, color-mix(in srgb, var(--accent) 50%, transparent), transparent 70%);
    filter: blur(42px);
    opacity: 0.3;
    animation: home-hero-glow 5s ease-in-out infinite;
    pointer-events: none;
}

.home-hero-img {
    width: 70%;
    max-width: 720px;
    opacity: 0.96;
    position: relative;
    z-index: 1;
}

/* === Animated background === */
/* negative inset bleeds the bg into .content's padding */
.home-bg {
    position: absolute;
    inset: -36px;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

/* Very dark base, barely-there purple hint */
.home-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 3%, #050507) 0%, #020104 100%);
    pointer-events: none;
}

/* static SVG waves - no per-frame cost */
.home-waves {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.55;
    transform: translateZ(0);
}

/* override the inline stop-color attributes so waves follow the active accent */
.home-waves stop {
    stop-color: var(--accent);
}

    .home-waves stop[stop-opacity="0"] {
        stop-color: color-mix(in srgb, var(--accent) 50%, #000);
    }

/* shooting stars - transform + opacity only */
.home-shoot {
    position: absolute;
    top: 0;
    left: 0;
    width: 90px;
    height: 1.5px;
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0) 0%,
        color-mix(in srgb, var(--accent-soft) 40%, transparent) 60%,
        rgba(255, 255, 255, 0.95) 95%,
        #ffffff 100%);
    border-radius: 999px;
    opacity: 0;
    will-change: transform, opacity;
}

.home-shoot-l1 { animation: home-shoot-l 11s linear infinite; animation-delay: 0.6s; }
.home-shoot-l2 { animation: home-shoot-l 14s linear infinite; animation-delay: 6.4s; width: 70px; }
.home-shoot-r1 { animation: home-shoot-r 11s linear infinite; animation-delay: 3.1s; }
.home-shoot-r2 { animation: home-shoot-r 14s linear infinite; animation-delay: 9.2s; width: 70px; }

@keyframes home-shoot-l {
    0%   { transform: translate(-120px, -60px) rotate(32deg); opacity: 0; }
    3%   { opacity: 0.95; }
    14%  { transform: translate(70vw, 60vh) rotate(32deg); opacity: 0; }
    100% { transform: translate(70vw, 60vh) rotate(32deg); opacity: 0; }
}

@keyframes home-shoot-r {
    0%   { transform: translate(calc(100vw + 60px), -60px) rotate(148deg); opacity: 0; }
    3%   { opacity: 0.95; }
    14%  { transform: translate(30vw, 60vh) rotate(148deg); opacity: 0; }
    100% { transform: translate(30vw, 60vh) rotate(148deg); opacity: 0; }
}

/* floating particles - slow upward drift */
.home-particle {
    position: absolute;
    width: 1.6px;
    height: 1.6px;
    background: color-mix(in srgb, var(--accent-soft) 85%, white);
    border-radius: 50%;
    box-shadow: 0 0 4px color-mix(in srgb, var(--accent-soft) 55%, transparent);
    opacity: 0;
    animation: home-particle-drift 8s ease-in-out infinite;
    will-change: opacity, transform;
}

@keyframes home-particle-drift {
    0%   { opacity: 0;    transform: translateY(0); }
    20%  { opacity: 0.7; }
    55%  { opacity: 1; }
    85%  { opacity: 0.35; }
    100% { opacity: 0;    transform: translateY(-26px); }
}

@keyframes home-hero-glow {
    0%, 100% { opacity: 0.28; }
    50%      { opacity: 0.6; }
}

@keyframes home-fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.home-feature-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-auto-rows: 1fr;   /* every card the same height */
    gap: 14px;
    width: 100%;
    max-width: 1200px;
    margin: 32px auto 0;
    padding: 0 4px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.home-feature-card {
    position: relative;
    isolation: isolate;   /* own stacking context: honeycomb < logo < text, always */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;   /* titles top-aligned so they share one Y line */
    text-align: center;
    gap: 8px;
    box-sizing: border-box;
    /* two accent blooms light the honeycomb seams; positions are randomised
       per card via --b1/--b2 (set inline) so no two cards glow alike. Kept dim
       and darkened so the cards sit in the near-black page, not jump off it. */
    background:
        radial-gradient(85% 110% at var(--b1, 18% 4%), color-mix(in srgb, color-mix(in srgb, var(--accent) 62%, #000) 16%, transparent) 0%, transparent 58%),
        radial-gradient(85% 110% at var(--b2, 100% 100%), color-mix(in srgb, color-mix(in srgb, var(--accent) 62%, #000) 11%, transparent) 0%, transparent 62%),
        linear-gradient(155deg,
            color-mix(in srgb, var(--accent) 6%, color-mix(in srgb, var(--surface-solid) 82%, transparent)) 0%,
            color-mix(in srgb, var(--surface-solid) 90%, transparent) 100%);
    border: 1px solid color-mix(in srgb, var(--accent) 11%, var(--surface-border));
    border-radius: 16px;
    padding: 22px 18px 38px;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
    animation: home-fade-up 0.55s ease-out backwards;
}

/* honeycomb: matte hex tiles masked over the blooms, leaving the seams glowing
   (same hexgrid mask as the gamers hub). Brightens on hover via opacity. */
.home-feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(155deg, color-mix(in srgb, var(--accent) 4%, var(--surface-solid)) 0%, var(--surface-solid) 100%);
    -webkit-mask: url('/brand/hexgrid.svg') 0 0 / 44px 76px repeat;
    mask: url('/brand/hexgrid.svg') 0 0 / 44px 76px repeat;
    opacity: 0.5;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.home-feature-card > * { position: relative; z-index: 2; }

/* the feature logo, sitting on the honeycomb (like the team-comp splash) */
.home-feature-card .home-feature-art {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    font-size: 7.5rem;
    line-height: 1;
    color: color-mix(in srgb, var(--accent) 68%, #000);
    opacity: 0.3;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.home-feature-card:hover .home-feature-art {
    opacity: 0.4;
    transform: scale(1.08);
}

/* the meals card's fork & knife is an inline SVG, sized like the glyph watermarks */
.home-meal-glyph { width: 6rem; height: 6rem; }

/* Songs keeps the real Spotify mark - brand identity, full colour */
.home-feature-card .home-feature-art-spotify {
    background: url('/brand/spotify-icon.svg') center / 5.4rem no-repeat;
    opacity: 0.42;
}

.home-feature-card:hover .home-feature-art-spotify { opacity: 0.55; }

.home-feature-card:nth-child(1) { animation-delay: 0.05s; }
.home-feature-card:nth-child(2) { animation-delay: 0.10s; }
.home-feature-card:nth-child(3) { animation-delay: 0.15s; }
.home-feature-card:nth-child(4) { animation-delay: 0.20s; }
.home-feature-card:nth-child(5) { animation-delay: 0.25s; }

.home-feature-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--accent) 30%, var(--surface-border));
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.home-feature-card:hover::before { opacity: 0.6; }

.home-feature-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: -0.01em;
}

.home-feature-desc {
    color: #c2bcd0;
    font-size: 0.98rem;
    line-height: 1.4;
    margin: 0;
    max-width: 24ch;
}

.home-feature-arrow {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    color: color-mix(in srgb, var(--accent) 60%, var(--text-muted, #777));
    font-size: 0.95rem;
    opacity: 0.65;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.home-feature-card:hover .home-feature-arrow {
    opacity: 1;
    transform: translateX(-50%) translateY(2px);
}

/* "coming soon" scaffold: a dashed, hatched blueprint placeholder */
.home-feature-card-soon {
    border-style: dashed;
    border-width: 1.5px;
    border-color: color-mix(in srgb, var(--accent) 40%, var(--surface-border));
    background:
        repeating-linear-gradient(135deg,
            transparent 0, transparent 12px,
            color-mix(in srgb, var(--accent) 6%, transparent) 12px,
            color-mix(in srgb, var(--accent) 6%, transparent) 24px),
        color-mix(in srgb, var(--surface-solid) 55%, transparent);
}

.home-feature-card-soon::before { display: none; }

.home-feature-card-soon .home-feature-title,
.home-feature-card-soon .home-feature-desc { opacity: 0.8; }

.home-soon-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-bottom: 4px;
    border-radius: 10px;
    border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, var(--surface-border));
    color: var(--accent-text, var(--accent));
    font-size: 1.1rem;
}

.home-stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: 100%;
    max-width: none;
    margin: 22px 0 0;
    padding: 22px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.home-stat-pill {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 4px 6px;
    transition: color 0.2s ease;
}

.home-stat-pill:hover {
    transform: none;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

home-stat-pill:hover .home-stat-icon {
    color: var(--accent-soft);
}


.home-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 18px;
    padding: 0 4px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.home-stat-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 18px 12px;
    background: var(--surface-grad);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    box-shadow: var(--surface-shadow);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-stat-pill:hover {
    transform: translateY(-2px);
    border-color: var(--surface-border-hover);
    box-shadow: var(--surface-shadow-hover);
}

.home-stat-icon {
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 6px;
}

.home-stat-value {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
}

.home-stat-label {
    color: #888;
    font-size: 0.8rem;
    text-align: center;
}

/* tablets: keep 5 in a row, tighter */
@media (max-width: 1100px) {
    .home-feature-grid {
        gap: 10px;
    }
    .home-feature-card {
        padding: 20px 12px 34px;
    }
    .home-feature-title {
        font-size: 1.22rem;
    }
    .home-feature-desc {
        font-size: 0.88rem;
    }
}

/* phones: stack cards, stats to 2x2 */
@media (max-width: 760px) {
    .home-feature-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .home-feature-card {
        padding: 20px 16px 36px;
    }
    .home-feature-title {
        font-size: 1.35rem;
    }
    .home-feature-desc {
        font-size: 0.95rem;
    }

    .home-tagline {
        padding: 22px 16px 18px;
        margin: 28px auto 16px;
    }
    .home-tagline-title {
        font-size: 1.2rem !important;
    }
    .home-tagline-text {
        font-size: 0.85rem !important;
    }
    .home-tagline .home-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px 10px;
        margin-top: 18px;
        padding-top: 18px;
    }
    .home-stat-value {
        font-size: 0.92rem;
    }
    .home-stat-label {
        font-size: 0.74rem;
    }

    .home-hero-img {
        width: 92%;
    }
}

/* default theme: drop the animated bg + entrance animations */
html[data-theme="default"] .home-bg {
    display: none;
}

html[data-theme="default"] .home-hero-img,
html[data-theme="default"] .home-feature-card {
    animation: none;
}

@media (prefers-reduced-motion: reduce) {
    .home-shoot,
    .home-particle,
    .home-hero::before,
    .home-feature-card {
        animation: none !important;
    }
    .home-shoot { opacity: 0; }
    .home-particle { opacity: 0.5; }
}

/* === HOME LIVE STATS CARD === */
/* matches .home-tagline's chrome; values are emphasized as numbers */
.home-livestats-card {
    width: 100%;
    max-width: 1200px;
    margin: 22px auto 22px !important;
    padding: 22px 28px 24px;
    /* same toned accent palette as the feature cards */
    background:
        radial-gradient(60% 130% at 10% 0%, color-mix(in srgb, color-mix(in srgb, var(--accent) 60%, #000) 14%, transparent) 0%, transparent 56%),
        radial-gradient(55% 130% at 100% 100%, color-mix(in srgb, color-mix(in srgb, var(--accent) 60%, #000) 10%, transparent) 0%, transparent 58%),
        var(--surface-grad);
    border: 1px solid color-mix(in srgb, var(--accent) 14%, var(--surface-border));
    border-radius: 14px;
    box-shadow: var(--surface-shadow);
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

/* flat pills + full-width grid, like .home-tagline */
.home-livestats-card .home-stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 18px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.home-livestats-card .home-stat-pill {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 4px 6px;
    transition: color 0.2s ease;
}

    .home-livestats-card .home-stat-pill:hover {
        transform: none;
        background: transparent;
        border-color: transparent;
        box-shadow: none;
    }

        .home-livestats-card .home-stat-pill:hover .home-stat-icon {
            color: var(--accent-soft);
        }

/* bigger numbers than the tagline pills */
.home-livestats-card .home-stat-value {
    font-size: 1.5rem;
    letter-spacing: -0.01em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

/* matches .home-tagline-title */
.home-livestats-title {
    color: #fff;
    font-size: 1.4rem !important;
    font-weight: 600;
    margin: 0 0 22px !important;
    text-align: center;
}

/* pulsing "live" dot in the top-left corner */
.home-livestats-live {
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 1;
    line-height: 0;
}

.home-livestats-dot {
    display: block;
    position: relative;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #5acf8a;
}

    .home-livestats-dot::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 50%;
        background: #5acf8a;
        opacity: 0.55;
        transform-origin: center;
        animation: livestats-pulse 2.4s ease-out infinite;
        will-change: transform, opacity;
        pointer-events: none;
    }

@keyframes livestats-pulse {
    0%   { transform: scale(0.6); opacity: 0.55; }
    100% { transform: scale(3.2); opacity: 0; }
}

@media (max-width: 720px) {
    .home-livestats-card {
        padding: 18px 16px 20px;
        margin: 12px auto 18px;
    }

    .home-livestats-live {
        top: 16px;
        left: 16px;
    }

    .home-livestats-card .home-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .home-livestats-card .home-stat-value {
        font-size: 1.3rem;
    }
}


