:root {
  color-scheme: dark;
  --bg: #0d0f0c;
  --ink: #efede5;
  --muted: #9f9a90;
  --soft: #c9c1b2;
  --line: rgba(239, 237, 229, 0.12);
  --panel: rgba(239, 237, 229, 0.052);
  --panel-strong: rgba(239, 237, 229, 0.09);
  --mint: #b9c8b0;
  --cyan: #9eb6bc;
  --amber: #c3aa7b;
  --rose: #b98b8b;
  --violet: #aaa0bd;
  --shadow: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(239, 237, 229, 0.028) 1px, transparent 1px),
    linear-gradient(rgba(239, 237, 229, 0.024) 1px, transparent 1px),
    radial-gradient(circle at 38% -8%, rgba(185, 200, 176, 0.09), transparent 34%),
    var(--bg);
  background-size: 96px 96px, 96px 96px, auto, auto;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.65;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 68px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 14px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 15, 12, 0.84);
  backdrop-filter: blur(24px);
}

.brand,
.top-nav,
.ghost-link,
.hero-actions {
  display: flex;
  align-items: center;
}

.brand,
.top-nav a,
.ghost-link,
.hero-actions a {
  text-decoration: none;
}

.brand {
  gap: 10px;
  font-weight: 760;
  letter-spacing: 0;
}

.brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background:
    linear-gradient(135deg, #d6c7a1, #9eb6bc 48%, #4f6f63);
}

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

.top-nav a,
.ghost-link {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.top-nav a,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.top-nav a:hover,
.ghost-link:hover {
  color: var(--ink);
  background: var(--panel-strong);
}

.ghost-link {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(239, 237, 229, 0.035);
}

main {
  min-width: 0;
  width: min(1240px, calc(100% - 72px));
  margin: 0 auto;
}

.hero {
  min-width: 0;
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: minmax(300px, 0.86fr) minmax(500px, 1.14fr);
  gap: 44px;
  align-items: center;
  padding: 52px 0 44px;
}

.hero-copy,
.hero-visual,
.statement,
.section,
.final-section {
  min-width: 0;
}

.eyebrow,
.hero-copy h1,
.hero-copy p,
.section-head h2,
.section-head p {
  margin: 0;
}

.eyebrow,
.section-kicker {
  color: var(--mint);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0;
}

.hero-copy h1 {
  margin-top: 16px;
  max-width: 600px;
  font-size: clamp(36px, 4.2vw, 60px);
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 720;
}

.hero-copy h1 span {
  display: block;
}

.hero-lead {
  max-width: 540px;
  margin-top: 24px !important;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.88;
}

.hero-actions {
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.hero-actions a {
  min-width: 126px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 760;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.hero-actions a:first-child {
  color: #11150f;
  background: var(--mint);
}

.hero-actions a:not(:first-child) {
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(239, 237, 229, 0.038);
}

.hero-visual,
.statement,
.section,
.final-section {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(239, 237, 229, 0.075), rgba(239, 237, 229, 0.032));
  box-shadow: var(--shadow);
}

.hero-visual {
  min-height: 0;
  width: 100%;
  height: clamp(460px, 42vw, 520px);
  position: relative;
  overflow: hidden;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 31%, rgba(185, 200, 176, 0.08) 31% 32%, transparent 32% 64%, rgba(158, 182, 188, 0.075) 64% 65%, transparent 65%),
    linear-gradient(rgba(239, 237, 229, 0.045) 1px, transparent 1px);
  background-size: auto, 100% 56px;
  pointer-events: none;
}

.visual-caption {
  position: absolute;
  left: 22px;
  right: 22px;
  top: 20px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

#chainSvg,
#factorySvg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
}

.statement {
  padding: clamp(26px, 4.3vw, 52px);
}

.statement p {
  max-width: 1040px;
  margin: 0;
  font-size: clamp(24px, 3.1vw, 42px);
  line-height: 1.16;
  letter-spacing: 0;
  font-weight: 620;
}

.statement strong {
  color: var(--mint);
}

.section,
.final-section {
  margin-top: 22px;
  padding: clamp(22px, 3.4vw, 38px);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.52fr);
  gap: 26px;
  align-items: end;
  margin-top: 8px;
  margin-bottom: 22px;
}

.section-head h2,
.final-section h2 {
  font-size: clamp(28px, 3.7vw, 52px);
  line-height: 1.06;
  letter-spacing: 0;
  font-weight: 700;
}

.section-head p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.flow-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.flow-cards article,
.stage-view,
.term-card,
.matrix-card,
.final-grid article {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(13, 15, 12, 0.5);
}

.flow-cards article {
  min-height: 200px;
  padding: 20px;
}

.flow-cards span,
.final-grid span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 999px;
  color: #11150f;
  background: var(--mint);
  font-size: 11px;
  font-weight: 820;
}

.flow-cards h3 {
  margin: 34px 0 10px;
  font-size: 24px;
  font-weight: 680;
}

.flow-cards p,
.stage-summary,
.stage-card p,
.term-card p,
.matrix-card p,
.final-grid p {
  color: var(--muted);
}

.flow-cards p {
  margin: 0;
}

.stage-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.stage-tabs button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(239, 237, 229, 0.035);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}

