@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/inter-400.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("fonts/inter-500.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("fonts/inter-600.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("fonts/inter-700.woff2") format("woff2");
}

@font-face {
    font-family: "Space Grotesk";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("fonts/spacegrotesk-600.woff2") format("woff2");
}

@font-face {
    font-family: "Space Grotesk";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("fonts/spacegrotesk-700.woff2") format("woff2");
}

@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/jetbrainsmono-400.woff2") format("woff2");
}

:root {
    --bg: #0b0f17;
    --bg-soft: #121826;
    --panel: rgba(13, 18, 28, 0.72);
    --border: rgba(148, 163, 184, 0.14);
    --text: #e6e9ef;
    --muted: #8b95a5;
    --accent: #6366f1;
    --accent-2: #22d3ee;
    --ok: #34d399;
    --cursor-glow: rgba(34, 211, 238, 0.9);
    --cursor-line: rgba(99, 102, 241, 0.45);
    --display: "Space Grotesk", system-ui, sans-serif;
    --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
    --gutter: 24px;
    color-scheme: dark;
}

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

body {
    font-family: var(--body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

#cursor-net {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(55% 55% at 15% 15%, rgba(99, 102, 241, 0.18), transparent 60%),
        radial-gradient(45% 45% at 85% 75%, rgba(34, 211, 238, 0.12), transparent 60%),
        linear-gradient(180deg, var(--bg), var(--bg-soft));
}

.page,
.status {
    position: relative;
    z-index: 1;
}

.page {
    flex: 1;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: clamp(3rem, 10vh, 7rem) max(var(--gutter), env(safe-area-inset-right)) 3rem max(var(--gutter), env(safe-area-inset-left));
}

.home {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(2.5rem, 6vw, 5rem);
    align-items: center;
}

.ident {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    min-width: 0;
}

.mark {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    box-shadow: 0 10px 34px rgba(34, 211, 238, 0.22);
}

.wordmark {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(3.2rem, 8.5vw, 6.2rem);
    line-height: 0.92;
    letter-spacing: -0.045em;
}

.wordmark .tld {
    display: block;
    margin-top: 0.35em;
    font-family: var(--mono);
    font-weight: 400;
    font-size: 0.3em;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.term {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
    overflow: hidden;
}

.term-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border);
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
}

.branch::before,
.online::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 0.45rem;
    border-radius: 50%;
    background: var(--ok);
    vertical-align: 0.05em;
}

.term-body {
    padding: 1.1rem 1.1rem 1.3rem;
    font-family: var(--mono);
    font-size: 0.84rem;
    line-height: 1.75;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.ln {
    display: block;
    animation: reveal 0.25s ease-out both;
}

.ln:nth-child(1) { animation-delay: 0.2s; }
.ln:nth-child(2) { animation-delay: 0.5s; }
.ln:nth-child(3) { animation-delay: 0.9s; }
.ln:nth-child(4) { animation-delay: 1s; }
.ln:nth-child(5) { animation-delay: 1.3s; }
.ln:nth-child(6) { animation-delay: 1.6s; }
.ln:nth-child(7) { animation-delay: 1.9s; }
.ln:nth-child(8) { animation-delay: 2s; }

.notfound .term {
    max-width: 640px;
}

.ps {
    color: var(--accent-2);
}

.dim {
    color: var(--muted);
}

.ok {
    color: var(--ok);
}

.caret {
    display: inline-block;
    width: 0.6em;
    height: 1.1em;
    vertical-align: -0.2em;
    background: var(--accent-2);
    animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(2px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding: 0.9rem max(var(--gutter), env(safe-area-inset-right)) calc(0.9rem + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
    border-top: 1px solid var(--border);
    background: rgba(11, 15, 23, 0.6);
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
}

.status-left,
.status-right {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.25rem;
    align-items: center;
}

.online::before {
    box-shadow: 0 0 10px var(--ok);
}

.status a {
    color: var(--muted);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.status a:hover,
.status a:focus-visible,
.status a[aria-current="page"] {
    color: var(--text);
    border-bottom-color: var(--accent-2);
    outline: none;
}

.legal {
    max-width: 760px;
}

.legal .back {
    display: inline-block;
    margin-bottom: 2rem;
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--accent-2);
    text-decoration: none;
}

.legal .back:hover,
.legal .back:focus-visible {
    text-decoration: underline;
}

.legal h1 {
    font-family: var(--display);
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.legal h2 {
    font-family: var(--display);
    font-size: 1.15rem;
    font-weight: 600;
    margin: 2rem 0 0.5rem;
}

.legal p {
    color: var(--muted);
    max-width: 65ch;
}

.legal p + p {
    margin-top: 0.75rem;
}

.legal a {
    color: var(--accent-2);
}

.legal code {
    font-family: var(--mono);
    font-size: 0.9em;
}

@media (max-width: 820px) {
    :root {
        --gutter: 16px;
    }

    .page {
        padding-top: 3rem;
        padding-bottom: 2.5rem;
    }

    .home {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    #cursor-net {
        display: none;
    }

    .ln,
    .caret {
        animation: none;
    }
}

.term-body a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.term-body a:focus-visible {
    outline: 1px solid var(--accent-2);
    outline-offset: 2px;
}
