/* Curved 3D book shelf (hero of the home page).
   Layout, motion and detail sheet follow the "Leon Vasari — Film Archive" design:
   paper ground, halftone lettering, a curved shelf of spines that turn to show their covers,
   a ruler under it, a play ring, and a full-screen detail sheet that opens out of the cover. */

.vs, .vs-detail {
    --paper: #072016;
    --sheet: #071a12;
    --ink: #F5EFE0;
    --muted: #9AA394;
    --accent: #E0BC6A;
    --mint: #52DF81;
    --gold: #E0BC6A;
    --rule: rgba(224, 188, 106, 0.7);
}

.vs {
    --H: min(44svh, 30vw);
    --cy: 46%;
    --ws: 68px;
    --d: 210px;
    position: relative;
    height: 100vh;
    height: 100svh;
    min-height: 640px;
    max-height: 1100px;
    background: radial-gradient(ellipse 80% 70% at 50% 42%, #104530 0%, #0A2B1D 48%, #05140D 100%);
    color: var(--ink);
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    isolation: isolate;
}

.vs *,
.vs *::before,
.vs *::after { box-sizing: border-box; }

.vs-lbl {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 10.5px;
    line-height: 1;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    color: inherit;
}

.vs-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 21px;
    padding: 0 8px;
    border: 1px solid var(--rule);
    background: none;
    cursor: pointer;
}

/* Paper grain */
.vs-grain {
    position: absolute;
    inset: 0;
    z-index: 40;
    pointer-events: none;
    mix-blend-mode: overlay;
    opacity: 0.35;
    background-repeat: repeat;
    background-size: 220px 220px;
}

/* Scholars drifting beside the shelf */
.vs-float { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.vs-fl { position: absolute; display: block; border-radius: 999px 999px 16px 16px; overflow: hidden; border: 1px solid rgba(224, 188, 106, 0.55); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.7); animation: vs-bob 7s ease-in-out infinite; opacity: 0.92; background: #0B1A14; }
.vs-fl img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85); }
.vs-fl-0 { left: 3vw; top: 24%; width: 92px; height: 118px; animation-delay: -1s; }
.vs-fl-1 { left: 1.5vw; top: 45%; width: 112px; height: 142px; animation-delay: -3.5s; }
.vs-fl-2 { left: 8vw; top: 69%; width: 80px; height: 102px; animation-delay: -5s; }
.vs-fl-3 { left: 14vw; top: 18%; width: 70px; height: 90px; animation-delay: -2.2s; opacity: 0.7; }
.vs-fl-4 { right: 3vw; top: 22%; width: 100px; height: 128px; animation-delay: -4s; }
.vs-fl-5 { right: 1.5vw; top: 46%; width: 114px; height: 144px; animation-delay: -1.6s; }
.vs-fl-6 { right: 8vw; top: 70%; width: 82px; height: 104px; animation-delay: -6s; }
.vs-fl-7 { right: 14vw; top: 17%; width: 70px; height: 90px; animation-delay: -3s; opacity: 0.7; }
@keyframes vs-bob { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-16px) rotate(1.5deg); } }
@media (max-width: 1100px) { .vs-fl-3, .vs-fl-7 { display: none; } .vs-fl-1, .vs-fl-5 { width: 84px; height: 108px; } }
@media (max-width: 767px) { .vs-fl-1, .vs-fl-5, .vs-fl-2, .vs-fl-6 { display: none; } .vs-fl { width: 64px !important; height: 82px !important; } .vs-fl-0 { left: 4vw; top: 22%; } .vs-fl-4 { right: 4vw; top: 22%; } }
@media (prefers-reduced-motion: reduce) { .vs-fl { animation: none; } }

.vs-probe { position: absolute; top: var(--cy); height: var(--H); width: 0; visibility: hidden; pointer-events: none; }

.vs-floor {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: calc(var(--cy) + var(--H) * 0.47);
    width: min(96vw, calc(var(--H) * 3.6));
    height: calc(var(--H) * 0.26);
    background: radial-gradient(50% 50% at 50% 40%, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.2) 55%, transparent 72%);
    pointer-events: none;
    z-index: 5;
}

