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

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

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

:root {
    --bg: #0e0f14;
    --bg-raised: #161821;
    --bg-card: #1a1b2a;
    --bg-card-hover: #23263a;
    --border: #2e324f;
    --text: #c8cad8;
    --text-muted: #a0a4ba;
    --text-dim: #7d819a;
    --accent: #708dbe;
    --accent-hover: #85a0ca;
    --accent-muted: rgba(112, 141, 190, 0.15);
    --accent-glow: rgba(112, 141, 190, 0.3);
    --white: #d1daf7;
    --nav-bg: rgba(14, 15, 20, 0.85);
    --shadow-screenshot: 0 24px 80px rgba(0, 0, 0, 0.5);
    --font-body: "Outfit", -apple-system, sans-serif;
    --font-mono: "JetBrains Mono", monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition:
        background 0.3s,
        color 0.3s;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: var(--accent-hover);
}

code {
    font-family: var(--font-mono);
    background: var(--bg-raised);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    border: 1px solid var(--border);
}

/* NAV */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition:
        background 0.3s,
        border-color 0.3s;
}
.nav.scrolled {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}
.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-weight: 600;
    font-size: 1.05rem;
}
.nav-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}
.nav-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 400;
}
.nav-links a:hover {
    color: var(--white);
}
.nav-cta {
    background: var(--accent) !important;
    color: var(--white) !important;
    padding: 6px 16px !important;
    border-radius: 6px;
    font-weight: 500 !important;
    font-size: 0.85rem !important;
}
.nav-cta:hover {
    background: var(--accent-hover) !important;
}

/* HERO ENTRANCE */
@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
.hero-inner {
    animation: fade-in 0.4s ease-out;
}

/* HERO */
.hero {
    padding: 140px 24px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 31px,
        rgba(112, 141, 190, 0.045) 31px,
        rgba(112, 141, 190, 0.045) 32px
    );
    -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 45%, black 5%, transparent 65%);
    mask-image: radial-gradient(ellipse 70% 55% at 50% 45%, black 5%, transparent 65%);
    pointer-events: none;
}
.hero-inner {
    max-width: 700px;
    margin: 0 auto;
}
.hero-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent);
    background: var(--accent-muted);
    border: 1px solid rgba(112, 141, 190, 0.25);
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 28px;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, opacity 0.5s, transform 0.5s;
    opacity: 0;
    transform: translateY(8px);
}
.hero-badge.revealed {
    opacity: 1;
    transform: translateY(0);
}
.hero-badge:hover {
    background: rgba(112, 141, 190, 0.18);
    border-color: rgba(112, 141, 190, 0.4);
}
.hero h1 {
    font-size: clamp(2.4rem, 6vw, 3.6rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--white);
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}
.hero h1.typewriter {
    font-family: var(--font-mono);
    font-weight: 600;
    letter-spacing: -0.02em;
    min-height: calc(3 * 1.15 * clamp(2.4rem, 6vw, 3.6rem));
}
.type-line {
    display: inline-block;
    min-height: 1.15em;
}
.type-line::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--accent);
    margin-left: 2px;
    vertical-align: -0.1em;
    opacity: 0;
}
.type-line.typing::after {
    opacity: 1;
}
.type-line.done.last::after {
    animation: blink 0.7s step-end infinite;
    opacity: 1;
}
@keyframes blink {
    50% { opacity: 0; }
}
.accent {
    color: var(--accent);
}
.hero-sub {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 540px;
    margin: 0 auto 32px;
    line-height: 1.65;
    font-weight: 300;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s, transform 0.6s;
}
.hero-sub.revealed {
    opacity: 1;
    transform: translateY(0);
}
.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 32px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s 0.1s, transform 0.6s 0.1s;
}
.hero-actions.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 500;
    transition:
        background 0.2s,
        color 0.2s,
        border-color 0.2s;
    cursor: pointer;
    border: none;
    text-decoration: none;
}
.btn-primary {
    background: var(--accent);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--accent-hover);
    color: var(--white);
}
.btn-secondary {
    background: var(--bg-raised);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: var(--bg-card);
    color: var(--white);
    border-color: var(--text-dim);
}
.btn-disabled {
    background: var(--bg-raised);
    color: var(--text-dim);
    border: 1px solid var(--border);
    cursor: default;
}
.btn-block {
    width: 100%;
    justify-content: center;
}
.download-card .btn {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: -0.01em;
}
.btn-linux { background: #708dbe; color: #fff; }
.btn-linux:hover { background: #85a0ca; color: #fff; }
.btn-macos { background: #8a8a9a; color: #fff; }
.btn-macos:hover { background: #9a9aaa; color: #fff; }
.btn-windows { background: #0078d4; color: #fff; }
.btn-windows:hover { background: #1a8ae0; color: #fff; }
.btn-android { background: #3a8a5c; color: #fff; }
.btn-android:hover { background: #4a9d6c; color: #fff; }

/* HERO META */
.hero-meta {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s 0.2s, transform 0.6s 0.2s;
}
.hero-meta.revealed {
    opacity: 1;
    transform: translateY(0);
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
}
.meta-item svg {
    opacity: 0.5;
}

/* SCREENSHOT HERO */
.screenshot-hero {
    padding: 20px 24px 48px;
    position: relative;
}
.screenshot-hero-inner {
    max-width: 960px;
    margin: 0 auto;
    position: relative;
}
.screenshot-hero-inner::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 120%;
    background: radial-gradient(ellipse, rgba(112, 141, 190, 0.07) 0%, transparent 65%);
    pointer-events: none;
    z-index: -1;
}
.screenshot-frame,
.screenshot-frame-sm {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-screenshot);
    transition: box-shadow 0.3s;
}
.screenshot-titlebar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
}
.titlebar-dots {
    display: flex;
    gap: 6px;
}
.titlebar-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
}
.titlebar-dots span:first-child {
    background: #e87272;
}
.titlebar-dots span:nth-child(2) {
    background: #e2b340;
}
.titlebar-dots span:last-child {
    background: #5ec26a;
}
.titlebar-title {
    font-size: 0.78rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
}
.screenshot-img {
    width: 100%;
    display: block;
}

/* FEATURES */
.features {
    padding: 48px 24px;
}
.features-inner {
    max-width: 1000px;
    margin: 0 auto;
}
.features h2,
.screenshots h2,
.tech h2,
.download h2 {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 600;
    color: var(--white);
    margin-bottom: 32px;
    text-align: center;
    letter-spacing: -0.02em;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.feature-card {
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition:
        background 0.2s,
        border-color 0.2s;
}
.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-glow);
}
.feature-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-muted);
    border-radius: 8px;
    color: var(--accent);
    margin-bottom: 14px;
}
.feature-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 6px;
}
.feature-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.55;
}

