/* =====================================================================================================================
   LL-UI: the shared pieces of the site's new pages (2026-10-03). Code/ui/README.md is the contract.
   Hayden, 2026-10-03: "Build the site. build LustLit into the porn site of the future. Sleek, supreme, modern,
   futuristic." Crunchyroll's LAYOUT (a hero carousel, rows, tiles), LustLit's LOOK (design-system.md).

   One owner (the video session); the home page (the Read/Watch session) and the Series pages use the same file, so the
   two read as one site. Everything here is .llui-*; page-specific styles live in the page's own file (.llh-*, .lls-*).

   THE RULES IT KEEPS (design-system.md, site-art.md):
   - dark; #ef4444 is the accent and the only red type; #c41e3a only as a fill; every number white;
   - a glow is filter: drop-shadow(), never box-shadow;
   - every picture is shown WHOLE, in a box of its own shape (--ar = width / height). Nothing scales a picture (a zoom
     crops its corners, the watermark's included): a hover LIFTS the tile and draws the seam instead. Nothing is
     ever put over a picture's bottom-right corner (badges sit bottom-left);
   - no eyebrow over a title: pills go UNDER it;
   - reduced motion: no slides, no springs, no autoplay; fades of 150 ms or less.
   ================================================================================================================== */

/* THE SHARED TOKENS (--ll-ease-settle, --ll-dur, --ll-glass-*, --ll-radius-*, --ll-title-over-art, ...) live in head.css,
   LIVE on every page since 2026-10-03 13:50 (the Read/Watch session's). A page outside the theme (demo.html) carries its
   own copy of that block. */

/* LL-UI's own */
:root {
    --llui-accent: #ef4444;
    --llui-fill: #c41e3a;
    --llui-fill-hover: #d42d4a;
    --llui-page-bg: var(--ll-black, #0a0a0a);
    --llui-bar: var(--header-height, 56px);
    --llui-interval: 8s;
}
/* the gutter lines up with the bar's logo at every width: the bar pads 16px under 1024px and 2rem from 1024px (its
   .header-inner, max 1200px). Measured by the Read/Watch session: without the 1024 rule the rows sat 16px outside the
   logo from 1024 to 1199px. */
:root { --llui-gutter: 16px; }
@media (min-width: 1024px) { :root { --llui-gutter: max(2rem, calc((100vw - var(--container-max, 1200px)) / 2 + 2rem)); } }

/* ---- CROSS-PAGE MORPHS (proof first; site-wide only on his go) --------------------------------------------------- */
@view-transition { navigation: auto; }
.site-header { view-transition-name: ll-head; }                     /* the bar never flashes (head.css takes this over) */
::view-transition-group(*) { animation-duration: 380ms; animation-timing-function: var(--ll-ease-settle); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--ll-dur); }
@media (prefers-reduced-motion: reduce) {
    ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---- BUTTONS, PILLS, CAST ------------------------------------------------------------------------------------------ */
.llui-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.llui-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 26px;
    border-radius: 4px; border: 1px solid transparent; font: 700 .875rem/1 var(--font-body, 'Plus Jakarta Sans', sans-serif);
    letter-spacing: .05em; text-transform: uppercase; color: #fff; text-decoration: none; cursor: pointer;
    transition: background-color var(--ll-dur-fast) ease, border-color var(--ll-dur-fast) ease, transform var(--ll-dur-fast) ease, filter var(--ll-dur) ease;
}
.llui-btn svg { width: 16px; height: 16px; flex: none; }
.llui-btn--primary { background: var(--llui-fill); }
.llui-btn--primary:hover { background: var(--llui-fill-hover); color: #fff; transform: translateY(-1px); filter: drop-shadow(0 0 14px rgba(239, 68, 68, .45)); }
.llui-btn--glass { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); -webkit-backdrop-filter: var(--ll-glass-filter); backdrop-filter: var(--ll-glass-filter); }
.llui-btn--glass:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .4); color: #fff; }
.llui-iconbtn {
    display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; padding: 0; color: #fff; cursor: pointer;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22);
    -webkit-backdrop-filter: var(--ll-glass-filter); backdrop-filter: var(--ll-glass-filter);
    transition: background-color var(--ll-dur-fast) ease, border-color var(--ll-dur-fast) ease;
}
.llui-iconbtn:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .45); }
.llui-iconbtn svg { width: 20px; height: 20px; }
.llui-iconbtn[aria-pressed="true"] { border-color: rgba(239, 68, 68, .75); color: #fff; }
.llui-btn:focus-visible, .llui-iconbtn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.llui-pills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.llui-pill {
    display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: var(--ll-radius-pill);
    font: 600 .75rem/1 var(--font-body, sans-serif); letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .86);
    background: rgba(255, 255, 255, .08); border: 1px solid var(--ll-hairline);
}
.llui-pill b { color: #fff; font-weight: 800; }
.llui-cast { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; margin: 0; padding: 0; font: 600 .9375rem/1.3 var(--font-body, sans-serif); color: #fff; }
.llui-cast li { display: inline-flex; align-items: center; gap: 8px; }
.llui-cast li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c, #ef4444); filter: drop-shadow(0 0 5px var(--c, #ef4444)); }
.llui-cast a { color: inherit; text-decoration: none; }
.llui-cast a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- THE SEAM AS PROGRESS: a solid #ef4444 body, fading only at its leading edge, glowing by drop-shadow ---------- */
.llui-seam { position: relative; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .14); overflow: visible; }
.llui-seam > i {
    position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p, 0) * 100%); border-radius: 2px;
    background: linear-gradient(90deg, #ef4444 0, #ef4444 calc(100% - 10px), rgba(239, 68, 68, .35) 100%);
    filter: drop-shadow(0 0 4px rgba(239, 68, 68, .85));
}

