/* ============================================================================================================
   THE HEAD: READ and WATCH (2026-10-03). The site's menu, its four ways in condensed into two doors.
   Source of truth: Code/head/assets/css/head.css → the theme's assets/css/head.css. Manual: Code/head/README.md.
   Printed by header.php AFTER wp_head(), so it follows style.css and wins at equal specificity. Every rule is scoped
   to the new markup (.ll-head, .ll-sheet, .ll-door, .ll-room, .ll-head-scrim): if head-doors.php ever falls back to
   the plain menu, nothing here touches it.
   The design system holds (design-system.md): dark; #ef4444 the accent, never blood red as type; every number white;
   the neon seam's glow is drop-shadow, never box-shadow; Plus Jakarta Sans, display at 800 / -0.035em; drawn icons.
   ============================================================================================================ */

/* ---- THE SHARED TOKENS (2026-10-03): one language for READ, WATCH and the home page ------------------------------
   Defined once, here, because head.css loads after style.css on every page. Agreed with the video session (WATCH,
   Code/ui/); design-system.md §8 lists them. Changes come through this file's owner (the head). */
:root {
    --ll-ease-settle: cubic-bezier(0.2, 0.8, 0.2, 1);     /* an arrival that parks: UI settling */
    --ll-ease-handoff: cubic-bezier(0.3, 0.7, 0.4, 0.94); /* a hand-off that must still be moving (design-system §6) */
    --ll-dur: 240ms;
    --ll-dur-fast: 150ms;
    --ll-glass-bg: rgba(11, 11, 12, 0.55);                /* over art only, never a tier card; never inside the header */
    --ll-glass-filter: blur(20px) saturate(1.3);
    --ll-hairline: rgba(255, 255, 255, 0.08);
    --ll-radius-poster: 8px;
    --ll-radius-tile: var(--tile-radius);                 /* 6px: 16:9 tiles */
    --ll-radius-card: 12px;
    --ll-radius-pill: 999px;
    --ll-title-over-art: clamp(2.6rem, 6vw, 5.5rem);
    --ll-art-text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
    --ll-panel-bg: #0b0b0c;
}

/* ---- THE BAR OVER A HERO (2026-10-03) -------------------------------------------------------------------------------
   A page whose hero runs under the bar puts `ll-over-hero` on <body> and `data-ll-hero` on the hero. While the page
   sits at its top, the bar is see-through over the hero's art, with a soft shade so the words stay legible over bright
   art; the moment the page scrolls (head.js adds `ll-hero-passed`), it is the bar every page has, so nothing of the
   hero passes under a see-through bar. An open door or the phone menu makes it solid at once. Without head.js (no
   `ll-hero-js`) the bar never goes see-through. */
body.ll-over-hero.ll-hero-js .site-header {
    transition: background-color var(--ll-dur) var(--ll-ease-settle), border-color var(--ll-dur) var(--ll-ease-settle);
}
body.ll-over-hero.ll-hero-js:not(.ll-hero-passed):not(.ll-menu-open) .site-header {
    background-color: transparent;
    border-bottom-color: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
body.ll-over-hero.ll-hero-js .site-header::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 160%;
    z-index: -1;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--ll-dur) var(--ll-ease-settle);
}
body.ll-over-hero.ll-hero-js:not(.ll-hero-passed):not(.ll-menu-open) .site-header::before { opacity: 1; }

/* ---- THE BAR (1024 px and up): the doors sit in the same row as every other item ------------------------------ */

/* A door with rooms is a button that looks exactly like its neighbours: the same type, the same 32.25 px box
   (display + line-height 1.25 + padding .5rem, the alignment rule in neon-seam.md), so every underline lands on
   one pixel row. */
.nav-desktop .ll-door__btn {
    display: flex;
    align-items: center;
    gap: 0.45em;
    margin: 0;
    padding: var(--space-sm) 0;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.25;
    color: var(--ll-gray-200);
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color var(--transition-fast);
}
.nav-desktop .ll-door__chev {
    width: 9px;
    height: 6px;
    flex: none;
    transition: transform var(--transition-normal);
}
.nav-desktop .ll-door__btn[aria-expanded="true"] .ll-door__chev { transform: rotate(180deg); }

