:root {
  color-scheme: dark;
  --background: #000;
  --foreground: #f4f4f4;
  --muted: #a8a8a8;
  --surface: #0a0a0a;
  --surface-strong: #111;
  --border: #282828;
  --secondary: #00868b;
  --secondary-rgb: 0 134 139;
  --node-colors: #00868b, #f4f4f4, #a8a8a8;
  --node-link: #00868b;
  --radius: 8px;
  --container: 1120px;
  --gutter: clamp(1rem, 4vw, 3rem);
}

[data-theme="light"] {
  color-scheme: light;
  --background: #f7f7f7;
  --foreground: #111;
  --muted: #5e5e5e;
  --surface: #fff;
  --surface-strong: #ededed;
  --border: #d8d8d8;
  --node-colors: #00868b, #111, #5e5e5e;
  --node-link: #00868b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--foreground);
  background: var(--background);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.65;
}

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

p,
h1,
h2,
h3,
blockquote {
  margin: 0;
}

p {
  max-width: 68ch;
  color: var(--muted);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-height: 4.25rem;
  padding: 0 var(--gutter);
  background: transparent;
}

.nav {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.7rem clamp(0.9rem, 3vw, 2rem);
  width: min(var(--container), 100%);
  color: #d0d0d0;
  font-size: 0.9rem;
  line-height: 1.2;
}

[data-theme="light"] .nav {
  color: #3d3d3d;
}

.nav a:hover {
  color: var(--foreground);
}

.header-actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: var(--radius);
  color: var(--foreground);
  background: rgb(0 0 0 / 0.58);
  backdrop-filter: blur(12px);
}

.theme-toggle:hover {
  color: var(--secondary);
}

[data-theme="light"] .theme-toggle {
  border-color: rgb(0 0 0 / 0.14);
  background: rgb(255 255 255 / 0.72);
}

.theme-icon {
  display: grid;
  width: 1.15rem;
  height: 1.15rem;
  place-items: center;
}

.theme-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.theme-icon-moon {
  display: none;
}

[data-theme="light"] .theme-icon-sun {
  display: none;
}

[data-theme="light"] .theme-icon-moon {
  display: grid;
}

.menu-toggle {
  display: none;
  position: relative;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: var(--radius);
  color: var(--foreground);
  background: rgb(0 0 0 / 0.58);
  backdrop-filter: blur(12px);
}

[data-theme="light"] .menu-toggle {
  border-color: rgb(0 0 0 / 0.14);
  background: rgb(255 255 255 / 0.72);
}

.menu-toggle span:not(.sr-only) {
  display: block;
  width: 1.15rem;
  height: 1px;
  margin: 0.28rem auto;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.site-header.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(0.29rem) rotate(45deg);
}