/* =====================================================================================================================
   THE HERO CAROUSEL
   ================================================================================================================== */
.llui-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--llui-page-bg); color: #fff;
    touch-action: pan-y pinch-zoom; }   /* a sideways swipe is the carousel's (auto let the browser cancel it); upright scrolls, pinch zooms */
.llui-hero__glow { position: absolute; inset: -12% -6% auto -6%; height: 125%; z-index: -1; pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 52%, transparent 100%); mask-image: linear-gradient(to bottom, #000 0, #000 52%, transparent 100%); }
.llui-hero__glow img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0;
    filter: blur(80px) saturate(1.45); transform: scale(1.25); transition: opacity 900ms var(--ll-ease-settle); }
.llui-hero__glow img.is-on { opacity: .55; }
.llui-hero__glow::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 0%, rgba(10, 10, 10, .15), rgba(10, 10, 10, .55) 70%); }
.llui-hero__track { display: grid; align-items: start; transition: height 600ms var(--ll-ease-settle); }  /* ll-ui.js sets its height to the shown slide's */
.llui-slide { grid-area: 1 / 1; align-self: start; position: relative; opacity: 0; visibility: hidden; transition: opacity 700ms var(--ll-ease-settle), visibility 0s linear 700ms; }
.llui-slide.is-on { opacity: 1; visibility: visible; transition: opacity 700ms var(--ll-ease-settle), visibility 0s; z-index: 1; }
.llui-slide__art { display: block; position: relative; overflow: hidden; color: inherit; }
.llui-slide__art img, .llui-slide__art video { display: block; width: 100%; height: 100%; object-fit: cover; }
.llui-slide__art video { position: absolute; inset: 0; opacity: 0; transition: opacity 600ms var(--ll-ease-settle); }
.llui-slide__art video.is-playing { opacity: 1; }
.llui-slide__body { position: relative; z-index: 2; }
.llui-slide__title { margin: 0; font: 800 clamp(2.4rem, 4.6vw, 4.5rem)/.98 var(--font-heading, 'Plus Jakarta Sans', sans-serif); letter-spacing: -.035em; color: #fff; text-wrap: balance; }
.llui-slide__title a { color: inherit; text-decoration: none; }
.llui-slide__line { margin: 0; max-width: 46ch; font: 400 clamp(1rem, 1.25vw, 1.1875rem)/1.6 var(--font-body, sans-serif); color: rgba(255, 255, 255, .84); }
.llui-slide__body > * + * { margin-top: 18px; }
.llui-slide__body .llui-actions { margin-top: 26px; }
/* the words arrive a beat after the picture */
.llui-slide__body > * { transition: opacity 600ms var(--ll-ease-settle), transform 700ms var(--ll-ease-settle); }
.llui-slide:not(.is-on) .llui-slide__body > * { opacity: 0; transform: translateY(14px); }
.llui-slide.is-on .llui-slide__body > :nth-child(2) { transition-delay: 70ms; }
.llui-slide.is-on .llui-slide__body > :nth-child(3) { transition-delay: 140ms; }
.llui-slide.is-on .llui-slide__body > :nth-child(4) { transition-delay: 210ms; }
.llui-slide.is-on .llui-slide__body > :nth-child(5) { transition-delay: 280ms; }

/* BLEED (16:9 key art, --ar >= 1.2): the picture fills the slide, whole (the slide takes its shape), the words over its
   left side. Its foot fades into the page and its left into the words; never its right side. */
.llui-slide--bleed .llui-slide__art { width: min(100%, calc(100svh * var(--ar))); aspect-ratio: var(--ar); margin-inline: auto; }
.llui-slide--bleed .llui-slide__shade { position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background:
        linear-gradient(90deg, rgba(10, 10, 10, .9) 0%, rgba(10, 10, 10, .74) 26%, rgba(10, 10, 10, .2) 52%, transparent 66%),
        linear-gradient(0deg, var(--llui-page-bg) 0%, rgba(10, 10, 10, .55) 12%, transparent 30%),
        linear-gradient(180deg, rgba(10, 10, 10, .6) 0%, transparent calc(var(--llui-bar) * 2.2)); }
.llui-slide--bleed .llui-slide__body { position: absolute; left: var(--llui-gutter); bottom: clamp(56px, 9vw, 120px); width: min(46%, 640px); }
.llui-slide--bleed .llui-slide__title { font-size: var(--ll-title-over-art); text-shadow: var(--ll-art-text-shadow); }
.llui-slide--bleed .llui-slide__line { text-shadow: 0 1px 12px rgba(0, 0, 0, .6); }

/* PANEL (portrait art: a cover, a story's picture, a poster): the words on the left, the picture whole as a framed panel
   on the right, the glow of that same picture behind both. */
.llui-slide--panel { --llui-panel-h: clamp(420px, 72svh, 760px);
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(24px, 4vw, 64px);
    padding: calc(var(--llui-bar) + clamp(24px, 4vw, 48px)) var(--llui-gutter) clamp(48px, 6vw, 80px); }
.llui-slide--panel .llui-slide__art { order: 2; height: var(--llui-panel-h); aspect-ratio: var(--ar); width: auto;
    border-radius: var(--ll-radius-card); outline: 1px solid rgba(255, 255, 255, .12); outline-offset: -1px;
    filter: drop-shadow(0 24px 48px rgba(0, 0, 0, .55)); }
.llui-slide--panel .llui-slide__body { order: 1; max-width: 620px; }

/* THE CONTROLS: pause first (WCAG 2.2.2), then one seam per slide; the lit one fills as its time runs */
.llui-hero__ctrl { position: absolute; z-index: 3; right: var(--llui-gutter); bottom: clamp(20px, 3vw, 40px); display: flex; align-items: center; gap: 14px; }
.llui-hero__pause { width: 34px; height: 34px; }
.llui-hero__pause svg { width: 14px; height: 14px; }
.llui-hero__pause .llui-i-play { display: none; }
.llui-hero.is-paused .llui-hero__pause .llui-i-play { display: block; }
.llui-hero.is-paused .llui-hero__pause .llui-i-pause { display: none; }
.llui-hero__seams { display: flex; gap: 6px; }
.llui-hero__seam { position: relative; width: 40px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; }
.llui-hero__seam::before, .llui-hero__seam::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 2px; }
.llui-hero__seam::before { background: rgba(255, 255, 255, .28); }
.llui-hero__seam::after { background: linear-gradient(90deg, #ef4444 0, #ef4444 calc(100% - 8px), rgba(239, 68, 68, .4) 100%);
    filter: drop-shadow(0 0 4px rgba(239, 68, 68, .85)); transform: scaleX(0); transform-origin: left; }
.llui-hero__seam[aria-selected="true"].is-run::after { animation: llui-fill var(--llui-interval) linear forwards; }
.llui-hero.is-paused .llui-hero__seam[aria-selected="true"]::after,
.llui-hero.is-held .llui-hero__seam[aria-selected="true"]::after { animation-play-state: paused; }
.llui-hero__seam:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 3px; }
@keyframes llui-fill { to { transform: scaleX(1); } }
.llui-hero__arrow { position: absolute; z-index: 3; top: 50%; transform: translateY(-50%); opacity: 0; transition: opacity var(--ll-dur) ease; }
.llui-hero__arrow--prev { left: 12px; }
.llui-hero__arrow--next { right: 12px; }
@media (hover: hover) and (pointer: fine) { .llui-hero:hover .llui-hero__arrow { opacity: 1; } }
.llui-hero__arrow:focus-visible { opacity: 1; }

