:root {
  --graphite: #221F1C;
  --parchment: #EDE6D8;
  --rust: #B3402C;
  --verdigris: #4F7A6B;
  --slate: #5B6470;
  --amber: #C98A2E;
  --rule: rgba(237, 230, 216, 0.16);
  --rule-strong: rgba(237, 230, 216, 0.3);
  --panel: rgba(237, 230, 216, 0.035);
  --mono: Consolas, Monaco, 'Courier New', monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--graphite);
  color: var(--parchment);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 28px 0 44px;
  position: relative;
}

/* Persistent threshold line -- the layout's structural spine */
.wrap::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 1px;
  background: var(--rule);
}

[id] { scroll-margin-top: 24px; }

/* ---- Gate Mark ---- */

.gate-mark { flex-shrink: 0; }
.gate-mark .bar { transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); }

/* ---- Nav ---- */

header.site-nav {
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}

header.site-nav .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.wrap::before { z-index: 0; }
header.site-nav .wrap > * { position: relative; z-index: 1; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--parchment);
}

.brand-name {
  font-family: 'Courier New', Courier, monospace;
  font-size: 18px;
  letter-spacing: 0.02em;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

nav.links {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

nav.links a {
  color: var(--slate);
  text-decoration: none;
  font-size: 14.5px;
  letter-spacing: 0.02em;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

nav.links a:hover,
nav.links a:focus-visible {
  color: var(--parchment);
  border-bottom-color: var(--rust);
}

nav.links a[aria-current="page"] {
  color: var(--parchment);
  border-bottom-color: var(--rust);
}

/* ---- Buttons ---- */

.btn {
  display: inline-block;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 11px 20px;
  background: var(--rust);
  color: var(--parchment);
  border: 1px solid var(--rust);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn:hover,
.btn:focus-visible { background: transparent; }

.btn.ghost {
  background: transparent;
  border-color: var(--rule-strong);
}

.btn.ghost:hover,
.btn.ghost:focus-visible { border-color: var(--parchment); }

.btn.small { padding: 7px 14px; font-size: 13.5px; }

.actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

/* ---- Hero ---- */

.hero {
  padding: 96px 0 72px;
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero { animation: none; opacity: 1; transform: none; }
  .gate-mark .bar { transition: none; }
}

h1 {
  font-family: 'Courier New', Courier, monospace;
  font-weight: 700;
  font-size: clamp(26px, 4.6vw, 40px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
  max-width: 30ch;
}

.hero p.lede {
  font-size: 18.5px;
  color: var(--slate);
  max-width: 52ch;
  margin: 0 0 34px;
}

.hero-link {
  display: inline-block;
  color: var(--rust);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  border-bottom: 1px solid var(--rust);
  padding-bottom: 2px;
}

.hero-link:hover,
.hero-link:focus-visible {
  color: var(--parchment);
  border-bottom-color: var(--parchment);
}

/* ---- Eyebrows and placeholder markers ---- */

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* "In development" marks content that ships as-is until the real thing
   exists. Deliberately slate and dashed: verdigris, amber and rust carry the
   Gate Mark's transaction-decision meaning and must not be borrowed. */
.tag-dev {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate);
  border: 1px dashed var(--slate);
  padding: 2px 8px;
  white-space: nowrap;
  line-height: 1.5;
}

/* "Supply before deploy" marks a gap that must be filled before publishing. */
.todo {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--parchment);
  border: 1px dashed var(--parchment);
  padding: 4px 10px;
}

/* ---- Content ---- */

main { padding-bottom: 40px; }

section {
  padding: 64px 0;
  position: relative;
  z-index: 1;
}

section + section { border-top: 1px solid var(--rule); }

.page-title {
  padding: 72px 0 16px;
  position: relative;
  z-index: 1;
}

.page-title h1 { font-size: clamp(24px, 3.8vw, 34px); }
.page-title p.lede {
  font-size: 18px;
  color: var(--slate);
  max-width: 56ch;
  margin: 0;
}

h2 {
  font-family: 'Courier New', Courier, monospace;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.35;
  margin: 0 0 22px;
  max-width: 34ch;
}

section p {
  margin: 0 0 18px;
  max-width: 62ch;
}

section p:last-child { margin-bottom: 0; }

.section-head { margin-bottom: 30px; }
.section-head p { color: var(--slate); }

/* ---- Cards and grids ---- */

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
  border: 1px solid var(--rule);
  background: var(--panel);
  padding: 24px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

a.card { transition: border-color 0.15s ease; }
a.card:hover,
a.card:focus-visible { border-color: var(--rust); }

.card h3 {
  font-family: 'Courier New', Courier, monospace;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.card p {
  font-size: 15.5px;
  color: var(--slate);
  margin: 0;
  max-width: none;
}

.card p.strong { color: var(--parchment); }

.card .more {
  margin-top: auto;
  padding-top: 6px;
  font-size: 13.5px;
  color: var(--rust);
}

.card .source {
  margin-top: auto;
  padding-top: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--verdigris);
  letter-spacing: 0.01em;
}

.card .source a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.card-label {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
}

/* ---- Steps ---- */

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0 28px;
  border-top: 1px solid var(--rule);
}

.steps li { padding: 26px 0 8px; }

.steps .num {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--rust);
  margin-bottom: 10px;
}

.steps h3 {
  font-family: 'Courier New', Courier, monospace;
  font-size: 16.5px;
  margin: 0 0 8px;
}

.steps p {
  font-size: 15.5px;
  color: var(--slate);
  margin: 0;
}

/* ---- Role blocks ---- */

.role {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 12px 40px;
  padding: 30px 0;
  border-top: 1px solid var(--rule);
}

.role:last-child { border-bottom: 1px solid var(--rule); }

.role h3 {
  font-family: 'Courier New', Courier, monospace;
  font-size: 17px;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.role dl { margin: 0; }
.role dt {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 4px;
}
.role dd { margin: 0 0 16px; max-width: 60ch; }
.role dd:last-child { margin-bottom: 0; }

/* ---- Call-to-action band ---- */

.cta-band {
  border: 1px solid var(--rule-strong);
  background: var(--panel);
  padding: 44px 40px;
}

.cta-band h2 { margin-bottom: 14px; }
.cta-band p { color: var(--slate); margin-bottom: 26px; }

/* ---- Contact ---- */

.contact-value {
  font-size: 18px;
  color: var(--parchment);
  word-break: break-word;
}

.contact-value a {
  color: var(--parchment);
  text-decoration: none;
  border-bottom: 1px solid var(--rust);
}

.plain-list {
  margin: 0;
  padding: 0 0 0 20px;
  max-width: 62ch;
}

.plain-list li { margin-bottom: 10px; }
.plain-list li::marker { color: var(--rust); }

/* ---- Founder ---- */

.founder {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}

.founder-photo {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule-strong);
}

@media (max-width: 560px) {
  .founder { grid-template-columns: 1fr; gap: 24px; }
  .founder-photo { max-width: 200px; }
}

/* ---- Citations ---- */

.cite {
  border-left: 2px solid var(--verdigris);
  padding: 4px 0 4px 20px;
  margin: 28px 0;
}

.cite p {
  font-size: 15.5px;
  color: var(--parchment);
  margin: 0 0 8px;
  font-style: italic;
}

.cite .source {
  font-style: normal;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--verdigris);
  letter-spacing: 0.01em;
}

