/* 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);
    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;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--surface-grad);
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    padding: 18px 16px 42px;
    color: #fff;
    text-decoration: none;
    box-shadow: var(--surface-shadow);
    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;
}

.home-feature-card:nth-child(1) { animation-delay: 0.05s; }
.home-feature-card:nth-child(2) { animation-delay: 0.12s; }
.home-feature-card:nth-child(3) { animation-delay: 0.19s; }
.home-feature-card:nth-child(4) { animation-delay: 0.26s; }
.home-feature-card:nth-child(5) { animation-delay: 0.33s; }

.home-feature-card:hover {
    transform: translateY(-3px);
    border-color: var(--surface-border-hover);
    box-shadow: var(--surface-shadow-hover);
}

/* "coming soon" teaser - dashed so it reads as an invite, not a live tool */
.home-feature-card-soon {
    border-style: dashed;
    border-color: color-mix(in srgb, var(--accent) 38%, var(--surface-border));
}

.home-feature-icon-soon {
    background: var(--icon-grad, rgba(255, 255, 255, 0.06));
    color: var(--accent);
}

.home-feature-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--icon-grad);
    border: 1px solid var(--icon-border);
    color: var(--accent-text);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.home-feature-icon i {
    font-size: 1.1rem;
}

.home-feature-icon-text {
    font-family: var(--app-font);
}

.home-feature-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.home-feature-desc {
    color: #888;
    font-size: 0.82rem;
    line-height: 1.4;
    margin: 0;
}

.home-feature-arrow {
    position: absolute;
    bottom: 14px;
    right: 16px;
    color: #555;
    font-size: 0.95rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.home-feature-card:hover .home-feature-arrow {
    color: var(--accent-soft);
    transform: translateX(3px);
}

.home-tagline {
    width: 100%;
    max-width: 1200px;
    margin: 36px auto 18px;
    padding: 28px 28px 24px;
    text-align: center;
    background: var(--surface-grad);
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    box-shadow: var(--surface-shadow);
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.home-tagline .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-tagline .home-stat-pill {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 4px 6px;
    transition: color 0.2s ease;
}

.home-tagline .home-stat-pill:hover {
    transform: none;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.home-tagline .home-stat-pill:hover .home-stat-icon {
    color: var(--accent-soft);
}

.home-tagline-title {
    color: #fff;
    font-size: 1.4rem !important;
    font-weight: 600;
    margin: 0 0 10px !important;
}

.home-tagline-text {
    color: #888 !important;
    font-size: 0.95rem !important;
    line-height: 1.5;
    max-width: 720px;
    margin: 0 auto !important;
}

.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: 16px 12px 38px;
    }
    .home-feature-title {
        font-size: 0.95rem;
    }
    .home-feature-desc {
        font-size: 0.78rem;
    }
}

/* phones: stack cards, stats to 2x2 */
@media (max-width: 760px) {
    .home-feature-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .home-feature-card {
        padding: 16px 16px 40px;
    }
    .home-feature-title {
        font-size: 1rem;
    }
    .home-feature-desc {
        font-size: 0.82rem;
    }

    .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: 18px auto 22px;
    padding: 22px 28px 24px;
    background: var(--surface-grad);
    border: 1px solid 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;
    }
}

