:root {
    --ink: #f4f2ee;
    --muted: #a3a09a;
    --paper: #171716;
    --surface: #20201e;
    --surface-soft: #292825;
    --line: rgba(244,242,238,.13);
    --accent: #ba9cff;
    --accent-ink: #211337;
}

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

::selection {
    background: var(--ink);
    color: var(--paper);
}

::-moz-selection {
    background: var(--ink);
    color: var(--paper);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    cursor: url("./assets/cursor.svg") 0 0, auto;
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: 'Geist', sans-serif;
    line-height: 1.55;
    overflow-x: hidden;

}

a,
button,
[role="button"],
input[type="button"],
input[type="submit"],
label,
*[style*="cursor: pointer"],
summary {
    cursor: url("./assets/cursor-pointer.svg") 0 0, pointer;
}

body::before {
    background-image: linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px);
    background-size: 64px 64px;
    content: '';
    inset: 0;
    mask-image: linear-gradient(to bottom,black,transparent 68%);
    pointer-events: none;
    position: fixed;
    z-index: -1;
}

img {
    display: block;
    max-width: 100%;
}

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

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

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .65s ease,transform .65s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

.image-overlay {
    align-items: center;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(6px);
    cursor: zoom-out;
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 30px;
    position: fixed;
    z-index: 100;
}

.image-overlay img {
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 30px 100px #000;
    max-height: 90vh;
    max-width: 90vw;
}

.gallery-item img,.window img {
    cursor: zoom-in;
}

.header {
    background: rgba(23,23,22,.76);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10;
}

.nav {
    align-items: center;
    display: flex;
    height: 76px;
    justify-content: space-between;
}

.logo {
    align-items: center;
    display: flex;
    width: auto;
}

.logo a {
    align-items: center;
    display: flex;
    gap: 12px;
}

.logo img {
    filter: invert(1);
}

.logo-primary,.animated-logo {
    height: 32px;
    width: auto;
    pointer-events: none;
}

.animated-logo {
    color: var(--ink);
    filter: invert(1);
}

nav {
    display: flex;
    gap: 28px;
    margin-left: 80px;
}

nav a {
    color: var(--muted);
    font: 500 11px/1 'Geist Mono', monospace;
    letter-spacing: .08em;
    text-transform: uppercase;
    transition: color .2s;
}

nav a:hover {
    color: var(--accent);
}

.nav-button {
    border: 1px solid var(--line);
    border-radius: 999px;
    font: 500 12px/1 'Geist Mono', monospace;
    padding: 11px 17px;
    transition: .2s;
}

.nav-button:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}

.nav-actions {
    align-items: center;
    display: flex;
    gap: 9px;
}

.nav-demo {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}

.nav-demo:hover {
    background: var(--ink);
    border-color: var(--ink);
}

.scroll-progress {
    height: 2px;
    left: 0;
    pointer-events: none;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 100;
}

.scroll-progress span {
    background: var(--accent);
    display: block;
    height: 100%;
    transform: scaleX(0);
    transform-origin: left;
}

.hero {
    align-items: center;
    display: flex;
    min-height: 100svh;
    padding: 130px 0 70px;
}

.hero-grid {
    align-items: center;
    display: grid;
    gap: 64px;
    grid-template-columns: .92fr 1.08fr;
}

