:root {
  --bg: #060812;
  --panel: rgba(12, 17, 30, 0.72);
  --panel-strong: rgba(17, 23, 40, 0.88);
  --ink: #f6f1e8;
  --muted: #a9adbc;
  --faint: #71788d;
  --line: rgba(255, 255, 255, 0.13);
  --mars: #cf6c47;
  --mars-dark: #78341f;
  --gold: #f2c17b;
  --cyan: #6fd4ff;
  --green: #7df0a6;
  --red: #ff6b6b;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
  --max: 1200px;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "SF Pro Display", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 74% 18%, rgba(207, 108, 71, 0.28), transparent 28%),
    radial-gradient(circle at 14% 12%, rgba(111, 212, 255, 0.15), transparent 24%),
    radial-gradient(circle at 50% 120%, rgba(242, 193, 123, 0.1), transparent 35%),
    linear-gradient(180deg, #080b16 0%, #050712 54%, #03040a 100%);
}

.site-texture {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.78) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(255, 224, 180, 0.5) 0 1px, transparent 1.3px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-position: 0 0, 42px 88px, 0 0;
  background-size: 150px 150px, 230px 230px, 80px 80px;
  opacity: 0.55;
}

.meteor-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.meteor-field span {
  position: absolute;
  top: -8%;
  left: -22%;
  width: 190px;
  height: 1px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(242, 193, 123, 0.52), rgba(255, 255, 255, 0.95));
  filter: drop-shadow(0 0 8px rgba(242, 193, 123, 0.6));
  transform: rotate(32deg);
  animation: meteor 7s linear infinite;
}

.meteor-field span:nth-child(2) {
  top: 4%;
  left: -34%;
  width: 150px;
  animation-delay: 1.1s;
  animation-duration: 8.5s;
}

.meteor-field span:nth-child(3) {
  top: 18%;
  left: -26%;
  width: 220px;
  animation-delay: 2.3s;
  animation-duration: 9.4s;
}

.meteor-field span:nth-child(4) {
  top: 34%;
  left: -30%;
  width: 140px;
  animation-delay: 3.6s;
  animation-duration: 7.8s;
}

.meteor-field span:nth-child(5) {
  top: 48%;
  left: -24%;
  width: 210px;
  animation-delay: 4.8s;
  animation-duration: 10.2s;
}

.meteor-field span:nth-child(6) {
  top: 62%;
  left: -36%;
  width: 160px;
  animation-delay: 6.2s;
  animation-duration: 8.8s;
}

.meteor-field span:nth-child(7) {
  top: 76%;
  left: -28%;
  width: 230px;
  animation-delay: 7.7s;
  animation-duration: 11.4s;
}

.meteor-field span:nth-child(8) {
  top: 88%;
  left: -22%;
  width: 130px;
  animation-delay: 9.1s;
  animation-duration: 9.6s;
}

.meteor-field span:nth-child(9) {
  top: 12%;
  left: -42%;
  width: 260px;
  animation-delay: 0.4s;
  animation-duration: 12s;
}

.meteor-field span:nth-child(10) {
  top: 26%;
  left: -18%;
  width: 120px;
  animation-delay: 5.5s;
  animation-duration: 7.2s;
}

.meteor-field span:nth-child(11) {
  top: 57%;
  left: -38%;
  width: 250px;
  animation-delay: 8.4s;
  animation-duration: 12.8s;
}

.meteor-field span:nth-child(12) {
  top: 71%;
  left: -20%;
  width: 155px;
  animation-delay: 10.1s;
  animation-duration: 8.1s;
}

@keyframes meteor {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(32deg);
  }
  8% {
    opacity: 0.85;
  }
  28% {
    opacity: 0;
    transform: translate3d(1120px, 620px, 0) rotate(32deg);
  }
  100% {
    opacity: 0;
    transform: translate3d(1120px, 620px, 0) rotate(32deg);
  }
}

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

button,
a,
canvas {
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
  font: inherit;
}

.page-shell {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 18px;
}

.topbar,
main {
  width: min(100%, var(--max));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 11, 19, 0.78);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(24px);
}

.brand,
.nav-links,
.hero-actions,
.layer-tabs,
.form-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius);
  color: #130c08;
  background: linear-gradient(145deg, #ffd59a, var(--mars));
  font-weight: 950;
  box-shadow: 0 0 28px rgba(207, 108, 71, 0.34);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
}

