/* ==========================================================================
   狗云 路 Orbit Design System 鈥?base layer
   Dark, quiet, high-contrast. No external dependencies.
   ========================================================================== */

@font-face {
  font-family: "GT-Haptik";
  src: url("../../font/GT-Haptik-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "GT-Haptik";
  src: url("../../font/GT-Haptik-Bold-2.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* canvas */
  --bg: #05070a;
  --bg-soft: #080b11;
  --bg-elev: #0c1018;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-3: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* ink */
  --text: #eef3f8;
  --text-2: #a9b6c6;
  --text-3: #748194;
  --text-4: #5d6a7c;

  /* signal */
  --mint: #7ef0cf;
  --mint-strong: #43dfba;
  --mint-ink: #03130f;
  --violet: #9b8cff;
  --pink: #ff5c9d;
  --amber: #ffc46b;
  --danger: #ff7d7d;
  --ok: #6ee7b7;

  --grad-mint: linear-gradient(135deg, #d8fff4 0%, #7ef0cf 42%, #38bdf8 100%);
  --grad-violet: linear-gradient(135deg, #d5ccff 0%, #9b8cff 55%, #6366f1 100%);
  --grad-text: linear-gradient(100deg, #ffffff 0%, #bfffee 38%, #7ef0cf 62%, #9b8cff 100%);
  --grad-line: linear-gradient(90deg, transparent, rgba(126, 240, 207, 0.45), transparent);

  --shadow-sm: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 8px 24px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 24px 60px rgba(0, 0, 0, 0.38);
  --shadow-glow: 0 0 0 1px rgba(126, 240, 207, 0.22), 0 18px 60px rgba(67, 223, 186, 0.16);

  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --radius-pill: 999px;

  --container: 1180px;
  --gutter: clamp(20px, 4vw, 44px);
  --section-y: clamp(76px, 9.5vw, 132px);

  --font-sans: "GT-Haptik", "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei",
    "Noto Sans SC", system-ui, sans-serif;
  --font-mono: "SFMono-Regular", "Cascadia Mono", "JetBrains Mono", "Roboto Mono", Consolas,
    "Liberation Mono", monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-snap: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 76px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
}

body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1100px 760px at 88% -12%, rgba(126, 240, 207, 0.075), transparent 62%),
    radial-gradient(1000px 800px at -12% 34%, rgba(155, 140, 255, 0.06), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

p,
h1,
h2,
h3,
h4,
h5,
h6,
figure,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

::selection {
  background: rgba(126, 240, 207, 0.26);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
  border-radius: 6px;
}

hr {
  border: 0;
  height: 1px;
  background: var(--line);
}

/* ---------- layout ---------- */

.container {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

.container-wide {
  width: min(100% - (var(--gutter) * 2), 1340px);
  margin-inline: auto;
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

.section--tight {
  padding-block: clamp(56px, 7vw, 88px);
}

.section-line {
  border-top: 1px solid var(--line);
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 10000;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--mint);
  color: var(--mint-ink);
  font-weight: 700;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

[data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  line-height: 0;
}

[data-icon] > svg {
  width: 1em;
  height: 1em;
}

/* ---------- typography ---------- */

.display,
.h1,
.h2,
.h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.display {
  font-size: clamp(3.4rem, 8vw, 7.1rem);
}

.h1 {
  font-size: clamp(2.7rem, 5.8vw, 4.9rem);
}

.h2 {
  font-size: clamp(2rem, 3.9vw, 3.35rem);
  line-height: 1.08;
}

.h3 {
  font-size: clamp(1.3rem, 2.1vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--text-3);
}

.eyebrow .dot-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(126, 240, 207, 0.7);
  animation: pulse-dot 2.4s var(--ease) infinite;
}

.lead {
  font-size: clamp(1rem, 1.35vw, 1.14rem);
  line-height: 1.8;
  color: var(--text-2);
  text-wrap: pretty;
}

.small {
  font-size: 0.875rem;
  color: var(--text-3);
  line-height: 1.65;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--text-2);
}

.dim {
  color: var(--text-3);
}

.text-mint {
  color: var(--mint);
}

.text-pink {
  color: var(--pink);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: clamp(36px, 4.6vw, 58px);
}

.section-head__copy {
  max-width: 660px;
}

.section-head .eyebrow {
  margin-bottom: 18px;
}

.section-head .lead {
  margin-top: 20px;
  max-width: 540px;
}

.section-head__aside {
  flex: none;
  max-width: 300px;
  padding-bottom: 6px;
  font-size: 0.9rem;
  color: var(--text-3);
  line-height: 1.7;
}

/* ---------- buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  transition:
    transform 0.25s var(--ease),
    background 0.25s var(--ease),
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    color 0.25s var(--ease);
  isolation: isolate;
  overflow: hidden;
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.99);
}

.btn-primary {
  background: var(--grad-mint);
  color: var(--mint-ink);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18) inset,
    0 14px 40px rgba(67, 223, 186, 0.16);
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.55) 48%, transparent 62%);
  transform: translateX(-130%);
  transition: transform 0.7s var(--ease);
}

.btn-primary:hover::after {
  transform: translateX(130%);
}

.btn-primary:hover {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.24) inset,
    0 20px 50px rgba(67, 223, 186, 0.24);
}

.btn-ghost {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  backdrop-filter: blur(12px);
}

.btn-ghost:hover {
  border-color: rgba(126, 240, 207, 0.42);
  background: rgba(126, 240, 207, 0.07);
}

.btn-quiet {
  color: var(--text-2);
  min-height: 40px;
  padding: 0 14px;
  font-weight: 500;
}

.btn-quiet:hover {
  color: var(--text);
  background: var(--surface);
}

.btn-danger {
  color: #ffb4b4;
  border-color: rgba(255, 125, 125, 0.24);
  background: rgba(255, 125, 125, 0.06);
}

.btn-danger:hover {
  background: rgba(255, 125, 125, 0.12);
  border-color: rgba(255, 125, 125, 0.44);
}

.btn-sm {
  min-height: 38px;
  padding: 0 15px;
  font-size: 0.83rem;
}

.btn-lg {
  min-height: 56px;
  padding: 0 30px;
  font-size: 1rem;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn[disabled],
.btn.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.btn-icon {
  width: 42px;
  height: 42px;
  min-height: 0;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
}

.btn-icon:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--mint);
}

.link-arrow svg {
  width: 15px;
  height: 15px;
  transition: transform 0.25s var(--ease);
}

.link-arrow:hover svg {
  transform: translateX(4px);
}

.link-underline {
  color: var(--mint);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: rgba(126, 240, 207, 0.4);
}

.link-underline:hover {
  text-decoration-color: var(--mint);
}

/* ---------- surfaces ---------- */

.panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.014)),
    var(--bg-soft);
  box-shadow: var(--shadow-sm);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 18% auto 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  pointer-events: none;
}

.panel-pad {
  padding: clamp(22px, 3vw, 34px);
}

.panel-hover {
  transition:
    transform 0.4s var(--ease),
    border-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}

.panel-hover:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.glass {
  background: rgba(8, 11, 17, 0.62);
  border: 1px solid var(--line);
  backdrop-filter: blur(22px) saturate(120%);
  -webkit-backdrop-filter: blur(22px) saturate(120%);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-2);
  white-space: nowrap;
}

.pill svg {
  width: 12px;
  height: 12px;
}

.pill--mint {
  color: var(--mint);
  border-color: rgba(126, 240, 207, 0.22);
  background: rgba(126, 240, 207, 0.07);
}

.pill--pink {
  color: #ffb3cf;
  border-color: rgba(255, 92, 157, 0.24);
  background: rgba(255, 92, 157, 0.08);
}

.pill--violet {
  color: #cbc2ff;
  border-color: rgba(155, 140, 255, 0.24);
  background: rgba(155, 140, 255, 0.08);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px rgba(110, 231, 183, 0.8);
  flex: none;
}

.status-dot--off {
  background: var(--text-4);
  box-shadow: none;
}

.status-dot--warn {
  background: var(--amber);
  box-shadow: 0 0 10px rgba(255, 196, 107, 0.6);
}

/* ---------- forms ---------- */

.field {
  display: grid;
  gap: 9px;
}

.field + .field {
  margin-top: 18px;
}

.label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-2);
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 0.98rem;
  outline: none;
  transition:
    border-color 0.25s var(--ease),
    background 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.textarea {
  min-height: 120px;
  padding-top: 14px;
  resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-4);
}