.badge,.section-title span {
    color: var(--accent);
    font: 500 11px/1 'Geist Mono', monospace;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.badge {
    align-items: center;
    border: 1px solid rgba(186,156,255,.4);
    border-radius: 99px;
    display: inline-flex;
    margin-bottom: 24px;
    padding: 9px 13px;
}

.badge::before {
    background: var(--accent);
    border-radius: 50%;
    content: '';
    height: 6px;
    margin-right: 8px;
    width: 6px;
}

.hero h1 {
    font-size: clamp(76px, 10vw, 150px);
    letter-spacing: -.02em;
    line-height: .9;
    margin-left: -.02em;
}

.hero h2 {
    font-size: clamp(30px, 3.5vw, 52px);
    letter-spacing: -.015em;
    line-height: 1.1;
    margin-top: 25px;
    max-width: 620px;
}

.hero p {
    color: var(--muted);
    font-size: 16px;
    margin-top: 27px;
    max-width: 510px;
}

.tech-line {
    color: #d3d0ca;
    display: flex;
    flex-wrap: wrap;
    font: 500 11px/1.8 'Geist Mono', monospace;
    gap: 0 10px;
    letter-spacing: .04em;
    margin-top: 28px;
    text-transform: uppercase;
}

.tech-line span {
    color: var(--accent);
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 38px;
}

.primary-btn,.secondary-btn {
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    padding: 14px 20px;
    transition: transform .2s,background .2s;
}

.primary-btn {
    background: var(--accent);
    color: var(--accent-ink);
}

.secondary-btn {
    border: 1px solid var(--line);
    color: var(--ink);
}

.primary-btn:hover,.secondary-btn:hover {
    transform: translateY(-2px);
}

.primary-btn:hover {
    background: #ccb3ff;
}

.secondary-btn:hover {
    background: var(--surface-soft);
}

.hero-preview {
    position: relative;
}

.hero-preview::before {
    background: var(--accent);
    border-radius: 50%;
    content: '';
    filter: blur(100px);
    height: 230px;
    opacity: .22;
    position: absolute;
    right: 15%;
    top: -10%;
    width: 230px;
    z-index: -1;
}

.window {
    background: #111;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 16px;
    box-shadow: 16px 16px 0 rgba(186,156,255,.65),0 35px 100px rgba(0,0,0,.5);
    overflow: hidden;
    padding: 10px;
    transform: rotate(1.5deg);
}

.window-top {
    align-items: center;
    display: flex;
    gap: 6px;
    height: 24px;
    padding: 0 4px 8px;
}

.window-top span {
    background: #53524d;
    border-radius: 50%;
    height: 7px;
    width: 7px;
}

.window-top span:first-child {
    background: #ff7b72;
}

.window-top span:nth-child(2),.window-top span:nth-child(3) {
    background: var(--accent);
}

.window img {
    border-radius: 8px;
}

.hero {
    align-items: center;
    display: flex;
    min-height: 100svh;
    padding: 130px 0 70px;
}

.hero-grid {
    align-items: center;
    display: grid;
    gap: 64px;
    grid-template-columns: .92fr 1.08fr;
}

.badge,.section-title span {
    color: var(--accent);
    font: 500 11px/1 'Geist Mono', monospace;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.badge {
    align-items: center;
    border: 1px solid rgba(186,156,255,.4);
    border-radius: 99px;
    display: inline-flex;
    margin-bottom: 14px;
    padding: 9px 13px;
}

.badge::before {
    background: var(--accent);
    border-radius: 50%;
    content: '';
    height: 6px;
    margin-right: 8px;
    width: 6px;
}

.author-line {
    color: var(--muted);
    font: 500 12px/1.5 'Geist Mono', monospace;
    letter-spacing: .01em;
    margin: 0 0 20px !important;
}

.author-line strong {
    color: var(--ink);
    font-weight: 500;
}

.hero h1 {
    font-size: clamp(76px,10vw,150px);
    letter-spacing: -.045em;
    line-height: .82;
    margin-left: -.04em;
}

.hero h2 {
    font-size: clamp(30px,3.5vw,52px);
    letter-spacing: -.035em;
    line-height: 1.06;
    margin-top: 25px;
    max-width: 620px;
}

.hero p {
    color: var(--muted);
    font-size: 16px;
    margin-top: 27px;
    max-width: 510px;
}

.tech-line {
    color: #d3d0ca;
    display: flex;
    flex-wrap: wrap;
    font: 500 11px/1.8 'Geist Mono', monospace;
    gap: 0 10px;
    letter-spacing: .04em;
    margin-top: 28px;
    text-transform: uppercase;
}

.tech-line span {
    color: var(--accent);
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 38px;
}

.primary-btn,.secondary-btn {
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    padding: 14px 20px;
    transition: transform .2s,background .2s;
}

.primary-btn {
    background: var(--accent);
    color: var(--accent-ink);
}

.secondary-btn {
    border: 1px solid var(--line);
    color: var(--ink);
}

.primary-btn:hover,.secondary-btn:hover {
    transform: translateY(-2px);
}

.secondary-btn:hover {
    background: var(--surface-soft);
}

.hero-preview {
    position: relative;
}

.hero-preview::before {
    background: var(--accent);
    border-radius: 50%;
    content: '';
    filter: blur(100px);
    height: 230px;
    opacity: .22;
    position: absolute;
    right: 15%;
    top: -10%;
    width: 230px;
    z-index: -1;
}

.window {
    background: #111;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 16px;
    box-shadow: 16px 16px 0 rgba(186,156,255,.65),0 35px 100px rgba(0,0,0,.5);
    overflow: hidden;
    padding: 10px;
    transform: rotate(1.5deg);
}

.window-top {
    align-items: center;
    display: flex;
    gap: 6px;
    height: 24px;
    padding: 0 4px 8px;
}

.window-top span {
    background: #53524d;
    border-radius: 50%;
    height: 7px;
    width: 7px;
}

.window-top span:first-child {
    background: #ff7b72;
}

.window-top span:nth-child(2),.window-top span:nth-child(3) {
    background: var(--accent);
}

.window img {
    border-radius: 8px;
}

.section {
    padding: 132px 0;
    position: relative;
}

.section:nth-of-type(odd) {
    background: rgba(255,255,255,.018);
    border-block: 1px solid var(--line);
}

.section-title {
    margin-bottom: 52px;
    max-width: 720px;
}

.section-title h2 {
    font-size: clamp(36px,5vw,64px);
    letter-spacing: -.04em;
    line-height: 1.04;
    margin-top: 14px;
}

.section-title p {
    color: var(--muted);
    font-size: 17px;
    margin-top: 19px;
    max-width: 620px;
    white-space: pre-line;
}

.stats,.workflow,.features-grid,.stack-grid,.challenge-grid {
    display: grid;
    gap: 14px;
}

.stats {
    grid-template-columns: repeat(4,1fr);
}

.stat-card,.workflow-step,.feature-card,.stack-card,.challenge-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    position: relative;
    transition: border-color .25s,transform .25s,background .25s;
}

.stat-card:hover,.workflow-step:hover,.feature-card:hover,.stack-card:hover,.challenge-card:hover {
    background: var(--surface-soft);
    border-color: rgba(186,156,255,.6);
    transform: translateY(-5px);
}

.stat-card {
    min-height: 186px;
    padding: 28px;
}

.stat-card h3 {
    color: var(--accent);
    font-size: 50px;
    letter-spacing: -.035em;
    line-height: 1.05;
}

.stat-card p,.feature-card p,.stack-card p,.challenge-card p {
    color: var(--muted);
    font-size: 14px;
    margin-top: 18px;
}

.workflow {
    grid-template-columns: repeat(5,1fr);
    position: relative;
}

.workflow-progress {
    background: rgba(186,156,255,.22);
    height: 1px;
    left: 8%;
    position: absolute;
    right: 8%;
    top: 25px;
    z-index: 0;
}

.workflow-progress::after {
    background: var(--accent);
    box-shadow: 0 0 14px rgba(186,156,255,.85);
    content: '';
    height: 100%;
    inset: 0;
    position: absolute;
    transform: scaleX(var(--workflow-progress,0));
    transform-origin: left;
    transition: transform .15s linear;
}

.workflow-step {
    min-height: 205px;
    padding: 24px;
    z-index: 1;
}

.workflow-step.is-active h3 {
    text-shadow: 0 0 18px rgba(186,156,255,.9);
}

.workflow-step h3 {
    color: var(--accent);
    font: 500 28px/1 'Geist Mono', monospace;
}

.workflow-step p {
    color: var(--muted);
    font-size: 14px;
    margin-top: 42px;
}

.features-grid,.stack-grid {
    grid-template-columns: repeat(3,1fr);
}

.feature-card,.stack-card {
    min-height: 215px;
    padding: 30px;
}

.feature-card h3,.stack-card h3,.challenge-card h3 {
    font-size: 19px;
    letter-spacing: -.04em;
}

.stack-card ul {
    list-style: none;
    margin-top: 18px;
}

.stack-card li {
    border-top: 1px solid var(--line);
    color: var(--muted);
    font: 400 12px/1.2 'Geist Mono', monospace;
    padding: 10px 0;
}

.stack-card li:last-child {
    border-bottom: 1px solid var(--line);
}

.architecture-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    margin: auto;
    max-width: 760px;
    padding: 30px;
}

