/* Off the Clock: shared styles for the landing page and the three shelves.
   Same Apple light/dark system as the main site: light by default, dark when
   the device is dark (unless the visitor chose light), or when they chose dark. */
:root {
  --bg: #fff; --band: #f5f5f7; --card: #fff;
  --ink: #1d1d1f; --soft: #6e6e73; --faint: #86868b;
  --line: #d2d2d7; --hair: rgba(0,0,0,.08);
  --accent: #0071e3; --accent-ink: #0066cc;
  --star: #ff9f0a;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", Arial, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.28,.11,.32,1);
  --spring: cubic-bezier(.34,1.56,.64,1);
  --nav-h: 76px;
}
html.nav-hidden { --nav-h: 0px; }
:root[data-theme="light"] { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000; --band: #1c1c1e; --card: #1c1c1e;
    --ink: #f5f5f7; --soft: #a1a1a6; --faint: #86868b;
    --line: #38383a; --hair: rgba(255,255,255,.1);
    --accent: #2997ff; --accent-ink: #2997ff; --star: #ffd60a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000; --band: #1c1c1e; --card: #1c1c1e;
  --ink: #f5f5f7; --soft: #a1a1a6; --faint: #86868b;
  --line: #38383a; --hair: rgba(255,255,255,.1);
  --accent: #2997ff; --accent-ink: #2997ff; --star: #ffd60a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.47 var(--text); letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(0,113,227,.18); }

/* ---- floating glass top bar (matches the main nav) ---- */
.bar { position: fixed; top: 12px; left: 0; right: 0; z-index: 50; width: calc(100% - 24px); max-width: 1000px; height: 52px;
  margin: 0 auto; border-radius: 26px; display: flex; align-items: center; gap: 12px; padding: 0 8px 0 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,.22));
  -webkit-backdrop-filter: blur(9px) saturate(200%) brightness(1.06); backdrop-filter: blur(9px) saturate(200%) brightness(1.06);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.95), inset 0 -1px 1px rgba(255,255,255,.35), inset 0 0 0 .5px rgba(0,0,0,.05),
    0 10px 30px -6px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.05);
  transition: transform .5s var(--ease), opacity .35s var(--ease); }
.bar::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 32%, rgba(255,255,255,0) 68%, rgba(255,255,255,.3) 100%); }
.bar > * { position: relative; }
.bar.hide { transform: translateY(calc(-100% - 20px)); opacity: 0; }
.bar.hide:focus-within { transform: none; opacity: 1; }
.back { display: inline-flex; align-items: center; gap: 5px; color: var(--accent-ink); font-size: 16px; padding: 9px 14px;
  margin-left: -10px; border-radius: 980px; isolation: isolate; transition: transform .45s var(--spring); }
.back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.back::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; opacity: 0; transform: scale(.82);
  background: radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.95), rgba(255,255,255,0) 70%), linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.35));
  box-shadow: inset 0 1px 1px #fff, inset 0 -2px 3px rgba(0,0,0,.05), 0 0 0 .5px rgba(0,0,0,.06), 0 6px 16px -4px rgba(0,0,0,.18);
  transition: transform .45s var(--spring), opacity .25s var(--ease); }
@media (hover: hover) { .back:hover { transform: scale(1.06); } .back:hover::before { opacity: 1; transform: scale(1.1); } }
.back:focus-visible::before { opacity: 1; transform: scale(1.1); }
.back:active::before { opacity: 1; transform: scale(1.22); }
.theme-toggle { margin-left: auto; flex: none; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; background: none; color: var(--ink);
  transition: transform .45s var(--spring), background .2s; }
