/* The Hangar: the turntable, the loadout and its gauges. Built on site.css's colours, type and bar. */

/* No hero here, so the bar is solid from the top. */
.bar { background: rgba(7, 9, 13, 0.88); box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

.hangar { padding: calc(var(--top-height) + clamp(36px, 6vw, 72px)) 0 clamp(80px, 10vw, 120px); }
.hangar__head { max-width: 680px; }
.hangar__head h1 { font-family: var(--font-display); font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 0.95; text-transform: uppercase; letter-spacing: 0.01em; }
.hangar__head .lead { margin-top: 16px; color: var(--ink-dim); }

.hangar__grid { display: grid; gap: 40px; margin-top: clamp(32px, 4vw, 56px); align-items: start; }
@media (min-width: 980px) { .hangar__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; } }

/* the turntable */
.spin { margin: 0; }
.spin__stage {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; cursor: grab; touch-action: pan-y; user-select: none;
  background: radial-gradient(ellipse at 50% 88%, rgba(224, 137, 62, 0.16), transparent 55%), radial-gradient(circle at 50% 45%, #141a22, #07090d 70%);
  box-shadow: 0 0 0 1px var(--line);
}
.spin__stage:active { cursor: grabbing; }
.spin__stage:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.spin__stage img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }

/* 2026-11-03 — the bay: the Command Hub's backdrop, its middle half (bay.json's cut, 0.889 wide for 1 tall), placed so
   the platform sits under the stage's centre and 82% down, the cut a little taller than the stage. In the cut, the mech
   stands as the hub draws it (bounds 0.59 of the height, feet at 0.75; its frames keep their bounds in the middle 88%). */
.bay { position: absolute; left: -11.03%; top: -1%; width: 122.2%; height: 110%; pointer-events: none; }
.spin__stage .bay img.bay__plate { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.bay__l { position: absolute; background: no-repeat 0 0 / 100% 100%; will-change: opacity; }
.bay__shadow {
  position: absolute; left: 49.944%; top: 74.6%; width: 30%; height: 4.5%; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.25) 55%, transparent);
}
.spin__stage .bay img.bay__mech {
  position: absolute; left: 49.944%; top: 11.96%; width: auto; height: 67.05%; aspect-ratio: 1; transform: translateX(-50%);
  filter: brightness(0.88) saturate(1.06);   /* the frames were lifted for a black stage; the lit bay needs less. Never animated. */
}
.spin__stage::after {   /* the edge of the bay falls into the dark, like the hub's vignette */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 90% 80% at 50% 55%, transparent 55%, rgba(3, 4, 6, 0.55) 100%),
              linear-gradient(to bottom, rgba(3, 4, 6, 0.35), transparent 18%, transparent 82%, rgba(3, 4, 6, 0.45));
}
.spin__hint { z-index: 1; text-shadow: 0 1px 8px rgba(3, 4, 6, 0.95); }
.spin__hint {
  position: absolute; left: 50%; bottom: 14px; margin: 0; transform: translateX(-50%);
  font: 400 0.64rem/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim);
  transition: opacity 0.4s;
}
.spin__stage.is-held .spin__hint { opacity: 0; }
.spin__dial { width: 100%; margin: 14px 0 0; accent-color: var(--accent); }
.spin figcaption { margin-top: 10px; font-size: 0.82rem; color: var(--ink-faint); }

/* 2026-11-04 — the fitting bay: hardpoints you can see are buttons, a rack that shows each choice's effect before it is
   fitted, and a readout docked under the page while the bay is in view. */
@media (min-width: 980px) { .spin { position: sticky; top: calc(var(--top-height) + 24px); } }
.fit__head { margin-bottom: 22px; }
.fit__kicker { margin: 0 0 10px; font: 400 0.68rem/1 var(--font-mono); letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); }
.fit__title { margin: 0; font: 600 clamp(2rem, 4vw, 3rem)/0.95 var(--font-display); letter-spacing: 0.02em; text-transform: uppercase; }
.fit__how { margin: 12px 0 0; max-width: 46ch; color: var(--ink-dim); }
.fit__noscript { color: var(--ink-dim); }
.fit__label { font: 400 0.6rem/1 var(--font-mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); }