/* PHONES AND UPRIGHT TABLETS: the picture whole on top, the words under it, never over it */
@media (max-width: 699px) {
    .llui-slide--bleed .llui-slide__art { width: 100%; }
    .llui-slide--bleed .llui-slide__shade { background: linear-gradient(180deg, rgba(10, 10, 10, .55) 0%, transparent calc(var(--llui-bar) * 1.6)); }
    .llui-slide--bleed .llui-slide__body { position: relative; left: auto; bottom: auto; width: auto; padding: 22px var(--llui-gutter) 0; }
    .llui-slide--bleed .llui-slide__title { font-size: clamp(2.1rem, 9vw, 2.8rem); text-shadow: none; }
    .llui-slide--panel { display: block; padding: calc(var(--llui-bar) + 16px) var(--llui-gutter) 0; }
    .llui-slide--panel .llui-slide__art { width: min(100%, calc(52svh * var(--ar))); height: auto; margin: 0 auto 22px; }
    .llui-hero__ctrl { position: relative; right: auto; bottom: auto; padding: 22px var(--llui-gutter) 8px; }
    .llui-hero__arrow { display: none; }
}

/* =====================================================================================================================
   ROWS AND TILES: one row for every shape; each tile carries its picture's own --ar and shows it whole
   ================================================================================================================== */
