/* Umbrella home page: a dark neutral canvas with one accent per pillar. The particle
   hero (js/home-hero.js) draws on a fixed canvas behind four full-height sections. */

:root {
    --ink: #0a0b0d;
    --ink-raised: #14161a;
    --paper: #f1f0ec;
    --muted: #a3a6ad;
    --line: rgba(241, 240, 236, 0.14);
    --accent-lab: #f5c842;      /* Sakviti Gold */
    --accent-network: #9dcbff;  /* Signal Blue, the network brand accent */
    --accent-games: #e39a7b;    /* clay */
    --accent-software: #9ccfb4; /* sage */
    --gutter: clamp(16px, 5vw, 72px);
    --font-display: 'Outfit', 'Segoe UI', system-ui, sans-serif;
    --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

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

html {
    background: var(--ink);
    color-scheme: dark;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 20;
    padding: 10px 16px;
    background: var(--paper);
    color: var(--ink);
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
}

:focus-visible {
    outline: 2px solid var(--paper);
    outline-offset: 4px;
    border-radius: 4px;
}

/* ── Particle canvas ─────────────────────────────────────── */

.hero-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}

/* Soft vignette so type stays readable wherever the particles drift. */
.hero-veil {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(10, 11, 13, 0.82) 0%, rgba(10, 11, 13, 0.35) 42%, rgba(10, 11, 13, 0) 62%),
        linear-gradient(0deg, rgba(10, 11, 13, 0.7) 0%, rgba(10, 11, 13, 0) 22%);
}

.no-hero .hero-canvas {
    display: none;
}

/* ── Navigation ──────────────────────────────────────────── */

.home-nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px var(--gutter);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.home-nav.is-scrolled {
    background: rgba(10, 11, 13, 0.72);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom-color: var(--line);
}

.home-nav__logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
}

.home-nav__logo img {
    width: 30px;
    height: 30px;
}

