/* ==========================================================================
   Previously — Shared Micro-Interactions · MICRO v2 (2026-10-03)
   --------------------------------------------------------------------------
   Rewritten 2026-10-03 against the REAL production class inventory
   (3,482 HTML pages audited + JS-injected classes). Every selector below
   matches at least one element in the tree — zero dead selectors.

   Real interactive classes targeted (usage counts from audit):
     Cards:    .rcard(7112) .tcard(5025) .card(4161) .pcard(1875) .acard(491)
               .alb-acard(418) .xicard(330) .ed-mcard(283) .ed-mini-story(312)
               .ed-side-card(208) .mcard(55) .pv-card(207)
     Art:      .art img(5228) .pv-card__art img(207)
     Buttons:  .tcard--play(2403) .btn(307) .btn-watch(301) .cta(66)
               .backbtn(426) .pv-about__toggle(376) .pv-btn(22)
               .pvn-burger(JS) .pv-drawer-btn(770)
     Rows:     .alb-row(1567) .plat-row(463)
     Nav:      .pv-nav-links a(770) .hubnav a(463) .text-link(430) .freemore(357)
     Live:     .pvn-livedot(JS) .badge-live .pulse(307)
     Chips:    .chip(10) .pv-chip(13)

   Rules:
     1. Fast beats fancy — nothing runs longer than 200ms (pulse excluded).
     2. One thing moves per interaction.
     3. Animate transform/opacity ONLY — never layout properties.
     4. Touch gets immediate feedback (within 100ms) via :active.
     5. Reduced motion respected — ALL motion inside
        @media (prefers-reduced-motion: no-preference).
     6. NEVER `transition: all` — specific properties only.
     7. Motion-only: this file never changes colors, borders, or layout.
        Pages own their :hover colors; we make them move smoothly.

   Load order: this file loads FIRST (before nav.css, page CSS). Base-class
   transitions apply regardless of where :hover is defined — that is the win:
   pages that change transform on hover but forgot the transition get smooth
   motion for free.
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {

/* ================= 1. CARDS — lift + shadow =================
   .rcard already defines its own transition+hover inline; the base
   transition here is a no-op for it and a smoothness upgrade for the rest. */

.rcard,
.tcard,
.card,
.pcard,
.acard,
.alb-acard,
.xicard,
.ed-mcard,
.ed-mini-story,
.ed-side-card,
.mcard,
.pv-card {
  transition: transform .18s ease-out, box-shadow .18s ease-out;
}

/* Cards with no page-defined hover get the shared lift */
.tcard:hover,
.pcard:hover,
.acard:hover,
.alb-acard:hover,
.xicard:hover,
.ed-mini-story:hover,
.ed-side-card:hover,
.mcard:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,.38);
}

/* .pv-card keeps its own hover (defined below, was v1) */
.pv-card {
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.pv-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0,0,0,.5);
}

/* ================= 2. ARTWORK ZOOM =================
   .art already has overflow:hidden on every page — zoom is safe. */

.art img,
.pv-card__art img {
  transition: transform .25s ease-out;
  will-change: transform;
}
.tcard:hover .art img,
.pcard:hover .art img,
.acard:hover .art img,
.card:hover .art img,
.ed-mcard:hover .art img,
.pv-card:hover .pv-card__art img {
  transform: scale(1.03); /* barely perceptible — never 1.1 */
}

/* ================= 3. BUTTONS — press feedback ================= */

.btn,
.btn-watch,
.tcard--play,
.cta,
.backbtn,
.pv-about__toggle,
.pv-btn,
.pvn-burger,
.pv-drawer-btn {
  transition: transform .18s ease-out, box-shadow .18s ease-out,
              background-color .18s ease-out, border-color .18s ease-out;
  cursor: pointer;
}
.btn:active,
.btn-watch:active,
.tcard--play:active,
.cta:active,
.backbtn:active,
.pv-about__toggle:active,
.pv-btn:active,
.pvn-burger:active,
.pv-drawer-btn:active {
  transform: scale(.97); /* immediate press feedback */
  transition-duration: .1s;
}

/* Play tiles get a touch more life on hover */
.tcard--play:hover {
  transform: translateY(-2px);
}
.tcard--play:hover .tcard__go {
  transform: scale(1.12);
}
.tcard__go {
  transition: transform .18s ease-out;
  display: inline-flex;
}

/* Primary watch button: subtle glow on hover (shadow only, no color fight) */
.btn-watch:hover {
  box-shadow: 0 6px 20px rgba(236,70,52,.35);
}

/* ================= 4. ROWS — background shift =================
   .alb-row and .plat-row are <button>s (track/platform rows). */

.alb-row,
.plat-row {
  transition: background-color .18s ease-out, transform .18s ease-out;
}
.alb-row:hover,
.plat-row:hover {
  background-color: rgba(255,255,255,.045);
}
.alb-row:active {
  transform: scale(.995);
}

/* ================= 5. NAV & TEXT LINKS ================= */

