:root {
  --ink: #06120f;
  --ink-2: #0d211c;
  --ink-3: #13312a;
  --paper: #f4fbf8;
  --paper-soft: #e8f7f1;
  --paper-strong: #ffffff;
  --paper-line: #c3e2d6;
  --kaspa: #49eacb;
  --kaspa-deep: #0b705e;
  --text: #0b1715;
  --muted: #50675f;
  --white: #ffffff;
  --shadow: 0 18px 42px rgba(7, 18, 16, 0.15);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

code,
pre {
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, ui-monospace,
    monospace;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 30;
  transform: translateY(-150%);
  border-radius: 8px;
  background: var(--kaspa);
  color: var(--ink);
  padding: 0.65rem 0.9rem;
  font-weight: 800;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(73, 234, 203, 0.22);
  background: rgba(6, 18, 15, 0.96);
  color: var(--white);
  padding:
    0.82rem max(1rem, env(safe-area-inset-right))
    0.82rem max(1rem, env(safe-area-inset-left));
}

.brand,
.site-nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 900;
}

.brand-mark {
  display: inline-grid;
  min-width: 2.45rem;
  min-height: 2.1rem;
  place-items: center;
  border: 1px solid rgba(73, 234, 203, 0.75);
  border-radius: 8px;
  color: var(--kaspa);
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, ui-monospace,
    monospace;
}

.site-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.94rem;
}

.site-nav a {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus {
  border-color: rgba(73, 234, 203, 0.36);
  color: var(--kaspa);
}

.hero {
  position: relative;
  display: grid;
  min-height: 820px;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.72fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
  padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 5vw, 5rem) clamp(2.5rem, 5vw, 4rem);
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(4, 13, 11, 0.76);
}

.hero-media {
  position: absolute;
  inset: 0;
  background-image: url("assets/kaspascript-hero.jpg");
  background-position: center;
  background-size: cover;
  opacity: 0.28;
}

.hero-content,
.hero-panel {
  position: relative;
}

.hero-content {
  max-width: 860px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.85rem;
  color: var(--kaspa);
  font-size: 0.84rem;
  font-weight: 900;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  border: 1px solid rgba(73, 234, 203, 0.36);
  border-radius: 8px;
  background: rgba(6, 18, 15, 0.72);
  padding: 0.45rem 0.6rem;
}

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

h1,
h2,
h3 {
  line-height: 1.06;
}

h1 {
  max-width: 980px;
  margin-bottom: 1.1rem;
  font-size: clamp(3rem, 7vw, 6.4rem);
  text-wrap: balance;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2.05rem, 4vw, 3.55rem);
  text-wrap: balance;
}

h3 {
  margin-bottom: 0.65rem;
  font-size: 1.18rem;
}

.hero-copy {
  max-width: 740px;
  margin-bottom: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  text-wrap: pretty;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 1.35rem;
  padding: 0;
  list-style: none;
}

.hero-badges li {
  border: 1px solid rgba(73, 234, 203, 0.3);
  border-radius: 8px;
  background: rgba(13, 33, 28, 0.86);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.86rem;
  font-weight: 800;
  padding: 0.42rem 0.58rem;
}

.hero-actions,
.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  min-height: 2.85rem;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.78rem 1.05rem;
  font-weight: 900;
  text-decoration: none;
}

.button.primary {
  background: var(--kaspa);
  color: var(--ink);
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(6, 18, 15, 0.76);
  color: var(--white);
}

.button:hover,
.button:focus {
  border-color: var(--white);
}

.status-row {
  margin: 2rem 0 0;
}

.status-row div {
  min-width: 9.7rem;
  border: 1px solid rgba(73, 234, 203, 0.28);
  border-radius: 8px;
  background: rgba(6, 18, 15, 0.72);
  padding: 0.85rem 0.95rem;
}

.status-row dt {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.78rem;
}

.status-row dd {
  margin: 0.14rem 0 0;
  color: var(--kaspa);
  font-weight: 900;
}

.hero-panel {
  display: grid;
  gap: 0.85rem;
  align-self: center;
}