.home-nav__links {
    display: flex;
    gap: clamp(14px, 3vw, 36px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-nav__links a {
    position: relative;
    padding: 6px 0;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.home-nav__links a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.home-nav__links a:hover,
.home-nav__links a:focus-visible {
    color: var(--paper);
}

.home-nav__links a:hover::after,
.home-nav__links a:focus-visible::after {
    transform: scaleX(1);
}

.home-nav__links a[data-accent='network']:hover { color: var(--accent-network); }
.home-nav__links a[data-accent='games']:hover { color: var(--accent-games); }
.home-nav__links a[data-accent='software']:hover { color: var(--accent-software); }

/* ── Stage rail (which form the particles hold) ──────────── */

.stage-rail {
    position: fixed;
    right: var(--gutter);
    bottom: 32px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.stage-rail li {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    opacity: 0.45;
    transition: opacity 0.4s ease, color 0.4s ease;
}

.stage-rail li::after {
    content: '';
    width: 18px;
    height: 1px;
    background: currentColor;
    transition: width 0.4s ease;
}

.stage-rail li.is-active {
    opacity: 1;
    color: var(--paper);
}

.stage-rail li.is-active::after {
    width: 40px;
}

.stage-rail {
    transition: opacity 0.3s ease;
}

.stage-rail.is-hidden {
    opacity: 0;
}

.no-hero .stage-rail {
    display: none;
}

/* ── Pause control ───────────────────────────────────────── */
/* Shown by js/home-hero.js once the particle hero is drawing. It freezes the particles
   and, through html.sk-motion-paused, every looping CSS animation on the page. */

.motion-toggle {
    position: fixed;
    left: var(--gutter);
    bottom: 20px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(10, 11, 13, 0.78);
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.motion-toggle[hidden],
.no-hero .motion-toggle {
    display: none;
}

/* Two bars while playing, a triangle while paused. */
.motion-toggle::before {
    content: '';
    width: 8px;
    height: 10px;
    border-style: solid;
    border-color: currentColor;
    border-width: 0 3px;
}

.motion-toggle[aria-pressed='true']::before {
    width: 0;
    border-color: transparent transparent transparent currentColor;
    border-width: 5px 0 5px 8px;
}

.motion-toggle:hover,
.motion-toggle:focus-visible {
    color: var(--paper);
    border-color: rgba(241, 240, 236, 0.45);
}

.motion-toggle:focus-visible {
    border-radius: 999px;
}

/* The home footer leaves room for the fixed control. */
.motion-toggle:not([hidden]) ~ .home-footer {
    padding-bottom: 84px;
}

/* Narrow screens: an icon-only button in the bottom right, clear of the left-aligned
   type. The label stays in the markup as the accessible name. */
@media (max-width: 759px) {
    .motion-toggle {
        left: auto;
        right: var(--gutter);
        justify-content: center;
        gap: 0;
        width: 44px;
        padding: 0;
        font-size: 0;
    }
}

.sk-motion-paused *,
.sk-motion-paused *::before,
.sk-motion-paused *::after {
    animation-play-state: paused !important;
}

/* ── Stages ──────────────────────────────────────────────── */

main {
    position: relative;
    z-index: 2;
}

.stage {
    --accent: var(--accent-lab);
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: 120px var(--gutter) 96px;
}

.stage--network { --accent: var(--accent-network); }
.stage--games { --accent: var(--accent-games); }
.stage--software { --accent: var(--accent-software); }

.stage__inner {
    width: min(100%, 46rem);
}

.stage__label {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.6em;
    margin: 0 0 clamp(16px, 3vh, 28px);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.stage__label span:first-child {
    color: var(--accent);
}

.stage h1,
.stage h2 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 0.94;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.stage h1 {
    font-size: clamp(3.4rem, 11.5vw, 10rem);
}

.stage h1 em {
    font-style: normal;
    color: var(--accent);
}

.stage h2 {
    font-size: clamp(2.8rem, 8vw, 7rem);
}

.stage__lede {
    max-width: 34rem;
    margin: clamp(20px, 4vh, 36px) 0 0;
    font-size: clamp(1.02rem, 1.4vw, 1.2rem);
    color: #c9cbd0;
}

.stage__scroll {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: clamp(36px, 8vh, 72px) 0 0;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.stage__scroll span {
    position: relative;
    width: 56px;
    height: 1px;
    background: var(--line);
    overflow: hidden;
}

.stage__scroll span::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    animation: scroll-hint 2.6s ease-in-out infinite;
}

@keyframes scroll-hint {
    0% { transform: translateX(-100%); }
    60%, 100% { transform: translateX(100%); }
}

.door {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: clamp(28px, 5vh, 44px);
    padding: 15px 26px;
    border: 1px solid var(--accent);
    border-radius: 999px;
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.door span {
    transition: transform 0.25s ease;
}

.door:hover,
.door:focus-visible {
    background: var(--accent);
    color: var(--ink);
}

.door:hover span,
.door:focus-visible span {
    transform: translateX(5px);
}

/* Static emblem: shown only when the particle hero cannot run. */
.static-emblem {
    display: none;
    width: min(56vw, 220px);
    height: auto;
    margin: 0 0 32px;
}

.no-hero .static-emblem {
    display: block;
}

@media (min-width: 900px) {
    .no-hero .stage--lab {
        position: relative;
    }

    .no-hero .static-emblem {
        position: absolute;
        right: 10vw;
        top: 50%;
        width: min(32vw, 440px);
        margin: 0;
        transform: translateY(-50%);
    }
}

/* Wide screens: type keeps to the left so the particle shape has the right half. */
@media (min-width: 760px) {
    .stage__inner {
        width: min(46rem, 45vw);
    }
}

/* ── Reveal on scroll ────────────────────────────────────── */

.js .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

.js .reveal:nth-child(3) { transition-delay: 0.08s; }
.js .reveal:nth-child(4) { transition-delay: 0.16s; }
.js .reveal:nth-child(5) { transition-delay: 0.24s; }

/* ── Footer ──────────────────────────────────────────────── */

.home-footer {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 32px;
    padding: 28px var(--gutter);
    border-top: 1px solid var(--line);
    background: rgba(10, 11, 13, 0.86);
    font-size: 0.9rem;
    color: var(--muted);
}

.home-footer ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-footer a {
    text-decoration: none;
}

.home-footer a:hover,
.home-footer a:focus-visible {
    color: var(--paper);
}

.home-footer p {
    margin: 0;
}

/* ── Narrow screens: particles sit above, type sits below ── */

@media (max-width: 759px) {
    .hero-veil {
        background: linear-gradient(0deg, rgba(10, 11, 13, 0.94) 0%, rgba(10, 11, 13, 0.78) 44%, rgba(10, 11, 13, 0) 66%);
    }

    .stage {
        align-items: flex-end;
        padding: 96px var(--gutter) 72px;
    }

    .stage-rail {
        display: none;
    }

    .home-nav {
        padding: 14px var(--gutter);
    }

    .home-nav__links a {
        font-size: 0.86rem;
    }

    .door {
        padding: 13px 22px;
        font-size: 1rem;
    }
}

@media (max-width: 420px) {
    .home-nav__logo span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .stage__scroll span::after {
        animation: none;
        transform: none;
    }

    * {
        scroll-behavior: auto !important;
    }
}
