:root {
    --ink: #10182f;
    --navy: #1f2a6d;
    --orange: #f05a22;
    --orange-bright: #ff7a3d;
    --sand: #f6f5f3;
    --muted: #5b677a;
    --line: rgba(16, 24, 47, 0.1);
    --white: #ffffff;
    --shadow: 0 18px 50px rgba(16, 24, 47, 0.1);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
}

body.hub-body {
    color: var(--ink);
    background:
        radial-gradient(1000px 420px at 100% -10%, rgba(240, 90, 34, 0.14), transparent 55%),
        radial-gradient(900px 380px at 0% 0%, rgba(31, 42, 109, 0.1), transparent 50%),
        linear-gradient(180deg, #f8f6f2 0%, #f3eee7 100%);
    font-family: Cairo, Manrope, sans-serif;
}

.hub-shell {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0 2.5rem;
}

.hub-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    opacity: 0;
    animation: hub-fade-up .7s ease forwards;
}

.hub-brand-mark {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 0;
    border-radius: 0;
    background: transparent;
}

.hub-brand-mark img {
    height: 40px;
    width: auto;
    max-width: min(240px, 58vw);
    display: block;
    border-radius: 0;
    background: transparent;
}

.hub-lang {
    display: inline-flex;
    gap: .5rem;
    align-items: center;
    padding: .4rem .7rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    font-size: .85rem;
    font-weight: 700;
}

.hub-lang button {
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.hub-lang button.is-active,
.hub-lang button:hover {
    color: var(--orange);
}

.hub-hero {
    text-align: center;
    padding: 1.5rem 0 2.25rem;
    opacity: 0;
    animation: hub-fade-up .8s ease .1s forwards;
}

.hub-hero-brand {
    margin: 0 auto 1.25rem;
    display: flex;
    justify-content: center;
}

.hub-hero-circle {
    width: min(196px, 48vw);
    height: auto;
    display: block;
    border-radius: 50%;
    box-shadow: 0 18px 40px rgba(16, 24, 47, 0.18);
}

.hub-hero h1 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.hub-hero p {
    margin: .85rem auto 0;
    max-width: 34rem;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.hub-apps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
    margin-top: .5rem;
}

.hub-app {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: .85rem;
    min-height: 260px;
    padding: 1.75rem 1.1rem 1.35rem;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(16, 24, 47, 0.08);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88));
    box-shadow: var(--shadow);
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
    opacity: 0;
    animation: hub-fade-up .75s ease forwards;
}

.hub-app:nth-child(1) { animation-delay: .15s; }
.hub-app:nth-child(2) { animation-delay: .2s; }
.hub-app:nth-child(3) { animation-delay: .25s; }
.hub-app:nth-child(4) { animation-delay: .3s; }
.hub-app:nth-child(5) { animation-delay: .35s; }
.hub-app:nth-child(6) { animation-delay: .4s; }
.hub-app:nth-child(7) { animation-delay: .45s; }
.hub-app:nth-child(8) { animation-delay: .5s; }
.hub-app:nth-child(9) { animation-delay: .55s; }

.hub-app.is-live:hover,
.hub-app.is-live:focus-visible {
    transform: translateY(-6px) scale(1.015);
    border-color: rgba(240, 90, 34, 0.35);
    box-shadow: 0 24px 60px rgba(16, 24, 47, 0.14);
    outline: none;
}

.hub-app.is-soon {
    cursor: default;
}

.hub-app.is-soon:hover {
    transform: none;
    border-color: rgba(16, 24, 47, 0.08);
    box-shadow: var(--shadow);
}

.hub-app-logo {
    width: 100%;
    max-width: 260px;
    aspect-ratio: 16 / 9;
    display: grid;
    place-items: center;
    border-radius: 0;
    background: transparent;
    padding: .35rem .25rem;
    overflow: visible;
}

.hub-app-logo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    transition: transform .28s ease;
}

.hub-app.is-live:hover .hub-app-logo img {
    transform: scale(1.04);
}

.hub-app-name {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-align: center;
    white-space: nowrap;
}

.hub-app-desc {
    margin: 0;
    color: var(--muted);
    text-align: center;
    line-height: 1.55;
    max-width: 16rem;
    font-size: .9rem;
}

.hub-badge {
    position: absolute;
    top: .85rem;
    inset-inline-start: .85rem;
    padding: .3rem .65rem;
    border-radius: 999px;
    background: rgba(31, 42, 109, 0.08);
    color: var(--navy);
    font-size: .72rem;
    font-weight: 800;
    z-index: 1;
}

.hub-badge.is-live {
    background: rgba(240, 90, 34, 0.12);
    color: var(--orange);
}

.hub-footer {
    margin-top: auto;
    padding-top: 2.5rem;
    text-align: center;
    color: var(--muted);
    font-size: .9rem;
    opacity: 0;
    animation: hub-fade-up .7s ease .6s forwards;
}

@keyframes hub-fade-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

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

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

    .hub-app {
        min-height: 230px;
    }

    .hub-hero {
        padding-top: .5rem;
    }
}

[hidden] { display: none !important; }
