:root {
  --ink: #171512;
  --muted: #6a6258;
  --paper: #f4efe6;
  --paper-2: #ebe1d2;
  --line: rgba(23, 21, 18, 0.14);
  --header-bg: rgba(244, 239, 230, 0.78);
  --surface: rgba(255, 250, 242, 0.76);
  --surface-strong: #fffaf2;
  --forest: #183a2b;
  --copper: #b86436;
  --mint: #d6f2cf;
  --white: #fffaf2;
  --shadow: 0 28px 90px rgba(41, 31, 20, 0.16);
}

:root[data-theme="dark"] {
  --ink: #fff7ec;
  --muted: #b9aa98;
  --paper: #101310;
  --paper-2: #1c211b;
  --line: rgba(255, 247, 236, 0.14);
  --header-bg: rgba(16, 19, 16, 0.82);
  --surface: rgba(28, 33, 27, 0.78);
  --surface-strong: #151915;
  --forest: #d6f2cf;
  --copper: #d07b4a;
  --mint: #b9f4ae;
  --white: #171512;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--copper), var(--mint) 35%);
  outline-offset: 3px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(184, 100, 54, 0.16), transparent 24rem),
    linear-gradient(135deg, var(--paper), #fbf7ef 45%, var(--paper-2));
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 200;
  transform: translateY(-160%);
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--white);
  font-weight: 760;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: calc(var(--scroll-progress, 0) * 100%);
  height: 4px;
  background: linear-gradient(90deg, var(--copper), var(--mint));
  box-shadow: 0 0 18px rgba(184, 100, 54, 0.34);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 56px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--copper), transparent 35%), transparent);
}

.brand,
nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  font-weight: 720;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  overflow: hidden;
  background: var(--ink);
}

.brand-mark img {
  width: 100%;
  height: 100%;
}

nav a {
  color: var(--muted);
  font-size: 14px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 720;
  cursor: pointer;
  min-height: 44px;
}

.theme-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--copper), var(--mint));
}

.section-frame {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(70px, 10vw, 128px) 0;
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(340px, 1.08fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.eyebrow,
.section-kicker {
  margin: 0 0 18px;
  color: var(--copper);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(54px, 8.3vw, 116px);
  font-weight: 500;
  line-height: 0.92;
}

h2 {
  max-width: 760px;
  margin-bottom: 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 5.4vw, 76px);
  font-weight: 500;
  line-height: 1;
}

h3 {
  margin-bottom: 10px;
  font-size: 22px;
}

.lede,
.hero-copy p:not(.eyebrow),
.contract-copy p,
.demo-head p,
.final-cta p {
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
}

.hero-logo {
  width: 82px;
  height: 82px;
  margin-bottom: 28px;
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(23, 21, 18, 0.16);
}

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

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.trust-strip span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 12px;
  background: var(--surface);
  color: var(--forest);
  font-size: 13px;
  font-weight: 780;
}

.button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 13px 18px;
  font: inherit;
  font-weight: 740;
  cursor: pointer;
  min-height: 48px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.button.primary {
  background: var(--forest);
  color: var(--white);
  box-shadow: 0 14px 34px rgba(24, 58, 43, 0.22);
}

.button.ghost {
  background: var(--surface);
  color: var(--ink);
}

.button.dark {
  background: var(--ink);
  color: var(--white);
}

.button.wide {
  width: 100%;
}

.hero-visual {
  position: relative;
  min-height: 620px;
  border-radius: 8px;
  background:
    linear-gradient(rgba(23, 21, 18, 0.18), rgba(23, 21, 18, 0.08)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 76px),
    linear-gradient(145deg, #203c30, #101713 68%);
  overflow: hidden;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 20%, rgba(214, 242, 207, 0.24), transparent 18rem),
    linear-gradient(transparent 0 74%, rgba(184, 100, 54, 0.14));
  pointer-events: none;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(214, 242, 207, 0.18);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.dossier-card {
  position: absolute;
  width: min(320px, 58%);
  padding: 24px;
  border: 1px solid rgba(255, 250, 242, 0.2);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.1);
  color: var(--white);
  backdrop-filter: blur(16px);
}

