:root {
    --bg: #000000;
    --surface: #141414;
    --text: #ffffff;
    --muted: #eeead7;
    --accent: #7a6200;
    --border: rgba(238, 234, 215, 0.12);
    --border-strong: rgba(122, 98, 0, 0.36);
    --shadow-soft: 0 24px 80px rgba(0, 0, 0, 0.42);
    --shadow-card: 0 18px 48px rgba(0, 0, 0, 0.32);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 18px;
    --container: 1180px;
    --content: 1040px;
    --transition: 240ms ease;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Inter", sans-serif;
    background:
        radial-gradient(circle at top, rgba(122, 98, 0, 0.14), transparent 28%),
        radial-gradient(circle at bottom right, rgba(238, 234, 215, 0.08), transparent 22%),
        var(--bg);
    color: var(--text);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 18%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.01), transparent 35%);
    opacity: 0.7;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
.button {
    border: 0;
    font: inherit;
}

.site-shell {
    position: relative;
    z-index: 1;
    width: min(calc(100% - 40px), var(--container));
    margin: 0 auto;
}

.site-shell--centered {
    min-height: 100vh;
    display: grid;
    align-items: center;
    padding: 42px 0 28px;
}

.language-gateway {
    overflow: hidden;
}

.language-panel {
    width: min(100%, 760px);
    margin: 0 auto;
    padding: 48px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.94), rgba(10, 10, 10, 0.98));
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.language-panel__eyebrow,
.section-label,
.app-card__category,
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(238, 234, 215, 0.14);
    background: rgba(255, 255, 255, 0.02);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section-label,
.hero-badge {
    width: fit-content;
    display: flex;
}

.language-panel h1,
.hero h1,
.section-heading,
.institutional-card h2 {
    margin: 0;
    letter-spacing: -0.05em;
    line-height: 0.96;
}

.language-panel h1 {
    margin-top: 28px;
    font-size: clamp(2.8rem, 8vw, 5.3rem);
    font-weight: 800;
}

.language-panel__lead {
    width: min(100%, 460px);
    margin: 18px auto 0;
    color: rgba(238, 234, 215, 0.84);
    font-size: 1.02rem;
    line-height: 1.7;
}

.language-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 40px;
}

.language-card,
.app-card,
.institutional-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.96), rgba(12, 12, 12, 0.96));
    transition:
        transform var(--transition),
        border-color var(--transition),
        background var(--transition),
        box-shadow var(--transition);
}

.language-card {
    min-height: 180px;
    padding: 28px;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: left;
    box-shadow: var(--shadow-card);
}

.language-card::after,
.app-card::after,
.institutional-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(122, 98, 0, 0.12), transparent 44%);
    opacity: 0;
    transition: opacity var(--transition);
}

.language-card:hover,
.language-card:focus-visible,
.app-card:hover,
.app-card:focus-within,
.institutional-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.46);
}

.language-card:hover::after,
.language-card:focus-visible::after,
.app-card:hover::after,
.app-card:focus-within::after,
.institutional-card:hover::after {
    opacity: 1;
}