.pv-nav-links a,
.hubnav a {
  transition: color .18s ease-out, opacity .18s ease-out;
}
.pv-nav-links a:hover,
.hubnav a:hover {
  opacity: .82;
}

/* Text links: underline slides in — offset transition is cheap and smooth */
.text-link,
.freemore {
  transition: color .18s ease-out, text-underline-offset .18s ease-out;
  text-underline-offset: 3px;
}
.text-link:hover,
.freemore:hover {
  text-underline-offset: 5px;
}

/* ================= 6. LIVE INDICATORS — pulse ================= */

@keyframes micro-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.82); }
}
.pvn-livedot,
.badge-live .pulse {
  animation: micro-pulse 1.6s ease-in-out infinite;
}
.badge-live {
  transition: transform .18s ease-out;
}
.badge-live:hover {
  transform: translateY(-1px);
}

/* ================= 7. CHIPS ================= */

.chip,
.pv-chip {
  transition: transform .18s ease-out, background-color .18s ease-out,
              box-shadow .18s ease-out;
}
.chip:hover,
.pv-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
}
.chip:active,
.pv-chip:active {
  transform: scale(.97);
  transition-duration: .1s;
}

/* ================= 8. FOCUS-VISIBLE — keyboard users =================
   Red ring, never blue. Matches the site's signal-red focus language. */

.rcard:focus-visible,
.tcard:focus-visible,
.card:focus-visible,
.pcard:focus-visible,
.btn:focus-visible,
.btn-watch:focus-visible,
.tcard--play:focus-visible,
.alb-row:focus-visible,
.pv-nav-links a:focus-visible,
.hubnav a:focus-visible,
.text-link:focus-visible,
.pvn-burger:focus-visible,
.pv-drawer-btn:focus-visible {
  outline: 2px solid #ec4634;
  outline-offset: 2px;
}

/* ================= 9. TOUCH — immediate feedback ================= */

@media (hover: none) {
  .tcard:active,
  .pcard:active,
  .acard:active,
  .card:active,
  .ed-mcard:active,
  .chip:active,
  .pv-chip:active {
    transform: scale(.97);
    transition-duration: .1s;
  }
}

} /* end @media (prefers-reduced-motion: no-preference) */

/* ================= 10. REDUCED MOTION — backstop =================
   All motion above is already gated on no-preference. This kills anything
   JS injects outside this file. */

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

/* ==========================================================================
   LIGHT THEME — follows the device (James, 2026-10-02)
   --------------------------------------------------------------------------
   micro.css loads on ~99% of pages AFTER their inline <style> blocks, so
   this single block carries the sitewide light theme: it remaps the shared
   local tokens (--bg, --panel, --txt, ...) and the --pv-* design tokens,
   then overrides this file's own hardcoded dark values.

   Design: "Previously in daylight" — warm paper (#faf8f2), warm-black ink
   (#1e1a14), Signal Red kept for fills, deepened to #b02a1a wherever red
   is TEXT on light (WCAG AA). Media wells (video stages, scrims) stay dark.
   ========================================================================== */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;

    /* ---- Local page tokens (the :root{--bg:...;--panel:...} pattern
       used by hundreds of generated pages) ---- */
    --bg: #faf8f2;
    --panel: #ffffff;
    --panel2: #f0ece1;
    --line: rgba(30,26,20,.14);
    --txt: #1e1a14;
    --muted: rgba(30,26,20,.66);
    --dim: rgba(30,26,20,.48);
    --ink: #1e1a14;
    --surface: #ffffff;
    --card: #ffffff;
    --border: rgba(30,26,20,.14);
    --fg: #1e1a14;
    --gold: #8a6a2f;          /* gold as TEXT on light (was #c9a25e) */
    --red: #b02a1a;           /* red as TEXT on light */
    --accent: #b02a1a;

    /* ---- --pv-* design tokens (safety net: applies even where
       tokens.css loads before this file or not at all) ---- */
    --pv-noir: #faf8f2;
    --pv-noir-2: #ffffff;
    --pv-noir-3: #f0ece1;
    --pv-glass: rgba(250,248,242,.88);
    --pv-ivory: #1e1a14;
    /* Audit 2026-10-03: raised for WCAG-readable contrast. Was .68/.45. */
    --pv-ivory-dim: rgba(30,26,20,.78);
    --pv-ivory-faint: rgba(30,26,20,.60);
    --pv-rule: rgba(30,26,20,.14);
    --pv-red-ink: #b02a1a;
    --pv-warn: #8a5a12;
    --pv-muted-ok: #3d6b4a;
    --pv-shadow-card: 0 18px 44px rgba(74,60,40,.13);
    --pv-shadow-card-hover: 0 14px 34px rgba(74,60,40,.18);
    --pv-shadow-chip-hover: 0 8px 20px rgba(74,60,40,.16);
    --pv-shadow-pop: 0 40px 120px rgba(74,60,40,.20), 0 0 0 1px rgba(236,70,52,.20);
    --pv-shadow-bar: 0 8px 28px rgba(74,60,40,.14);
    --pv-shadow-btn: 0 10px 34px rgba(236,70,52,.28);
    --pv-shadow-btn-lg: 0 16px 44px rgba(236,70,52,.42);
    --pv-focus-outline: 2px solid #b02a1a;
    --pv-focus-ring: 0 0 0 3px rgba(236,70,52,.28);
  }

  /* ---- Page canvas: paper background, ink text.
     html > body specificity beats the inline `body{...}` rules (the
     inline <style> blocks load BEFORE this file). Inner media wells
     (.pv-player-stage etc.) keep their own dark backgrounds. ---- */
  html body {
    background-color: #faf8f2;
    color: #1e1a14;
  }

  /* ---- This file's hardcoded dark values, light-ified ---- */
  .pv-btn--ghost:hover { background: rgba(30,26,20,.06); }
  .pv-spinner { border-color: rgba(30,26,20,.18); }
}/* James, 2026-10-03 — IN-HOUSE PROMOS fill .ad-slot until Google approves.
   Slots stay hidden until pv-promos.js fills them (fail-closed). */
