/* ========================================================================
   hero-scene.css - the hero's 3D "workspace" composition
   Native CSS 3D (perspective + preserve-3d). No Three.js, no canvas, no WebGL.

   Transform hierarchy - each element owns exactly ONE transform concern so
   nothing ever fights over the `transform` property:
     .scene-stage   perspective + perspective-origin
     .scene-3d      continuous auto-orbit (CSS animation)
     .scene-tilt    pointer parallax (written per-frame by hero-scene.js)
     .layer         depth placement (translateZ via --z) + entrance offset
     .float         continuous vertical drift
     .slab / .chip  the static 3-D tilt of the object itself
   ======================================================================== */

.hero-scene {
  position: relative;
  min-width: 0;
}
/* Entrance animation only when JS is running; otherwise the scene is
   visible immediately (it is decorative + aria-hidden either way). */
.js .hero-scene {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out);
}
.js .hero-scene.is-in { opacity: 1; transform: none; }

/* Uploaded hero image variant (Home > Hero > Hero image). Occupies the same
   grid column as the 3D scene; hero-scene.js skips the parallax when the
   scene layers are absent. */
.hero-scene--image .hero-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 37rem;
  object-fit: contain;
  border-radius: var(--radius-lg);
}

.scene-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 37rem;
  perspective: 1500px;
  perspective-origin: 50% 42%;
}

/* ---- Continuous auto-orbit: the whole workspace turns gently, forever ---- */
.scene-3d {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: sceneOrbit 22s ease-in-out infinite alternate;
}
@keyframes sceneOrbit {
  0%   { transform: rotateY(-9deg) rotateX(3deg); }
  100% { transform: rotateY(9deg)  rotateX(-2deg); }
}

