:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #161a22;
  --muted: #667085;
  --line: #dbe3ef;
  --blue: #1f5fbf;
  --blue-soft: #eef5ff;
}

* {
  box-sizing: border-box;
}

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

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

.page {
  width: min(1040px, calc(100vw - 48px));
  margin: 0 auto;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: inherit;
}

.brand-main {
  color: var(--blue);
  font-size: 1.45rem;
  font-weight: 760;
  letter-spacing: -0.04em;
}

.brand-sub {
  color: #8a95a8;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 650;
}

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

main {
  padding: 82px 0 64px;
}

.hero {
  max-width: 820px;
}

.eyebrow,
.section h2 {
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section h2 {
  color: #8a95a8;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
}

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

h1 {
  margin-top: 20px;
  font-size: clamp(3.7rem, 8.6vw, 7.2rem);
  font-weight: 780;
  letter-spacing: -0.035em;
  line-height: 0.96;
}

.lead {
  max-width: 610px;
  margin-top: 30px;
  color: #3f4858;
  font-size: clamp(1.16rem, 1.8vw, 1.34rem);
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 15px;
  background: var(--surface);
  color: var(--blue);
  font-size: 0.93rem;
  font-weight: 720;
  letter-spacing: 0;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.button:hover {
  border-color: #b6cbe8;
  background: var(--blue-soft);
}

.button.primary:hover {
  border-color: #174b99;
  background: #174b99;
  color: #fff;
}

.section {
  margin-top: 86px;
  border-top: 1px solid var(--line);
  padding-top: 30px;
}

.section-involved {
  border-top: 0;
  padding-top: 0;
}

.section-infographic {
  margin-inline: calc(50% - 50vw);
  border-top: 1px solid #d7dce5;
  border-bottom: 1px solid #d7dce5;
  padding: 58px max(24px, calc((100vw - 1040px) / 2)) 64px;
  background:
    linear-gradient(90deg, rgba(22, 26, 34, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(22, 26, 34, 0.045) 1px, transparent 1px),
    #f8f9fa;
  background-size: 72px 72px;
}

.section-infographic::before {
  content: "milestones for automation";
  display: block;
  width: fit-content;
  border-top: 1px solid rgba(22, 26, 34, 0.32);
  padding-top: 12px;
  color: #596273;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-infographic h2 {
  max-width: 760px;
  margin-top: 14px;
  margin-left: auto;
  color: var(--ink);
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1.02;
  text-align: right;
  text-transform: none;
}

.physicist-map {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  align-items: center;
  min-height: 360px;
  margin-top: 38px;
}

.physicist-node {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(22, 26, 34, 0.26);
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
}

.physicist-node {
  min-height: 218px;
  padding: 18px;
  appearance: none;
  text-decoration: none;
  text-align: left;
  font: inherit;
  cursor: pointer;
  animation: nodeSignal 7s ease-in-out infinite;
  transform: translateY(var(--node-y, 0));
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.physicist-node::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 13px;
  width: 9px;
  height: 9px;
  border: 1px solid rgba(22, 26, 34, 0.38);
  background: rgba(255, 255, 255, 0.62);
}

.physicist-node span {
  display: block;
  padding-right: 20px;
  color: #596273;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.node-forum {
  animation-delay: 0s;
}

.node-check {
  animation-delay: 0.7s;
}

.node-benchmark {
  animation-delay: 1.4s;
}

.node-corpus {
  animation-delay: 2.1s;
}

.node-structure {
  animation-delay: 2.8s;
}

.physicist-node h3 {
  margin-top: 24px;
  font-size: 1.14rem;
  font-weight: 760;
  letter-spacing: 0;
}

.physicist-node p {
  margin-top: 9px;
  color: #4a5362;
  line-height: 1.52;
}

.ingredients {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 18px;
  color: #596273;
  font-size: 0.72rem;
  line-height: 1.55;
}

.ingredients span {
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.ingredients span + span::before {
  content: "/";
  margin: 0 0.55em;
  color: rgba(22, 26, 34, 0.34);
}

.physicist-node:hover,
.physicist-node:focus-visible,
.physicist-node.is-active {
  border-color: rgba(22, 26, 34, 0.56);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 32px rgba(22, 26, 34, 0.08);
  transform: translateY(calc(var(--node-y, 0) - 2px));
  outline: none;
}

.physicist-node.is-active {
  border-color: var(--blue);
  animation-play-state: paused;
}

.physicist-node.is-active::after {
  border-color: var(--blue);
  background: var(--blue);
}

.ingredient-detail {
  max-width: 760px;
  margin-top: 12px;
  margin-left: auto;
  border-left: 2px solid rgba(31, 95, 191, 0.42);
  padding-left: 18px;
  color: var(--ink);
  text-align: left;
}

.ingredient-detail.is-updating {
  animation: detailUpdate 260ms ease;
}

.detail-kicker {
  display: block;
  color: #596273;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ingredient-detail h3 {
  margin-top: 10px;
  font-size: clamp(1.35rem, 2.8vw, 2.05rem);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.1;
}

.ingredient-detail p {
  max-width: 660px;
  margin-top: 10px;
  color: #4a5362;
  line-height: 1.58;
}

.detail-link {
  display: inline-flex;
  margin-top: 16px;
  color: var(--blue);
  font-size: 0.9rem;
  font-weight: 760;
}

.detail-link:hover {
  color: #174b99;
}

.node-forum {
  --node-y: -28px;
}

.node-check {
  --node-y: 28px;
}

.node-benchmark {
  --node-y: -42px;
}

.node-corpus {
  --node-y: 28px;
}

.node-structure {
  --node-y: -24px;
}

@keyframes nodeSignal {
  0%,
  24%,
  100% {
    border-color: rgba(22, 26, 34, 0.26);
    background: rgba(255, 255, 255, 0.58);
  }
  12% {
    border-color: rgba(22, 26, 34, 0.5);
    background: rgba(255, 255, 255, 0.82);
  }
}

@keyframes detailUpdate {
  from {
    opacity: 0.45;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.list {
  display: grid;
  gap: 0;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.row:last-child {
  border-bottom: 0;
}

.row-link {
  transition:
    background 160ms ease,
    color 160ms ease;
}

.row-link:hover {
  background: var(--blue-soft);
}

.row-link:hover h3 {
  color: var(--blue);
}

.row h3 {
  font-size: 1.05rem;
  font-weight: 760;
  letter-spacing: -0.025em;
}

.row p {
  color: var(--muted);
  line-height: 1.6;
}

.resource-anchor {
  scroll-margin-top: 24px;
}

.contribution-form {
  display: grid;
  gap: 18px;
  max-width: 720px;
  margin-top: 18px;
}

.contribution-form label {
  display: grid;
  gap: 8px;
  color: #303846;
  font-size: 0.9rem;
  font-weight: 720;
}

.contribution-form input,
.contribution-form select,
.contribution-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.contribution-form textarea {
  resize: vertical;
}

.contribution-form input:focus,
.contribution-form select:focus,
.contribution-form textarea:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(31, 95, 191, 0.14);
}

.form-submit {
  justify-self: start;
  margin-top: 2px;
}

.join {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  margin-top: 56px;
  border-radius: 22px;
  padding: 26px;
  background: var(--ink);
  color: #fff;
}

.join h2 {
  color: #fff;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 780;
  letter-spacing: -0.045em;
  line-height: 1.05;
  text-transform: none;
}

.join p {
  margin-top: 8px;
  color: #cbd5e1;
  line-height: 1.55;
}

.join .button {
  border-color: #fff;
  background: #fff;
  color: var(--ink);
  white-space: nowrap;
}

.page-title {
  max-width: 720px;
}

.page-title h1 {
  font-size: clamp(3rem, 7vw, 5.6rem);
}

.page-title .lead {
  max-width: 720px;
}

footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 44px;
  color: #8a95a8;
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  header,
  .join,
  .row {
    grid-template-columns: 1fr;
  }

  header {
    align-items: flex-start;
    flex-direction: column;
  }

  main {
    padding-top: 42px;
  }

  .section-infographic {
    padding-top: 38px;
    padding-bottom: 42px;
  }

  .section-infographic::before {
    margin-bottom: 18px;
  }

  .section-infographic h2 {
    margin-top: 0;
    font-size: clamp(2rem, 11vw, 3.2rem);
    text-align: left;
  }

  .physicist-map {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: 0;
    margin-top: 28px;
  }

  .physicist-map::before,
  .physicist-map::after {
    display: none;
  }

  .physicist-node {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
  }

  .physicist-node {
    border-left-width: 3px;
    --node-y: 0;
  }

  .physicist-node h3 {
    margin-top: 16px;
  }

  .ingredient-detail {
    margin-top: 22px;
  }

  h1 {
    font-size: 3.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .physicist-node,
  .ingredients span {
    animation: none;
  }

  .ingredient-detail.is-updating {
    animation: none;
  }
}

/* Contribution form submit status (Web3Forms handler in forms.js) */
.form-status {
  margin: 0.85rem 0 0;
  font-size: 0.95rem;
  line-height: 1.45;
}
.form-status.sending {
  color: var(--muted);
}
.form-status.success {
  color: #1a7f37;
}
.form-status.error {
  color: #b42318;
}
