/* JAM OS pages (home, product, privacy, 404). Cream paper, Bodoni, IBM Plex Mono.
   /studio/ stays on its own system. /pitch/ is self-contained. */
:root {
  --cream: #EFEBDF;
  --cream-deep: #E4DFD0;
  --ink: #1A1714;
  --blue: #1A7FB3;
  --tan: #C9A66B;
  --tan-deep: #A8864F;
  --slate: #3B3F42;
  --slate-deep: #26292B;
  --bone: #E7E0CC;
  --bone-deep: #C8BFA6;
  --wood: #7B4B2A;
  --wood-deep: #59331B;
  --steel: #B9B6AD;
  --steel-deep: #8E8B83;
  --rule: rgba(26, 23, 20, .18);
  --void: #0E0D12;
  --coral: #EE8E66;
  --coral-light: #F6C7A4;
  --glyph-blue: #5B6FD3;
  --glyph-green: #4E9A62;
  --glyph-white: #D7D7D2;
  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
  --z-nav: 50;
  --z-skip: 300;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  color-scheme: light;
}
html, body { margin: 0; }
body {
  background-color: var(--cream);
  background-image: radial-gradient(rgba(26, 23, 20, .09) .6px, transparent .7px);
  background-size: 6px 6px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: var(--z-skip);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--cream);
  padding: .85em 1.2em;
  text-decoration: none;
  transform: translateY(calc(-100% - 24px));
  transition: transform .18s var(--ease);
}
.skip-link:focus { transform: translateY(0); }
main:focus { outline: none; }

/* ---------- top bar (theme .bar, same a11y as .jnav) ---------- */
.jnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 40px;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: color-mix(in oklab, var(--cream) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.jnav .mark {
  text-decoration: none;
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0;
  text-transform: none;
}
.jnav .mark .accent { color: var(--blue); }
.jnav .links { display: flex; align-items: center; gap: 28px; }
.jnav .links a { text-decoration: none; }
.jnav .links a:hover,
.jnav .links a[aria-current="page"] { color: var(--blue); }
.jnav .links a.go { color: var(--blue); }
.jnav-burger { display: none; }

@media (max-width: 640px) {
  .jnav { padding: 18px 20px; }
  html:not(.js) .jnav .links { flex-wrap: wrap; justify-content: flex-end; gap: 10px 16px; }
  .js .jnav-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    flex: 0 0 auto;
    background: none;
    border: 0;
    cursor: pointer;
  }
  .jnav-burger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--ink);
    transition: transform .3s, opacity .3s;
  }
  .js .jnav .links { display: none; }
  .js .jnav.menu-open .links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 8px 20px 24px;
    background: color-mix(in oklab, var(--cream) 94%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--rule);
  }
  .js .jnav.menu-open .links a {
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
  }
  .js .jnav.menu-open .jnav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .js .jnav.menu-open .jnav-burger span:nth-child(2) { opacity: 0; }
  .js .jnav.menu-open .jnav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: 8vh 24px 0;
  overflow: hidden;
}
.hero h1 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(44px, 7.6vw, 118px);
  line-height: 1;
  letter-spacing: -.015em;
  margin: 0 0 18px;
  font-variation-settings: "opsz" 96;
}
.hero h1 .accent { color: var(--blue); }
.hero .thesis {
  margin: 0 auto 22vh;
  max-width: 42ch;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .72;
}
.hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.hero h1, .hero .thesis, .shelf { position: relative; z-index: 1; }

.shelf {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 28px;
}
.machines {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin: 0;
  padding: 0 0 10px;
  list-style: none;
}
.machines li {
  flex: 1 1 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-width: 0;
}
.machines svg {
  width: 100%;
  max-width: 175px;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 18px 14px rgba(26, 23, 20, .22)) drop-shadow(0 2px 2px rgba(26, 23, 20, .12));
  transition: transform .5s var(--ease);
}
.machines li:hover svg { transform: translateY(-8px); }
.shelf-line {
  height: 1px;
  background: var(--rule);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .7);
}