/* ---- Pointer parallax lives here (JS writes the transform) ---- */
.scene-tilt {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

/* ---- Receding grid floor + purple horizon ---- */
.scene-floor {
  position: absolute;
  left: 50%;
  bottom: 2%;
  width: 260%;
  height: 130%;
  transform: translateX(-50%) rotateX(82deg);
  transform-origin: 50% 100%;
  background-image:
    linear-gradient(rgba(129, 142, 255, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(129, 142, 255, 0.28) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse 60% 58% at 50% 100%, #000, transparent 76%);
  mask-image: radial-gradient(ellipse 60% 58% at 50% 100%, #000, transparent 76%);
  animation: floorPan 12s linear infinite;
  pointer-events: none;
}
@keyframes floorPan { to { background-position: 0 30px; } }

.scene-horizon {
  position: absolute;
  left: 50%;
  bottom: 12%;
  width: 70%;
  height: 120px;
  transform: translateX(-50%) translateZ(-260px);
  background: radial-gradient(ellipse at center, rgba(109, 124, 255, 0.4), transparent 70%);
  filter: blur(14px);
  pointer-events: none;
}

/* Soft purple bloom directly behind the composition */
.scene-halo {
  position: absolute;
  left: 52%;
  top: 48%;
  width: 78%;
  aspect-ratio: 1;
  transform: translate3d(-50%, -50%, -200px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(109, 124, 255, 0.28), transparent 68%);
  pointer-events: none;
}

/* ---- Layers ---- */
.layer {
  position: absolute;
  transform-style: preserve-3d;
  transform: translateZ(var(--z, 0px)) translateY(var(--in-y, 0px));
}
.js .layer {
  --in-y: 26px;
  opacity: 0;
  transition: opacity 0.9s var(--ease-out), transform 1s var(--ease-out);
  transition-delay: var(--in-delay, 0s);
}
.js .hero-scene.is-in .layer { --in-y: 0px; opacity: 1; }

.float {
  transform-style: preserve-3d;
  animation: sceneFloat var(--float-dur, 9s) var(--ease) infinite;
  animation-delay: var(--float-delay, 0s);
}
@keyframes sceneFloat {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(0, var(--float-y, -14px), 0); }
}

/* ======================================================================
   Windows - real extruded slabs (front face + bottom edge + one side edge)
   ====================================================================== */
/* Physical slab thickness.
   A stacked hard-offset box-shadow renders the extruded "side" of the panel
   in the tilt direction - bulletproof across engines, no extra elements, and
   it reads as a solid 3-D object at any angle. Direction differs per window:
   the editor shows its left face, the browser its right. */
.slab { position: relative; transform-style: preserve-3d; }

.slab--l > .win {
  box-shadow:
    -2px 3px 0 rgba(19, 19, 23, 0.96),
    -4px 6px 0 rgba(16, 16, 20, 0.96),
    -6px 9px 0 rgba(13, 13, 16, 0.96),
    -8px 12px 0 rgba(10, 10, 13, 0.96),
    -10px 15px 0 rgba(8, 8, 10, 0.96),
    -12px 18px 0 rgba(6, 6, 8, 0.96),
    -13px 19px 1px rgba(255, 255, 255, 0.05),
    0 40px 74px -22px rgba(0, 0, 0, 0.9),
    0 0 90px -40px rgba(109, 124, 255, 0.8);
}
.slab--r > .win {
  box-shadow:
    2px 3px 0 rgba(19, 19, 23, 0.96),
    4px 6px 0 rgba(16, 16, 20, 0.96),
    6px 9px 0 rgba(13, 13, 16, 0.96),
    8px 12px 0 rgba(10, 10, 13, 0.96),
    10px 15px 0 rgba(8, 8, 10, 0.96),
    12px 17px 0 rgba(6, 6, 8, 0.96),
    13px 18px 1px rgba(255, 255, 255, 0.05),
    0 40px 74px -22px rgba(0, 0, 0, 0.9),
    0 0 90px -40px rgba(109, 124, 255, 0.8);
}

.win {
  border-radius: 13px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(16, 16, 19, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 34px 70px -22px rgba(0, 0, 0, 0.88),
    0 0 90px -40px rgba(109, 124, 255, 0.8);
}
.win-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent);
}
.win-dots { display: flex; gap: 0.3rem; flex: none; }
.win-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}
.win-dots i:first-child { background: rgba(255, 255, 255, 0.3); }

/* ======================= 1 · Code editor ======================= */
.layer--editor {
  left: 2%;
  top: 2%;
  width: 56%;
  --z: -46px;
  filter: blur(0.4px);
}
.editor-slab { transform: rotateY(20deg) rotateX(6deg); }

.editor-tab {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.15rem 0.45rem;
  border-radius: 4px 4px 0 0;
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid var(--accent);
  white-space: nowrap;
}
.editor-lang {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.45rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.editor-code {
  margin: 0;
  padding: 0.55rem 0.6rem 0.65rem 0;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  line-height: 1.75;
  color: var(--text-muted);
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "calt" 0;
  counter-reset: ln;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 22px, transparent 22px);
}
.editor-code .ln {
  display: block;
  padding-left: 30px;
  position: relative;
  white-space: pre;
}
.editor-code .ln::before {
  counter-increment: ln;
  content: counter(ln);
  position: absolute;
  left: 0;
  width: 22px;
  text-align: right;
  color: rgba(255, 255, 255, 0.16);
}
.editor-code .ln--active { background: rgba(109, 124, 255, 0.08); }

.t-kw  { color: #b3a2ff; }
.t-fn  { color: var(--accent-bright); }
.t-str { color: #8fd0c3; }
.t-var { color: #e6e6ea; }
.t-cm  { color: rgba(255, 255, 255, 0.22); font-style: italic; }
.t-tag { color: #7e8cff; }

.caret {
  display: inline-block;
  width: 1px;
  height: 0.85em;
  vertical-align: -0.1em;
  background: var(--accent-bright);
  margin-left: 1px;
  animation: caretBlink 1.05s steps(1) infinite;
}
@keyframes caretBlink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }

/* ======================= 2 · Compile stream ======================= */
.layer--beam {
  left: 34%;
  top: 40%;
  width: 30%;
  --z: 20px;
}
.beam {
  position: relative;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(109, 124, 255, 0.5), transparent);
  transform: rotate(23deg);
}
.beam i {
  position: absolute;
  top: -1.5px;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 8px 1px rgba(139, 150, 255, 0.9);
  animation: beamRun 3.2s var(--ease) infinite;
}
.beam i:nth-child(2) { animation-delay: -1.1s; opacity: 0.7; }
.beam i:nth-child(3) { animation-delay: -2.2s; opacity: 0.5; }
@keyframes beamRun {
  0%       { transform: translateX(0);     opacity: 0; }
  12%, 80% { opacity: 1; }
  100%     { transform: translateX(130px); opacity: 0; }
}

/* ======================= 3 · Browser (the result) ======================= */
.layer--browser {
  left: 22%;
  top: 40%;
  width: 74%;
  --z: 84px;
}
.browser-slab { transform: rotateY(-15deg) rotateX(6deg); }

.browser-url {
  flex: 1;
  min-width: 0;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.46rem;
  letter-spacing: 0.03em;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}
.browser-url span { color: var(--accent-bright); }
.browser-url::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 40%;
  background: var(--accent);
  animation: urlLoad 6.4s var(--ease) infinite;
}
@keyframes urlLoad {
  0%, 62% { transform: translateX(-100%); opacity: 0; }
  70%     { opacity: 1; }
  92%     { transform: translateX(250%); opacity: 0; }
  100%    { transform: translateX(250%); opacity: 0; }
}

/* rendered "website" - light surface, purple accents.
   The flash pulses in sync with the compile stream (both 3.2s). */
.browser-view {
  background: #f6f6f9;
  padding: 0.6rem 0.7rem 0.75rem;
  display: grid;
  gap: 0.5rem;
  animation: bvFlash 3.2s var(--ease) infinite;
}
@keyframes bvFlash {
  0%, 55%   { box-shadow: inset 0 0 0 0 transparent; }
  64%       { box-shadow: inset 0 0 34px 0 rgba(109, 124, 255, 0.32); }
  78%, 100% { box-shadow: inset 0 0 0 0 transparent; }
}
.bv-nav {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(15, 15, 17, 0.08);
}
.bv-logo {
  width: 15px;
  height: 6px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  flex: none;
}
.bv-nav .bar { height: 3px; border-radius: 2px; background: rgba(15, 15, 17, 0.16); }
.bv-nav .bar:nth-of-type(1) { width: 18px; }
.bv-nav .bar:nth-of-type(2) { width: 13px; }
.bv-nav .bar:nth-of-type(3) { width: 16px; }
.bv-cta {
  margin-left: auto;
  width: 27px;
  height: 9px;
  border-radius: 3px;
  background: var(--accent);
  flex: none;
}
.bv-hero { display: grid; gap: 0.28rem; padding: 0.25rem 0 0.3rem; }
.bv-hero .bar { height: 7px; border-radius: 3px; background: rgba(15, 15, 17, 0.78); }
.bv-hero .bar:nth-of-type(1) { width: 72%; }
.bv-hero .bar:nth-of-type(2) { width: 50%; background: linear-gradient(90deg, var(--accent), var(--accent-bright)); }
.bv-hero .bar--sm { height: 3px; width: 60%; background: rgba(15, 15, 17, 0.2); margin-top: 0.12rem; }
.bv-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.35rem; }
.bv-cards div {
  height: 27px;
  border-radius: 5px;
  background: #fff;
  border: 1px solid rgba(15, 15, 17, 0.08);
  box-shadow: 0 1px 2px rgba(15, 15, 17, 0.05);
  position: relative;
  overflow: hidden;
}
.bv-cards div::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: rgba(109, 124, 255, 0.22);
}
.bv-cards div::after {
  content: "";
  position: absolute;
  left: 5px;
  bottom: 5px;
  width: 60%;
  height: 3px;
  border-radius: 2px;
  background: rgba(15, 15, 17, 0.14);
}
.bv-cards div:nth-child(2)::before { background: rgba(109, 124, 255, 0.45); }

