/* platform.css */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
code, pre, .mono {
  /* JetBrains Mono fallback for /_caps (which doesn't load Plex Mono). */
  font-family: 'IBM Plex Mono', 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

.platform {
  /* Palette + layout tokens mirror lander.css so the spine stays at the
   * same viewport x when navigating between / and /platform. */
  --bg:        #0a0807;
  --panel:     #0e0c0a;
  --surface:   #1a1816;
  --border:    rgba(232, 228, 221, 0.08);
  --border-hi: rgba(232, 228, 221, 0.16);
  --text1:     #e8e4dd;
  --text2:     #b0aba2;
  --text3:     #837f78;
  --text4:     #5d5953;

  min-height: 100vh;
  background: var(--bg);
  color: var(--text1);
  font-family: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";

  --max: 1180px;
  --pad: max(24px, 4vw);
}

.platform ::selection { background: rgba(232, 228, 221, 0.22); color: var(--bg); }

/* ── page container ── */
.platform .page {
  max-width: var(--max);
  /* 24px bottom matches .thesis-column so the spine ::before can extend
   * past the last section and terminate at the ticker top edge. */
  padding: 28px var(--pad) 24px;
  margin: 0 auto;
}

/* ── monolith hero (compact 60% of lander) ── */
.platform .monolith-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border-bottom: 0;
  padding: 8px 0 56px;
}
.platform .monolith-link:hover { border-bottom: 0; }

.platform .monolith-glyph {
  display: flex;
  align-items: flex-end;
  gap: 16px;
}
.platform .monolith-mark {
  height: 72px;
  width: 72px;
  display: block;
}
.platform .monolith-wordmark {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(38px, 5.4vw, 58px);
  letter-spacing: -0.01em;
  color: var(--text1);
  line-height: 0.85;
  text-transform: lowercase;
}
.platform .monolith-wordmark .g {
  display: inline-block;
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  .platform .monolith-wordmark .g { transform: none !important; }
}

@media (max-width: 600px) {
  .platform .monolith-glyph { gap: 10px; }
  .platform .monolith-mark { height: 48px; width: 48px; }
}

/* ── section base ── */
.platform .op-section { margin-top: 88px; }
.platform .op-section-eyebrow {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text2);
  margin-bottom: 10px;
}
.platform .op-section-title {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 1.32rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--text1);
  margin-bottom: 14px;
}
.platform .op-section-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text2);
  max-width: 680px;
  margin-bottom: 24px;
}
.platform .op-section-desc code {
  color: var(--text1);
  font-size: 0.86em;
}

/* ── architecture diagram frame ── */
.platform .op-arch-frame {
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 24px 20px 12px;
  overflow-x: auto;
  max-width: 1080px;
  position: relative;
}
.platform .op-arch-frame svg { display: block; width: 100%; height: auto; min-width: 760px; }
/* Scroll-overflow fade on narrow viewports (SVG min-width: 760px > frame). */
.platform .op-arch-frame::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 48px;
  background: linear-gradient(to right, transparent, var(--panel));
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}
@media (max-width: 820px) {
  .platform .op-arch-frame::after { opacity: 1; }
}

/* ── disclosure rows (prop / comp / integration) ── */
.platform .op-props,
.platform .op-components,
.platform .op-integrations-grid {
  display: block;
  margin-top: 8px;
  max-width: 880px;
}
.platform .op-prop,
.platform .op-comp,
.platform .op-integration {
  display: grid;
  grid-template-columns: 152px 1fr;
  column-gap: 28px;
  padding: 22px 0;
  border: 0;
  background: none;
  transition: opacity 280ms ease-out;
}
.platform .op-prop + .op-prop,
.platform .op-comp + .op-comp,
.platform .op-integration + .op-integration {
  border-top: 1px solid var(--border);
}
/* Icon-less op-props (thesis-style sections): no inter-row divider. */
.platform .op-prop:not(:has(.op-prop-icon)) + .op-prop:not(:has(.op-prop-icon)) {
  border-top: 0;
}

/* Label column. op-comp-name / op-integration-name double as label and claim,
 * so they sit a tier brighter than op-prop-icon. */