.reel { transform-origin: center; transform-box: fill-box; }
@media (prefers-reduced-motion: no-preference) {
  .reel { animation: spin 14s linear infinite; }
  .reel.r { animation-duration: 11s; }
  @keyframes spin { to { transform: rotate(360deg); } }
  .crt { animation: warm 2.4s ease-out both; }
  .crt-loop { animation: appear .2s steps(1) 2.9s both; }
  @keyframes appear { from { opacity: 0; } to { opacity: 1; } }
  @keyframes warm {
    0% { fill: #101211; }
    55% { fill: #101211; }
    70% { fill: #3a4a44; }
    100% { fill: #24302B; }
  }
}

/* ---------- ticker ---------- */
.strip {
  margin: 0;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
}
.strip span { display: inline-block; padding: 0 28px; }
.strip span::before { content: "·"; margin-right: 28px; color: var(--blue); }

/* ---------- copy ---------- */
.copy {
  max-width: 1180px;
  margin: 0 auto;
  padding: 96px 40px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: start;
}
.copy h2 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(34px, 4.4vw, 60px);
  line-height: 1.02;
  margin: 0;
  letter-spacing: -.01em;
}
.copy h2 em { font-style: italic; color: var(--blue); }
.copy p { margin: 0 0 20px; max-width: 46ch; }
.copy p:last-child { margin-bottom: 0; }
.copy .rule {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}
.copy .rule h3 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  font-size: 22px;
  margin: 0 0 10px;
  line-height: 1.1;
}

/* ---------- three machines ---------- */
.trio {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 40px 112px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.card {
  border-top: 1px solid var(--rule);
  padding-top: 28px;
}
.card svg {
  width: 110px;
  height: auto;
  overflow: visible;
  display: block;
  margin-bottom: 28px;
  filter: drop-shadow(0 10px 8px rgba(26, 23, 20, .18));
}
.card h3 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  font-size: 30px;
  margin: 0 0 10px;
  line-height: 1;
}
.card p { margin: 0; font-size: 14px; }
.card .year {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}

/* ---------- walkthrough ---------- */
.walk-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 40px 112px;
}
.walk-head { max-width: 46ch; margin-bottom: 40px; }
.walk-head .year {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 12px;
}
.walk-head h2 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(34px, 4.4vw, 60px);
  line-height: 1.02;
  margin: 0 0 16px;
  letter-spacing: -.01em;
}
.walk {
  border-top: 1px solid var(--rule);
  padding-top: 28px;
}
.walk-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
}
.walk-rail button {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
  padding: 10px 14px;
  min-height: 44px;
  cursor: pointer;
}
.walk-rail button[aria-selected="true"] {
  color: var(--cream);
  background: var(--blue);
  border-color: var(--blue);
}
.walk-stage { position: relative; min-height: 240px; }
.walk[data-mode="step"] .walk-panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
.walk[data-mode="step"] .walk-panel.is-on {
  position: relative;
  opacity: 1;
  pointer-events: auto;
}
.walk:not([data-mode="step"]) .walk-panel + .walk-panel {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.walk:not([data-mode="step"]) .walk-dir { display: none; }
.walk-doc .k,
.walk-gate .k {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--blue);
}
.walk-doc .v {
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  font-size: 56px;
  line-height: 1;
  margin: 8px 0 10px;
}
.walk-doc .m,
.walk-cap { margin: 0; max-width: 46ch; }
.walk-cap { margin-top: 18px; }
.walk-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.walk-tags span {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  border: 1px solid var(--rule);
  padding: 4px 8px;
}
.walk-dests {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}
.walk-dest { border-top: 1px solid var(--rule); padding-top: 16px; }
.walk-dest .n {
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  font-size: 22px;
}
.walk-dest .t {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-top: 8px;
}
.walk-gate h3 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  font-size: 28px;
  margin: 10px 0 10px;
  line-height: 1.05;
}
.walk-gate p { margin: 0; max-width: 46ch; }
.walk-dir {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}
.walk-dir button {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
  padding: 10px 16px;
  min-height: 44px;
  cursor: pointer;
}
.walk-dir button:hover { color: var(--blue); border-color: var(--blue); }
.walk-dir button:disabled { opacity: .35; cursor: default; }

/* ---------- system / proof / guards ---------- */
.band {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.stack {
  max-width: 1180px;
  margin: 0 auto;
  padding: 96px 40px;
}
.stack h1,
.stack h2 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(34px, 4.4vw, 60px);
  line-height: 1.02;
  margin: 0 0 16px;
  letter-spacing: -.01em;
}
.stack .year {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 12px;
}
.stack .lede { max-width: 46ch; margin: 0 0 40px; }
.sys-strip {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px 24px;
}
.sys-strip a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  border-top: 1px solid var(--rule);
  padding: 16px 0;
}
.sys-strip a:hover { color: var(--blue); }
.sys-strip .nid {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
}
.sys-strip .nm {
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  font-size: 22px;
}
.sys-more { margin-top: 28px; }

.proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.proof .p { border-top: 1px solid var(--rule); padding-top: 22px; }
.proof .p h3 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  font-size: 26px;
  margin: 0 0 10px;
  line-height: 1.05;
}
.proof .p p { margin: 0; font-size: 14px; }

.guards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}
.guard { border-top: 1px solid var(--rule); padding-top: 22px; }
.guard .mark {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--blue);
}
.guard h3 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  font-size: 26px;
  margin: 10px 0;
  line-height: 1.05;
}
.guard p { margin: 0; font-size: 14px; }

