/* v4 overrides: plain plate section, frameless cockpit, vector live plate, five-stage gyroscope scope meter. */

/* Plate section: no logo unfolding, the panel simply settles in. */

.plate-section {
  height: auto;
  padding-block: 40px 140px;
}

.plate-section .plate {
  width: 100%;
}

/* Cockpit floats free over the stream instead of sitting in a glass frame. */

.cell-shot {
  padding: 0;
  overflow: visible;
  background: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.cell-shot img {
  width: 104%;
  max-width: none;
  margin-inline: -2%;
  filter: drop-shadow(0 50px 60px rgba(0, 0, 0, 0.55));
}

/* Live product plate, drawn as vector UI so it stays crisp at any angle. */

.sys .ui text {
  text-anchor: start;
}

.ui-bg {
  fill: #141a22;
}

.ui-side {
  fill: #0f141b;
}

.ui-brand {
  fill: var(--gold);
}

.ui-nav {
  fill: rgba(244, 240, 232, 0.16);
}

.ui-nav.is-on {
  fill: var(--gold);
}

.sys .ui-title {
  fill: var(--text);
  font-size: 12px;
  font-weight: 760;
}

.sys .ui-sub {
  fill: rgba(244, 240, 232, 0.5);
  font-size: 7px;
  font-weight: 600;
}

.ui-live {
  fill: var(--gold);
}

.ui-card {
  fill: #1b222c;
  stroke: rgba(244, 240, 232, 0.08);
  stroke-width: 1;
}

.sys .ui-label {
  fill: rgba(244, 240, 232, 0.55);
  font-size: 7px;
  font-weight: 650;
}

.sys .ui-value {
  fill: var(--text);
  font-size: 15px;
  font-weight: 760;
}

.sys .ui .draw {
  stroke: var(--gold);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sys .ui .ui-line {
  stroke-width: 2;
}

.ui-gridline {
  fill: none;
  stroke: rgba(244, 240, 232, 0.06);
  stroke-width: 1;
}

.ui-area {
  fill: rgba(199, 168, 107, 0.14);
  opacity: 0;
  transition: opacity 900ms ease 1300ms;
}

.sys-live.is-placed .ui-area {
  opacity: 1;
}

.ui-dot {
  fill: var(--paper);
  filter: drop-shadow(0 0 4px var(--gold));
}

.ui-ring-track,
.ui-ring {
  fill: none;
  stroke-width: 6;
}

.ui-ring-track {
  stroke: rgba(244, 240, 232, 0.08);
}

.ui-ring {
  stroke: var(--gold);
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 26;
  transform-box: fill-box;
  transform-origin: center;
  transform: rotate(-90deg);
  transition: stroke-dashoffset 1600ms var(--ease-settle) 600ms;
}

.sys-live:not(.is-placed) .ui-ring {
  stroke-dashoffset: 100;
}

.sys .ui-ring-label {
  fill: var(--text);
  font-size: 10px;
  font-weight: 760;
  text-anchor: middle;
}

.ui-avatar {
  fill: rgba(199, 168, 107, 0.35);
}

.ui-row {
  fill: rgba(244, 240, 232, 0.14);
}

.ui-pill {
  fill: rgba(199, 168, 107, 0.45);
}

.ui-pill.is-muted {
  fill: rgba(244, 240, 232, 0.12);
}

@media (prefers-reduced-motion: no-preference) {
  .sys.is-live .ui-live,
  .sys.is-live .ui-dot {
    animation: ui-pulse 1.6s ease-in-out infinite;
  }
}

@keyframes ui-pulse {
  50% {
    opacity: 0.35;
  }
}

/* Scope meter: five stages, a gyroscope that gains one ring per stage. */

.scope {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  grid-template-areas:
    "control result"
    "gyro result";
  row-gap: 0;
}

.scope-control {
  grid-area: control;
}

.scope-result {
  grid-area: result;
  align-self: start;
}

.scope-stops {
  position: relative;
  height: 3.2em;
  display: block;
}

.scope-stops li {
  position: absolute;
  top: 0;
  width: 96px;
  line-height: 1.3;
  text-align: center;
  transform: translateX(-50%);
}

.scope-stops li:nth-child(1) {
  left: 0;
  text-align: left;
  transform: none;
}

.scope-stops li:nth-child(2) {
  left: 25%;
  text-align: center;
}

.scope-stops li:nth-child(3) {
  left: 50%;
  text-align: center;
}

.scope-stops li:nth-child(4) {
  left: 75%;
}

.scope-stops li:nth-child(5) {
  left: 100%;
  text-align: right;
  transform: translateX(-100%);
}

.gyro-stage {
  grid-area: gyro;
  height: 340px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  perspective: 1100px;
}

.gyro {
  position: relative;
  width: 280px;
  height: 280px;
  transform-style: preserve-3d;
}

.gyro-core {
  position: absolute;
  top: calc(50% - 22px);
  left: calc(50% - 22px);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff8e6, var(--gold) 46%, var(--gold-deep) 82%);
  box-shadow:
    0 0 40px var(--gold-glow),
    0 0 100px rgba(199, 168, 107, 0.22);
}

.gyro-axis {
  --d: 120px;
  --ax: 70deg;
  --ay: 0deg;
  --sc: 0.55;
  position: absolute;
  top: calc(50% - var(--d) / 2);
  left: calc(50% - var(--d) / 2);
  width: var(--d);
  height: var(--d);
  transform-style: preserve-3d;
  transform: rotateX(var(--ax)) rotateY(var(--ay)) scale(var(--sc));
  opacity: 0;
  transition:
    transform 1100ms var(--ease-settle),
    opacity 500ms ease;
}

.gyro-axis[data-ring="0"] { --d: 104px; --ax: 62deg; --ay: 10deg; }
.gyro-axis[data-ring="1"] { --d: 148px; --ax: 18deg; --ay: 66deg; }
.gyro-axis[data-ring="2"] { --d: 192px; --ax: 62deg; --ay: -40deg; }
.gyro-axis[data-ring="3"] { --d: 236px; --ax: -34deg; --ay: 24deg; }
.gyro-axis[data-ring="4"] { --d: 280px; --ax: 82deg; --ay: 52deg; }

.gyro-axis.is-on {
  --sc: 1;
  opacity: 1;
}

.gyro-ring {
  position: absolute;
  inset: 0;
  display: block;
  border: 2px solid rgba(199, 168, 107, 0.5);
  border-radius: 50%;
  transition: border-color 400ms ease, box-shadow 400ms ease;
}

/* Inner dashed track gives each ring a machined gimbal look. */
.gyro-ring::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(199, 168, 107, 0.32);
  border-radius: 50%;
}

