.hero {
  --paper: #f5f3f8;
  position: relative;
  isolation: isolate;
  padding: 0 max(5.5%, calc((100% - 88rem) / 2));
  background: radial-gradient(ellipse at 78% 55%, #302538 0%, #1c1821 29%, transparent 62%), #131217;
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, transparent 54%, #c7add008 54.1%, transparent 64%);
  content: '';
}

.hero-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, .77fr) minmax(0, 1.23fr);
  gap: clamp(1.5rem, 3vw, 3.75rem);
  align-items: center;
  padding-block: clamp(2rem, 3.8vw, 4rem) clamp(2.25rem, 4vw, 4rem);
}

.hero-copy { padding: 0; pointer-events: auto; }
.hero-kicker, .moto-studio-head > span {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero-kicker { margin-bottom: 1.2rem; color: #dad0ea; }
.hero-kicker::before, .moto-studio-head > span::before {
  content: '';
  width: 1.7rem;
  height: .19rem;
  transform: skewX(-25deg);
  background: #b99adb;
}
.hero-copy h1 {
  margin: 0;
  font-size: clamp(4.8rem, 8.6vw, 8.85rem);
  line-height: .87;
  letter-spacing: -.035em;
  color: var(--paper);
}
.hero-copy h1 em { color: #c6a9ed; }
.hero-copy p {
  max-width: 27rem;
  margin-top: clamp(1.2rem, 2vw, 2rem);
  font-size: clamp(1rem, 1.18vw, 1.14rem);
  line-height: 1.56;
  color: #d8d2df;
}
.hero-actions {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: .3rem 1.45rem;
  margin-top: 1.55rem;
}
.hero-actions .button { min-height: 48px; }
.hero-actions .text-button {
  display: inline-flex;
  align-items: center;
  color: #f5f3f8;
  font-size: .94rem;
  text-decoration: underline;
  text-decoration-color: #897a96;
  text-underline-offset: .35rem;
}
.hero-actions .text-button:hover { text-decoration-color: currentColor; }

.moto-slot { min-width: 0; }
.moto-studio {
  --sw-paint: #7455a4;
  --sw-white: #f5f3f8;
  min-width: 0;
  margin: 0;
  color: var(--sw-white);
}
.moto-studio-head, .moto-studio-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .45rem .75rem;
}
.moto-studio-head {
  position: relative;
  z-index: 1;
  min-height: 44px;
  border-bottom: 1px solid #ddc4eb29;
}
.moto-studio-head > span { color: #e0d6e9; font-size: .76rem; }
.moto-studio-head > span::before { width: .85rem; background: #9d7bc4; }
.moto-expand, .moto-toggle {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .48rem;
  min-height: 44px;
  padding: .25rem .65rem;
  border: 0;
  border-radius: .4rem;
  background: transparent;
  color: #f5f3f8;
  font-size: .875rem;
  font-weight: 600;
}
.moto-expand:hover, .moto-toggle:hover { background: #ffffff12; }
.moto-expand svg { width: 1rem; height: 1rem; }

.moto-stage {
  /* Fixed axle centers in the 1536 × 1024 studio reference. */
  --front-axle-x: 14.7135%;
  --front-axle-y: 72.2656%;
  --rear-axle-x: 83.8542%;
  --rear-axle-y: 69.5801%;
  position: relative;
  isolation: isolate;
  aspect-ratio: 3 / 2;
  background: radial-gradient(ellipse at 52% 61%, #a281bb1c, transparent 66%);
}

.moto-stage::before {
  position: absolute;
  inset: auto 1% 2% 1%;
  height: 11%;
  background: radial-gradient(ellipse, #05040899 0%, transparent 72%);
  content: '';
}

.moto-photo,
.moto-hardware {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.moto-stage[data-motion] .moto-photo {
  /* Open both near faces; retain the far shoulders and the floor shadow. */
  mask-image:
    radial-gradient(ellipse 13% 22.4% at var(--front-axle-x) var(--front-axle-y), transparent 89%, #000 98%),
    radial-gradient(ellipse 14.37% 24.77% at var(--rear-axle-x) var(--rear-axle-y), transparent 89%, #000 98%);
  mask-composite: intersect;
}

.moto-wheel-plane,
.moto-hardware {
  visibility: hidden;
}

.moto-stage[data-motion] :is(.moto-wheel-plane, .moto-hardware) {
  visibility: visible;
}

.moto-wheel-plane {
  position: absolute;
  top: var(--axle-y);
  left: var(--axle-x);
  width: var(--wheel-size);
  aspect-ratio: 1;
  /* Project the wheel face after rotation. The ellipse itself never rotates. */
  transform: translate(-50%, -50%) scaleX(var(--wheel-projection));
}

.moto-wheel-front {
  --axle-x: var(--front-axle-x);
  --axle-y: var(--front-axle-y);
  --wheel-size: 31.25%;
  --wheel-projection: .88;
  --wheel-crop: 47.2%;
  --hub-x: 49.9203%;
  --hub-y: 50.1196%;
}

.moto-wheel-rear {
  --axle-x: var(--rear-axle-x);
  --axle-y: var(--rear-axle-y);
  --wheel-size: 34.375%;
  --wheel-projection: .87;
  --wheel-crop: 48.05%;
  --hub-x: 49.9203%;
  --hub-y: 50.31898%;
}

.moto-wheel-mask {
  position: absolute;
  inset: 0;
  clip-path: circle(var(--wheel-crop) at 50% 50%);
}

.moto-wheel-spin {
  /* Align each separate photograph's measured hub with the fixed axle. */
  position: absolute;
  top: calc(50% - var(--hub-y));
  left: calc(50% - var(--hub-x));
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: var(--hub-x) var(--hub-y);
  transform: rotate(0turn);
}

.moto-stage[data-playing] .moto-wheel-spin {
  will-change: transform;
}

.moto-hardware-front {
  /* Preserve the front fender, suspension fork, axle cap and caliper. */
  clip-path: polygon(
    7.487% 50.879%, 8.203% 49.902%, 9.961% 48.730%, 11.914% 47.852%,
    14.453% 47.070%, 16.732% 46.973%, 18.620% 47.266%, 19.466% 47.852%,
    20.052% 45.117%, 23.438% 45.117%, 23.112% 47.754%, 22.526% 50.586%,
    21.745% 53.711%, 22.656% 54.785%, 24.414% 56.934%, 25.781% 59.277%,
    27.344% 62.012%, 28.451% 64.258%, 28.776% 65.430%, 28.060% 65.137%,
    26.823% 62.891%, 25.391% 60.645%, 24.349% 59.277%, 23.372% 58.203%,
    22.526% 57.617%, 21.940% 59.766%, 21.419% 62.207%, 21.419% 63.379%,
    21.810% 64.258%, 21.615% 65.430%, 22.005% 66.211%, 22.526% 67.480%,
    22.656% 69.434%, 23.047% 71.094%, 22.786% 72.754%, 22.852% 74.316%,
    22.461% 75.000%, 21.810% 75.195%, 20.964% 74.609%, 20.117% 74.902%,
    19.271% 74.707%, 18.229% 74.512%, 16.992% 73.926%, 15.885% 73.535%,
    15.430% 73.926%, 14.844% 74.219%, 14.128% 74.023%, 13.542% 73.340%,
    13.281% 72.656%, 13.281% 71.582%, 13.542% 70.215%, 13.997% 68.750%,
    14.648% 66.309%, 14.193% 67.383%, 13.607% 68.359%, 13.151% 68.262%,
    12.760% 67.285%, 12.695% 65.625%, 12.891% 63.477%, 12.956% 61.328%,
    13.086% 58.398%, 13.216% 55.664%, 13.542% 53.516%, 13.021% 52.539%,
    12.109% 51.660%, 11.133% 51.074%, 10.091% 50.781%, 8.724% 50.879%
  );
}

.moto-hardware-rear {
  /* The swingarm, exposed axle cap and caliper are cut from the fixed photo. */
  clip-path: polygon(
    67.253% 63.770%, 70.964% 64.453%, 74.479% 65.039%, 74.544% 63.770%,
    75.065% 63.281%, 75.326% 62.598%, 75.781% 62.109%, 75.716% 60.840%,
    75.911% 60.059%, 76.432% 59.570%, 76.888% 59.180%, 77.214% 58.496%,
    77.669% 58.301%, 78.190% 58.203%, 78.776% 57.422%, 79.232% 57.324%,
    79.883% 57.715%, 80.339% 58.105%, 80.794% 58.105%, 81.120% 58.496%,
    81.380% 58.984%, 81.445% 59.668%, 81.185% 60.254%, 81.510% 60.938%,
    81.576% 61.621%, 81.380% 62.305%, 80.990% 62.598%, 80.599% 62.598%,
    80.339% 63.477%, 80.013% 64.160%, 79.557% 64.844%, 79.036% 65.137%,
    79.427% 65.820%, 82.292% 66.406%, 83.203% 66.406%, 84.245% 66.504%,
    85.091% 67.285%, 85.547% 68.262%, 85.742% 69.434%, 85.547% 70.605%,
    85.091% 71.387%, 84.440% 71.875%, 83.529% 71.973%, 82.487% 71.484%,
    80.794% 71.289%, 78.320% 70.898%, 75.521% 70.508%, 72.526% 70.215%,
    70.052% 69.824%, 67.253% 69.727%
  );
}

.moto-wheel-mask::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(152deg, #f5e7ff1c, transparent 32%, transparent 70%, #06050a19);
  mask-image: radial-gradient(circle, transparent 45%, #000 70%, transparent 99%);
  content: '';
}

.moto-studio-caption {
  min-height: 3.4rem;
  flex-wrap: wrap;
  padding: .3rem 0 0;
  border-top: 1px solid #ddc4eb40;
}

.moto-fixed, .moto-speed-label {
  color: #ded4e7;
  font-size: .875rem;
  font-weight: 500;
}
.moto-speed-label { margin-right: auto; }
.moto-controls { display: flex; width: 100%; flex-wrap: wrap; align-items: center; gap: .55rem; }
.moto-speeds {
  display: flex;
  align-items: center;
  padding: 0;
  margin: 0;
  border: 0;
  min-width: 0;
}
.moto-speeds label {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  cursor: pointer;
}
.moto-speeds input, .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.moto-speeds input { margin: 0; }
.moto-speeds label > span {
  padding: .38rem .52rem;
  border: 1px solid transparent;
  border-radius: .4rem;
  font-size: .875rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #d9d0df;
}
.moto-speeds input:checked + span {
  border-color: #846e9b;
  background: #45344e;
  color: white;
}
.moto-speeds input:focus-visible + span { outline: 2px solid #d4b9ff; outline-offset: 2px; }
.moto-toggle {
  min-width: 5.45rem;
  border-left: 1px solid #ddc4eb36;
  border-radius: 0 .4rem .4rem 0;
  font-size: .875rem;
}
.moto-toggle-icon { width: .56rem; height: .7rem; flex: none; border-inline: 2px solid currentColor; }
.moto-toggle[data-paused] .moto-toggle-icon {
  border: 0;
  background: currentColor;
  clip-path: polygon(8% 0, 100% 50%, 8% 100%);
}

#moto-dialog {
  width: min(72rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 1.1rem clamp(.85rem, 3vw, 2.5rem) 1rem;
  margin: auto;
  overflow: auto;
  background: radial-gradient(ellipse at 60% 48%, #3b2e44 0%, #201b26 48%, #161319 80%);
}
#moto-dialog .close { top: .8rem; right: .85rem; }
#moto-dialog .moto-studio-head { padding-right: 3rem; }
#moto-dialog .moto-window {
  width: min(100%, max(17rem, calc((100dvh - 14.5rem) * 1.5)));
  margin-inline: auto;
  overflow: hidden;
}
#moto-dialog .moto-stage {
  transform-origin: top left;
  transition: transform 320ms cubic-bezier(.22,1,.36,1);
}
#moto-dialog [data-view="front"] > .moto-stage { transform: translate(0,-76%) scale(1.92); }
#moto-dialog [data-view="rear"] > .moto-stage { transform: translate(-92%,-76%) scale(1.92); }
.moto-views {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .3rem;
  padding-top: .65rem;
}
.moto-views button {
  min-height: 44px;
  padding: .45rem .75rem;
  border: 1px solid transparent;
  border-radius: .5rem;
  background: transparent;
  color: #e7ddec;
  font-size: .875rem;
}
.moto-views button[aria-pressed="true"] {
  background: #eee6f5;
  color: #302637;
}

@media (min-width: 761px) and (max-width: 1050px) {
  .hero-grid { grid-template-columns: minmax(0,.83fr) minmax(0,1.17fr); gap: 1.25rem; }
  .hero-copy h1 { font-size: clamp(4.5rem, 8vw, 5.3rem); }
}
@media (max-width: 760px) {
  .hero { padding-inline: 6%; }
  .hero-grid { grid-template-columns: minmax(0,1fr); gap: 1.25rem; padding-block: 1.6rem 1.15rem; }
  .hero-copy h1 { font-size: clamp(3.7rem, 12.75vw, 5.7rem); line-height: .92; }
  .hero-kicker { font-size: .76rem; margin-bottom: .85rem; }
  .hero-copy p { font-size: 1rem; margin-top: .95rem; max-width: 36rem; line-height: 1.47; }
  .hero-actions { margin-top: 1rem; gap: .12rem 1rem; }
  .hero-actions .button { padding: .75rem 1.05rem; min-height: 46px; font-size: .9rem; }
  .hero-actions .text-button { font-size: .875rem; }
  .moto-slot { width: 100%; max-width: 36rem; justify-self: center; }
  .moto-studio-head { min-height: 44px; }
  .moto-studio-caption { min-height: 48px; }
  .moto-controls { gap: .2rem; }
  .moto-toggle { min-width: 4.4rem; }
  #moto-dialog { width: calc(100vw - 1rem); padding-inline: .75rem; }
}
@media (max-width: 415px) {
  .moto-long-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .moto-stage[data-motion] .moto-photo { mask-image: none; }
  .moto-stage[data-motion] :is(.moto-wheel-plane, .moto-hardware) { visibility: hidden; }
  .moto-controls { display: none; }
}
