/* Page chrome and per-section layout: nav, hero, sections, conformance,
   architecture pipeline, footer. */

.page {
  min-height: 100vh;
  background: var(--bg);
  background-image: radial-gradient(
    60% 50% at 50% -10%,
    var(--glow),
    transparent 70%
  );
  overflow-x: hidden;
}

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  padding: 0 28px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 1px;
}
.nav__brand-mark { color: var(--purple-300); }
.nav__links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-muted);
}
.nav__link {
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav__link:hover { color: var(--text); }
.nav__cta {
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: var(--text);
  padding: 6px 13px;
  border: 1px solid var(--line-btn);
  border-radius: 6px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.nav__cta:hover {
  border-color: var(--purple);
  background: rgba(101, 79, 240, 0.1);
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line-btn);
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.theme-toggle:hover {
  color: var(--text);
  border-color: var(--purple);
}
.theme-toggle svg {
  width: 16px;
  height: 16px;
}
/* Default (dark): show the sun (click → light). Light: show the moon.
   Keep the display control on the icon classes so nothing outspecifies it. */
.theme-toggle__sun { display: block; }
.theme-toggle__moon { display: none; }
:root[data-theme="light"] .theme-toggle__sun { display: none; }
:root[data-theme="light"] .theme-toggle__moon { display: block; }

@media (max-width: 720px) {
  .nav__links { gap: 16px; }
  .nav__link--hide-sm { display: none; }
}

/* ---- Section scaffolding ---- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  scroll-margin-top: 76px;
}
.section--hero {
  max-width: 980px;
  padding: 96px 28px 84px;
  text-align: center;
}
.section--pad { padding: 40px 28px 88px; }
.section--pad-lg { padding: 40px 28px 96px; }

.section__title {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(22px, 3vw, 30px);
  margin: 0 0 14px;
  letter-spacing: -0.4px;
}
.section__title--tight { margin-bottom: 8px; }
.section__lead {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-dim);
  max-width: 680px;
  margin: 0 0 28px;
}

/* ---- Hero ---- */
.hero__logo {
  /* Shrink-wrap the art and center the whole block. The lines stay
     left-aligned (text-align:left) so the columns of the W A G O glyphs line
     up — centering each line independently mangles the art on narrow widths. */
  width: max-content;
  max-width: 100%;
  margin: 0 auto 8px;
  text-align: left;
  font-family: var(--mono-art);
  font-weight: 700;
  font-size: clamp(16px, 5vw, 40px);
  line-height: 1.12;
  color: var(--purple-300);
  text-shadow: 0 0 28px var(--logo-glow);
  user-select: none;
}
.hero__eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--purple);
  margin-bottom: 30px;
}
.hero__title {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(26px, 4.4vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.5px;
  margin: 0 auto 20px;
  max-width: 760px;
}
.hero__title-accent { color: var(--purple-300); }
.hero__sub {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto 38px;
}
.hero__sub-em { color: var(--text); }
.hero__actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero__meta {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: 22px;
}

/* ---- Generic grids ---- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.row-wrap {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.row-wrap--mt { margin-top: 20px; }

@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* ---- Conformance ---- */
.conformance {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 30px;
  background: var(--bg-panel);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
}
.conformance__big {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 54px;
  color: var(--green);
  line-height: 1;
}
.conformance__big-total { color: var(--text-faint); }
.conformance__label {
  font-size: 14px;
  color: var(--text);
  margin: 8px 0 18px;
}
.conformance__bar-track {
  height: 10px;
  background: var(--fill-chip);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 8px;
}
.conformance__bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--purple), var(--green));
  transition: width 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.conformance__foot {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-faint);
}
.conformance__aside {
  border-left: 1px solid var(--line-soft);
  padding-left: 30px;
}
.conformance__num {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 34px;
  color: var(--text);
  line-height: 1;
}
.conformance__num-label {
  font-size: 14px;
  color: var(--text-dim);
  margin: 8px 0 22px;
}
.conformance__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.conformance__link {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--purple-300);
  text-decoration: none;
}
.conformance__link:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .conformance { grid-template-columns: 1fr; gap: 24px; }
  .conformance__aside { border-left: none; padding-left: 0; padding-top: 24px; border-top: 1px solid var(--line-soft); }
}