.arch-node {
    background: #2a2926;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    padding: 19px;
    text-align: center;
}

.arrow {
    color: var(--accent);
    font: 500 25px/1 'Geist Mono', monospace;
    margin: 12px;
    text-align: center;
}

.arch-row {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr 1fr;
}

.gallery-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2,1fr);
}

.gallery-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 13px;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: border-color .25s,box-shadow .25s,transform .18s ease-out;
}

.gallery-item::before {
    background: rgba(20,19,18,.78);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    color: var(--ink);
    content: 'View screen  ↗';
    font: 500 10px/1 'Geist Mono', monospace;
    left: 50%;
    letter-spacing: .08em;
    opacity: 0;
    padding: 11px 13px;
    pointer-events: none;
    position: absolute;
    text-transform: uppercase;
    top: 50%;
    transform: translate(-50%,-45%);
    transition: opacity .2s,transform .2s;
    z-index: 3;
}

.gallery-item:hover::before {
    opacity: 1;
    transform: translate(-50%,-50%);
}

.gallery-item img {
    aspect-ratio: 16/10;
    object-fit: cover;
    transition: transform .45s;
}

.gallery-item:hover img {
    transform: scale(1.035);
}

.gallery-item p {
    border-top: 1px solid var(--line);
    font: 500 12px/1 'Geist Mono', monospace;
    padding: 17px 20px;
    text-transform: uppercase;
}

