/* T.O.N.I, the conductor (25 Oct). Agents are white Tile creatures; T.O.N.I is magenta. */
body { background: var(--ink-0); }
.tile { display: block; overflow: visible; }

/* hero */
.tn-hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding-top: calc(var(--hd) + 24px);
  background: radial-gradient(60% 50% at 72% 30%, oklch(0.28 0.1 358 / .55), transparent 70%), var(--ink-0); }
.tn-spot { position: absolute; top: -10%; left: 72%; width: 46vw; height: 110%; transform: translateX(-50%); pointer-events: none;
  background: linear-gradient(180deg, oklch(1 0 0 / .1), oklch(1 0 0 / .03) 60%, transparent); clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%); filter: blur(10px); }
.tn-hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 32px; align-items: center; flex: 1; }
.tn-h1 { margin: 0; font: 900 clamp(2.8rem, 5.6vw, 6rem)/.92 var(--f-display); letter-spacing: -0.045em; max-width: 12ch; }
.tn-h1 em { font-style: normal; color: #FF0A7A; }
.tn-lead { margin: 22px 0 0; max-width: 46ch; font-size: clamp(1.02rem, 1.3vw, 1.2rem); line-height: 1.55; color: var(--fg-2); }
.tn-ctas { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-top: 30px; }

.tn-podium { position: relative; justify-self: center; display: flex; flex-direction: column; align-items: center; padding: 0; border: 0; background: none; color: var(--fg); cursor: pointer; }
.tn-podium .toni-big { width: min(40vh, 400px); height: auto; aspect-ratio: 12.4 / 11.2; filter: drop-shadow(0 0 60px oklch(0.6 0.24 358 / .55)); transition: transform .5s var(--ease); }
.tn-podium:hover .toni-big { transform: translateY(-6px); }
.tn-podium:focus-visible { outline: 2px solid #E6007E; outline-offset: 10px; }
.tn-podium-base { display: block; width: min(30vh, 300px); height: 22px; margin-top: -14px; background: linear-gradient(180deg, oklch(0.3 0.01 358), oklch(0.2 0.008 358)); box-shadow: 0 30px 60px rgb(0 0 0 / .6); }
.tn-podium-name { margin-top: 16px; text-align: center; }
.tn-podium-name b { display: block; font: 900 1.6rem/1 var(--f-display); }
.tn-podium-name small { display: block; margin-top: 6px; font: 400 10px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: #FF0A7A; }

/* the stadium of agents */
.tn-stadium { position: relative; z-index: 1; padding: 12px var(--pad) 0; margin-top: 18px;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.st-row { display: flex; justify-content: center; margin-top: -10px; transform: translateY(calc(var(--r) * 2px)); }
.st-row:first-child { margin-top: 0; }
.st-seat { width: 46px; height: 42px; flex: none; opacity: calc(1 - var(--r) * .12); }
.st-row:nth-child(2) .st-seat { width: 50px; height: 45px; }
.st-row:nth-child(3) .st-seat { width: 54px; height: 49px; }

/* what T.O.N.I does */
.tn-does { padding: clamp(96px, 14vh, 160px) 0 clamp(64px, 10vh, 120px); }
.tn-head .h2 { max-width: 18ch; }
.tn-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 44px; }
.ts { padding: 24px 22px 26px; border: 1px solid var(--rule-soft); background: oklch(0.155 0.008 358 / .7); transition: border-color .3s, transform .5s var(--ease); outline: none; }
.ts:hover, .ts:focus-visible { border-color: #E6007E; transform: translateY(-4px); }
.ts-cast { display: flex; align-items: flex-end; gap: 4px; height: 70px; margin-bottom: 22px; }
.ts-cast .ts-toni { width: 70px; height: 64px; }
.ts-cast .ts-agent { width: 46px; height: 42px; }
.ts h3 { margin: 0; font: 900 1.4rem/1.05 var(--f-display); letter-spacing: -0.02em; }
.ts p { margin: 10px 0 0; color: var(--fg-2); font-size: .95rem; line-height: 1.5; }

/* the orchestra on this page */
.tn-hero + .tn-does + .orch, .orch { border-top: 1px solid var(--rule-soft); }

/* people direct */
.tn-people { padding: clamp(96px, 14vh, 160px) 0; }
.tn-people-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.tn-people .body { max-width: 48ch; color: var(--fg-2); margin: 18px 0 22px; }
.tn-gates { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.tn-gates li { display: grid; grid-template-columns: 14px 1fr; gap: 6px 18px; padding: 22px 0; border-top: 1px solid var(--rule-soft); }
.tn-gates li::before { content: ""; grid-row: span 2; width: 10px; height: 10px; margin-top: 7px; background: #E6007E; }
.tn-gates b { font: 800 1.25rem/1.15 var(--f-display); }
.tn-gates span { color: var(--fg-2); }

[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform 1s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

@media (max-width: 899px) {
  .tn-hero-grid { grid-template-columns: 1fr; gap: 8px; }
  .tn-podium { order: -1; }
  .tn-podium .toni-big { width: min(52vw, 230px); }
  .tn-podium-base { width: min(40vw, 180px); }
  .tn-spot { left: 50%; width: 90vw; }
  .tn-steps { grid-template-columns: 1fr 1fr; }
  .tn-people-grid { grid-template-columns: 1fr; gap: 32px; }
  .st-seat { width: 38px; height: 35px; }
}
@media (max-width: 559px) { .tn-steps { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }
@media (max-width: 899px) { .tn-podium { margin-bottom: 28px; } .tn-hero { padding-top: calc(var(--hd) + 8px); } }

/* 13 Nov 2026: the orchestra room re-arranged on desktop (same pieces, new places). The agent card used to sit in the
   top-left corner, away from where people look; the controls sat in the opposite corner. Now the controls are one centred
   row above the arc, and the card is a wide centred panel straight under T.O.N.I and the caption, so the conductor and
   "who is playing" read together. The arc is sized from the screen height so controls, arc and card share one screen.
   orchestra.js sees the card is in the flow and keeps it at the height of its tallest agent (no jumps on hover). */
@media (min-width: 900px) {
  .orch.is-arc .orch-room { display: flex; flex-direction: column; }
  .orch.is-arc .orch-ctl { order: 0; position: relative; inset: auto; width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; text-align: center; }
  .orch.is-arc .orch-flows { margin-top: 0; justify-content: center; }
  .orch.is-arc .orch-stage-wrap { order: 1; }
  .orch.is-arc .orch-stage { height: clamp(460px, calc(100svh - 380px), 700px); }
  .orch.is-arc .orch-caption { margin-top: 4px; }
  .orch.is-arc .orch-card { order: 2; position: relative; left: auto; top: auto; z-index: 6; box-sizing: border-box; width: min(960px, 100%); margin: 14px auto 0;
    grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.2fr); gap: 4px 20px; align-content: center; padding: 18px 24px; border-radius: 16px;
    background: oklch(0.17 0.008 358 / .94); border: 1px solid oklch(0.32 0.012 358); box-shadow: 0 30px 70px -36px rgb(0 0 0 / .8); }
  .orch.is-arc .orch-card small, .orch.is-arc .orch-card > b, .orch.is-arc .orch-card > p { grid-column: 2; }
  .orch.is-arc .orch-card-av { grid-column: 1; grid-row: 1 / span 3; align-self: center; }
  .orch.is-arc .orch-sop { grid-column: 3; grid-row: 1 / span 3; align-self: center; margin: 0; padding: 0 0 0 20px; border-top: 0; border-left: 1px solid var(--rule-soft); }
  .orch.is-arc .orch-legend { order: 3; margin-top: 28px; }
}

/* 13 Nov 2026: the room pins. On desktop with motion (orchestra.js adds .is-pin) the controls, arc and card hold one full
   screen, centred, for about one and a half screens of scrolling while the scroll hands the baton from agent to agent;
   then the desk list and the rest of the page follow. Phones, tablets and reduced motion keep the normal flow. */
.orch-pin-gap { display: none; }
@media (min-width: 900px) {
  .orch.is-pin { overflow: clip; }   /* hidden would stop the room from sticking */
  .orch.is-pin .orch-pin-gap { display: block; height: 150vh; }
  .orch.is-pin .orch-room { position: sticky; top: 0; z-index: 2; height: 100svh; box-sizing: border-box; margin-top: clamp(20px, 4vh, 44px);
    justify-content: center; padding: calc(var(--hd, 80px) + clamp(6px, 1.6vh, 18px)) 0 clamp(14px, 2.6vh, 28px); }
  .orch.is-pin .orch-stage { height: clamp(360px, calc(100svh - 420px), 700px); }
  .orch.is-pin .orch-card { margin-top: clamp(8px, 1.4vh, 14px); }
  .orch.is-pin .orch-legend { margin-top: clamp(24px, 4vh, 44px); }
}

/* 13 Nov 2026: the laser. Before a play-through, pointing at an agent fires a straight beam from T.O.N.I's baton tip,
   ending at a ring round that agent (orchestra.js draws it; it clears the moment T.O.N.I starts conducting) */
.orch-laser { stroke: #FF0A7A; stroke-width: 2; stroke-linecap: round; filter: drop-shadow(0 0 5px rgb(255 10 122 / .9)); animation: orch-laser-in .18s ease-out; }
.orch-laser-dot { fill: none; stroke: #FF0A7A; stroke-width: 1.5; filter: drop-shadow(0 0 6px rgb(255 10 122 / .8)); animation: orch-laser-lock .3s cubic-bezier(.16, 1, .3, 1); transform-box: fill-box; transform-origin: center; }
@keyframes orch-laser-in { from { opacity: 0; } }
@keyframes orch-laser-lock { from { opacity: 0; transform: scale(1.6); } }
@media (prefers-reduced-motion: reduce) { .orch-laser, .orch-laser-dot { animation: none; } }

/* 13 Nov 2026: tighter highlights. The seats wake up with a ripple (each one delayed by up to ~1s), but that delay used to
   stay on every later change, so a called agent lit up late. Once the room has woken (.is-settled), or as soon as
   T.O.N.I conducts, seats react at once, and the highlight itself is quicker. */
.orch.is-settled .orch-seat, .orch.is-playing .orch-seat { transition-delay: 0s; transition-duration: .2s; }
.orch.is-settled .orch-seat.is-called, .orch.is-playing .orch-seat.is-called { transition-duration: .16s; }
/* the wake-up rule (.orch.is-awake .orch-seat { transform: none }) also cancelled the hover and "called" enlargement;
   these bring them back, so the active agent pops at once */
.orch.is-awake .orch-seat:hover, .orch.is-awake .orch-seat:focus-visible { transform: scale(1.55); }
.orch.is-awake .orch-seat.is-called { transform: scale(1.75); }

/* 13 Nov 2026: the conducting line keeps time with the agent: it draws in about 0.2s, the same beat as the agent lighting up */
.orch-baton { transition: stroke-dashoffset .2s cubic-bezier(.16, 1, .3, 1), opacity .3s; }