/* The seam under it: the nav's own underline, drawn left to right. It stays drawn while the door is open and on
   the pages behind it (the door you are in). */
.nav-desktop .ll-door__btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--ll-neon-line);
    filter: var(--ll-neon-glow);
    transition: width var(--transition-normal);
}
.nav-desktop .ll-door__btn:hover,
.nav-desktop .ll-door__btn[aria-expanded="true"],
.nav-desktop .ll-door.is-on > .ll-door__btn,
.nav-desktop.ll-head > ul > li > a[aria-current="page"] { color: var(--ll-white); }
.nav-desktop .ll-door__btn:hover::after,
.nav-desktop .ll-door__btn[aria-expanded="true"]::after,
.nav-desktop .ll-door.is-on > .ll-door__btn::after,
.nav-desktop.ll-head > ul > li > a[aria-current="page"]::after { width: 100%; }

.nav-desktop .ll-door__btn:focus-visible,
.nav-desktop.ll-head > ul > li > a:focus-visible {
    outline: 2px solid var(--ll-neon-core);
    outline-offset: 4px;
    border-radius: 2px;
}

/* ---- THE PANEL: under the bar, the width of the screen ------------------------------------------------------------
   It hangs from .site-header (fixed, with a backdrop-filter: the containing block of everything inside it). Opaque on
   purpose: a backdrop-filter inside another one can only blur what the header holds, never the page under it. Closed
   it is display:none, so its pictures are never fetched; head.js draws them when the door opens. */
.nav-desktop .ll-door__panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 1.5rem 2rem 1.75rem;
    background: #0b0b0c;
    border-top: 1px solid var(--ll-dark-border);
    border-bottom: 1px solid var(--ll-dark-border);
    cursor: default;
}
.nav-desktop.ll-head-js .ll-door.is-open > .ll-door__panel,
.nav-desktop.ll-head:not(.ll-head-js) .ll-door:hover > .ll-door__panel,
.nav-desktop.ll-head:not(.ll-head-js) .ll-door:focus-within > .ll-door__panel {
    display: block;
    animation: ll-door-in var(--ll-dur) var(--ll-ease-settle);
}
@keyframes ll-door-in {
    from { opacity: 0; transform: translateY(-6px); }
}

.nav-desktop .ll-door__rooms {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 1.25rem;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0;
    list-style: none;
}
.nav-desktop .ll-door__rooms > li {
    flex: 0 1 470px;
    min-width: 0;
}

/* The page under an open door dims; a click on it closes the door. head.js adds it to <body>. */
.ll-head-scrim {
    position: fixed;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 998;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 200ms ease, visibility 0s linear 200ms;
}
.ll-head-scrim.is-on {
    opacity: 1;
    visibility: visible;
    transition: opacity 200ms ease, visibility 0s;
}

/* ---- A ROOM: its picture whole, its name, its line, its small line ------------------------------------------------
   Shared by the panel and the phone menu. Every reset below beats .nav-desktop a / .nav-mobile a (0,1,1) at (0,2,0). */
.ll-head .ll-room,
.ll-sheet .ll-room {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    height: 100%;
    padding: 0.875rem 1.5rem 0.875rem 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: #0d090b;
    color: var(--ll-white);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    line-height: 1.4;
    text-decoration: none;
    position: relative;
    transition: border-color var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}
.ll-head .ll-room::after { content: none; }
.ll-head a.ll-room:hover,
.ll-sheet a.ll-room:hover,
.ll-head .ll-room.is-on,
.ll-sheet .ll-room.is-on { border-color: rgba(255, 255, 255, 0.2); color: var(--ll-white); }
.ll-head a.ll-room:focus-visible,
.ll-sheet a.ll-room:focus-visible {
    outline: 2px solid var(--ll-neon-core);
    outline-offset: 2px;
}

/* The picture is shown WHOLE, in a box of its own shape (site-art.md: the watermark corner is never cropped or
   covered). --ar is the picture's width / height, from head-doors.php. */
