@font-face {
    font-family: "Augie Pixel";
    src: url("assets/augiepixel.ttf") format("truetype");
}

* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: "Augie Pixel", Arial, sans-serif;
    -webkit-font-smoothing: none;
    font-smooth: never;
    color: #111;
    background: #fff;
    height: 100%;
    overflow-x: hidden;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2vw 4vw;
    font-size: clamp(24px, 3vw, 48px);
    background-color: #ff9625;
    position: sticky;
    top: 0;
    z-index: 20;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #111;
    text-decoration: none;
}

.logo {
    width: 3.2em;
    height: 3.2em;
    object-fit: contain;
}

.nav-home {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
    font-size: 1.3em;
}

.nav-home a {
    color: #111;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(16px, 3vw, 40px);
}

.nav-links a {
    display: flex;
    align-items: center;
    color: #111;
    text-decoration: none;
    line-height: 1;
}

.nav-links a:hover {
    text-decoration: underline;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 24px 24px 80px;
}

h1 {
    font-size: clamp(72px, 10vw, 140px);
    font-weight: normal;
    line-height: 1.1;
}

.byline {
    font-size: clamp(28px, 3.5vw, 48px);
    margin-top: 16px;
}

.mission {
    font-size: clamp(22px, 2.6vw, 36px);
    margin-top: 20px;
    max-width: 900px;
}

.scroll {
    margin: 0;
    text-align: center;
}

.arrow {
    display: block;
    margin-top: 4px;
}

.page-title {
    font-size: clamp(80px, 10vw, 150px);
    margin: 0;
    margin-top: 2vw;
}

.card-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    margin-top: 40px;
    width: min(1400px, 94vw);
}

.tile {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    aspect-ratio: 16 / 9;
    background-color: #c8c8c8;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 6px solid #111;
    color: #111;
    text-decoration: none;
    text-align: center;
    font-size: clamp(48px, 6vw, 96px);
    border-radius: 16px;
    overflow: hidden;
}

.tile::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--tile-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.8;
    z-index: 0;
}

.tile.empty {
    background-color: transparent;
    background-image: none;
}

.tile:hover {
    background-color: #b0b0b0;
    outline: 6px solid #111;
    outline-offset: 4px;
}

.tile.soon {
    pointer-events: none;
    border: 2px solid #111;
}

.tile-label {
    position: relative;
    z-index: 1;
    color: #ffffff;
    font-size: inherit;
    -webkit-text-stroke: 8px #111;
    paint-order: stroke fill;
    text-shadow:
        -2px -2px 0 #111,
        2px -2px 0 #111,
        -2px 2px 0 #111,
        2px 2px 0 #111;
}

.tile.soon .tile-label {
    -webkit-text-stroke: 0;
    text-shadow: none;
}

.nav-store {
    font-size: 1.25em;
    padding: 0.15em 0.5em;
    border: 2px solid #111;
    border-radius: 8px;
}

.nav-store:hover {
    background: #111;
    color: #fff;
    text-decoration: none;
}

.project-page {
    flex: 1;
    justify-content: flex-start;
    width: 100%;
    padding: 16px 2vw 24px;
}

.project-head {
    position: relative;
    display: block;
    width: 96vw;
}

.project-head .page-title {
    font-size: clamp(56px, 7vw, 150px);
    margin: 0;
    text-align: center;
}

.back {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    padding: 4px 12px;
    border: 2px solid #111;
    border-radius: 8px;
    color: #111;
    text-decoration: none;
    font-size: clamp(18px, 2vw, 28px);
}

.project-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: stretch;
    gap: 3vw;
    width: 96vw;
    flex: 1;
    min-height: 0;
    margin-top: 16px;
    text-align: left;
}

.gallery {
    position: relative;
    height: 100%;
    border: 4px solid #111;
    border-radius: 16px;
    overflow: hidden;
    background: #d9d9d9;
}

.gallery-stage,
.gallery-stage img,
.gallery-stage iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.gallery-stage img {
    object-fit: cover;
}

.gallery-stage iframe {
    display: none;
}

.gallery-nav {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    display: flex;
    justify-content: center;
    gap: 16px;
    z-index: 2;
}

.gallery-nav button {
    font-family: inherit;
    font-size: 24px;
    background: #fff;
    border: 2px solid #111;
    border-radius: 999px;
    width: 40px;
    height: 40px;
    cursor: pointer;
}