.input:hover,
.textarea:hover {
  border-color: var(--line-strong);
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: rgba(126, 240, 207, 0.55);
  background: rgba(126, 240, 207, 0.04);
  box-shadow: 0 0 0 4px rgba(126, 240, 207, 0.08);
}

.input--mono {
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}

.input.is-invalid {
  border-color: rgba(255, 125, 125, 0.62);
  background: rgba(255, 125, 125, 0.04);
  box-shadow: 0 0 0 4px rgba(255, 125, 125, 0.08);
  animation: input-shake 0.38s var(--ease);
}

@keyframes input-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  50% {
    transform: translateX(5px);
  }
  75% {
    transform: translateX(-3px);
  }
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap .input {
  padding-right: 104px;
}

.input-actions {
  position: absolute;
  right: 8px;
  display: flex;
  gap: 4px;
}

.hint {
  font-size: 0.78rem;
  color: var(--text-3);
  line-height: 1.6;
}

.error-text {
  display: none;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: #ffb4b4;
}

.error-text.is-on {
  display: flex;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.55;
}

.checkbox input {
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  flex: none;
  display: grid;
  place-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.checkbox input::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--mint-ink);
  border-bottom: 2px solid var(--mint-ink);
  transform: rotate(-45deg) scale(0);
  transition: transform 0.16s var(--ease);
  margin-top: -2px;
}

