:root {
    --cream: #F3EBDA;
    --paper: #FFF8EA;
    --manila: #EFE2C4;
    --ink: #1E1612;
    --walnut: #2E1F18;
    --amber: #F2A33A;
    --orange: #EC7A2C;
    --red: #D2472A;
    --muted: #5E4F45;
    --line: rgba(30,22,18,.16);
    --grotesk: 'Inter Tight','Helvetica Neue',Arial,sans-serif;
    --mono: 'IBM Plex Mono',ui-monospace,Menlo,monospace;
    --quote: 'Newsreader',Georgia,serif;
    --body: var(--grotesk);
    --ui: Tahoma,Verdana,sans-serif;
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top,0px);
    padding-bottom: env(safe-area-inset-bottom,0px)
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --cream: #F3EBDA
    }
}

:root[data-theme="dark"] {
    --cream: #F3EBDA
}

:root[data-theme="light"] {
    --cream: #F3EBDA
}

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

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--grotesk);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden
}

button {
    font: inherit
}

:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 3px
}
/* header (same as the approved header: logo, Menu, Start) */
.hdr {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px clamp(14px,3vw,36px);
    background: color-mix(in srgb,var(--cream) 88%,transparent);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px)
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none
}

.mono {
    width: 62px;
    height: auto;
    display: block
}

.logo span {
    font-weight: 800;
    font-style: italic;
    font-size: 1.02rem;
    letter-spacing: -.03em
}

.hdr .right {
    display: flex;
    gap: 10px
}

.mk {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 18px;
    border-radius: 99px;
    background: var(--walnut);
    color: var(--cream);
    font-weight: 700;
    text-decoration: none
}

.st {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 20px;
    border-radius: 99px;
    background: var(--amber);
    color: var(--ink);
    font-weight: 800;
    text-decoration: none
}

@media (max-width:640px) {
    .logo span {
        display: none
    }

    .st .full {
        display: none
    }
}

@media (min-width:641px) {
    .st .short {
        display: none
    }
}


.hdr {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none
}

.note {
    position: fixed;
    left: 50%;
    bottom: calc(12px + env(safe-area-inset-bottom,0px));
    transform: translateX(-50%);
    z-index: 90;
    margin: 0;
    padding: 6px 12px;
    border-radius: 99px;
    background: var(--walnut);
    color: var(--cream);
    font-size: .74rem;
    white-space: nowrap
}

    .note b {
        color: var(--amber)
    }

/* ===== 1. Hero: completely still; the tape shelf rises over it ===== */
.hero {
    position: sticky;
    top: 0;
    z-index: 0;
    min-height: 100svh;
    display: block;
    padding: calc(150px + env(safe-area-inset-top,0px)) clamp(18px,5vw,72px) 110px;
    background-color: var(--cream);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><g fill='none' stroke-width='6' stroke-opacity='.06'><path d='M0 22A22 22 0 0 0 22 0' stroke='%23D2472A'/><path d='M0 38A38 38 0 0 0 38 0' stroke='%23EC7A2C'/><path d='M0 54A54 54 0 0 0 54 0' stroke='%23F2A33A'/><path d='M120 98A22 22 0 0 0 98 120' stroke='%23D2472A'/><path d='M120 82A38 38 0 0 0 82 120' stroke='%23EC7A2C'/><path d='M120 66A54 54 0 0 0 66 120' stroke='%23F2A33A'/></g></svg>");
    background-size: 120px 120px
}

.hero-in {
    max-width: 1320px;
    margin: 0 auto;
    width: 100%
}

.h-tags {
    display: flex;
    gap: 6px;
    margin: 0 0 clamp(20px,3vw,34px);
    font-family: var(--mono);
    font-weight: 600;
    font-size: .8rem
}

    .h-tags span:first-child {
        padding: 2px 7px;
        border: 1.5px solid var(--ink);
        border-radius: 5px
    }

    .h-tags span:last-child {
        padding: 3px 8px;
        border-radius: 5px;
        background: var(--ink);
        color: var(--cream)
    }

.fill {
    margin: 0;
    max-width: 22ch;
    font-weight: 800;
    font-size: clamp(2.2rem,5.4vw,5.4rem);
    line-height: 1.02;
    letter-spacing: -.045em
}

    .fill .dim {
        color: rgba(30,22,18,.18)
    }

.h-stripes {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: clamp(22px,3vw,34px)
}

    .h-stripes i {
        display: block;
        height: 6px;
        width: min(340px,60%)
    }

        .h-stripes i:nth-child(1) {
            background: var(--amber)
        }

        .h-stripes i:nth-child(2) {
            background: var(--orange)
        }

        .h-stripes i:nth-child(3) {
            background: var(--red)
        }

.h-cue {
    margin: 22px 0 0;
    font-family: var(--mono);
    font-size: .78rem;
    color: var(--muted)
}

/* ===== 2. The tape shelf (rises over the hero) ===== */
.shelf {
    position: relative;
    z-index: 2;
    background: var(--paper);
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -24px 50px rgba(46,31,24,.14);
    padding-bottom: 120px
}

