:root {
  --brand: #63c0ab;
  --ink: #101b18;
  --paper: #f6f2ea;
  --line: rgba(255, 255, 255, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

button {
  font: inherit;
}

.prototype-intro,
.prototype-outro {
  display: grid;
  min-height: 72vh;
  align-content: center;
  padding: 80px max(28px, calc((100vw - 1160px) / 2));
}

.prototype-intro h1 {
  max-width: 820px;
  margin: 0;
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: clamp(42px, 7vw, 92px);
  font-weight: 500;
  line-height: 1.04;
}

.prototype-intro p:not(.eyebrow),
.prototype-outro p {
  max-width: 620px;
  margin: 22px 0 0;
  color: #5f6964;
  font-size: 18px;
  line-height: 1.7;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.animation-scroll {
  position: relative;
  --brand: #63c0ab;
  --ink: #101b18;
  --paper: #f6f2ea;
  --line: rgba(255, 255, 255, 0.22);
  height: 560vh;
  background:
    radial-gradient(circle at 50% 35%, rgba(99, 192, 171, 0.1), rgba(99, 192, 171, 0) 36%),
    #eee8dc;
}

.system-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto auto auto;
  align-content: center;
  justify-items: center;
  gap: 10px;
  overflow: hidden;
  padding: 20px 0 28px;
  background:
    linear-gradient(180deg, rgba(246, 242, 234, 0.8), rgba(231, 224, 211, 0.92)),
    #eee8dc;
  --stage-width: min(calc(100vw - 120px), calc((100vh - 330px) * 1.7777778));
}

.website-system-demo .system-stage {
  padding-top: 86px;
  --stage-width: min(calc(100vw - 120px), calc((100vh - 430px) * 1.7777778), 1040px);
}

.section-anchor {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.system-demo-heading {
  position: relative;
  z-index: 8;
  width: var(--stage-width);
  color: var(--ink);
  text-align: left;
}

.system-demo-heading h2 {
  max-width: 100%;
  margin: 0;
  color: #071c16;
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: clamp(34px, 3.25vw, 48px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.system-demo-heading .section-note {
  max-width: 520px;
  margin: 10px 0 0;
  color: #41524b;
  font-size: 16px;
  line-height: 1.6;
}

.map-frame {
  position: relative;
  width: var(--stage-width);
  aspect-ratio: 16 / 9;
  height: auto;
  margin-bottom: 6px;
  border: 1px solid rgba(16, 27, 24, 0.14);
  border-radius: 14px;
  box-shadow: 0 28px 80px rgba(16, 27, 24, 0.2);
  overflow: hidden;
}

.map-image,
.map-shade,
.pipe-layer,
.mist-layer,
.hotspot-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-image {
  object-fit: cover;
}

.map-shade {
  z-index: 1;
  background:
    radial-gradient(circle at 72% 56%, rgba(6, 16, 13, 0.1), rgba(6, 16, 13, 0.2) 38%, rgba(6, 16, 13, 0.48) 100%),
    linear-gradient(90deg, rgba(6, 16, 13, 0.56), rgba(6, 16, 13, 0.1) 44%, rgba(6, 16, 13, 0.24));
}

.pipe-layer {
  z-index: 2;
}

.pipe-routes path {
  fill: none;
  stroke: rgba(226, 236, 234, 0.7);
  stroke-width: 20;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: var(--pipe-opacity, 0);
  filter: drop-shadow(0 0 10px rgba(99, 192, 171, 0.28));
}

.pipe-routes path.pipe-ready {
  transition: opacity 260ms ease;
}

.nozzle-layer circle {
  fill: var(--brand);
  opacity: 0;
  stroke: rgba(255, 253, 248, 0.96);
  stroke-width: 10;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0.55);
  filter: drop-shadow(0 0 18px rgba(99, 192, 171, 0.72));
  transition: opacity 260ms ease, transform 320ms cubic-bezier(0.2, 1, 0.2, 1);
}

.nozzle-layer circle.is-marked {
  opacity: 0.96;
  transform: scale(1);
  animation: nozzle-mark-pulse 1.8s ease-in-out infinite;
}

@keyframes nozzle-mark-pulse {
  50% {
    opacity: 0.68;
    transform: scale(1.28);
  }
}

.mist-layer {
  z-index: 4;
  pointer-events: none;
}

.mist {
  position: absolute;
  left: calc(var(--x) / 1920 * 100%);
  top: calc(var(--y) / 1080 * 100%);
  width: 86px;
  height: 86px;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.62);
}

.mist::before,
.mist::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.26) 44%, rgba(255, 255, 255, 0) 74%);
  animation: mist-pulse 2.9s ease-in-out infinite;
}

.mist::after {
  animation-delay: 1.35s;
}

.mist.is-layout {
  opacity: 0.72;
  transform: translate(-50%, -50%) scale(0.66);
  transition: opacity 420ms ease, transform 420ms ease;
}

