:root {
  color-scheme: dark;
  --bg: #05080d;
  --panel: #0c1420;
  --panel-soft: #101b2a;
  --ink: #f5f9fc;
  --muted: #9dadba;
  --line: rgba(139, 211, 255, 0.18);
  --cyan: #20b8ff;
  --cyan-2: #6bdcff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  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", sans-serif;
  font-size: 15px;
  letter-spacing: 0;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 13, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand img {
  width: 42px;
  height: 42px;
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  color: var(--muted);
  font-size: 14px;
}

nav a:hover,
.link-stack a:hover,
.resource-grid a:hover {
  color: var(--ink);
  border-color: rgba(32, 184, 255, 0.55);
}

.hero {
  position: relative;
  min-height: 760px;
  display: grid;
  align-items: center;
  padding: 110px clamp(18px, 6vw, 86px) 120px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 8, 13, 0.98), rgba(5, 8, 13, 0.68), rgba(5, 8, 13, 0.96)),
    url("./assets/picoin-logo.png") right 9vw center / min(54vw, 580px) no-repeat;
  opacity: 0.94;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 180px;
  background: linear-gradient(180deg, rgba(5, 8, 13, 0), var(--bg));
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 790px;
}

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

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

h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(36px, 5.4vw, 64px);
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  max-width: 860px;
  margin-bottom: 0;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.1;
  letter-spacing: 0;
}

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

.hero-lede,
.statement p {
  color: #c8d5df;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.65;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 6px;
  padding: 12px 18px;
  font-weight: 800;
}

.button.primary {
  background: var(--cyan);
  color: #03111a;
}

.button.secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.section {
  padding: 76px clamp(18px, 6vw, 86px);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 30px;
}

.feature-grid,
.allocation-grid,
.principle-list,
.resource-grid,
.characteristics-grid {
  display: grid;
  gap: 14px;
}

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

.feature-grid article,
.allocation-grid article,
.principle-list article,
.resource-grid a,
.characteristics-grid article,
.link-stack,
.statement {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.feature-grid article,
.allocation-grid article,
.principle-list article,
.resource-grid a,
.characteristics-grid article {
  padding: 22px;
}

.feature-grid p,
.principle-list p,
.resource-grid strong,
.characteristics-grid p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.58;
}

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

.characteristics-grid span {
  display: block;
  margin-bottom: 12px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.characteristics-grid strong {
  display: block;
  margin-bottom: 10px;
  font-size: 24px;
}

.science-band {
  background: #07101a;
}

.compute-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr);
  gap: 16px;
}

.statement {
  padding: 26px;
}

.statement p:last-child {
  margin-bottom: 0;
}

.link-stack {
  display: grid;
  padding: 10px;
}

.link-stack a {
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--cyan-2);
  padding: 15px;
  font-weight: 800;
}

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

.allocation-grid strong {
  display: block;
  margin-bottom: 10px;
  color: var(--cyan);
  font-size: 36px;
}

.allocation-grid span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

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

.principle-list span {
  display: block;
  margin-bottom: 18px;
  color: var(--cyan);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
}

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

.resource-grid a {
  min-height: 150px;
}

.resource-grid span {
  display: block;
  margin-bottom: 18px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.resource-grid strong {
  display: block;
  font-weight: 600;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(18px, 6vw, 86px);
  color: var(--muted);
  font-size: 14px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 4px 11px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.status-pill.ok {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
}

.status-pill.warn {
  background: rgba(251, 191, 36, 0.14);
  color: #fbbf24;
}

.status-pill.bad {
  background: rgba(251, 113, 133, 0.14);
  color: #fb7185;
}

.explorer-page .section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.explorer-hero {
  padding-top: 72px;
}

.explorer-hero h1 {
  margin-bottom: 0;
}

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

.explorer-metrics article,
.table-wrap,
.event-list,
.validator-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.explorer-metrics article {
  min-height: 112px;
  padding: 18px;
}

.explorer-metrics span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.explorer-metrics strong {
  display: block;
  margin-top: 12px;
  font-size: 22px;
  overflow-wrap: anywhere;
}

.api-errors {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.api-errors:empty {
  display: none;
}

.api-error {
  border: 1px solid rgba(251, 113, 133, 0.38);
  border-left: 4px solid #fb7185;
  border-radius: 8px;
  background: rgba(251, 113, 133, 0.08);
  color: #ffd8df;
  padding: 12px 14px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px 12px;
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
}

td.hash,
.mono {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
}

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

.validator-card {
  padding: 16px;
}

.validator-card header,
.event-row header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.validator-card header span {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.validator-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.validator-card dt {
  color: var(--muted);
  font-size: 12px;
}

.validator-card dd {
  margin: 2px 0 0;
}

.event-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.event-row {
  border-left: 3px solid var(--cyan);
  border-radius: 6px;
  background: var(--panel-soft);
  padding: 12px;
}

.event-row strong {
  font-size: 14px;
}

.event-row span,
.event-row p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.empty {
  color: var(--muted);
  padding: 18px;
}

@media (max-width: 1100px) {
  .feature-grid,
  .allocation-grid,
  .principle-list,
  .resource-grid,
  .compute-layout,
  .characteristics-grid,
  .explorer-metrics,
  .validator-grid {
    grid-template-columns: 1fr 1fr;
  }
}

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

  nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    min-height: 680px;
    padding-top: 88px;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(5, 8, 13, 0.78), rgba(5, 8, 13, 0.98)),
      url("./assets/picoin-logo.png") center 58px / min(80vw, 370px) no-repeat;
  }

  .hero-copy {
    padding-top: 250px;
  }

  .feature-grid,
  .allocation-grid,
  .principle-list,
  .resource-grid,
  .compute-layout,
  .characteristics-grid,
  .explorer-metrics,
  .validator-grid {
    grid-template-columns: 1fr;
  }

  .explorer-page .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
