:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-soft: #eef2f6;
  --surface-warm: #fbfaf7;
  --ink: #111827;
  --text: #263242;
  --muted: #667085;
  --line: #dde4ec;
  --blue: #1558a8;
  --green: #0a8f4f;
  --red: #d93b34;
  --gold: #d9a329;
  --shadow: 0 20px 54px rgba(22, 34, 51, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  min-height: 74px;
  padding: 0 40px;
  border-bottom: 1px solid rgba(221, 228, 236, 0.9);
  background: rgba(247, 248, 250, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: start;
  min-width: 180px;
  gap: 12px;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

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

.brand strong {
  line-height: 1;
  letter-spacing: 0;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.main-nav a {
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.main-nav a:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.language-toggle {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.language-toggle button {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.language-toggle button.is-active {
  background: var(--ink);
  color: var(--surface);
}

.wallet-button {
  min-height: 40px;
  max-width: 170px;
  padding: 0 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.telegram-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid rgba(21, 88, 168, 0.22);
  border-radius: 7px;
  background: rgba(21, 88, 168, 0.08);
  color: var(--blue);
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
}

.wallet-button.is-connected {
  border-color: rgba(10, 143, 79, 0.28);
  background: rgba(10, 143, 79, 0.1);
  color: #08683b;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 62px;
  align-items: start;
  max-width: 1210px;
  min-height: auto;
  margin: 0 auto;
  padding: 70px 24px 46px;
}

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

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

h1 {
  margin-bottom: 24px;
  font-size: clamp(64px, 11vw, 128px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: 0;
}

.hero-text {
  max-width: 640px;
  margin-bottom: 0;
  color: var(--text);
  font-size: 18px;
}

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

.primary-button,
.secondary-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  padding: 0 18px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.secondary-button {
  padding: 0 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.icon-button {
  min-width: 62px;
  padding: 0 12px;
  border: 0;
  background: var(--surface-soft);
  color: var(--ink);
}

.primary-button:hover,
.secondary-button:hover,
.icon-button:hover,
.wallet-button:hover,
.telegram-link:hover {
  transform: translateY(-1px);
}

.contract-strip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.contract-strip span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.contract-strip code {
  color: var(--ink);
  font-size: 13px;
}

.hero-visual {
  display: grid;
  gap: 16px;
}

.fine-print {
  color: var(--muted);
  font-size: 13px;
}

.card-showcase {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.card-showcase img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  image-rendering: pixelated;
}

.card-showcase img:nth-child(2),
.card-showcase img:nth-child(3) {
  transform: translateY(28px);
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 1210px;
  margin: 0 auto;
  padding: 0 24px 74px;
  gap: 12px;
}

.metrics-strip article,
.story-grid article,
.mechanism-grid article,
.flow article,
.roadmap article,
.detail-block,
.crowdfund-panel,
.rule-grid div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.metrics-strip article {
  padding: 22px;
}

.metrics-strip span,
.rule-grid span,
.panel-header,
.roadmap span,
.combo-grid span,
.trait-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.metrics-strip strong,
.rule-grid strong,
.combo-grid strong,
.trait-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 23px;
  line-height: 1.1;
}

.section {
  max-width: 1210px;
  margin: 0 auto;
  padding: 76px 24px;
  scroll-margin-top: 96px;
}

.section-heading {
  max-width: 790px;
  margin: 0 auto 34px;
  text-align: center;
}

.section-heading.align-left {
  margin-left: 0;
  text-align: left;
}

.section-copy p,
.section-heading p,
.detail-block p,
.flow p,
.mechanism-grid p,
.roadmap p,
.panel-note,
.story-grid p {
  color: var(--muted);
}

.story-section {
  padding-top: 22px;
}

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

.story-grid article,
.mechanism-grid article,
.flow article,
.roadmap article {
  padding: 22px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 46px;
  align-items: start;
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.rule-grid div {
  padding: 18px;
}

.crowdfund-panel {
  padding: 24px;
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
}

.address-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.address-box code {
  overflow-wrap: anywhere;
  color: #263242;
  font-size: 13px;
}

.amount-field {
  display: grid;
  grid-template-columns: 1fr 112px auto;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.amount-field input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
}

.amount-field em {
  color: var(--ink);
  font-style: normal;
}

.amount-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.amount-buttons button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.amount-buttons button:hover {
  border-color: #aab5c3;
}

.amount-state {
  min-height: 24px;
  margin: 14px 0 18px;
  color: var(--green);
  font-size: 14px;
  font-weight: 750;
}

.amount-state.is-error {
  color: var(--red);
}

.full-width {
  width: 100%;
}

.panel-note {
  margin: 16px 0 0;
  font-size: 13px;
}

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

.chip {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #e8eef5;
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.flywheel-section {
  max-width: none;
  background: #111827;
  color: var(--surface);
}

.flywheel-section > * {
  max-width: 1210px;
  margin-right: auto;
  margin-left: auto;
}

.flywheel-section .section-heading p,
.flywheel-section .flow p {
  color: #aeb8c6;
}

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

.flow article {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.flow span {
  display: block;
  margin-bottom: 18px;
  color: var(--gold);
  font-weight: 850;
}

.details-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.detail-block {
  padding: 26px;
}

.detail-block img {
  display: block;
  width: 100%;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  image-rendering: pixelated;
}

.combo-grid,
.trait-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0 16px;
}

.combo-grid div,
.trait-grid div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.trait-grid strong {
  font-size: 17px;
}

.formula-box {
  display: grid;
  gap: 9px;
  margin: 18px 0 16px;
}

.formula-box code {
  display: block;
  padding: 12px;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 13px;
}

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

.roadmap span {
  display: block;
  margin-bottom: 12px;
  color: var(--gold);
}

.roadmap article.is-done span {
  color: var(--green);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  max-width: min(380px, calc(100vw - 40px));
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--ink);
  color: var(--surface);
  box-shadow: var(--shadow);
  font-size: 14px;
}

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

  .main-nav {
    display: none;
  }

  .hero-section,
  .split-section,
  .details-section {
    grid-template-columns: 1fr;
  }

  .hero-section {
    gap: 34px;
    min-height: 0;
    padding-top: 56px;
  }

  .hero-visual,
  .card-showcase {
    max-width: 720px;
  }

  .metrics-strip,
  .mechanism-grid,
  .flow,
  .roadmap,
  .story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 690px) {
  .site-header {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px 16px;
  }

  .header-actions {
    justify-content: space-between;
  }

  .wallet-button {
    max-width: none;
    flex: 1;
  }

  .hero-section,
  .section {
    padding-right: 16px;
    padding-left: 16px;
  }

  .metrics-strip {
    padding-right: 16px;
    padding-left: 16px;
  }

  .card-showcase,
  .metrics-strip,
  .mechanism-grid,
  .flow,
  .roadmap,
  .story-grid,
  .rule-grid,
  .combo-grid,
  .trait-grid {
    grid-template-columns: 1fr;
  }

  .card-showcase img:nth-child(2),
  .card-showcase img:nth-child(3) {
    transform: none;
  }

  .amount-field {
    grid-template-columns: 1fr;
  }

  .amount-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 24px 16px;
  }
}
