:root {
  --ink: #15211f;
  --muted: #52625e;
  --paper: #f7f4ec;
  --surface: #fffaf1;
  --line: rgba(21, 33, 31, 0.16);
  --mint: #5dd5b6;
  --blue: #3178c6;
  --red: #d65445;
  --gold: #d99b26;
  --deep: #101917;
  --shadow: 0 22px 70px rgba(20, 30, 27, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

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

.site-header {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(247, 244, 236, 0.82);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 20px;
  grid-template-columns: auto 1fr auto;
  left: 0;
  min-height: 72px;
  padding: 14px clamp(18px, 5vw, 72px);
  position: sticky;
  right: 0;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  display: inline-flex;
  min-width: max-content;
}

.brand-logo {
  aspect-ratio: 1734 / 390;
  display: block;
  height: auto;
  object-fit: contain;
  object-position: left center;
  width: 280px;
}

.nav {
  display: flex;
  gap: clamp(14px, 3vw, 30px);
  justify-content: center;
}

.nav a,
.nav-action {
  color: var(--muted);
  font-size: 14px;
  font-weight: 680;
}

.nav a:hover,
.nav-action:hover {
  color: var(--ink);
}

.nav-action {
  border: 1px solid var(--line);
  padding: 9px 14px;
}

.hero {
  min-height: calc(100vh - 72px);
  overflow: hidden;
  position: relative;
}

#protocol-canvas {
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

.hero::after {
  background:
    linear-gradient(90deg, rgba(247, 244, 236, 0.96) 0%, rgba(247, 244, 236, 0.88) 42%, rgba(247, 244, 236, 0.38) 100%),
    linear-gradient(180deg, rgba(247, 244, 236, 0) 78%, var(--paper) 100%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.hero-grid {
  align-items: end;
  display: grid;
  gap: clamp(28px, 5vw, 80px);
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.62fr);
  margin: 0 auto;
  max-width: 1200px;
  min-height: calc(100vh - 72px);
  padding: clamp(54px, 8vw, 96px) clamp(18px, 5vw, 40px) clamp(44px, 7vw, 80px);
  position: relative;
  z-index: 2;
}

.eyebrow {
  color: var(--red);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  margin: 0 0 14px;
  text-transform: uppercase;
}

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

h1 {
  font-size: clamp(64px, 10vw, 146px);
  letter-spacing: 0;
  line-height: 0.9;
  margin-bottom: 28px;
  max-width: 860px;
}

.hero-lede {
  color: #263632;
  font-size: clamp(18px, 2.3vw, 26px);
  line-height: 1.45;
  margin-bottom: 30px;
  max-width: 800px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  align-items: center;
  border: 1px solid var(--line);
  display: inline-flex;
  font-size: 15px;
  font-weight: 780;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--deep);
  border-color: var(--deep);
  color: white;
}

.button.secondary {
  background: rgba(255, 250, 241, 0.58);
}

.button.dark {
  background: var(--paper);
  color: var(--deep);
}

.hero-panel {
  background: rgba(255, 250, 241, 0.84);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 24px;
}

.panel-kicker {
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.release-list {
  display: grid;
  gap: 18px;
  margin: 0;
}

.release-list div {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.release-list dt {
  font-weight: 850;
}

.release-list dd {
  color: var(--muted);
  margin: 5px 0 0;
}

section:not(.hero) {
  padding: clamp(62px, 10vw, 112px) clamp(18px, 5vw, 72px);
}

.section-head {
  display: grid;
  gap: 24px;
  grid-template-columns: 0.45fr minmax(0, 1fr);
  margin: 0 auto 36px;
  max-width: 1180px;
}

.section-head.compact {
  align-items: end;
}

.section-head h2,
.message-copy h2,
.final-cta h2 {
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1.02;
  margin-bottom: 0;
  max-width: 900px;
}

.feature-grid,
.sdk-grid,
.governance-grid {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 1180px;
}

.feature-grid article,
.sdk-card,
.governance-grid article {
  background: var(--surface);
  border: 1px solid var(--line);
  min-height: 260px;
  padding: 24px;
}

.feature-index {
  color: var(--gold);
  display: block;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 50px;
}

h3 {
  font-size: 23px;
  line-height: 1.12;
  margin-bottom: 14px;
}

article p,
.layer p,
.message-copy p,
.stack-table p,
.site-footer p {
  color: var(--muted);
}

.architecture {
  background: var(--deep);
  color: white;
}

.architecture .eyebrow {
  color: var(--mint);
}

.architecture .section-head h2,
.final-cta h2 {
  color: white;
}

.layer-map {
  align-items: stretch;
  display: grid;
  gap: 0;
  grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1120px;
}

.layer {
  border: 1px solid rgba(255, 255, 255, 0.18);
  min-height: 300px;
  padding: clamp(24px, 4vw, 42px);
}

.layer p {
  color: rgba(255, 255, 255, 0.7);
}

.layer-label {
  color: var(--mint) !important;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.connector {
  align-self: center;
  background: linear-gradient(90deg, var(--mint), var(--gold), var(--red));
  height: 2px;
}

.stack-section {
  background: #ece8dc;
}

.stack-table {
  border: 1px solid var(--line);
  margin: 0 auto;
  max-width: 1180px;
}

.stack-table div {
  align-items: start;
  background: rgba(255, 250, 241, 0.6);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 24px;
  grid-template-columns: 260px 1fr;
  padding: 22px 24px;
}

.stack-table div:last-child {
  border-bottom: 0;
}

.stack-table span {
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 18px;
  font-weight: 850;
}

.stack-table p {
  margin-bottom: 0;
}

.sdk-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sdk-card {
  min-height: 300px;
}

code {
  background: #17211f;
  color: #9ff1d8;
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  margin-top: 28px;
  overflow-x: auto;
  padding: 14px;
  white-space: nowrap;
}

.message-section {
  align-items: center;
  background: var(--surface);
  display: grid;
  gap: clamp(30px, 6vw, 84px);
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 1fr);
}

.message-copy {
  max-width: 560px;
}

.risk-bars {
  display: grid;
  gap: 12px;
}

.risk-bars div {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(49, 120, 198, 0.22) calc(var(--value) * 1%), transparent 0),
    #f1eadb;
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  min-height: 62px;
  padding: 0 18px;
}

.risk-bars span {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 850;
}

.risk-bars strong {
  font-size: 24px;
}

.governance-section {
  background: #eef4f0;
}

.governance-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.final-cta {
  align-items: center;
  background: var(--deep);
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr auto;
}

.final-cta .eyebrow {
  color: var(--mint);
}

.site-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 30px clamp(18px, 5vw, 72px);
}

.site-footer p {
  margin-bottom: 0;
}

.site-footer a {
  color: var(--blue);
  font-weight: 760;
}

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

  .nav {
    display: none;
  }

  .hero-grid,
  .section-head,
  .layer-map,
  .message-section,
  .final-cta {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    align-items: center;
    min-height: calc(100vh - 72px);
  }

  .hero-panel {
    max-width: 560px;
  }

  .connector {
    height: 54px;
    justify-self: start;
    margin-left: 28px;
    width: 2px;
  }

  .feature-grid,
  .sdk-grid,
  .governance-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid article,
  .sdk-card,
  .governance-grid article {
    min-height: auto;
  }

  .feature-index {
    margin-bottom: 24px;
  }

  .stack-table div {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .site-header {
    min-height: 66px;
    padding: 12px 16px;
  }

  .brand-logo {
    width: 220px;
  }

  h1 {
    font-size: 58px;
  }

  .hero-lede {
    font-size: 17px;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .section-head h2,
  .message-copy h2,
  .final-cta h2 {
    font-size: 34px;
  }

  .hero-panel,
  .layer,
  .feature-grid article,
  .sdk-card,
  .governance-grid article {
    padding: 20px;
  }
}