.llui-row { --llui-row-h: clamp(220px, 23vw, 340px); position: relative; margin: clamp(28px, 4vw, 52px) 0; }
.llui-row--wide { --llui-row-h: clamp(132px, 12.5vw, 196px); }
.llui-row--short { --llui-row-h: clamp(170px, 17vw, 250px); }
.llui-row__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 0 var(--llui-gutter); margin-bottom: 14px; }
.llui-row__title { margin: 0; font: 700 clamp(1.15rem, 1.6vw, 1.45rem)/1.2 var(--font-heading, sans-serif); letter-spacing: -.01em; color: #fff; }
.llui-row__more { display: inline-flex; align-items: center; gap: 6px; font: 600 .8125rem/1 var(--font-body, sans-serif); letter-spacing: .06em; text-transform: uppercase; color: var(--llui-accent); text-decoration: none; white-space: nowrap; }
.llui-row__more svg { width: 7px; height: 12px; }
.llui-row__more:hover { color: #fff; }
.llui-row__viewport { position: relative; }
.llui-row__rail { display: flex; gap: clamp(12px, 1.2vw, 18px); margin: 0; padding: 4px var(--llui-gutter) 18px; list-style: none;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--llui-gutter);
    scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.llui-row__rail::-webkit-scrollbar { display: none; }
.llui-row__item { flex: none; scroll-snap-align: start; }
.llui-row__btn { position: absolute; z-index: 2; top: calc(4px + var(--llui-row-h) / 2); transform: translateY(-50%); opacity: 0; transition: opacity var(--ll-dur) ease; }
.llui-row__btn--prev { left: max(8px, calc(var(--llui-gutter) - 60px)); }
.llui-row__btn--next { right: max(8px, calc(var(--llui-gutter) - 60px)); }
.llui-row__btn[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) { .llui-row:hover .llui-row__btn { opacity: 1; } }
.llui-row__btn:focus-visible { opacity: 1; }
@media (hover: none), (pointer: coarse) { .llui-row__btn { display: none; } }

.llui-tile { position: relative; display: flex; flex-direction: column; width: calc(var(--llui-row-h) * var(--ar, .6667)); color: inherit; text-decoration: none;
    transition: transform var(--ll-dur) var(--ll-ease-settle); }
.llui-tile__pic { position: relative; display: block; height: var(--llui-row-h); aspect-ratio: var(--ar, .6667); overflow: hidden;
    border-radius: var(--ll-radius-poster); background: #141416; outline: 1px solid var(--ll-hairline); outline-offset: -1px; }
.llui-row--wide .llui-tile__pic { border-radius: var(--ll-radius-tile); }
.llui-tile__pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: filter var(--ll-dur) ease; }
.llui-tile__pic video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 300ms var(--ll-ease-settle); }
.llui-tile.is-playing .llui-tile__pic video { opacity: 1; }
.llui-tile__badge { position: absolute; left: 8px; bottom: 8px; z-index: 1; padding: 4px 7px; border-radius: 4px; background: rgba(0, 0, 0, .74);
    font: 700 .75rem/1 var(--font-body, sans-serif); color: #fff; letter-spacing: .02em; }
.llui-tile__flag { position: absolute; left: 8px; top: 8px; z-index: 1; padding: 5px 8px; border-radius: 4px; background: rgba(0, 0, 0, .74);
    border: 1px solid rgba(239, 68, 68, .6); font: 700 .6875rem/1 var(--font-body, sans-serif); letter-spacing: .08em; text-transform: uppercase; color: #fff; }
/* the seam under the picture: lit on hover and focus; a watched share (--p) stays lit */
.llui-tile::before, .llui-tile__seam { content: ""; position: absolute; left: 0; top: calc(var(--llui-row-h) + 6px); height: 2px; border-radius: 2px; }
.llui-tile::before { right: 0; background: #ef4444; filter: drop-shadow(0 0 4px rgba(239, 68, 68, .85)); transform: scaleX(0); transform-origin: left;
    transition: transform 320ms var(--ll-ease-settle); z-index: 1; }
.llui-tile__seam { width: calc(var(--p, 0) * 100%); background: #ef4444; filter: drop-shadow(0 0 3px rgba(239, 68, 68, .7)); }
.llui-tile__seam::after { content: ""; position: absolute; left: 0; top: 0; height: 2px; width: calc(100% / max(var(--p, 1), .01)); background: rgba(255, 255, 255, .14); z-index: -1; }
.llui-tile__text { display: block; padding-top: 16px; min-width: 0; }
.llui-tile__kicker { display: flex; align-items: center; gap: 7px; font: 700 .6875rem/1.2 var(--font-body, sans-serif); letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .62); }
.llui-tile[style*="--c"] .llui-tile__kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.llui-tile__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 5px;
    font: 700 .9375rem/1.3 var(--font-heading, sans-serif); letter-spacing: -.01em; color: #fff; }
.llui-tile__line { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 5px;
    font: 400 .8125rem/1.45 var(--font-body, sans-serif); color: rgba(255, 255, 255, .6); }
.llui-tile__meta { display: block; margin-top: 6px; font: 600 .75rem/1.3 var(--font-body, sans-serif); color: rgba(255, 255, 255, .5); }
.llui-tile__meta b { color: #fff; font-weight: 700; }
.llui-tile:focus-visible { outline: none; }
.llui-tile:focus-visible .llui-tile__pic { outline: 2px solid #fff; outline-offset: 3px; }
.llui-tile:focus-visible::before { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) {
    .llui-tile:hover { transform: translateY(-4px); }
    .llui-tile:hover::before { transform: scaleX(1); }
    .llui-tile:hover .llui-tile__pic img { filter: brightness(1.06); }
}
/* her cut-out standing on her colour */
.llui-tile--cut .llui-tile__pic { background:
    radial-gradient(110% 70% at 50% 100%, color-mix(in srgb, var(--c, #ef4444) 62%, #0b0b0c) 0%, color-mix(in srgb, var(--c, #ef4444) 22%, #0b0b0c) 52%, #0d0d0f 100%); }
.llui-tile--cut .llui-tile__pic img { object-fit: contain; object-position: 50% 100%; }

@media (max-width: 699px) {
    .llui-row { --llui-row-h: 54vw; }
    .llui-row--wide { --llui-row-h: 40vw; }
    .llui-row--short { --llui-row-h: 44vw; }
}

/* ---- REDUCED MOTION: nothing slides, lifts, springs or sweeps --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .llui-slide, .llui-slide.is-on, .llui-slide__body > *, .llui-hero__glow img { transition-duration: 150ms !important; transition-delay: 0s !important; }
    .llui-slide:not(.is-on) .llui-slide__body > * { transform: none; }
    .llui-tile, .llui-tile::before { transition: none !important; }
    .llui-tile:hover { transform: none !important; }
    .llui-hero__seam[aria-selected="true"]::after { animation: none; transform: scaleX(1); }
    .llui-row__rail { scroll-behavior: auto; }
}
