@font-face {
    font-family: 'Open Runde';
    src: url('assets/fonts/OpenRunde-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Open Runde';
    src: url('assets/fonts/OpenRunde-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

:root {
    /* Parallax tuning: save this file to refresh the local preview. */
    --parallax-height: 120svh; /* Visible scene height; 70svh = 70% of screen height. */
    --parallax-offset-y: 90px; /* Positive pixels skip the top of the scenery; logo and cliff stay anchored. */
    --parallax-travel: auto; /* Set a pixel value for vertical travel; auto uses the available image height. */
    --logo-fade-start: 240px; /* Scroll distance before the sword and wordmark start fading. */
    --logo-fade-distance: 60px; /* Additional scroll distance to reach zero opacity. */
    --parallax-fade-height: 24px; /* Size of the color fade at the bottom; 0px disables it. */
    --parallax-scroll: 30svh; /* Smaller = faster reveal over less scrolling. */
    --parallax-far-shift: 0.30; /* Distant layer travel, as a fraction of available image height. */
    --parallax-near-shift: 0.65; /* Horizon travel; larger = more land revealed. Keep between 0 and 1. */
    --parallax-cliff-start: 0.25; /* Starting cliff offset, as a fraction of visible scene height. */
    --parallax-cliff-ease: 3; /* 1 = steady movement; larger = faster rise early in the scroll. */
    --clouds-back-duration: 120s; /* Smaller = faster rightward drift. */
    --clouds-front-duration: 90s;

    --text-neutral: #34373d;
    --text-muted: #62616b;
    --page-bg: #ffe9bf;
    --panel: var(--page-bg);
    --heading-color: #2d72eb;
    --trim: #aaa1b7;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
}

body {
    margin: 0;
    overflow-x: clip;
    background: var(--page-bg);
    color: var(--text-neutral);
    font-family: 'Open Runde', sans-serif;
    font-size: 14px;
    line-height: 22px;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    image-rendering: pixelated;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid #af8231;
    outline-offset: 5px;
}

.skip-link {
    position: fixed;
    top: -100px;
    left: 20px;
    z-index: 100;
    padding: 12px;
    background: var(--panel);
}

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

.socials-bar {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    padding: 0 20px;
    margin-bottom: 32px;
    background: var(--page-bg);
}

.socials-bar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-height: 44px;
    color: var(--heading-color);
    text-decoration: none;
}

.socials-bar svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.socials-bar a:hover {
    color: var(--text-neutral);
}

.page {
    width: min(940px, 100%);
    margin: 0 auto;

}

.hero {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    height: calc(var(--parallax-height) + var(--parallax-scroll));
    margin-bottom: calc(0px - var(--parallax-scroll));
    isolation: isolate;
}

.hero-view {
    position: sticky;
    top: 0;
    height: var(--parallax-height);
    clip-path: inset(0 0 var(--parallax-cover, 0px) 0);
    mask-image: linear-gradient(to bottom,
        #000 calc(100% - var(--parallax-cover, 0px) - var(--parallax-fade-height)),
        transparent calc(100% - var(--parallax-cover, 0px)));
    overflow: hidden;
    isolation: isolate;
}

.landscape {
    position: absolute;
    inset: 0;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: #071820;
    --scene-height: 1260px;
    --tile-width: 900px;
}

.layer {
    position: absolute;
    inset: 0 0 auto;
    height: max(100%, var(--scene-height));
    background-repeat: repeat-x;
    background-position: center top;
    background-size: var(--tile-width) auto;
    image-rendering: pixelated;
    transform: translateY(calc(0px - var(--parallax-offset-y)));
    will-change: transform;
}

.sky {
    background-image: url('assets/sky.png');
}

.moon {
    background-image: url('assets/moon.png');
    background-repeat: no-repeat;
}

.clouds-back {
    background-image: url('assets/bg_clouds.png');
    animation: cloud-drift var(--clouds-back-duration) linear infinite;
}

.mountains-back {
    background-image: url('assets/back_mountains.png');
}

.mountains-front {
    background-image: url('assets/front_mountains.png');
}

.clouds-front {
    background-image: url('assets/moving_clouds.png');
    animation: cloud-drift var(--clouds-front-duration) linear infinite;
}

.horizon {
    background-image: url('assets/front_horizon.png');
}

@keyframes cloud-drift {
    from {
        background-position-x: 0;
    }

    to {
        background-position-x: var(--tile-width);
    }
}

.cliff-wrap {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 537px;
    margin-left: -268.5px;
    transform: translateY(calc(var(--parallax-height) * var(--parallax-cliff-start)));
    will-change: transform;
}

.cliff {
    display: block;
    width: 537px;
    max-width: none;
}

.title-lockup {
    opacity: var(--logo-opacity, 1);
    position: absolute;
    inset: 0;
    padding: 24px;
    pointer-events: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.title-sword {
    width: 96px;
    height: 96px;
    margin-bottom: -21px;
}

.wordmark {
    width: 195px;
    height: 45px;
    object-fit: contain;
}

.content-panel {
    position: relative;
    z-index: 1;
    padding: 4px 0 32px;
    background: var(--page-bg);
}

.section {
    margin: 0 auto;
}

h2 {
    color: var(--heading-color);
    margin: 0 0 16px;
    font-size: 26px;
    line-height: 32px;
    font-weight: bold;
    text-transform: uppercase;
}

p {
    margin: 0 0 16px;
}

.about {
    width: min(860px, calc(100% - 48px));
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: space-between;
    gap: 30px;
    padding: 0;
}

.about-art {
    margin: 0;
    align-self: start;
}

.about-art img {
    display: block;
    width: 100%;
    margin-top: 0;
}

figcaption {
    margin-top: 8px;
    font-size: 11px;
    line-height: 16px;
    text-align: center;
    color: var(--text-muted);
}

.development-note {
    color: var(--text-muted);
}

.screenshots {
    width: min(760px, calc(100% - 48px));
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px 16px;
}

.screenshot {
    margin: 0;
}

.screenshot-link {
    display: block;
    background: #071820;
}

.screenshot-link img {
    display: block;
    width: 100%;
}

.features {
    width: min(620px, calc(100% - 48px));
}

.feature-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.feature-list li {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin-bottom: 12px;
    line-height: 20px;
}

.feature-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
}

.feature-icon img {
    display: block;
    max-width: none;
}

h3 {
    margin: 0;
    font-size: 16px;
    line-height: 20px;
    text-transform: uppercase;
    font-weight: normal;
}

.feature-list p {
    margin: 0;
}

.section-note {
    margin-top: 20px;
    font-size: 12px;
    color: var(--text-muted);
}

footer {
    text-align: center;
    color: #a59caa;
    font-size: 11px;
    line-height: 16px;
    padding: 0 24px;
}

footer p {
    margin: 0 0 6px;
}

.lightbox {
    border: 0;
    padding: 0;
    background: transparent;
    color: #e9e3d7;
    width: min(1000px, 94vw);
    max-height: 90svh;
}

.lightbox::backdrop {
    background: #000d;
}

.lightbox img {
    width: 100%;
    display: block;
    max-height: 70svh;
    object-fit: contain;
}

.lightbox p {
    text-align: center;
    margin: 12px 0;
}


@media (max-width: 700px) {
    .about {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

}

@media (max-width: 480px) {
    .about {
        grid-template-columns: 1fr;
        padding: 0;
        gap: 8px;
    }

    .about-art {
        width: 100%;
        max-width: 480px;
        margin: 0 auto;
    }

    .about-art img {
        margin-top: 0;
    }

    h2 {
        font-size: 22px;
        line-height: 28px;
    }

}

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

    .layer,
    .cliff-wrap {
        will-change: auto;
    }
}

.about-copy p:last-child {
    margin-bottom: 0;
}

.gallery-title {
    width: fit-content;
    margin: 0 auto 24px;
}

@media (max-width: 700px) {
    .about {
        grid-template-columns: 1fr;
    }

    .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.text-neutral {
    color: var(--text-neutral);
}

.text-muted {
    color: var(--text-muted);
}

.screenshots,
.features {
    margin-top: 64px;
}

footer {
    margin-top: 64px;
    color: var(--text-muted);
}
