:root {
    --brand: #0868ad;
    --brand-dark: #064b7e;
    --ink: #173247;
    --muted: #667c8d;
    --line: #dce7ee;
    --surface: #f3f8fb;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--surface); }

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    color: var(--ink);
    background:
        radial-gradient(circle at 85% 12%, rgba(43, 155, 217, .15), transparent 25rem),
        radial-gradient(circle at 8% 82%, rgba(8, 104, 173, .09), transparent 22rem),
        var(--surface);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; }

.home-shell {
    width: min(100%, 1080px);
    margin: auto;
    padding: max(28px, env(safe-area-inset-top)) 20px 28px;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(290px, .75fr);
    align-items: center;
    gap: clamp(30px, 7vw, 84px);
}

.home-hero { min-width: 0; }

.brand {
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand img {
    width: clamp(100px, 13vw, 125px);
    height: auto;
    object-fit: contain;
}

.brand span {
    color: var(--brand);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .15em;
}

.service-name {
    margin: 6px 0 0;
    color: var(--ink);
    font-size: clamp(1.05rem, 2.2vw, 1.35rem);
    font-weight: 750;
    letter-spacing: -.015em;
}

.brand h1 {
    margin: 5px 0 0;
    color: #6f8392;
    font-size: clamp(.82rem, 1.7vw, 1.05rem);
    line-height: 1.3;
    letter-spacing: -.01em;
    font-weight: 600;
}

.hero-copy {
    max-width: 610px;
    margin: 25px 0;
    color: var(--muted);
    font-size: clamp(.93rem, 2vw, 1.08rem);
    line-height: 1.65;
}

.live-stats {
    margin: 0 0 14px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    background: rgba(255,255,255,.76);
    box-shadow: 0 8px 24px rgba(28, 68, 96, .06);
}

.live-stats > div {
    min-width: 0;
    padding: 3px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-align: center;
}

.live-stats > div + div { border-left: 1px solid var(--line); }
.live-stats svg {
    width: 25px;
    height: 25px;
    flex: 0 0 auto;
    fill: none;
    stroke: var(--brand);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.live-stats span, .live-stats strong, .live-stats small { display: block; }
.live-stats strong { color: var(--ink); font-size: 1.15rem; line-height: 1.1; }
.live-stats small {
    margin-top: 3px;
    overflow: hidden;
    color: var(--muted);
    font-size: .62rem;
    line-height: 1.25;
    text-overflow: ellipsis;
}
.live-stats .stat-details { width: 100%; }
.live-stats .stat-title {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 700;
}
.live-stats .stat-row {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    overflow: visible;
}
.live-stats .stat-row + .stat-row { margin-top: 4px; }
.live-stats .stat-row b {
    overflow: hidden;
    font-weight: 500;
    text-overflow: ellipsis;
}
.live-stats .stat-row em {
    color: var(--ink);
    font-size: .78rem;
    font-style: normal;
    font-weight: 750;
}

.primary-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}

.app-action {
    min-height: 54px;
    padding: 0 20px;
    border: 0;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    background: var(--brand);
    box-shadow: 0 3px 7px rgba(6, 75, 126, .3);
    font-size: .88rem;
    font-weight: 700;
    letter-spacing: .025em;
    transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

.app-action:hover {
    background: var(--brand-dark);
    box-shadow: 0 5px 11px rgba(6, 75, 126, .35);
    transform: translateY(-1px);
}

.app-action:active {
    box-shadow: 0 1px 3px rgba(6, 75, 126, .3);
    transform: translateY(1px);
}

.app-action:focus-visible {
    outline: 3px solid rgba(8, 104, 173, .25);
    outline-offset: 3px;
}

.app-action svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.store-links {
    margin-top: 17px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.store-links a {
    min-width: 142px;
    padding: 8px 13px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: #fff;
    background: #19232b;
    text-decoration: none;
    transition: transform .16s ease, background .16s ease;
}

.store-links a:hover { background: #080c0f; transform: translateY(-1px); }
.store-links a:active { transform: translateY(1px); }
.store-links a:focus-visible { outline: 3px solid rgba(8, 104, 173, .25); outline-offset: 3px; }
.store-links svg { width: 25px; height: 29px; flex: 0 0 auto; }
.apple-icon { fill: currentColor; }
.google-play-icon .play-blue { fill: #3d9df2; }
.google-play-icon .play-green { fill: #35d780; }
.google-play-icon .play-yellow { fill: #ffd04b; }
.google-play-icon .play-red { fill: #f34a54; }
.store-links a > span { min-width: 0; }
.store-links small, .store-links strong { display: block; }
.store-links small { font-size: .48rem; letter-spacing: .06em; }
.store-links strong { margin-top: 1px; font-size: .86rem; }

.home-links {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255,255,255,.82);
    box-shadow: 0 14px 34px rgba(28, 68, 96, .09);
}

.home-links > p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: .7rem;
    font-weight: 750;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.home-links > div { display: grid; gap: 8px; }

.home-links a {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    background: #f5f7f8;
    text-decoration: none;
    transition: border-color .16s ease, background .16s ease;
}

.home-links a:hover { border-color: #c7d4dc; background: #eef2f4; }
.home-links strong, .home-links span { display: block; }
.home-links strong { font-size: .88rem; }
.home-links span { margin-top: 4px; color: var(--muted); font-size: .66rem; line-height: 1.4; }

footer {
    min-height: 58px;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    background: rgba(255,255,255,.7);
    font-size: .76rem;
}

footer span { font-weight: 700; }
footer a { color: var(--brand); font-weight: 650; text-decoration: none; }
footer i { width: 3px; height: 3px; border-radius: 50%; background: #9aabb7; }

@media (max-width: 760px) {
    .home-shell {
        padding-top: max(24px, env(safe-area-inset-top));
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .brand { align-items: flex-start; gap: 15px; }
    .hero-copy { margin: 20px 0; }
    .home-links { padding: 17px; }
}

@media (max-width: 600px) {
    .live-stats { padding: 11px 5px; }
    .live-stats > div {
        padding: 3px 7px;
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    .live-stats svg { width: 22px; height: 22px; }
    .live-stats strong { font-size: 1.05rem; }
    .live-stats small { font-size: .58rem; }
    .primary-actions {
        width: 100%;
        grid-template-columns: 1fr;
    }
    .app-action { width: 100%; }
    .store-links a { flex: 1; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .app-action, .store-links a, .home-links a { transition: none; }
}