.mist.is-layout::before {
  opacity: 0.68;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.18) 48%, rgba(255, 255, 255, 0) 72%);
  animation: mist-breathe 3s ease-in-out infinite;
}

.mist.is-layout::after {
  opacity: 0;
  animation: none;
}

.mist.is-active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity 500ms ease, transform 500ms ease;
}

.mist.is-active::after {
  animation: mist-pulse 2.9s ease-in-out infinite;
}

@keyframes mist-pulse {
  0% {
    opacity: 0;
    transform: scale(0.35);
  }
  42% {
    opacity: 0.62;
  }
  100% {
    opacity: 0;
    transform: scale(1.4);
  }
}

@keyframes mist-breathe {
  0%,
  100% {
    transform: scale(0.58);
  }
  50% {
    transform: scale(0.88);
  }
}

.info-panel {
  position: relative;
  z-index: 8;
  width: var(--stage-width);
  min-height: 126px;
  padding: 14px 22px;
  overflow: hidden;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.46);
  box-shadow: 0 18px 46px rgba(16, 27, 24, 0.08);
  backdrop-filter: blur(18px) saturate(1.1);
  text-shadow: none;
}

.info-panel::before {
  content: attr(data-stage);
  position: absolute;
  right: 22px;
  top: 2px;
  z-index: -1;
  color: rgba(99, 192, 171, 0.13);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(58px, 8vw, 96px);
  font-weight: 500;
  line-height: 1;
  pointer-events: none;
}

.step-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 6px;
  color: #2aa891;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.step-kicker::after {
  content: "";
  width: 72px;
  height: 1px;
  background: rgba(99, 192, 171, 0.7);
}

.info-panel h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 500;
  line-height: 1.02;
  color: #071c16;
}

.info-panel p:last-child {
  max-width: 830px;
  margin: 8px 0 0;
  color: #31433c;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.info-panel.is-compact {
  width: var(--stage-width);
  min-height: auto;
  padding: 18px 22px;
}

.info-panel.is-compact::before {
  content: "";
}

.info-panel.is-compact .step-kicker {
  margin: 0;
  color: #10251f;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: none;
}

.info-panel.is-compact h2,
.info-panel.is-compact p:last-child {
  display: none;
}

.step-nav {
  position: relative;
  z-index: 8;
  display: flex;
  gap: 8px;
  width: min(860px, var(--stage-width));
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(16, 27, 24, 0.82);
  box-shadow: 0 16px 42px rgba(16, 27, 24, 0.16);
  backdrop-filter: blur(18px) saturate(1.15);
}

.step-nav button {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  padding: 9px 10px;
  color: rgba(255, 253, 248, 0.62);
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.step-nav button.is-active {
  color: var(--ink);
  background: rgba(255, 253, 248, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

@media (min-width: 761px) and (max-height: 760px) {
  .website-system-demo .system-stage {
    gap: 8px;
    padding-top: 74px;
    --stage-width: min(calc(100vw - 120px), calc((100vh - 380px) * 1.7777778), 980px);
  }

  .system-demo-heading h2 {
    font-size: clamp(30px, 2.7vw, 40px);
  }

  .system-demo-heading .section-note {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.35;
  }

  .info-panel {
    min-height: 116px;
    padding: 12px 18px;
  }

  .info-panel h2 {
    font-size: clamp(24px, 2.2vw, 30px);
  }

  .info-panel p:last-child {
    font-size: 13px;
    line-height: 1.42;
  }
}

.hotspot-layer {
  z-index: 7;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  left: calc(var(--x) / 1920 * 100%);
  top: calc(var(--y) / 1080 * 100%);
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: transparent;
  border: 2px solid rgba(99, 192, 171, 0.96);
  border-radius: 50%;
  background: rgba(99, 192, 171, 0.2);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2), inset 0 0 18px rgba(188, 244, 231, 0.38);
  cursor: pointer;
  font-size: 0;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.72);
}

.hotspot::before,
.hotspot::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--brand);
}

.hotspot::after {
  inset: -8px;
  border: 1px solid rgba(99, 192, 171, 0.5);
  background: transparent;
}

.hotspot.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity 360ms ease, transform 360ms cubic-bezier(0.2, 1, 0.2, 1.2);
  animation: hotspot-pulse 2.2s ease-in-out infinite;
}

@keyframes hotspot-pulse {
  60% {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2), 0 0 0 18px rgba(99, 192, 171, 0);
  }
}

.detail-hint {
  position: absolute;
  z-index: 8;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: min(360px, calc(100% - 48px));
  padding: 14px 18px;
  color: rgba(255, 253, 248, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(16, 27, 24, 0.48);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px) saturate(1.25);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -44%) scale(0.96);
  transition: opacity 260ms ease, transform 260ms ease;
}

.detail-hint.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.detail-hint.is-pulsing {
  animation: detail-hint-breathe 0.9s ease-in-out 3;
}

@keyframes detail-hint-breathe {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24), 0 0 0 6px rgba(99, 192, 171, 0.12);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.06);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24), 0 0 0 18px rgba(99, 192, 171, 0);
  }
}

