/* ==========================================================================
   david-sanker.com — /enterprise-genesis/
   --------------------------------------------------------------------------
   The long-form page. Loaded in addition to main.css, which supplies the
   tokens, typography, footer and the .cta component.

   Two rules this page depends on:

   1. The system map is HTML and CSS, never an image. It has to stay
      selectable, translatable, searchable and legible at 390px, and a raster
      diagram is none of those things.
   2. Present and future are different colours, not different wording only.
      A blue eyebrow means it exists; a muted eyebrow plus a dashed rule means
      it does not. `data-status="future"` drives both. Never style a future
      layer the same as a shipped one.
   ========================================================================== */

/* ---------- Shell ---------- */

.genesis-hero {
  padding-top: clamp(2.5rem, 7vh, 5rem);
  padding-bottom: clamp(3.5rem, 9vh, 6.5rem);
  max-width: 58rem;
}

.genesis-eyebrow { color: var(--signal); margin-bottom: 1.5rem; }

.genesis-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 5.25rem);
  font-weight: 600;
  font-stretch: 108%;
  line-height: 0.98;
  letter-spacing: -0.025em;
}

.genesis-subtitle {
  margin-top: clamp(1.25rem, 3vw, 1.9rem);
  max-width: 34ch;
  font-size: clamp(1.2rem, 2.6vw, 1.7rem);
  font-weight: 300;
  line-height: 1.32;
  color: var(--ink-soft);
  text-wrap: balance;
}

.genesis-intro {
  margin-top: clamp(2.25rem, 5vw, 3.25rem);
  max-width: var(--measure);
  border-top: 1px solid var(--ink);
  padding-top: clamp(1.5rem, 3vw, 2rem);
}
.genesis-intro p { font-size: var(--fs-lead); line-height: 1.55; }
.genesis-intro p + p { margin-top: 0.9rem; }

.genesis-band {
  padding-block: clamp(3.25rem, 8vh, 6rem);
  border-top: 1px solid var(--rule);
}

.genesis-head { max-width: 42rem; }
.genesis-head .label { color: var(--signal); display: block; margin-bottom: 1rem; }

/* Future architecture never borrows the colour that means "this exists". */
.genesis-band[data-status='future'] .genesis-head .label { color: var(--muted); }

.genesis-head h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 600;
  font-stretch: 105%;
  line-height: 1.08;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.genesis-lead {
  margin-top: 1.1rem;
  max-width: var(--measure);
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ---------- Body copy ---------- */

.genesis-prose {
  margin-top: clamp(1.6rem, 4vw, 2.4rem);
  max-width: var(--measure);
}
.genesis-prose > p { line-height: 1.68; }
.genesis-prose > p + p { margin-top: 0.95rem; }

.genesis-definition {
  font-size: var(--fs-lead);
  line-height: 1.52;
  border-left: 2px solid var(--ink);
  padding-left: clamp(1rem, 2.5vw, 1.5rem);
}

/* The two questions Enterprise Genesis starts from. Set as display type because
   they are the pivot of the whole section, not a bullet list. */
.genesis-questions {
  margin-top: clamp(1.5rem, 3.5vw, 2.25rem);
  list-style: none;
}
.genesis-questions li {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  font-weight: 600;
  font-stretch: 104%;
  line-height: 1.2;
  letter-spacing: -0.012em;
}
.genesis-questions li + li { margin-top: 0.55rem; color: var(--ink-soft); }

/* A paragraph that follows a set-apart element (the definition, the questions,
   the pull quote) rather than another paragraph, so it needs its own top space:
   the .genesis-prose > p + p rule does not reach it. */
.genesis-after {
  margin-top: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1.68;
}
.genesis-after + .genesis-after { margin-top: 0.95rem; }

.genesis-list {
  margin-top: clamp(1.4rem, 3vw, 2rem);
  list-style: none;
}
.genesis-list li {
  position: relative;
  padding-left: 1.4rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.genesis-list li + li { margin-top: 0.5rem; }
.genesis-list li::before { content: '—'; position: absolute; left: 0; color: var(--muted); }

@media (min-width: 40rem) {
  .genesis-list-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem;
  }
  .genesis-list-two li + li { margin-top: 0; }
  .genesis-list-two li { margin-top: 0.5rem; }
}

/* The concrete near-term problem the Gateway answers. */
.genesis-pull {
  margin-top: clamp(1.5rem, 3.5vw, 2.25rem);
  padding-left: clamp(1rem, 2.5vw, 1.5rem);
  border-left: 2px solid var(--signal);
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--ink);
}

/* Honesty markers: what this is NOT, what does NOT exist yet, what is NOT a
   certification. Quieter than the body, never hidden, never in fine print so
   small it reads as a disclaimer nobody is meant to notice. */
