/* =====================================================================
   Tony Bulltosh
   Desktop sizes use container units (cqw = 1% of the 16:9 frame width),
   so the layout scales as one piece on every screen.
   ===================================================================== */

:root {
    --bg: #403f3f;
    --paper: #d9d9d9;
    --ink: #030000;
    --red: #cb3939;
    --red-dark: #a92c2c;
    --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
    --ease-in-out: cubic-bezier(0.77, 0, 0.18, 1);
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ========== RESET & GLOBAL ========== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background: var(--bg);
}

body {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-family: 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    user-select: none;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 3px;
}

.container {
    width: min(72vw, 150dvh);
    aspect-ratio: 16 / 9;
    container-type: inline-size;
}

/* Smooth cross-fade between pages (Chrome, Edge, Safari 18+; ignored elsewhere) */
@view-transition {
    navigation: auto;
}

::view-transition-old(root) {
    animation: fadeOut 0.3s ease both;
}

::view-transition-new(root) {
    animation: fadeIn 0.3s ease both;
}

/* ========== KEYFRAMES ========== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    to { opacity: 0; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

@keyframes maskUp {
    from { transform: translateY(110%); }
    to { transform: none; }
}

@keyframes revealUp {
    from { opacity: 0; clip-path: inset(100% 0 0 0); transform: translateY(25%); }
    to { opacity: 1; clip-path: inset(0); transform: none; }
}

@keyframes revealDown {
    from { clip-path: inset(0 0 100% 0); }
    to { clip-path: inset(0); }
}

@keyframes revealRight {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0); }
}

@keyframes blurIn {
    from { opacity: 0; transform: translateY(12px); filter: blur(6px); }
    to { opacity: 1; transform: none; filter: none; }
}

@keyframes growY {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

@keyframes frameIn {
    from { opacity: 0; transform: scale(0.985); }
    to { opacity: 1; transform: none; }
}

/* Red bar sweeps in from the left, then out to the right, revealing the photo */
@keyframes curtain {
    0% { transform: scaleX(0); transform-origin: left; }
    45% { transform: scaleX(1); transform-origin: left; }
    55% { transform: scaleX(1); transform-origin: right; }
    100% { transform: scaleX(0); transform-origin: right; }
}

@keyframes homeBgIn {
    from { opacity: 0; transform: scale(calc(var(--zoom) + 0.2)); filter: brightness(0.35) contrast(1.1); }
    to { opacity: 1; transform: scale(var(--zoom)); filter: brightness(1.2) contrast(1); }
}

@keyframes logoIn {
    from { opacity: 0; letter-spacing: 0.5em; }
    to { opacity: 1; letter-spacing: 0.02em; }
}

/* ========== HOME PAGE ========== */
.home-frame {
    position: relative;
    overflow: hidden;
    background: #111;
}

.home-curtain {
    position: absolute;
    inset: 0;
    z-index: 200;
    background: var(--red);
    transform: scaleX(0);
    pointer-events: none;
    animation: curtain 1.1s var(--ease-in-out) 0.1s both;
}

.home-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    --zoom: 1.3;
    transform: scale(var(--zoom));
    filter: brightness(1.2) contrast(1);
    animation: homeBgIn 1.8s var(--ease-out) 0.55s both;
}

.home-frame .logo {
    position: absolute;
    right: 2.3cqw;
    top: 1.7cqw;
    z-index: 2;
    font-size: 1.7cqw;
    font-weight: 600;
    white-space: nowrap;
    color: var(--red);
    animation: logoIn 1s var(--ease-out) 1.35s both;
}

.home-frame .nav {
    position: absolute;
    inset: 0 auto 0 2.9cqw;
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3cqw;
}

.home-frame .nav-link {
    display: flex;
    align-items: baseline;
    gap: 0.9cqw;
    width: fit-content;
    color: #fff;
    font-size: 2.9cqw;
    font-weight: 900;
    line-height: 1.15;
    overflow: hidden;
}

.home-frame .nav-index {
    min-width: 1.6cqw;
    font-size: 0.85cqw;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.55);
    transition: color 0.2s;
    animation: fadeIn 0.6s ease calc(1.25s + var(--i, 0) * 70ms) both;
}

