/* ══════════════════════════════════════════════════════════════════
   motion.css — Living Print Studio motion & depth system
   Rapid Elevation — shared across all pages
   ══════════════════════════════════════════════════════════════════ */

/* ── REDUCED MOTION: disable everything ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .layer-wipe::after { transform: scaleX(1) !important; }
  .glow-border { animation: none !important; }
  .hero-ambient-dot { animation: none !important; }
  .hero-scanline { display: none !important; }
}

/* Keep nav above background layers */
nav { z-index: 100; }

/* ── REVEAL: scroll snap-in ── */
.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.reveal.reveal-in {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for child elements */
.reveal-stagger > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger > *:nth-child(2) { transition-delay: 55ms; }
.reveal-stagger > *:nth-child(3) { transition-delay: 110ms; }
.reveal-stagger > *:nth-child(4) { transition-delay: 165ms; }
.reveal-stagger > *:nth-child(5) { transition-delay: 220ms; }
.reveal-stagger > *:nth-child(6) { transition-delay: 275ms; }

/* ── CARD DEPTH: 3D lift on hover ── */
.card-depth {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
  transform-style: preserve-3d;
}

.card-depth:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 18px rgba(255, 107, 0, 0.12) !important;
}

/* ── LAYER WIPE: section heading reveal accent ── */
.layer-wipe {
  position: relative;
  display: inline-block;
}

.layer-wipe::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s ease;
}

.layer-wipe.reveal-in::after,
.layer-wipe.wipe-in::after {
  transform: scaleX(1);
}

/* ── GLOW BORDER: pulsing accent border ── */
.glow-border {
  box-shadow: 0 0 0 1px var(--accent-dim);
  animation: glowPulse 2.8s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 0 1px var(--accent-dim), 0 0 12px rgba(255, 107, 0, 0.12); }
  50%       { box-shadow: 0 0 0 1px var(--accent),     0 0 22px rgba(255, 107, 0, 0.28); }
}

/* ── SECTION ACCENT: top-border glow ── */
.section-accent {
  position: relative;
}

.section-accent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-dim), transparent);
  opacity: 0.7;
}

/* ── HERO AMBIENT DOT (printer power LED) ── */
.hero-ambient-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-ambient-dot::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3fb882;
  box-shadow: 0 0 6px #3fb882, 0 0 12px rgba(63, 184, 130, 0.6);
  animation: dotPulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px #3fb882, 0 0 12px rgba(63, 184, 130, 0.6); }
  50%       { opacity: 0.65; box-shadow: 0 0 3px #3fb882, 0 0 6px rgba(63, 184, 130, 0.3); }
}

/* ── HERO SCANLINE: one-pass print head sweep ── */
.hero-scanline {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-bright) 40%, rgba(255,255,255,0.9) 50%, var(--accent-bright) 60%, transparent 100%);
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  animation: scanSweep 1.6s ease-out 0.4s forwards;
}

@keyframes scanSweep {
  0%   { opacity: 0;   top: 0; }
  10%  { opacity: 0.9; }
  85%  { opacity: 0.7; top: 100%; }
  100% { opacity: 0;   top: 100%; }
}

/* ── ENHANCED TOOL CARD HOVER ── */
.tool-card {
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease !important;
}

a.tool-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.5), 0 0 20px rgba(255,107,0,0.15) !important;
}

/* ── ENHANCED BUTTON ── */
.btn:not(.btn-outline) {
  position: relative;
  overflow: hidden;
}

.btn:not(.btn-outline)::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.14), transparent);
  transform: skewX(-20deg);
  transition: left 0.4s ease;
}

.btn:not(.btn-outline):hover::after {
  left: 150%;
}

/* ── BTN-OUTLINE: border glow pulse on hover ── */
.btn-outline {
  transition: color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn-outline:hover {
  animation: outlineGlow 0.5s ease forwards;
}

@keyframes outlineGlow {
  0%   { box-shadow: 0 0 0 0 rgba(255, 107, 0, 0); }
  40%  { box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.35), 0 0 14px rgba(255, 107, 0, 0.2); }
  100% { box-shadow: 0 0 0 1px rgba(255, 107, 0, 0.2), 0 0 8px rgba(255, 107, 0, 0.1); }
}

