*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg:           #030407;
    --bg-card:      #0a0d1e;
    --bg-card-h:    #0f1330;
    --border:       #1a2350;
    --border-dim:   #12172c;
    --text:         #eef1f8;
    --text-dim:     #94a3b8;
    --text-muted:   #64748b;
    --blue:         #3b82f6;
    --gold:         #b59410;
    --blue-light:   #60a5fa;
    --gold-light:   #e3c15e;
    --navy:         #16376f;
    --deep-blue:    #090f41;
    --grad:         linear-gradient(135deg, var(--blue), var(--gold));
    --grad-text:    linear-gradient(135deg, var(--blue-light), var(--gold-light));
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Ambient glow layers */
.bg-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.bg-layer::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 90% 55% at 50% -5%, rgba(59,130,246,.13) 0%, transparent 70%),
        radial-gradient(ellipse 55% 45% at 90% 85%, rgba(181,148,16,.12) 0%, transparent 65%);
}
/* Dot grid */
.bg-layer::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* ─── HEADER ─────────────────────────────────── */
header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(13,15,26,.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    height: 34px;
    width: 34px;
    flex-shrink: 0;
    object-fit: contain;
}

.logo-name {
    height: 22px;
    width: auto;
    flex-shrink: 0;
    object-fit: contain;
}

.header-right {
    font-size: .8125rem;
    color: var(--text-muted);
}

.header-right a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color .2s;
}
.header-right a:hover { color: var(--blue-light); }

/* ─── HERO ──────────────────────────────────── */
.hero {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 96px 2rem 72px;
    text-align: center;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(59,130,246,.1);
    border: 1px solid rgba(59,130,246,.22);
    border-radius: 100px;
    padding: 5px 15px;
    font-size: .8rem;
    font-weight: 500;
    color: #93c5fd;
    letter-spacing: .03em;
    margin-bottom: 1.75rem;
    text-transform: uppercase;
}

.pill-dot {
    width: 6px;
    height: 6px;
    background: var(--blue);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--blue);
    animation: blink 2.2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: .35; }
}

.hero h1 {
    font-size: clamp(2.75rem, 7vw, 5rem);
    font-weight: 900;
    letter-spacing: -.045em;
    line-height: 1.05;
    color: var(--text);
    margin-bottom: 1.25rem;
}

.hero h1 .hi {
    background: var(--grad-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--text-muted);
    font-weight: 400;
    max-width: 520px;
    margin: 0 auto 2.75rem;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .875rem;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--grad);
    color: #fff;
    font-size: .9375rem;
    font-weight: 600;
    text-decoration: none;
    padding: 13px 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(59,130,246,.28);
    transition: transform .2s, box-shadow .2s, opacity .2s;
}
.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 44px rgba(59,130,246,.38);
    opacity: .93;
}
.hero-btn svg { transition: transform .2s; }
.hero-btn:hover svg { transform: translateY(3px); }

.hero-btn-secondary {
    background: rgba(181,148,16,.08);
    color: var(--gold-light);
    border: 1px solid rgba(181,148,16,.4);
    box-shadow: none;
}
.hero-btn-secondary:hover {
    background: rgba(181,148,16,.16);
    box-shadow: 0 10px 32px rgba(181,148,16,.18);
}
.hero-btn-secondary:hover svg { transform: translateY(0) scale(1.06); }

/* Subtle divider line under hero */
.hero-divider {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}
.hero-divider hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ─── APPS SECTION ──────────────────────────── */
.apps {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 64px 2rem 128px;
}

.section-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.section-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.01em;
    white-space: nowrap;
}

.section-meta {
    font-size: .8125rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.section-rule {
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ─── GRID ──────────────────────────────────── */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

/* ─── ACTIVE CARD ───────────────────────────── */
.app-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.625rem;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: transform .25s, box-shadow .25s, border-color .25s, background .25s;
}

/* Top-edge glow line */
.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 55%;
    height: 1px;
    background: var(--grad);
    opacity: 0;
    transition: opacity .3s, width .3s;
}

.app-card:hover {
    background: var(--bg-card-h);
    border-color: rgba(59,130,246,.35);
    transform: translateY(-5px);
    box-shadow:
        0 24px 64px rgba(0,0,0,.45),
        0 0 0 1px rgba(59,130,246,.25),
        0 0 48px rgba(59,130,246,.07);
}
.app-card:hover::before {
    opacity: 1;
    width: 72%;
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(59,130,246,.09);
    border: 1px solid rgba(59,130,246,.18);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .25s, border-color .25s;
}
.app-card:hover .card-icon {
    background: rgba(59,130,246,.15);
    border-color: rgba(59,130,246,.35);
}

.card-icon svg {
    width: 24px;
    height: 24px;
}

.card-name {
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -.015em;
    color: var(--text);
    margin-bottom: .3rem;
}

.card-desc {
    font-size: .875rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.card-body { flex: 1; }

.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-dim);
    padding-top: 1rem;
    margin-top: .25rem;
}

.card-tag {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 3px 8px;
}

.card-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .875rem;
    font-weight: 600;
    color: var(--blue);
    transition: color .2s, gap .2s;
}
.card-cta svg { transition: transform .2s; }

.app-card:hover .card-cta {
    color: var(--blue-light);
    gap: 9px;
}
.app-card:hover .card-cta svg {
    transform: translateX(3px);
}

/* ─── PLACEHOLDER CARD ──────────────────────── */
.card-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    background: rgba(19,22,39,.4);
    border: 1px dashed var(--border-dim);
    border-radius: 18px;
    padding: 1.625rem;
    min-height: 200px;
    opacity: .4;
}

.card-placeholder svg {
    color: var(--text-muted);
}

.card-placeholder span {
    font-size: .8125rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: .02em;
}

/* ─── FOOTER ────────────────────────────────── */
footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    padding: 1.5rem 2rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
}

.footer-copy {
    font-size: .8125rem;
    color: var(--text-muted);
}

.footer-ext {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .8125rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color .2s;
}
.footer-ext:hover { color: var(--blue-light); }

/* ─── ANIMATIONS ────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-pill    { animation: fadeUp .5s ease both; }
.hero h1      { animation: fadeUp .55s .08s ease both; }
.hero-sub     { animation: fadeUp .55s .16s ease both; }
.hero-btn     { animation: fadeUp .55s .24s ease both; }
.section-head { animation: fadeUp .5s .3s ease both; }

.app-grid > *:nth-child(1) { animation: fadeUp .5s .36s ease both; }
.app-grid > *:nth-child(2) { animation: fadeUp .5s .46s ease both; }
.app-grid > *:nth-child(3) { animation: fadeUp .5s .56s ease both; }
.app-grid > *:nth-child(4) { animation: fadeUp .5s .66s ease both; }

/* ─── RESPONSIVE ────────────────────────────── */
@media (max-width: 600px) {
    .header-right { display: none; }
    .hero { padding: 64px 1.25rem 52px; }
    .apps { padding: 48px 1.25rem 80px; }
}