/* =================================================================
   FX — the page's set pieces, each a small self-contained block:
   sung statement · headline words · wired line · ticker · panel fan ·
   floating covers · step cards · receipt · grain and colour wash.
   Behaviour is in fx.js. Everything rests in its final state without
   JavaScript and under prefers-reduced-motion.
   ================================================================= */

.fx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- grain over the whole page, and the cover's colour washing into section corners ---------- */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.wash { position: relative; isolation: isolate; overflow: clip; }
.wash::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  width: min(70vw, 980px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--accent) 26%, transparent), transparent);
  top: -12%; right: -18%;
}
.wash-left::before { right: auto; left: -20%; top: 18%; }
.wash-low::before { top: auto; bottom: -22%; }

/* ---------- 1. the sung statement: words light as the page scrolls, like a lyric being sung ---------- */
.say { padding-block: clamp(70px, 9vw, 140px) clamp(30px, 4vw, 60px); }
.say-text {
  max-width: 21em; font-size: clamp(28px, 3.7vw, 58px); line-height: 1.12; letter-spacing: -0.045em; font-weight: 500;
  color: var(--text); text-wrap: pretty;
}
.say-text .w { color: var(--ghost); border-radius: .22em; padding: 0 .08em; margin: 0 -.08em; transition: color 420ms var(--ease-out), background-color 420ms var(--ease-out); }
.say-text .w.on { color: var(--text); }
.say-text .w.now { color: var(--text); background: var(--accent-soft); }

/* ---------- 6. headlines arrive a word at a time ---------- */
/* the mask is padded on every side (taller than the line box: Switzer's ascenders and accents rise above a
   1.02 line-height), so it hides the word only while it rises in, never trims a finished one */
.hw { display: inline-block; overflow: hidden; vertical-align: bottom; padding: .24em .08em .24em; margin: -.24em -.08em -.24em; }
.hw > span { padding-top: 0; }
.hw > span { display: inline-block; transform: translateY(150%); transition: transform 950ms var(--spring); transition-delay: calc(var(--i) * 55ms); will-change: transform; }
.hw-in .hw > span { transform: none; }

/* ---------- 2. one line, wired to everything Liner knows about it ---------- */
.wire { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: clamp(60px, 12vw, 190px); align-items: center; margin-bottom: clamp(36px, 5vw, 64px); }
.wire svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.wire path { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1000ms var(--ease-out); transition-delay: calc(var(--i) * 240ms + 250ms); }
.wire.in path { stroke-dashoffset: 0; }
.wire-src { position: relative; display: flex; align-items: center; gap: 16px; padding: clamp(22px, 2.6vw, 34px); border-radius: var(--r); background: var(--card); box-shadow: var(--lift); }
.wire-line { flex: 1; font-size: clamp(22px, 2.5vw, 38px); line-height: 1.14; letter-spacing: -0.04em; font-weight: 500; }
.wire-line small { display: block; margin-top: 10px; font-size: 14px; font-weight: 400; letter-spacing: -0.01em; color: var(--muted); }
.wire-dots { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: var(--on-ink); font-size: 22px; line-height: 1; letter-spacing: .04em; padding-bottom: 10px; }
.wire-src::after { content: ''; position: absolute; right: -6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--ink); }
.wire-cards { display: flex; flex-direction: column; gap: 10px; }
.wire-card {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 14px; border-radius: 22px; background: var(--card);
  opacity: .32; transform: translateX(14px); transition: opacity 600ms var(--ease-out), transform 700ms var(--spring);
  transition-delay: calc(var(--i) * 240ms + 1000ms);
}
.wire.in .wire-card { opacity: 1; transform: none; }
.wire-card i { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--tint, var(--well)); color: var(--tint-ink, var(--text)); font-style: normal; font-size: 15px; font-weight: 500; }
.wire-card small { display: block; font-size: 12px; color: var(--muted); }
.wire-card b { display: block; font-size: 15.5px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.25; }
.wire-card em { margin-left: auto; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; transform: scale(0); transition: transform 520ms var(--spring); transition-delay: calc(var(--i) * 240ms + 1250ms); }
.wire-card em::before { content: ''; width: 9px; height: 5px; border-left: 2px solid var(--on-ink); border-bottom: 2px solid var(--on-ink); transform: translateY(-1px) rotate(-45deg); }
.wire.in .wire-card em { transform: none; }