.home-frame .nav-label {
    display: inline-block;
    transition: transform 0.35s var(--ease-out), color 0.2s;
    animation: maskUp 0.8s var(--ease-out) calc(1s + var(--i, 0) * 70ms) both;
}

.home-frame .nav-arrow {
    display: none;
}

.home-frame .nav-link:hover .nav-label,
.home-frame .nav-link:focus-visible .nav-label {
    color: var(--red);
    transform: translateX(0.6cqw);
}

.home-frame .nav-link:hover .nav-index,
.home-frame .nav-link:focus-visible .nav-index {
    color: var(--red);
}

/* While the age gate is open, hold the intro so it plays after confirming */
.gate-pending .home-frame,
.gate-pending .home-frame * {
    animation-play-state: paused !important;
}

/* ========== CONTENT PAGES (desktop) ========== */
.mobile-layout {
    display: none;
}

.page-layout {
    background: var(--paper);
    display: grid;
    grid-template-columns: 53fr 44fr 3fr;
    animation: frameIn 0.6s var(--ease-out) both;
}

.col-1 {
    display: grid;
    grid-template-rows: 90fr 10fr;
    min-height: 0;
    color: #000;
    border-right: 0.57cqw solid var(--bg);
}

.main {
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: none;
    border-bottom: 0.57cqw solid var(--bg);
    padding: 1.4cqw 4.3cqw 2cqw 2cqw;
}

.home-btn {
    display: block;
    width: fit-content;
    margin-bottom: 1.7cqw;
    font-size: 1.43cqw;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.15s, letter-spacing 0.3s var(--ease-out);
    animation: fadeIn 0.5s ease 0.9s both;
}

.home-btn:hover {
    color: #505050;
    letter-spacing: 0.16em;
}

.title {
    font-size: 4cqw;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin-bottom: 2.9cqw;
    animation: revealUp 0.9s var(--ease-out) 0.3s both;
}

.tag {
    position: relative;
    margin: 0 0 2.9cqw 11.4cqw;
    padding-left: 0.7cqw;
    font-size: 1.15cqw;
    font-weight: 400;
    animation: rise 0.6s var(--ease-out) 0.75s both;
}

.tag::before {
    content: '';
    position: absolute;
    left: 0;
    top: -0.86cqw;
    bottom: -0.86cqw;
    width: 0.12cqw;
    background-color: var(--ink);
    transform-origin: top;
    animation: growY 0.6s var(--ease-out) 0.6s both;
}

.paragraph {
    font-size: 1.43cqw;
    line-height: 2.3cqw;
    font-weight: 700;
    animation: blurIn 0.9s var(--ease-out) 0.9s both;
}

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2cqw;
}

.btn {
    display: flex;
    align-items: center;
    gap: 0.57cqw;
    font-weight: 600;
    transition: color 0.15s;
    animation: fadeIn 0.5s ease 1.1s both;
}

.btn .arrow {
    width: 3.4cqw;
    height: 3.4cqw;
    fill: currentColor;
    transition: transform 0.3s var(--ease-out);
}

.btn:hover {
    color: #505050;
}

.btn.prev:hover .arrow {
    transform: translateX(-0.6cqw);
}

.btn.next:hover .arrow {
    transform: translateX(0.6cqw);
}

.prev {
    font-size: 1.43cqw;
}

.next {
    font-size: 2.9cqw;
}

.col-2 {
    position: relative;
    overflow: hidden;
    background-color: #000;
    animation: revealDown 1s var(--ease-in-out) 0.2s both;
}

.img-title {
    position: absolute;
    top: 1.43cqw;
    left: 2cqw;
    z-index: 4;
    min-width: 7.1cqw;
    height: 2.9cqw;
    padding: 0 1cqw;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.43cqw;
    font-weight: 700;
    letter-spacing: 0.1em;
    animation: revealRight 0.5s var(--ease-out) 1.05s both;
}

.col-3 {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 2cqw;
    overflow: hidden;
}

.col-3 span {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 0.75cqw;
    font-weight: 700;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    white-space: nowrap;
    color: rgba(64, 63, 63, 0.55);
    animation: fadeIn 0.8s ease 1.3s both;
}

