/* ══════════════════════════════════════
   CARD FACES drawn in js/art.js (the tool cards play their real recordings instead)
   Same surface as every other card, ink plus the one orange, and slow: loops of
   10-16s, ease-in-out, nothing pops or flashes. A face should read as still at a glance.
══════════════════════════════════════ */

.case-art {
  --art-ink: var(--color-text-primary);
  --art-line: rgba(0, 0, 0, 0.09);
  --art-well: rgba(0, 0, 0, 0.035);
  --art-track: rgba(0, 0, 0, 0.08);
  --art-paper: #fff;
  position: absolute;
  inset: 0 0 70px;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 10px 0;
}
html[data-theme="dark"] .case-art {
  --art-line: rgba(255, 255, 255, 0.1);
  --art-well: rgba(255, 255, 255, 0.04);
  --art-track: rgba(255, 255, 255, 0.1);
  --art-paper: #2a2a3a;
}

.art { display: block; width: 100%; height: 100%; overflow: visible; }
.art * { transform-box: fill-box; transform-origin: center; animation-fill-mode: backwards; }
.art-text  { font-family: var(--font-family-primary); font-size: 12px; font-weight: 500; fill: var(--art-ink); }
.art-label { font-family: var(--font-family-primary); font-size: 9px; font-weight: 500; fill: var(--art-ink); opacity: 0.5; }
.art-pill  { fill: var(--art-paper); stroke: var(--art-line); }
.art-well  { fill: var(--art-well); }
.art-line  { fill: none; stroke: var(--art-line); }
.art-track { fill: var(--art-track); }

/* Drawn cards wear the ordinary card surface, so the caption goes dark and the scrim goes */
.case-card--art { background: var(--color-surface-card); }
.case-card--art .case-media { visibility: hidden; }
.case-card--art::after { display: none; }
.case-card--art .case-face { color: var(--color-text-primary); }
.case-card--art .case-kicker { opacity: 0.45; }
.case-card--art .case-chip {
  color: var(--color-text-primary);
  background: var(--color-surface-card-white);
  border-color: var(--color-border-card);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ── Marky: 14s. Brief writes itself, shots arrive, each is approved, the cut fills ── */
.mk-type { transform-origin: left; animation: mk-type 14s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
.mk-shot { animation: mk-shot 14s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
.mk-shot-2 { animation-delay: 0.6s; }
.mk-shot-3 { animation-delay: 1.2s; }
.mk-ok circle { fill: var(--color-primary); }
.mk-ok path { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mk-ok { animation: mk-ok 14s ease infinite; }
.mk-shot-2 .mk-ok { animation-delay: 0.6s; }
.mk-shot-3 .mk-ok { animation-delay: 1.2s; }
.mk-cut { fill: var(--color-primary); transform-origin: left; animation: mk-cut 14s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
@keyframes mk-type { 0%, 4% { transform: scaleX(0); } 22%, 92% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
@keyframes mk-shot { 0%, 20% { opacity: 0; transform: translateY(6px); } 32%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
@keyframes mk-ok   { 0%, 44% { opacity: 0; } 52%, 92% { opacity: 1; } 100% { opacity: 0; } }
@keyframes mk-cut  { 0%, 58% { transform: scaleX(0); } 84%, 92% { transform: scaleX(1); } 100% { transform: scaleX(0); } }

/* ── Lottie Architect: one slow arc, the curve redraws, the sliders drift ── */
.lt-path  { fill: none; stroke: var(--art-ink); stroke-opacity: 0.18; stroke-dasharray: 2 5; }
.lt-ball rect { fill: var(--color-primary); }
/* x eases across while y rises and falls twice as often: ease-out up, its reverse (ease-in) down */
.lt-ball-x { animation: lt-x 5s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate; }
.lt-ball  { animation: lt-y 2.5s cubic-bezier(0.25, 0.6, 0.4, 1) infinite alternate; }
.lt-curve { fill: none; stroke: var(--color-primary); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 100; animation: lt-draw 10s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
.lt-handle { stroke: var(--art-ink); stroke-opacity: 0.2; }
.lt-dot   { fill: var(--art-ink); }
.lt-knob circle { fill: var(--art-paper); stroke: var(--art-ink); stroke-width: 1.5; }
.lt-knob-1 { animation: lt-k 7s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate; }
.lt-knob-2 { animation: lt-k 9s cubic-bezier(0.45, 0, 0.55, 1) -3s infinite alternate-reverse; }
.lt-knob-3 { animation: lt-k 8s cubic-bezier(0.45, 0, 0.55, 1) -5s infinite alternate; }
@keyframes lt-x    { from { transform: translateX(-58px); } to { transform: translateX(58px); } }
@keyframes lt-y    { from { transform: translateY(66px); } to { transform: none; } }
@keyframes lt-draw { 0%, 6% { stroke-dashoffset: 100; } 40%, 90% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 100; } }
@keyframes lt-k    { from { transform: translateX(-16px); } to { transform: translateX(16px); } }

/* ── InsideIIM: the posts breathe, the line draws once per loop ── */
.im-card  { fill: var(--art-paper); stroke: var(--art-line); }
.im-img-a { fill: var(--color-primary); }
.im-img-b { fill: var(--art-ink); opacity: 0.85; }
.im-img-c { fill: var(--art-ink); opacity: 0.12; }
.im-likes { opacity: 0.6; }
.im-post  { animation: im-float 9s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate; }
.im-post-2 { animation-delay: -3s; }
.im-post-3 { animation-delay: -6s; }
.im-grid  { stroke: var(--art-line); }
.im-area  { fill: var(--color-primary); opacity: 0.1; animation: im-fade 12s ease infinite; }
.im-rise  { fill: none; stroke: var(--color-primary); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 100; animation: im-rise 12s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
.im-peak  { fill: var(--art-paper); stroke: var(--color-primary); stroke-width: 2; animation: im-fade 12s ease infinite; }
.im-tag rect { fill: var(--art-ink); }
.im-tag text { font-family: var(--font-family-primary); font-size: 10.5px; font-weight: 700; fill: var(--art-paper); }
html[data-theme="dark"] .im-tag text { fill: #18181f; }
.im-tag   { animation: im-fade 12s ease infinite; }
@keyframes im-float { from { transform: translateY(2px); } to { transform: translateY(-4px); } }
@keyframes im-rise  { 0%, 6% { stroke-dashoffset: 100; } 50%, 92% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 100; } }
@keyframes im-fade  { 0%, 40% { opacity: 0; } 56%, 92% { opacity: 1; } 100% { opacity: 0; } }
.im-area { animation-name: im-area; }
@keyframes im-area  { 0%, 40% { opacity: 0; } 56%, 92% { opacity: 0.1; } 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .art * { animation: none !important; }
}


/* Tall marketing faces: keep each film's subject in frame */
.jupiter-card .case-media { object-fit: cover; object-position: center; }