.brand small,
.eyebrow,
.console-head span,
.flow-board span,
.layer-card span,
.risk-matrix span,
.guardrail-note span,
.nft-showcase article p,
.manual-lane p,
.selected-model-note,
.form-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.eyebrow,
.console-head span,
.flow-board span,
.layer-card span,
.risk-matrix span,
.guardrail-note span {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  justify-content: center;
  gap: 6px;
}

.nav-links a {
  min-height: 38px;
  padding: 10px 13px;
  border-radius: var(--radius);
  color: #d8d7da;
  font-size: 13px;
  font-weight: 850;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.09);
}

.top-action,
.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 900;
}

.top-action,
.primary-button {
  padding: 0 16px;
  color: #150e09;
  background: linear-gradient(145deg, #ffd59a, #f09a61);
  box-shadow: 0 0 28px rgba(207, 108, 71, 0.22);
}

.secondary-button {
  padding: 0 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
  min-height: 860px;
  align-items: start;
  padding: 70px 0 40px;
}

.hero-copy {
  min-width: 0;
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

h1,
h2,
h3,
p {
  margin: 0;
  overflow-wrap: anywhere;
}

h1 {
  max-width: 980px;
  margin: 0 auto;
  font-size: clamp(58px, 8vw, 108px);
  line-height: 0.92;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-shadow: 0 0 40px rgba(242, 193, 123, 0.12);
}

h2 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.03;
  letter-spacing: 0;
}

h3 {
  font-size: 23px;
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-summary {
  max-width: 760px;
  margin: 22px auto 0;
  color: #d6d1ca;
  font-size: 20px;
  line-height: 1.58;
}

.hero-actions {
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.orbital-console,
.flow-board article,
.layer-card,
.manual-lane,
.risk-matrix article,
.nft-showcase,
.apply-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.orbital-console {
  display: grid;
  gap: 16px;
  width: min(100%, 980px);
  min-width: 0;
  justify-self: center;
  padding: 16px;
}

.console-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.console-head strong {
  text-align: right;
  font-size: 15px;
}

.signal-viewport {
  position: relative;
  overflow: hidden;
  height: 540px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 50%, rgba(242, 193, 123, 0.13), transparent 32%),
    radial-gradient(circle at 80% 24%, rgba(111, 212, 255, 0.1), transparent 25%),
    linear-gradient(180deg, rgba(13, 18, 32, 0.82), rgba(5, 8, 17, 0.94));
}

.signal-viewport::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.55) 0 1px, transparent 1.4px);
  background-size: 72px 72px;
  opacity: 0.35;
}

#signalCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

#signalCanvas:active {
  cursor: grabbing;
}

.canvas-fallback {
  position: absolute;
  right: 12px;
  bottom: 12px;
  pointer-events: none;
}

.canvas-fallback span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 14, 25, 0.72);
  color: #f1d4a7;
  font-size: 12px;
  font-weight: 850;
}

.layer-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.layer-tab {
  min-width: 0;
  min-height: 64px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.layer-tab span,
.layer-tab strong {
  display: block;
}

.layer-tab span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 950;
}

.layer-tab strong {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.2;
}

.layer-tab.is-active {
  color: #130d08;
  background: linear-gradient(145deg, #ffd59a, #f19b62);
}

.layer-tab.is-active span {
  color: rgba(19, 13, 8, 0.68);
}

.layer-detail {
  min-height: 68px;
  color: #c6c9d3;
  font-size: 14px;
  line-height: 1.55;
}

.flow-board {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 10px;
  align-items: stretch;
  margin: 8px 0 46px;
}

.flow-board article {
  min-height: 116px;
  padding: 18px;
  box-shadow: none;
}

.flow-board strong {
  display: block;
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.35;
}

.flow-focus {
  background:
    linear-gradient(145deg, rgba(255, 107, 107, 0.22), rgba(12, 17, 30, 0.92)),
    var(--panel-strong) !important;
  box-shadow: 0 0 44px rgba(255, 107, 107, 0.12) !important;
}

.flow-focus span {
  color: rgba(255, 255, 255, 0.7);
}

.flow-arrow {
  display: grid;
  min-width: 28px;
  place-items: center;
  color: var(--gold);
  font-weight: 950;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 24px 0 18px;
}

.section-head > p {
  max-width: 450px;
  color: var(--muted);
  line-height: 1.58;
}

.section-head.compact {
  align-items: flex-start;
  margin: 0 0 20px;
}

.layer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.layer-card {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  padding: 22px;
  box-shadow: none;
}

.layer-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 4px solid var(--layer-color);
  background:
    radial-gradient(circle at 78% 18%, color-mix(in srgb, var(--layer-color) 20%, transparent), transparent 34%),
    linear-gradient(180deg, transparent 46%, rgba(255, 255, 255, 0.04));
  pointer-events: none;
}

