/* ==========================================================================
   Layer 1: shared shell (palette, system fonts, reset, header, footer).
   Copied from the handoff site-shell/site-shell.css with identical
   declarations (sha256 c27f03fa...); only the final compact rules were
   re-wrapped across lines for stylelint. Body design is in site.css.
   ========================================================================== */

/* Pneuma IO: "Narration & Mechanics"
   Two voices: a reading serif for narration (headlines, prose) and a condensed
   engine face for mechanics (registers, labels, dates, controls).
   Palette: slate from Sylvia's portrait ground, violet from her hair and circlet;
   orchid only marks limits and upcoming work. The cyan Pneuma icon is unchanged.
   System fonts only: the production CSP allows same-origin styles and fonts. */

:root {
  color-scheme: dark;
  --bg: #12161d;
  --bg-2: #161b23;
  --surface: #1b212b;
  --surface-2: #232c37;
  --line: #2a313d;
  --line-2: #3a4252;
  --text: #ece9f4;
  --text-2: #b8bccb;
  --text-3: #8c92a4;
  --violet: #8b72de;
  --violet-2: #ab95f6;
  --violet-3: #d2c6ff;
  --violet-ink: #241d3d;
  --violet-wash: rgba(139, 114, 222, 0.12);
  --orchid: #e7a2dc;
  --serif: "Sitka Text", "Iowan Old Style", charter, "Bitstream Charter", cambria, georgia, serif;
  --display: "Sitka Display", "Sitka Heading", "Iowan Old Style", charter, cambria, georgia, serif;
  --engine: bahnschrift, "DIN Alternate", "Roboto Condensed", "Arial Narrow", "Segoe UI", system-ui, sans-serif;
  --mono: consolas, ui-monospace, "SF Mono", menlo, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --wrap: 1200px;
  --head-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--head-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--serif);
  text-rendering: optimizelegibility;
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: var(--violet-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: rgba(171, 149, 246, 0.45);
}

a:hover {
  color: var(--violet-3);
  text-decoration-color: currentcolor;
}

a[href^="https://"]:not([href^="https://pneuma-io.dev"])::after {
  content: "\2009\2197";
  font-family: var(--engine);
  font-size: 0.8em;
  opacity: 0.7;
}

:focus-visible {
  outline: 2px solid var(--violet-3);
  outline-offset: 3px;
  border-radius: 2px;
}

p {
  margin: 0 0 1em;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  text-wrap: balance;
}

strong {
  font-weight: 650;
  color: var(--text);
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--violet-3);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  padding: 0.05em 0.35em;
}

.wrap {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  background: var(--violet-2);
  color: #120e22;
  padding: 8px 14px;
  font-family: var(--engine);
}

.skip-link:focus {
  top: 12px;
}

/* ------------------------------------------------------------ header */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(18, 22, 29, 0.86);
  backdrop-filter: blur(10px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}

.site-head__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--head-h);
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
}

.brand img {
  width: 40px;
  height: 40px;
}

.brand__name {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem;
}

.nav a {
  display: block;
  padding: 0.45rem 0.75rem;
  border-radius: 4px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.nav a:hover {
  color: var(--text);
  background: var(--surface);
}

.nav a[aria-current="page"] {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--violet-2);
  border-radius: 4px 4px 0 0;
}

.nav a[aria-current="true"] {
  color: var(--text);
  box-shadow: inset 0 -2px 0 rgba(171, 149, 246, 0.45);
  border-radius: 4px 4px 0 0;
}

.nav--menu {
  display: none;
  position: relative;
}

.nav--menu summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 0.9rem;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.nav--menu summary::-webkit-details-marker {
  display: none;
}

.nav--menu summary svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.nav--menu nav {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(260px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 0.4rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.nav--menu ul {
  flex-direction: column;
}

.nav--menu a {
  padding: 0.7rem 0.8rem;
}

.nav--menu a[aria-current="page"],
.nav--menu a[aria-current="true"] {
  box-shadow: inset 2px 0 0 var(--violet-2);
  border-radius: 0 4px 4px 0;
}

@media (max-width: 860px) {
  .nav--wide {
    display: none;
  }

  .nav--menu {
    display: block;
  }
}

/* ------------------------------------------------------------ footer */

.site-foot {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding-top: 3rem;
  margin-top: 0;
}

.site-foot__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.site-foot__brand img {
  width: 56px;
  height: 56px;
  margin-bottom: 0.6rem;
}

.site-foot__name {
  font-family: var(--engine);
  font-stretch: 87.5%;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  margin: 0 0 0.25rem;
}

.site-foot__mission {
  color: var(--text-2);
  max-width: 26em;
}

.site-foot__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.site-foot__col a {
  color: var(--text-2);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.site-foot__col a:hover {
  color: var(--violet-3);
  text-decoration: underline;
}

.site-foot__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-top: 2.5rem;
  padding-block: 1.25rem 2rem;
  border-top: 1px solid var(--line);
}

.site-foot__base p {
  margin: 0;
  font-family: var(--engine);
  font-stretch: 87.5%;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--text-3);
}

.nav,
.brand__name,
.label {
  font-family: var(--engine);
  font-stretch: 87.5%;
}

.label {
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}

@media (max-width: 860px) {
  .site-foot__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .site-foot__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .site-foot__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .brand__name {
    font-size: 1.05rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