.fit__presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 26px; }
.fit__presets .fit__label { grid-column: 1 / -1; margin-bottom: 4px; }
@media (min-width: 560px) { .fit__presets { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.preset {
  display: grid; gap: 6px; padding: 11px 12px; text-align: left; cursor: pointer; font: inherit; color: var(--ink-dim);
  background: rgba(232, 228, 220, 0.03); border: 0; box-shadow: inset 0 0 0 1px var(--line); transition: color 0.2s, box-shadow 0.2s, background 0.2s;
}
.preset:hover { color: var(--ink); box-shadow: inset 0 0 0 1px rgba(232, 228, 220, 0.3); }
.preset[aria-pressed="true"] { color: var(--ink); background: rgba(224, 137, 62, 0.08); box-shadow: inset 0 0 0 1px var(--accent); }
.preset:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.preset__name { font: 600 0.74rem/1 var(--font); letter-spacing: 0.14em; text-transform: uppercase; }
.preset__lb { font: 400 0.62rem/1 var(--font-mono); color: var(--ink-faint); font-variant-numeric: tabular-nums; }

.fit__slots { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.hardpoint { background: rgba(4, 6, 10, 0.7); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 0.2s; }
.hardpoint.is-open { box-shadow: inset 0 0 0 1px var(--accent); }
.hardpoint__toggle {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label weight" "current change"; gap: 6px 16px; align-items: center;
  width: 100%; padding: 15px 16px; background: none; border: 0; color: var(--ink); text-align: left; cursor: pointer; font: inherit;
}
.hardpoint__toggle:hover { background: rgba(232, 228, 220, 0.03); }
.hardpoint__toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.hardpoint__label { grid-area: label; font: 400 0.64rem/1.2 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); }
.hardpoint__current { grid-area: current; font: 600 1.4rem/1.1 var(--font-display); letter-spacing: 0.04em; text-transform: uppercase; }
.hardpoint__weight { grid-area: weight; justify-self: end; font: 400 0.76rem/1 var(--font-mono); color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.hardpoint__change {
  grid-area: change; justify-self: end; display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px;
  font: 600 0.62rem/1 var(--font); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); box-shadow: inset 0 0 0 1px rgba(224, 137, 62, 0.45);
}
.hardpoint__change::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); transition: transform 0.2s; }
.hardpoint.is-open .hardpoint__change::after { transform: translateY(1px) rotate(-135deg); }
.hardpoint.is-open .hardpoint__change { color: #0a0b0e; background: var(--accent); }
.hardpoint__note { margin: -4px 16px 14px; font-size: 0.8rem; color: var(--ink-faint); }

.rack { display: grid; gap: 6px; padding: 0 10px 12px; }
@media (min-width: 560px) { .rack { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.choice {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name weight" "effect effect" "tag tag"; gap: 5px 10px; align-items: baseline;
  padding: 11px 12px; background: rgba(232, 228, 220, 0.04); border: 0; box-shadow: inset 0 0 0 1px transparent; color: var(--ink); text-align: left; cursor: pointer; font: inherit;
}
.choice:hover { background: rgba(232, 228, 220, 0.08); }
.choice[aria-pressed="true"] { background: rgba(224, 137, 62, 0.08); box-shadow: inset 0 0 0 1px var(--accent); }
.choice:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.choice__name { grid-area: name; font-weight: 600; letter-spacing: 0.05em; }
.choice__weight { grid-area: weight; font: 400 0.72rem/1 var(--font-mono); color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.choice__effect { grid-area: effect; font: 400 0.7rem/1.35 var(--font-mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.choice[aria-pressed="true"] .choice__effect { color: var(--accent); }
.choice.is-over .choice__effect { color: #f08a80; }
.choice.is-still-over .choice__effect { color: var(--ink-dim); }
.hardpoint { scroll-margin: calc(var(--top-height) + 16px) 0 150px; }
.choice__tag { grid-area: tag; font: 400 0.58rem/1.2 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.choice__tag.is-basic { color: var(--ink-faint); }

.fit__share { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 20px; }
.fit__share[hidden] { display: none; }
.fit__shared { font-size: 0.84rem; color: var(--ink-dim); }

/* the readout, docked */
.dock {
  position: sticky; bottom: 0; z-index: 30; display: grid; gap: 14px; margin: clamp(32px, 4vw, 48px) calc(-1 * var(--gutter)) 0;
  padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom, 0px));
  background: #05070b; box-shadow: 0 -1px 0 var(--line), 0 -24px 48px rgba(0, 0, 0, 0.55);
}
.dock[hidden] { display: none; }
@media (min-width: 980px) {
  /* the readout is the fitting column's footer: it rides the bottom of the screen past the hardpoints and comes to rest under
     the Share button, so it never covers the turntable, the paints or the caption beside it */
  .dock { gap: 14px; margin-inline: 0; padding: 16px 20px; box-shadow: 0 0 0 1px var(--line), 0 -24px 48px rgba(0, 0, 0, 0.55); }
}
.dock__label { font: 400 0.6rem/1 var(--font-mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); white-space: nowrap; }
.dock__weight { display: grid; gap: 8px; }
.dock__head { display: flex; align-items: baseline; gap: 12px; }
.dock__readout { display: inline-flex; align-items: baseline; gap: 5px; margin-left: auto; }
.dock__readout b { font: 600 clamp(1.6rem, 2.6vw, 2.3rem)/0.9 var(--font-display); letter-spacing: 0.03em; font-variant-numeric: tabular-nums; transition: color 0.3s; }
.dock__unit { font: 400 0.6rem/1 var(--font-mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); }
.dock__delta { font: 400 0.72rem/1 var(--font-mono); color: var(--accent); font-variant-numeric: tabular-nums; opacity: 0; transform: translateY(4px); transition: opacity 0.25s, transform 0.25s; }
.dock__delta.is-on { opacity: 1; transform: none; }
.dock.is-changed .dock__readout b, .dock.is-changed .dock__stats b { color: var(--accent); }
.dock__bar { position: relative; height: 6px; margin-bottom: 14px; background: rgba(232, 228, 220, 0.08); box-shadow: inset 0 0 0 1px rgba(232, 228, 220, 0.06); }
.dock__fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, rgba(232, 228, 220, 0.25), var(--ink)); transition: width 0.4s ease, background 0.3s; }
.dock.is-over .dock__fill { background: linear-gradient(90deg, rgba(224, 137, 62, 0.4), #e8564b); }
.dock__mow { position: absolute; top: -4px; bottom: -4px; width: 1px; background: var(--accent); }
.dock__mow span { position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%); font: 400 0.56rem/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.dock__load { margin: 0; font-size: 0.8rem; line-height: 1.4; color: var(--ink-dim); }
.dock.is-over .dock__load { color: #f08a80; }
.dock__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; background: rgba(232, 228, 220, 0.08); }
.dock__stats div { display: grid; gap: 7px; align-content: start; padding: 10px 10px 11px; background: #080a0f; }
.dock__stats dd { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 5px; }
.dock__stats b { font: 600 clamp(1.05rem, 1.6vw, 1.4rem)/1 var(--font-display); letter-spacing: 0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; transition: color 0.3s; }
.dock__sub { flex-basis: 100%; font-size: 0.66rem; line-height: 1.3; color: var(--ink-faint); }
@media (max-width: 559px) {   /* a phone's readout stays small, so it never covers the rack you are choosing from */
  .dock { gap: 10px; padding-top: 11px; padding-bottom: calc(11px + env(safe-area-inset-bottom, 0px)); }
  .dock__bar { margin-bottom: 12px; }
  .dock__load, .dock__sub { display: none; }
  .dock.is-over .dock__load { display: block; font-size: 0.72rem; }
  .dock__stats div { gap: 5px; padding: 8px 9px 9px; }
}
.hangar__source { margin: 20px 0 0; font-size: 0.8rem; color: var(--ink-faint); }

@media (prefers-reduced-motion: reduce) {
  .dock__fill, .spin__hint, .dock__readout b, .dock__stats b, .dock__delta, .hardpoint__change::after { transition: none; }
}

/* 2026-11-03 — the four paints under the turntable, each a swatch of the skin itself. */
.spin__skins { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.skin { display: inline-flex; align-items: center; gap: 9px; padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: 2px;
  background: transparent; color: var(--ink-dim); font: 400 0.7rem/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer; transition: border-color 0.2s, color 0.2s, background 0.2s; }
.skin:hover { color: var(--ink); border-color: var(--ink-faint); }
.skin.is-on { color: var(--ink); border-color: var(--accent); background: rgba(255, 255, 255, 0.03); }
.skin:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skin__swatch { position: relative; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); }
/* the ring that fills while a paint's frames come in is drawn by site.css (.skin.is-loading .skin__swatch::after) */
/* Each swatch is a chip cut from the paint's own frames (the hip panel, side-on), not a colour picked by hand. */
.skin__swatch--base { background: #8d8b85 url("/hangar/spin/swatch-base.webp") center / cover; }
.skin__swatch--tiger { background: #3c4a2a url("/hangar/spin/swatch-tiger.webp") center / cover; }
.skin__swatch--desert { background: #a47444 url("/hangar/spin/swatch-desert.webp") center / cover; }
.skin__swatch--snow { background: #c9cccd url("/hangar/spin/swatch-snow.webp") center / cover; }