/* ── PAGE HEADER: gradient accent underline ── */
.page-header {
  position: relative;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-bright), var(--accent), transparent);
  border-radius: 1px;
}

/* ── DIAGNOSIS: scan complete animation ── */
@keyframes borderSweep {
  0%   { clip-path: inset(0 100% 0 0); }
  100% { clip-path: inset(0 0% 0 0); }
}

.scan-complete {
  animation: scanComplete 0.45s ease-out forwards;
}

@keyframes scanComplete {
  0%   { box-shadow: 0 0 0 1px var(--accent-bright), 0 0 20px rgba(255,107,0,0.4); }
  60%  { box-shadow: 0 0 0 2px var(--accent-bright), 0 0 30px rgba(255,107,0,0.6); }
  100% { box-shadow: 0 0 0 1px var(--accent), 0 0 8px rgba(255,107,0,0.2); }
}

/* ── MATERIAL SWATCH WIPE ── */
@keyframes swatchWipe {
  from { clip-path: inset(0 100% 0 0); opacity: 0; }
  to   { clip-path: inset(0 0% 0 0);   opacity: 1; }
}

.mat-swatch {
  animation: swatchWipe 0.35s ease-out forwards;
  clip-path: inset(0 0% 0 0);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  border-left: 4px solid var(--mat-color, var(--accent));
  background: var(--mat-glow, rgba(91,155,213,0.08));
  transition: background 0.3s, border-color 0.3s;
}

.mat-swatch-color {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: var(--mat-color, var(--accent));
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--mat-color, var(--accent));
}

.mat-swatch-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--mat-color, var(--accent));
}

.mat-swatch-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ── MATERIAL PANEL ACTIVE STATES ── */
.cheat-panel {
  transition: background 0.3s, border-color 0.3s;
}

.cheat-panel.active {
  border-left: 3px solid var(--mat-color, var(--accent));
  padding-left: 1rem;
  margin-left: -1rem;
  background: var(--mat-glow, transparent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.mat-tab-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mat-tab-color, var(--accent));
  margin-right: 0.35rem;
  vertical-align: middle;
  box-shadow: 0 0 4px var(--mat-tab-color, var(--accent));
}

/* ── SPOOL CHIP (category labels on tools.html) ── */
.spool-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--spool-color, var(--text-muted));
  margin: 2.25rem 0 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--spool-color, var(--border));
  position: relative;
}

.spool-chip::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--spool-color, var(--accent));
}

.spool-chip:first-of-type { margin-top: 0; }

.spool-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}

/* ── EXPLODED PRINTER NAV ── */
.printer-nav {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  text-align: center;
}

.printer-nav-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.printer-nav svg {
  width: 100%;
  display: block;
}

/* Callout labels brighten when their part is hovered */
.printer-part:hover .callout-name { fill: var(--accent-bright); }
.printer-part:hover .callout-cat  { fill: var(--accent-bright); opacity: 0.85; }
.printer-part:hover .callout-connector { stroke: var(--accent-dim); }
.printer-part:hover .callout-dot  { fill: var(--accent); }

.printer-part {
  cursor: pointer;
  transition: filter 0.2s;
}

.printer-part:hover .part-body {
  filter: drop-shadow(0 0 8px var(--accent));
}

.printer-part .part-body {
  fill: var(--card);
  stroke: var(--border-light);
  stroke-width: 1.5;
  transition: fill 0.2s, stroke 0.2s;
}

.printer-part:hover .part-body {
  fill: var(--card-hover);
  stroke: var(--accent);
}

.printer-part .part-label {
  fill: var(--text-muted);
  font-size: 9px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  transition: fill 0.2s;
  pointer-events: none;
}

.printer-part:hover .part-label {
  fill: var(--accent-bright);
}