.tab {
    position: absolute;
    left: clamp(18px,5vw,72px);
    top: -44px;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    border-radius: 14px 14px 0 0;
    background: var(--paper);
    font-family: var(--mono);
    font-weight: 600;
    font-size: .82rem
}

    .tab b {
        color: var(--red)
    }

.flts {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    gap: 4px 18px;
    flex-wrap: wrap;
    justify-content: center;
    padding: calc(84px + env(safe-area-inset-top,0px)) 20px 16px;
    background: linear-gradient(var(--paper) 80%,rgba(255,248,234,0))
}

.flt {
    border: 0;
    background: none;
    padding: 6px 2px;
    cursor: pointer;
    font-weight: 800;
    font-size: clamp(1rem,1.6vw,1.3rem);
    letter-spacing: -.02em;
    color: rgba(30,22,18,.3);
    transition: color .2s
}

    .flt:hover {
        color: rgba(30,22,18,.6)
    }

    .flt.on {
        color: var(--ink)
    }

.rows {
    list-style: none;
    margin: 0 auto;
    padding: 6vh clamp(18px,5vw,72px) 20vh;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    gap: clamp(40px,7vh,90px)
}

.row.hide {
    display: none
}

.row-btn {
    all: unset;
    box-sizing: border-box;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
    align-items: center;
    gap: clamp(16px,3vw,48px);
    cursor: pointer
}

    .row-btn:focus-visible {
        outline: 2px solid var(--red);
        outline-offset: 8px;
        border-radius: 12px
    }

.r-left {
    display: flex;
    align-items: baseline;
    gap: clamp(14px,3vw,48px)
}

.r-no {
    font-family: var(--mono);
    font-size: .85rem;
    color: var(--muted)
}

.r-name {
    font-weight: 800;
    font-size: clamp(1.5rem,2.8vw,2.8rem);
    letter-spacing: -.04em;
    line-height: 1;
    color: rgba(30,22,18,.22);
    transition: color .35s
}

.r-right {
    display: flex;
    justify-content: flex-end;
    gap: clamp(20px,5vw,90px);
    font-family: var(--mono);
    font-size: .85rem;
    color: rgba(30,22,18,.35);
    transition: color .35s
}

.row.active .r-name, .row-btn:hover .r-name {
    color: var(--ink)
}

.row.active .r-right {
    color: var(--ink)
}

.row.active .r-case {
    color: var(--red)
}

/* the VHS: cover sleeve in front, cassette peeking out to the right (slides out when active) */
.vhs {
    position: relative;
    width: min(250px,19vw);
    aspect-ratio: 104/188;
    transition: transform .45s cubic-bezier(.2,.8,.2,1)
}

.row-btn:hover .vhs {
    transform: translateY(-6px)
}