/* ========== WORKS PAGE ========== */
.works {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.works .works-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: worksBgIn 1.6s var(--ease-out) both;
}

@keyframes worksBgIn {
    from { transform: scale(1.15); filter: brightness(0.3); }
    to { transform: none; filter: none; }
}

.works-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.5) 100%);
    pointer-events: none;
}

.works .home-btn {
    position: absolute;
    top: calc(2vw + var(--safe-top));
    left: 2vw;
    z-index: 2;
    margin: 0;
    font-size: clamp(12px, 1vw, 18px);
}

.works .home-btn:hover {
    color: var(--red);
}

.works .nav {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2vw;
    font-size: clamp(28px, 2.8vw, 64px);
    font-weight: 900;
    white-space: nowrap;
}

.works .nav a {
    line-height: 1.1;
    transition: color 0.2s, letter-spacing 0.35s var(--ease-out);
    animation: rise 0.7s var(--ease-out) calc(0.45s + var(--i, 0) * 80ms) both;
}

.works .nav a[href] {
    cursor: pointer;
}

.works .nav a[href]:hover {
    color: var(--red);
    letter-spacing: 0.04em;
}

.works .links {
    position: absolute;
    bottom: calc(2vw + var(--safe-bottom));
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.6vw;
}

.works .links a {
    font-size: clamp(12px, 1vw, 16px);
    font-weight: 500;
    letter-spacing: 0.1em;
    padding-bottom: 2px;
    background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
    transition: background-size 0.3s var(--ease-out), color 0.2s;
    animation: fadeIn 0.6s ease calc(1s + var(--i, 0) * 80ms) both;
}

.works .links a:hover {
    color: var(--red);
    background-size: 100% 1px;
}

/* ========== AGE VERIFICATION ========== */
@keyframes overlayIn {
    from { opacity: 0; backdrop-filter: blur(0); }
    to { opacity: 1; }
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(28px) scale(0.96); }
    to { opacity: 1; transform: none; }
}

@keyframes cardOut {
    to { opacity: 0; transform: translateY(-16px) scale(0.97); }
}

@keyframes barIn {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@keyframes badgePop {
    0% { opacity: 0; transform: scale(0.4) rotate(-12deg); }
    70% { transform: scale(1.08) rotate(2deg); }
    100% { opacity: 1; transform: none; }
}

@keyframes ring {
    from { transform: scale(1); opacity: 0.6; }
    to { transform: scale(1.6); opacity: 0; }
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: calc(20px + var(--safe-top)) 20px calc(20px + var(--safe-bottom));
    background: radial-gradient(circle at 50% 40%, rgba(203, 57, 57, 0.22) 0%, rgba(18, 18, 18, 0.88) 65%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    backdrop-filter: blur(16px) saturate(120%);
    animation: overlayIn 0.45s ease both;
}

.modal-overlay[hidden] {
    display: none;
}

.modal-container {
    position: relative;
    width: min(440px, 100%);
    max-height: 100%;
    overflow-y: auto;
    background: #1e1d1d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
    animation: cardIn 0.65s var(--ease-out) 0.1s both;
}

.modal-container::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--red);
    transform-origin: left;
    animation: barIn 0.7s var(--ease-in-out) 0.45s both;
}

.modal-content {
    padding: 40px 32px 28px;
    text-align: center;
    color: #fff;
}

.age-badge {
    position: relative;
    width: 76px;
    height: 76px;
    margin: 0 auto 22px;
    display: grid;
    place-items: center;
    border: 2px solid var(--red);
    border-radius: 50%;
    color: var(--red);
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.02em;
    animation: badgePop 0.6s var(--ease-out) 0.35s both;
}

.age-badge span {
    position: absolute;
    top: 18px;
    right: 13px;
    font-size: 14px;
}

.age-badge::after {
    content: '';
    position: absolute;
    inset: -2px;
    border: 2px solid var(--red);
    border-radius: 50%;
    animation: ring 1.8s ease-out 1s 2;
    opacity: 0;
}

