:root {
    --ink: #07021a;
    --night: #0e0626;
    --surface: #170936;
    --line: rgba(255, 255, 255, 0.1);
    --violet: #8b3dff;
    --indigo: #4f46e5;
    --text: #f7f4ff;
    --muted: #b3a8d8;
    --faint: #7a6fa3;
    --display: "Big Shoulders Display", Impact, sans-serif;
    --body: "Plus Jakarta Sans", system-ui, sans-serif;
    --gutter: clamp(16px, 5vw, 72px);
    color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--ink);
    color: var(--text);
    font: 400 16px/1.6 var(--body);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
h1, h2 { margin: 0; font-family: var(--display); font-weight: 800; line-height: 0.95; letter-spacing: 0.01em; text-transform: uppercase; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; }

/* Buttons */
.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 52px; padding: 0 26px;
    border: 0; border-radius: 999px;
    background: linear-gradient(135deg, var(--violet), var(--indigo));
    color: #fff; font-weight: 700; text-decoration: none; cursor: pointer;
    box-shadow: 0 10px 30px -10px rgba(139, 61, 255, 0.8);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 14px 34px -10px rgba(139, 61, 255, 0.95); }
.button svg { width: 20px; height: 20px; fill: currentColor; }
.button-ghost { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.35); box-shadow: none; backdrop-filter: blur(8px); }
.button-ghost:hover { background: rgba(255, 255, 255, 0.12); box-shadow: none; }
.button-small { min-height: 40px; padding: 0 18px; font-size: 14px; }

/* Navigation: transparent over the hero, solid once scrolled */
.nav {
    position: fixed; inset: 0 0 auto; z-index: 20;
    display: flex; align-items: center; gap: 40px;
    padding: 18px var(--gutter);
    transition: background 0.25s ease, padding 0.25s ease;
}
.nav.is-solid { background: rgba(7, 2, 26, 0.86); backdrop-filter: blur(14px); padding-block: 12px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 700 19px var(--body); letter-spacing: -0.01em; }
.brand img { border-radius: 9px; }
.nav-links { display: flex; gap: 28px; margin-right: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--text); }

/* Hero */
.hero { position: relative; min-height: min(100svh, 920px); display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto; overflow: hidden; isolation: isolate; }
/* Slides share one grid cell, so the hero grows to the tallest copy and the rail sits below it; the artwork spans the whole hero. */
.hero-slide { grid-area: 1 / 1; animation: slide-in 0.9s ease both; }
.hero-slide[hidden] { display: block; visibility: hidden; opacity: 0; animation: none; }

/* A huge blurred copy of the artwork tints the whole hero, like a sky behind the cast. */
.hero-wash {
    position: absolute; inset: -10%;
    background-size: cover; background-position: center;
    filter: blur(60px) saturate(1.3);
    opacity: 0.55;
    z-index: -2;
}
.hero-wash::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--ink) 15%, rgba(7, 2, 26, 0.35) 70%); }
.hero-art {
    position: absolute; top: 0; right: 0; z-index: -1;
    width: min(58vw, 820px); height: 100%;
    object-fit: cover; object-position: center 20%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.6) 22%, #000 45%);
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.6) 22%, #000 45%);
    animation: drift 14s ease-out both;
}
/* Wide (16:9) artwork spans the full hero; a scrim keeps the copy on the left readable. */
.hero-art-wide { width: 100%; object-position: 70% 25%; -webkit-mask-image: none; mask-image: none; }
.hero-scrim {
    position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(90deg, rgba(7, 2, 26, 0.95) 0%, rgba(7, 2, 26, 0.82) 32%, rgba(7, 2, 26, 0.3) 62%, rgba(7, 2, 26, 0.12) 85%),
        linear-gradient(0deg, var(--ink) 0%, rgba(7, 2, 26, 0.55) 22%, transparent 45%);
}
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 220px; background: linear-gradient(transparent, var(--ink)); z-index: -1; pointer-events: none; }