.gyro-axis.is-new .gyro-ring {
  border-color: var(--gold);
  box-shadow:
    0 0 22px -4px var(--gold-glow),
    inset 0 0 22px -4px var(--gold-glow);
}

.gyro-bead {
  position: absolute;
  top: -5px;
  left: calc(50% - 4.5px);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 12px var(--gold);
}

@media (prefers-reduced-motion: no-preference) {
  .gyro {
    animation: gyro-drift 22s linear infinite;
  }

  .gyro-core {
    animation: gyro-face 22s linear infinite;
  }

  .gyro-ring {
    animation: gyro-spin 9s linear infinite;
  }

  .gyro-axis[data-ring="1"] .gyro-ring { animation-duration: 7s; animation-direction: reverse; }
  .gyro-axis[data-ring="2"] .gyro-ring { animation-duration: 11s; }
  .gyro-axis[data-ring="3"] .gyro-ring { animation-duration: 8s; animation-direction: reverse; }
  .gyro-axis[data-ring="4"] .gyro-ring { animation-duration: 14s; }
}

@keyframes gyro-drift {
  from {
    transform: rotateY(0deg) rotateX(8deg);
  }
  to {
    transform: rotateY(360deg) rotateX(8deg);
  }
}

/* The core counter-rotates so it always reads as a sphere facing the viewer. */
@keyframes gyro-face {
  from {
    transform: rotateX(-8deg) rotateY(0deg);
  }
  to {
    transform: rotateX(-8deg) rotateY(-360deg);
  }
}

@keyframes gyro-spin {
  to {
    transform: rotate(360deg);
  }
}

.gyro-count {
  color: var(--text-3);
  font-size: 0.82rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.gyro-count strong {
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 760;
}

@media (max-width: 760px) {
  .plate-section {
    padding-block: 20px 80px;
  }

  .scope {
    grid-template-columns: 1fr;
    grid-template-areas:
      "control"
      "gyro"
      "result";
  }

  .scope-stops li {
    width: 62px;
    font-size: 0.68rem;
  }

  .gyro-stage {
    height: 290px;
    margin-block: -10px;
    scale: 0.8;
  }
}
