/* Meet the Uwees */

/* 1. the tower */
/* the S2 template in site.css shows the cutaway tower whole under the nav; the copy sits on the navy band beneath it, no gradient over the picture */
.tower { background: var(--navy); }
.tower .wrap { padding-block: clamp(28px, 4vw, 52px); }
.tower h1, .tower .lede { color: var(--on-dark); }
.tower .lede { max-width: 60ch; margin-bottom: 0; }

/* the map pins on the tower: one per floor, one at the front door (X16, X17) */
.tower-pins { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.tower-pin { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; width: 34px; height: 34px; padding: 0; border: 2px solid var(--navy); border-radius: 50%; background: var(--amber); color: var(--navy); font-family: var(--ui); font-weight: 700; font-size: .9rem; cursor: pointer; box-shadow: 0 4px 14px rgba(17,22,39,.45); transition: transform .18s var(--ease), background-color .18s var(--ease); }
.tower-pin .n { display: grid; place-items: center; width: 100%; height: 100%; }
.tower-pin .tip { position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); white-space: nowrap; background: var(--paper); color: var(--ink); font-size: .85rem; font-weight: 600; padding: 6px 10px; border-radius: 8px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .15s var(--ease); }
.tower-pin--door .tip { left: auto; right: calc(100% + 10px); }
.tower-pin:hover, .tower-pin:focus-visible, .tower-pin.is-lit { transform: translate(-50%, -50%) scale(1.15); background: #fff; }
.tower-pin:hover .tip, .tower-pin:focus-visible .tip, .tower-pin.is-lit .tip { opacity: 1; }
.tower-pin:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
@media (max-width: 700px) { .tower-pins { display: none; } }

/* 2. the room map: Astra's layout (X16): the intro and Biscuit's front door on the left, the nine floors in tower order on the right */
.room-map { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 36px; align-items: start; }
.room-map__intro h2 { margin: 0 0 10px; }
.room-map__intro .lede { margin: 0 0 18px; }
.pip-spot { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; margin: 0 0 20px; } /* X13: Pip's worktable pose, small */
.pip-spot img { width: 96px; height: auto; display: block; }
.pip-spot figcaption, .room-cap { display: grid; gap: 2px; }
.pip-spot b, .room-cap b { font-family: var(--head); font-size: 1.15rem; }
.room-map .role { font-family: var(--ui); font-size: 1rem; font-weight: 700; color: var(--ink); } /* rule 6: role lines larger and heavier */
.room-map q { font-family: var(--serif-accent); font-style: italic; font-weight: 500; font-size: 1.2rem; line-height: 1.3; color: var(--amber-ink); quotes: "\201C" "\201D"; }
.room-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 14px; }
.room { display: grid; gap: 8px; width: 100%; padding: 0; border: 0; background: none; text-align: left; color: var(--ink); cursor: pointer; font: inherit; border-radius: 12px; }
.room-art { position: relative; display: block; aspect-ratio: 1672 / 941; border-radius: 12px; overflow: hidden; background: var(--navy-2); }
.room-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s var(--ease); }
.room-floor { position: absolute; left: 8px; top: 8px; background: var(--amber); color: var(--navy); font-family: var(--ui); font-weight: 700; font-size: .75rem; padding: 3px 8px; border-radius: 999px; }
.room .room-cap b::after { content: " \2192" / ""; display: inline-block; margin-left: .25em; transition: transform .18s var(--ease); } /* rule 5: a text link ends with an arrow */
.room:hover .room-art img, .room:focus-visible .room-art img, .room.is-lit .room-art img { transform: scale(1.05); }
.room:hover .room-cap b::after, .room:focus-visible .room-cap b::after, .room.is-lit .room-cap b::after { transform: translateX(3px); }
.room:focus-visible { outline: 3px solid var(--amber); outline-offset: 4px; }
.room-grid .room-cap b { font-size: 1rem; }
.room-grid .room .role { font-size: .88rem; line-height: 1.25; }
.room--door .room-cap b { font-size: 1.3rem; }
@media (max-width: 960px) { .room-map { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .room-grid { grid-template-columns: 1fr 1fr; gap: 14px 10px; } .room-grid .room .role { font-size: .82rem; } }

/* 3. the cast: collector cards. 5:7 portrait, name top left, step number top right, the still on a transparent canvas,
   a lane-color border by step, the step name or the hero foil in the foot, the card number over the total. */
/* the filter: a sticky column on the left (R02), the cards to its right; on a phone it sits above the cards and wraps */
.cast-layout { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 40px; align-items: start; }
.cast-controls { position: sticky; top: 92px; display: grid; gap: 8px; }
.cast-controls .label { margin: 6px 0 0; }
.cast-controls .chips { display: flex; flex-direction: column; gap: 4px; }
.cast-controls .chip { cursor: pointer; justify-content: space-between; background: var(--card); min-height: 44px; padding-inline: 14px; font-family: var(--ui); font-size: .92rem; width: 100%; }
.cast-controls .chip .k { font-size: .78rem; color: var(--muted); margin-left: auto; }
.cast-controls .chip .dot, .step-chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lane, var(--ink)); flex: 0 0 auto; }
.cast-controls .chip.is-on { background: var(--navy); border-color: var(--navy); color: var(--paper); }
.cast-controls .chip.is-on .k { color: var(--on-dark-2); }
.cast-controls .count { font-family: var(--ui); font-size: .85rem; color: var(--muted); margin: 6px 0 0; }
@media (max-width: 860px) {
  .cast-layout { grid-template-columns: 1fr; gap: 20px; }
  .cast-controls { position: static; }
  .cast-controls .chips { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .cast-controls .chip { width: auto; }
}
.card-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px 16px; align-items: start; }
.group-head { grid-column: 1 / -1; padding: 10px 0 0; }
.group-head h3 { display: flex; gap: 12px; align-items: center; font-size: 1.4rem; margin: 0; }
.group-head h3 .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--lane, var(--ink)); color: #fff; font-family: var(--ui); font-size: .9rem; }
.group-head p { margin: 4px 0 0; color: var(--muted); max-width: 60ch; }
.ucard { padding: 0; border: 0; background: none; overflow: visible; perspective: 900px; }
.ucard-open { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; color: inherit; border-radius: 16px; }
.ucard-open:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.ucard-face { position: relative; display: grid; grid-template-rows: auto 1fr auto; aspect-ratio: 5 / 7; width: 100%; border-radius: 16px; border: 3px solid var(--lane, var(--ink)); background: var(--card); overflow: hidden; transition: transform .2s var(--ease), box-shadow .25s var(--ease); transform-style: preserve-3d; }
.ucard.is-hot .ucard-face, .ucard:focus-within .ucard-face { box-shadow: var(--shadow); }
.ucard.is-hit .ucard-face { outline: 3px solid var(--amber); outline-offset: 3px; }
/* the glare: a light sweep across the card face, stacked under the art (the art is z 2), so it never touches the still */
.ucard-glare { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.75) 0%, rgba(255,255,255,.18) 28%, transparent 56%); transition: opacity .25s var(--ease); }
.ucard.is-hot .ucard-glare { opacity: 1; }
.ucard-top { position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 0; }
.uname { font-family: var(--head); font-size: 1.15rem; line-height: 1.1; }
.ustep { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--lane, var(--ink)); color: #fff; font-family: var(--ui); font-size: .8rem; font-weight: 700; flex: 0 0 auto; }
.ucard-art { position: relative; z-index: 2; display: grid; place-items: end center; padding: 6px 8px 0; }
.ucard-art .uwee { width: 100%; } /* the still fills the art well edge to edge (about 210px at desktop, far under its 900px native) so the figure carries the card */
.ucard-foot { position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: center; padding: 8px 12px 10px; border-top: 1px solid var(--rule); font-family: var(--ui); font-size: .78rem; color: var(--ink-2); }
.ufoot.foil { font-weight: 700; color: var(--amber-ink); background: linear-gradient(100deg, #b7791a, #f1c25b 45%, #b7791a); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.unum { color: var(--muted); font-variant-numeric: tabular-nums; }
/* the flip: a quarter turn and back while the drawer opens; one card at a time, never under reduced motion */
.ucard.is-flipping .ucard-face { animation: cardflip .5s var(--ease); }
@keyframes cardflip { 0% { transform: rotateY(0); } 40% { transform: rotateY(90deg); } 100% { transform: rotateY(0); } }
/* R10: the hover move. Loop Uwees play their wave in the card (the still steps aside once the clip runs); the rest hop once */
.ucard-art { overflow: visible; }
/* G3 (r4): the still and the loop swap by hard cut (visibility), never a fade; no Uwee image sits below opacity 1 */
.ucard-loop { position: absolute; left: 50%; bottom: 0; width: 160%; max-width: none; height: auto; transform: translateX(-50%); visibility: hidden; pointer-events: none; }
.ucard.is-looping .ucard-loop { visibility: visible; }
.ucard.is-looping .ucard-art .uwee { visibility: hidden; }
.ucard.is-hop .ucard-art .uwee img { animation: uhop .7s var(--ease) both; transform-origin: 50% 100%; }
.ucard.is-hop .ucard-art .uwee .shadow { animation: ushadow .7s var(--ease) both; }
@keyframes uhop { 0% { transform: translateY(0) scale(1, 1); } 18% { transform: translateY(0) scale(1.06, .92); } 45% { transform: translateY(-14%) scale(.96, 1.05) rotate(-4deg); } 70% { transform: translateY(0) scale(1.04, .95) rotate(2deg); } 100% { transform: translateY(0) scale(1, 1) rotate(0); } }
@keyframes ushadow { 45% { transform: scale(.7); opacity: .5; } }

/* the drawer: a half-page sheet from the right, the art large at the top */
.bio { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(760px, 100vw); height: 100vh; height: 100dvh; max-height: none; border: 0; border-radius: 0; padding: 0; background: var(--paper); color: var(--ink); box-shadow: -30px 0 80px rgba(17,22,39,.35); overflow: auto; }
.bio::backdrop { background: rgba(17,22,39,.6); }
.bio-close { position: sticky; top: 0; display: flex; justify-content: flex-end; padding: 10px 12px 0; z-index: 2; }
.bio-in { display: grid; gap: 18px; padding: 0 32px 40px; }
.bio-art { border-radius: 14px; overflow: hidden; background: color-mix(in srgb, var(--lane, var(--card)) 14%, var(--card)); display: grid; place-items: end center; }
.bio-art img { width: 100%; height: auto; display: block; }
.well--big { display: block; width: min(420px, 70%); padding: 18px 0 0; }
.well--big .uwee { width: 100%; }
.step-chip { font-family: var(--ui); align-self: start; justify-self: start; width: max-content; }
.bio-copy { display: grid; gap: 12px; }
.bio-copy h3 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin: 0; }
.bio-copy .what { margin: 0; font-size: 1.15rem; color: var(--ink-2); }
.bio-copy .tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.bio-block h4 { font-family: var(--ui); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 10px 0 6px; display: flex; gap: 8px; align-items: center; }
.bio-block p { margin: 0 0 6px; }
.bio-block .sugg { text-transform: none; letter-spacing: 0; font-size: .74rem; padding: 1px 8px; border-radius: 999px; background: var(--butter); color: var(--ink); }
.says { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.says li { font-family: var(--serif-accent); font-style: italic; font-weight: 500; font-size: 1.4rem; line-height: 1.3; color: var(--amber-ink); padding-left: 18px; position: relative; }
.says li::before { content: "\201C"; position: absolute; left: 0; top: 0; }
.facts { display: grid; gap: 8px; margin: 8px 0 0; }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
.facts dt { font-family: var(--ui); font-size: .78rem; color: var(--muted); padding-top: 3px; }
.facts dd { margin: 0; font-size: .95rem; }
.bio-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.bio-nav .btn { min-height: 44px; }

/* 4. off the clock: the film near full width (X19, H44), the words above it */
.otc-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 48px; align-items: end; margin-bottom: 28px; }
.otc-head h2 { color: var(--paper); margin: 0 0 6px; }
.otc-head .lede { margin: 0; color: var(--on-dark); }
.otc-head > p { margin: 0; color: var(--on-dark-2); max-width: 52ch; }
.film { position: relative; border-radius: var(--radius); overflow: hidden; background: #22252d; aspect-ratio: 16 / 9; }
.film video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.film-sound { position: absolute; left: 20px; bottom: 20px; z-index: 2; }
@media (max-width: 860px) { .otc-head { grid-template-columns: 1fr; } .film-sound { left: 10px; bottom: 10px; min-height: 40px; padding: 8px 14px; font-size: .85rem; } }

/* 5. the final doors, lifted from Astra (X20): butter band, the line and the two doors */
.final-doors { padding-block: clamp(48px, 6vw, 80px); }
.final-doors h2 { margin: 0 0 22px; max-width: 20ch; }
.final-doors .btn--primary { background: var(--navy); border-color: var(--navy); color: var(--paper); }

/* phone: two cards across, the drawer a full-screen sheet */
@media (max-width: 860px) {
  .card-grid { grid-template-columns: 1fr 1fr; gap: 12px 10px; }
  .uname { font-size: 1rem; }
  .ustep { width: 24px; height: 24px; font-size: .72rem; }
  .ucard-top { padding: 8px 10px 0; }
  .ucard-foot { padding: 6px 10px 8px; font-size: .72rem; }
  .ucard-art .uwee { width: 100%; }
  .group-head h3 { font-size: 1.2rem; }
  .bio { width: 100vw; }
  .bio-in { padding: 0 16px 32px; }
  .facts div { grid-template-columns: 96px 1fr; }
}
