:root {
  --cyan: #5ff7ff;
  --blue: #5f8cff;
  --pink: #ff72d8;
  --violet: #9e7bff;
  --green: #8dffc2;
  --amber: #ffd98c;
  --white: #f7fbff;
  --muted: #a8bdd1;
  --dark: #03040b;
  --panel: rgba(8, 13, 31, .58);
  --line: rgba(95, 247, 255, .24);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--dark);
}

body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  color: var(--white);
  background: radial-gradient(circle at 50% 40%, #101c44, #03040b 58%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(circle at 68% 42%, rgba(95,247,255,.18), transparent 22%),
    radial-gradient(circle at 22% 74%, rgba(255,114,216,.16), transparent 26%),
    radial-gradient(circle at 86% 18%, rgba(158,123,255,.2), transparent 20%);
  mix-blend-mode: screen;
}

body::after {
  background:
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 82%);
}

button, a { font: inherit; }
a { color: inherit; text-decoration: none; }

#demoCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
}

.demo-topbar {
  position: fixed;
  top: 22px;
  left: 24px;
  right: 24px;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.demo-brand,
.demo-topbar nav,
.privacy-badge,
.control-hint,
.inspector {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 90px rgba(0,0,0,.26), inset 0 0 28px rgba(255,255,255,.035);
}

.demo-brand {
  pointer-events: auto;
  display: grid;
  gap: 2px;
  padding: 11px 14px;
  border-radius: 999px;
}

.demo-brand b { font-size: 14px; letter-spacing: .08em; }
.demo-brand span { color: var(--muted); font-size: 10px; text-transform: uppercase; }

.demo-topbar nav {
  pointer-events: auto;
  display: flex;
  gap: 4px;
  padding: 7px;
  border-radius: 999px;
}

.demo-topbar button,
.demo-topbar a {
  border: 0;
  padding: 9px 12px;
  color: #dafbff;
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
}

.demo-topbar button:hover,
.demo-topbar a:hover {
  background: rgba(95,247,255,.12);
}

.privacy-badge {
  position: fixed;
  left: 24px;
  bottom: 26px;
  z-index: 18;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  color: #d8fbff;
  border-radius: 999px;
  font-size: 12px;
  pointer-events: none;
}

.privacy-badge span {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 18px var(--green);
}

.demo-story {
  position: relative;
  z-index: 4;
}

.demo-layer {
  min-height: 112vh;
  display: grid;
  align-items: center;
  padding: 16vh clamp(22px, 6vw, 96px);
}

.layer-copy {
  width: min(560px, 92vw);
  padding: 24px;
  border: 1px solid rgba(95,247,255,.2);
  background:
    linear-gradient(145deg, rgba(95,247,255,.08), rgba(255,114,216,.065)),
    rgba(6, 9, 24, .34);
  backdrop-filter: blur(20px);
  border-radius: 30px;
  box-shadow: 0 26px 90px rgba(0,0,0,.32);
  opacity: 0;
  transform: translateY(42px);
  transition: opacity 700ms ease, transform 700ms ease, border-color 700ms ease;
}

.demo-layer[data-visible="true"] .layer-copy {
  opacity: 1;
  transform: translateY(0);
  border-color: rgba(95,247,255,.46);
}

.hero-copy {
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
}

.right { margin-left: auto; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan);
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-shadow: 0 0 22px rgba(95,247,255,.5);
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 24px;
  font-size: clamp(64px, 12vw, 170px);
  line-height: .82;
  letter-spacing: 0;
  text-shadow: 0 0 30px rgba(95,247,255,.25), 0 0 54px rgba(255,114,216,.2);
}

h2 {
  margin-bottom: 22px;
  font-size: clamp(48px, 8vw, 122px);
  line-height: .9;
  letter-spacing: 0;
}

.layer-copy p:not(.eyebrow) {
  color: rgba(227,244,255,.86);
  font-size: clamp(16px, 1.5vw, 22px);
  line-height: 1.72;
}

.blueprint {
  min-height: 100vh;
}

.blueprint-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  width: 100%;
}

.blueprint-grid article {
  min-height: 220px;
  padding: 18px;
  border: 1px solid rgba(95,247,255,.2);
  background: rgba(8,13,31,.46);
  backdrop-filter: blur(20px);
  border-radius: 22px;
}

.blueprint-grid h3 {
  color: var(--cyan);
}

.blueprint-grid p {
  color: var(--muted);
  line-height: 1.6;
}

.inspector {
  position: fixed;
  right: 24px;
  bottom: 82px;
  z-index: 30;
  width: min(430px, calc(100vw - 48px));
  padding: 18px;
  border-radius: 24px;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.inspector[data-open="true"] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#closeInspector {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  color: var(--white);
  background: rgba(255,255,255,.06);
  border-radius: 50%;
  cursor: pointer;
}

#inspectorType {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

#inspectorTitle {
  margin: 0 34px 8px 0;
  font-size: 28px;
}

#inspectorMeta {
  color: var(--muted);
  font-size: 13px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0;
}

.tag-row span {
  padding: 6px 9px;
  color: #031018;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

#inspectorText {
  color: rgba(227,244,255,.86);
  line-height: 1.6;
}

.tooltip {
  position: fixed;
  z-index: 40;
  max-width: 220px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  color: var(--white);
  background: rgba(4,8,20,.72);
  backdrop-filter: blur(16px);
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(12px, 12px);
  transition: opacity 120ms ease;
}

.control-hint {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 19;
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 999px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 12px;
  pointer-events: none;
}

.control-hint span {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
}

.demo-icp {
  position: fixed;
  right: 24px;
  bottom: 18px;
  z-index: 18;
}

.demo-icp a {
  color: rgba(227,244,255,.58);
  font-size: 12px;
}

@media (max-width: 900px) {
  .demo-topbar nav { display: none; }
  .demo-layer { min-height: 104vh; padding: 16vh 18px; }
  .right { margin-left: 0; }
  .blueprint-grid { grid-template-columns: 1fr; }
  .control-hint { display: none; }
  .privacy-badge { left: 14px; right: 14px; justify-content: center; }
}

@media (max-width: 560px) {
  .demo-topbar { left: 14px; right: 14px; top: 14px; }
  h1 { font-size: clamp(54px, 18vw, 88px); }
  h2 { font-size: clamp(42px, 15vw, 72px); }
  .layer-copy { padding: 18px; border-radius: 22px; }
}