.part-tooltip {
  position: absolute;
  background: var(--card);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
  color: var(--text);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
  z-index: 50;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

/* ── ABOUT: calibrating blink ── */
.calibrating-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.calibrating-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent-bright);
  animation: blink 1.1s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── ABOUT: two-column layout ── */
.about-cols {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}
@media (max-width: 860px) {
  .about-cols { flex-direction: column; }
}

/* ══════════════════════════════════════════════════════════════════
   SPOOL CATEGORY CARDS (homepage category grid)
   ══════════════════════════════════════════════════════════════════ */

/* Category card additional states */
.home-cat-card {
  position: relative;
  overflow: hidden;
}

/* Inner glow bloom on hover using category color */
.home-cat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, var(--cat-glow, transparent) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 0;
}
.home-cat-card:hover::before { opacity: 1; }

/* Ensure text stays above the pseudo glow */
.home-cat-card > * { position: relative; z-index: 1; }


/* Spool icon container */
.home-cat-spool {
  color: var(--cat-color, var(--accent));
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
}

/* Spool icon glow on hover */
.home-cat-spool svg {
  display: block;
  transition: filter 0.3s ease;
}
.home-cat-card:hover .home-cat-spool svg {
  filter: drop-shadow(0 0 5px var(--cat-color, transparent));
}

/* Tool count inherits category color */
.home-cat-count {
  color: var(--cat-color, var(--accent));
}

/* ══════════════════════════════════════════════════════════════════
   SCROLL PROGRESS BAR
   ══════════════════════════════════════════════════════════════════ */

.scroll-progress {
  position: fixed;
  top: 60px;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 99;
  background: rgba(255, 107, 0, 0.08);
  pointer-events: none;
}

.scroll-progress::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  box-shadow: 0 0 8px rgba(255, 107, 0, 0.5);
  transform: scaleX(var(--scroll-pct, 0));
  transform-origin: left center;
  transition: transform 0.08s linear;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-progress { display: none; }
}

/* ══════════════════════════════════════════════════════════════════
   JOURNEY STAGE LABELS (scroll narrative)
   ══════════════════════════════════════════════════════════════════ */

.journey-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Thin accent tick before label */
.journey-label::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 2px;
  background: var(--accent-dim);
  border-radius: 1px;
  flex-shrink: 0;
}

/* Journey stage: section background glow shifts */
[data-journey="diagnose"] .home-section-title {
  /* subtle: no override, inherited blue */
}
[data-journey="browse"] {
  --section-glow: rgba(63,184,130,0.05);
}
[data-journey="confidence"] {
  --section-glow: rgba(137,196,244,0.06);
}

/* Active journey section gets a faint top edge light */
[data-journey].reveal-in {
  border-top: none;
  margin-top: 0;
}


/* Home page: stronger 3D hero and workflow motion */
.home-main {
  --home-scroll: 0;
  position: relative;
  isolation: isolate;
}

.home-main::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 107, 0, 0.07), transparent 28%),
    radial-gradient(circle at 80% 16%, rgba(255, 107, 0, 0.05), transparent 24%),
    linear-gradient(180deg, rgba(8, 13, 24, 0) 0%, rgba(8, 13, 24, 0.38) 100%);
  opacity: calc(0.55 + (var(--home-scroll) * 0.35));
  z-index: -1;
}

.home-hero {
  max-width: none;
}

.home-hero-sub {
  margin-left: 0;
}

.hero-visual {
  position: relative;
  min-height: 0;
  padding: 1.25rem;
  border: 1px solid rgba(91, 155, 213, 0.16);
  border-radius: 34px;
  background:
    radial-gradient(circle at 50% 0%, rgba(137, 196, 244, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(17, 28, 45, 0.82), rgba(8, 13, 24, 0.96));
  box-shadow: inset 0 1px 0 rgba(137, 196, 244, 0.08), 0 24px 50px rgba(0, 0, 0, 0.34);
  perspective: 1400px;
  perspective-origin: 50% 35%;
  overflow: hidden;
}

.hero-telemetry {
  position: absolute;
  top: 1rem;
  min-width: 144px;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(137, 196, 244, 0.18);
  border-radius: 14px;
  background: rgba(8, 13, 24, 0.58);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
  z-index: 4;
  animation: telemetryFloat 4.8s ease-in-out infinite;
}

.hero-telemetry-left {
  left: 0;
}

.hero-telemetry-right {
  right: 0;
  animation-delay: -2.4s;
}

.telemetry-label {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
}

.telemetry-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-bright);
}