.layer-card > * {
  position: relative;
}

.layer-index {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #080b16;
  background: var(--layer-color);
  font-weight: 950;
  box-shadow: 0 0 28px color-mix(in srgb, var(--layer-color) 28%, transparent);
}

.layer-card h3 {
  margin: 14px 0 12px;
}

.layer-card p,
.risk-matrix p,
.apply-copy p,
.nft-showcase .section-head p {
  color: #bdc1cf;
  line-height: 1.58;
}

.layer-signal {
  margin-top: 18px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  color: #f1d4a7;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.45;
}

.manual-lane {
  display: grid;
  grid-template-columns: minmax(260px, 0.6fr) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  margin-top: 16px;
  padding: 24px;
  box-shadow: none;
}

.manual-lane p {
  line-height: 1.6;
}

.risk-matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.risk-matrix article {
  min-height: 220px;
  padding: 22px;
  box-shadow: none;
}

.risk-matrix strong {
  display: block;
  margin: 24px 0 12px;
  font-size: 20px;
}

.nft-showcase {
  margin-top: 42px;
  padding: 24px;
}

.cabinet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.nft-showcase article {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(207, 108, 71, 0.08)),
    rgba(255, 255, 255, 0.04);
}

.nft-frame {
  display: grid;
  aspect-ratio: 1 / 1;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 44%, rgba(242, 193, 123, 0.22), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(9, 13, 24, 0.88));
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.025);
}

.nft-frame span {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #130d08;
  background: linear-gradient(145deg, #ffd59a, var(--mars));
  font-weight: 950;
}

.nft-showcase article strong {
  display: block;
  margin-top: 14px;
  font-size: 16px;
}

.nft-showcase article p {
  margin-top: 5px;
}

.apply-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(360px, 0.75fr);
  gap: 26px;
  margin: 42px 0 70px;
  padding: 26px;
}

.apply-copy {
  display: grid;
  align-content: start;
  gap: 18px;
}

.guardrail-note {
  margin-top: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.guardrail-note strong {
  display: block;
  margin-top: 8px;
  line-height: 1.5;
}

.apply-form {
  display: grid;
  gap: 12px;
}

.apply-form label {
  display: grid;
  gap: 7px;
  color: #d8d7da;
  font-size: 13px;
  font-weight: 850;
}

.apply-form input,
.apply-form select,
.apply-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-size: 14px;
  outline: none;
}

.apply-form input,
.apply-form select {
  min-height: 44px;
  padding: 0 12px;
}

.apply-form textarea {
  resize: vertical;
  padding: 12px;
}

.apply-form input::placeholder,
.apply-form textarea::placeholder {
  color: rgba(246, 241, 232, 0.48);
}

.apply-form input:focus,
.apply-form select:focus,
.apply-form textarea:focus {
  border-color: rgba(242, 193, 123, 0.72);
  box-shadow: 0 0 0 3px rgba(242, 193, 123, 0.13);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.selected-model-note {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(242, 193, 123, 0.08);
}

.selected-model-note strong {
  color: var(--ink);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  min-height: 22px;
  color: var(--gold);
}

.apply-form button:disabled {
  cursor: wait;
  opacity: 0.62;
}

@media (max-width: 1060px) {
  .topbar,
  .hero,
  .manual-lane,
  .apply-section {
    grid-template-columns: 1fr;
  }

  .topbar {
    justify-items: start;
  }

  .nav-links {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hero {
    min-height: auto;
    padding-top: 48px;
  }

  .flow-board,
  .layer-grid,
  .risk-matrix,
  .cabinet-grid {
    grid-template-columns: 1fr;
  }

  .flow-arrow {
    min-height: 20px;
    transform: rotate(90deg);
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .page-shell {
    padding: 12px;
  }

  h1 {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    font-size: 27px;
    line-height: 1;
    word-break: break-all;
  }

  h2 {
    font-size: 30px;
  }

  .hero-summary {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    font-size: 18px;
    word-break: break-all;
  }

  .hero-copy,
  .hero {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }

  .top-action,
  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .signal-viewport {
    height: 360px;
  }

  .layer-tabs,
  .form-row {
    grid-template-columns: 1fr;
  }

  .console-head {
    flex-direction: column;
  }

  .console-head strong {
    text-align: left;
  }
}
