/* LP2 timeline, architecture and mode split, moved with their approved copy. */
.section-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.section-side {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
}

.side-num {
  font-family: var(--mono);
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.side-cap {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-top: 12px;
}

.section-side h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-top: 14px;
}

.side-sum {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ---------- 01 how it works: vertical timeline ---------- */

.timeline {
  list-style: none;
  position: relative;
  display: grid;
  gap: 34px;
}

/* The spine is centred on the 40px node, so it starts at 20px minus half its width. */
.timeline::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--hairline);
}

.tl-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 48px;
  gap: 24px;
  align-items: start;
}

.tl-dot {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: var(--ground);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.tl-text {
  padding-top: 6px;
}

.tl-text h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.tl-text p {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.75;
}

.tl-glyph {
  width: 48px;
  height: 48px;
}

/* ---------- 02 architecture: stack diagram + definition rows ---------- */

.stack {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
  margin-top: 28px;
}

.stack text {
  font-family: var(--font);
}

/* No `opacity` on any slab text: a faded numeral or label is exactly the contrast the
   LP1 review measured below 4.5:1. The colours themselves carry the hierarchy, and the
   sizes are set for the 200px-wide rendering this column gives the diagram. */
.stack-num {
  font-family: var(--mono);
  font-size: 22px;
  fill: var(--text);
}

.stack-num--dark {
  fill: #0b1220;
}

.stack-name {
  font-size: 24px;
  font-weight: 700;
  fill: var(--text);
}

.stack-name--dark {
  fill: #0b1220;
}

.deflist {
  list-style: none;
  display: grid;
}

.def-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 28px 0;
  border-top: 1px solid var(--hairline);
}

.def-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.def-row:last-child {
  padding-bottom: 0;
}

.def-num {
  font-family: var(--mono);
  font-size: 1.9rem;
  line-height: 1.05;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.def-row h3 {
  font-size: 1.12rem;
  font-weight: 700;
}

.def-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 8px 0 10px;
}

.def-desc {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.75;
}


.section-modes {
  padding-bottom: 0;
}

.modes-title {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  max-width: 22em;
}

/* A direct child of the full-width <section>, so 100% already IS the viewport. */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.split-half {
  padding: clamp(40px, 5vw, 72px);
  display: flex;
}

.split-half-a {
  background: var(--surface);
}

.split-half-b {
  background: var(--surface-2);
  border-left: 1px solid var(--hairline);
}

/* The two column texts hug the divider so a 1900px screen reads as one composition
   rather than two paragraphs stretched to the far edges. */