.cta {
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid var(--blue);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 12px;
}
.cta:hover { opacity: .7; }
.close { text-align: center; }
.close .lede { margin-left: auto; margin-right: auto; }

/* ---------- privacy + 404 ---------- */
.prose { max-width: 46ch; }
.prose h2 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  font-size: 26px;
  line-height: 1.1;
  margin: 40px 0 12px;
}
.prose p { margin: 0 0 16px; font-size: 14px; }
.prose a { color: var(--blue); text-decoration: none; border-bottom: 1px solid var(--blue); }
.prose a:hover { opacity: .7; }
.prose .updated {
  margin-top: 48px;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .55;
}

.lost {
  min-height: calc(100svh - 180px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 48px 24px 80px;
}
.lost .code {
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(5rem, 22vw, 12rem);
  line-height: .9;
  color: var(--blue);
  margin: 0;
}
.lost h1 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(28px, 4vw, 48px);
  margin: 12px 0 16px;
  line-height: 1.05;
}
.lost .sub { max-width: 42ch; margin: 0 auto 28px; }
.lost .cta-row { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }
.lost .path {
  margin-top: 40px;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .55;
}

/* ---------- product inventory ---------- */
.nodes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px 32px;
  margin: 48px 0 0;
}
.node { border-top: 1px solid var(--rule); padding-top: 22px; }
.node .ids {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 12px;
}
.node .nid {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
}
.node .tech {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .55;
  text-align: right;
}
.node h3 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  font-size: 26px;
  line-height: 1.05;
  margin: 0 0 10px;
}
.node p { margin: 0 0 12px; font-size: 14px; }
.node p:last-child { margin-bottom: 0; }
.node .swap {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  opacity: .7;
}

.ba {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  margin-top: 48px;
}
.col { border-top: 1px solid var(--rule); padding-top: 22px; }
.col h3 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  font-size: 26px;
  margin: 0 0 18px;
  line-height: 1.05;
}
.col.after h3 { color: var(--blue); }
.col.before h3 { opacity: .55; }
.row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
}
.row:last-child { border-bottom: 0; }
.row .lbl { opacity: .65; }
.row .val { font-weight: 500; text-align: right; }

.stack .rule {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}
.stack .rule h3 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  font-size: 22px;
  margin: 0 0 10px;
  line-height: 1.1;
}
.stack .rule p { margin: 0; max-width: 46ch; }

/* reveal-on-scroll — same failsafe as jamos.js: hidden only once JS can reveal */
.rv { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .rv { opacity: 0; transform: translateY(22px); }
.js .rv.in { opacity: 1; transform: none; }
.rv.d1 { transition-delay: .1s; }
.rv.d2 { transition-delay: .2s; }
.rv.d3 { transition-delay: .3s; }
@supports (animation-timeline: view()) {
  .st .rv {
    opacity: 1; transform: none; transition: none;
    animation-name: loop-rv-in;
    animation-duration: auto;
    animation-timing-function: linear;
    animation-fill-mode: both;
    animation-timeline: view();
    animation-range: entry 0% cover 24%;
  }
  .st .rv.d1 { animation-range: entry 0% cover 30%; }
  .st .rv.d2 { animation-range: entry 0% cover 36%; }
  .st .rv.d3 { animation-range: entry 0% cover 42%; }
}
@keyframes loop-rv-in {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

/* ---------- footer ---------- */
.jfoot {
  border-top: 1px solid var(--rule);
  padding: 28px 40px 40px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.jfoot .big {
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  font-size: 28px;
  letter-spacing: 0;
  text-transform: none;
}
.jfoot .big .accent { color: var(--blue); }
.jfoot a { text-decoration: none; }
.jfoot a:hover { color: var(--blue); }
.jfoot nav { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; }

@media (max-width: 820px) {
  .jnav { padding: 18px 20px; }
  .jnav .links { gap: 16px; }
  .copy { grid-template-columns: 1fr; gap: 28px; padding: 64px 24px; }
  .trio { grid-template-columns: 1fr; padding: 0 24px 72px; }
  .walk-wrap, .stack { padding: 64px 24px; }
  .proof, .guards { grid-template-columns: 1fr; gap: 28px; }
  .jfoot { flex-direction: column; padding: 24px; }
}
@media (max-width: 640px) {
  .machines { flex-wrap: wrap; row-gap: 30px; }
  .machines li { flex: 1 1 30%; }
  .machines svg { max-width: 120px; }
  .hero .thesis { margin-bottom: 16vh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .machines li:hover svg { transform: none; }
  .reel, .crt, .crt-loop { animation: none; }
  .skip-link, .jnav-burger span { transition: none; }
  .rv, .js .rv, .st .rv { opacity: 1; transform: none; transition: none; animation: none; }
}