/* ---- Architecture pipeline ---- */
.stage-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}
.stage-head--mt { margin-top: 36px; }
.stage-head__name {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.stage-head__status {
  font-family: var(--mono);
  font-size: 12px;
}
.stage-head__status--done { color: var(--green); }
.stage-head__status--planned { color: var(--amber); }

.pipeline {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 30px 26px;
  background: var(--bg-panel);
  font-family: var(--mono);
}
.pipeline--planned {
  border: 1px dashed rgba(227, 179, 65, 0.45);
  background: rgba(227, 179, 65, 0.03);
}

.pipeline__row {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex-wrap: wrap;
}
.pipeline__node {
  flex: 1;
  min-width: 120px;
  text-align: center;
  padding: 16px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.pipeline__node--hl {
  border: 1px solid rgba(101, 79, 240, 0.4);
  background: rgba(101, 79, 240, 0.07);
}
.pipeline__node--dashed { border: 1px dashed var(--line-dash); }
.pipeline__node--dashed-purple { border: 1px dashed rgba(101, 79, 240, 0.6); background: rgba(101, 79, 240, 0.08); }
.pipeline__node-title { font-size: 13px; margin-bottom: 6px; color: var(--purple-300); }
.pipeline__node-title--green { color: var(--green); }
.pipeline__node-title--lilac { color: var(--purple-200); }
.pipeline__node-title--muted { color: var(--text-muted); }
.pipeline__node-sub { color: var(--text-faint); font-size: 11px; }

.pipeline__arrow {
  display: flex;
  align-items: center;
  color: var(--purple);
  font-size: 18px;
  padding: 0 8px;
}
.pipeline__arrow--amber { color: var(--amber); }
.pipeline__arrow-down {
  text-align: center;
  color: var(--purple);
  font-size: 18px;
  padding: 10px 0;
}
.pipeline__arrow-down--amber { color: var(--amber); }

.pipeline__split {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.pipeline__panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.pipeline__panel--wide { flex: 2; min-width: 240px; }
.pipeline__panel--narrow {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.pipeline__panel-title { color: var(--text); font-size: 13px; margin-bottom: 12px; }
.pipeline__mem { display: flex; gap: 8px; }
.pipeline__mem-cell {
  flex: 1;
  padding: 11px;
  background: var(--fill-soft);
  border-radius: 6px;
  text-align: center;
  color: var(--text-dim);
  font-size: 11.5px;
}
.pipeline__mem-cell--lin {
  flex: 2;
  background: rgba(101, 79, 240, 0.1);
  color: var(--purple-200);
}
.pipeline__panel-note { color: var(--text-faint); font-size: 11.5px; line-height: 1.5; }
.pipeline__foot {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.6;
}
.pipeline__foot--amber { border-top-color: rgba(227, 179, 65, 0.18); }
.pipeline__caption {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  text-align: center;
  margin-bottom: 12px;
}

.pipeline__targets { display: flex; gap: 12px; flex-wrap: wrap; }
.pipeline__target {
  flex: 1;
  min-width: 160px;
  padding: 16px;
  border: 1px dashed var(--line-dash);
  border-radius: 8px;
}
.pipeline__target--ship {
  border: 1px solid rgba(154, 209, 126, 0.4);
  background: rgba(154, 209, 126, 0.06);
}
.pipeline__target-title { font-size: 13px; margin-bottom: 5px; color: var(--text); }
.pipeline__target-title--green { color: var(--green); }
.pipeline__target-sub { color: var(--text-faint); font-size: 11px; }

/* ---- Inline code accent ---- */
.code-lilac { font-family: var(--mono); color: var(--lilac); font-size: 13.5px; }
.em-text { color: var(--text); }
.em-dim { color: var(--text-dim); }
.em-green { color: var(--green); }

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--line-soft);
  background: var(--bg-panel);
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 44px 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 28px;
}
.footer__logo {
  font-family: var(--mono-art);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
  color: var(--purple-300);
  margin: 0 0 12px;
}
.footer__tagline {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  margin: 0;
  line-height: 1.7;
}
.footer__cols {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 13px;
}
.footer__col {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.footer__col-head {
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: 1px;
}
.footer__link {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer__link:hover { color: var(--text); }
.footer__copy {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px 36px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-ghost);
}