.split-inner {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.split-half-a .split-inner {
  margin-left: auto;
}

.split-half-b .split-inner {
  margin-right: auto;
}

.mock {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  margin-bottom: 26px;
  border-radius: 10px;
}

.split-inner h3 {
  font-size: 1.35rem;
  font-weight: 800;
}

.mode-aud {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-top: 8px;
}

.mode-desc {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

.ticks {
  list-style: none;
  display: grid;
  gap: 10px;
  margin: 20px 0 26px;
}

.ticks li {
  position: relative;
  padding-left: 24px;
  color: var(--muted);
  font-size: 0.92rem;
}

/* A check drawn from two borders — no icon font, no emoji, no extra request. */
.ticks li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.42em;
  width: 5px;
  height: 10px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
}


.chapters-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; align-items: start; }
.chapters-list { min-width: 0; }
.chapter { padding: 48px 0; border-top: 1px solid var(--hairline); }
.chapter:first-child { border-top: 0; }
.chapter-number { font-size: 2.25rem; color: var(--accent); margin-bottom: 20px; }
.chapter h3 { font-size: clamp(1.4rem, 2vw, 1.8rem); }
.chapter-desc { margin-top: 20px; }
.chapter .ticks { margin-bottom: 0; }
.chapter-mobile { margin-bottom: 32px; }
.chapter-mobile .stage, .chapter-mobile .screen-image, .chapter-mobile .focus { transition: none; }
.chapter-mobile .cursor, .chapter-mobile .ripple { display: none; }
.chapter-sticky { display: none; position: sticky; top: calc(var(--header-h) + 32px); margin-top: 48px; }
/* If enhancement fails, every chapter still has its own shipped static image. */
@media (min-width: 900px) {
  [data-chapters-ready] .chapters-layout { grid-template-columns: minmax(0, 44fr) minmax(0, 56fr); }
  [data-chapters-ready] .chapter-mobile { display: none; }
  [data-chapters-ready] .chapter-sticky { display: block; }
  [data-chapters-ready] .chapter { min-height: 70vh; display: flex; align-items: center; color: var(--muted); }
  [data-chapters-ready] .chapter-number { color: var(--muted); }
  [data-chapters-ready] .chapter.is-current { color: var(--text); }
  [data-chapters-ready] .chapter.is-current .chapter-number { color: var(--accent); }
  [data-chapters-ready] .chapter.is-current .ticks li { color: var(--text); }
}
.compare-wrap { margin-top: 40px; max-width: 1080px; }
.compare { --pos: 50%; }
.compare-viewport { position: relative; touch-action: pan-y; user-select: none; }
.compare-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.compare-desktop { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-label { position: absolute; top: 14px; padding: 4px 10px; color: var(--text); background: var(--ground); border: 1px solid var(--hairline-strong); border-radius: var(--radius-pill); font-size: .8rem; pointer-events: none; }
.compare-label-desktop { left: 14px; }
.compare-label-classic { right: 14px; }
/* The divider spans the viewport so translation uses its full width, with no layout reads per frame. */
.compare-divider { position: absolute; inset: 0; transform: translateX(var(--pos)); pointer-events: none; }
.compare-divider::before { content: ''; position: absolute; inset: 0 auto 0 -1px; width: 2px; background: var(--accent); }
.compare-handle { position: absolute; left: 0; top: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: var(--ground); border: 2px solid var(--accent); border-radius: 50%; color: var(--accent-bright); cursor: ew-resize; touch-action: none; pointer-events: auto; }
.compare:not([data-ready]) .compare-handle { display: none; }
@media (prefers-reduced-motion: no-preference) {
  html[data-reveal] .timeline::before { transform: scaleY(0); transform-origin: top; transition: transform 900ms; }
  html[data-reveal] .timeline.is-visible::before { transform: scaleY(1); }
  html[data-reveal] .timeline.is-visible .tl-item { animation: platform-step 600ms both; }
  .tl-item:nth-child(2) { animation-delay: 120ms; }
  .tl-item:nth-child(3) { animation-delay: 240ms; }
  .tl-item:nth-child(4) { animation-delay: 360ms; }
}
@keyframes platform-step { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 899.98px) {
  .section-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .section-side { position: static; }
  .side-num { font-size: 32px; }
  .stack { max-width: 280px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split-half-b { border-left: 0; border-top: 1px solid var(--hairline); }
  .split-half-a .split-inner, .split-half-b .split-inner { margin: 0; max-width: none; }
  .chapter-copy { max-width: 680px; }
}

/* HP4: the two added chapters keep their own compact, static illustrations. */
.platform-growth { border-top: 1px solid var(--hairline); }
.platform-growth .section-body > p { color: var(--muted); }
.platform-growth .text-link { margin-top: 24px; }
.growth-illustration { margin: 28px 0; padding: 24px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px; }
.growth-illustration figcaption { text-align: right; color: var(--muted); font-size: .75rem; }
.growth-hub { width: fit-content; margin: 4px auto 24px; padding: 8px 28px; border: 1px solid var(--accent); border-radius: 6px; }
.growth-hosts, .growth-projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-top: 24px; border-top: 1px solid var(--hairline-strong); }
.growth-hosts > span, .growth-projects > span { padding: 16px 8px; border: 1px solid var(--hairline-strong); border-radius: 6px; text-align: center; font-size: .85rem; background: var(--ground); }
.growth-projects > span { border-color: var(--accent); }
.host-apps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--hairline); }
.host-apps article { padding: 24px 20px 24px 0; border-bottom: 1px solid var(--hairline); }
.host-apps p { margin-top: 12px; color: var(--muted); font-size: .92rem; }
@media (max-width: 599.98px) {
  .growth-illustration { padding: 16px; }
  .growth-hosts, .growth-projects { gap: 6px; }
  .growth-projects > span { font-size: .75rem; }
  .host-apps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 599.98px) {
  .tl-item { grid-template-columns: 40px minmax(0, 1fr); gap: 16px; }
  .tl-glyph { display: none; }
  .def-row { grid-template-columns: 40px minmax(0, 1fr); gap: 16px; }
  .def-num { font-size: 1.5rem; }
  .split-half { padding: 40px 16px; }
  .compare-label { top: 8px; font-size: .7rem; }
}