.brand-frame {
  margin: 0;
  border: 1px solid rgba(73, 234, 203, 0.3);
  border-radius: 8px;
  background: var(--paper-strong);
  box-shadow: var(--shadow);
  padding: 0.5rem;
}

.brand-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  border-radius: 6px;
}

.brand-frame figcaption {
  margin: 0.55rem 0.2rem 0.15rem;
  color: #2a4840;
  font-size: 0.86rem;
  font-weight: 700;
}

.hero-console,
.json-preview,
.command-grid pre {
  border: 1px solid rgba(73, 234, 203, 0.26);
  border-radius: 8px;
  background: rgba(4, 13, 11, 0.94);
  box-shadow: var(--shadow);
}

.hero-console {
  overflow: hidden;
}

.console-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(73, 234, 203, 0.22);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  padding: 0.8rem 1rem;
}

pre {
  margin: 0;
  overflow-x: auto;
  white-space: pre;
}

pre code {
  display: block;
  color: #dffdf4;
  font-size: 0.88rem;
  line-height: 1.62;
  padding: 1rem;
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.signal-grid div {
  border: 1px solid rgba(73, 234, 203, 0.24);
  border-radius: 8px;
  background: rgba(6, 18, 15, 0.88);
  padding: 0.8rem;
}

.signal-grid span {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.76rem;
}

.signal-grid strong {
  display: block;
  margin-top: 0.15rem;
  color: var(--kaspa);
  font-size: 0.92rem;
  line-height: 1.25;
}

.proof-band {
  background: var(--ink-2);
  color: var(--white);
  padding: 0 clamp(1rem, 5vw, 5rem);
}

.proof-strip {
  display: grid;
  width: min(1180px, 100%);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-inline: auto;
}

.proof-strip article {
  border-left: 1px solid rgba(73, 234, 203, 0.22);
  padding: 1.25rem 1rem 1.35rem;
}

.proof-strip article:last-child {
  border-right: 1px solid rgba(73, 234, 203, 0.22);
}

.proof-strip span {
  display: block;
  color: var(--kaspa);
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, ui-monospace,
    monospace;
  font-size: 0.82rem;
  font-weight: 900;
}

.proof-strip strong {
  display: block;
  margin-top: 0.35rem;
}

.proof-strip p {
  margin: 0.35rem 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  text-wrap: pretty;
}

.band,
.section {
  padding: clamp(3.5rem, 7vw, 6.5rem) clamp(1rem, 5vw, 5rem);
}

.band {
  background: var(--paper-strong);
  border-bottom: 1px solid var(--paper-line);
  border-top: 1px solid var(--paper-line);
}

.intro-band {
  border-top: 0;
  background: var(--paper);
}

.intro-grid,
.section-heading,
.feature-grid,
.package-layout,
.command-grid,
.pattern-table,
.milestone-grid,
.kernel-map {
  width: min(1180px, 100%);
  margin-inline: auto;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}

.intro-grid p,
.section-heading p,
.feature-card p,
.schema-list p,
.milestone-grid p,
.kernel-map p {
  color: var(--muted);
  text-wrap: pretty;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 2rem;
}

.section-heading.compact {
  margin-bottom: 1.5rem;
}

.architecture-band {
  background: var(--paper-strong);
}

.kernel-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.kernel-map article {
  border: 1px solid rgba(73, 234, 203, 0.26);
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  min-height: 15rem;
  padding: 1.1rem;
}

.kernel-map span,
.schema-list span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--kaspa);
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, ui-monospace,
    monospace;
  font-size: 0.86rem;
  font-weight: 900;
}

.kernel-map strong {
  display: block;
  margin-bottom: 0.7rem;
  font-size: 1.12rem;
}

.kernel-map p {
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 0;
}

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

.feature-card,
.milestone-grid article {
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  background: var(--paper-strong);
  box-shadow: 0 10px 24px rgba(7, 18, 16, 0.08);
  padding: 1.15rem;
}

.feature-card {
  border-top: 4px solid var(--kaspa-deep);
}

.package-band {
  background: var(--paper-soft);
}