.ad-slot{display:none}
.ad-slot.pv-filled{display:block}

/* ---- Previously Recommends promo cards ---- */
.pv-promo{
  display:block;position:relative;overflow:hidden;border-radius:12px;
  border:1px solid var(--rule, #2a2a30);background:var(--surface, #141416);
  text-decoration:none;color:inherit;transition:transform .18s ease, border-color .18s ease;
}
.pv-promo:hover{transform:translateY(-2px);border-color:var(--red, #ec4634)}
.pv-promo-label{
  position:absolute;top:10px;left:10px;z-index:2;
  font-family:Arial,Helvetica,sans-serif;font-size:9px;font-weight:700;
  letter-spacing:.24em;text-transform:uppercase;color:#fff;
  background:rgba(0,0,0,.55);padding:5px 10px;border-radius:4px;
  backdrop-filter:blur(4px);
}
.pv-promo-img{display:block;overflow:hidden}
.pv-promo-img img{display:block;width:100%;height:100%;object-fit:cover}
.pv-promo-txt{display:block;padding:16px 18px}
.pv-promo-kicker{
  display:block;font-size:10px;font-weight:700;letter-spacing:.22em;
  text-transform:uppercase;color:var(--red, #ec4634);margin-bottom:6px;
}
.pv-promo-title{
  display:block;font-family:var(--serif, Georgia, serif);font-weight:700;
  font-size:19px;line-height:1.25;letter-spacing:-.01em;margin-bottom:8px;
  color:var(--ink, #f4efe6);
}
.pv-promo-dek{
  display:block;font-size:14px;line-height:1.55;color:var(--dim, #a8a8b0);
  margin-bottom:12px;
}
.pv-promo-cta{
  display:inline-block;font-size:13px;font-weight:700;letter-spacing:.06em;
  color:var(--red, #ec4634);
}
/* Leaderboard: horizontal, image left */
.pv-promo-leaderboard{display:grid;grid-template-columns:minmax(0,38%) 1fr;max-width:728px;margin:2em auto}
.pv-promo-leaderboard .pv-promo-img{min-height:170px}
.pv-promo-leaderboard .pv-promo-txt{padding:20px 22px;align-self:center}
/* Sidebar: vertical card */
.pv-promo-sidebar{max-width:340px;margin:0 0 28px}
.pv-promo-sidebar .pv-promo-img{aspect-ratio:16/9}
/* In-article: horizontal, full prose width */
.pv-promo-inarticle{display:grid;grid-template-columns:minmax(0,32%) 1fr;margin:2em 0}
.pv-promo-inarticle .pv-promo-img{min-height:150px}
.pv-promo-inarticle .pv-promo-txt{padding:18px 20px;align-self:center}
/* Mobile: stack everything */
@media(max-width:680px){
  .pv-promo-leaderboard,.pv-promo-inarticle{grid-template-columns:1fr}
  .pv-promo-leaderboard .pv-promo-img,.pv-promo-inarticle .pv-promo-img{aspect-ratio:16/9;min-height:0}
  .pv-promo-title{font-size:17px}
}
/* ==========================================================================
   MOBILE SAFETY NET (2026-10-03 systemic mobile audit) — applies to every
   page that loads this file. No page may override these without an explicit
   comment naming the reason.
   --------------------------------------------------------------------------
   1. touch-action: manipulation on interactive elements — kills the 300ms
      tap delay on touch browsers. Safe on desktop (no-op there).
   2. -webkit-tap-highlight-color: transparent — removes the ugly grey
      flash on tap; feedback comes from the :active states instead.
   3. overflow-x: clip on html/body — no page may ever side-scroll. `clip`
      (NOT `hidden`) deliberately: it does not create a scroll container,
      so position:sticky elements (headers, rails) keep working.
   ========================================================================== */
button, a, [role="button"], summary, label, input, select, textarea {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
html, body { overflow-x: clip; }