.site-header.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-0.29rem) rotate(-45deg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.section-shell {
  width: min(var(--container), calc(100% - (var(--gutter) * 2)));
  margin: 0 auto;
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  isolation: isolate;
  min-height: clamp(34rem, 82svh, 50rem);
  padding: clamp(6rem, 11vw, 9rem) 0 clamp(4rem, 8vw, 6rem);
  overflow: hidden;
  background: #000;
}

[data-theme="light"] .hero {
  background: var(--background);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("assets/hero.jpg") center / cover no-repeat;
  filter: grayscale(1) contrast(1.18) brightness(0.34);
  transform: scale(1.03);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgb(0 0 0 / 0.9), rgb(0 0 0 / 0.62) 42%, rgb(0 0 0 / 0.22)),
    linear-gradient(180deg, rgb(0 0 0 / 0.52), rgb(0 0 0 / 0.16) 46%, #000 100%),
    radial-gradient(circle at 72% 40%, rgb(var(--secondary-rgb) / 0.16), transparent 24rem);
  box-shadow: inset 0 -1px 0 var(--border);
}

[data-theme="light"] .hero::before {
  filter: grayscale(1) contrast(1.05) brightness(1.08);
}

[data-theme="light"] .hero::after {
  background:
    linear-gradient(90deg, rgb(247 247 247 / 0.94), rgb(247 247 247 / 0.76) 44%, rgb(247 247 247 / 0.28)),
    linear-gradient(180deg, rgb(255 255 255 / 0.48), rgb(247 247 247 / 0.22) 46%, var(--background) 100%),
    radial-gradient(circle at 72% 40%, rgb(var(--secondary-rgb) / 0.12), transparent 24rem);
}

.hero-copy,
.section-text,
.text-block,
.closing {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-content: center;
  max-width: 920px;
}

.kicker {
  max-width: none;
  color: var(--secondary);
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 17ch;
  font-size: clamp(2.85rem, 6.2vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero blockquote {
  max-width: 58rem;
  margin-top: clamp(1rem, 2vw, 1.5rem);
  padding-left: 1rem;
  border-left: 3px solid var(--secondary);
  color: var(--foreground);
  font-size: clamp(1.18rem, 2.1vw, 1.8rem);
  line-height: 1.3;
  font-weight: 650;
}

.hero .lead {
  max-width: 48rem;
  color: var(--foreground);
  font-size: clamp(1.02rem, 1.45vw, 1.22rem);
}

.node-graph-field {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

#hero-node-graph {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.72;
  mix-blend-mode: screen;
}

[data-theme="light"] #hero-node-graph {
  opacity: 0.48;
  mix-blend-mode: multiply;
}

.proposal-section,
.wide-section,
.timeplan,
.block-proposals {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding: clamp(3.5rem, 7vw, 5rem) 0;
  border-top: 1px solid var(--border);
}

.hero + .proposal-section {
  border-top: 0;
}

.proposal-section.reverse {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
}

.proposal-section.reverse .section-text {
  order: 2;
}

.proposal-section.reverse .image-frame {
  order: 1;
}

.wide-section {
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
}

.timeplan,
.block-proposals {
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
}

.block-proposals {
  grid-template-columns: 1fr;
}

#organizations,
.block-proposals {
  align-content: start;
}

#organizations {
  grid-template-columns: 1fr;
}

#organizations .section-text,
.block-proposals .section-text {
  max-width: 820px;
}

.text-block,
.closing {
  padding: clamp(3.5rem, 7vw, 5rem) 0;
  border-top: 1px solid var(--border);
}

.text-block {
  max-width: none;
}

.text-block > * {
  max-width: 820px;
}

h2 {
  max-width: 19ch;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  color: var(--foreground);
  font-size: 1.08rem;
  line-height: 1.2;
}

.section-text p + p,
.text-block p + p {
  margin-top: 0.25rem;
}

.image-frame,
.diagram-frame {
  display: grid;
  align-self: center;
  margin: 0;
  min-width: 0;
}

.image-placeholder,
.diagram-placeholder {
  min-height: clamp(17rem, 32vw, 28rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.image-placeholder {
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  text-transform: uppercase;
}

.section-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.diagram-placeholder {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  gap: 1px;
  padding: 1px;
  overflow: hidden;
}

.diagram-placeholder span {
  display: grid;
  min-height: 12rem;
  place-items: center;
  border-right: 1px solid var(--border);
  color: var(--muted);
  background: rgb(0 0 0 / 0.36);
  font-size: 0.82rem;
  font-weight: 750;
  text-transform: uppercase;
}

[data-theme="light"] .diagram-placeholder span {
  background: rgb(0 0 0 / 0.035);
}

.diagram-placeholder span:last-child {
  border-right: 0;
  color: var(--secondary);
}

.outcome-grid,
.organization-grid,
.proposal-ideas {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.outcome-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  margin-top: 1rem;
  max-width: none;
}

.outcome-grid article,
.organization-card,
.proposal-ideas article {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.outcome-grid article {
  display: grid;
  gap: 0.8rem;
  min-height: 10rem;
  padding: 1rem;
}

.outcome-grid span,
.organization-card span,
.proposal-ideas span {
  color: var(--secondary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.organization-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}

.organization-card,
.proposal-ideas article {
  display: grid;
  align-content: start;
  gap: 0.7rem;
  min-height: 12rem;
  padding: 1.1rem;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr) minmax(8rem, 12rem);
  gap: 1rem;
  align-items: center;
  padding: 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.timeline-marker {
  width: 0.8rem;
  height: 0.8rem;
  margin-top: 0.38rem;
  border-radius: 999px;
  background: var(--secondary);
}

.timeline-date {
  display: inline-block;
  margin-bottom: 0.25rem;
  color: var(--secondary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.timeline-image-placeholder {
  display: grid;
  min-height: 7rem;
  aspect-ratio: 4 / 3;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--muted);
  background: rgb(255 255 255 / 0.035);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

[data-theme="light"] .timeline-image-placeholder {
  background: rgb(0 0 0 / 0.035);
}

.timeline-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.proposal-ideas {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.proposal-ideas article {
  min-height: 14rem;
}

.closing {
  align-items: start;
  max-width: none;
  margin-bottom: 3rem;
}

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

.email-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 0.3rem;
  border-bottom: 1px solid rgb(var(--secondary-rgb) / 0.8);
  color: var(--foreground);
  font-size: clamp(1.12rem, 2.2vw, 1.45rem);
  font-weight: 750;
}

.email-link:hover {
  color: var(--secondary);
}

.crypto-addresses {
  display: grid;
  gap: 0.8rem;
  width: 100%;
  max-width: none;
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  padding-top: clamp(1.25rem, 3vw, 1.75rem);
  border-top: 1px solid var(--border);
}

.crypto-addresses h3 {
  font-size: 1rem;
}

.crypto-address-list {
  display: grid;
  gap: 0.6rem;
  width: 100%;
  padding: 0;
  margin: 0;
  list-style: none;
}

.crypto-address-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(4.5rem, 8vw, 5.75rem);
  column-gap: clamp(0.85rem, 2vw, 1.25rem);
  row-gap: 0.35rem;
  align-items: center;
  padding: 0.95rem 0;
  border-top: 1px solid var(--border);
}

.crypto-address-list li:first-child {
  border-top: 0;
}

.crypto-address-body {
  display: contents;
}

.crypto-address-list span {
  grid-column: 1 / -1;
  color: var(--secondary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.crypto-address-list code {
  grid-column: 1;
  min-width: 0;
  color: var(--foreground);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.qr-placeholder {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  place-items: center;
  justify-self: end;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.qr-placeholder img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.28rem;
}

.expandable-image {
  cursor: zoom-in;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  padding: clamp(1rem, 4vw, 3rem);
  overflow: auto;
  background: rgb(0 0 0 / 0.82);
}

.image-lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: auto;
  cursor: zoom-out;
}

.image-lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: var(--radius);
  color: #f4f4f4;
  background: rgb(0 0 0 / 0.64);
  font-size: 1.4rem;
  line-height: 1;
}

@media (max-width: 900px) {
  .proposal-section,
  .proposal-section.reverse,
  .wide-section,
  .timeplan,
  .block-proposals {
    grid-template-columns: 1fr;
  }

  .proposal-section.reverse .section-text,
  .proposal-section.reverse .image-frame {
    order: initial;
  }

  .diagram-placeholder {
    grid-template-columns: 1fr;
  }

  .diagram-placeholder span {
    min-height: 4.5rem;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .diagram-placeholder span:last-child {
    border-bottom: 0;
  }

  .timeline-item {
    grid-template-columns: 1rem minmax(0, 1fr);
  }

  .timeline-image-placeholder {
    grid-column: 2;
    width: min(100%, 18rem);
  }
}

@media (max-width: 720px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    justify-content: flex-end;
    min-height: 4.75rem;
  }

  .nav {
    grid-column: auto;
  }

  .header-actions {
    grid-column: 2;
  }

  .menu-toggle {
    display: inline-block;
  }

  .nav {
    position: absolute;
    top: calc(100% - 0.25rem);
    right: var(--gutter);
    display: grid;
    justify-content: stretch;
    gap: 0.15rem;
    width: min(18rem, calc(100vw - (var(--gutter) * 2)));
    padding: 0.45rem;
    border: 1px solid rgb(255 255 255 / 0.12);
    border-radius: var(--radius);
    color: var(--foreground);
    background: rgb(0 0 0 / 0.9);
    backdrop-filter: blur(18px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-0.35rem);
    transition: opacity 160ms ease, transform 160ms ease;
  }

  [data-theme="light"] .nav {
    border-color: rgb(0 0 0 / 0.12);
    background: rgb(255 255 255 / 0.94);
  }

  .site-header.menu-open .nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav a {
    min-height: 2.45rem;
    padding: 0.55rem 0.7rem;
    border-radius: calc(var(--radius) - 2px);
  }

  .nav a:hover {
    background: rgb(var(--secondary-rgb) / 0.14);
  }

  .hero {
    min-height: min(44rem, 92svh);
    padding-top: 7rem;
  }

  .hero::before {
    background-position: center top;
    filter: grayscale(1) contrast(1.08) brightness(0.28);
  }

  [data-theme="light"] .hero::before {
    filter: grayscale(1) contrast(1.02) brightness(1.04);
  }

  .hero::after {
    background:
      linear-gradient(180deg, rgb(0 0 0 / 0.78), rgb(0 0 0 / 0.42) 45%, #000 100%),
      radial-gradient(circle at 70% 38%, rgb(var(--secondary-rgb) / 0.12), transparent 18rem);
  }

  [data-theme="light"] .hero::after {
    background:
      linear-gradient(180deg, rgb(247 247 247 / 0.88), rgb(247 247 247 / 0.58) 45%, var(--background) 100%),
      radial-gradient(circle at 70% 38%, rgb(var(--secondary-rgb) / 0.1), transparent 18rem);
  }

  .hero-copy {
    max-width: 100%;
  }
}

@media (max-width: 560px) {
  .section-shell {
    width: min(var(--container), calc(100% - (var(--gutter) * 2)));
  }

  .hero h1 {
    font-size: 2.75rem;
  }

  .hero blockquote {
    font-size: 1.12rem;
  }

  #hero-node-graph {
    opacity: 0.58;
  }

  [data-theme="light"] #hero-node-graph {
    opacity: 0.4;
  }

  .crypto-address-list li {
    grid-template-columns: minmax(0, 1fr) 4.25rem;
    column-gap: 0.75rem;
    row-gap: 0.35rem;
    align-items: center;
  }

  .qr-placeholder {
    width: 4.25rem;
    justify-self: end;
  }
}
