@font-face {
    font-family: 'Exo2S';
    src: url('../fonts/Exo2-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Exo2E';
    src: url('../fonts/Exo2-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #020716;
    --blue: #0900ff;
    --cyan: #00cce8;
    --white: #f0f6ff;
    --text: #b8c9dc;
    --panel: rgba(5, 12, 35, 0.94);
}

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

html {
    color-scheme: dark;
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    overflow-x: hidden;
    color: var(--white);
    background: var(--bg);
    font-family: 'Exo2S', sans-serif;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
    color: inherit;
}

.back-link {
    position: fixed;
    top: clamp(18px, 3vw, 34px);
    left: clamp(18px, 3vw, 40px);
    z-index: 90;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    color: var(--cyan);
    font-family: 'Exo2E', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.2s ease, transform 0.2s ease;
}

.back-link:hover,
.back-link:focus-visible {
    color: var(--white);
    transform: translateX(-4px);
}

.back-link:focus-visible,
.close-link:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 5px;
}

.close-link {
    position: fixed;
    top: clamp(11px, 2.5vw, 25px);
    right: clamp(18px, 3vw, 40px);
    z-index: 90;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: var(--cyan);
    text-decoration: none;
    transition: color 0.2s ease;
}

.close-link svg {
    display: block;
    width: 28px;
    height: 28px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: square;
    filter: drop-shadow(0 0 5px rgba(0, 204, 232, 0.7));
    transform-origin: 50% 50%;
    transition: transform 0.2s ease;
}

.close-link:hover,
.close-link:focus-visible {
    color: var(--white);
}

.close-link:hover svg,
.close-link:focus-visible svg {
    transform: rotate(90deg);
}

.hero {
    position: relative;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 7rem 6vw;
    isolation: isolate;
    overflow: hidden;
}

.hero-grid {
    position: absolute;
    inset: -40%;
    z-index: -3;
    background-image:
        linear-gradient(rgba(0, 204, 232, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 204, 232, 0.07) 1px, transparent 1px);
    background-size: 70px 70px;
    transform: perspective(700px) rotateX(64deg) translateY(28%);
    mask-image: radial-gradient(circle at center, black 5%, transparent 67%);
}

.hero-glow {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at 50% 46%, rgba(9, 0, 255, 0.35), transparent 28%),
        radial-gradient(ellipse at 50% 110%, rgba(0, 204, 232, 0.13), transparent 45%),
        linear-gradient(180deg, #020716 0%, rgba(2, 7, 22, 0.66) 55%, #020716 100%);
}

.hero-content {
    width: min(920px, 100%);
    text-align: center;
    animation: hero-in 900ms cubic-bezier(.2, .75, .25, 1) both;
}

.hero h1 {
    font-family: 'Exo2E', sans-serif;
    font-size: clamp(3.2rem, 10vw, 9.5rem);
    line-height: 0.82;
    letter-spacing: -0.055em;
    text-transform: uppercase;
    text-shadow: 0 0 38px rgba(9, 0, 255, 0.42);
}

.hero h1 span {
    color: transparent;
    -webkit-text-stroke: 1.5px var(--cyan);
    text-shadow: 0 0 25px rgba(0, 204, 232, 0.2);
}

.scroll-cue {
    position: absolute;
    bottom: clamp(22px, 5vh, 52px);
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    color: rgba(240, 246, 255, 0.62);
    font-family: 'Exo2E', sans-serif;
    font-size: 0.66rem;
    letter-spacing: 0.24em;
    text-decoration: none;
    text-transform: uppercase;
    transform: translateX(-50%);
}

.scroll-cue::before {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 50%;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(0, 204, 232, 0.28);
    border-radius: 50%;
    transform: translateX(-50%);
    animation: cue-ring 2.2s ease-out infinite;
}

.scroll-cue svg {
    width: 24px;
    height: 31px;
    overflow: visible;
    animation: cue-arrow 1.8s ease-in-out infinite;
}

.scroll-cue path {
    fill: none;
    stroke: var(--cyan);
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 7px var(--cyan));
}

.stair-scroll {
    position: relative;
    height: 540vh;
}