.hero-printer-scene {
  --scene-tilt-x: 0deg;
  --scene-tilt-y: 0deg;
  position: absolute;
  inset: 1.1rem 1.1rem 6rem;
  transform-style: preserve-3d;
  transform: rotateX(var(--scene-tilt-x)) rotateY(var(--scene-tilt-y));
  transition: transform 0.28s ease-out;
}

.hero-depth-plane,
.hero-buildplate,
.hero-gantry,
.hero-floating-part,
.hero-light-column {
  transform-style: preserve-3d;
}

.hero-depth-plane {
  position: absolute;
  left: 8%;
  right: 8%;
  border-radius: 34px;
  border: 1px solid rgba(91, 155, 213, 0.16);
  background: linear-gradient(180deg, rgba(17, 28, 45, 0.82), rgba(8, 13, 24, 0.22));
  box-shadow: inset 0 1px 0 rgba(137, 196, 244, 0.12), 0 18px 40px rgba(0, 0, 0, 0.22);
}

.plane-back {
  top: 1rem;
  bottom: 9rem;
  transform: translateZ(-180px);
  opacity: 0.22;
  animation: planeDrift 11s ease-in-out infinite;
}

.plane-mid {
  top: 2.4rem;
  bottom: 7.2rem;
  left: 11%;
  right: 11%;
  transform: translateZ(-96px);
  opacity: 0.28;
  animation: planeDrift 9s ease-in-out infinite -3s;
}

.plane-front {
  top: 4rem;
  bottom: 5rem;
  left: 14%;
  right: 14%;
  transform: translateZ(-24px);
  opacity: 0.34;
  animation: planeDrift 7s ease-in-out infinite -1.6s;
}

.hero-light-column {
  position: absolute;
  top: 3rem;
  bottom: 5rem;
  left: 50%;
  width: 180px;
  transform: translateX(-50%) translateZ(30px);
  background: linear-gradient(180deg, rgba(137, 196, 244, 0.18), transparent 70%);
  filter: blur(10px);
  opacity: 0.7;
  animation: lightSweep 6s ease-in-out infinite;
}

.hero-gantry {
  position: absolute;
  inset: 4.2rem 4.8rem 11rem;
  transform: translateZ(72px);
}

.gantry-rail {
  position: absolute;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(137, 196, 244, 0.42), rgba(37, 61, 94, 0.8));
  box-shadow: 0 0 0 1px rgba(91, 155, 213, 0.18), 0 8px 18px rgba(0, 0, 0, 0.3);
}

.rail-top {
  top: 0;
  left: 5%;
  right: 5%;
  height: 12px;
}

.rail-left,
.rail-right {
  top: 0;
  width: 10px;
  bottom: 0;
}

.rail-left { left: 10%; }
.rail-right { right: 10%; }

.hero-printhead-track {
  position: absolute;
  top: 18px;
  left: 12%;
  right: 12%;
  height: 74px;
  animation: printheadTraverse 5.4s cubic-bezier(0.55, 0.08, 0.2, 0.98) infinite;
}

.hero-printhead {
  position: absolute;
  right: 0;
  width: 82px;
  height: 88px;
  transform-style: preserve-3d;
}

.printhead-body {
  position: absolute;
  inset: 0;
  border-radius: 16px 16px 22px 22px;
  background:
    linear-gradient(180deg, rgba(137, 196, 244, 0.22), rgba(17, 28, 45, 0.96) 40%),
    linear-gradient(135deg, rgba(17, 28, 45, 1), rgba(8, 13, 24, 0.96));
  border: 1px solid rgba(137, 196, 244, 0.18);
  box-shadow: 0 20px 28px rgba(0, 0, 0, 0.36);
}