/* ---------- 7. a ticker of what it does, in the page's column ---------- */
.ticker { padding-block: 8px; }
.ticker-band { overflow: hidden; height: 62px; border-radius: 99px; background: var(--ink); color: var(--on-ink); display: flex; align-items: center; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ticker-track { display: flex; flex: none; width: max-content; animation: ticker 46s linear infinite; }
.ticker-track span { display: inline-flex; align-items: center; gap: 22px; padding-right: 22px; font-size: 17px; font-weight: 500; letter-spacing: -0.025em; white-space: nowrap; }
.ticker-track span::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- 4. the panel's views: five cards in a gentle arch ----------
   They never overlap, so hovering never changes which card is in front (the overlapping fan had to, and it
   popped however it was tuned). On arrival they spread out from the centre (--s, set from the scroll); a hover
   is ONE transform transition on the inner card, run by the compositor, with no script per frame. */
.fan-section { overflow: clip; }
.fan {
  --s: 1; --gap: clamp(10px, 1.6vw, 22px);
  position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gap);
  align-items: start; padding: 40px 0 56px; margin-top: clamp(10px, 2vw, 30px);
}
.fan figure {
  --a: max(var(--k), calc(var(--k) * -1));
  margin: 0; aspect-ratio: 9 / 18.4;
  z-index: calc(5 - var(--a));
  /* the arch, and the spread on arrival: each card starts nearer the centre and settles into its column */
  transform:
    translateX(calc(var(--k) * -100% * (1 - var(--s)) * .55))
    translateY(calc(var(--a) * var(--a) * 12px))
    rotate(calc(var(--k) * 2.2deg * var(--s)));
  will-change: transform;
}
.fan-card {
  position: relative; width: 100%; height: 100%; border-radius: 24px; overflow: hidden; background: var(--card);
  box-shadow: 0 0 0 1px var(--rim), 0 30px 50px -30px rgb(13 13 14 / .45), 0 10px 22px -14px rgb(13 13 14 / .2);
  transition: transform 380ms cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
}
.fan figure img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.fan figcaption { position: absolute; left: 10px; bottom: 10px; height: 30px; padding: 0 12px; border-radius: 99px; display: inline-flex; align-items: center; background: var(--ink); color: var(--on-ink); font-size: 12.5px; font-weight: 500; letter-spacing: -0.01em; }
@media (hover: hover) and (pointer: fine) {
  /* lift and straighten: undo the card's tilt so it faces you */
  .fan figure:hover .fan-card { transform: translateY(-18px) rotate(calc(var(--k) * -2.2deg)) scale(1.035); }
}
@media (max-width: 860px) {
  .fan { grid-template-columns: repeat(5, minmax(150px, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-inline: 4px; }
  .fan::-webkit-scrollbar { display: none; }
  .fan figure { scroll-snap-align: center; transform: translateY(calc(var(--a) * var(--a) * 8px)) rotate(calc(var(--k) * 1.5deg)); }
  .fan figcaption { display: none; }
}

/* ---------- 5. covers: a few drift under the song list, and the chosen one flies to the player ---------- */
.try-grid { position: relative; }
.floaters { position: absolute; left: 0; top: 318px; width: 340px; height: 200px; pointer-events: none; }
.floaters svg { position: absolute; width: var(--z); height: var(--z); border-radius: calc(var(--z) * .26); overflow: hidden; box-shadow: var(--lift); translate: 0 calc(var(--py, 0) * var(--d) * 1px); rotate: var(--t); animation: bob var(--b) ease-in-out infinite alternate; }
@keyframes bob { from { transform: translateY(-7px); } to { transform: translateY(7px); } }
.fly-cover { position: fixed; z-index: 80; border-radius: 18px; overflow: hidden; transform-origin: 0 0; pointer-events: none; box-shadow: var(--lift); }

/* ---------- 8. set up: three cards, the one in hand opens ---------- */
.steps { --closed: calc((min(1240px, 100vw - 48px) - 28px) / 4.8); display: flex; gap: 14px; height: clamp(420px, 35vw, 500px); list-style: none; padding: 0; margin: 0; }
.step { position: relative; flex: 1 1 0; min-width: 0; display: flex; border-radius: var(--r); background: var(--card); overflow: hidden; transition: flex-grow 850ms var(--spring); }
.step[data-open] { flex-grow: 2.8; }
.step-copy { flex: none; width: var(--closed); display: flex; flex-direction: column; padding: clamp(20px, 2.2vw, 30px); }
.step-n { display: block; font-size: clamp(56px, 6vw, 96px); line-height: .9; letter-spacing: -0.06em; font-weight: 400; color: var(--tone); font-variant-numeric: tabular-nums; transition: color 400ms ease; }
.step[data-open] .step-n { color: var(--text); }
.step h3 { margin-top: auto; font-size: clamp(21px, 1.9vw, 28px); letter-spacing: -0.045em; line-height: 1.1; font-weight: 500; }
.step-head { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; }
.step-head::after { content: ''; position: absolute; inset: 0; }
.step-head:focus-visible { outline: none; }
.step:has(.step-head:focus-visible) { outline: 3px solid var(--ink); outline-offset: 3px; }
.step p { color: var(--text-3); margin-top: 10px; font-size: 15px; letter-spacing: -0.01em; }
.step .cta-row { position: relative; z-index: 1; margin-top: 18px; }
.step .btn-ghost { background: var(--well); }
.step-media { flex: 1; min-width: 0; margin: 10px 10px 10px 0; border-radius: var(--r-well); overflow: hidden; background: var(--well); opacity: 0; transition: opacity 500ms ease; }
.step[data-open] .step-media { opacity: 1; transition-delay: 220ms; }
.step-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 0%); }

