/* Asta Studio / Aqua: work tile art (round 4, 2026-11-17, Ryan's review). Loaded on the home page, /work/ and the
   audience pages (partials/head.html); markup in partials/tile-art.html, behaviour in tiles.js.
   chart      the thai.tattoo traffic curve (drawn by main.js, draws on when the tile is in view, as on ryanastaphan.com)
   pan        a website's full-page capture panning inside a browser frame, with a phone, on the brand's mesh
              (round 5: every tile looped on its own while on screen; round 6: only the spotlit tile moves, one at a
              time in grid order, see tiles.js)
   scheduler  a day timeline: ride requests assigned to vans one by one, then the honest production figure
   radiant    a phone cycling three replica screens, tilting with the pointer
   langs      (round 5b, Busy Bees, a pan tile) the page changes language with a flag "poof" while it pans
   Overrides of style.css (.pcard-media img, the live-tile zoom) are scoped to .ta so other cards are untouched. */

/* brand meshes for the new website tiles */
.mesh-gold { --c1: #1d160a; --c2: #c9a227; --c3: #f1dd9c; --c4: #6b4f12; --bg: #8a6a1c; }
.mesh-forest { --c1: #0c2a1f; --c2: #2f7d4f; --c3: #d9b64a; --c4: #0a1c15; --bg: #1d4d36; }
.mesh-blush { --c1: #3a1630; --c2: #f0c2b8; --c3: #b8607a; --c4: #241020; --bg: #6d2f4f; }

.pcard .ta.pcard-media { display: block; }
.pcard .ta.pcard-media img { transform: none; transition: none; }

/* ---------- chart ---------- */
.ta-chart.ta-chart { position: absolute; inset: 12px; z-index: 1; width: auto; display: flex; flex-direction: column; padding: 12px 14px 10px; border-radius: 16px; }
.ta-chart figcaption { margin-bottom: 4px; font-size: .82rem; gap: 2px 10px; }
.ta-chart figcaption .mono { font-size: .72rem; }
.ta-chart .chart-svg { flex: 1 1 0; height: auto; min-height: 0; }
.ta-chart-note { margin: 4px 0 0 !important; color: rgba(255, 255, 255, .9) !important; font-size: .66rem !important; }
.ta-chart .chart-svg .line { stroke-width: 2.6; }
.pcard-live .ta-chart, .fcard .ta-chart { top: 48px; }
/* round 5: the full draw, looped by tiles.js (.ta-run): the line follows the head, a readout (month, visitors a day)
   rides on it, the counters climb to the headline numbers, the area fills in at the end, a hold, a fade, again. */
.ta-chart figcaption { order: 0; }
.ta-chart .chart-svg { order: 2; }
.ta-chart-note { order: 3; }
.ta-chart-nums { order: 1; margin: 0 0 2px !important; display: flex; flex-wrap: wrap; gap: 0 16px; pointer-events: none; color: #fff !important; line-height: 1.1; }
.ta-chart-nums span { font-family: var(--mono); font-size: .7rem; opacity: .95; white-space: nowrap; }
.ta-chart-nums b { font-family: var(--display); font-size: clamp(1.05rem, .9vw + .6rem, 1.5rem); font-weight: 400; letter-spacing: -.01em; font-variant-numeric: tabular-nums; display: inline-block; min-width: 2.75em; margin-right: 3px; }
.ta-chart.ta-run .chart-svg .line { transition: opacity .5s; }
.ta-chart.ta-run .chart-svg .area { opacity: 0; transition: opacity .9s; }
.ta-chart.ta-run.ta-done .chart-svg .area { opacity: 1; }
.ta-chart.ta-run.ta-fade .chart-svg .line, .ta-chart.ta-run.ta-fade .chart-svg .area, .ta-chart.ta-run.ta-fade .ta-head { opacity: 0; transition: opacity .5s; }
.ta-head { pointer-events: none; transition: opacity .3s; }
.ta-head .hd { fill: #fff; filter: drop-shadow(0 2px 6px rgba(30, 0, 60, .5)); }
.ta-head .hr { fill: none; stroke: #fff; stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.ta-done .ta-head .hr { animation: ta-ring 1.6s ease-out infinite; }
@keyframes ta-ring { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(3.2); } }
.ta-head .pill { fill: #fff; }
.ta-head text.rd { fill: #1b1030; font-size: 10.5px; font-weight: 700; }

/* ---------- pan: browser frame + phone ---------- */
.ta-browser { position: absolute; left: 6%; top: 12%; bottom: -2%; width: 74%; z-index: 1; display: flex; flex-direction: column; border-radius: 12px 12px 0 0; overflow: hidden; background: #fff; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .28); }
.ta-bar { flex: none; display: flex; align-items: center; gap: 5px; height: 16px; padding: 0 9px; background: #ecebf3; }
.ta-bar i { width: 6px; height: 6px; border-radius: 50%; background: #c7c4d6; }
.ta-view { position: relative; flex: 1; min-height: 0; overflow: hidden; container-type: size; }
.pcard .ta.pcard-media .ta-page { position: static; display: block; width: 100%; height: auto; max-width: none; object-fit: fill; transform: translateY(0); }
/* round 6 (the spotlight, tiles.js): the page pans only while its tile is the spotlight (.spot on the media): a beat
   at the top, down to the bottom over most of the slot (--spot-ms, set by tiles.js), a hold; if the tile is held by
   hover or focus it then goes back up, and so on. Out of the spotlight tiles.js glides it back to the top. Without
   JS the page shows its top. */
@keyframes ta-spot-pan {
  0%, 7% { transform: translateY(0); }
  88%, 100% { transform: translateY(calc(-100% + 100cqh)); }
}
.pcard .ta--pan .ta-page { animation: none; will-change: transform; }
.pcard .ta--pan.spot .ta-page { animation: ta-spot-pan var(--spot-ms, 9000ms) cubic-bezier(.45, .05, .55, .95) infinite alternate both; }

/* round 6, the spotlight: in a grid tiles.js runs (.spot-grid), every CSS animation inside a tile's media (the brand
   mesh drift, the live-tag pulse, wires, the running arrow, the flag puff, the readout ring) is paused unless that
   tile is the spotlight (.is-spot). .ta-nt switches transitions off while tiles.js sets a resting state. */
.spot-grid .pcard-media, .spot-grid .pcard-media *, .spot-grid .pcard-media *::before, .spot-grid .pcard-media *::after { animation-play-state: paused !important; }
.spot-grid .is-spot .pcard-media, .spot-grid .is-spot .pcard-media *, .spot-grid .is-spot .pcard-media *::before, .spot-grid .is-spot .pcard-media *::after { animation-play-state: running !important; }
.ta-nt, .ta-nt *, .ta-nt *::before, .ta-nt *::after { transition: none !important; }
/* round 6 (the owner): a thin progress line along the bottom of the spotlit card fills over its slot (--prog-ms, set
   by tiles.js), then goes with the spotlight; held by hover or focus it fills, then stays full. .pcard-in clips it
   to the rounded corner. tiles.js restarts it with .prog-re when the same tile gets another slot. */
.spot-grid .pcard.is-spot .pcard-in::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; height: 3px; pointer-events: none;
  background: linear-gradient(90deg, var(--violet), var(--pink) 60%, var(--orange)); transform-origin: 0 50%; transform: scaleX(0);
  animation: ta-prog var(--prog-ms, 8000ms) linear forwards; }
.spot-grid .pcard.is-spot.prog-re .pcard-in::after { animation-name: ta-prog-re; }
@keyframes ta-prog { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ta-prog-re { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .spot-grid .pcard.is-spot .pcard-in::after { display: none; } }
.ta-phone { position: absolute; right: 5%; bottom: 7%; z-index: 2; height: 74%; aspect-ratio: 240 / 519; border-radius: 13px; padding: 3px; background: #0b0b10; box-shadow: 0 20px 34px -14px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .15); transition: transform .8s var(--ease); }
.pcard .ta.pcard-media .ta-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top center; border-radius: 10px; }
.pcard-art[data-art="pan"] .pcard-in:hover .ta-phone { transform: translateY(-8px) rotate(2deg); }
.ta--pan .tag { z-index: 3; }
/* /work/: the Real project / Concept badge sits top right, so the frame and the phone start lower */
.fcard .ta-browser { top: 17%; }
.fcard .ta-phone { height: 68%; bottom: 5%; }

/* ---------- round 5b: Busy Bees changes language while it pans ----------
   .ta-langs is the panned page (it takes the ta-pan animation): the first language sits in the flow and gives the
   height, the others lie on top of it. tiles.js moves .on to the next language every data-every ms while the tile is
   on screen: the page crossfades (with a brief soft blur, the "poof") and the matching flag badge pops in with a puff. */
.pcard .ta.pcard-media .ta-langs { position: relative; }
.pcard .ta.pcard-media .ta-langs .ta-lang { display: block; width: 100%; height: auto; max-width: none; opacity: 0; filter: blur(5px); transform: scale(1.015); transform-origin: 50% 0;
  transition: opacity .55s ease, filter .6s ease, transform .7s var(--ease); }
.pcard .ta.pcard-media .ta-langs .ta-lang + .ta-lang { position: absolute; left: 0; top: 0; }
.pcard .ta.pcard-media .ta-langs .ta-lang.on { opacity: 1; filter: none; transform: none; }
.ta-flags { position: absolute; z-index: 3; left: 43%; top: calc(12% + 8px); width: 0; height: 0; pointer-events: none; }
.fcard .ta-flags { top: calc(17% + 8px); }
.ta-flag { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 4px; border-radius: 999px; background: #fff; color: #17142a; white-space: nowrap;
  font-size: .78rem; line-height: 1; box-shadow: 0 10px 24px -10px rgba(40, 20, 0, .55), 0 0 0 1px rgba(0, 0, 0, .06); opacity: 0; transform: translate(-50%, -50%) scale(.5); transition: opacity .25s, transform .3s var(--ease); }
.ta-flag b { font-weight: 700; }
.ta-flag svg { flex: none; width: 20px; height: 20px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.ta-flag.on { opacity: 1; transform: translate(-50%, -50%); }
.ta-flag.pop { animation: ta-flag-pop .55s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes ta-flag-pop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 55% { opacity: 1; transform: translate(-50%, -50%) scale(1.16); } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
/* the puff: a ring and six specks that burst out of the badge and fade */
.ta-flag::before, .ta-flag::after { content: ""; position: absolute; left: 50%; top: 50%; pointer-events: none; opacity: 0; }
.ta-flag::before { width: 100%; height: 100%; border-radius: 999px; border: 2px solid rgba(255, 255, 255, .9); transform: translate(-50%, -50%); }
.ta-flag::after { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: rgba(255, 255, 255, .95);
  box-shadow: -34px -14px 0 -1px #fff, 34px -14px 0 -1px #fff, -42px 8px 0 -2px #ffe27a, 42px 8px 0 -2px #ffe27a, 0 -22px 0 -1px #fff, 0 22px 0 -2px #ffe27a; transform: scale(.3); }
.ta-flag.pop::before { animation: ta-puff-ring .6s ease-out both; }
.ta-flag.pop::after { animation: ta-puff-dots .6s ease-out both; }
@keyframes ta-puff-ring { 0% { opacity: .9; transform: translate(-50%, -50%) scale(.9); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.6, 2.2); } }
@keyframes ta-puff-dots { 0% { opacity: 1; transform: scale(.3); } 70% { opacity: .9; } 100% { opacity: 0; transform: scale(1.25); } }

/* ---------- scheduler: the day plan ---------- */
.ta-sched { --lab: 3.4em; position: absolute; inset: 0; z-index: 1; display: grid; grid-template-rows: minmax(0, 1fr) auto auto auto; gap: 5px; padding: 48px 5% 12px; color: #fff; font-size: clamp(10px, .35vw + 8.4px, 13px); }
.sk-board { position: relative; display: grid; grid-template-rows: repeat(5, minmax(0, 1fr)); min-height: 0; }
.sk-row { display: flex; align-items: center; min-height: 0; }
.sk-lab { flex: none; width: var(--lab); font-family: var(--mono); font-size: .86em; opacity: .72; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; transition: opacity .3s, color .3s; }
.sk-lane .sk-lab { opacity: 1; color: #ffd23d; }
.sk-lane .pulse { width: 6px; height: 6px; }
.sk-track { position: relative; flex: 1; align-self: stretch; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.sk-lane .sk-track { border-bottom: 1px dashed rgba(255, 210, 61, .5); }
.sk-van.hit .sk-lab { opacity: 1; color: #6be0b4; }
.sk-rides { position: absolute; top: 0; bottom: 0; left: var(--lab); right: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, .13) 1px, transparent 1px) 0 0 / 25% 100%; box-shadow: inset -1px 0 rgba(255, 255, 255, .13); }
.sk-ride { position: absolute; left: var(--l); width: var(--w); top: calc((var(--r) + 1) * 20%); height: 20%; }
.sk-ride i { position: absolute; left: 0; right: 0; top: 24%; bottom: 24%; border-radius: 999px; background: var(--vc, #6be0b4); box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .5); transform-origin: 0 50%; opacity: 0; transform: scaleX(.2); transition: opacity .25s, transform .45s var(--ease); }
.sk-ride i::before, .sk-ride i::after { content: ""; position: absolute; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; }
.sk-ride i::before { left: 2px; background: #fff; }
.sk-ride i::after { right: 2px; background: #0b0b10; }
.sk-ride.is-placed i { opacity: 1; transform: none; }
.sk-ride.v0 { --vc: #6be0b4; }
.sk-ride.v1 { --vc: #ffd23d; }
.sk-ride.v2 { --vc: #ff8ab4; }
.sk-ride.v3 { --vc: #7fd3ff; }
.sk-req { position: absolute; top: 50%; left: min(var(--l, 0%), calc(100% - 13.5em)); display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 999px; background: #fff; color: var(--ink); font-family: var(--mono); font-size: .9em; line-height: 1; white-space: nowrap; box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .6); opacity: 0; transform: translateY(-50%) scale(.9); transition: opacity .25s, transform .3s var(--ease), left .3s var(--ease); }
.sk-req b { font-weight: 600; }
.sk-req em { font-style: normal; font-weight: 700; color: #0d7a5a; }
.sk-req.on { opacity: 1; transform: translateY(-50%); }
.sk-ticks { display: flex; justify-content: space-between; margin-left: var(--lab); font-family: var(--mono); font-size: .78em; opacity: .7; }
.sk-ticks span:first-child { transform: translateX(-2px); }
.sk-meta { margin: 2px 0 0 !important; display: flex; justify-content: space-between; gap: 10px; font-size: .84em; color: rgba(255, 255, 255, .78) !important; }
.sk-n b { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.sk-note { text-align: right; }
.sk-count { margin: 0 !important; color: #fff !important; font-weight: 800; font-size: 1.12em !important; line-height: 1.2; }
.sk-count .fn-ref a { color: #fff; }

/* ---------- radiant: the phone ---------- */
.ta-radiant { position: absolute; inset: 0; z-index: 1; --rx: 6deg; --ry: -16deg; --px: 0px; --py: 0px; }
.ra-labels { position: absolute; left: 6%; top: 50%; z-index: 2; margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; transform: translate(calc(var(--px) * -1), calc(-50% - var(--py))); transition: transform .6s var(--ease); }
.ra-labels li { display: inline-flex; align-items: center; gap: 7px; justify-self: start; padding: 6px 11px 6px 8px; border-radius: 999px; background: rgba(255, 255, 255, .34); border: 1px solid rgba(255, 255, 255, .55); color: #102040; font-weight: 700; font-size: clamp(.7rem, .3vw + .58rem, .86rem); white-space: nowrap; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background .4s, color .4s, transform .4s var(--ease); }
.ra-labels li i { width: 7px; height: 7px; border-radius: 50%; background: rgba(16, 32, 64, .35); transition: background .4s; }
.ra-labels li.on { background: #fff; color: #0b0b10; transform: translateX(6px); box-shadow: 0 10px 22px -12px rgba(10, 20, 60, .55); }
.ra-labels li.on i { background: #0ea5e9; }
.ra-tilt { position: absolute; left: 56%; top: 9%; height: 112%; aspect-ratio: 400 / 860; perspective: 900px; }
.ra-device { position: relative; width: 100%; height: 100%; border-radius: 16% / 7.5%; padding: 3.2%; background: #0b0b10; box-shadow: 0 46px 60px -28px rgba(10, 20, 70, .65), 0 0 0 1px rgba(255, 255, 255, .25) inset;
  transform: rotateX(var(--rx)) rotateY(var(--ry)) rotateZ(3deg); transform-style: preserve-3d; transition: transform .7s var(--ease); }
.pcard .ta.pcard-media .ra-scr { position: absolute; left: 3.2%; top: 1.5%; width: 93.6%; height: 97%; object-fit: cover; object-position: top center; border-radius: 13% / 6.2%; opacity: 0; transform: translateX(8%); transition: opacity .7s, transform .9s var(--ease); }
.pcard .ta.pcard-media .ra-scr.on { opacity: 1; transform: none; }
.pcard .ta.pcard-media .ra-scr.out { opacity: 0; transform: translateX(-8%); }
.ra-cap-t { position: absolute; left: 6%; bottom: 10px; z-index: 2; margin: 0 !important; color: #102040 !important; font-size: .7rem !important; opacity: .8; }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .pcard .ta--chart.pcard-media { aspect-ratio: 4 / 3.3; }
  .ta-chart figcaption .mono { display: none; }
  .ta-sched { --lab: 3.1em; padding-top: 46px; gap: 4px; }
  .sk-note { display: none; }
  .ra-tilt { left: 54%; }
  .ta-phone { height: 70%; }
}

/* ---------- reduced motion: everything holds its final, readable state ---------- */
@media (prefers-reduced-motion: reduce) {
  .pcard .ta.pcard-media .ta-page, .ta-phone, .ra-device, .ra-labels, .pcard .ta.pcard-media .ra-scr, .sk-ride i, .sk-req { transition: none !important; }
  .pcard .ta--pan .ta-page { animation: none !important; transform: none; }
  .pcard .ta.pcard-media .ta-langs .ta-lang, .ta-flag { transition: none !important; animation: none !important; }
  .pcard-art .pcard-in:hover .ta-phone { transform: none; }
}