.challenge-grid {
    grid-template-columns: repeat(5,1fr);
}

.challenge-card {
    min-height: 175px;
    padding: 25px;
}

.challenge-card p {
    font-size: 13px;
}

.footer {
    border-top: 1px solid var(--line);
    padding: 110px 0 52px;
    text-align: center;
}

.footer h2 {
    color: var(--accent);
    font-size: clamp(70px,13vw,170px);
    letter-spacing: -.055em;
    line-height: .8;
}

.footer p {
    color: var(--muted);
    margin-top: 25px;
}

.footer .footer-author {
    color: var(--ink);
    font: 500 12px/1.5 'Geist Mono', monospace;
    margin: 12px auto 0;
}

.footer-contact,.footer-links {
    display: flex;
    flex-wrap: wrap;
    font: 500 11px/1 'Geist Mono', monospace;
    gap: 18px 24px;
    justify-content: center;
    max-width: 760px;
    text-transform: uppercase;
}

.footer-contact {
    margin: 28px auto 0;
}

.footer-contact a {
    color: var(--ink);
}

.footer-links {
    border-top: 1px solid var(--line);
    margin: 32px auto 0;
    padding-top: 25px;
}

.footer-contact a:hover,
.footer-links a:hover {
    color: var(--accent);
}

@media (max-width:1000px) {
    .hero-grid {
        gap: 66px;
        grid-template-columns: 1fr;
    }
    .hero-content {
        max-width: 680px;
    }
    .hero-preview {
        margin: 0 auto;
        max-width: 720px;
    }
    .workflow,.challenge-grid {
        grid-template-columns: repeat(2,1fr);
    }
    .workflow-step p {
        margin-top: 24px;
    }
}

@media (max-width:720px) {
    .container {
        width: min(100% - 32px,1240px);
    }
    .nav {
        height: 64px;
    }
    .logo {
        width: auto;
    }
    .logo-primary,.animated-logo {
        height: 26px;
        width: auto;
    }
    nav {
        display: none;
    }
    .nav-button {
        font-size: 10px;
        padding: 9px 12px;
    }
    .nav-actions .nav-button:first-child {
        display: none;
    }
    .hero {
        min-height: auto;
        padding: 128px 0 78px;
    }
    .hero h1 {
        font-size: 80px;
    }
    .window {
        box-shadow: 8px 8px 0 rgba(186,156,255,.65),0 25px 70px rgba(0,0,0,.4);
    }
    .section {
        padding: 86px 0;
    }
    .section-title {
        margin-bottom: 35px;
    }
    .stats,.features-grid,.stack-grid,.gallery-grid,.workflow,.challenge-grid {
        grid-template-columns: 1fr;
    }
    .workflow-progress {
        display: none;
    }
    .stat-card {
        min-height: 145px;
    }
    .feature-card,.stack-card {
        min-height: auto;
    }
    .arch-row {
        grid-template-columns: 1fr;
    }
    .architecture-box {
        padding: 16px;
    }
}

/* Keep the primary actions above the fold on laptop-sized screens. */
@media (min-width:721px) and (max-height:900px) {
    .hero {
        padding: 88px 0 36px;
    }

    .hero-grid {
        gap: 40px;
    }

    .badge {
        margin-bottom: 12px;
    }

    .author-line {
        margin-bottom: 12px !important;
    }

    .hero h1 {
        font-size: clamp(76px, 8vw, 112px);
    }

    .hero h2 {
        margin-top: 16px;
    }

    .hero p {
        margin-top: 18px;
    }

    .tech-line {
        margin-top: 18px;
    }

    .hero-actions {
        margin-top: 24px;
    }
}