/* SCREENSHOTS */
.screenshots {
    padding: 48px 24px;
}
.screenshots-inner {
    max-width: 1000px;
    margin: 0 auto;
}
.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.screenshot-card {
    text-align: center;
}
.screenshot-caption {
    margin-top: 14px;
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* SCREENSHOT TABS */
.screenshots-tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}
.screenshots-tab {
    appearance: none;
    -webkit-appearance: none;
    padding: 8px 24px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.screenshots-tab:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
}
.screenshots-tab.active {
    background: var(--accent);
    color: var(--white);
}

/* MOBILE SCREENSHOTS */
.screenshots-grid-mobile {
    display: flex;
    justify-content: center;
    gap: 24px;
}
.screenshot-card-mobile {
    text-align: center;
    max-width: 220px;
}
.screenshot-phone {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-screenshot);
    padding: 8px;
}
.screenshot-phone .screenshot-img {
    border-radius: 12px;
}

/* DOWNLOAD */
.download {
    padding: 48px 24px;
    border-top: 1px solid var(--border);
}
.download-inner {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}
.download-inner > p {
    color: var(--text-muted);
    margin-top: -32px;
    margin-bottom: 40px;
}
.download-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}
.download-card {
    padding: 28px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}
.download-available {
    border-color: rgba(112, 141, 190, 0.3);
    background: linear-gradient(
        180deg,
        rgba(112, 141, 190, 0.06) 0%,
        var(--bg-card) 100%
    );
}
.download-os {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--white);
}
.download-os svg {
    color: var(--text-muted);
}
.download-note {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-dim);
}
.download-source {
    margin-top: 12px;
}
.download-source p {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 12px;
}
.code-block-wrap {
    position: relative;
}
.code-block {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 52px 14px 20px;
    overflow-x: auto;
    text-align: left;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.code-block::-webkit-scrollbar {
    height: 6px;
}
.code-block::-webkit-scrollbar-track {
    background: transparent;
}
.code-block::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
.code-block::-webkit-scrollbar-thumb:hover {
    background: var(--text-dim);
}
.code-block code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.82rem;
    color: var(--text);
    white-space: nowrap;
}