.printhead-body::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 16px;
  right: 16px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(137, 196, 244, 0.7), transparent);
}

.printhead-fan {
  position: absolute;
  top: 20px;
  left: 50%;
  width: 34px;
  height: 34px;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 1px solid rgba(137, 196, 244, 0.2);
  background:
    radial-gradient(circle at center, rgba(8, 13, 24, 0.95) 20%, transparent 21%),
    conic-gradient(from 0deg, rgba(91, 155, 213, 0.18), rgba(137, 196, 244, 0.72), rgba(91, 155, 213, 0.18));
  animation: fanSpin 1.5s linear infinite;
}

.printhead-nozzle {
  position: absolute;
  left: 50%;
  bottom: -20px;
  width: 20px;
  height: 30px;
  transform: translateX(-50%);
  clip-path: polygon(35% 0%, 65% 0%, 100% 55%, 50% 100%, 0% 55%);
  background: linear-gradient(180deg, rgba(255, 193, 112, 0.95), rgba(232, 137, 42, 0.7));
  box-shadow: 0 0 18px rgba(232, 137, 42, 0.5);
}

.printhead-nozzle::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 90%;
  width: 3px;
  height: 44px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(137, 196, 244, 0.8), transparent);
  animation: filamentPulse 1.2s ease-in-out infinite;
}

.hero-buildplate {
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 0.9rem;
  height: 290px;
  transform: translateZ(18px);
}

.hero-bed-surface {
  position: absolute;
  inset: 0;
  border-radius: 30px;
  overflow: visible;
  transform-style: preserve-3d;
  transform: rotateX(63deg);
}

.hero-bed-surface::before {
  content: '';
  position: absolute;
  inset: 8% 7%;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(17, 28, 45, 0.98), rgba(8, 13, 24, 0.98));
  border: 1px solid rgba(137, 196, 244, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(137, 196, 244, 0.12),
    0 42px 80px rgba(0, 0, 0, 0.48);
}

.bed-grid,
.hero-toolpath,
.hero-print-object,
.hero-object-shadow,
.bed-axis {
  position: absolute;
  inset: 10% 10%;
  border-radius: 22px;
}

.bed-grid {
  background:
    linear-gradient(90deg, transparent 0, rgba(91, 155, 213, 0.18) 1px, transparent 1px),
    linear-gradient(180deg, transparent 0, rgba(91, 155, 213, 0.18) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.45));
}

.bed-axis {
  inset: auto;
  background: linear-gradient(90deg, rgba(137, 196, 244, 0.75), transparent);
  height: 2px;
}

.bed-axis-x {
  left: 16%;
  right: 22%;
  bottom: 12%;
}

.bed-axis-y {
  width: 2px;
  top: 22%;
  bottom: 18%;
  left: 16%;
  background: linear-gradient(180deg, rgba(137, 196, 244, 0.75), transparent);
}

.hero-toolpath {
  background:
    radial-gradient(circle at 15% 50%, rgba(137, 196, 244, 0.34), transparent 18%),
    repeating-linear-gradient(90deg, transparent 0 38px, rgba(137, 196, 244, 0.2) 38px 40px);
  opacity: 0.7;
}

.hero-toolpath::after {
  content: '';
  position: absolute;
  top: 18%;
  bottom: 20%;
  width: 36%;
  border-radius: 22px;
  background: linear-gradient(90deg, transparent, rgba(137, 196, 244, 0.7), transparent);
  filter: blur(10px);
  animation: toolpathSweep 5.4s linear infinite;
}

.hero-print-object {
  left: 40%;
  right: 40%;
  top: 19%;
  bottom: 23%;
  transform-style: preserve-3d;
  animation: objectHover 4.2s ease-in-out infinite;
}