.theme-toggle:hover, .theme-toggle:focus-visible { background: rgba(120,120,128,.16); transform: scale(1.12); }
.theme-toggle svg { width: 18px; height: 18px; fill: currentColor; }
.theme-toggle .ic-sun { display: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ---- page ---- */
.wrap { max-width: 1000px; margin: 0 auto; padding: 120px 22px 80px; }
.hero { text-align: center; margin-bottom: 40px; }
h1 { font: 600 clamp(44px, 7vw, 72px)/1.05 var(--display); letter-spacing: -0.015em; margin: 0; }
.sub { color: var(--soft); font: 400 clamp(19px, 2.2vw, 22px)/1.35 var(--display); margin: 10px auto 0; max-width: 32ch; }

.eyebrow { margin: 0 0 14px; font: 600 clamp(17px, 2vw, 21px)/1.2 var(--display); color: var(--soft); letter-spacing: .004em; }
.eyebrow a { border-radius: 6px; transition: color .2s; }
.eyebrow a:hover { color: var(--accent-ink); }

/* ---- landing page: one big card per shelf ---- */
.hub { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.hub-card { position: relative; display: flex; flex-direction: column; padding: 26px; border-radius: 28px;
  background: var(--band); overflow: hidden; transition: transform .45s var(--spring), box-shadow .35s var(--ease); }
.hub-card:hover, .hub-card:focus-visible { transform: translateY(-4px) scale(1.01); box-shadow: 0 18px 40px -16px rgba(0,0,0,.3); }
.hub-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.hub-top { display: flex; align-items: center; gap: 14px; }
.hub-top .hub-go { margin-left: auto; }
.hub-icon { width: 46px; height: 46px; border-radius: 22.5%; display: grid; place-items: center; }
.hub-icon svg { width: 52%; height: 52%; fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.hub-card.books .hub-icon { background: linear-gradient(180deg, #ffb340, #ff8a00); }
.hub-card.movies .hub-icon { background: linear-gradient(180deg, #ff6b8a, #ff2d55); }
.hub-card.artists .hub-icon { background: linear-gradient(180deg, #a77bff, #6e3ff3); }
.hub-card.blogs .hub-icon { background: linear-gradient(180deg, #4cd964, #28a745); }
.hub-go { font: 400 30px/1 var(--display); color: var(--faint); transition: transform .45s var(--spring), color .2s; }
.hub-card:hover .hub-go { transform: translateX(4px); color: var(--ink); }
.hub-card h2 { margin: 0; font: 600 28px/1.1 var(--display); letter-spacing: -0.005em; }
.hub-count { margin-top: 10px; }
.hub-count { color: var(--soft); font-size: 15px; }
.hub-now { margin-top: 10px; font-size: 14px; color: var(--soft); }
.hub-now b { color: var(--ink); font-weight: 600; }
/* covers sit just under the heading, not pinned to the card's bottom */
.hub-peek { margin-top: 18px; display: flex; gap: 10px; align-items: flex-end; }
.hub-peek .art { width: 30%; flex: none; border-radius: 8px; }
.hub-peek .tile { padding: 8px; }
.hub-peek .tile b { font-size: 11px; }
.hub-peek .tile span { display: none; }

/* segmented switch between the three shelves */
.seg { display: inline-flex; gap: 2px; padding: 4px; margin-bottom: 28px; border-radius: 980px; background: rgba(120,120,128,.12); }
.seg a { padding: 8px 18px; border-radius: 980px; font-size: 15px; font-weight: 500; color: var(--soft);
  transition: color .2s, background .2s, transform .45s var(--spring); }
.seg a:hover { color: var(--ink); }
.seg a[aria-current="page"] { color: var(--ink); background: var(--card);
  box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); }

h2 { font: 600 24px/1.2 var(--display); margin: 48px 0 18px; }
h2:first-of-type { margin-top: 0; }
.count { color: var(--faint); font-weight: 400; margin-left: 8px; font-size: 17px; }

/* ---- grid of items ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 32px 22px; }
[data-page="artists"] .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.item { display: flex; flex-direction: column; min-width: 0; }
.art { position: relative; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; background: var(--band);
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 10px 24px -12px rgba(0,0,0,.35);
  transition: transform .45s var(--spring), box-shadow .35s var(--ease); }
[data-page="artists"] .art, .hub-card.artists .art { aspect-ratio: 1 / 1; }
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
a.item:hover .art, a.item:focus-visible .art { transform: translateY(-4px) scale(1.03); box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 18px 34px -12px rgba(0,0,0,.45); }
a.item:focus-visible { outline: none; }
a.item:focus-visible .art { outline: 2px solid var(--accent); outline-offset: 3px; }
/* no artwork: a typographic tile in a colour derived from the title */
.tile { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 14px;
  color: #fff; background: linear-gradient(160deg, hsl(var(--h) 62% 58%), hsl(calc(var(--h) + 28) 58% 38%)); }
.tile b { font: 700 18px/1.15 var(--display); letter-spacing: -0.01em; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.tile span { font-size: 12px; font-weight: 500; opacity: .85; }
.art:has(.badge) .tile { padding-top: 40px; }
.badge { position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 600; color: #fff; padding: 3px 8px; border-radius: 980px;
  background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.meta { padding: 12px 2px 0; }
.title { font-weight: 600; font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.by { color: var(--soft); font-size: 14px; margin-top: 2px; }
.info { color: var(--faint); font-size: 13px; margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.stars { color: var(--star); letter-spacing: 1px; }
.note { color: var(--soft); font-size: 13.5px; line-height: 1.45; margin: 8px 0 0; }

/* ---- Netflix-style category rows ---- */
.row { margin-top: 40px; }
.row:first-child { margin-top: 0; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.row-head h2 { margin: 0; }
.row-wrap { position: relative; margin: 0 -22px; --art-h: 225px; }
[data-page="artists"] .row-wrap { --art-h: 150px; }
.row-track { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x proximity; scroll-behavior: smooth;
  padding: 8px 22px 16px; scroll-padding: 0 22px; scrollbar-width: none; overscroll-behavior-x: contain; }
.row-track::-webkit-scrollbar { display: none; }
.row-track .item { flex: 0 0 150px; scroll-snap-align: start; }
.row.expanded .row-track { display: grid; grid-template-columns: repeat(auto-fill, 150px); gap: 28px 18px; overflow: visible; }
.row-track .item.extra { display: none; }
.row.expanded .row-track .item.extra { display: flex; }
/* "Show all" / "Show less": a small glass pill after the 7th item, centred on the covers;
   when expanded it sits centred under the grid */
.more-card { flex: none; align-self: flex-start; margin: calc(var(--art-h) / 2 - 18px) 4px 0;
  padding: 0; border: 0; background: none; cursor: pointer; font: inherit; color: inherit; }
.more-art { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px 0 16px; border-radius: 980px;
  background: rgba(255,255,255,.8); -webkit-backdrop-filter: blur(10px) saturate(180%); backdrop-filter: blur(10px) saturate(180%);
  box-shadow: inset 0 1px 1px #fff, 0 0 0 .5px rgba(0,0,0,.08), 0 6px 16px -6px rgba(0,0,0,.25);
  transition: transform .45s var(--spring), box-shadow .3s; white-space: nowrap; }
.more-card:hover .more-art, .more-card:focus-visible .more-art { transform: scale(1.06); }
.more-card:focus-visible { outline: none; }
.more-card:focus-visible .more-art { outline: 2px solid var(--accent); outline-offset: 3px; }
.more-label { font: 500 14px/1 var(--text); color: var(--accent-ink); }
.more-sub { font: 500 12px/1 var(--text); color: var(--soft); padding-left: 7px; border-left: 1px solid var(--hair); }
.more-label::after { content: " \203A"; font-size: 16px; }
.row.expanded .more-card { grid-column: 1 / -1; justify-self: center; margin: 4px 0 0; }
.row.expanded .more-sub { display: none; }
.row.expanded .more-label::after { content: ""; }
.row-nav { position: absolute; z-index: 2; top: calc(8px + var(--art-h) / 2); transform: translateY(-50%); width: 44px; height: 44px;
  border: 0; border-radius: 50%; cursor: pointer; font: 400 30px/1 var(--display); color: var(--ink); padding-bottom: 4px;
  background: rgba(255,255,255,.82); -webkit-backdrop-filter: blur(10px) saturate(180%); backdrop-filter: blur(10px) saturate(180%);
  box-shadow: inset 0 1px 1px #fff, 0 0 0 .5px rgba(0,0,0,.08), 0 8px 20px -6px rgba(0,0,0,.3);
  transition: opacity .2s, transform .45s var(--spring); }
.row-nav.prev { left: 10px; } .row-nav.next { right: 10px; }
.row-nav:hover { transform: translateY(-50%) scale(1.1); }
.row-nav:disabled { opacity: 0; pointer-events: none; }
/* touch: rows are dragged by shelf.js (faster than native), so no snapping or smooth scroll */
@media (hover: none) {
  .row-track { touch-action: pan-y; scroll-snap-type: none; scroll-behavior: auto; }
  .row-nav { width: 36px; height: 36px; font-size: 26px; }
}

/* artists: Spotify-style circles with the name centred underneath */
[data-page="artists"] .art, .hub-card.artists .art { border-radius: 50%; }
[data-page="artists"] .tile { align-items: center; justify-content: center; text-align: center; padding: 18%; }
[data-page="artists"] .tile span { display: none; }
[data-page="artists"] .meta { text-align: center; }
.art img.sp { opacity: 0; transition: opacity .35s var(--ease); }
.art img.sp.in { opacity: 1; }
[data-page="artists"] a.item:hover .title, [data-page="artists"] a.item:focus-visible .title { color: var(--accent-ink); }
.credits { margin: 48px 0 0; color: var(--faint); font-size: 12px; line-height: 1.6; }
.credits a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.credits a:hover { color: var(--soft); }

/* blogs: wide name cards (no artwork), two or three to a row */
[data-page="blogs"] .grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px 20px; }
[data-page="blogs"] .art, .hub-card.blogs .art { aspect-ratio: 16 / 9; }
[data-page="blogs"] .tile { padding: 22px; justify-content: flex-end; gap: 6px; }
[data-page="blogs"] .tile b { font-size: 24px; -webkit-line-clamp: 2; }
[data-page="blogs"] .tile span { font-size: 13px; opacity: .8; }
[data-page="blogs"] .meta { padding-top: 14px; }
[data-page="blogs"] .title { font-size: 17px; }
.hub-card.blogs .hub-peek .art { width: 31%; }
.hub-card.artists .tile b { display: none; }   /* tiny circles: just the colour while the photo loads */

/* ---- empty state ---- */
.empty { text-align: center; padding: 64px 24px; border-radius: 28px; background: var(--band); }
.empty svg { width: 44px; height: 44px; fill: none; stroke: var(--faint); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.empty p { margin: 14px 0 0; font: 600 21px/1.3 var(--display); }
.empty span { display: block; color: var(--soft); margin-top: 4px; }

.demo-note { text-align: center; color: var(--faint); font-size: 13px; margin: -20px 0 28px; }

/* dark mode extras (tokens handle most of it) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bar { background: linear-gradient(180deg, rgba(44,44,48,.55), rgba(22,22,24,.38)); border-color: rgba(255,255,255,.12);
    box-shadow: inset 0 1px 1px rgba(255,255,255,.18), inset 0 -1px 1px rgba(255,255,255,.05), 0 10px 30px -6px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.4); }
  :root:not([data-theme="light"]) .bar::before { opacity: .18; }
  :root:not([data-theme="light"]) .back::before { background: radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.28), rgba(255,255,255,0) 70%), linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.06));
    box-shadow: inset 0 1px 1px rgba(255,255,255,.35), inset 0 -2px 3px rgba(0,0,0,.3), 0 6px 16px -4px rgba(0,0,0,.6); }
  :root:not([data-theme="light"]) .seg a[aria-current="page"] { background: #3a3a3c; }
  :root:not([data-theme="light"]) .art { box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 10px 24px -12px rgba(0,0,0,.9); }
  :root:not([data-theme="light"]) .more-art { background: rgba(44,44,46,.85); box-shadow: inset 0 1px 1px rgba(255,255,255,.15), 0 6px 16px -6px rgba(0,0,0,.7); }
  :root:not([data-theme="light"]) .row-nav { background: rgba(44,44,46,.85); box-shadow: inset 0 1px 1px rgba(255,255,255,.15), 0 8px 20px -6px rgba(0,0,0,.7); }
  :root:not([data-theme="light"]) .theme-toggle .ic-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .ic-sun { display: block; }
}
:root[data-theme="dark"] .bar { background: linear-gradient(180deg, rgba(44,44,48,.55), rgba(22,22,24,.38)); border-color: rgba(255,255,255,.12);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.18), inset 0 -1px 1px rgba(255,255,255,.05), 0 10px 30px -6px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.4); }
:root[data-theme="dark"] .bar::before { opacity: .18; }
:root[data-theme="dark"] .back::before { background: radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.28), rgba(255,255,255,0) 70%), linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.06));
  box-shadow: inset 0 1px 1px rgba(255,255,255,.35), inset 0 -2px 3px rgba(0,0,0,.3), 0 6px 16px -4px rgba(0,0,0,.6); }
:root[data-theme="dark"] .seg a[aria-current="page"] { background: #3a3a3c; }
:root[data-theme="dark"] .art { box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 10px 24px -12px rgba(0,0,0,.9); }
:root[data-theme="dark"] .more-art { background: rgba(44,44,46,.85); box-shadow: inset 0 1px 1px rgba(255,255,255,.15), 0 6px 16px -6px rgba(0,0,0,.7); }
:root[data-theme="dark"] .row-nav { background: rgba(44,44,46,.85); box-shadow: inset 0 1px 1px rgba(255,255,255,.15), 0 8px 20px -6px rgba(0,0,0,.7); }
:root[data-theme="dark"] .theme-toggle .ic-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .ic-sun { display: block; }

@media (max-width: 860px) and (min-width: 621px) { .hub { grid-template-columns: 1fr 1fr; } .hub-card.artists { grid-column: 1 / -1; } }
@media (max-width: 620px) {
  .bar { top: 8px; width: calc(100% - 16px); height: 50px; border-radius: 22px; padding: 0 8px 0 16px; }
  html { --nav-h: 66px; }
  .wrap { padding: 96px 16px 60px; }
  .seg a { padding: 8px 14px; }
  .hub { grid-template-columns: 1fr; gap: 14px; }
  .hub-card { min-height: 0; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 26px 14px; }
  [data-page="artists"] .grid { grid-template-columns: repeat(2, 1fr); }
  [data-page="blogs"] .grid { grid-template-columns: 1fr; }
  .row-wrap { margin: 0 -16px; --art-h: 195px; }
  .row-track { padding: 8px 16px 14px; scroll-padding: 0 16px; gap: 14px; }
  .row-track .item { flex-basis: 130px; }
  .row.expanded .row-track { grid-template-columns: repeat(2, 1fr); gap: 24px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .bar.hide { transform: none; opacity: 1; }
}
