:root {
    color-scheme: dark;
    --bg: #111715;
    --bg-deep: #1b2320;
    --surface: rgba(24, 31, 28, 0.86);
    --surface-strong: rgba(20, 27, 24, 0.98);
    --surface-soft: rgba(142, 199, 161, 0.08);
    --text: #eef4ef;
    --muted: #aab7af;
    --line: rgba(238, 244, 239, 0.1);
    --accent: #8ec7a1;
    --accent-strong: #cfe3b5;
    --accent-soft: rgba(142, 199, 161, 0.12);
    --accent-warm: #f0b06c;
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
    --shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.24);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --font-ui: "Aptos Display", "Segoe UI Variable Display", "Trebuchet MS", sans-serif;
    --font-body: "Aptos", "Segoe UI Variable Text", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: clip;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(240, 176, 108, 0.18), transparent 22rem),
        radial-gradient(circle at top right, rgba(142, 199, 161, 0.12), transparent 18rem),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
    overflow-x: clip;
    -webkit-tap-highlight-color: transparent;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 85%);
}

.page-shell {
    width: min(1320px, calc(100% - 20px));
    margin: 0 auto;
    padding: max(12px, env(safe-area-inset-top)) 0 max(26px, env(safe-area-inset-bottom));
}

.app-topbar,
.hero,
.apps-section,
.app-card,
.app-footer {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.app-topbar,
.hero,
.apps-section {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    padding: 24px;
}

.app-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    margin-bottom: 16px;
}

.app-topbar::after,
.hero::after,
.apps-section::after {
    content: "";
    position: absolute;
    inset: auto -4rem -4rem auto;
    width: 13rem;
    height: 13rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 143, 65, 0.2), transparent 70%);
}

.app-topbar-main,
.app-topbar-copy,
.apps-grid,
.card-points,
.hero-grid {
    display: grid;
    gap: 16px;
}

.app-topbar-copy {
    min-width: 0;
}

.eyebrow,
.section-label,
.card-category,
.card-status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    margin: 0;
    font-family: var(--font-ui);
    letter-spacing: -0.04em;
}

h1 {
    font-size: clamp(2.2rem, 6vw, 4.2rem);
    line-height: 0.95;
    max-width: 12ch;
}

h2 {
    font-size: clamp(1.4rem, 3vw, 2.1rem);
    line-height: 1;
}

h3 {
    font-size: 1.3rem;
    line-height: 1.05;
}

.hero-text,
.section-copy,
.mini-note,
.card-copy {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.hero-points,
.hero-actions,
.card-points,
.footer-brand,
.footer-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.hero-points span,
.card-points span {
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    font-size: 0.9rem;
    font-weight: 700;
}

.hero-link,
.card-link,
.primary-btn,
.secondary-btn {
    min-height: 52px;
    padding: 13px 18px;
    border-radius: 15px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-warm));
    color: #fff;
}

.secondary-btn {
    background: var(--surface-strong);
    border-color: var(--line);
    color: var(--text);
}

.hero-link:hover,
.card-link:hover,
.primary-btn:hover,
.secondary-btn:hover {
    transform: translateY(-1px);
}

.app-topbar-badge,
.hero-panel,
.hero-panel-metric,
.app-card {
    border-radius: var(--radius-lg);
}

.app-topbar-badge {
    display: grid;
    gap: 4px;
    min-width: 140px;
    padding: 16px 18px;
    background: linear-gradient(135deg, var(--accent), var(--accent-warm));
    color: #fff;
    box-shadow: var(--shadow-soft);
    text-align: right;
}

.app-topbar-badge span {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.82;
}

.app-topbar-badge strong,
.hero-panel-metric strong {
    font-family: var(--font-ui);
    line-height: 1;
}

.app-topbar-badge strong {
    font-size: 1.15rem;
}

.hero {
    margin-bottom: 16px;
}

.hero-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.8fr);
    align-items: center;
}

.hero-story,
.hero-panel {
    display: grid;
    gap: 12px;
}

.hero-panel {
    padding: 20px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hero-panel-metric {
    padding: 18px;
    background: linear-gradient(135deg, var(--accent), var(--accent-warm));
    color: #fff;
}

.hero-panel-metric span {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.82);
}

.hero-panel-metric strong {
    display: block;
    margin-top: 8px;
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: -0.05em;
}

.apps-section {
    display: grid;
    gap: 18px;
}

.category-strip,
.category-section {
    display: grid;
    gap: 14px;
}

.category-strip {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.category-chip {
    min-height: 58px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.category-chip strong {
    color: var(--accent);
    font-family: var(--font-ui);
    font-size: 1rem;
}

.category-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(142, 199, 161, 0.28);
    background: rgba(255, 255, 255, 0.08);
}

.category-section {
    padding-top: 6px;
}

.category-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 14px;
}

.section-heading,
.card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.apps-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.apps-grid-followup {
    margin-top: 6px;
}

.app-card {
    display: grid;
    gap: 18px;
    padding: 22px;
}

.card-status {
    background: rgba(255, 255, 255, 0.05);
}

.app-card-coming {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
        var(--surface);
}

.card-link {
    width: 100%;
}

.app-footer {
    margin-top: 18px;
    padding: 18px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    border-radius: 24px;
    color: var(--muted);
    font-size: 0.92rem;
}

.footer-brand strong {
    color: var(--text);
    font-family: var(--font-ui);
    font-size: 1rem;
}

.footer-links a,
.footer-brand a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.footer-links a:hover,
.footer-brand a:hover {
    text-decoration: underline;
}

.pulse {
    animation: fadeUp 0.45s ease both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1080px) {
    .apps-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 840px) {
    .page-shell {
        width: min(100% - 10px, 1320px);
        padding: max(8px, env(safe-area-inset-top)) 0 max(24px, env(safe-area-inset-bottom));
    }

    .app-topbar,
    .hero,
    .apps-section,
    .app-card {
        padding: 18px;
        border-radius: 24px;
    }

    .app-topbar,
    .hero-grid,
    .section-heading,
    .category-head,
    .card-head,
    .app-footer {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    h1 {
        max-width: none;
        font-size: clamp(2rem, 10vw, 3rem);
    }
}

@media (max-width: 640px) {
    .apps-grid {
        grid-template-columns: 1fr;
    }

    .category-strip {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .hero-link,
    .card-link {
        width: 100%;
    }

    .app-topbar-badge {
        text-align: left;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .page-shell {
        width: min(100% - 6px, 1320px);
        padding: max(6px, env(safe-area-inset-top)) 0 max(20px, env(safe-area-inset-bottom));
    }

    .app-topbar,
    .hero,
    .apps-section,
    .app-card,
    .app-footer {
        padding: 14px;
        border-radius: 20px;
    }

    .eyebrow,
    .section-label,
    .card-category,
    .card-status {
        font-size: 0.68rem;
        padding: 6px 10px;
    }

    .hero-points,
    .card-points,
    .footer-links {
        display: grid;
        width: 100%;
    }
}