.cite .source a,
.references .ref-name a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  opacity: 0.85;
}

.cite .source a:hover,
.references .ref-name a:hover {
  opacity: 1;
}

.inline-cite {
  color: var(--verdigris);
  text-decoration: none;
  border-bottom: 1px solid var(--verdigris);
  opacity: 0.85;
}

.inline-cite:hover {
  opacity: 1;
}

/* ---- Stage note ---- */

.stage-note {
  border: 1px solid var(--rule);
  padding: 24px 26px;
  margin-top: 28px;
}

.stage-note p {
  font-size: 15.5px;
  color: var(--slate);
  margin: 0;
}

.stage-note strong { color: var(--parchment); font-weight: 700; }

/* ---- References ---- */

.references {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
  max-width: 760px;
}

.references li {
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
}

.references .ref-name {
  color: var(--parchment);
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
}

.references .ref-date {
  font-family: var(--mono);
  color: var(--slate);
  font-size: 13px;
}

/* ---- Log ---- */

.log-list { display: flex; flex-direction: column; gap: 0; }

.log-entry {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 22px;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
}

.log-entry:first-child { padding-top: 0; }

.log-date {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--slate);
  padding-top: 3px;
}

.log-body h3 {
  font-family: 'Courier New', Courier, monospace;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.log-body p {
  margin: 0;
  font-size: 15.5px;
  color: var(--slate);
  max-width: 56ch;
}

.status {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border: 1px solid;
}

.status.settled { color: var(--verdigris); border-color: var(--verdigris); }
.status.open { color: var(--amber); border-color: var(--amber); }

.legend {
  display: flex;
  gap: 28px;
  margin-bottom: 40px;
  font-size: 13.5px;
  color: var(--slate);
}

.legend span { display: flex; align-items: center; gap: 8px; }

@media (max-width: 560px) {
  .log-entry { grid-template-columns: 1fr; gap: 6px; }
  .log-date { padding-top: 0; }
}

/* ---- Footer ---- */

footer {
  padding: 48px 0 64px;
  border-top: 1px solid var(--rule);
  position: relative;
  z-index: 1;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
}

footer .who {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--slate);
}

a.contact {
  color: var(--rust);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

a.contact:hover,
a.contact:focus-visible {
  border-bottom-color: var(--rust);
}

footer.site-footer { padding: 60px 0 40px; }
footer.site-footer .wrap { display: block; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr repeat(4, 1fr);
  gap: 32px;
}

.footer-brand p {
  color: var(--slate);
  font-size: 14.5px;
  margin: 14px 0 10px;
  max-width: 30ch;
}

.site-footer h4 {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 14px;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 14.5px;
}

.site-footer ul a {
  color: var(--parchment);
  text-decoration: none;
  opacity: 0.85;
  border-bottom: 1px solid transparent;
}

.site-footer ul a:hover,
.site-footer ul a:focus-visible {
  opacity: 1;
  border-bottom-color: var(--rust);
}

.site-footer .soon {
  color: var(--slate);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-base {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}

a:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
}

@media (max-width: 820px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
  .role { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .wrap { padding-left: 32px; }
  .wrap::before { left: 12px; }
  body { font-size: 16px; }
  .hero { padding: 64px 0 48px; }
  .page-title { padding: 48px 0 8px; }
  section { padding: 44px 0; }
  nav.links { gap: 18px; }
  .nav-right { gap: 18px; }
  .cta-band { padding: 32px 24px; }
}