.modal-content h2 {
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
    animation: rise 0.5s var(--ease-out) 0.45s both;
}

.modal-content p {
    margin-bottom: 26px;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    animation: rise 0.5s var(--ease-out) 0.52s both;
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    animation: rise 0.5s var(--ease-out) 0.6s both;
}

.modal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 2px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease-out), box-shadow 0.2s;
}

.modal-btn:disabled {
    opacity: 0.75;
    cursor: wait;
}

.btn-primary {
    border: 1px solid var(--red);
    background: var(--red);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: var(--red-dark);
    border-color: var(--red-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(203, 57, 57, 0.35);
}

.btn-secondary {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
}

.btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
}

.modal-overlay:focus-visible,
.modal-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.modal-content .legal-note {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.45);
    animation: rise 0.5s var(--ease-out) 0.68s both;
}

.modal-overlay.is-closing {
    animation: fadeOut 0.4s ease 0.1s both;
}

.modal-overlay.is-closing .modal-container {
    animation: cardOut 0.4s var(--ease-in-out) both;
}

.spinner-small {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

/* ========== IMAGE SLIDER ========== */
.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #111;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: pan-y;
}

.slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.7s var(--ease-in-out);
    will-change: transform;
}

.slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    -webkit-user-drag: none;
}

.slider-container::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 22%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent);
    pointer-events: none;
    z-index: 5;
}

.slider-container .arrow {
    position: absolute;
    bottom: 1cqw;
    z-index: 10;
    width: 4.3cqw;
    height: 4.3cqw;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: transform 0.25s var(--ease-out);
}

.slider-container .arrow-prev {
    left: 1.4cqw;
}

.slider-container .arrow-next {
    right: 1.4cqw;
}

.slider-container .arrow-prev:hover {
    transform: translateX(-0.4cqw);
}

.slider-container .arrow-next:hover {
    transform: translateX(0.4cqw);
}

.slider-container .arrow-icon {
    width: 3.4cqw;
    height: 3.4cqw;
    fill: #fff;
}

.dots-container {
    position: absolute;
    bottom: 1cqw;
    left: 50%;
    z-index: 10;
    height: 4.3cqw;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.86cqw;
}

.dot {
    width: 0.86cqw;
    height: 0.86cqw;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: width 0.4s var(--ease-out), background-color 0.3s;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.dot.active {
    width: 2.6cqw;
    background: #fff;
}

/* ========== VIDEO PLAYER ========== */
.video-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 200px;
    background: #000;
    overflow: hidden;
}

.video-container .video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.video-container .video.visible {
    opacity: 1;
}

.video-container .video-loader {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
}

.video-container .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.video-container .loading-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.video-error {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #1a0a0a;
    color: #ff6b6b;
}

.sound-toggle,
.play-toggle {
    position: absolute;
    bottom: 1.2cqw;
    z-index: 3;
    width: 3.8cqw;
    height: 3.8cqw;
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: whitesmoke;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s var(--ease-out);
}

.sound-toggle:hover,
.play-toggle:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: scale(1.06);
}

.sound-toggle {
    right: 1.2cqw;
}

.play-toggle {
    left: 1.2cqw;
}

.sound-toggle .icon,
.play-toggle .icon {
    width: 50%;
    height: 50%;
}