.ll-room__pic {
    flex: none;
    position: relative;
    display: block;
    height: 168px;
    aspect-ratio: var(--ar, 0.75);
    border-radius: 6px;
    overflow: hidden;
    background: #111;
}
.ll-room__pic img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 240ms ease;
}
.ll-room__pic img.is-in { opacity: 1; }
/* No picture yet (a room with nothing published, or a plugin that failed): a black card and the seam. Never a woman,
   never a promise. */
.ll-room__pic--set {
    aspect-ratio: 0.75;
    background: #0d090b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ll-room__seam {
    display: block;
    width: 58%;
    height: 2px;
    background: var(--ll-neon-line);
    filter: var(--ll-neon-glow);
}

.ll-room__text {
    display: block;
    min-width: 0;
}
.ll-room__name {
    display: inline-block;
    position: relative;
    padding-bottom: 0.4rem;
    font-size: 1.625rem;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.1;
    color: var(--ll-white);
}
.ll-room__name::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--ll-neon-line);
    filter: var(--ll-neon-glow);
    transition: width var(--transition-normal);
}
a.ll-room:hover .ll-room__name::after,
a.ll-room:focus-visible .ll-room__name::after,
.ll-room.is-on .ll-room__name::after { width: 100%; }
.ll-room__line {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.72);
}
.ll-room__meta {
    display: block;
    margin-top: 0.6rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ll-gray-300);
}
.ll-room__meta b {
    font-weight: 700;
    color: var(--ll-white);
}
/* A LANDSCAPE ROOM (a series' 16:9 art): its card is wider in the panel, and its stand-in is 16:9 too. */
.ll-room--wide .ll-room__pic--set { aspect-ratio: 16 / 9; }
.nav-desktop .ll-door__rooms > li.is-wide { flex-basis: 640px; }

.ll-room.is-sample { border-style: dashed; }
.ll-room__sample { color: var(--ll-neon-core); }