.genesis-note {
  margin-top: clamp(1.5rem, 3.5vw, 2.25rem);
  padding-left: clamp(1rem, 2.5vw, 1.5rem);
  border-left: 1px dashed var(--rule);
  font-size: 0.97rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- System map ---------- */

.map {
  --map-pad: clamp(1.15rem, 3vw, 1.85rem);
  --map-dot: 0.6875rem;
  --map-col: 1rem;
  list-style: none;
  counter-reset: stage;
  margin-top: clamp(2rem, 5vw, 3rem);
}

.map-stage {
  position: relative;
  display: grid;
  grid-template-columns: var(--map-col) minmax(0, 1fr);
  column-gap: clamp(1rem, 2.5vw, 1.6rem);
  padding-block: var(--map-pad);
  counter-increment: stage;
}

/* The spine is drawn per stage rather than once on the list, so its first and
   last segments can be trimmed to the outer dots instead of overshooting. */
.map-stage::before {
  content: '';
  position: absolute;
  left: calc(var(--map-col) / 2);
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--rule);
  transform: translateX(-0.5px);
}
.map-stage:first-child::before {
  top: calc(var(--map-pad) + 0.5rem + var(--map-dot) / 2);
}
.map-stage:last-child::before {
  bottom: calc(100% - var(--map-pad) - 0.5rem - var(--map-dot) / 2);
}

.map-marker {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  justify-self: center;
  margin-top: 0.5rem;
  width: var(--map-dot);
  height: var(--map-dot);
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  position: relative;
  z-index: 1;
}

.map-head { grid-column: 2; grid-row: 1; }
.map-body { grid-column: 2; grid-row: 2; margin-top: 0.5rem; line-height: 1.6; color: var(--ink-soft); }

.map-role {
  font-family: var(--font-mono);
  font-size: var(--fs-mono-sm);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 0.4rem;
}
.map-role::before {
  content: counter(stage, decimal-leading-zero);
  margin-right: 0.9em;
  color: var(--muted);
}

.map-name {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 600;
  font-stretch: 102%;
  line-height: 1.2;
}

.map-flag {
  margin-top: 0.45rem;
  font-family: var(--font-mono);
  font-size: var(--fs-mono-sm);
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* Not in operation: dashed spine, hollow dot, muted role. Visible at a glance
   without reading a word of it. */
.map-stage[data-status='future']::before {
  width: 0;
  background: none;
  border-left: 1px dashed var(--muted);
}
.map-stage[data-status='future'] .map-marker { border-style: dashed; border-color: var(--muted); }
.map-stage[data-status='future'] .map-role { color: var(--muted); }
.map-stage[data-status='future'] .map-name { color: var(--ink-soft); }

/* Staged rather than stacked once there is room for it. */
@media (min-width: 52rem) {
  .map-stage {
    grid-template-columns: var(--map-col) minmax(0, 16rem) minmax(0, 1fr);
    column-gap: clamp(1.5rem, 3vw, 2.75rem);
  }
  .map-body { grid-column: 3; grid-row: 1; margin-top: 0; }
}

/* ---------- The four functions ---------- */
/* Hairlines, not cards. Nothing here is boxed. */

.fns {
  margin-top: clamp(2rem, 5vw, 3rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.fn {
  padding-block: clamp(1.5rem, 3.5vw, 2.25rem);
  border-top: 1px solid var(--rule);
}

.fn-role {
  font-family: var(--font-mono);
  font-size: var(--fs-mono-sm);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 0.5rem;
}

.fn-name {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.6vw, 1.6rem);
  font-weight: 600;
  font-stretch: 103%;
  line-height: 1.15;
  margin-bottom: 0.7rem;
}
.fn-name a { color: inherit; text-decoration-color: var(--rule); }
.fn-name a:hover { color: var(--signal); opacity: 1; }

.fn-body { line-height: 1.6; color: var(--ink-soft); max-width: 40ch; }

@media (min-width: 46rem) {
  .fns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(2rem, 5vw, 4rem);
  }
}

/* ---------- Maturity ladder ---------- */

.ladder {
  margin-top: clamp(1.5rem, 3.5vw, 2.25rem);
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.9rem;
}

.ladder li {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.ladder li:not(:last-child)::after { content: '\2192'; color: var(--muted); }
.ladder li:last-child { color: var(--ink); }

/* ---------- Closing ---------- */

.genesis-close {
  padding-block: clamp(4rem, 11vh, 7.5rem);
  border-top: 1px solid var(--ink);
}

.genesis-closing {
  max-width: 30ch;
  font-size: clamp(1.5rem, 4.2vw, 2.6rem);
  font-weight: 300;
  line-height: 1.22;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.genesis-closing span { display: block; }
.genesis-closing span:first-child { color: var(--ink-soft); }

.genesis-motto {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  font-style: italic;
  font-weight: 300;
  color: var(--muted);
  max-width: var(--measure);
}