.stage-tabs button.active {
  color: #11150f;
  border-color: var(--mint);
  background: var(--mint);
  font-weight: 780;
}

.stage-view {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
  gap: 16px;
  padding: 16px;
}

.stage-title {
  min-height: 100%;
  padding: 24px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(185, 200, 176, 0.09), transparent 70%),
    rgba(239, 237, 229, 0.035);
}

.stage-title span {
  color: var(--mint);
  font-size: 13px;
  font-weight: 900;
}

.stage-title h3 {
  margin: 12px 0;
  font-size: clamp(30px, 3.8vw, 52px);
  line-height: 1.04;
  font-weight: 690;
}

.stage-summary {
  margin: 0;
  font-size: 14px;
  line-height: 1.85;
}

.stage-body {
  display: grid;
  gap: 12px;
}

.stage-mini-map {
  min-height: 158px;
  border-radius: 14px;
  background: rgba(239, 237, 229, 0.035);
  border: 1px solid var(--line);
  overflow: hidden;
}

.stage-mini-map svg {
  width: 100%;
  height: 100%;
  display: block;
}

.stage-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stage-card {
  min-height: 116px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(239, 237, 229, 0.042);
  border: 1px solid var(--line);
}

.stage-card span,
.company-column > span,
.term-card small,
.matrix-card small {
  color: var(--mint);
  font-size: 12px;
  font-weight: 900;
}

.stage-card p {
  margin: 7px 0 0;
  font-size: 13px;
}

.company-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.company-column {
  padding: 15px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(239, 237, 229, 0.042);
}

.company-column h4 {
  margin: 6px 0 12px;
  font-size: 17px;
  font-weight: 680;
}

.company-column ul {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.company-column li {
  color: var(--muted);
  font-size: 13px;
}

.company-column strong {
  color: var(--ink);
}

.factory-shell {
  min-height: 0;
  height: 500px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(239, 237, 229, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(239, 237, 229, 0.035) 1px, transparent 1px),
    rgba(13, 15, 12, 0.5);
  background-size: 48px 48px;
  overflow: hidden;
}

.term-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.term-card {
  min-height: 300px;
  padding: 15px;
}

.term-visual {
  height: 132px;
  margin-bottom: 16px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(239, 237, 229, 0.045);
}

.term-visual svg {
  width: 100%;
  height: 100%;
  display: block;
}

.term-card h3 {
  margin: 0 0 7px;
  font-size: 20px;
  font-weight: 680;
}

.term-card p {
  margin: 0 0 8px;
  font-size: 13px;
}

.term-card small {
  display: block;
  margin-top: 12px;
}

.matrix-board {
  display: grid;
  grid-template-columns: 128px repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.matrix-head,
.matrix-side,
.matrix-card {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(13, 15, 12, 0.5);
}

.matrix-head,
.matrix-side {
  min-height: 62px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.matrix-card {
  min-height: 158px;
  padding: 13px;
}

.matrix-card strong {
  display: block;
  margin-top: 8px;
  font-size: 14px;
}

.matrix-card p {
  margin: 8px 0 0;
  font-size: 12px;
}

.final-section {
  margin-bottom: 32px;
}

.final-section {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.22fr);
  gap: 24px;
  align-items: start;
}

.final-section h2 {
  margin: 10px 0 0;
}

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

.final-grid article {
  min-height: 158px;
  padding: 18px;
}

.final-grid strong {
  display: block;
  margin-top: 24px;
  font-size: 20px;
  font-weight: 680;
}

.final-grid p {
  margin: 8px 0 0;
  font-size: 13px;
}

.svg-label {
  fill: var(--ink);
  font-size: 15px;
  font-weight: 720;
}

.svg-small {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 680;
}

@media (max-width: 1180px) {
  .site-header {
    grid-template-columns: 1fr;
  }

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

  main {
    width: min(calc(100% - 32px), 980px);
  }

  .hero,
  .section-head,
  .stage-view,
  .final-section {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    height: 470px;
  }

  .term-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .matrix-board {
    grid-template-columns: 120px repeat(3, minmax(180px, 1fr));
    overflow-x: auto;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 12px 14px;
  }

  main {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    overflow: hidden;
  }

  .top-nav {
    flex-wrap: nowrap;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .top-nav::-webkit-scrollbar {
    display: none;
  }

  .hero {
    width: 100%;
    max-width: 100%;
    padding-top: 32px;
  }

  .hero-copy,
  .hero-actions,
  .hero-visual {
    width: 100%;
    max-width: 100%;
  }

  .hero-copy h1 {
    max-width: 100%;
    font-size: clamp(32px, 10.2vw, 44px);
    overflow-wrap: anywhere;
  }

  .hero-actions a {
    min-width: 0;
    flex: 1 1 112px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions a {
    width: 100%;
  }

  .hero-actions a:last-child {
    grid-column: auto;
  }

  .hero-visual {
    height: 390px;
  }

  #chainSvg {
    width: 100%;
    max-width: 100%;
    height: 100%;
  }

  .flow-cards,
  .stage-card-grid,
  .company-grid,
  .term-grid,
  .final-grid {
    grid-template-columns: 1fr;
  }

  .section,
  .statement,
  .final-section {
    border-radius: 18px;
  }
}