/* Motion and section transitions */
nav a {
    padding: 9px 0;
    position: relative;
}

nav a::after {
    background: var(--accent);
    bottom: 0;
    content: '';
    height: 1px;
    left: 0;
    position: absolute;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
    width: 100%;
}

nav a:hover::after,nav a.is-active::after {
    transform: scaleX(1);
}

nav a.is-active {
    color: var(--ink);
}

.section {
    isolation: isolate;
    overflow: hidden;
}

.section::before {
    background: radial-gradient(ellipse 48% 16% at 50% 0,rgba(186,156,255,.14),transparent 72%);
    content: '';
    height: 280px;
    left: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: -160px;
    z-index: -1;
}

.section:nth-of-type(odd)::before {
    background: radial-gradient(ellipse 42% 14% at 14% 0,rgba(186,156,255,.12),transparent 72%);
}

.section + .section::after {
    background: linear-gradient(90deg,transparent,rgba(186,156,255,.6),transparent);
    content: '';
    height: 1px;
    left: 50%;
    opacity: .7;
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    width: min(440px,65%);
}

.reveal {
    transition: opacity .75s ease,transform .75s cubic-bezier(.2,.75,.25,1);
}

.section.is-visible .section-title {
    animation: section-heading .7s both;
}

.section.is-visible .stat-card,.section.is-visible .workflow-step,.section.is-visible .feature-card,.section.is-visible .stack-card,.section.is-visible .challenge-card,.section.is-visible .gallery-item {
    animation: card-enter .65s both;
}

.section.is-visible .stat-card:nth-child(2),.section.is-visible .workflow-step:nth-child(2),.section.is-visible .feature-card:nth-child(2),.section.is-visible .stack-card:nth-child(2),.section.is-visible .challenge-card:nth-child(2),.section.is-visible .gallery-item:nth-child(2) {
    animation-delay: .08s;
}

.section.is-visible .stat-card:nth-child(3),.section.is-visible .workflow-step:nth-child(3),.section.is-visible .feature-card:nth-child(3),.section.is-visible .stack-card:nth-child(3),.section.is-visible .challenge-card:nth-child(3),.section.is-visible .gallery-item:nth-child(3) {
    animation-delay: .16s;
}

.section.is-visible .stat-card:nth-child(4),.section.is-visible .workflow-step:nth-child(4),.section.is-visible .feature-card:nth-child(4),.section.is-visible .stack-card:nth-child(4),.section.is-visible .challenge-card:nth-child(4),.section.is-visible .gallery-item:nth-child(4) {
    animation-delay: .24s;
}

.section.is-visible .workflow-step:nth-child(5),.section.is-visible .challenge-card:nth-child(5),.section.is-visible .gallery-item:nth-child(5) {
    animation-delay: .32s;
}

.stat-card,.workflow-step,.feature-card,.stack-card,.challenge-card,.gallery-item {
    overflow: hidden;
}

.stat-card::after,.workflow-step::after,.feature-card::after,.stack-card::after,.challenge-card::after {
    background: radial-gradient(180px circle at var(--pointer-x,50%) var(--pointer-y,50%),rgba(186,156,255,.18),transparent 70%);
    content: '';
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    transition: opacity .3s;
    z-index: 0;
}

.stat-card:hover::after,.workflow-step:hover::after,.feature-card:hover::after,.stack-card:hover::after,.challenge-card:hover::after {
    opacity: 1;
}

.stat-card > *,.workflow-step > *,.feature-card > *,.stack-card > *,.challenge-card > *,.gallery-item > * {
    position: relative;
    z-index: 1;
}

.gallery-item img {
    position: relative;
    z-index: 0;
}

.gallery-item p {
    background: var(--surface);
    position: relative;
    z-index: 2;
}

.hero-preview {
    transition: transform .35s cubic-bezier(.2,.75,.25,1);
}

@keyframes section-heading {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes card-enter {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes orbit-float {
    0%,100% { transform: translate3d(0,0,0); }
    50% { transform: translate3d(-10px,14px,0); }
}

@media (prefers-reduced-motion:reduce) {
    *,*::before,*::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}