.print-wireframe {
  position: absolute;
  inset: -4%;
  border-radius: 18px 18px 10px 10px;
  border: 1px solid rgba(137, 196, 244, 0.45);
  opacity: 0.55;
  box-shadow: 0 0 24px rgba(137, 196, 244, 0.12);
  animation: wireframeFlash 5.4s ease-in-out infinite;
}

.print-layer {
  --layer-index: 0;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 7%;
  border-radius: 10px 10px 6px 6px;
  background:
    linear-gradient(90deg, rgba(137, 196, 244, 0.82), rgba(91, 155, 213, 0.68)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 12px, transparent 12px 24px);
  border: 1px solid rgba(137, 196, 244, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform-origin: bottom center;
  opacity: 0;
  animation: layerPrint 5.4s linear infinite;
}

.print-layer:nth-child(2)  { --layer-index: 0; }
.print-layer:nth-child(3)  { --layer-index: 1; }
.print-layer:nth-child(4)  { --layer-index: 2; }
.print-layer:nth-child(5)  { --layer-index: 3; }
.print-layer:nth-child(6)  { --layer-index: 4; }
.print-layer:nth-child(7)  { --layer-index: 5; }
.print-layer:nth-child(8)  { --layer-index: 6; }
.print-layer:nth-child(9)  { --layer-index: 7; }
.print-layer:nth-child(10) { --layer-index: 8; }
.print-layer:nth-child(11) { --layer-index: 9; }
.print-layer:nth-child(12) { --layer-index: 10; }
.print-layer:nth-child(13) { --layer-index: 11; }

.hero-object-shadow {
  left: 35%;
  right: 35%;
  top: 44%;
  bottom: 34%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(8, 13, 24, 0.72), transparent 72%);
  transform: translateZ(-8px);
  filter: blur(18px);
  animation: shadowPulse 5.4s ease-in-out infinite;
}

.hero-floating-part {
  position: absolute;
  border: 1px solid rgba(137, 196, 244, 0.18);
  background: linear-gradient(180deg, rgba(17, 28, 45, 0.7), rgba(8, 13, 24, 0.88));
  box-shadow: 0 18px 24px rgba(0, 0, 0, 0.28);
  opacity: 0.92;
}

.hero-scene-actions {
  position: absolute;
  left: 1.1rem;
  right: 1.1rem;
  bottom: 1.1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  z-index: 6;
}

.hero-scene-action {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 76px;
  padding: 0.9rem 1rem 0.9rem 1.2rem;
  border-radius: 18px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid rgba(137, 196, 244, 0.16);
  background:
    linear-gradient(180deg, rgba(17, 28, 45, 0.82), rgba(8, 13, 24, 0.96)),
    radial-gradient(circle at 0% 50%, rgba(137, 196, 244, 0.12), transparent 24%);
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.24);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.hero-scene-action::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 50%;
  width: 9px;
  height: 9px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 10px rgba(137, 196, 244, 0.75);
}

.hero-scene-action:hover {
  color: var(--accent-bright);
  border-color: rgba(137, 196, 244, 0.45);
  transform: translateY(-4px);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.3), 0 0 24px rgba(137, 196, 244, 0.12);
}

.hero-scene-action-kicker {
  display: block;
  padding-left: 0.85rem;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}

.hero-scene-action-name {
  display: block;
  padding-left: 0.85rem;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.96rem;
  font-weight: 600;
}

.part-cube {
  top: 5rem;
  right: 11%;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  transform: translateZ(120px) rotate(15deg);
  animation: floatPart 8s ease-in-out infinite;
}

.part-ring {
  top: 11rem;
  left: 9%;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, transparent 42%, rgba(137, 196, 244, 0.5) 43% 46%, transparent 47%),
    linear-gradient(180deg, rgba(17, 28, 45, 0.7), rgba(8, 13, 24, 0.88));
  transform: translateZ(80px);
  animation: floatPart 9s ease-in-out infinite -2s;
}

.part-chip {
  right: 18%;
  bottom: 10rem;
  width: 92px;
  height: 20px;
  border-radius: 999px;
  transform: translateZ(72px) rotate(-14deg);
  animation: floatPart 7s ease-in-out infinite -3.2s;
}