.stair-scene {
    position: sticky;
    top: 0;
    height: 100svh;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 45%, rgba(9, 0, 255, 0.18), transparent 35%),
        radial-gradient(ellipse at 50% 110%, rgba(0, 204, 232, 0.09), transparent 45%),
        var(--bg);
    perspective: 1800px;
    perspective-origin: 50% 46%;
}

.stair-scene::before,
.stair-scene::after {
    content: '';
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

.stair-scene::before {
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 25%, rgba(2, 7, 22, 0.75) 86%);
}

.stair-scene::after {
    top: 0;
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 204, 232, 0.45), transparent);
    box-shadow: 0 0 16px rgba(0, 204, 232, 0.35);
}

.scene-lines {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(0, 204, 232, 0.14) 50%, transparent calc(50% + 0.5px)),
        repeating-linear-gradient(0deg, transparent 0 89px, rgba(0, 204, 232, 0.035) 90px);
    mask-image: linear-gradient(90deg, transparent, black 50%, transparent);
}

.scene-caption > span {
    font-family: 'Exo2E', sans-serif;
    font-size: 0.64rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
}

.staircase {
    position: absolute;
    top: 48%;
    left: 50%;
    width: 0;
    height: 0;
    z-index: 2;
    transform-style: preserve-3d;
    will-change: transform;
}

.step {
    position: absolute;
    transform-style: preserve-3d;
    will-change: transform, opacity;
    opacity: 0.2;
    filter: saturate(0.45) brightness(0.62);
    transition: opacity 320ms ease, filter 320ms ease;
}

.step::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 8%;
    width: 84%;
    height: clamp(44px, 9vh, 100px);
    background: linear-gradient(180deg, rgba(0, 204, 232, 0.14), transparent);
    clip-path: polygon(0 0, 100% 0, 88% 100%, 12% 100%);
    transform: rotateX(78deg);
    transform-origin: top;
    pointer-events: none;
}

.step.is-active {
    opacity: 1;
    filter: none;
}

.step-link {
    position: relative;
    isolation: isolate;
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    justify-content: center;
    padding: clamp(24px, 4vw, 48px);
    overflow: hidden;
    color: var(--white);
    background:
        linear-gradient(135deg, rgba(9, 0, 255, 0.18), transparent 42%),
        linear-gradient(145deg, rgba(8, 18, 47, 0.98), var(--panel));
    border: 1px solid rgba(0, 204, 232, 0.46);
    box-shadow:
        0 0 35px rgba(9, 0, 255, 0.24),
        inset 0 0 28px rgba(0, 204, 232, 0.035);
    text-decoration: none;
    pointer-events: none;
}

.step-image {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.78;
    filter: brightness(0.38) saturate(0.72) contrast(1.08);
    transform: scale(1.01);
    transition: filter 320ms ease, transform 320ms ease;
    pointer-events: none;
    user-select: none;
}

.step-index,
.step-kind,
.step h2,
.step p,
.step-action {
    position: relative;
    z-index: 1;
}

.step-index {
    position: absolute;
}

.step-link:hover .step-image,
.step-link:focus-visible .step-image {
    filter: brightness(0.5) saturate(0.9) contrast(1.05);
    transform: scale(1.035);
}

.step-link--placeholder,
.step.is-active .step-link--placeholder {
    background:
        repeating-linear-gradient(135deg, rgba(0, 204, 232, 0.035) 0 12px, transparent 12px 24px),
        linear-gradient(145deg, rgba(8, 18, 47, 0.96), rgba(5, 12, 35, 0.94));
    border-style: dashed;
    cursor: default;
    pointer-events: none;
}

.step-link--placeholder .step-index {
    color: rgba(0, 204, 232, 0.13);
}

.step-link--placeholder h2 {
    color: rgba(240, 246, 255, 0.82);
}

.step-link--placeholder .step-action {
    color: rgba(0, 204, 232, 0.62);
}

.step-link::before,
.step-link::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border-color: var(--cyan);
    border-style: solid;
    z-index: 2;
    filter: drop-shadow(0 0 7px rgba(0, 204, 232, 0.7));
    transition: width 220ms ease, height 220ms ease;
}