/* COPY BUTTON */
.copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-dim);
    transition:
        color 0.2s,
        border-color 0.2s,
        background 0.2s;
}
.copy-btn:hover {
    color: var(--white);
    border-color: var(--text-dim);
    background: var(--bg-card-hover);
}

/* FOOTER */
.footer {
    border-top: 1px solid var(--border);
    padding: 24px;
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    font-weight: 500;
    font-size: 0.9rem;
}
.footer-icon {
    width: 22px;
    height: 22px;
    border-radius: 4px;
}
.footer-right {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.82rem;
}
.footer-right a {
    color: var(--text-dim);
}
.footer-right a:hover {
    color: var(--text);
}
.footer-social {
    display: flex;
    align-items: center;
    color: var(--text-dim);
    transition: color 0.15s;
    position: relative;
    top: -1px;
}
.footer-social:hover {
    color: #5865f2;
}
.footer-sep {
    color: var(--border);
}

/* LIGHTBOX */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 40px;
    cursor: zoom-out;
}
.lightbox.active {
    display: flex;
}
.lightbox img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    animation: lightbox-in 0.2s ease-out;
}
@keyframes lightbox-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* RESPONSIVE */
@media (max-width: 640px) {
    .nav-links a:not(.nav-cta) {
        display: none;
    }
    .hero {
        padding-top: 110px;
    }
    .hero-meta {
        flex-direction: column;
        align-items: center;
    }
    .screenshot-hero {
        padding-bottom: 32px;
    }
    .features,
    .screenshots,
    .download {
        padding-top: 32px;
        padding-bottom: 32px;
    }
    .screenshots-grid {
        grid-template-columns: 1fr;
    }
    .screenshots-grid-mobile {
        flex-wrap: wrap;
    }
    .screenshot-card-mobile {
        max-width: 180px;
    }
    .download-grid {
        grid-template-columns: 1fr;
    }
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
    .footer-right {
        flex-wrap: wrap;
        justify-content: center;
    }
    .lightbox {
        padding: 16px;
    }
}

/* Distro dependency section */
.distro-deps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    text-align: left;
}
.distro-dep-item {
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.distro-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
}
.distro-label svg {
    opacity: 0.7;
}
.distro-dep-item .code-block {
    padding: 10px 44px 10px 14px;
    font-size: 0.75rem;
}
.distro-dep-item .code-block code {
    font-size: 0.75rem;
}

/* Collapsible build from source */
.build-details {
    text-align: left;
}
.build-details summary {
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dim);
    padding: 0.5rem 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}
.build-details summary::-webkit-details-marker {
    display: none;
}
.build-details summary::before {
    content: "▸";
    transition: transform 0.2s;
}
.build-details[open] summary::before {
    transform: rotate(90deg);
}
.build-details summary:hover {
    color: var(--text);
}

/* APT Repo Section */
.apt-repo-section {
    margin-top: 2.5rem;
    padding: 1.5rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.apt-repo-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.apt-badge {
    font-size: 0.7rem;
    font-weight: 400;
    padding: 0.15rem 0.5rem;
    background: var(--accent-muted);
    border-radius: 999px;
    color: var(--text-dim);
}
.apt-repo-desc {
    text-align: left;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin: 0 0 1.25rem;
}
.apt-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.apt-step {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.apt-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.apt-step-label {
    font-size: 0.85rem;
    font-weight: 500;
    min-width: 120px;
}
.apt-step .code-block-wrap {
    flex: 1;
    min-width: 0;
    width: 100%;
}
.apt-step .code-block {
    font-size: 0.8rem;
}

.apt-distro-logos {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.6;
}

/* SCROLL REVEAL */
[data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
[data-reveal].visible {
    opacity: 1;
    transform: translateY(0);
}
[data-reveal-delay="1"] { transition-delay: 0.08s; }
[data-reveal-delay="2"] { transition-delay: 0.16s; }
[data-reveal-delay="3"] { transition-delay: 0.24s; }
[data-reveal-delay="4"] { transition-delay: 0.32s; }
[data-reveal-delay="5"] { transition-delay: 0.4s; }
[data-reveal-delay="6"] { transition-delay: 0.48s; }
[data-reveal-delay="7"] { transition-delay: 0.56s; }

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    [data-reveal] {
        opacity: 1 !important;
        transform: none !important;
    }
}