.cover {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 7% 7% 0;
    border-radius: 6px;
    overflow: hidden;
    container-type: inline-size;
    background: linear-gradient(#FBF4E6,#F1E6CF);
    box-shadow: inset 0 0 0 1px rgba(30,22,18,.12),inset 6px 0 0 rgba(30,22,18,.06),0 22px 40px rgba(30,22,18,.28)
}

    .cover::after {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: linear-gradient(115deg,rgba(255,255,255,.35),transparent 30%)
    }

.cv-top {
    font-family: var(--mono);
    font-size: 5cqw;
    letter-spacing: .08em;
    color: #5E4F45
}

.cv-title {
    margin: 3cqw 0 4cqw;
    font-weight: 800;
    font-style: italic;
    font-size: 13cqw;
    line-height: .95;
    letter-spacing: -.04em;
    color: var(--red)
}

.cv-shot {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    border-radius: 3px;
    container-type: inline-size;
    background: #140b05
}

    .cv-shot .site {
        position: absolute;
        inset: 0
    }

.cv-line {
    margin-top: 4cqw;
    font-weight: 700;
    font-size: 5.6cqw;
    line-height: 1.25
}

.cv-meta {
    display: flex;
    justify-content: space-between;
    margin: 3cqw 0 4cqw;
    font-family: var(--mono);
    font-size: 4.6cqw;
    color: #5E4F45
}

.cv-st {
    display: flex;
    flex-direction: column;
    margin: 0 -7%
}

    .cv-st i {
        height: 2.6cqw
    }

        .cv-st i:nth-child(1) {
            background: var(--amber)
        }

        .cv-st i:nth-child(2) {
            background: var(--orange)
        }

        .cv-st i:nth-child(3) {
            background: var(--red)
        }

.cass {
    position: absolute;
    z-index: 1;
    left: 6%;
    top: 3%;
    width: 88%;
    height: 94%;
    border-radius: 6px;
    container-type: inline-size;
    background: repeating-linear-gradient(90deg,#1c1714 0 3px,#231d19 3px 6px);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.06),0 16px 30px rgba(30,22,18,.3)
}

.cw {
    position: absolute;
    left: 14%;
    right: 14%;
    height: 17%;
    border-radius: 8px;
    background: linear-gradient(#3a3533,#1a1614);
    box-shadow: inset 0 0 0 2px #0e0b09
}

    .cw.t {
        top: 7%
    }

    .cw.b {
        bottom: 7%
    }

.clab {
    position: absolute;
    left: 18%;
    right: 18%;
    top: 30%;
    bottom: 30%;
    border-radius: 3px;
    background: #F7F0E1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4cqw;
    writing-mode: vertical-rl;
    transform: rotate(180deg)
}

    .clab b {
        font-weight: 800;
        font-style: italic;
        font-size: 9cqw;
        color: var(--red)
    }

    .clab em {
        font-style: normal;
        font-family: var(--mono);
        font-size: 6cqw;
        color: #1E1612;
        white-space: nowrap
    }

/* ===== 3. Split case view: arcade on the left (still), folders on the right (scroll) ===== */
.case {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    background: var(--cream);
    visibility: hidden
}

.c-left {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: calc(24px + env(safe-area-inset-top,0px)) clamp(16px,3vw,40px) 24px;
    border-right: 1px solid var(--line);
    overflow: hidden
}

    .c-left::before {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse 60% 50% at 50% 40%,rgba(242,163,58,.22),transparent 70%);
        pointer-events: none
    }

.cab {
    position: relative;
    height: min(62vh,640px);
    aspect-ratio: 640/1000;
    container-type: inline-size
}

.cab-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%
}

.marquee {
    position: absolute;
    left: 25.6%;
    top: 7.6%;
    width: 50.1%;
    height: 8%;
    display: flex
}

.mq-panel {
    flex: 1;
    margin: 1cqw 2cqw;
    border-radius: 1.2cqw;
    display: grid;
    place-items: center;
    padding: 0 3cqw;
    background: radial-gradient(ellipse,#fff8e8,#f3dfb8);
    box-shadow: 0 0 5cqw rgba(255,200,120,.5)
}

.mq-logo {
    width: 100%;
    height: auto;
    display: block
}

.ascr {
    position: absolute;
    left: 29.06%;
    top: 20.6%;
    width: 41.9%;
    height: 20.6%;
    border-radius: 4.2cqw/5.4cqw;
    overflow: hidden;
    background: #140b05;
    container-type: inline-size
}

    .ascr .site {
        position: absolute;
        inset: 0
    }

    .ascr::after {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        border-radius: inherit;
        background: radial-gradient(ellipse at 26% 18%,rgba(255,255,255,.2),transparent 40%),repeating-linear-gradient(to bottom,rgba(0,0,0,.16) 0 1px,transparent 1px 3px);
        box-shadow: inset 0 0 6cqw rgba(0,0,0,.7)
    }

.aplay {
    position: absolute;
    left: 31%;
    top: 21.8%;
    z-index: 2;
    font-family: var(--mono);
    font-weight: 600;
    font-size: 3.2cqw;
    color: #fff;
    text-shadow: 0 0 .6cqw #000
}

.deck {
    position: absolute;
    left: 44%;
    top: 47.6%;
    width: 12%;
    height: 4.4%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2cqw
}

.stick {
    position: absolute;
    left: 30%;
    top: 41.5%;
    width: 7%;
    height: 9%;
    transform-origin: 50% 100%
}

    .stick i {
        position: absolute;
        left: 50%;
        bottom: 0;
        width: 20%;
        height: 78%;
        margin-left: -10%;
        border-radius: 2cqw;
        background: linear-gradient(90deg,#8d8d8d,#eee,#8d8d8d)
    }

    .stick b {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        aspect-ratio: 1;
        border-radius: 50%;
        background: radial-gradient(circle at 35% 30%,#ff9a70,#D2472A 60%,#8a2412);
        box-shadow: 0 .6cqw 1cqw rgba(0,0,0,.4)
    }

    .stick::after {
        content: "";
        position: absolute;
        left: -40%;
        right: -40%;
        bottom: -18%;
        height: 34%;
        border-radius: 50%;
        background: radial-gradient(ellipse,#2E1F18 40%,transparent 72%);
        z-index: -1
    }

.abtn {
    position: absolute;
    top: 46.6%;
    width: 6.4%;
    aspect-ratio: 1;
    border: 0;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1cqw 0 #3d2616,0 0 0 1cqw #d8ccb4;
    transition: transform .08s,box-shadow .08s
}

    .abtn.a1 {
        left: 60%;
        background: radial-gradient(circle at 35% 30%,#ffd48a,#F2A33A 60%,#b86f14)
    }

    .abtn.a2 {
        left: 69%;
        top: 44.8%;
        background: radial-gradient(circle at 35% 30%,#ff9a70,#D2472A 60%,#8a2412)
    }

    .abtn:active {
        transform: translateY(.8cqw);
        box-shadow: 0 .2cqw 0 #3d2616,0 0 0 1cqw #d8ccb4
    }

.deck i {
    width: 4.6cqw;
    height: 4.2cqw;
    border-radius: .8cqw;
    background: linear-gradient(#f07c40,#d2562a);
    box-shadow: inset 0 -.6cqw 0 rgba(0,0,0,.35)
}

    .deck i.on {
        background: linear-gradient(#ffc56a,#F2A33A);
        box-shadow: 0 0 2cqw rgba(242,163,58,.9)
    }

.c-quick {
    position: relative;
    width: min(100%,460px);
    display: grid;
    gap: 8px
}

.c-no {
    font-family: var(--mono);
    font-weight: 600;
    font-size: .8rem;
    color: var(--red)
}

.c-name {
    margin: 0;
    font-weight: 800;
    font-size: clamp(1.8rem,3vw,2.8rem);
    letter-spacing: -.045em;
    line-height: 1
}

.c-line {
    margin: 0;
    color: var(--muted)
}

.c-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-family: var(--mono);
    font-size: .78rem;
    color: var(--muted)
}

.c-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px
}

.btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 99px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer
}

    .btn.a {
        background: var(--amber);
        color: var(--ink)
    }

    .btn.d {
        background: var(--walnut);
        color: var(--cream)
    }

.c-right {
    position: relative;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: calc(80px + env(safe-area-inset-top,0px)) clamp(16px,3vw,44px) 30vh
}

.c-close {
    position: fixed;
    right: clamp(14px,2vw,28px);
    top: calc(84px + env(safe-area-inset-top,0px)); /* sits below the header, not behind Start a project */
    z-index: 3
}
/* folders: each one rises over the previous; staggered tabs */
.folder {
    position: sticky;
    top: calc(60px + var(--k) * 14px);
    min-height: 72vh;
    margin-top: 90px;
    padding: clamp(24px,3vw,40px);
    border-radius: 0 18px 18px 18px;
    background: var(--fc);
    color: var(--ft,#1E1612);
    box-shadow: 0 -12px 30px rgba(46,31,24,.12)
}

    .folder:first-child {
        margin-top: 44px
    }

.ftab {
    position: absolute;
    top: -38px;
    left: var(--tx);
    height: 38px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-radius: 12px 12px 0 0;
    background: var(--fc);
    color: var(--ft,#1E1612);
    font-family: var(--mono);
    font-weight: 600;
    font-size: .76rem;
    white-space: nowrap
}

.folder h3 {
    margin: 0 0 .5em;
    font-weight: 800;
    font-size: clamp(1.7rem,2.8vw,2.6rem);
    letter-spacing: -.045em;
    line-height: 1
}

.folder p.big {
    margin: 0;
    font-size: clamp(1.05rem,1.4vw,1.25rem);
    line-height: 1.6
}

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

    .steps li {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 14px;
        padding: 16px 0;
        border-top: 1px solid rgba(30,22,18,.18)
    }

    .steps b {
        font-family: var(--mono);
        color: var(--red)
    }

    .steps strong {
        display: block;
        font-size: 1.15rem;
        margin-bottom: 4px
    }

    .steps span {
        color: var(--muted);
        line-height: 1.55
    }

.gal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px
}

    .gal .g {
        position: relative;
        aspect-ratio: 4/3;
        overflow: hidden;
        border-radius: 10px;
        container-type: inline-size;
        background: #140b05
    }

        .gal .g .site {
            position: absolute;
            inset: 0
        }

.res {
    display: grid;
    gap: 18px;
    margin-top: 10px
}

    .res div {
        padding-top: 14px;
        border-top: 3px solid var(--amber)
    }

        .res div:nth-child(2) {
            border-color: var(--orange)
        }

        .res div:nth-child(3) {
            border-color: var(--red)
        }

    .res b {
        display: block;
        font-weight: 800;
        font-size: clamp(2.1rem,3.8vw,3.4rem);
        letter-spacing: -.05em;
        line-height: 1;
        color: var(--amber)
    }

    .res span {
        color: rgba(243,235,218,.75)
    }

.ex {
    display: inline-block;
    margin-top: 10px;
    font-family: var(--mono);
    font-size: .7rem;
    border: 1px dashed currentColor;
    border-radius: 6px;
    padding: 2px 8px;
    opacity: .8
}

.qt {
    margin: 0;
    font-family: var(--quote);
    font-style: italic;
    font-size: clamp(1.6rem,2.8vw,2.4rem);
    line-height: 1.3
}

.who {
    margin-top: 16px;
    font-family: var(--mono);
    font-size: .78rem;
    color: var(--red)
}

.nextbtn {
    all: unset;
    cursor: pointer;
    display: block;
    margin-top: 10px
}

    .nextbtn strong {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-weight: 800;
        font-size: clamp(2rem,4vw,3.6rem);
        letter-spacing: -.05em;
        line-height: 1
    }

.fly {
    position: fixed;
    z-index: 200;
    pointer-events: none;
    transform-origin: 0 0
}

@media (max-width:900px) {
    .row-btn {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 14px
    }

    .r-left {
        flex-direction: column;
        align-items: center;
        gap: 4px
    }

    .r-right {
        justify-content: center;
        gap: 24px
    }

    .vhs {
        width: min(52vw,230px);
        order: -1;
        margin-right: 18vw
    }

    .case {
        display: block;
        overflow-y: auto
    }

    .c-left {
        position: sticky;
        top: 0;
        z-index: 4;
        flex-direction: row;
        justify-content: flex-start;
        gap: 14px;
        padding: calc(12px + env(safe-area-inset-top,0px)) 16px 12px;
        background: var(--cream);
        border-right: 0;
        border-bottom: 1px solid var(--line)
    }

    .cab {
        height: min(30vh,210px)
    }

    .c-line, .c-meta, .c-btns .btn.d {
        display: none
    }

    .c-name {
        font-size: 1.4rem
    }

    .c-right {
        overflow: visible;
        padding: 20px 14px 30vh
    }

    .c-close {
        top: auto;
        bottom: calc(16px + env(safe-area-inset-bottom,0px));
        right: 16px
    }

    .folder {
        top: calc(min(30vh,210px) + 40px + var(--k) * 10px);
        min-height: 60vh
    }

    .ftab {
        font-size: .68rem
    }
}
/* Sample site mockups (sized to the screen with container units) */
.site {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--ff,var(--body));
    visibility: hidden;
    transform-origin: 50% 50%;
    line-height: 1.2
}

    .site.on {
        visibility: visible
    }

.page {
    position: relative
}

.m-nav {
    display: flex;
    align-items: center;
    gap: 3cqw;
    padding: 3.4cqw 5cqw;
    font-size: 3cqw;
    font-weight: 700
}

.m-links {
    display: flex;
    gap: 2.4cqw;
    margin-left: auto
}

    .m-links i {
        display: block;
        width: 6cqw;
        height: .9cqw;
        background: currentColor;
        opacity: .45;
        border-radius: 1cqw
    }

.m-btn {
    display: inline-block;
    background: var(--ac);
    color: var(--bt,var(--bg));
    font-size: 2.3cqw;
    font-weight: 700;
    padding: 1.4cqw 3cqw;
    border-radius: var(--r,0);
    white-space: nowrap
}

.m-k {
    font-size: 2.2cqw;
    opacity: .7;
    margin-bottom: 1.6cqw
}

.m-h {
    font-family: var(--hf,inherit);
    font-size: 9.5cqw;
    line-height: .98;
    font-weight: 800;
    letter-spacing: -.02em
}

.m-h2 {
    font-family: var(--hf,inherit);
    font-size: 5.4cqw;
    line-height: 1;
    font-weight: 800;
    margin-bottom: 3.2cqw
}

.m-lines {
    margin: 2.4cqw 0 3.2cqw
}

    .m-lines i {
        display: block;
        height: 1.1cqw;
        background: currentColor;
        opacity: .3;
        border-radius: 1cqw;
        margin-top: 1.6cqw;
        width: 90%
    }

        .m-lines i:nth-child(2) {
            width: 78%
        }

        .m-lines i:nth-child(3) {
            width: 84%
        }

        .m-lines i:nth-child(4) {
            width: 52%
        }

.m-sec {
    padding: 6cqw 5cqw
}

.m-split {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 5cqw;
    align-items: center
}

.m-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 3cqw
}

.m-center {
    text-align: center
}

    .m-center .m-lines i {
        margin-inline: auto
    }

.m-foot {
    padding: 6cqw 5cqw 8cqw;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 5cqw;
    background: var(--ft,rgba(0,0,0,.07))
}

    .m-foot b {
        font-family: var(--hf,inherit);
        font-size: 3.4cqw
    }

.m-card {
    border-radius: var(--cr,0);
    overflow: hidden
}

    .m-card .m-lines {
        margin: 2cqw 0 0
    }

.m-price {
    display: block;
    width: 30%;
    height: 1.4cqw;
    background: var(--ac);
    border-radius: 1cqw;
    margin-top: 1.6cqw
}

.kick {
    margin: 0 0 .6em;
    font-family: var(--mono);
    font-weight: 600;
    font-size: .85rem;
    color: var(--red)
}

.story {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    gap: clamp(24px,6vw,110px);
    align-items: start;
    margin-top: clamp(56px,8vw,110px)
}

.st-frame {
    position: relative;
    height: min(76vh,700px);
    border-radius: 18px;
    overflow: hidden;
    background: #e9dcc2;
    box-shadow: 0 24px 50px rgba(46,31,24,.18)
}

.st-img {
    position: absolute;
    left: -2%;
    top: -12%;
    width: 112%;
    height: 124%;
    object-fit: cover;
    will-change: transform
}

.st-text {
    position: sticky;
    top: 34vh
}

.st-p {
    margin: 0;
    max-width: 26ch;
    font-weight: 700;
    font-size: clamp(1.4rem,2.3vw,2.1rem);
    line-height: 1.18;
    letter-spacing: -.03em
}

@media (max-width:900px) {
    .story {
        grid-template-columns: minmax(0,1fr)
    }

    .st-frame {
        height: 56vh
    }

    .st-text {
        position: static
    }
}
/* ===== Case view, round 2: bigger arcade, slimmer folders that stack like files ===== */
.case{grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr)}
.cab{height:min(calc(100svh - 230px),780px)}
.c-left{gap:12px;padding-top:calc(16px + env(safe-area-inset-top,0px));padding-bottom:16px}
.c-quick{width:min(100%,560px);gap:4px;grid-template-columns:1fr auto;align-items:end}
.c-quick > :not(.c-btns){grid-column:1}
.c-quick .c-btns{grid-column:2;grid-row:1 / span 4;margin:0;align-self:center}
.c-name{font-size:clamp(1.5rem,2.4vw,2.2rem)}
.c-line{font-size:.95rem}
.c-right{padding:calc(70px + env(safe-area-inset-top,0px)) clamp(14px,2vw,30px) 40vh}
/* each folder sticks a tab-height lower than the one before, so all the tabs stay visible like a drawer of files */
.folder{top:calc(64px + var(--k) * 46px);z-index:calc(1 + var(--k));min-height:0;margin-top:58px;padding:clamp(18px,2vw,28px);
  border-radius:0 14px 14px 14px;box-shadow:0 -10px 24px rgba(46,31,24,.14)}
.folder:first-child{margin-top:40px}
.folder + .folder{margin-top:calc(58px + 34vh)}
.ftab{top:-34px;height:34px;font-size:.7rem;padding:0 14px;border-radius:10px 10px 0 0}
.folder h3{font-size:clamp(1.3rem,2vw,1.8rem)}
.folder p.big{font-size:1rem;line-height:1.55}
.steps li{padding:11px 0;gap:12px}
.steps strong{font-size:1rem}
.steps span{font-size:.92rem}
.gal{margin-top:14px;gap:8px}
.res{gap:12px}
.res b{font-size:clamp(1.7rem,2.6vw,2.4rem)}
.nextbtn strong{font-size:clamp(1.6rem,2.6vw,2.4rem)}
/* the stack holds until the end: the folders' container keeps room below the last one */
.c-right{padding-bottom:0}
.folders::after{content:"";display:block;height:calc(100svh - 64px - 4 * 46px - 140px)}
@media (max-width:900px){
  .case{display:block}
  .folders::after{height:calc(100svh - var(--ph,300px) - 40px - 4 * 38px - 90px)}
  .c-left{flex-direction:column;align-items:center;gap:10px;padding:calc(10px + env(safe-area-inset-top,0px)) 14px 10px}
  .cab{height:min(40vh,320px)}
  .c-quick{width:100%;grid-template-columns:1fr auto}
  .c-line,.c-meta{display:none}
  .c-name{font-size:1.25rem}
  .c-quick .c-btns .btn{min-height:38px;padding:0 14px;font-size:.85rem}
  .c-right{padding:16px 12px 0}
  /* folders stop just under the arcade player, never behind it */
  .folder{top:calc(var(--ph,300px) + 40px + var(--k) * 38px);margin-top:48px}
  .folder + .folder{margin-top:calc(48px + 22vh)}
  .ftab{top:-30px;height:30px;font-size:.62rem;padding:0 10px}
}

/* ===== VHS cover pictures (images/portfolio/<name>.webp) =====
   The picture fills the cover window. When the tape is active it pans slowly
   across the screenshot so the whole page is seen. If a picture is
   missing, the window shows a dark screen with the TTD mark. */
.cv-shot::before {
    content: "TTD";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-style: italic;
    font-size: 16cqw;
    letter-spacing: -.04em;
    color: rgba(242,163,58,.35)
}

.cv-img {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 0
}

.row.active .cv-img {
    animation: cv-pan 16s ease-in-out infinite
}

/* pans from top to bottom and back for tall (phone) screenshots, left to right for wide ones */
@keyframes cv-pan {
    0%, 8% { object-position: 0% 0% }
    46%, 54% { object-position: 100% 100% }
    92%, 100% { object-position: 0% 0% }
}

@media (prefers-reduced-motion: reduce) {
    .row.active .cv-img { animation: none }
}

/* ===== Case view: project video in the arcade screen (video/<project>.mp4) =====
   The whole video fits the screen (nothing cropped); the CRT scanlines stay on top. */
.ascr .avid {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #140b05
}

.ascr.has-video .site {
    visibility: hidden
}

/* ===== Case view: the two pictures in FILE 02 (images/portfolio/gallery/<project>-1.webp and -2.webp)
   A picture sits on top of the demo screen; if it is missing, the demo shows instead. */
.gal .g-img {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 0;
    display: block
}

/* ===== Case view: each folder reaches the bottom of the screen, so the one on top
   always covers the folders behind it completely (nothing peeks out underneath) ===== */
.folder {
    min-height: calc(100svh - 64px - var(--k) * 46px - 24px)
}

.folders::after {
    height: 30vh
}

@media (max-width:900px) {
    .folder {
        min-height: calc(100svh - var(--ph,300px) - 40px - var(--k) * 38px)
    }

    .folders::after {
        height: 0
    }
}

/* tall folders: see "Folder stack" in portfolio.js */
.folder { margin-bottom: calc(var(--ovb, 0px) * -1) }
.folder + .folder { margin-top: calc(58px + 34vh + var(--ov, 0px)) }
@media (max-width:900px) {
    .folder + .folder { margin-top: calc(48px + 22vh + var(--ov, 0px)) }
}

/* ===== Case view: pictures live in their own folder (FILE 03 / THE SCREENS) ===== */
.folder .gal {
    margin-top: 6px
}

@media (max-width:900px) {
    /* phones: one picture per row so each is bigger */
    .folder .gal {
        grid-template-columns: minmax(0,1fr);
        gap: 12px
    }

    /* each folder fills the screen even when the browser bar hides, so nothing peeks out underneath */
    .folder {
        min-height: calc(100lvh - var(--ph,300px) - 40px - var(--k) * 38px)
    }

    .ftab {
        font-size: .58rem;
        padding: 0 8px
    }
}

/* ===== Phones: compact arcade player pinned on top, folders scroll normally (no stacking) ===== */
@media (max-width:900px) {
    .c-left {
        position: sticky;
        top: 0;
        z-index: 6;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 14px;
        padding: calc(10px + env(safe-area-inset-top,0px)) 16px 10px;
        background: var(--cream);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 10px 24px rgba(46,31,24,.08)
    }

    .cab {
        height: min(30svh,250px);
        flex: none
    }

    .c-quick {
        flex: 1;
        width: auto;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px
    }

        .c-quick .c-no {
            font-size: .68rem;
            line-height: 1.4
        }

        .c-quick .c-name {
            font-size: clamp(1.3rem,6vw,1.7rem)
        }

        .c-quick .c-btns {
            margin-top: 4px
        }

            .c-quick .c-btns .btn {
                min-height: 38px;
                padding: 0 14px;
                font-size: .82rem
            }

    .c-right {
        padding: 8px 14px calc(120px + env(safe-area-inset-bottom,0px))
    }

    .folder,
    .folder + .folder {
        position: relative;
        top: auto;
        z-index: auto;
        min-height: 0;
        margin-top: 52px;
        margin-bottom: 0;
        box-shadow: 0 10px 26px rgba(46,31,24,.1)
    }

        .folder:first-child {
            margin-top: 44px
        }

    .folders::after {
        height: 0
    }

    .c-close {
        bottom: calc(24px + env(safe-area-inset-bottom,0px))
    }

    /* each folder's content slides up as it scrolls into view */
    .fold-rev .folder > :not(.ftab) {
        opacity: 0;
        transform: translateY(26px);
        transition: opacity .6s ease, transform .7s cubic-bezier(.2,.8,.2,1)
    }

    .fold-rev .folder.fin > :not(.ftab) {
        opacity: 1;
        transform: none
    }
}

/* ===== Work shelf: "click a tape" hint ===== */
.shelf-hint {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 64px 20px 18px;
    font-family: var(--mono);
    font-weight: 600;
    font-size: .82rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted)
}

    .shelf-hint .sh-play {
        color: var(--red);
        animation: sh-blink 1.4s steps(1) infinite
    }

.sh-touch {
    display: none
}

@media (hover: none) and (pointer: coarse) {
    .sh-desk { display: none }
    .sh-touch { display: inline }
}

@keyframes sh-blink { 50% { opacity: .25 } }

@media (prefers-reduced-motion: reduce) {
    .shelf-hint .sh-play { animation: none }
}

/* tab bar under the arcade: desktop never shows it */
.ftabbar {
    display: none
}

@media (max-width:900px) {
    /* bigger arcade screen: a close-up of the top of the cabinet (marquee + screen) */
    .c-left {
        flex-direction: column;
        align-items: center;
        gap: 6px;
        overflow: hidden;
        padding: calc(8px + env(safe-area-inset-top,0px)) 16px 10px
    }

    .cab {
        --vis: min(34svh,300px);
        height: calc(var(--vis) / .45);
        margin-bottom: calc(var(--vis) / .45 * -.55);
        align-self: center;
        -webkit-mask-image: linear-gradient(#000 calc(var(--vis) - 26px), transparent calc(var(--vis) - 2px));
        mask-image: linear-gradient(#000 calc(var(--vis) - 26px), transparent calc(var(--vis) - 2px))
    }

    .c-quick {
        align-items: center;
        text-align: center;
        gap: 2px
    }

        .c-quick .c-name {
            font-size: clamp(1.2rem,5.4vw,1.5rem)
        }

    /* the tab bar */
    .ftabbar {
        position: sticky;
        top: var(--ph,300px);
        z-index: 5;
        display: flex;
        gap: 4px;
        margin: 0 -14px;
        padding: 8px 14px 0;
        background: var(--cream);
        border-bottom: 1px solid var(--line);
        overflow: hidden
    }

        .ftabbar button {
            flex: 1 1 0;
            min-width: 0;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 1px;
            padding: 6px 8px 7px;
            border: 0;
            border-radius: 9px 9px 0 0;
            background: var(--fc);
            color: var(--ft);
            font-family: var(--mono);
            font-weight: 600;
            font-size: .62rem;
            text-transform: uppercase;
            letter-spacing: .02em;
            white-space: nowrap;
            cursor: pointer;
            opacity: 0;
            transform: translateY(100%);
            transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .3s, box-shadow .2s
        }

            .ftabbar button b {
                font-weight: 600;
                font-size: .56rem;
                opacity: .6
            }

            .ftabbar button.show {
                opacity: 1;
                transform: none
            }

            .ftabbar button.on {
                box-shadow: inset 0 -3px 0 var(--red)
            }

    .folder:first-child {
        margin-top: 40px
    }
}

/* ===== Phones: retro TV instead of the arcade ===== */
.ptv {
    display: none
}

@media (max-width:900px) {
    .cab {
        display: none
    }

    .ptv {
        --tw: min(90vw, 380px, calc((36svh - 74px) * 1.5 + 30px));
        display: block;
        width: var(--tw)
    }

    .ptv-body {
        position: relative;
        padding: 12px 12px 0;
        border-radius: 22px 22px 14px 14px;
        background: linear-gradient(90deg,#efe4cc,#fbf5e8 40%,#e6dac2);
        border: 3px solid #5A3A26;
        box-shadow: 0 18px 30px rgba(46,31,24,.22);
        overflow: hidden
    }

    /* the picture tube: black glass, gently rounded like a CRT */
    .ptv-tube {
        position: relative;
        aspect-ratio: 3/2;
        display: grid;
        place-items: center;
        border-radius: 18px / 24px;
        background: radial-gradient(ellipse at 50% 45%,#1a110c,#050302 75%);
        box-shadow: inset 0 0 0 4px #231a15, 0 0 0 2px #3b2a20;
        overflow: hidden
    }

    /* the picture itself is widescreen, so the tube shows black bars above and below */
    .ptv-slot {
        position: relative;
        width: 100%;
        aspect-ratio: 16/9
    }

    .ptv .ascr {
        position: absolute;
        inset: 0;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        background: #050302
    }

        .ptv .ascr::after {
            display: none
        }

    .ptv-play {
        position: absolute;
        left: 8px;
        top: 6px;
        padding: 2px 6px;
        border-radius: 4px;
        background: rgba(5,3,2,.55);
        z-index: 3;
        font-family: var(--mono);
        font-weight: 600;
        font-size: .62rem;
        letter-spacing: .06em;
        color: #ffd79a;
        text-shadow: 0 0 6px rgba(255,170,80,.7)
    }

    .ptv-glass {
        position: absolute;
        inset: 0;
        z-index: 2;
        pointer-events: none;
        border-radius: inherit;
        background: radial-gradient(ellipse at 22% 14%,rgba(255,255,255,.14),transparent 38%),repeating-linear-gradient(to bottom,rgba(0,0,0,.12) 0 1px,transparent 1px 3px);
        box-shadow: inset 0 0 26px rgba(0,0,0,.75)
    }

    /* the panel under the screen: TTD logo, two channel knobs, a red power light */
    .ptv-panel {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 9px 4px 10px
    }

    .ptv-logo {
        display: block;
        width: 46%;
        max-width: 170px
    }

        .ptv-logo svg {
            display: block;
            width: 100%;
            height: auto
        }

    .ptv-knobs {
        display: flex;
        align-items: center;
        gap: 8px
    }

    .ptv-k {
        width: 30px;
        height: 30px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        cursor: pointer;
        font-size: .62rem;
        line-height: 30px;
        color: #f3ebda;
        background: radial-gradient(circle at 35% 30%,#7a6252,#3a2a20 70%);
        box-shadow: 0 3px 0 #22160f, inset 0 1px 0 rgba(255,255,255,.18);
        transition: transform .08s, box-shadow .08s
    }

        .ptv-k.down, .ptv-k:active {
            transform: translateY(2px);
            box-shadow: 0 1px 0 #22160f
        }

    .ptv-led {
        width: 9px;
        height: 9px;
        border-radius: 50%;
        background: #ff4a2a;
        box-shadow: 0 0 8px #ff4a2a;
        margin-left: 2px
    }

    .ptv-st {
        display: flex;
        flex-direction: column;
        gap: 3px;
        margin: 0 -12px
    }

        .ptv-st i {
            height: 5px
        }

            .ptv-st i:nth-child(1) { background: var(--amber) }
            .ptv-st i:nth-child(2) { background: var(--orange) }
            .ptv-st i:nth-child(3) { background: var(--red) }

    .c-left {
        gap: 8px;
        padding-top: calc(12px + env(safe-area-inset-top,0px))
    }
}
