:root {
    color-scheme: dark;
    --background: #101418;
    --surface: #171d21;
    --surface-raised: #1c2429;
    --line: #323b40;
    --text: #f4f6f3;
    --muted: #aeb9bc;
    --accent: #d9ff64;
    --accent-hover: #e6ff99;
    --ink: #17200c;
    --header-height: 75px;
    --radius: 20px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 24px);
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
}

body.is-locked { overflow: hidden; }

a { color: inherit; }
button { font: inherit; }
img { display: block; max-width: 100%; }
figure, p { margin: 0; }

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 5px;
}

.container {
    width: min(1240px, calc(100% - 80px));
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    z-index: 20;
    inset: 10px auto auto 12px;
    padding: 8px 14px;
    background: var(--accent);
    color: var(--ink);
    border-radius: 8px;
    transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
    position: fixed;
    z-index: 10;
    inset: 0 0 auto;
    background: rgb(16 20 24 / 88%);
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(18px);
    transition: border-color 180ms ease, background 180ms ease;
}

.site-header.is-scrolled {
    background: rgb(16 20 24 / 96%);
    border-color: var(--line);
}

.header-inner, #site-nav, .brand, .hero-actions, .button {
    display: flex;
    align-items: center;
}

.header-inner { min-height: var(--header-height); justify-content: space-between; gap: 20px; }

.brand {
    width: fit-content;
    gap: 10px;
    font-size: 0.98rem;
    font-weight: 650;
    letter-spacing: -0.035em;
    text-decoration: none;
    line-height: 1.25;
}

.brand strong { color: var(--accent); }
.brand img { flex: none; border-radius: 10px; }

#site-nav { gap: clamp(16px, 2.5vw, 36px); }
#site-nav > a:not(.button) { color: var(--muted); font-size: 0.92rem; text-decoration: none; }
#site-nav > a:not(.button):hover, .footer-links a:hover { color: var(--accent); }
.menu-toggle { display: none; }

.button {
    width: fit-content;
    min-height: 50px;
    justify-content: center;
    gap: 10px;
    padding: 10px 19px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 0.94rem;
    font-weight: 750;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    transition: background 180ms ease, border-color 180ms ease;
}

.button-small {
    min-height: 43px;
    color: var(--accent);
    border-color: #52623e;
}

.button-small:hover { border-color: var(--accent); background: #232e1d; }
.button-primary { background: var(--accent); color: var(--ink); }
.button-primary:hover { background: var(--accent-hover); }

.button-primary::before {
    width: 0;
    height: 0;
    border-block: 7px solid transparent;
    border-left: 11px solid currentColor;
    content: "";
}

.hero {
    display: grid;
    grid-template-columns: 1fr minmax(0, 0.94fr);
    align-items: center;
    gap: clamp(30px, 5vw, 78px);
    padding-block: calc(var(--header-height) + 62px) 66px;
}

.eyebrow {
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid #475438;
    border-radius: 7px;
    background: #1c261b;
}

.hero-badge::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    content: "";
}

h1, h2, h3 { margin: 0; line-height: 1.05; }

h1, h2 {
    font-weight: 760;
    letter-spacing: -0.05em;
    text-wrap: balance;
}

h1 { margin-block: 20px; font-size: clamp(3.5rem, 7vw, 6.2rem); }
h2 { font-size: clamp(2.5rem, 4.8vw, 4.25rem); }
h3 { font-size: 1.14rem; letter-spacing: -0.035em; }
h1 em, h2 em { color: var(--accent); font-style: normal; }

.lede { max-width: 36ch; color: var(--muted); font-size: clamp(1.08rem, 1.7vw, 1.28rem); }
.hero-actions { flex-wrap: wrap; gap: 16px 24px; margin-top: 28px; }

.text-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    gap: 8px;
    font-weight: 650;
    text-decoration: none;
}

.text-link span { color: var(--accent); }
.text-link:hover { text-decoration: underline; text-underline-offset: 5px; }