.dossier-card span,
.dossier-card em {
  display: block;
  color: rgba(255, 250, 242, 0.62);
  font-style: normal;
  font-size: 13px;
}

.dossier-card strong {
  display: block;
  margin: 14px 0 34px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 500;
}

.card-a {
  top: 62px;
  left: 46px;
  transform: translateY(calc(var(--parallax, 0) * -18px)) rotate(-2deg);
}

.card-b {
  top: 230px;
  right: 42px;
  transform: translateY(calc(var(--parallax, 0) * 28px)) rotate(2deg);
}

.card-c {
  left: 92px;
  bottom: 72px;
  transform: translateY(calc(var(--parallax, 0) * -12px)) rotate(-1deg);
}

.proof-ring {
  position: absolute;
  right: -120px;
  bottom: -120px;
  width: 320px;
  height: 320px;
  border: 48px solid rgba(214, 242, 207, 0.14);
  border-radius: 50%;
}

.flow {
  text-align: center;
}

.flow h2 {
  margin-right: auto;
  margin-left: auto;
}

.flow-grid,
.use-case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.flow-grid article,
.use-case-grid article {
  min-height: 260px;
  padding: 30px;
  background: var(--surface);
  text-align: left;
}

.flow-grid span {
  display: block;
  margin-bottom: 56px;
  color: var(--copper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 56px;
}

article p {
  color: var(--muted);
  line-height: 1.58;
}

.contract-panel {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: clamp(28px, 5vw, 74px);
  align-items: center;
}

.terminal-card {
  border-radius: 8px;
  border: 1px solid rgba(214, 242, 207, 0.16);
  background: #151915;
  color: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.terminal-top {
  display: flex;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 250, 242, 0.12);
}

.terminal-top span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--copper);
}

.terminal-card dl {
  margin: 0;
  padding: 26px;
}

.terminal-card dt {
  color: rgba(255, 250, 242, 0.52);
  font-size: 13px;
}

.terminal-card dd {
  margin: 8px 0 22px;
  overflow-wrap: anywhere;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
}

.terminal-card .button {
  margin: 0 26px 26px;
  width: calc(100% - 52px);
}

.demo {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.demo-head {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 440px);
  gap: 32px;
  align-items: end;
}

.proof-workbench {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 18px;
  margin-top: 40px;
}

.proof-form,
.proof-output {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 680;
}

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

.criteria-grid label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-strong);
  color: var(--ink);
}

.signing-mode {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.signing-mode legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.signing-mode label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin: 0;
  border-radius: 8px;
  padding: 8px;
  color: var(--ink);
}

.signing-mode span {
  display: grid;
  gap: 2px;
}

.signing-mode em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 560;
}

.signing-mode input,
.criteria-grid input {
  width: auto;
  accent-color: var(--copper);
}