.home-workflow-rail {
  position: sticky;
  top: 76px;
  z-index: 20;
  max-width: 1040px;
  margin: 1.1rem auto 0;
  padding: 0.8rem;
  border: 1px solid rgba(91, 155, 213, 0.16);
  border-radius: 18px;
  background: rgba(8, 13, 24, 0.65);
  backdrop-filter: blur(16px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.3);
}

.workflow-chip {
  position: relative;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(37, 61, 94, 0.75);
  background: linear-gradient(180deg, rgba(17, 28, 45, 0.84), rgba(8, 13, 24, 0.94));
  transform: perspective(900px) rotateX(10deg);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.workflow-chip.is-active {
  border-color: rgba(137, 196, 244, 0.42);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.3), 0 0 22px rgba(137, 196, 244, 0.14);
  transform: perspective(900px) rotateX(0deg) translateY(-4px);
}

.workflow-step {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
}

.workflow-name {
  display: block;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.workflow-chip.is-active .workflow-name {
  color: var(--accent-bright);
}

.home-section,
.home-value {
  position: relative;
}

.home-section {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

.home-section + .home-section {
  margin-top: 3.5rem;
}

.home-value {
  margin-top: 8rem;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

.home-featured-card,
.home-cat-card {
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.home-cat-card {
  min-height: 240px;
}

.home-cat-spool {
  width: 32px;
  height: 32px;
  margin-bottom: 0.65rem;
}

.home-cat-spool svg {
  width: 30px;
  height: 30px;
  display: block;
  transition: filter 0.3s ease;
}

.home-cat-card:hover .home-cat-spool svg {
  filter: drop-shadow(0 0 5px var(--cat-color, transparent));
}

body[data-journey="diagnose"] .home-workflow-rail {
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.3), 0 0 26px rgba(91, 155, 213, 0.1);
}

body[data-journey="browse"] .home-main::before {
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 107, 0, 0.07), transparent 24%),
    radial-gradient(circle at 80% 16%, rgba(255, 107, 0, 0.05), transparent 26%),
    linear-gradient(180deg, rgba(8, 13, 24, 0) 0%, rgba(8, 13, 24, 0.42) 100%);
}

body[data-journey="confidence"] .home-main::before {
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 107, 0, 0.07), transparent 24%),
    radial-gradient(circle at 82% 16%, rgba(232, 137, 42, 0.14), transparent 26%),
    linear-gradient(180deg, rgba(8, 13, 24, 0) 0%, rgba(8, 13, 24, 0.45) 100%);
}

@keyframes telemetryFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes planeDrift {
  0%, 100% { transform: translateZ(var(--plane-z, -80px)) translateY(0); }
  50% { transform: translateZ(var(--plane-z, -80px)) translateY(10px); }
}

.plane-back { --plane-z: -180px; }
.plane-mid { --plane-z: -96px; }
.plane-front { --plane-z: -24px; }

@keyframes lightSweep {
  0%, 100% { transform: translateX(-50%) translateZ(30px) scaleY(0.9); opacity: 0.4; }
  50% { transform: translateX(-44%) translateZ(48px) scaleY(1.04); opacity: 0.86; }
}

@keyframes printheadTraverse {
  0%, 100% { transform: translateX(-2%) translateY(0); }
  18% { transform: translateX(68%) translateY(10px); }
  34% { transform: translateX(26%) translateY(24px); }
  50% { transform: translateX(78%) translateY(34px); }
  66% { transform: translateX(34%) translateY(46px); }
  82% { transform: translateX(62%) translateY(58px); }
}

@keyframes fanSpin {
  to { transform: translateX(-50%) rotate(360deg); }
}

@keyframes filamentPulse {
  0%, 100% { opacity: 0.2; }
  45%, 60% { opacity: 0.9; }
}

@keyframes toolpathSweep {
  0% { left: -8%; opacity: 0; }
  12% { opacity: 0.85; }
  85% { opacity: 0.8; }
  100% { left: 78%; opacity: 0; }
}