.platform .op-prop-icon,
.platform .op-comp-name,
.platform .op-integration-name {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  letter-spacing: 0.04em;
  padding-top: 4px;
  margin-bottom: 0;
  align-self: start;
  transition: color 280ms ease-out;
}
.platform .op-prop-icon {
  font-size: 0.78rem;
  color: var(--text3);
}
/* Icon-less variant: body spans full width, tighter inter-row padding. */
.platform .op-prop:not(:has(.op-prop-icon)) {
  grid-template-columns: 1fr;
  padding: 12px 0;
}
.platform .op-prop:not(:has(.op-prop-icon)) > .op-prop-name,
.platform .op-prop:not(:has(.op-prop-icon)) > .op-prop-desc {
  grid-column: 1;
}
.platform .op-comp-name {
  font-size: 0.78rem;
  color: var(--text2);
  font-weight: 500;
}
.platform .op-integration-name {
  font-size: 0.92rem;
  color: var(--text2);
  font-weight: 500;
}

/* Body column. */
.platform .op-prop-name,
.platform .op-prop-desc,
.platform .op-comp-desc,
.platform .op-integration-desc {
  grid-column: 2;
  font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif;
}
.platform .op-prop-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text1);
  letter-spacing: 0;
  margin-bottom: 6px;
}
.platform .op-prop-desc,
.platform .op-comp-desc,
.platform .op-integration-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text2);
  margin: 0;
}
.platform .op-prop-desc code,
.platform .op-comp-desc code,
.platform .op-integration-desc code {
  color: var(--text1);
  font-size: 0.92em;
}
.platform .op-comp-desc strong {
  color: var(--text1);
  font-weight: 600;
}

/* Sibling-dim on hover. */
.platform .op-props:has(.op-prop:hover) .op-prop:not(:hover),
.platform .op-components:has(.op-comp:hover) .op-comp:not(:hover),
.platform .op-integrations-grid:has(.op-integration:hover) .op-integration:not(:hover) {
  opacity: 0.55;
}
.platform .op-prop:hover .op-prop-icon,
.platform .op-comp:hover .op-comp-name,
.platform .op-integration:hover .op-integration-name {
  color: var(--text1);
}

/* ── bio ── */
.platform .op-bio { margin-top: 88px; }
.platform .op-bio-text {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text2);
  max-width: 760px;
  margin-top: 12px;
}
.platform .op-bio-text strong {
  color: var(--text1);
  font-weight: 500;
}
.platform .op-bio-text a {
  color: var(--text1);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: border-color 0.15s;
}
.platform .op-bio-text a:hover {
  border-bottom-color: var(--text1);
}

.platform .op-bio-contact {
  margin-top: 16px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--text2);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}
.platform .op-bio-contact-label { color: var(--text4); }
.platform .op-bio-contact-sep { color: var(--text4); }
.platform .op-bio-contact a {
  color: var(--text1);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: border-color 0.15s;
}
.platform .op-bio-contact a:hover { border-bottom-color: var(--text1); }
.platform .op-bio-contact code {
  color: var(--text1);
  font-size: 1em;
}

/* ── capabilities domain list ──
 * Column-major two-column flow so each column reads top-to-bottom. */
.platform .op-caps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(12, auto);
  grid-auto-flow: column;
  column-gap: 32px;
  row-gap: 8px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.88rem;
  color: var(--text2);
  max-width: 680px;
}
.platform .op-caps li { padding: 0; }
@media (max-width: 600px) {
  .platform .op-caps {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-flow: row;
  }
}

/* ── tables ── */
.platform .op-table-wrap {
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--panel);
  margin-bottom: 28px;
  max-width: 760px;
}
.platform .op-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.platform .op-table th {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  text-align: left;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(232, 228, 221, 0.02);
}
.platform .op-table td {
  padding: 11px 18px;
  border-bottom: 1px solid rgba(232, 228, 221, 0.025);
  color: var(--text2);
  line-height: 1.5;
}
.platform .op-table tbody tr:last-child td { border-bottom: none; }
.platform .op-table tbody tr:hover { background: rgba(232, 228, 221, 0.025); }
.platform .op-table .num {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.84rem;
  white-space: nowrap;
  text-align: right;
  color: var(--text3);
}
.platform .op-table th.num { text-align: right; }
.platform .op-table .num.accent {
  color: var(--text1);
  font-weight: 500;
}
.platform .op-table td.accent {
  color: var(--text1);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.platform .op-table td code {
  color: var(--text1);
  font-size: 0.92em;
}

/* ── inline mechanism prose (worked example) ── */
.platform .op-mech {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text2);
  max-width: 760px;
  margin-bottom: 14px;
}
.platform .op-mech strong {
  color: var(--text1);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.86rem;
  font-weight: 500;
  margin-right: 4px;
}
.platform .op-mech-label {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  margin: 28px 0 10px;
  max-width: 760px;
}