.step-link::before {
    top: -1px;
    left: -1px;
    border-width: 3px 0 0 3px;
}

.step-link::after {
    right: -1px;
    bottom: -1px;
    border-width: 0 3px 3px 0;
}

.step.is-active .step-link {
    pointer-events: auto;
}

.step-link:hover::before,
.step-link:hover::after,
.step-link:focus-visible::before,
.step-link:focus-visible::after {
    width: 65px;
    height: 65px;
}

.step-link:focus-visible {
    outline: 2px solid var(--white);
    outline-offset: 7px;
}

.step-index {
    position: absolute;
    top: clamp(18px, 3vw, 30px);
    right: clamp(20px, 3vw, 34px);
    color: rgba(0, 204, 232, 0.2);
    font-family: 'Exo2E', sans-serif;
    font-size: clamp(2.4rem, 6vw, 5.2rem);
    line-height: 1;
}

.step-kind {
    margin-bottom: clamp(0.7rem, 2vw, 1.15rem);
    color: var(--cyan);
    font-family: 'Exo2E', sans-serif;
    font-size: clamp(0.58rem, 1.1vw, 0.72rem);
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.step h2 {
    max-width: 90%;
    font-family: 'Exo2E', sans-serif;
    font-size: clamp(1.4rem, 3.2vw, 2.7rem);
    line-height: 1.03;
    overflow-wrap: anywhere;
    text-transform: uppercase;
}

.step p {
    max-width: 43ch;
    margin-top: clamp(0.7rem, 1.7vw, 1.15rem);
    color: var(--text);
    font-size: clamp(0.76rem, 1.2vw, 0.96rem);
    line-height: 1.55;
}

.step-action {
    margin-top: auto;
    padding-top: clamp(0.9rem, 2vw, 1.35rem);
    color: var(--cyan);
    font-family: 'Exo2E', sans-serif;
    font-size: clamp(0.62rem, 1vw, 0.76rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.step-action b {
    display: inline-block;
    margin-left: 0.4rem;
    font-size: 1.2em;
    transition: transform 180ms ease;
}

.step-link:hover .step-action b,
.step-link:focus-visible .step-action b {
    transform: translate(3px, -2px);
}

.scene-caption {
    position: absolute;
    right: clamp(20px, 5vw, 76px);
    bottom: clamp(40px, 7vh, 76px);
    z-index: 5;
    max-width: 260px;
    text-align: right;
}

.scene-caption > span {
    display: block;
    margin-bottom: 0.55rem;
    color: rgba(240, 246, 255, 0.38);
}

.scene-caption strong {
    color: var(--white);
    font-family: 'Exo2E', sans-serif;
    font-size: clamp(0.85rem, 1.4vw, 1.05rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    height: 3px;
    background: rgba(240, 246, 255, 0.07);
}

.progress span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    box-shadow: 0 0 14px var(--cyan);
    transform-origin: left center;
}

@keyframes hero-in {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes cue-ring {
    from { opacity: 0.65; transform: translateX(-50%) scale(0.7); }
    to { opacity: 0; transform: translateX(-50%) scale(1.5); }
}

@keyframes cue-arrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(7px); }
}

@media (max-width: 760px) {
    .scene-caption {
        display: none;
    }

    .back-link {
        top: 20px;
        max-width: calc(100% - 86px);
        font-size: clamp(0.68rem, 3vw, 0.82rem);
        line-height: 1.25;
    }

    .close-link {
        top: 8px;
        right: 12px;
    }

    .hero {
        padding-inline: 1.4rem;
    }

    main > .mobile-nav-shell {
        position: relative;
        width: 100%;
        height: 0;
    }

    main > .mobile-nav-shell .mobile-nav-toggle {
        right: 18px;
    }

    .hero-grid {
        background-size: 46px 46px;
    }

    .step h2 {
        max-width: 82%;
    }

    .stair-scene {
        perspective-origin: 50% 48%;
    }
}

@media (max-height: 620px) and (orientation: landscape) {
    .step-link {
        padding-block: 18px;
    }

    .step p {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