.wallet-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.wallet-panel p {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.wallet-panel p.success {
  border-color: color-mix(in srgb, var(--forest), transparent 56%);
  color: var(--forest);
}

.wallet-panel p.error {
  border-color: rgba(184, 71, 54, 0.34);
  color: #8f2d22;
}

:root[data-theme="dark"] .wallet-panel p.error {
  color: #ffb1a7;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  background: var(--surface-strong);
  color: var(--ink);
  font: inherit;
  min-height: 48px;
}

.hash-row {
  display: grid;
  gap: 7px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.hash-row:first-child {
  padding-top: 0;
}

.hash-row span {
  color: var(--muted);
  font-size: 13px;
}

.tx-ladder {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.tx-ladder li {
  position: relative;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 12px 12px 42px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 14px;
  font-weight: 720;
}

.tx-ladder li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  border: 2px solid var(--line);
  border-radius: 999px;
  background: transparent;
}

.tx-ladder li.is-done {
  border-color: color-mix(in srgb, var(--forest), transparent 55%);
  color: var(--forest);
}

.tx-ladder li.is-done::before {
  border-color: var(--forest);
  background: var(--forest);
  box-shadow: inset 0 0 0 3px var(--surface-strong);
}

code {
  overflow-wrap: anywhere;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

.submit-result {
  margin-top: 18px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(24, 58, 43, 0.08);
  color: var(--forest);
  line-height: 1.5;
  white-space: pre-line;
}

.submit-result.success {
  background: rgba(24, 58, 43, 0.1);
  color: var(--forest);
}

.submit-result.error {
  background: rgba(184, 71, 54, 0.12);
  color: #8f2d22;
}

:root[data-theme="dark"] .submit-result.error {
  color: #ffb1a7;
}

.explorer-receipt {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.explorer-receipt span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.explorer-receipt a {
  color: var(--copper);
  font-weight: 780;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.readiness {
  border-bottom: 1px solid var(--line);
}

.readiness-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-top: 34px;
}

.ready-card {
  min-height: 250px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: var(--surface);
}

.ready-card span {
  display: inline-flex;
  margin-bottom: 34px;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ready-card.pass span {
  background: rgba(24, 58, 43, 0.11);
  color: var(--forest);
}

.ready-card.warn span {
  background: rgba(184, 100, 54, 0.14);
  color: var(--copper);
}

.use-cases {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

.side-note {
  position: sticky;
  top: 100px;
  border-left: 3px solid var(--copper);
  padding-left: 18px;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  line-height: 1.25;
}

.use-case-grid {
  grid-template-columns: 1fr;
  margin-top: 0;
}

.use-case-grid article {
  min-height: auto;
}

.final-cta {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
}

.final-cta > * {
  max-width: 820px;
}

.final-cta p {
  margin-right: auto;
  margin-left: auto;
}

.docs {
  border-top: 1px solid var(--line);
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 34px;
}

.docs-grid article {
  min-height: 250px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.docs-grid span {
  display: inline-block;
  margin-bottom: 42px;
  color: var(--copper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
}

.docs-note {
  margin-top: 18px;
  padding: 20px;
  border-left: 3px solid var(--copper);
  background: var(--surface);
  color: var(--muted);
  line-height: 1.55;
}

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

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 12px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-weight: 720;
}

.reveal {
  opacity: 0;
  transform: translateY(58px) scale(0.985);
  filter: blur(8px);
  transition: opacity 820ms cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 820ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 820ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.stagger > *,
.reveal-card {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 720ms ease, transform 720ms ease;
}

.is-visible .stagger > *,
.is-visible .reveal-card,
.reveal.is-visible .stagger > * {
  opacity: 1;
  transform: translateY(0);
}

.is-visible .stagger > *:nth-child(2),
.reveal.is-visible .stagger > *:nth-child(2) {
  transition-delay: 120ms;
}

.is-visible .stagger > *:nth-child(3),
.reveal.is-visible .stagger > *:nth-child(3) {
  transition-delay: 240ms;
}

.hero-visual,
.terminal-card,
.proof-workbench {
  animation: float-in 900ms ease both;
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 860px) {
  nav {
    display: none;
  }

  .hero,
  .contract-panel,
  .demo-head,
  .proof-workbench,
  .use-cases,
  .readiness-grid,
  .docs-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 48px;
  }

  .hero-visual {
    min-height: 520px;
  }

  .flow-grid {
    grid-template-columns: 1fr;
  }

  .side-note {
    position: static;
  }

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

@media (max-width: 540px) {
  .site-header {
    gap: 12px;
  }

  .brand span:last-child {
    display: none;
  }

  .theme-toggle {
    padding-inline: 10px;
  }

  h1 {
    font-size: clamp(44px, 14vw, 62px);
  }

  .criteria-grid {
    grid-template-columns: 1fr;
  }

  .dossier-card {
    width: min(300px, 78%);
  }

  .card-a {
    left: 24px;
  }

  .card-b {
    right: 22px;
  }

  .card-c {
    left: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}