.hero-copy { position: relative; z-index: 1; padding: clamp(110px, 16vh, 170px) var(--gutter) 0; max-width: calc(560px + var(--gutter) * 2); }
.hero-kicker { margin: 0 0 18px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: 0.42em; text-transform: uppercase; }
.hero-title {
    font-size: clamp(52px, 7.6vw, 112px);
    font-weight: 900;
    text-wrap: balance;
    text-shadow: 0 6px 40px rgba(7, 2, 26, 0.6);
}
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0; margin: 22px 0 0; color: var(--text); font-weight: 500; }
.hero-meta span + span::before { content: ""; display: inline-block; width: 1px; height: 16px; margin: 0 14px; vertical-align: -2px; background: rgba(255, 255, 255, 0.35); }
.hero-meta .tag { padding: 2px 10px; border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 6px; font-size: 13px; font-weight: 700; margin-left: 14px; }
.hero-meta .tag::before { display: none; }
.hero-synopsis { margin: 18px 0 0; max-width: 34em; color: rgba(247, 244, 255, 0.86); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* Rail of featured posters that drives the hero */
.hero-rail { position: relative; padding: 40px var(--gutter) 44px; }
.rail-label { margin: 0 0 14px; font-weight: 700; font-size: 18px; }
.rail { display: flex; gap: 14px; }
.rail-item {
    position: relative; flex: 0 0 auto;
    width: clamp(120px, 13vw, 176px); aspect-ratio: 2 / 3;
    padding: 0; border: 2px solid transparent; border-radius: 14px; overflow: hidden;
    background: var(--surface); cursor: pointer;
    opacity: 0.6; transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.rail-item img { width: 100%; height: 100%; object-fit: cover; }
.rail-item:hover { opacity: 0.9; transform: translateY(-3px); }
.rail-item[aria-selected="true"] { opacity: 1; border-color: #fff; }
.rail-title {
    position: absolute; inset: auto 0 0; padding: 28px 10px 12px;
    background: linear-gradient(transparent, rgba(7, 2, 26, 0.92));
    font: 800 17px/1 var(--display); text-transform: uppercase; text-align: left;
}
.rail-progress { position: absolute; inset: auto 0 0; height: 3px; background: var(--violet); transform: scaleX(0); transform-origin: left; }
.rail-item[aria-selected="true"] .rail-progress { animation: progress var(--slide-ms, 7000ms) linear forwards; }
.hero.is-paused .rail-progress { animation-play-state: paused; }

/* Sections */
.section { padding: 72px var(--gutter) 24px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 32px; margin-bottom: 26px; }
.section-head h2 { font-size: clamp(40px, 5vw, 64px); }
.section-head p { margin: 0; max-width: 30em; color: var(--muted); }

.poster { display: flex; flex-direction: column; justify-content: flex-start; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.poster-frame { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 14px; overflow: hidden; background: var(--surface); }
.poster-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.poster:hover .poster-frame img { transform: scale(1.05); }
.poster-badge { position: absolute; top: 10px; left: 10px; padding: 3px 9px; border-radius: 999px; background: linear-gradient(135deg, var(--violet), var(--indigo)); font-size: 12px; font-weight: 700; }
.poster-title { display: block; margin-top: 12px; font-weight: 700; line-height: 1.3; }
.poster-meta { display: block; margin-top: 2px; color: var(--faint); font-size: 14px; }

.poster-row {
    display: grid; grid-auto-flow: column; grid-auto-columns: clamp(148px, 16vw, 210px); gap: 18px;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 8px;
}
.poster-row::-webkit-scrollbar { display: none; }
.poster-row .poster { scroll-snap-align: start; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.chip { padding: 9px 18px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, 0.04); color: var(--muted); font-weight: 600; font-size: 15px; cursor: pointer; transition: all 0.15s ease; }
.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.3); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--ink); }
.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 42vw), 1fr)); gap: 28px 18px; }
.poster-grid .poster[hidden] { display: none; }

/* Download band */
.app-band {
    position: relative; overflow: hidden;
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 48px;
    margin: 72px var(--gutter) 0; padding: clamp(32px, 6vw, 72px);
    border-radius: 32px;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(139, 61, 255, 0.55), transparent 55%),
        radial-gradient(90% 120% at 0% 100%, rgba(79, 70, 229, 0.45), transparent 60%),
        var(--night);
    border: 1px solid var(--line);
}
.app-copy h2 { font-size: clamp(44px, 6vw, 80px); max-width: 9em; }
.app-copy > p { max-width: 32em; margin: 18px 0 0; color: var(--muted); }
.app-points { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; max-width: 34em; }
.app-points li { position: relative; padding-left: 30px; color: var(--muted); }
.app-points li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--violet) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.app-points strong { color: var(--text); }
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.store {
    display: inline-flex; align-items: center; gap: 12px;
    min-width: 190px; padding: 10px 20px 10px 16px;
    border-radius: 14px; background: #000; border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff; text-decoration: none; font-weight: 700; font-size: 19px; line-height: 1.1;
}
.store svg { width: 28px; height: 28px; fill: currentColor; flex: none; }
.store small { display: block; font-size: 11px; font-weight: 500; opacity: 0.8; }
.store[href]:hover { border-color: #fff; }
.store[aria-disabled="true"] { opacity: 0.55; cursor: default; }
.stores-note { margin: 14px 0 0; color: var(--faint); font-size: 14px; }

.phone {
    width: 270px; aspect-ratio: 9 / 19.2; padding: 10px;
    border-radius: 46px; background: #1b1530;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12), 0 40px 80px -20px rgba(0, 0, 0, 0.7);
    transform: rotate(4deg);
}
.phone-screen { position: relative; height: 100%; border-radius: 37px; overflow: hidden; background: var(--surface); }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; }
.phone-ui { position: absolute; inset: auto 0 0; padding: 60px 18px 26px; background: linear-gradient(transparent, rgba(7, 2, 26, 0.95)); display: grid; gap: 4px; }
.phone-title { font: 800 22px/1 var(--display); text-transform: uppercase; }
.phone-episode { color: var(--muted); font-size: 12px; font-weight: 600; }
.phone-bar { height: 3px; margin-top: 10px; border-radius: 3px; background: rgba(255, 255, 255, 0.25); overflow: hidden; }
.phone-bar span { display: block; width: 38%; height: 100%; background: var(--violet); }

