:root {
    --navy-950: #04101f;
    --navy-900: #07182e;
    --navy-850: #0a203c;
    --navy-800: #0d294c;
    --aqua: #5ac7c7;
    --aqua-bright: #7adada;
    --white: #ffffff;
    --muted: #a9b9cb;
    --line: rgba(255, 255, 255, 0.11);
    --card: rgba(12, 38, 70, 0.78);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--navy-950);
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    color: var(--white);
    background:
        radial-gradient(circle at 12% 3%, rgba(90, 199, 199, 0.18), transparent 30rem),
        radial-gradient(circle at 88% 68%, rgba(21, 96, 156, 0.18), transparent 34rem),
        linear-gradient(145deg, var(--navy-950) 0%, var(--navy-900) 52%, #061427 100%);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 56px 56px;
    content: "";
    -webkit-mask-image: linear-gradient(to bottom, black, transparent 82%);
    mask-image: linear-gradient(to bottom, black, transparent 82%);
}

a {
    color: inherit;
}

.site-shell {
    display: flex;
    width: min(1120px, calc(100% - 48px));
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    flex-direction: column;
}

.site-header {
    display: flex;
    min-height: 126px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    padding: 11px 17px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.brand img {
    display: block;
    width: 250px;
    max-width: 100%;
    height: auto;
}

.brand:focus-visible {
    outline: 3px solid var(--aqua-bright);
    outline-offset: 4px;
}

.portal-label {
    padding: 8px 12px;
    border: 1px solid rgba(90, 199, 199, 0.25);
    border-radius: 999px;
    color: #c6eeee;
    background: rgba(90, 199, 199, 0.08);
    font-size: 0.82rem;
    font-weight: 650;
}

main {
    flex: 1;
    padding: 64px 0;
}

.apps-section {
    width: 100%;
}

.section-heading {
    display: flex;
    max-width: 560px;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 24px;
}

.section-copy > p {
    margin: 0 0 8px;
    color: var(--aqua-bright);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.15em;
}

.section-copy h1 {
    margin: 0;
    font-size: clamp(1.55rem, 4vw, 2.15rem);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.section-copy > span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.5;
}

.app-count {
    padding-bottom: 4px;
    color: #8096ac;
    font-size: 0.84rem;
    white-space: nowrap;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 20px;
}

.app-card {
    position: relative;
    display: flex;
    width: 100%;
    max-width: 560px;
    min-height: 248px;
    align-items: stretch;
    overflow: hidden;
    padding: 34px 34px 32px 40px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.055), transparent 42%),
        var(--card);
    box-shadow: var(--shadow);
    text-decoration: none;
    transform: translateY(0);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
    -webkit-tap-highlight-color: transparent;
}

.app-card::before {
    position: absolute;
    top: 34px;
    bottom: 34px;
    left: 0;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(to bottom, var(--aqua-bright), rgba(90, 199, 199, 0.28));
    content: "";
}

.app-card::after {
    position: absolute;
    top: -95px;
    right: -76px;
    width: 235px;
    height: 235px;
    border-radius: 50%;
    background: rgba(90, 199, 199, 0.12);
    content: "";
    filter: blur(4px);
    pointer-events: none;
}

.app-card:hover {
    border-color: rgba(90, 199, 199, 0.44);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(90, 199, 199, 0.06);
    transform: translateY(-4px);
}

.app-card:focus-visible {
    outline: 3px solid var(--aqua-bright);
    outline-offset: 4px;
}

.app-content {
    position: relative;
    z-index: 1;
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.app-topline {
    display: flex;
    align-items: flex-start;
}

.app-name {
    font-size: 1.72rem;
    font-weight: 800;
    letter-spacing: -0.035em;
}

.app-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid rgba(90, 199, 199, 0.18);
    border-radius: 999px;
    color: #c9e5e7;
    background: rgba(90, 199, 199, 0.08);
    font-size: 0.78rem;
    font-weight: 650;
    white-space: nowrap;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--aqua-bright);
    box-shadow: 0 0 0 4px rgba(90, 199, 199, 0.1);
}

.app-description {
    max-width: 430px;
    margin-top: 20px;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.62;
}

.app-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: auto;
    padding-top: 28px;
}

.app-action {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 9px;
    padding: 11px 15px;
    border-radius: 12px;
    color: var(--navy-950);
    background: var(--aqua-bright);
    box-shadow: 0 10px 24px rgba(90, 199, 199, 0.16);
    font-size: 0.92rem;
    font-weight: 800;
}

.app-action svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
    transition: transform 180ms ease;
}

.app-card:hover .app-action svg {
    transform: translateX(4px);
}

footer {
    display: flex;
    min-height: 76px;
    align-items: center;
    gap: 12px;
    border-top: 1px solid var(--line);
    color: #748aa1;
    font-size: 0.82rem;
}

.footer-divider {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #4d647b;
}

@media (max-width: 680px) {
    .site-shell {
        width: min(100% - 32px, 1120px);
    }

    .site-header {
        min-height: 108px;
    }

    .brand {
        max-width: 250px;
        padding: 10px 14px;
        border-radius: 16px;
    }

    .brand img {
        width: 215px;
    }

    .portal-label {
        display: none;
    }

    main {
        padding: 48px 0 46px;
    }

    .section-heading {
        align-items: flex-end;
        margin-bottom: 20px;
    }

    .section-copy > span {
        font-size: 0.95rem;
    }

    .app-card {
        min-height: 238px;
        padding: 26px 24px 24px 29px;
        border-radius: 24px;
    }

    .app-card::before {
        top: 26px;
        bottom: 26px;
    }

    .app-name {
        font-size: 1.4rem;
    }

    .app-status {
        padding: 6px 9px;
    }

    .app-description {
        margin-top: 18px;
        font-size: 0.95rem;
    }
}

@media (max-width: 430px) {
    .section-heading {
        align-items: flex-start;
    }

    .app-count {
        padding-top: 26px;
    }

    .app-description {
        margin-top: 16px;
    }

    footer {
        flex-wrap: wrap;
        gap: 8px;
        padding: 20px 0;
    }
}

@media (max-width: 330px) {
    .app-card-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-card,
    .app-action svg {
        transition: none;
    }
}