.package-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(360px, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.schema-list {
  display: grid;
  gap: 0.72rem;
}

.schema-list div {
  border: 1px solid var(--paper-line);
  border-left: 4px solid var(--kaspa-deep);
  border-radius: 8px;
  background: var(--paper-strong);
  padding: 0.88rem 1rem;
}

.schema-list p {
  margin-bottom: 0;
}

.json-preview {
  min-height: 100%;
}

.doc-link {
  width: min(1180px, 100%);
  margin: 1.2rem auto 0;
  color: var(--muted);
}

.doc-link a {
  color: var(--kaspa-deep);
  font-weight: 900;
}

.command-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.command-grid pre:last-child {
  grid-column: 1 / -1;
}

.pattern-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  background: var(--paper-strong);
  box-shadow: 0 10px 24px rgba(7, 18, 16, 0.08);
}

.pattern-table [role="row"] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.5fr);
  border-top: 1px solid var(--paper-line);
}

.pattern-table [role="row"]:first-child {
  border-top: 0;
}

.pattern-table span {
  padding: 0.85rem 1rem;
}

.table-head {
  background: var(--ink);
  color: var(--white);
  font-weight: 900;
}

.roadmap {
  background: var(--paper);
}

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

.milestone-grid article {
  background: var(--paper-soft);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.78);
  padding: 1.5rem clamp(1rem, 5vw, 5rem);
}

.site-footer p {
  margin: 0;
}

.site-footer div {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer a {
  color: var(--kaspa);
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 1100px) {
  .feature-grid,
  .kernel-map,
  .proof-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .proof-strip article:nth-child(2) {
    border-right: 1px solid rgba(73, 234, 203, 0.22);
  }

  .kernel-map article {
    min-height: 12rem;
  }
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 1.2rem;
    padding: 3rem 1rem 2rem;
  }

  .hero::before {
    background: rgba(4, 13, 11, 0.82);
  }

  .hero-media {
    background-position: center top;
    opacity: 0.26;
  }

  .hero-content {
    max-width: none;
    border: 1px solid rgba(73, 234, 203, 0.24);
    border-radius: 8px;
    background: rgba(6, 18, 15, 0.9);
    padding: 1rem;
  }

  .hero-copy {
    color: rgba(255, 255, 255, 0.94);
  }

  .hero-console,
  .button.secondary,
  .status-row div,
  .signal-grid div {
    background: rgba(4, 13, 11, 0.94);
  }

  .hero-console,
  .brand-frame {
    box-shadow: none;
  }

  .status-row {
    margin-top: 1rem;
  }

  .intro-grid,
  .package-layout,
  .command-grid {
    grid-template-columns: 1fr;
  }

  .command-grid pre:last-child {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .site-header {
    position: relative;
  }

  .site-nav {
    gap: 0.3rem;
    font-size: 0.86rem;
  }

  .site-nav a {
    padding: 0.38rem 0.48rem;
  }

  h1 {
    font-size: 2.28rem;
    line-height: 1.08;
  }

  h2 {
    font-size: 2rem;
  }

  .hero {
    padding: 2rem 0.85rem 1.5rem;
  }

  .hero-content {
    padding: 0.9rem;
  }

  .hero-copy {
    font-size: 1rem;
  }

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

  .signal-grid,
  .feature-grid,
  .kernel-map,
  .proof-strip,
  .milestone-grid {
    grid-template-columns: 1fr;
  }

  .status-row {
    flex-direction: column;
  }

  .hero-console pre code,
  .json-preview code,
  .command-grid code {
    font-size: 0.78rem;
    line-height: 1.55;
  }

  .proof-strip article,
  .proof-strip article:last-child,
  .proof-strip article:nth-child(2) {
    border-left: 1px solid rgba(73, 234, 203, 0.22);
    border-right: 1px solid rgba(73, 234, 203, 0.22);
  }

  .pattern-table [role="row"] {
    grid-template-columns: 1fr;
  }

  .pattern-table span + span {
    padding-top: 0;
    color: var(--kaspa-deep);
    font-weight: 900;
  }
}