/* Membership */
.membership { text-align: center; padding-bottom: 40px; }
.membership .section-head { flex-direction: column; align-items: center; }
.plans { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; max-width: 900px; margin: 8px auto 32px; padding: 0; }
.plan { display: grid; gap: 4px; padding: 24px 18px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255, 255, 255, 0.03); }
.plan-name { color: var(--muted); font-weight: 600; }
.plan-price { font: 800 44px/1 var(--display); }
.plan-days { color: var(--faint); font-size: 14px; }

/* Footer */
.footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 48px; padding: 28px var(--gutter) 36px; border-top: 1px solid var(--line); color: var(--faint); font-size: 14px; }
.footer p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* Terms and privacy */
.legal { width: min(100%, 760px); margin: 0 auto; padding: 128px 20px 24px; }
.legal h1 { font-size: clamp(48px, 8vw, 84px); }
.legal-updated { margin: 14px 0 40px; color: var(--faint); }
.legal h2 { margin: 44px 0 12px; font-family: var(--body); font-size: 21px; font-weight: 700; line-height: 1.3; letter-spacing: 0; text-transform: none; }
.legal p, .legal li { color: rgba(247, 244, 255, 0.84); }
.legal ul { padding-left: 22px; }
.legal li + li { margin-top: 6px; }
.legal a { color: #c4a6ff; }
.legal strong { color: var(--text); }

/* Drama sheet */
.sheet {
    width: min(760px, calc(100% - 32px)); max-height: calc(100% - 48px);
    padding: 0; border: 1px solid var(--line); border-radius: 26px;
    background: var(--night); color: var(--text);
}
.sheet::backdrop { background: rgba(7, 2, 26, 0.72); backdrop-filter: blur(6px); }
.sheet[open] { animation: sheet-in 0.25s ease both; }
.sheet-body { display: grid; grid-template-columns: 240px 1fr; gap: 28px; padding: 28px; }
.sheet-poster { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 16px; background: var(--surface); }
.sheet-copy h2 { font-size: 46px; padding-right: 36px; }
.sheet-meta { margin: 12px 0 0; color: var(--muted); font-weight: 600; font-size: 15px; }
.sheet-synopsis { margin: 16px 0 26px; color: rgba(247, 244, 255, 0.86); white-space: pre-line; }
.sheet-note { margin: 12px 0 0; color: var(--faint); font-size: 13px; }
.sheet-close { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.08); cursor: pointer; }
.sheet-close svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; fill: none; }

@keyframes slide-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes drift { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes progress { to { transform: scaleX(1); } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(16px); } }

/* Tablets and phones */
@media (max-width: 860px) {
    .nav { gap: 16px; }
    .nav-links { display: none; }
    .nav .button-small { margin-left: auto; }
    .hero { min-height: 0; }
    .hero-slide { position: relative; inset: auto; }
    .hero-slide[hidden] { display: none; }
    .hero-art { width: 100%; height: min(68vh, 540px); -webkit-mask-image: linear-gradient(0deg, transparent 0%, #000 45%); mask-image: linear-gradient(0deg, transparent 0%, #000 45%); }
    .hero-wash::after { background: linear-gradient(180deg, transparent 30%, var(--ink) 85%); }
    .hero-art-wide { object-position: center 20%; -webkit-mask-image: linear-gradient(0deg, transparent 0%, #000 45%); mask-image: linear-gradient(0deg, transparent 0%, #000 45%); }
    .hero-scrim { display: none; }
    .hero-copy { padding-top: min(58vh, 480px); }
    .hero-kicker { letter-spacing: 0.3em; font-size: 12px; }
    .hero-rail { padding-top: 32px; }
    .rail { overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; }
    .rail::-webkit-scrollbar { display: none; }
    .rail-item { width: 108px; }
    .rail-title { font-size: 14px; }
    .app-band { grid-template-columns: 1fr; margin-inline: 0; border-radius: 0; border-inline: 0; }
    .phone { display: none; }
    .sheet-body { grid-template-columns: 1fr; padding: 20px; }
    .sheet-poster { width: 46%; }
    .sheet-copy h2 { font-size: 38px; }
}

@media (max-width: 480px) {
    .hero-actions .button { flex: 1 1 100%; }
    .store { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