.sound-toggle.muted .icon {
    opacity: 0.7;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */

/* Laptops / small desktops / tablets in landscape: let the frame use more of the screen */
@media (max-width: 1279px) {
    .container {
        width: min(94vw, 150dvh);
    }
}

/* Phones in landscape: the frame fills the screen */
@media (orientation: landscape) and (max-height: 520px) and (min-width: 601px) {
    .container {
        width: 100vw;
        height: 100dvh;
        aspect-ratio: auto;
    }
}

/* Phones and tablets in portrait: stacked mobile layout */
@media (orientation: portrait) and (max-width: 1100px), (max-width: 600px) {
    .container {
        width: 100vw;
        height: 100dvh;
        aspect-ratio: auto;
    }

    /* ---- Home ---- */
    .home-bg {
        --zoom: 1.04;
        object-position: 58% 50%;
    }

    .home-frame::after {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 1;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0.1) 72%, rgba(0, 0, 0, 0.65) 100%);
        pointer-events: none;
    }

    .home-frame .logo {
        top: calc(20px + var(--safe-top));
        right: auto;
        left: 24px;
        font-size: 16px;
        font-weight: 700;
        letter-spacing: 0.02em;
        text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
    }

    .home-frame .nav {
        inset: auto 0 0 0;
        gap: 0;
        padding: 0 20px calc(28px + var(--safe-bottom));
    }

    .home-frame .nav-link {
        width: 100%;
        align-items: center;
        gap: 14px;
        padding: 13px 4px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.16);
        font-size: clamp(22px, 6.4vw, 34px);
        line-height: 1.1;
    }

    .home-frame .nav-link:first-child {
        border-top: 1px solid rgba(255, 255, 255, 0.16);
    }

    .home-frame .nav-index {
        min-width: 22px;
        font-size: 11px;
    }

    .home-frame .nav-label {
        flex: 1;
    }

    .home-frame .nav-arrow {
        display: block;
        width: 20px;
        height: 20px;
        fill: currentColor;
        opacity: 0.6;
        transition: transform 0.3s var(--ease-out), opacity 0.2s, color 0.2s;
        animation: fadeIn 0.6s ease calc(1.3s + var(--i, 0) * 70ms) both;
    }

    .home-frame .nav-link:hover .nav-label {
        transform: none;
    }

    .home-frame .nav-link:active {
        background: rgba(255, 255, 255, 0.06);
    }

    .home-frame .nav-link:active .nav-arrow,
    .home-frame .nav-link:hover .nav-arrow {
        opacity: 1;
        color: var(--red);
        transform: translateX(4px);
    }

    /* ---- Content pages ---- */
    .page-layout {
        display: none;
    }

    .mobile-layout {
        display: grid;
        grid-template-rows: auto 1fr auto;
        background: var(--paper);
        color: #000;
    }

    .m-media {
        position: relative;
        height: 48dvh;
        overflow: hidden;
        background: #000;
        animation: revealDown 0.9s var(--ease-in-out) both;
    }

    .m-media .slider-container,
    .m-media .video-container {
        height: 100%;
    }

    .m-media.is-expanded {
        position: fixed;
        inset: 0;
        z-index: 500;
        height: 100dvh;
        animation: fadeIn 0.25s ease both;
    }

    /* Glass buttons over the photo: readable on light and dark images */
    .m-media-bar {
        position: absolute;
        inset: calc(12px + var(--safe-top)) 12px auto 12px;
        z-index: 20;
        display: flex;
        justify-content: space-between;
        pointer-events: none;
        animation: fadeIn 0.4s ease 0.8s both;
    }

    .m-pill {
        pointer-events: auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        height: 40px;
        min-width: 40px;
        padding: 0 14px;
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 999px;
        background: rgba(20, 20, 20, 0.45);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        color: #fff;
        font-size: 13px;
        font-weight: 600;
        letter-spacing: 0.03em;
        cursor: pointer;
    }

    .m-pill:active {
        background: rgba(20, 20, 20, 0.7);
    }

    .m-pill .arrow {
        width: 16px;
        height: 16px;
        fill: currentColor;
    }

    .m-toggle-btn {
        padding: 0;
        width: 40px;
    }

    .m-toggle-btn svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
    }

    .m-toggle-btn .icon-close,
    .m-toggle-btn[aria-pressed="true"] .icon-expand {
        display: none;
    }

    .m-toggle-btn[aria-pressed="true"] .icon-close {
        display: block;
    }

    .m-info {
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding: 24px max(22px, calc((100vw - 680px) / 2)) 40px;
        /* soft fade above the footer instead of a hard cut */
        -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent);
        mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent);
    }

    .m-img-title {
        display: inline-flex;
        align-items: center;
        height: 26px;
        padding: 0 10px;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        animation: revealRight 0.5s var(--ease-out) 0.55s both;
    }

    .m-title {
        margin: 12px 0 18px;
        font-size: clamp(34px, 9.5vw, 52px);
        font-weight: 800;
        line-height: 1.02;
        letter-spacing: -0.025em;
        animation: revealUp 0.8s var(--ease-out) 0.35s both;
    }

    .m-tag {
        position: relative;
        margin: 0 0 22px 32px;
        padding-left: 12px;
        font-size: 14px;
        font-weight: 400;
        line-height: 1.5;
        color: #222;
        animation: rise 0.6s var(--ease-out) 0.6s both;
    }

    .m-tag::before {
        content: '';
        position: absolute;
        left: 0;
        top: 2px;
        bottom: 2px;
        width: 2px;
        background-color: var(--ink);
        transform-origin: top;
        animation: growY 0.5s var(--ease-out) 0.5s both;
    }

    .m-paragraph {
        font-size: clamp(16px, 2.3vw, 18px);
        font-weight: 500;
        line-height: 1.7;
        color: #111;
        animation: blurIn 0.8s var(--ease-out) 0.75s both;
    }

    /* Previous / Next bar */
    .m-footer {
        display: grid;
        grid-template-columns: 1fr 1fr;
        background: var(--bg);
        color: #fff;
        padding-bottom: var(--safe-bottom);
        animation: rise 0.5s var(--ease-out) 0.9s both;
    }

    .m-footer.is-single {
        grid-template-columns: 1fr;
    }

    .m-footer a {
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: 68px;
        padding: 12px 20px;
        transition: background-color 0.2s;
    }

    .m-footer a:active {
        background: rgba(255, 255, 255, 0.08);
    }

    .m-prev + .m-next {
        border-left: 1px solid rgba(255, 255, 255, 0.14);
    }

    .m-next {
        justify-content: flex-end;
        text-align: right;
    }

    .m-footer a span {
        display: flex;
        flex-direction: column;
        min-width: 0;
        font-size: 16px;
        font-weight: 700;
        line-height: 1.2;
    }

    .m-footer small {
        margin-bottom: 3px;
        font-size: 10px;
        font-weight: 600;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.55);
    }

    .m-footer .arrow {
        flex-shrink: 0;
        width: 34px;
        height: 34px;
        padding: 8px;
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 50%;
        fill: currentColor;
        transition: transform 0.3s var(--ease-out), background-color 0.2s;
    }

    .m-next .arrow {
        border-color: var(--red);
        background: var(--red);
    }

    .m-prev:active .arrow {
        transform: translateX(-3px);
    }

    .m-next:active .arrow {
        transform: translateX(3px);
    }

    /* ---- Slider & video on touch screens: swipe + dots ---- */
    .slider-container .arrow {
        display: none;
    }

    .slider-container::after {
        height: 30%;
    }

    .dots-container {
        bottom: 14px;
        height: 24px;
        padding: 0 10px;
        gap: 6px;
        border-radius: 999px;
        background: rgba(20, 20, 20, 0.45);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    }

    .dot {
        width: 7px;
        height: 7px;
    }

    .dot.active {
        width: 20px;
    }

    .sound-toggle,
    .play-toggle {
        bottom: 12px;
        width: 40px;
        height: 40px;
        background: rgba(20, 20, 20, 0.45);
    }

    .sound-toggle {
        right: 12px;
    }

    .play-toggle {
        left: 12px;
    }

    /* ---- Works ---- */
    /* The artwork sits at the bottom edges of a black image: show it whole instead of cropping to black */
    .works .works-img {
        object-fit: contain;
        object-position: center bottom;
    }

    .works .nav {
        margin-bottom: 18dvh;
    }

    .works .links a {
        text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
    }

    .works .home-btn {
        top: calc(18px + var(--safe-top));
        left: 20px;
        font-size: 13px;
    }

    .works .nav {
        gap: 10px;
        font-size: clamp(28px, 8vw, 44px);
    }

    .works .links {
        bottom: calc(24px + var(--safe-bottom));
        gap: 18px;
        padding: 0 20px;
    }

    .works .links a {
        font-size: 12px;
    }

    /* ---- Age gate ---- */
    .modal-content {
        padding: 34px 22px 22px;
    }

    .modal-content h2 {
        font-size: 20px;
    }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    @view-transition {
        navigation: none;
    }
}