.checkbox input:checked {
  background: var(--mint);
  border-color: var(--mint);
}

.checkbox input:checked::after {
  transform: rotate(-45deg) scale(1);
}

/* ---------- feedback ---------- */

.toast-stack {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 10020;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(10, 14, 21, 0.94);
  box-shadow: var(--shadow-md);
  color: var(--text);
  font-size: 0.87rem;
  backdrop-filter: blur(18px);
  animation: toast-in 0.35s var(--ease-snap) both;
  pointer-events: auto;
}

.toast.is-out {
  animation: toast-out 0.25s var(--ease) both;
}

.toast__icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(126, 240, 207, 0.12);
  color: var(--mint);
  flex: none;
}

.toast__icon svg {
  width: 14px;
  height: 14px;
}

.toast--error .toast__icon {
  background: rgba(255, 125, 125, 0.12);
  color: var(--danger);
}

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.5s infinite;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--mint);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex: none;
}

.spinner--dark {
  border-color: rgba(3, 19, 15, 0.24);
  border-top-color: var(--mint-ink);
}

/* ---------- overlays ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 10030;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 5, 8, 0.74);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.28s var(--ease),
    visibility 0.28s;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal__dialog {
  position: relative;
  width: min(440px, 100%);
  max-height: min(86vh, 900px);
  overflow: auto;
  padding: clamp(24px, 4vw, 34px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #0d1219, #080b10);
  box-shadow: var(--shadow-md);
  transform: translateY(18px) scale(0.98);
  transition: transform 0.32s var(--ease-snap);
}

.modal.is-open .modal__dialog {
  transform: none;
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.modal__title {
  padding-right: 36px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.modal__body {
  margin-top: 16px;
}

/* ---------- motion ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
  transition-delay: var(--delay, 0ms);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

.fade-in {
  animation: fade-in 0.6s var(--ease) both;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(126, 240, 207, 0.65);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(126, 240, 207, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(126, 240, 207, 0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

@keyframes float-y {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ---------- scrollbar ---------- */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #05070a;
}

::-webkit-scrollbar-thumb {
  border: 3px solid #05070a;
  border-radius: 10px;
  background: #263041;
}

::-webkit-scrollbar-thumb:hover {
  background: #354154;
}

/* ---------- responsive / preferences ---------- */

@media (max-width: 900px) {
  .section-head {
    display: block;
  }

  .section-head__aside {
    margin-top: 20px;
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

