/* ==========================================================================
   Concept 01 — Machine + Signal
   Rotating gear train + orbiting capability word cloud
   ========================================================================== */

:root {
  --paper: #fbfaff;
  --paper-2: #f3efff;
  --white: #ffffff;
  --ink: #241b4d;
  --muted: #6d628d;
  --line: rgba(36, 27, 77, 0.14);
  --teal: #6d4aff;
  --cyan: #b8a5ff;
  --blue: #8b5cf6;
  --copper: #b87333;
  --copper-deep: #a0522d;
  --copper-glow: rgba(184, 115, 51, 0.85);
  --header: 90px;
  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: clip;
  background:
    radial-gradient(780px 560px at 55% 58%, rgba(184, 115, 51, 0.055), transparent 64%),
    radial-gradient(900px 700px at 88% 12%, rgba(184, 165, 255, 0.22), transparent 64%),
    radial-gradient(800px 600px at 8% 86%, rgba(139, 92, 246, 0.08), transparent 65%),
    var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
figure,
ul {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

svg {
  display: block;
  max-width: 100%;
}

.mono {
  font-family: var(--font-mono);
}

.container {
  width: min(var(--wrap), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

/* Header -------------------------------------------------------------------- */

.concept-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid transparent;
  background: rgba(251, 250, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.concept-header::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(184, 115, 51, 0.34) 24%,
    rgba(109, 74, 255, 0.24) 72%,
    transparent
  );
  pointer-events: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  color: var(--teal);
}

.brand-dot,
.brand-dot-static {
  fill: var(--copper);
  stroke: #ffffff;
  stroke-width: 0.9;
  filter: drop-shadow(0 0 5px var(--copper-glow));
}

.brand-dot-static {
  display: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.055em;
}

.brand-setu {
  color: var(--copper);
}

.brand-sub {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-meta > .mono {
  color: var(--muted);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 1.094rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  white-space: nowrap;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.back-link:hover {
  border-color: var(--teal);
  color: var(--teal);
}

/* Opening / stage ----------------------------------------------------------- */

.opening {
  position: relative;
  min-height: calc(100svh - var(--header));
  overflow: hidden;
}

.opening-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(109, 74, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109, 74, 255, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 52% 48%, black 8%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 52% 48%, black 8%, transparent 80%);
  pointer-events: none;
}

.opening::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='180'%20height='180'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.85'%20numOctaves='4'%20stitchTiles='stitch'/%3E%3C/filter%3E%3Crect%20width='100%25'%20height='100%25'%20filter='url(%23n)'%20opacity='0.55'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.opening-inner {
  position: relative;
  z-index: 2;
  min-height: calc(100svh - var(--header) - 64px);
}

.stage {
  position: relative;
  height: calc(100svh - var(--header) - 64px);
  min-height: 680px;
}

/* ALaaS bridge -------------------------------------------------------------- */

.bridge-track {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.stage.is-bridge-ready .bridge-track {
  opacity: 1;
}

.bridge-cable {
  fill: none;
  stroke: rgba(36, 27, 77, 0.64);
  stroke-width: 2.4;
  stroke-linecap: round;
}

.bridge-hangers {
  fill: none;
  stroke: rgba(36, 27, 77, 0.36);
  stroke-width: 1.3;
}

.bridge-towers {
  fill: none;
  stroke: rgba(36, 27, 77, 0.78);
  stroke-width: 2.8;
  stroke-linecap: round;
}

.bridge-caps {
  fill: none;
  stroke: var(--copper);
  stroke-width: 2.8;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px var(--copper-glow));
}

.bridge-deck {
  fill: none;
  stroke: url(#bridge-deck-gradient);
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 9px rgba(184, 115, 51, 0.42));
}

.bridge-pulse {
  fill: var(--copper);
  stroke: rgba(255, 255, 255, 0.78);
  stroke-width: 0.9;
  filter: drop-shadow(0 0 9px var(--copper-glow));
}

.bridge-pulse.is-trail {
  stroke: none;
  opacity: 0.4;
}

.bridge-pulse.is-trail-2 {
  opacity: 0.25;
}

/* Bridge labels ------------------------------------------------------------- */

.bridge-label {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -100%);
  transition: opacity 0.5s ease;
}

.stage.is-bridge-ready .bridge-label {
  opacity: 1;
}

.bridge-label.is-below {
  transform: translate(-50%, 0);
}

.bridge-label-kicker {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  line-height: 1.1;
  text-transform: uppercase;
}

.bridge-label-sub {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  line-height: 1.2;
  opacity: 0.75;
  text-transform: uppercase;
}

.bridge-label-title {
  color: var(--copper-deep);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
}

.bridge-label-alaas {
  gap: 4px;
  padding: 8px 14px 9px;
  border: 1px solid rgba(184, 115, 51, 0.3);
  border-radius: 999px;
  background: rgba(251, 250, 255, 0.84);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translate(-50%, -100%) rotate(var(--bridge-angle, 0deg));
  transform-origin: 50% 100%;
}

.bridge-label-alaas .bridge-label-sub {
  color: var(--copper-deep);
  opacity: 0.8;
}

/* Machine ------------------------------------------------------------------- */

.machine-object {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  width: min(33%, 410px);
}

.machine-object::before {
  content: "";
  position: absolute;
  inset: 10%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(
    circle at 56% 54%,
    rgba(109, 74, 255, 0.18),
    rgba(184, 115, 51, 0.05) 44%,
    transparent 70%
  );
  filter: blur(30px);
  pointer-events: none;
}

.gear-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.gear-svg use {
  fill: url(#gear-fill);
  stroke: rgba(184, 165, 255, 0.7);
  stroke-width: 1.1;
  filter: drop-shadow(0 10px 22px rgba(36, 27, 77, 0.2))
    drop-shadow(0 0 14px rgba(109, 74, 255, 0.14));
}

/* Feature orbit ------------------------------------------------------------- */

.feature-orbit {
  position: absolute;
  top: 3%;
  right: 0;
  z-index: 2;
  width: min(45%, 550px);
  aspect-ratio: 1 / 1;
  --word-size: clamp(0.78rem, 1.3vw, 1.2rem);
  --ring-word-size: 20px;
  --ring-font-scale: 1;
  --focus-multiplier: 1.5;
}

.feature-orbit::before,
.feature-orbit::after {
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
}

.feature-orbit::before {
  inset: 2%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(184, 115, 51, 0.1),
    rgba(109, 74, 255, 0.09) 38%,
    transparent 68%
  );
  filter: blur(18px);
}

.feature-orbit::after {
  inset: 34%;
  background: radial-gradient(circle, rgba(184, 115, 51, 0.16), transparent 70%);
  filter: blur(12px);
}

.orbit-atmos {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.orbit-dots {
  transform-origin: 300px 300px;
  animation: orbitDots 95s linear infinite;
}

.orbit-dots.is-reverse {
  animation-duration: 140s;
  animation-direction: reverse;
}

.orbit-dots circle {
  fill: var(--copper);
  opacity: 0.42;
  filter: drop-shadow(0 0 4px var(--copper-glow));
}

.orbit-dots.is-reverse circle {
  fill: var(--teal);
  opacity: 0.28;
}

@keyframes orbitDots {
  to {
    transform: rotate(360deg);
  }
}

.word-size-probe {
  position: absolute;
  visibility: hidden;
  pointer-events: none;
  font-family: var(--font-display);
  font-size: var(--word-size);
  font-weight: 700;
}

.word-arcs {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.feature-orbit.is-ready .word-arcs {
  opacity: 1;
}

.feature-words {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  list-style: none;
}

.feature-word {
  fill: url(#word-ink-gradient);
  font-family: var(--font-display);
  font-size: calc(var(--ring-word-size) * var(--ring-font-scale, 1));
  font-weight: 700;
  letter-spacing: -0.03em;
  text-anchor: middle;
  opacity: var(--word-alpha, 0.72);
  transition: fill 0.35s ease, filter 0.35s ease;
}

.feature-focus {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  display: block;
  width: max-content;
  color: var(--copper-deep);
  background: linear-gradient(180deg, #e2a66e 0%, #b87333 48%, #8d461f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-display);
  font-size: calc(var(--word-size) * var(--focus-multiplier));
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(calc(0.35 * var(--focus-fit, 1)));
  transform-origin: center;
  filter: drop-shadow(0 10px 22px rgba(184, 115, 51, 0.28));
  transition: opacity 0.25s ease, transform 0.45s var(--ease);
  will-change: transform, opacity;
}

.feature-focus.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(var(--focus-fit, 1));
}

/* Footer -------------------------------------------------------------------- */

.concept-footer {
  border-top: 1px solid var(--line);
  background: rgba(251, 250, 255, 0.7);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  color: var(--muted);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Responsive ---------------------------------------------------------------- */

@media (max-width: 1100px) {
  .machine-object {
    width: min(36%, 400px);
  }

  .feature-orbit {
    width: min(48%, 540px);
  }

  .stage {
    min-height: 680px;
  }
}

@media (max-width: 900px) {
  .machine-object {
    width: min(40%, 360px);
  }

  .feature-orbit {
    width: min(56%, 500px);
  }

  .stage {
    min-height: 660px;
  }

  .bridge-label-kicker {
    font-size: 0.72rem;
  }

  .bridge-label-sub {
    display: none;
  }

  .bridge-label-title {
    font-size: 1.2rem;
  }

  .bridge-label-alaas {
    padding: 6px 11px 7px;
  }

  .bridge-label-alaas .bridge-label-sub {
    display: block;
    font-size: 0.5rem;
  }
}

@media (max-width: 700px) {
  .header-meta > .mono {
    display: none;
  }

  .machine-object {
    left: 0;
    bottom: 0;
    width: 50%;
  }

  .feature-orbit {
    top: 2%;
    right: 0;
    width: 88%;
    --word-size: 0.8rem;
  }

  .stage {
    height: calc(100svh - var(--header) - 56px);
    min-height: 620px;
  }

  .bridge-label-kicker {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
  }

  .bridge-label-sub {
    display: none;
  }

  .bridge-label-title {
    font-size: 1.1rem;
  }

  .bridge-label-alaas {
    padding: 5px 10px 6px;
  }

  .bridge-label-alaas .bridge-label-sub {
    display: block;
    font-size: 0.5rem;
  }

  .footer-inner {
    min-height: 56px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding-block: 10px;
  }
}

@media (max-width: 480px) {
  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand-name {
    font-size: 1.375rem;
  }

  .back-link {
    padding: 8px 11px;
    font-size: 1.094rem;
  }

  .machine-object {
    width: 50%;
  }

  .feature-orbit {
    width: 88%;
    --word-size: 0.78rem;
    --focus-multiplier: 4.5;
  }

  .stage {
    min-height: 600px;
  }

  .bridge-label-kicker {
    font-size: 0.7rem;
  }

  .bridge-label-title {
    font-size: 1rem;
  }

  .bridge-label-alaas .bridge-label-sub {
    display: none;
  }
}

@media (max-width: 380px) {
  .header-inner {
    gap: 10px;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-name {
    font-size: 1.15rem;
  }

  .brand-sub {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
  }

  .back-link {
    padding: 8px 10px;
    font-size: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .feature-word {
    opacity: 0.72;
  }

  .feature-focus {
    font-size: var(--word-size);
  }

  .bridge-pulse {
    display: none;
  }

  .orbit-dots {
    animation: none;
  }

  .brand-dot {
    display: none;
  }

  .brand-dot-static {
    display: inline;
  }
}

/* Capability readout ------------------------------------------------------- */

.capability-viz {
  position: absolute;
  z-index: 3;
  display: flex;
  width: 360px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(36, 27, 77, 0.1);
  border-radius: 15px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.92),
    rgba(248, 245, 255, 0.76)
  );
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.95),
    0 20px 46px rgba(36, 27, 77, 0.085);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.985);
  transition: opacity 0.45s ease, transform 0.45s var(--ease);
}

.capability-viz.is-visible {
  opacity: 1;
  transform: none;
}

.viz-info {
  display: flex;
  width: 142px;
  flex: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.viz-top {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.47rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.viz-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  white-space: nowrap;
}

.viz-live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--copper);
  box-shadow: 0 0 8px var(--copper-glow);
  animation: vizLive 2.4s ease-in-out infinite;
}

.viz-title {
  margin-top: 4px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.viz-metric {
  color: var(--copper-deep);
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.viz-chart-wrap {
  min-width: 0;
  flex: 1;
}

.viz-chart {
  display: block;
  width: 100%;
  height: 88px;
}

.viz-state {
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.3s ease, transform 0.3s var(--ease);
}

.viz-state.is-active {
  opacity: 1;
  transform: none;
}

.viz-axis,
.viz-threshold {
  fill: none;
  stroke: rgba(36, 27, 77, 0.12);
  stroke-width: 1;
}

.viz-threshold {
  stroke-dasharray: 3 4;
}

.viz-gauge {
  fill: none;
  stroke: rgba(36, 27, 77, 0.11);
  stroke-width: 5;
  stroke-linecap: round;
}

.viz-line {
  fill: none;
  stroke: var(--teal);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.viz-line.is-dashed {
  stroke-dasharray: 3 4;
}

.viz-node {
  fill: #ffffff;
  stroke: rgba(36, 27, 77, 0.25);
  stroke-width: 1;
}

.viz-node.is-hot {
  fill: rgba(109, 74, 255, 0.1);
  stroke: var(--teal);
}

.viz-halo {
  fill: none;
  stroke: rgba(109, 74, 255, 0.24);
}

.viz-bar {
  fill: rgba(109, 74, 255, 0.16);
}

.viz-bar.is-hot {
  fill: url(#viz-gradient);
}

.viz-needle {
  stroke: var(--copper);
  stroke-width: 2;
  stroke-linecap: round;
}

.viz-label {
  fill: var(--muted);
  font-family: var(--font-mono);
  font-size: 5.5px;
  letter-spacing: 0.08em;
}

.viz-value {
  fill: var(--ink);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.04em;
}

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

@media (max-width: 1000px) {
  .capability-viz {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .viz-live i {
    animation: none;
  }
}

/* Single popping word + enlarged right-side readout */

.feature-orbit .word-arcs {
  visibility: hidden;
  opacity: 0 !important;
}

.feature-orbit .orbit-atmos {
  display: none;
}

.feature-orbit::before,
.feature-orbit::after {
  display: none;
}

.capability-viz {
  width: 460px;
  padding: 12px 14px;
}

.viz-info {
  width: 150px;
}

.viz-chart {
  height: clamp(96px, 9vw, 128px);
}

.viz-metric {
  margin-top: 7px;
  font-size: 0.58rem;
}

/* Circular capability meter ------------------------------------------------- */

.capability-viz {
  display: block;
  width: 320px;
  height: 320px;
  padding: 0;
  overflow: hidden;
  border-radius: 50%;
}

.viz-meter {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.viz-meter-ring {
  fill: none;
  stroke: rgba(36, 27, 77, 0.12);
  stroke-width: 1;
}

.viz-meter-ring.is-inner {
  stroke: rgba(109, 74, 255, 0.13);
  stroke-dasharray: 2 7;
}

.viz-meter-ticks line {
  stroke: rgba(36, 27, 77, 0.28);
  stroke-width: 2.4;
  stroke-linecap: round;
}

.viz-meter-ticks line.is-major {
  stroke: rgba(109, 74, 255, 0.55);
  stroke-width: 4.2;
}

.viz-info {
  position: absolute;
  top: 14%;
  left: 50%;
  z-index: 2;
  width: 78%;
  align-items: center;
  gap: 2px;
  transform: translateX(-50%);
  text-align: center;
}

.viz-top {
  justify-content: center;
  gap: 12px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.viz-metric {
  margin-top: 3px;
  color: var(--copper-deep);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.viz-chart-wrap {
  position: absolute;
  top: 31%;
  left: 50%;
  z-index: 1;
  width: 84%;
  transform: translateX(-50%);
}

.viz-chart {
  width: 100%;
  height: auto;
}

.viz-axis,
.viz-threshold {
  stroke-width: 1.2;
}

.viz-gauge {
  stroke-width: 6;
}

.viz-label {
  fill: rgba(36, 27, 77, 0.68);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.viz-value {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.viz-needle {
  stroke-width: 2.4;
}

@media (max-width: 1180px) and (min-width: 1001px) {
  .viz-info {
    top: 13%;
    width: 88%;
  }

  .viz-top {
    gap: 8px;
    font-size: 0.56rem;
    letter-spacing: 0.08em;
  }

  .viz-kicker {
    white-space: nowrap;
  }
}

@media (max-width: 1000px) {
  .capability-viz {
    display: none;
  }
}

/* Final label placement + rotating readout highlight */

.bridge-label-alaas {
  transform: translate(-50%, 0) rotate(var(--bridge-angle, 0deg));
  transform-origin: 50% 0;
}

.capability-viz {
  overflow: visible;
  border: 3px solid rgba(109, 74, 255, 0.3);
}

.viz-spin {
  position: absolute;
  top: -13px;
  left: -13px;
  z-index: 4;
  width: calc(100% + 26px);
  height: calc(100% + 26px);
  max-width: none;
  max-height: none;
  overflow: visible;
  pointer-events: none;
}

.viz-spin-arc {
  fill: none;
  stroke: #7c5cff;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 150 1720;
  filter: drop-shadow(0 0 8px rgba(109, 74, 255, 0.6));
}

.viz-spin-arc.is-copper {
  stroke: #c47b35;
  stroke-width: 6;
  stroke-dasharray: 34 1836;
  stroke-dashoffset: -174;
  opacity: 0.95;
  filter: drop-shadow(0 0 7px rgba(196, 123, 53, 0.55));
}

.viz-spin-dot {
  fill: #c47b35;
  filter: drop-shadow(0 0 8px rgba(196, 123, 53, 0.8));
}

/* Night mode ---------------------------------------------------------------- */

[data-theme="night"] {
  color-scheme: dark;
  --paper: #08050f;
  --paper-2: #100a1f;
  --white: #17112b;
  --ink: #f4f0ff;
  --muted: #aaa0ce;
  --line: rgba(216, 204, 255, 0.16);
  --teal: #a98bff;
  --cyan: #cabcff;
  --blue: #8b5cf6;
  --copper: #e1a86d;
  --copper-deep: #f2c892;
  --copper-glow: rgba(225, 168, 109, 0.7);
}

[data-theme="night"] body {
  background:
    radial-gradient(900px 660px at 58% 56%, rgba(225, 168, 109, 0.085), transparent 62%),
    radial-gradient(1050px 780px at 86% 8%, rgba(120, 88, 255, 0.2), transparent 64%),
    radial-gradient(900px 700px at 5% 88%, rgba(71, 42, 160, 0.22), transparent 68%),
    var(--paper);
  color: var(--ink);
}

[data-theme="night"] ::selection {
  background: rgba(169, 139, 255, 0.36);
  color: #ffffff;
}

[data-theme="night"] .skip-link {
  background: var(--ink);
  color: #0b0716;
}

[data-theme="night"] .concept-header {
  border-bottom-color: rgba(216, 204, 255, 0.08);
  background: rgba(8, 5, 15, 0.8);
}

[data-theme="night"] .concept-header::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(225, 168, 109, 0.48) 24%,
    rgba(169, 139, 255, 0.42) 72%,
    transparent
  );
}

[data-theme="night"] .brand-dot,
[data-theme="night"] .brand-dot-static {
  stroke: #08050f;
}

[data-theme="night"] .back-link {
  border-color: rgba(216, 204, 255, 0.2);
  background: rgba(26, 18, 48, 0.48);
}

[data-theme="night"] .back-link:hover {
  border-color: var(--copper);
  color: var(--copper-deep);
}

[data-theme="night"] .opening-bg {
  background-image:
    linear-gradient(rgba(169, 139, 255, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(169, 139, 255, 0.11) 1px, transparent 1px);
}

[data-theme="night"] .opening::after {
  opacity: 0.03;
  mix-blend-mode: screen;
}

[data-theme="night"] .bridge-cable {
  stroke: rgba(213, 201, 255, 0.72);
}

[data-theme="night"] .bridge-hangers {
  stroke: rgba(213, 201, 255, 0.34);
}

[data-theme="night"] .bridge-towers {
  stroke: rgba(235, 226, 255, 0.88);
}

[data-theme="night"] .bridge-deck {
  filter: drop-shadow(0 0 10px rgba(225, 168, 109, 0.52))
    drop-shadow(0 0 18px rgba(148, 112, 255, 0.24));
}

[data-theme="night"] .bridge-pulse {
  stroke: rgba(8, 5, 15, 0.9);
}

[data-theme="night"] .bridge-label-kicker {
  color: #d8cef2;
}

[data-theme="night"] .bridge-label-sub {
  color: #a99ecb;
  opacity: 0.84;
}

[data-theme="night"] .bridge-label-alaas {
  border-color: rgba(225, 168, 109, 0.42);
  background: linear-gradient(
    145deg,
    rgba(35, 25, 61, 0.92),
    rgba(15, 10, 29, 0.86)
  );
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42),
    inset 0 1px rgba(255, 255, 255, 0.08);
}

[data-theme="night"] .bridge-label-alaas .bridge-label-sub {
  color: var(--copper-deep);
}

[data-theme="night"] .machine-object::before {
  background: radial-gradient(
    circle at 56% 54%,
    rgba(139, 92, 246, 0.26),
    rgba(225, 168, 109, 0.08) 44%,
    transparent 70%
  );
}

[data-theme="night"] .gear-svg use {
  stroke: rgba(203, 188, 255, 0.58);
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.45))
    drop-shadow(0 0 22px rgba(139, 92, 246, 0.2));
}

[data-theme="night"] .feature-focus {
  background: linear-gradient(180deg, #ffe5c0 0%, #efb778 48%, #c97f42 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 12px 28px rgba(225, 168, 109, 0.3))
    drop-shadow(0 0 18px rgba(225, 168, 109, 0.18));
}

[data-theme="night"] .capability-viz {
  border: 3px solid rgba(235, 198, 146, 0.54);
  background:
    radial-gradient(circle at 50% 16%, rgba(128, 96, 230, 0.26), transparent 56%),
    linear-gradient(150deg, rgba(31, 23, 58, 0.97), rgba(12, 8, 24, 0.93));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.1),
    0 30px 80px rgba(0, 0, 0, 0.6), 0 0 46px rgba(122, 88, 255, 0.16);
}

[data-theme="night"] .viz-spin-arc {
  stroke: #b7a1ff;
  filter: drop-shadow(0 0 9px rgba(183, 161, 255, 0.85));
}

[data-theme="night"] .viz-spin-arc.is-copper {
  stroke: #f0ba7e;
  filter: drop-shadow(0 0 7px rgba(240, 186, 126, 0.8));
}

[data-theme="night"] .viz-spin-dot {
  fill: #ffe4c2;
  filter: drop-shadow(0 0 8px rgba(255, 205, 149, 1));
}

[data-theme="night"] .viz-meter-ring {
  stroke: rgba(235, 225, 255, 0.3);
  stroke-width: 2;
}

[data-theme="night"] .viz-meter-ring.is-inner {
  stroke: rgba(169, 139, 255, 0.36);
  stroke-width: 1.6;
  stroke-dasharray: 3 8;
}

[data-theme="night"] .viz-top,
[data-theme="night"] .viz-live {
  color: #d0c5eb;
}

[data-theme="night"] .viz-metric {
  color: var(--copper-deep);
}

[data-theme="night"] .viz-axis,
[data-theme="night"] .viz-threshold {
  stroke: rgba(220, 209, 255, 0.2);
}

[data-theme="night"] .viz-gauge {
  stroke: rgba(220, 209, 255, 0.17);
}

[data-theme="night"] .viz-node {
  fill: #120c24;
  stroke: rgba(220, 209, 255, 0.52);
}

[data-theme="night"] .viz-node.is-hot {
  fill: rgba(169, 139, 255, 0.24);
  stroke: var(--teal);
}

[data-theme="night"] .viz-halo {
  stroke: rgba(169, 139, 255, 0.42);
}

[data-theme="night"] .viz-bar {
  fill: rgba(169, 139, 255, 0.28);
}

[data-theme="night"] .viz-label {
  fill: rgba(233, 226, 255, 0.72);
}

[data-theme="night"] .viz-value {
  fill: var(--ink);
}

[data-theme="night"] .viz-needle {
  stroke: var(--copper);
}

[data-theme="night"] .concept-footer {
  border-top-color: rgba(216, 204, 255, 0.12);
  background: rgba(8, 5, 15, 0.72);
}

/* Theme switch -------------------------------------------------------------- */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--copper);
  color: var(--copper-deep);
}

.theme-toggle-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex: none;
}

.theme-toggle-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .icon-moon,
.theme-toggle .label-night {
  display: none;
}

[data-theme="night"] .theme-toggle {
  background: rgba(26, 18, 48, 0.48);
  border-color: rgba(216, 204, 255, 0.2);
  color: #c8bce4;
}

[data-theme="night"] .theme-toggle:hover {
  border-color: var(--copper);
  color: var(--copper-deep);
}

[data-theme="night"] .theme-toggle .icon-moon {
  display: block;
}

[data-theme="night"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="night"] .theme-toggle .label-night {
  display: inline;
}

[data-theme="night"] .theme-toggle .label-day {
  display: none;
}

@media (max-width: 1100px) {
  .theme-toggle {
    width: 42px;
    min-height: 42px;
    padding: 0;
  }

  .theme-toggle-label {
    display: none;
  }
}

@media (max-width: 760px) {
  .header-meta > .mono {
    display: none;
  }
}

@media (max-width: 700px) {
  .header-inner {
    gap: 12px;
  }

  .header-meta {
    gap: 8px;
  }

  .theme-toggle {
    width: 40px;
    min-height: 40px;
  }
}

@media (max-width: 480px) {
  .theme-toggle {
    width: 38px;
    min-height: 38px;
  }
}

@media (max-width: 380px) {
  .theme-toggle {
    width: 36px;
    min-height: 36px;
  }
}

@media (min-width: 1101px) {
  .theme-toggle {
    min-width: 88px;
  }
}