.project-info {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.desc-features {
    flex: 0.5;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    min-height: 0;
    overflow: auto;
    padding: 40px 0 12px;
    border-top: 3px solid #111;
    border-bottom: 3px solid #111;
}

.desc-features h2 {
    margin: 0 0 8px;
    font-size: clamp(32px, 3.4vw, 56px);
    font-weight: normal;
}

.desc-features p,
.desc-features li {
    font-size: clamp(26px, 2.6vw, 40px);
}

.download {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding-top: 32px;
}

.download h2 {
    margin: 0 0 8px;
    font-size: clamp(26px, 2.8vw, 44px);
    font-weight: normal;
    text-decoration: none;
}

.download a{
    display: inline-block;
    width: fit-content;
    margin: 0 8px 8px 0;
    padding: 8px 18px;
    border: 3px solid #111;
    border-radius: 8px;
    color: #111;
    font-size: clamp(22px, 2.4vw, 36px);
    text-decoration: underline;
}

.download a:hover {
    background: #111;
    color: #fff;
}

.download button {
    font-family: inherit;
    font-size: clamp(22px, 2.4vw, 36px);
    padding: 8px 18px;
    border: 3px solid #111;
    border-radius: 8px;
    background: #fff;
    color: #111;
    cursor: pointer;
}

.download button:hover {
    background: #111;
    color: #fff;
}

.private-note {
    margin: 32px 0 0;
    font-size: clamp(56px, 5.1vw, 90px);
}

.hidden {
    display: none;
}

.popup {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
}

.popup.hidden {
    display: none;
}

.popup-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 28px 36px;
    background: #fff;
    border: 4px solid #111;
    border-radius: 16px;
    font-size: clamp(22px, 2.4vw, 36px);
}

.popup-box p {
    font-size: clamp(32px, 4vw, 56px);
    margin: 0;
}

.popup-box a {
    display: inline-block;
    padding: 8px 18px;
    border: 3px solid #111;
    border-radius: 8px;
    color: #111;
    text-decoration: none;
}

.popup-box a:hover {
    background: #111;
    color: #fff;
}

.popup-box button {
    font-family: inherit;
    font-size: 18px;
    padding: 4px 12px;
    border: 2px solid #111;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.page-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

.hero,
.featured {
    height: 100%;
    min-height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    padding: 24px 24px 80px;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.18;
}

.hero-video iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 177.78vh;
    height: 56.25vw;
    min-width: 160%;
    min-height: 260%;
    transform-origin: 50% 22%;
    transform: translate(-50%, -22%) scale(2.45);
    border: 0;
}


.hero h1,
.hero .byline,
.hero .mission  {
    position: relative;
    z-index: 1;
}

.hero .scroll {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 28px;
    z-index: 2;
    color: #111;
    text-decoration: none;
    font-size: clamp(18px, 2vw, 28px);
}

.featured {
    width: 100%;
    padding: 48px 4vw 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.featured .page-title {
    margin-top: 0;
    font-size: clamp(64px, 9vw, 120px);
}

@media (max-width: 900px) {
    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 16px;
        font-size: clamp(16px, 4.5vw, 24px);
        padding: 10px 3vw;
    }

    .brand {
        width: 100%;
        justify-content: center;
    }

    .logo {
        width: 2em;
        height: 2em;
    }

    h1,
    .page-title {
        font-size: clamp(32px, 10vw, 56px);
    }

    .card-list {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
        gap: 16px;
        margin-top: 16px;
    }

    .tile {
        font-size: clamp(28px, 8vw, 44px);
        min-height: 140px;
        border-width: 4px;
    }

    .tile-label {
        -webkit-text-stroke-width: 3px;
    }

    .project-page {
        padding: 12px 3vw 24px;
    }

    .project-head {
        width: 94vw;
        padding-top: 48px;
    }

    .project-head .page-title {
        font-size: clamp(28px, 8vw, 44px);
    }

    .back {
        top: 0;
        transform: none;
    }

    .project-layout {
        grid-template-columns: 1fr;
        width: 94vw;
        flex: none;
        height: auto;
    }

    .gallery {
        height: 200px;
    }

    .project-info {
        height: auto;
    }

    .desc-features {
        grid-template-columns: 1fr;
        flex: none;
    }

    .download {
        grid-template-columns: 1fr;
    }

    .desc-features h2,
    .desc-features p,
    .desc-features li {
        font-size: clamp(18px, 5vw, 26px);
    }

    .download a {
        font-size: clamp(20px, 5vw, 32px);
        padding: 8px 16px;
    }

    .download h2 {
        font-size: clamp(16px, 4.2vw, 24px);
    }

    .page-scroll {
        scroll-snap-type: none;
    }

    .hero,
    .featured {
        height: auto;
        min-height: 100%;
        overflow: hidden;
    }

    .hero {
        min-height: calc(100dvh - 140px);
        padding: 16px 16px 72px;
        justify-content: flex-start;
        padding-top: 8vh;

    }

    .hero h1 {
        font-size: clamp(28px, 9vw, 40px);
    }

    .hero .byline {
        font-size: clamp(16px, 4.5vw, 22px);
    }

    .hero .mission {
        font-size: clamp(14px, 4vw, 18px);
    }

    .hero .scroll {
        position: static;
        margin-top: 24px;
        font-size: 16px;
    }

    .hero-video iframe {
        min-height: 300%;
        transform-origin: 50% 18%;
        transform: translate(-50%, -18%) scale(2.8);
    }

    .featured {
        padding: 32px 4vw 48px;
        justify-content: flex-start;
    }

    .featured .page-title {
        font-size: clamp(28px, 8vw, 40px);
    }

    .tile {
        font-size: clamp(28px, 8vw, 44px);
        min-height: 140px;
        border-width: 4px;
    }
}