@keyframes layerPrint {
  0% { opacity: 0; transform: translateY(16px) scaleX(0.82); }
  6% { opacity: 0; transform: translateY(16px) scaleX(0.82); }
  12% { opacity: 1; transform: translateY(calc(var(--layer-index) * -10px)) scaleX(1); }
  86% { opacity: 1; transform: translateY(calc(var(--layer-index) * -10px)) scaleX(1); }
  100% { opacity: 0.15; transform: translateY(calc(var(--layer-index) * -10px)) scaleX(1); }
}

.print-layer {
  animation-delay: calc(var(--layer-index) * 0.24s);
}

@keyframes objectHover {
  0%, 100% { transform: translateY(0) rotateY(-10deg); }
  50% { transform: translateY(-8px) rotateY(8deg); }
}

@keyframes wireframeFlash {
  0%, 100% { opacity: 0.22; }
  18%, 64% { opacity: 0.6; }
  72% { opacity: 0.85; }
}

@keyframes shadowPulse {
  0%, 100% { opacity: 0.36; transform: scale(0.92); }
  50% { opacity: 0.6; transform: scale(1.06); }
}

@keyframes floatPart {
  0%, 100% { transform: translateZ(90px) translateY(0) rotate(0deg); }
  50% { transform: translateZ(120px) translateY(-16px) rotate(12deg); }
}

.part-ring {
  animation-name: floatRing;
}

@keyframes floatRing {
  0%, 100% { transform: translateZ(80px) translateY(0) rotate(0deg); }
  50% { transform: translateZ(110px) translateY(-12px) rotate(18deg); }
}

@media (max-width: 980px) {
  .home-hero {
    min-height: auto;
    padding-bottom: 3.5rem;
  }

  .home-hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .home-hero-content {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
  }

  .home-hero-sub {
    margin: 0 auto 2rem;
  }

  .hero-visual {
    min-height: 500px;
  }

  .hero-telemetry-left {
    left: 6%;
  }

  .hero-telemetry-right {
    right: 6%;
  }
}

@media (max-width: 760px) {
  .hero-telemetry {
    min-width: 124px;
    padding: 0.7rem 0.85rem;
  }

  .hero-visual {
    min-height: 400px;
    padding-bottom: 5rem;
  }

  .hero-printer-scene {
    inset: 2.6rem 0.6rem 4.8rem;
  }

  .hero-gantry {
    inset: 4.4rem 1rem 7rem;
  }

  .hero-buildplate {
    left: 0;
    right: 0;
    height: 260px;
  }

  .hero-scene-actions {
    left: 0.8rem;
    right: 0.8rem;
    gap: 0.6rem;
  }

  .hero-scene-action {
    min-height: 68px;
    padding: 0.75rem 0.85rem 0.75rem 1rem;
  }

  .home-workflow-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    top: 70px;
  }
}

@media (max-width: 640px) {
  .home-hero {
    padding: 3.5rem 1rem 2.6rem;
  }

  .hero-telemetry {
    display: none;
  }

  .hero-visual {
    min-height: 340px;
  }

  .hero-depth-plane {
    left: 4%;
    right: 4%;
  }

  .hero-scene-actions {
    grid-template-columns: 1fr;
    bottom: 0.8rem;
  }

  .home-workflow-rail {
    margin-inline: 1rem;
  }

  .home-cat-card {
    min-height: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero-inner,
  .hero-printer-scene,
  .hero-printhead-track,
  .hero-print-object,
  .hero-toolpath::after,
  .print-layer,
  .hero-floating-part,
  .hero-light-column,
  .hero-telemetry,
  .hero-scene-action {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }

  .home-workflow-rail {
    position: relative;
    top: 0;
  }

  .home-featured-card,
  .home-cat-card {
    transform: none !important;
  }

  .print-layer {
    opacity: 1 !important;
    transform: translateY(calc(var(--layer-index) * -10px)) !important;
  }
}