.language-card__label {
    position: relative;
    z-index: 1;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.language-card__meta {
    position: relative;
    z-index: 1;
    color: rgba(238, 234, 215, 0.78);
    font-size: 0.95rem;
}

.site-footer {
    text-align: center;
    color: rgba(238, 234, 215, 0.7);
    font-size: 0.92rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-footer--gateway {
    margin-top: 28px;
}

.page {
    padding: 28px 0 48px;
}

.topbar {
    width: min(calc(100% - 40px), var(--container));
    margin: 0 auto;
    padding: 12px 0 0;
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 22px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(20, 20, 20, 0.82);
    backdrop-filter: blur(14px);
}

.brand-mark {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-mark__title {
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.brand-mark__subtitle {
    color: rgba(238, 234, 215, 0.7);
    font-size: 0.82rem;
}

.topbar__lang {
    display: inline-flex;
    gap: 10px;
}

.lang-switch {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: rgba(238, 234, 215, 0.8);
    font-size: 0.88rem;
    transition:
        background var(--transition),
        border-color var(--transition),
        color var(--transition);
}

.lang-switch:hover,
.lang-switch.is-active {
    border-color: rgba(122, 98, 0, 0.42);
    background: rgba(122, 98, 0, 0.14);
    color: var(--text);
}

.hero {
    width: min(calc(100% - 40px), var(--content));
    margin: 34px auto 0;
    padding: 88px 0 40px;
    display: grid;
    gap: 0;
}

.hero h1 {
    max-width: 760px;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    margin-top: 22px;
}

.hero__subtitle {
    max-width: 760px;
    margin: 28px 0 0;
    color: var(--muted);
    font-size: clamp(1.12rem, 2vw, 1.38rem);
    line-height: 1.6;
}

.hero__body {
    max-width: 720px;
    margin: 22px 0 0;
    color: rgba(238, 234, 215, 0.74);
    font-size: 1rem;
    line-height: 1.9;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 38px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid var(--border);
    transition:
        transform var(--transition),
        border-color var(--transition),
        background var(--transition),
        color var(--transition);
}

.button:hover {
    transform: translateY(-2px);
}

.button--primary {
    border-color: rgba(122, 98, 0, 0.42);
    background: linear-gradient(180deg, rgba(122, 98, 0, 0.3), rgba(122, 98, 0, 0.18));
    color: var(--text);
}

.button--primary:hover {
    border-color: rgba(122, 98, 0, 0.7);
    background: linear-gradient(180deg, rgba(122, 98, 0, 0.42), rgba(122, 98, 0, 0.24));
}

.button--secondary {
    background: rgba(255, 255, 255, 0.015);
    color: var(--muted);
}

.button--secondary:hover {
    border-color: rgba(238, 234, 215, 0.24);
    color: var(--text);
}

.section {
    width: min(calc(100% - 40px), var(--content));
    margin: 0 auto;
    padding: 46px 0;
}

.section-heading-wrap {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 36px;
}

.section-heading-group,
.institutional-card__header {
    display: grid;
    gap: 18px;
}

.section-heading {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-top: 0;
    max-width: 720px;
}

.section-copy {
    max-width: 500px;
    margin: 0;
    color: rgba(238, 234, 215, 0.72);
    font-size: 0.98rem;
    line-height: 1.8;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}

.app-card {
    min-height: 100%;
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.app-card--featured {
    transform: translateY(-6px);
    border-color: rgba(122, 98, 0, 0.38);
    background:
        radial-gradient(circle at top right, rgba(238, 234, 215, 0.07), transparent 28%),
        linear-gradient(180deg, rgba(122, 98, 0, 0.16), transparent 22%),
        linear-gradient(180deg, rgba(20, 20, 20, 0.98), rgba(12, 12, 12, 0.98));
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.46),
        inset 0 1px 0 rgba(238, 234, 215, 0.05);
}

.app-card--featured::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 24%);
}

.app-card--featured:hover,
.app-card--featured:focus-within {
    transform: translateY(-10px);
    border-color: rgba(122, 98, 0, 0.58);
}

.app-card--placeholder {
    background:
        linear-gradient(180deg, rgba(20, 20, 20, 0.88), rgba(10, 10, 10, 0.94));
    border-color: rgba(238, 234, 215, 0.08);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}

.app-card--placeholder:hover,
.app-card--placeholder:focus-within {
    transform: translateY(-4px);
    border-color: rgba(238, 234, 215, 0.14);
    box-shadow: 0 22px 46px rgba(0, 0, 0, 0.3);
}

.app-card__top,
.app-card__body,
.app-card__footer {
    position: relative;
    z-index: 1;
}

.app-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.app-card__title {
    margin: 18px 0 0;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.app-card--featured .app-card__title {
    font-size: clamp(1.8rem, 3vw, 2.15rem);
}

.app-card__status {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(238, 234, 215, 0.12);
    color: rgba(238, 234, 215, 0.72);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    white-space: nowrap;
}

.app-card--placeholder .app-card__status {
    background: rgba(255, 255, 255, 0.02);
}

.app-card__description {
    margin: 18px 0 0;
    color: rgba(238, 234, 215, 0.78);
    font-size: 0.98rem;
    line-height: 1.8;
}

.app-card--featured .app-card__description {
    max-width: 52ch;
    color: rgba(238, 234, 215, 0.86);
}

.app-card--placeholder .app-card__description {
    color: rgba(238, 234, 215, 0.66);
}

.app-card__list {
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.app-card__list li {
    padding-left: 18px;
    position: relative;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.65;
}

.app-card__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 11px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(122, 98, 0, 0.9);
    box-shadow: 0 0 0 4px rgba(122, 98, 0, 0.16);
}

.app-card__footer {
    margin-top: 28px;
}

.button[aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.6;
}

.app-card--placeholder .button--secondary {
    border-style: dashed;
    border-color: rgba(238, 234, 215, 0.12);
    background: rgba(255, 255, 255, 0.01);
    color: rgba(238, 234, 215, 0.68);
}

.institutional-card {
    padding: 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

.institutional-card h2 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 750;
    margin-top: 0;
}

.institutional-card p {
    max-width: 780px;
    margin: 26px 0 0;
    color: rgba(238, 234, 215, 0.76);
    font-size: 1rem;
    line-height: 1.9;
}

.page-footer {
    width: min(calc(100% - 40px), var(--content));
    margin: 34px auto 0;
    padding: 30px 0 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 24px;
    color: rgba(238, 234, 215, 0.66);
    font-size: 0.9rem;
    border-top: 1px solid rgba(238, 234, 215, 0.08);
}

.page-footer strong {
    color: var(--text);
    font-weight: 600;
}

.reveal {
    opacity: 0;
    transform: translateY(22px);
    animation: reveal-up 900ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reveal-delay-1 {
    animation-delay: 120ms;
}

.reveal-delay-2 {
    animation-delay: 200ms;
}

.reveal-delay-3 {
    animation-delay: 280ms;
}

@keyframes reveal-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .section-heading-wrap {
        flex-direction: column;
    }
}

@media (max-width: 720px) {
    .site-shell {
        width: min(calc(100% - 24px), var(--container));
    }

    .language-panel {
        padding: 34px 22px;
    }

    .language-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        width: min(calc(100% - 24px), var(--container));
    }

    .topbar__inner {
        padding: 18px;
        border-radius: 24px;
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar__lang {
        width: 100%;
    }

    .lang-switch {
        flex: 1;
        text-align: center;
    }

    .hero,
    .section,
    .page-footer {
        width: min(calc(100% - 24px), var(--content));
    }

    .hero {
        padding: 60px 0 28px;
    }

    .hero__actions {
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .app-card,
    .institutional-card {
        padding: 24px;
    }

    .app-card--featured {
        transform: none;
    }

    .section {
        padding: 34px 0;
    }

    .section-heading-wrap,
    .section-heading-group,
    .institutional-card__header {
        gap: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