/* ======================= Floating glass chips ======================= */
.chip {
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.09) inset,
    0 16px 36px -16px rgba(0, 0, 0, 0.85);
  padding: 0.5rem 0.62rem;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  white-space: nowrap;
  transition: border-color 0.35s var(--ease), background 0.35s var(--ease),
              box-shadow 0.35s var(--ease);
}
.layer--chip { pointer-events: auto; cursor: default; }
.layer--chip:hover .chip {
  border-color: rgba(109, 124, 255, 0.55);
  background: rgba(109, 124, 255, 0.1);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 20px 42px -16px rgba(0, 0, 0, 0.9),
    0 0 28px -8px rgba(109, 124, 255, 0.55);
}
.chip-label {
  display: block;
  font-size: 0.46rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.25rem;
}
.chip-value { color: var(--text); font-size: 0.66rem; }
.chip-value em { font-style: normal; color: var(--accent-bright); }

/* terminal chip */
.layer--term { left: -4%; bottom: 12%; --z: 128px; }
.layer--term .chip { transform: rotateY(18deg) rotateX(-4deg); }
.term-line { display: block; line-height: 1.7; }
.term-line b { font-weight: 400; color: var(--accent-bright); }
.term-line .ok { color: #6fd3ae; }

/* WordPress chip */
.layer--wp { right: 0%; top: -1%; --z: 100px; }
.layer--wp .chip {
  transform: rotateY(-18deg) rotateX(5deg);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.wp-mark {
  width: 21px;
  height: 21px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(109, 124, 255, 0.16);
  border: 1px solid rgba(109, 124, 255, 0.35);
  color: var(--accent-bright);
}
.wp-mark svg { width: 12px; height: 12px; display: block; }

/* performance chip */
.layer--perf { right: 1%; top: 54%; --z: 150px; }
.layer--perf .chip {
  transform: rotateY(-21deg) rotateX(6deg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.perf-ring {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--accent) 0 96%, rgba(255, 255, 255, 0.1) 96% 100%);
  position: relative;
}
.perf-ring::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #131316;
}
.perf-ring b {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 500;
  color: var(--text);
}

/* responsive chip */
.layer--responsive { right: 15%; bottom: -1%; --z: 64px; }
.layer--responsive .chip {
  transform: rotateY(-12deg) rotateX(-6deg);
  display: flex;
  align-items: flex-end;
  gap: 0.32rem;
}
.dev {
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  background: rgba(109, 124, 255, 0.14);
}
.dev--lg { width: 24px; height: 17px; }
.dev--md { width: 13px; height: 14px; }
.dev--sm { width: 8px; height: 11px; }

/* language pills */
.layer--tags { left: 24%; top: -4%; --z: 168px; }
.tag-row { display: flex; gap: 0.3rem; transform: rotateY(-8deg); }
.tag {
  font-family: var(--font-mono);
  font-size: 0.48rem;
  letter-spacing: 0.08em;
  padding: 0.22rem 0.42rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.tag--accent { color: var(--accent-bright); border-color: rgba(109, 124, 255, 0.4); }

/* ---- Abstract geometry ---- */
.layer--ring { left: 2%; bottom: 5%; --z: 34px; }
.scene-ring {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid rgba(109, 124, 255, 0.42);
  box-shadow: 0 0 26px -10px rgba(109, 124, 255, 0.9) inset;
  transform: rotateX(72deg);
  animation: ringSpin 16s linear infinite;
}
@keyframes ringSpin { to { transform: rotateX(72deg) rotateZ(360deg); } }

/* rotating wireframe cube */
.layer--cube { right: 42%; top: -5%; --z: 24px; }
.cube {
  position: relative;
  width: 40px;
  height: 40px;
  transform-style: preserve-3d;
  animation: cubeSpin 18s linear infinite;
}
.cube span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(150, 160, 255, 0.55);
  background: rgba(109, 124, 255, 0.07);
  box-shadow: 0 0 12px -4px rgba(139, 150, 255, 0.6) inset;
}
.cube span:nth-child(1) { transform: translateZ(20px); }
.cube span:nth-child(2) { transform: rotateY(180deg) translateZ(20px); }
.cube span:nth-child(3) { transform: rotateY(90deg) translateZ(20px); }
.cube span:nth-child(4) { transform: rotateY(-90deg) translateZ(20px); }
.cube span:nth-child(5) { transform: rotateX(90deg) translateZ(20px); }
.cube span:nth-child(6) { transform: rotateX(-90deg) translateZ(20px); }
@keyframes cubeSpin {
  0%   { transform: rotateX(0deg) rotateY(0deg); }
  100% { transform: rotateX(360deg) rotateY(360deg); }
}

/* ---- Particles ---- */
.scene-particles {
  position: absolute;
  inset: 0;
  transform: translateZ(110px);
  pointer-events: none;
}
.scene-particles i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent-bright);
  opacity: 0.55;
  box-shadow: 0 0 5px rgba(139, 150, 255, 0.75);
  animation: sceneDrift var(--p-dur, 12s) linear infinite;
  animation-delay: var(--p-delay, 0s);
}
@keyframes sceneDrift {
  0%   { transform: translate3d(0, 12px, 0); opacity: 0; }
  15%  { opacity: 0.6; }
  85%  { opacity: 0.5; }
  100% { transform: translate3d(16px, -84px, 0); opacity: 0; }
}
.scene-particles i:nth-child(1)  { left: 10%; top: 76%; --p-dur: 11s;   --p-delay: 0s; }
.scene-particles i:nth-child(2)  { left: 26%; top: 90%; --p-dur: 14s;   --p-delay: 1.6s; }
.scene-particles i:nth-child(3)  { left: 43%; top: 81%; --p-dur: 9.5s;  --p-delay: 3.1s; }
.scene-particles i:nth-child(4)  { left: 60%; top: 94%; --p-dur: 13s;   --p-delay: 0.8s; }
.scene-particles i:nth-child(5)  { left: 78%; top: 84%; --p-dur: 10.5s; --p-delay: 4.2s; }
.scene-particles i:nth-child(6)  { left: 90%; top: 70%; --p-dur: 15s;   --p-delay: 2.3s; }
.scene-particles i:nth-child(7)  { left: 18%; top: 60%; --p-dur: 12.5s; --p-delay: 5.4s; }
.scene-particles i:nth-child(8)  { left: 52%; top: 68%; --p-dur: 16s;   --p-delay: 6.1s; }
.scene-particles i:nth-child(9)  { left: 70%; top: 56%; --p-dur: 11.5s; --p-delay: 7.3s; }
.scene-particles i:nth-child(10) { left: 34%; top: 48%; --p-dur: 17s;   --p-delay: 3.8s; }
.scene-particles i:nth-child(11) { left: 84%; top: 52%; --p-dur: 13.5s; --p-delay: 2.9s; }
.scene-particles i:nth-child(12) { left: 6%;  top: 44%; --p-dur: 15.5s; --p-delay: 8.2s; }