/* ---- THE PHONE MENU (under 1024 px): the same sheet main.js slides in, now each door over its rooms -------------- */
.nav-mobile.ll-sheet {
    display: block;
    padding: 1.5rem 1.25rem calc(2.5rem + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.ll-sheet__door,
.ll-sheet__more {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}
.ll-sheet__door + .ll-sheet__door { margin-top: 1.75rem; }
.ll-sheet__name {
    margin: 0 0 0.875rem;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.1;
    color: var(--ll-white);
}
.ll-sheet__name::after {
    content: '';
    display: block;
    width: 52px;
    height: 2px;
    margin-top: 0.6rem;
    background: var(--ll-neon-line);
    filter: var(--ll-neon-glow);
}
.ll-sheet__rooms {
    display: grid;
    gap: 0.625rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.ll-sheet .ll-room {
    gap: 1rem;
    padding: 0.625rem 1rem 0.625rem 0.625rem;
}
.ll-sheet .ll-room__pic { height: 96px; }
.ll-sheet .ll-room__name { font-size: 1.25rem; padding-bottom: 0.3rem; }
.ll-sheet .ll-room__line { font-size: 0.875rem; line-height: 1.45; margin-top: 0.25rem; }
.ll-sheet .ll-room__meta { margin-top: 0.4rem; }
.ll-room__go {
    flex: none;
    margin-left: auto;
    color: rgba(255, 255, 255, 0.4);
    transition: color var(--transition-fast), transform var(--transition-fast);
}
a.ll-room:hover .ll-room__go,
a.ll-room:focus-visible .ll-room__go { color: var(--ll-white); transform: translateX(2px); }

.ll-sheet__more {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1.25rem;
    margin-top: 2rem;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--ll-dark-border);
}
.ll-sheet .ll-sheet__more a {
    display: block;
    padding: 0.95rem 0;
    border-bottom: 1px solid var(--ll-dark-border);
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--ll-gray-200);
}
/* White, never blood red: #c41e3a fails as type on this background (design-system.md §1). */
.ll-sheet .ll-sheet__more a:hover,
.ll-sheet .ll-sheet__more a[aria-current="page"] { color: var(--ll-white); }
.ll-sheet .ll-sheet__more a:focus-visible {
    outline: 2px solid var(--ll-neon-core);
    outline-offset: 2px;
}

/* On a phone a landscape room is a banner: its picture across the card, whole, the words under it. */
.ll-sheet .ll-room--wide {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.625rem 0.625rem 0.875rem;
}
.ll-sheet .ll-room--wide .ll-room__pic {
    width: 100%;
    height: auto;
}
.ll-sheet .ll-room--wide .ll-room__text { padding: 0 2.25rem 0 0.25rem; }
.ll-sheet .ll-room--wide .ll-room__go {
    position: absolute;
    right: 1rem;
    bottom: 1.25rem;
}

/* An upright tablet has room for a door's rooms side by side; a landscape room takes the whole row, picture beside its
   words again. */
@media (min-width: 600px) {
    .ll-sheet__rooms { grid-template-columns: 1fr 1fr; }
    .ll-sheet__rooms > li:only-child { grid-column: 1 / -1; max-width: calc(50% - 0.3125rem); }
    .ll-sheet__rooms > li.is-wide { grid-column: 1 / -1; max-width: none; }
    .ll-sheet .ll-room--wide { flex-direction: row; align-items: center; gap: 1rem; padding: 0.625rem 1rem 0.625rem 0.625rem; }
    .ll-sheet .ll-room--wide .ll-room__pic { width: auto; height: 132px; }
    .ll-sheet .ll-room--wide .ll-room__text { padding: 0; }
    .ll-sheet .ll-room--wide .ll-room__go { position: static; }
}
/* The bar has its own menu from 1024 px: the phone menu is never drawn there (and never fetches a picture). */
@media (min-width: 1024px) {
    .nav-mobile.ll-sheet { display: none; }
}

/* ---- THE JOIN BUTTON (2026-10-03, Hayden: "add the red Join button to the menu") --------------------------------------
   In the bar beside My LustLit, for everyone but a Premium Subscriber (head-doors.php, lustlit_head_join_html()). The
   site's primary button made small: the crimson fill (never the #ef4444 accent), white, uppercase, 4 px corners. */
.ll-join,
.ll-join:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    height: 32px;
    padding: 0 16px;
    border-radius: 4px;
    background-color: var(--ll-red, #c41e3a);
    color: var(--ll-white, #fff);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    transition: background-color var(--ll-dur-fast, 150ms) ease, transform var(--ll-dur-fast, 150ms) ease;
}
.ll-join:hover { background-color: var(--ll-red-hover, #d42d4a); color: var(--ll-white, #fff); transform: translateY(-1px); }
.ll-join:focus-visible { outline: 2px solid var(--ll-white, #fff); outline-offset: 3px; }
/* On a phone the bar has room for one of the two (at 375 px both left the logo 1 px of air): Join takes My LustLit's
   place. My LustLit stays in the phone menu, and Join signs in anyone already paying (lustlit_join_url). */
@media (max-width: 1023px) {
    .ll-join, .ll-join:visited { height: 30px; padding: 0 12px; font-size: 0.6875rem; }
    .header-actions:has(.ll-join) .btn-my-lustlit { display: none; }
}
@media (max-width: 359px) {
    .ll-join, .ll-join:visited { padding: 0 9px; font-size: 0.625rem; letter-spacing: 0.06em; }
}

@media (prefers-reduced-motion: reduce) {
    .nav-desktop .ll-door__btn::after,
    .nav-desktop .ll-door__chev,
    .ll-room__name::after,
    .ll-room__pic img,
    .ll-head-scrim,
    .ll-join,
    body.ll-over-hero.ll-hero-js .site-header,
    body.ll-over-hero.ll-hero-js .site-header::before { transition: none; }
    .ll-join:hover { transform: none; }
    .nav-desktop.ll-head-js .ll-door.is-open > .ll-door__panel,
    .nav-desktop.ll-head:not(.ll-head-js) .ll-door:hover > .ll-door__panel,
    .nav-desktop.ll-head:not(.ll-head-js) .ll-door:focus-within > .ll-door__panel { animation: none; }
}