.hero-art {
    position: relative;
    display: grid;
    min-height: 520px;
    place-items: center;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid #3b4a43;
    border-radius: 28px;
    background:
        repeating-linear-gradient(90deg, transparent 0 47px, #abcd8918 47px 48px),
        repeating-linear-gradient(0deg, transparent 0 47px, #abcd8918 47px 48px),
        radial-gradient(ellipse at 45% 70%, #485c39, #25352d 48%, #171f24 85%);
}

.hero-art::before, .hero-art::after {
    position: absolute;
    z-index: -1;
    inset: 50% auto auto 50%;
    width: 85%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border: 1px solid rgb(217 255 100 / 30%);
    border-radius: 50%;
    content: "";
}

.hero-art::after { width: 67%; }

.phone {
    width: min(53%, 248px);
    padding: 7px;
    border: 1px solid #718072;
    border-radius: 31px;
    background: #111717;
    box-shadow: 15px 24px 45px #101512c9;
    transform: rotate(-7deg);
}

.phone-screen { overflow: hidden; border-radius: 24px; background: #e3ecf8; }
.phone img { width: 100%; height: auto; }

.section { padding-block: 72px; }
.section-heading { margin-bottom: 28px; }
.section-heading .eyebrow, .split-panel .eyebrow { margin-bottom: 9px; }
.section-heading h2, .split-panel h2 { text-wrap: pretty; }

.feature-grid, .steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.feature-card {
    min-height: 154px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.feature-card p, .steps p { margin-top: 10px; color: var(--muted); }
.feature-accent { border-color: #4b5a39; background: #202a20; }
.feature-accent h3 { color: var(--accent); }

.gallery-section {
    background: var(--surface);
    border-block: 1px solid var(--line);
}

.gallery-layout { display: grid; gap: 14px; }
.gallery-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }

.gallery-link {
    display: block;
    overflow: hidden;
    border: 1px solid #435054;
    border-radius: 15px;
    background: var(--background);
    transition: border-color 180ms ease;
}

.gallery-link:hover { border-color: var(--accent); }
.gallery-link img { width: 100%; height: auto; }
.gallery-wide { width: min(100%, 860px); justify-self: center; }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: setup-step; }

.steps li {
    padding: 18px 14px 0 0;
    border-top: 1px solid var(--line);
    counter-increment: setup-step;
}

.steps li::before {
    display: grid;
    width: 32px;
    aspect-ratio: 1;
    margin-bottom: 18px;
    place-items: center;
    border: 1px solid #52623e;
    border-radius: 50%;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 800;
    content: counter(setup-step);
}

#launcher { padding-top: 0; }

.split-panel, .download-panel {
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    align-items: center;
    gap: clamp(16px, 5vw, 70px);
    padding: clamp(28px, 5vw, 62px);
    border: 1px solid #47563f;
    border-radius: var(--radius);
    background: linear-gradient(125deg, #283621, var(--surface-raised) 70%);
}

.panel-copy { max-width: 44ch; color: var(--muted); font-size: 1.08rem; }

.usage {
    display: grid;
    grid-template-columns: minmax(0, 0.55fr) minmax(0, 1fr);
    gap: 16px 36px;
    padding-block: 28px 64px;
    border-top: 1px solid var(--line);
}

.usage h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.05em; }
.usage p { max-width: 66ch; color: var(--muted); }
.usage a, .developer a { color: var(--text); text-underline-offset: 3px; }
.usage a:hover, .developer a:hover { color: var(--accent); }

.download { padding-bottom: 72px; }

.download-panel {
    grid-template-columns: 1fr auto;
    background: var(--surface-raised);
}

.download-panel h2 { font-size: clamp(2.2rem, 4vw, 3.8rem); text-wrap: pretty; }

.site-footer {
    padding-block: 35px 20px;
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.footer-grid { display: grid; grid-template-columns: 1fr 0.65fr 1fr; gap: 26px; }
.footer-links { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.footer-links a { text-decoration: none; }
.publisher { margin-top: 12px; }
.publisher, .footer-links, .developer address, .copyright { color: var(--muted); font-size: 0.88rem; }
.developer h2 { margin-bottom: 9px; font-size: 0.99rem; letter-spacing: -0.025em; }
.developer address { font-style: normal; overflow-wrap: anywhere; }
.copyright { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }

#lightbox {
    max-width: calc(100% - 26px);
    max-height: calc(100% - 26px);
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 12px;
    background: transparent;
}

#lightbox::backdrop { background: #080a0cf2; }
.lightbox-figure { position: relative; }
.lightbox-figure img { max-width: min(88vw, 1100px); max-height: 85dvh; border-radius: 10px; }

.lightbox-close {
    position: absolute;
    inset: 10px 10px auto auto;
    display: grid;
    width: 44px;
    aspect-ratio: 1;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--background);
    color: var(--text);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox-close:hover { color: var(--accent); }

[data-reveal].is-visible { animation: enter 350ms ease-out both; }

@keyframes enter {
    from { opacity: 0.72; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
    .container { width: calc(100% - 48px); }
    .hero { gap: 28px; padding-top: calc(var(--header-height) + 42px); }
    .hero-art { min-height: 410px; }
    .phone { width: min(61%, 205px); }
    .section { padding-block: 52px; }
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .usage { padding-block: 24px 48px; }
}

@media (max-width: 700px) {
    :root { --header-height: 64px; }
    .container { width: calc(100% - 32px); }
    .header-inner { flex-wrap: wrap; gap: 10px; }
    #site-nav { flex-wrap: wrap; gap: 10px 18px; padding-bottom: 12px; }

    .has-js .menu-toggle {
        display: block;
        min-height: 44px;
        padding: 6px 12px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--surface);
        color: var(--text);
        cursor: pointer;
    }

    .has-js #site-nav {
        position: absolute;
        display: none;
        inset: 100% 0 auto;
        align-items: stretch;
        flex-direction: column;
        gap: 0;
        padding: 10px 16px 16px;
        border-bottom: 1px solid var(--line);
        background: var(--background);
    }

    .has-js #site-nav.is-open { display: flex; }
    #site-nav.is-open > a:not(.button) { padding: 10px 0; }
    #site-nav.is-open > .button { margin-top: 8px; }

    .hero { grid-template-columns: 1fr; gap: 26px; padding: calc(var(--header-height) + 46px) 0 30px; }
    html:not(.has-js) .hero { padding-top: calc(var(--header-height) + 100px); }
    .hero h1 { max-width: 12ch; font-size: clamp(2.9rem, 10vw, 4.7rem); }
    .hero-art { min-height: 390px; }
    .phone { width: min(52%, 193px); }
    .section { padding-block: 40px; }
    .feature-card { min-height: 0; padding: 17px; }
    .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .gallery-grid, .gallery-layout { gap: 8px; }
    .gallery-link { border-radius: 10px; }
    .steps, .split-panel, .usage, .download-panel { grid-template-columns: 1fr; }
    .steps { gap: 22px; }
    .steps li { padding-top: 14px; }
    .steps li::before { margin-bottom: 10px; }
    .usage { padding-top: 24px; }
    .download { padding-bottom: 45px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .developer { grid-column: 1 / -1; }
}

@media (max-width: 390px) {
    .hero-art { min-height: 320px; }
    .feature-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