/* Shelf */
.vs-shelf {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    top: calc(var(--cy) - var(--H) / 2 - 50px);
    height: calc(var(--H) + 100px);
    perspective: 1400px;
    perspective-origin: 50% 50%;
    z-index: 10;
    touch-action: pan-y;
}
.vs-stage { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.vs-tape { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d; will-change: transform; display: none; outline: none; }
.vs-tape:focus-visible .vs-sp { outline: 2px solid var(--accent); outline-offset: 2px; }

.vs-face {
    position: absolute;
    height: var(--H);
    top: calc(var(--H) * -0.5);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 2px;
    background-repeat: no-repeat;
    background-color: #0B2417;
    overflow: hidden;
}
.vs-face::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #000;
    opacity: var(--shade, 0);
    pointer-events: none;
    border-radius: inherit;
}
.vs-sp { width: var(--ws); left: calc(var(--ws) * -0.5); transform: translateZ(calc(var(--d) * 0.5)); }
.vs-cv {
    width: var(--d);
    left: calc(var(--d) * -0.5);
    transform: rotateY(90deg) translateZ(calc(var(--ws) * 0.5));
    box-shadow: 0 34px 60px -30px rgba(0, 0, 0, 0.9);
    background-size: cover;
    background-position: center;
}

/* The spine is the cover, stretched, under a dark wash with the title running down it */
.vs-sp { background-size: cover; background-position: center; }
.vs-sp::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(5, 17, 12, 0.72), rgba(5, 17, 12, 0.5) 45%, rgba(5, 17, 12, 0.78));
}
.vs-sp-t {
    position: absolute;
    inset: 14% 0 22% 0;
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-family: var(--serif);
    font-weight: 600;
    font-size: calc(var(--ws) * 0.36);
    line-height: 1;
    letter-spacing: 0.02em;
    color: #F5EFE0;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    text-align: center;
    padding: 0 6%;
}
.vs-sp-t b { font-weight: 600; display: block; max-height: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-sp-n {
    position: absolute;
    left: 0;
    right: 0;
    top: 5%;
    text-align: center;
    font-family: var(--sans);
    font-weight: 800;
    font-size: calc(var(--ws) * 0.22);
    letter-spacing: 0.06em;
    color: #E0BC6A;
}
.vs-sp-a {
    position: absolute;
    left: 14%;
    right: 14%;
    bottom: 5%;
    height: calc(var(--ws) * 0.46);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.vs-sp-a i { display: block; width: 100%; height: 3px; background: #E0BC6A; opacity: 0.9; }

/* Play ring */
.vs-ring {
    position: absolute;
    width: 42px;
    height: 42px;
    margin-left: -21px;
    margin-top: -21px;
    border-radius: 50%;
    border: 1px solid var(--accent);
    background: rgba(5, 17, 12, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 25;
    padding: 0;
    will-change: transform;
    color: var(--accent);
    transform: scale(0);
}
.vs-ring svg { width: 12px; height: 12px; fill: var(--accent); transform: translateX(1px); }

/* Caption */
.vs-cap {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: calc(var(--cy) + var(--H) / 2 + 4.2svh);
    display: grid;
    justify-items: center;
    gap: 10px;
    z-index: 20;
    pointer-events: none;
}
.vs-mask { width: min(80vw, 680px); overflow: hidden; position: relative; display: grid; place-items: center; }
.vs-mask > span { grid-area: 1 / 1; display: block; text-align: center; white-space: nowrap; will-change: transform; }
.vs-mask-title { line-height: 1.14; padding: 2px 0; }
.vs-cap-title {
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(28px, 3.3vw, 46px);
    letter-spacing: -0.015em;
    color: var(--ink);
    font-variation-settings: 'opsz' 144;
}
.vs-mask-sub { line-height: 1.3; padding: 1px 0; }
.vs-cap-sub { font-family: var(--sans); font-weight: 700; font-size: 9.5px; line-height: 1; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); }
.vs-cap-rule { width: 18px; height: 1px; background: var(--accent); }
.vs-mask-year { line-height: 1.3; padding: 1px 0; }
.vs-cap-year { font-family: var(--sans); font-weight: 600; font-size: 10.5px; line-height: 1; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }

/* Arrows */
.vs-arrow {
    position: absolute;
    top: calc(var(--cy) + var(--H) / 2 + 4.2svh + clamp(14px, 1.7vw, 23px));
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    background: none;
    border: none;
    padding: 0;
    z-index: 25;
    cursor: pointer;
    transition: transform 0.25s var(--ease);
}
.vs-arrow:hover { transform: translate(-50%, -50%) scale(1.1); }
.vs-arrow-prev { left: calc(50% - min(21vw, 290px)); }
.vs-arrow-next { left: calc(50% + min(21vw, 290px)); }

/* Ruler */
.vs-time { position: absolute; left: 48px; right: 48px; bottom: 62px; height: 40px; z-index: 20; }
.vs-time-line { position: absolute; left: 0; right: 0; top: 12px; height: 1px; background: var(--accent); opacity: 0.75; }
.vs-tick { position: absolute; width: 1px; background: var(--accent); transform: translateX(-0.5px); top: 5.5px; height: 13px; opacity: 0.75; }
.vs-tick.minor { top: 8.5px; height: 7px; opacity: 0.4; }
.vs-yr { position: absolute; top: 23px; font-family: var(--sans); font-weight: 600; font-size: 9.5px; line-height: 1; color: var(--accent); transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.vs-yr.first { transform: none; }
.vs-yr.last { transform: translateX(-100%); }
.vs-dot { position: absolute; top: 12px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); transform: translate(-50%, -50%); pointer-events: none; will-change: left; }
.vs-hit { position: absolute; inset: -6px 0; background: transparent; border: none; width: 100%; height: calc(100% + 12px); display: block; padding: 0; cursor: pointer; }

/* Foot line */
.vs-foot { position: absolute; left: 48px; right: 48px; bottom: 24px; display: flex; align-items: center; justify-content: space-between; color: var(--accent); z-index: 20; gap: 16px; }
.vs-foot a { color: inherit; }

/* Intro line at top of the hero */
.vs-intro {
    position: absolute;
    left: 50%;
    top: 104px;
    transform: translateX(-50%);
    z-index: 22;
    width: min(92vw, 900px);
    text-align: center;
    pointer-events: none;
}
.vs-intro h1 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(22px, 2.3vw, 34px);
    line-height: 1.12;
    letter-spacing: -0.015em;
    margin: 0;
    color: var(--ink);
    font-variation-settings: 'opsz' 144;
}
.vs-intro h1 em { color: var(--gold-soft, #F0DBA2); font-style: italic; font-variation-settings: 'opsz' 144, 'SOFT' 100; }
.vs-intro .vs-lbl { display: block; margin-bottom: 12px; color: var(--accent); }

/* Detail sheet */
.vs-detail {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse 70% 70% at 70% 45%, #0F3B28 0%, #071a12 70%);
    color: var(--ink);
    z-index: 1100;
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 4vw;
    padding: 110px 6vw 56px 7vw;
    align-items: center;
    overflow: hidden;
    will-change: clip-path;
    font-family: var(--sans);
}
.vs-detail.is-open { display: grid; }
.vs-detail * { box-sizing: border-box; }
.vs-detail-close { position: absolute; left: 36px; top: 28px; color: var(--ink); background: transparent; z-index: 5; }
.vs-detail-brand { position: absolute; right: 36px; top: 28px; display: flex; align-items: center; gap: 16px; color: var(--accent); pointer-events: none; }
.vs-brand-rule { width: 40px; height: 1px; background: currentColor; display: inline-block; flex-shrink: 0; }
.vs-detail-left { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; max-width: 540px; gap: 18px; }
.vs-detail-mask { overflow: hidden; display: block; width: 100%; }
.vs-detail-line { display: block; will-change: transform; }
.vs-detail-sub { color: var(--accent); letter-spacing: 0.24em; }
.vs-detail-title { font-family: var(--serif); font-weight: 500; font-size: clamp(40px, 4.8vw, 76px); line-height: 1.02; letter-spacing: -0.03em; color: var(--ink); margin: 0; font-variation-settings: 'opsz' 144; }
.vs-detail-meta { font-family: var(--sans); font-weight: 700; font-size: 10.5px; line-height: 1.2; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.vs-detail-syn { font-family: var(--serif); font-weight: 400; font-size: 17px; line-height: 1.55; color: var(--ink); max-width: 44ch; margin: 0; }
.vs-detail-credit { font-family: var(--serif); font-style: italic; font-size: 15px; line-height: 1.4; color: var(--muted); margin: 0; }
.vs-detail-btn {
    height: 44px;
    padding: 0 20px;
    border: 1px solid var(--accent);
    color: var(--accent);
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.vs-detail-btn:hover { background: var(--accent); color: #05110C; }
.vs-detail-right { height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.vs-poster { height: min(100%, 78vh); width: auto; max-width: 100%; display: block; filter: drop-shadow(0 28px 48px rgba(0, 0, 0, 0.6)); }

/* Cursor */
.vs-cursor {
    position: fixed;
    left: 0;
    top: 0;
    width: 58px;
    height: 58px;
    margin-left: -29px;
    margin-top: -29px;
    pointer-events: none;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    will-change: transform;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.vs-cursor.is-on { opacity: 1; }
@media (pointer: fine) { .vs-cursor { display: flex; } }
.vs-cursor-ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid #F5EFE0; background: transparent; transition: transform 0.5s var(--ease), background-color 0.4s var(--ease), border-color 0.4s var(--ease); }
.vs-cursor-dot { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #F5EFE0; transition: transform 0.4s var(--ease), opacity 0.4s var(--ease); }
.vs-cursor-label { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-family: var(--sans); font-weight: 800; font-size: 10px; line-height: 1.05; letter-spacing: 0.1em; color: #05110C; opacity: 0; transform: scale(0.6); transition: opacity 0.45s var(--ease), transform 0.45s var(--ease); }
.vs-cursor.open .vs-cursor-ring { transform: scale(1.75); background: #52DF81; border-color: #52DF81; }
.vs-cursor.open .vs-cursor-dot { opacity: 0; transform: scale(0); }
.vs-cursor.open .vs-cursor-label { opacity: 1; transform: scale(1); }
.vs-cursor.spine .vs-cursor-ring { transform: scale(0.72); }
.vs-cursor.btn .vs-cursor-ring { transform: scale(0.55); border-color: #52DF81; }
.vs-cursor.btn .vs-cursor-dot { opacity: 0; transform: scale(0); }

@media (pointer: fine) {
    .vs.has-cursor, .vs.has-cursor a, .vs.has-cursor button, .vs.has-cursor [role="button"],
    .vs-detail.has-cursor, .vs-detail.has-cursor button { cursor: none !important; }
    html.vs-hero-on .cursor { display: none !important; }
}

.vs-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html.vs-lock, html.vs-lock body { overflow: hidden; }

/* Tablet and phone */
@media (max-width: 1023px) {
    .vs-time { left: 28px; right: 28px; }
    .vs-foot { left: 28px; right: 28px; }
}
@media (max-width: 767px) {
    .vs { --H: min(60vw, 38svh); --cy: 47%; min-height: 600px; }
    .vs-ar { font-size: 22vw; opacity: 0.8; }
    .vs-cap-title { font-size: 26px; }
    .vs-intro { top: 92px; }
    .vs-arrow { top: auto; bottom: 118px; transform: none; }
    .vs-arrow:hover { transform: none; }
    .vs-arrow-prev { left: 12px; }
    .vs-arrow-next { left: auto; right: 12px; }
    .vs-time { left: 16px; right: 16px; bottom: 54px; }
    .vs-yr.odd { display: none; }
    .vs-foot { left: 16px; right: 16px; bottom: 16px; }
    .vs-foot .vs-hint { display: none; }
    .vs-detail { grid-template-columns: 1fr; padding: 76px 20px 40px; overflow-y: auto; align-items: start; gap: 24px; }
    .vs-detail-close { left: 16px; top: 18px; }
    .vs-detail-brand { right: 16px; top: 22px; }
    .vs-detail-brand .vs-brand-rule { width: 18px; }
    .vs-detail-right { order: -1; height: 46svh; width: 100%; }
    .vs-poster { height: 46svh; }
    .vs-detail-title { font-size: 40px; }
    .vs-cursor { display: none !important; }
}
@media (max-height: 700px) and (min-width: 768px) {
    .vs-intro { display: none; }
}