/* ---------- 3. the receipt: what a song with Liner costs ---------- */
.priv-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: clamp(28px, 5vw, 80px); align-items: start; }
.priv-grid .zero-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.priv-grid .zero { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 20px; padding: 18px 26px 20px; }
.priv-grid .zero b { font-size: clamp(64px, 6vw, 88px); }
.priv-grid .zero span { margin-top: 0; }
.priv-grid .zero small { flex-basis: 100%; }
.receipt-slot { position: relative; padding-top: 16px; overflow: hidden; margin-top: 6px; }
/* the printer's slot */
.receipt-slot::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 22px; border-radius: 12px; background: var(--ink); z-index: 2; box-shadow: 0 8px 14px -6px rgb(13 13 14 / .45); }
.receipt {
  --print: 1;
  margin: 0 14px; padding: 34px 22px 30px; background: #fbfaf7; color: #1b1b1d;
  font-size: 13.5px; line-height: 1.5; letter-spacing: -0.005em; font-variant-numeric: tabular-nums;
  transform: translateY(calc((var(--print) - 1) * 100%));
  /* a torn, zig-zag bottom edge */
  --zz: 9px;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(var(--zz) * 2) 100% repeat-x;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(var(--zz) * 2) 100% repeat-x;
  padding-bottom: 44px;
}
.receipt h3 { text-align: center; font-size: 22px; font-weight: 500; letter-spacing: -0.04em; }
.receipt .r-sub { text-align: center; color: #77777b; font-size: 12px; margin-bottom: 14px; }
.receipt dl { margin: 0; padding: 12px 0; border-top: 1.5px dashed #c9c7c1; }
.receipt dl > div { display: flex; align-items: baseline; gap: 8px; }
.receipt dt { flex: none; max-width: 70%; }
.receipt dl > div::after { content: ''; order: 1; flex: 1; border-bottom: 1.5px dotted #c9c7c1; transform: translateY(-3px); }
.receipt dd { order: 2; margin: 0; font-weight: 500; }
.receipt .r-total { border-top: 1.5px dashed #c9c7c1; padding-top: 12px; display: flex; justify-content: space-between; align-items: baseline; font-weight: 500; }
.receipt .r-total b { font-size: 34px; font-weight: 500; letter-spacing: -0.05em; color: var(--accent-ink); }
.receipt .r-bar { height: 44px; margin: 18px 4px 10px; background: repeating-linear-gradient(90deg, #1b1b1d 0 2px, #0000 2px 5px, #1b1b1d 5px 6px, #0000 6px 10px, #1b1b1d 10px 14px, #0000 14px 16px, #1b1b1d 16px 17px, #0000 17px 21px); }
.receipt .r-thanks { text-align: center; font-size: 11.5px; color: #77777b; text-transform: uppercase; letter-spacing: .08em; }

/* ---------- the tour's pictures move: a short loop of the panel doing each thing ---------- */
.tour-clip { width: min(256px, 100%); }
.tour-clip video { display: block; width: 100%; height: auto; aspect-ratio: 540 / 1428; object-fit: cover; border-radius: 28px; background: var(--well); box-shadow: 0 0 0 1px var(--rim), var(--lift); }
.tour-shot-pair.tour-clip { width: min(380px, 100%); }
.tour-shot-pair.tour-clip video { width: 68%; justify-self: end; }

/* ---------- narrow screens ---------- */
@media (max-width: 1020px) {
  .wire { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .wire svg, .wire-src::after { display: none; }
  .wire-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .floaters { display: none; }
  .priv-grid { grid-template-columns: minmax(0, 1fr); }
  .receipt-slot { max-width: 360px; }
}
@media (max-width: 860px) {
  .steps { flex-direction: column; height: auto; }
  .step, .step[data-open] { flex: none; flex-direction: column; }
  .step-copy { width: 100%; }
  .step h3 { margin-top: 18px; }
  .step-media { opacity: 1; flex: none; height: 260px; margin: 0 10px 10px; }
  .step-head { cursor: default; }
}
@media (max-width: 560px) {
  .wire-cards { grid-template-columns: minmax(0, 1fr); }
  .ticker-band { height: 52px; }
  .ticker-track span { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .hw > span { transform: none; transition: none; }
  .say-text .w { color: var(--text); transition: none; }
  .wire path { stroke-dashoffset: 0; transition: none; }
  .wire-card, .wire-card em { opacity: 1; transform: none; transition: none; }
  .ticker-track, .floaters svg { animation: none; }
  .step, .step-media, .fan-card { transition: none; }
  .fan figure { transform: translateY(calc(var(--a) * var(--a) * 12px)) rotate(calc(var(--k) * 2.2deg)); }
}

/* ---------- the closing card, compact: the call on one row, the links, a small wordmark ---------- */
.band { padding: clamp(28px, 3.6vw, 52px) clamp(22px, 4vw, 56px) 0; }
.band-copy { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: 'mark title cta' 'mark lede cta'; column-gap: clamp(18px, 2.4vw, 32px); align-items: center; }
.band .big-mark { grid-area: mark; margin-bottom: 0; }
.band .display { grid-area: title; align-self: end; font-size: clamp(32px, 3.6vw, 52px); }
.band .lede { grid-area: lede; align-self: start; margin-top: 8px; }
.band .cta-row { grid-area: cta; margin-top: 0; flex-wrap: nowrap; }
.band-foot { margin-top: clamp(24px, 3vw, 40px); padding-top: 20px; }
.band-foot .wordmark { font-size: 19cqw; margin-top: 2cqw; text-align: right; margin-left: 0; margin-right: -.04em; }
@media (max-width: 860px) {
  .band-copy { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: 'mark title' 'lede lede' 'cta cta'; row-gap: 14px; }
  .band .display { align-self: center; }
  .band .lede { margin-top: 0; }
  .band .cta-row { flex-wrap: wrap; }
  .band .big-mark { scale: .72; margin: -12px; }
  .band-foot .wordmark { font-size: 30cqw; }
}