/* ── prior-art block ── */
.platform .op-priorart {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text3);
  max-width: 760px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.platform .op-priorart a {
  color: var(--text1);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: border-color 0.15s;
}
.platform .op-priorart a:hover {
  border-bottom-color: var(--text1);
}
.platform .op-priorart em {
  color: var(--text3);
  font-style: normal;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-right: 6px;
}

/* ── code block ── */
.platform .op-code {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--text2);
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 14px 16px;
  margin-bottom: 20px;
  max-width: 760px;
  overflow-x: auto;
  white-space: pre;
}

/* ── spine ── */
.platform .op-spine {
  position: relative;
}
.platform .op-spine::before {
  content: '';
  position: absolute;
  left: 0;
  top: 60px;                    /* 56px section padding-top + 4px num padding-top */
  bottom: -60px;                /* overhang terminates at the ticker top edge */
  width: 1px;
  background: var(--border);
  pointer-events: none;
}
.platform .op-spine .op-section {
  display: grid;
  grid-template-columns: 48px 1fr;
  column-gap: 24px;
  padding: 56px 0 0 20px;
  margin-top: 0;
}
.platform .op-spine .op-section > .op-section-num {
  grid-column: 1;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  /* Size matches the eyebrow that opens column 2 so num + eyebrow share
   * one baseline. Letter-spacing stays tight; the eyebrow's 0.18em would
   * make "10" render as "1 0". */
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--text4);
  padding-top: 0;
  user-select: none;
}
.platform .op-spine .op-section > *:not(.op-section-num) {
  grid-column: 2;
  min-width: 0;
}
.platform .op-spine .op-bio {
  padding-bottom: 40px;
}

/* ── live anchor ticker ──
 * Outer is viewport-width; inner is constrained to var(--max) so the
 * pulse dot's x matches the spine's. */
.platform .anchor-ticker {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  background: var(--bg);
  border-top: 1px solid var(--border);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text4);
  overflow: hidden;
  white-space: nowrap;
}
.platform .anchor-ticker[hidden] { display: none; }
.platform .anchor-ticker-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 9px var(--pad);
  display: flex;
  align-items: center;
  gap: 10px;
}
.platform .anchor-ticker .t-pulse {
  width: 6px;
  height: 6px;
  background: var(--text2);
  flex-shrink: 0;
  margin-left: -2.5px;
  animation: anchor-pulse 2.4s ease-in-out infinite;
}
@keyframes anchor-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50%      { opacity: 1;    transform: scale(1.0); }
}
.platform .anchor-ticker .t-sep { color: #322f2a; }
/* State-change flash. --rollover-base lets the shared keyframes decay
 * each element back to its own base color. */
.platform .anchor-ticker .t-when {
  --rollover-base: var(--text2);
  color: var(--rollover-base);
}
.platform .anchor-ticker .t-stamp {
  --rollover-base: var(--text4);
  color: var(--rollover-base);
}
.platform .anchor-ticker .t-stamp.ok {
  --rollover-base: var(--text2);
}
@keyframes t-rollover {
  0%   { color: var(--text1);          }
  100% { color: var(--rollover-base);  }
}
.platform .anchor-ticker .t-rollover {
  animation: t-rollover 700ms ease-out;
}

body.platform {
  padding-bottom: 36px;         /* reserve for the fixed ticker */
  scrollbar-gutter: stable;
}

/* ── responsive ── */
@media (max-width: 720px) {
  .platform .page { padding: 20px var(--pad) 24px; }
  .platform .op-section { margin-top: 64px; }
  .platform .op-table { font-size: 0.78rem; }
  .platform .op-table th, .platform .op-table td { padding: 10px 12px; }

  .platform .op-spine .op-section {
    grid-template-columns: 32px 1fr;
    column-gap: 16px;
    padding: 48px 0 0 12px;
  }
  .platform .op-spine .op-section > .op-section-num {
    font-size: 0.7rem;
  }
  .platform .op-spine::before {
    top: 52px;
  }

  .platform .anchor-ticker { font-size: 10px; }
  .platform .anchor-ticker-inner { gap: 6px; padding: 7px 12px; }
  .platform .anchor-ticker .t-sep { display: none; }

  .platform .op-prop,
  .platform .op-comp,
  .platform .op-integration {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 6px;
  }
  .platform .op-prop-name,
  .platform .op-prop-desc,
  .platform .op-comp-desc,
  .platform .op-integration-desc {
    grid-column: 1;
  }
}
