*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0a0a0a;
    --surface: #111113;
    --surface-hover: #18181b;
    --surface-elev: #101012;
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.22);
    --text: #f4f4f5;
    --text-soft: #b8b8be;
    --muted: #88888e;
    --faint: #5c5c62;
    --shadow-pop: 0 14px 36px rgba(0, 0, 0, 0.6);
    --z-menu: 20;
    --z-dropdown: 30;
    --z-toast: 40;
    --z-overlay: 50;
    --mx: -400px;
    --my: -400px;
}

html {
    background: var(--bg);
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a,
button {
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.75);
    outline-offset: 2px;
}

.backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, 0.075) 1px, transparent 1.5px);
    background-size: 30px 30px;
    background-position: center;
    -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 15%, transparent 100%);
    mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 15%, transparent 100%);
}

.backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.6) 1px, transparent 1.5px);
    background-size: 30px 30px;
    background-position: center;
    -webkit-mask-image: radial-gradient(circle 170px at var(--mx) var(--my), #000, transparent);
    mask-image: radial-gradient(circle 170px at var(--mx) var(--my), #000, transparent);
}

.page {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
    min-height: 100svh;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: min(1200px, calc(100% - 40px));
    height: 68px;
    margin: 0 auto;
}

.topbar-start,
.topbar-end {
    display: flex;
    align-items: center;
    min-width: 0;
}

.topbar-start {
    gap: 20px;
}

.topbar-end {
    gap: 6px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
    border-radius: 6px;
    color: var(--text);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.brand:hover {
    opacity: 0.75;
}

.brand img {
    display: block;
    user-select: none;
}

.brand span {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.links {
    display: flex;
    align-items: center;
    gap: 2px;
}

.links a {
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.18s ease, background-color 0.18s ease;
}

.links a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.icon-link,
.lang-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.icon-link:hover,
.lang-trigger:hover,
.lang.open .lang-trigger {
    border-color: var(--line-strong);
    background: var(--surface-hover);
    color: var(--text);
}

.icon-link {
    width: 34px;
}

.icon-link svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.lang {
    position: relative;
}

.lang-trigger {
    gap: 7px;
    padding: 0 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.lang-trigger .globe {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.lang-trigger .chevron {
    width: 11px;
    height: 11px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease;
}

.lang.open .chevron {
    transform: rotate(180deg);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: var(--z-menu);
    min-width: 156px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-elev);
    box-shadow: var(--shadow-pop);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.lang.open .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.lang-option.active {
    color: var(--text);
}

.lang-option .check {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
}

.lang-option.active .check {
    opacity: 1;
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 20px 72px;
    text-align: center;
}

.page-title {
    font-size: clamp(44px, 7vw, 80px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.045em;
    color: var(--text);
    margin: 0;
}

.tagline {
    max-width: 420px;
    margin-top: 16px;
    color: var(--muted);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    text-wrap: balance;
}

.legal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 0 20px 28px;
    font-size: 12px;
}

.legal a {
    color: var(--faint);
    text-decoration: none;
    transition: color 0.18s ease;
}

.legal a:hover {
    color: var(--text-soft);
}

.reveal {
    opacity: 0;
}

.ready .reveal {
    animation: reveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0s) forwards;
}

@keyframes reveal {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 640px) {
    .topbar {
        width: calc(100% - 28px);
        gap: 8px;
    }

    .topbar-start {
        gap: 10px;
    }

    .links a {
        padding: 8px;
        font-size: 12.5px;
    }

    .topbar-end {
        gap: 5px;
    }

    .lang-trigger {
        padding: 0 9px;
    }

    .lang-trigger [data-i18n] {
        display: none;
    }

    .brand span {
        display: none;
    }

    .tagline {
        font-size: 15px;
    }

    .page-title {
        font-size: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        animation: none !important;
    }

    .lang-menu,
    .lang-trigger .chevron {
        transition: none;
    }
}