/* ------------------------------------------------------------------
   Responsive - the scene drops under the copy and gets simpler
   ------------------------------------------------------------------ */
@media (max-width: 1080px) {
  .scene-stage { max-height: 32rem; }
}

@media (max-width: 900px) {
  .hero-scene { margin-top: clamp(3rem, 8vw, 4.5rem); }
  .scene-stage {
    max-width: 32rem;
    margin-inline: auto;
    max-height: 28rem;
  }

  /* Lighter on small screens: no blur compositing, fewer moving parts,
     and stop the auto-orbit (parallax is already off for coarse pointers). */
  .win,
  .chip,
  .tag {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .win { background: rgba(16, 16, 19, 0.96); }
  .chip { background: rgba(26, 26, 31, 0.92); }
  .scene-3d { animation: none; transform: rotateY(4deg) rotateX(1deg); }
  .scene-particles,
  .scene-floor,
  .scene-horizon,
  .layer--cube,
  .layer--tags,
  .layer--beam { display: none; }
  .layer--editor { filter: none; }
  .float { animation-duration: 13s; }

  .chip { font-size: 0.5rem; padding: 0.42rem 0.55rem; }
  .chip-label { font-size: 0.42rem; }
  .chip-value { font-size: 0.58rem; }
  .perf-ring { width: 24px; height: 24px; }
  .perf-ring b { font-size: 0.5rem; }
  .wp-mark { width: 18px; height: 18px; }
  .wp-mark svg { width: 10px; height: 10px; }
  .layer--term { left: 1%; bottom: 7%; }
  .layer--perf { right: 1%; top: 62%; }
  .layer--wp { right: 0%; top: 1%; }
  .layer--responsive { right: 9%; bottom: 0%; }
}

@media (max-width: 520px) {
  .layer--ring,
  .layer--responsive { display: none; }
  .scene-stage { max-height: 23rem; }
  .editor-code { font-size: 0.46rem; }
  /* keep every floating chip fully inside the narrow stage */
  .layer--perf { right: 6%; top: 58%; }
  .layer--wp { right: 4%; }
  .layer--term { left: 4%; }
  .layer--perf .chip,
  .layer--wp .chip,
  .layer--term .chip { transform: none; }
}

/* ------------------------------------------------------------------
   Reduced motion - static, fully visible composition
   ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .js .hero-scene,
  .hero-scene { opacity: 1; transform: none; }
  .js .hero-scene .layer,
  .hero-scene .layer { --in-y: 0px; opacity: 1; transition: none; }
  .scene-3d { animation: none; transform: rotateY(-4deg) rotateX(2deg); }
  .float,
  .scene-particles i,
  .scene-floor,
  .scene-ring,
  .cube,
  .caret,
  .beam i,
  .browser-view,
  .browser-url::after { animation: none; }
  .scene-particles i { opacity: 0.5; }
  .caret { opacity: 1; }
  .browser-url::after { opacity: 0; }
}
