/* The System pages. Same design language as the Martha page and the
   3DVR Girl world page: same tokens, same type, another wing of the
   same house. */
:root {
  color-scheme: dark;
  --bg: #0b0f0d;
  --bg-soft: #101612;
  --panel: #151c18;
  --panel-warm: #1c1a15;
  --text: #f1e8db;
  --muted: #aaa497;
  --sand: #d3b98f;
  --sage: #91aa91;
  --cyan: #77b9c0;
  --line: rgba(241, 232, 219, 0.13);
  --line-strong: rgba(241, 232, 219, 0.24);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 85% 12%, rgba(79, 112, 87, 0.13), transparent 30rem),
    radial-gradient(circle at 7% 58%, rgba(119, 185, 192, 0.07), transparent 28rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body::selection {
  background: var(--sand);
  color: var(--bg);
}

img {
  max-width: 100%;
}

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

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  padding: 12px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(241, 232, 219, 0.08);
  background: linear-gradient(180deg, rgba(5, 8, 6, 0.9), rgba(5, 8, 6, 0.52));
  backdrop-filter: blur(18px);
}

.topbar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand__mark {
  color: var(--cyan);
  letter-spacing: 0.04em;
}

.topbar__nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 28px);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
}

.topbar__nav a:hover,
.topbar__nav a:focus-visible {
  color: var(--text);
}

.topbar__portal {
  color: var(--sand);
}

main section[id] {
  scroll-margin-top: 96px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--sand);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.lede {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  line-height: 1.45;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid rgba(211, 185, 143, 0.56);
  border-radius: 999px;
  background: rgba(211, 185, 143, 0.1);
  color: var(--text);
  font-weight: 800;
  transition: background 160ms ease, border-color 160ms ease;
}

.button:hover,
.button:focus-visible {
  background: rgba(211, 185, 143, 0.2);
  border-color: var(--sand);
}

.button--quiet {
  border-color: var(--line-strong);
  background: transparent;
}

.button--quiet:hover,
.button--quiet:focus-visible {
  border-color: var(--text);
  background: rgba(241, 232, 219, 0.06);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(120px, 16vh, 168px) 0 clamp(48px, 7vh, 84px);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.9rem, 7.5vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero__copy > p:not(.eyebrow) {
  max-width: 34rem;
  color: var(--muted);
}

.hero__copy .lede {
  color: var(--text);
}

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.hero__tags span {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.hero__note {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(165deg, var(--panel) 0%, var(--panel-warm) 100%);
  box-shadow: var(--shadow);
}

.hero__note p:not(.eyebrow) {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero__portrait {
  margin: 0;
  padding: clamp(14px, 2.4vw, 24px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(165deg, var(--panel) 0%, var(--panel-warm) 100%);
  box-shadow: var(--shadow);
}

.hero__portrait img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
}

.hero__portrait figcaption {
  padding: 14px 6px 2px;
  color: var(--muted);
  font-size: 0.88rem;
}

/* Sections */
.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(44px, 7vh, 76px) 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.section-heading > p {
  max-width: 22rem;
  margin: 0;
  color: var(--muted);
}

.body-copy {
  max-width: 44rem;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 1.05rem;
}

.body-copy a,
.section-note a {
  color: var(--sand);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.section-note {
  max-width: 44rem;
  margin: 26px 0 0;
  color: var(--muted);
}

/* Modules */
.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.module-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg-soft);
}

.module-card .status {
  color: var(--sand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.module-card h3 {
  margin: 0;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.module-card p {
  margin: 0;
  color: var(--muted);
}

.card-link {
  margin-top: auto;
  padding-top: 10px;
  color: var(--sand);
  font-weight: 800;
}

.card-link:hover,
.card-link:focus-visible {
  color: var(--text);
}

/* Pattern cards */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.work-card {
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg-soft);
}

.work-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.work-card p {
  margin: 0;
  color: var(--muted);
}

/* Fact lists (desk page) */
.fact-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fact-list li {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr);
  gap: 6px 28px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-soft);
}

.fact-list strong {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.fact-list span {
  color: var(--muted);
}

/* Closing */
.closing h2 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.closing p:not(.eyebrow) {
  max-width: 34rem;
  color: var(--muted);
}

.closing__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

/* Footer */
.footer {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 30px 0 54px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.footer p {
  margin: 0;
}

.footer a {
  color: var(--sand);
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 110px;
  }

  .hero__portrait {
    max-width: 520px;
  }

  .module-grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 640px) {
  .module-grid,
  .work-grid {
    grid-template-columns: 1fr;
  }

  .fact-list li {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .topbar__nav a:not(.topbar__portal) {
    display: none;
  }

  .footer {
    flex-direction: column;
    gap: 10px;
  }
}
