/* Styles for extras.js: stop-press ticker, lineart slider on tiles, process reel, placeholder stages. Uses the variables in style.css. */

/* stop-press ticker (gallery, under the masthead) */
.ticker { display:flex; align-items:stretch; border-bottom:1px solid var(--ink); overflow:hidden; font:600 11px var(--sans); letter-spacing:.16em; text-transform:uppercase; }
.ticker b { flex:none; background:var(--accent); color:var(--accent-ink); padding:8px 12px; font-weight:700; transition:background .35s; }
.ticker .tk { flex:1; min-width:0; overflow:hidden; display:flex; align-items:center; }
.ticker .tk > div { display:flex; width:max-content; animation:tick 36s linear infinite; }
.ticker .tk i { display:flex; font-style:normal; }
.ticker .tk span { padding:0 22px; white-space:nowrap; position:relative; }
.ticker .tk span::after { content:"✦"; position:absolute; right:-5px; color:var(--accent); }
.ticker:hover .tk > div { animation-play-state:paused; }
@keyframes tick { to { transform:translateX(-50%); } }
:root[data-gstyle="grid"] .ticker { border:1px solid var(--line); border-radius:999px; margin-top:18px; } :root[data-gstyle="grid"] .ticker b { border-radius:999px 0 0 999px; }
@media (prefers-reduced-motion: reduce) { .ticker .tk > div { animation:none; } .ticker .tk i { display:none; } }

/* the dateline line on the home page's first chapter */
.st .intro u { display:block; text-decoration:none; opacity:.85; }

/* lineart slider: a badge on pieces that have one, and the slider that opens on the piece when clicked */
.slb { position:absolute; top:8px; left:8px; z-index:2; padding:4px 9px; border-radius:99px; background:rgba(0,0,0,.62); color:#fff; font:700 9.5px var(--sans); letter-spacing:.14em; text-transform:uppercase; pointer-events:none; }
.card .fr, .gc, .tile { position:relative; }
.slwrap { position:absolute; inset:0; z-index:5; display:block; cursor:ew-resize; }
.cmp.fillcmp { position:absolute; inset:0; width:100%; height:100%; max-width:none; margin:0; aspect-ratio:auto; }
.slbar { position:absolute; top:8px; right:8px; z-index:2; display:flex; gap:6px; }
.slbar span { cursor:pointer; padding:5px 11px; border-radius:99px; background:rgba(0,0,0,.7); color:#fff; font:700 10px var(--sans); letter-spacing:.12em; text-transform:uppercase; }
.slbar span:hover { background:#fff; color:#111; } .slbar span:focus-visible { outline:2px solid #fff; outline-offset:2px; }
[data-sl] { cursor:pointer; }

/* placeholder looks for the stages (only used until the real stage pictures exist) */
.ph.lines { filter:grayscale(1) invert(1) contrast(1.25); }
.ph.st0 { filter:grayscale(1) invert(1) contrast(.55) brightness(1.1); }
.ph.st1 { filter:grayscale(1) invert(1) contrast(1.25); }
.ph.st2 { filter:saturate(.4) brightness(1.3); }

/* process reel */
.reel { display:flex; flex-direction:column; align-items:center; gap:12px; width:100%; max-width:900px; margin:0 auto; }
.reel .rl { position:relative; width:100%; aspect-ratio:var(--r); overflow:hidden; background:#000; }
.reel .rl > * { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; aspect-ratio:auto !important; }
.reel.inv { max-width:none; flex:none; } .reel.inv .rl { width:min(100%, calc((100vh - 350px) * var(--r))); cursor:zoom-in; }
.reel .rc { width:min(100%, 520px); display:grid; gap:4px; }
.reel input { width:100%; margin:0; accent-color:var(--accent); }
.reel .rlab { display:flex; justify-content:space-between; gap:6px; }
.reel .rlab button { all:unset; cursor:pointer; font:600 10.5px var(--sans); letter-spacing:.14em; text-transform:uppercase; opacity:.6; padding:2px 0; }
.reel .rlab button:hover { opacity:1; } .reel .rlab button.on { opacity:1; color:var(--accent); } .reel .rlab button:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
#viewer .reel input { accent-color:#ffd45a; } #viewer .reel .rlab button.on { color:#ffd45a; }

/* small additions */
.csheet { display:inline-block; margin-left:14px; font:600 11px var(--sans); letter-spacing:.14em; text-transform:uppercase; text-decoration:none; border-bottom:2px solid var(--accent); padding-bottom:2px; }
.navlink .s { display:none; }
@media (max-width:700px) { .navlink .f { display:none; } .navlink .s { display:inline; } }
.div { display:flex; align-items:center; gap:14px; margin:34px 0 16px; } .div b { font:600 11px var(--sans); letter-spacing:.2em; text-transform:uppercase; } .div i { flex:1; height:1px; background:var(--ink); }

/* profile page: fact sheet and palette */
.facts { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:0 24px; margin:0 0 30px; border-top:3px solid var(--ink); }
.facts > div { padding:10px 0; border-bottom:1px solid var(--line); min-width:0; }
.facts dt { font:600 10px var(--sans); letter-spacing:.18em; text-transform:uppercase; color:var(--mute); }
.facts dd { margin:2px 0 0; font:italic 18px/1.3 var(--serif); overflow-wrap:anywhere; }
.facts .pal dd { display:flex; gap:6px; flex-wrap:wrap; padding-top:4px; } .facts .pal i { width:26px; height:26px; border-radius:50%; border:1px solid var(--line); }
.reel:not(.inv) .rl, .story .cmp { width:min(100%, calc(82vh * var(--r))); }

/* a slider that is always showing: both pictures hold still, and where a tile is cropped and zoomed the wipe still follows the line */
[data-sl] .slwrap.on img { transition:none; }
.tile:hover .slwrap.on img, .gc:not(.cut):hover .slwrap.on img { transform:none; }
.bgrid .bt:hover .slwrap.on img { transform:scale(var(--cz)); }
.gc.cut:hover .slwrap.on img { transform:scale(var(--cz)); }
.bgrid .bt .slwrap.on .cmp .b, .gc.cut .slwrap.on .cmp .b { clip-path:inset(0 0 0 calc(var(--fx) + (var(--p) - var(--fx)) / var(--cz))); }
.gg[data-fit="contain"] .gc.cut:not(.wide) .slwrap.on img { transform:none; }
.gg[data-fit="contain"] .gc.cut:not(.wide) .slwrap.on .cmp .b { clip-path:inset(0 0 0 var(--p)); }
@media (max-width:699px) { .gc.wide.cut .slwrap.on img, .gc.wide.cut:hover .slwrap.on img { transform:none; } .gc.wide.cut .slwrap.on .cmp .b { clip-path:inset(0 0 0 var(--p)); } }
.cmp, .slwrap, [data-sl]:has(.slwrap) { -webkit-user-drag:none; user-select:none; }

/* the full view of a piece with two pictures: both at once */
#stage .both { position:absolute; inset:0; display:flex; gap:14px; }
#stage .both.down { flex-direction:column; }
#stage .both .side { flex:1 1 0; min-width:0; min-height:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; }
#stage .both img { flex:0 1 auto; min-height:0; max-width:100%; max-height:calc(100% - 22px); object-fit:contain; cursor:zoom-in; }
#stage .both .sc { flex:none; color:#bbb; }