.detail-hint span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 7px rgba(99, 192, 171, 0.18);
}

.detail-hint strong {
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.detail-card {
  position: absolute;
  z-index: 10;
  left: var(--detail-left, 24px);
  top: var(--detail-top, 24px);
  display: flex;
  width: min(380px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  flex-direction: column;
  overflow: hidden;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  background: #fffdf8;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.98);
}

.detail-card.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition: opacity 220ms ease, transform 220ms ease;
}

.detail-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: 230px;
  flex: 0 0 auto;
  object-fit: cover;
  background: transparent;
}

.detail-card div {
  padding: 20px;
  overflow: auto;
}

.detail-index {
  margin: 0 0 8px;
  color: var(--brand);
  font-weight: 900;
}

.detail-card h3 {
  margin: 0;
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: 26px;
  font-weight: 500;
}

.detail-card p:last-child {
  margin: 12px 0 0;
  color: #5f6964;
  font-size: 14px;
  line-height: 1.68;
}

.detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #10251f;
  border: 1px solid rgba(16, 27, 24, 0.18);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
}

.detail-close:hover {
  background: #fffdf8;
}

@media (max-width: 760px) {
  .prototype-intro,
  .prototype-outro {
    min-height: 58vh;
    padding: 54px 20px;
  }

  .system-stage {
    height: 100svh;
    min-height: 680px;
    grid-template-rows: auto auto auto auto;
    align-content: start;
    gap: 8px;
    padding: 18px 0 max(16px, env(safe-area-inset-bottom));
    --stage-width: calc(100vw - 24px);
  }

  .website-system-demo .system-stage {
    height: auto;
    min-height: min(100svh, 640px);
    grid-template-rows: auto auto auto auto;
    align-content: start;
    padding-top: 112px;
    --stage-width: calc(100vw - 24px);
  }

  .website-system-demo .map-frame,
  .website-system-demo .step-nav {
    align-self: start;
  }

  .system-demo-heading {
    width: var(--stage-width);
  }

  .system-demo-heading h2 {
    max-width: 330px;
    font-size: 30px;
    line-height: 1.12;
    white-space: normal;
  }

  .system-demo-heading .section-note {
    max-width: 330px;
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.42;
  }

  .map-frame {
    width: var(--stage-width);
    aspect-ratio: 16 / 9;
    height: auto;
    align-self: start;
    border-radius: 10px;
    margin-top: 2px;
    margin-bottom: 6px;
  }

  .info-panel {
    width: var(--stage-width);
    min-height: 154px;
    height: auto;
    padding: 14px 16px;
    background: rgba(255, 253, 248, 0.56);
  }

  .info-panel::before {
    right: 0;
    top: -18px;
    font-size: 72px;
  }

  .info-panel h2 {
    font-size: 26px;
    line-height: 1.08;
  }

  .info-panel p:last-child {
    max-width: 100%;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  .step-kicker {
    margin-bottom: 8px;
    font-size: 12px;
  }

  .step-kicker::after {
    width: 46px;
  }

  .step-nav {
    position: relative;
    left: auto;
    bottom: auto;
    display: flex;
    align-self: start;
    width: var(--stage-width);
    gap: 6px;
    padding: 7px;
    border-radius: 999px;
    transform: none;
  }

  .step-nav button {
    padding: 8px 4px;
    font-size: 10.5px;
  }

  .detail-hint {
    left: 50%;
    top: 50%;
    bottom: auto;
    max-width: calc(100% - 32px);
    padding: 12px 14px;
  }

  .detail-hint strong {
    font-size: 12px;
  }

  .hotspot {
    width: 42px;
    height: 42px;
  }

  .detail-card {
    position: fixed;
    left: 50%;
    right: auto;
    top: auto;
    bottom: max(14px, env(safe-area-inset-bottom));
    width: min(calc(100vw - 28px), 430px);
    max-height: min(64dvh, 560px);
    border-radius: 16px;
    background: #fffdf8;
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.32);
    transform: translate(-50%, 22px);
  }

  .detail-card.is-open {
    transform: translate(-50%, 0);
  }

  .detail-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    max-height: none;
    object-fit: cover;
    border-bottom: 1px solid rgba(16, 27, 24, 0.1);
  }

  .detail-card div {
    max-height: 24dvh;
    padding: 14px 16px 16px;
    overflow: auto;
  }

  .detail-index {
    margin-bottom: 5px;
    font-size: 12px;
  }

  .detail-card h3 {
    font-size: 21px;
    line-height: 1.18;
  }

  .detail-card p:last-child {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.6;
  }

  .detail-close {
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    background: rgba(255, 253, 248, 0.96);
  }
}

@media (max-width: 760px) and (max-height: 680px) {
  .detail-card {
    max-height: 58dvh;
  }

  .detail-card div {
    max-height: 20dvh;
    padding: 12px 14px 14px;
  }

  .detail-card h3 {
    font-size: 19px;
  }

  .detail-card p:last-child {
    font-size: 12px;
  }
}
