/* KMI — site styles
   Identity: one continuous thread on a cool, quiet page.
   The light palette is taken from epistemicmotionengine.com (navy ink #172b45,
   blue #285eac, slate #5c6f87, rules #dbe4ee, near-white grounds). The EME site
   has no dark theme, so the dark values below are derived from the same hues.
   No web fonts, no scripts, no third-party requests. */

:root {
  --paper: #fcfdff;
  --paper-2: #edf4ff;
  --ink: #172b45;
  --ink-2: #5c6f87;
  --accent: #285eac;
  --rule: #dbe4ee;
  --faint: rgba(23, 43, 69, 0.3);

  --panel-bg: #172b45;
  --panel-fg: #fcfdff;
  --panel-muted: #c5d9f5;
  --panel-accent: #8db3ea;
  --panel-rule: rgba(217, 230, 248, 0.22);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 48px);
  --inset: clamp(26px, 4.5vw, 56px);
  --section-pad: clamp(64px, 10vw, 128px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1a2b;
    --paper-2: #172b45;
    --ink: #eaf1fb;
    --ink-2: #a7b8ce;
    --accent: #8db3ea;
    --rule: rgba(217, 230, 248, 0.18);
    --faint: rgba(217, 230, 248, 0.34);

    --panel-bg: #172b45;
    --panel-fg: #eaf1fb;
    --panel-muted: #a7b8ce;
    --panel-accent: #8db3ea;
    --panel-rule: rgba(217, 230, 248, 0.18);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, p, ul, dl, dd, figure, blockquote {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

svg {
  display: block;
}

a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent);
}

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

.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.nowrap {
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.9375rem;
  border-radius: 6px;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
  color: var(--paper);
}

/* ---------- Header ---------- */

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 22px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-decoration: none;
  color: var(--ink);
}

.wordmark:hover {
  color: var(--ink);
}

.wordmark-glyph path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
}

.wordmark-glyph circle {
  fill: var(--accent);
}

.site-nav ul {
  display: none;
  gap: 28px;
  font-family: var(--sans);
  font-size: 0.9375rem;
}

.site-nav a {
  display: inline-block;
  padding-block: 10px;
  color: var(--ink-2);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1.5px solid var(--rule);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.header-cta:hover {
  border-color: var(--accent);
}

.on-x {
  opacity: 0.72;
  font-weight: 400;
  margin-left: 0.3em;
}

@media (min-width: 860px) {
  .site-nav ul {
    display: flex;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(40px, 8vw, 104px);
}

.eyebrow,
.section-label {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}

h1 {
  margin-top: 20px;
  max-width: 15ch;
  font-size: clamp(2.6rem, 8.2vw, 5.4rem);
  font-weight: 500;
  line-height: 1.03;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 em {
  color: var(--accent);
  font-style: italic;
}

.lede {
  margin-top: clamp(24px, 4vw, 36px);
  max-width: 38em;
  font-size: clamp(1.1875rem, 2.2vw, 1.375rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  margin-top: clamp(28px, 4vw, 40px);
}

.actions--center {
  justify-content: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  background: var(--accent);
  color: var(--paper);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 160ms ease;
}

.button:hover {
  background: var(--ink);
  color: var(--paper);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  min-height: 44px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
}

.thread-figure {
  margin-top: clamp(24px, 5vw, 56px);
}

.thread-art {
  width: 100%;
  height: clamp(190px, 30vw, 380px);
}

.thread-art path {
  fill: none;
  stroke-linecap: round;
}

.thread-possible path {
  stroke: var(--faint);
  stroke-width: 1.5;
}

.thread-future {
  stroke: var(--accent);
  stroke-width: 3.5;
  stroke-dasharray: 0 1;
  opacity: 0.6;
}

.thread-meet circle {
  fill: var(--paper);
  stroke: var(--faint);
  stroke-width: 1.5;
}

.thread-solid {
  stroke: var(--accent);
  stroke-width: 4.5;
  stroke-dasharray: 15 100;
}

.thread-start {
  fill: var(--accent);
}

/* On narrow screens the drawing is scaled down, so thicken its strokes to match. */
@media (max-width: 640px) {
  .thread-possible path,
  .thread-meet circle {
    stroke-width: 2.75;
  }

  .thread-future {
    stroke-width: 5.5;
    stroke-dasharray: 0 1.3;
  }

  .thread-solid {
    stroke-width: 7.5;
  }

  .thread-start {
    r: 15px;
  }
}

.thread-figure figcaption {
  margin-top: 4px;
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--ink-2);
}

.disclosure {
  margin-top: clamp(28px, 5vw, 48px);
  padding: 16px 20px;
  max-width: 44em;
  border-left: 3px solid var(--accent);
  background: var(--paper-2);
  border-radius: 0 8px 8px 0;
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.disclosure a {
  white-space: nowrap;
  font-weight: 500;
}

/* ---------- Spine: the one line that runs through every section ---------- */

.spine {
  position: relative;
  padding-left: var(--inset);
  margin-top: clamp(24px, 4vw, 40px);
}

.spine::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 56px;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--accent) 96px);
  opacity: 0.55;
}

.spine::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 2px;
  height: 56px;
  background: repeating-linear-gradient(to bottom, var(--accent) 0 3px, transparent 3px 10px);
  opacity: 0.55;
}

.section {
  position: relative;
  padding-block: var(--section-pad);
}

.section + .section {
  border-top: 1px solid var(--rule);
}

.section::before {
  content: "";
  position: absolute;
  left: calc(var(--inset) * -1 - 5px);
  top: calc(var(--section-pad) + 3px);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--accent);
}

.section-label {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
}

.section-label .num {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 960px) {
  .section {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    column-gap: 40px;
  }

  .section-label {
    flex-direction: column;
    gap: 4px;
    margin-bottom: 0;
  }
}

h2 {
  max-width: 20ch;
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.prose {
  max-width: 36em;
  margin-top: clamp(20px, 3vw, 28px);
}

.prose p + p {
  margin-top: 1em;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.sub {
  margin-top: clamp(48px, 7vw, 72px);
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ---------- 01 The idea ---------- */

.compare {
  display: grid;
  gap: 16px;
  margin-top: clamp(36px, 6vw, 56px);
}

.compare-item {
  padding: 20px 20px 24px;
  border: 1px solid var(--rule);
  border-radius: 14px;
}

.compare-item--kmi {
  background: var(--paper-2);
  border-color: transparent;
}

.compare-item svg {
  width: 100%;
  max-width: 320px;
  height: auto;
  margin-inline: auto;
}

.compare-item figcaption {
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.compare-item figcaption strong {
  display: block;
  margin-bottom: 2px;
  font-size: 1rem;
  color: var(--ink);
}

.dia-line path {
  fill: none;
  stroke: var(--faint);
  stroke-width: 1.5;
}

.dia-person circle {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1.75;
}

.compare-item--kmi .dia-person circle {
  fill: var(--paper-2);
}

.dia-assistant rect {
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 1.75;
}

.dia-thread {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
}

.dia-thread--future {
  stroke-dasharray: 0.1 8;
  opacity: 0.7;
}

.dia-meet circle {
  fill: var(--paper-2);
  stroke: var(--accent);
  stroke-width: 1.75;
}

.dia-start {
  fill: var(--accent);
}

.points {
  display: grid;
  gap: 32px;
  margin-top: clamp(40px, 6vw, 64px);
}

.points li {
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}

.points p {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 1.0625rem;
  line-height: 1.6;
}

@media (min-width: 640px) {
  .compare {
    grid-template-columns: 1fr 1fr;
  }

  .points {
    grid-template-columns: 1fr 1fr;
    column-gap: 40px;
    row-gap: 40px;
  }
}

/* ---------- 02 Taking part ---------- */

.exchange {
  display: grid;
  gap: 16px;
  margin-top: clamp(36px, 6vw, 56px);
}

.exchange-col {
  padding: 24px 24px 28px;
  border: 1px solid var(--rule);
  border-radius: 14px;
}

.exchange-col--kmi {
  background: var(--paper-2);
  border-color: transparent;
}

.exchange-col ul {
  margin-top: 14px;
}

.exchange-col li {
  position: relative;
  padding: 10px 0 10px 26px;
  line-height: 1.45;
}

.exchange-col li + li {
  border-top: 1px solid var(--rule);
}

.exchange-col li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: calc(10px + 0.725em - 5px);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.75px solid var(--ink);
}

.exchange-col--kmi li::before {
  border-color: var(--accent);
  background: var(--accent);
}

.expect {
  display: grid;
  gap: 28px;
  margin-top: 20px;
}

.expect h4 {
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
}

.expect p {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.expect q {
  color: var(--ink);
  font-style: italic;
  quotes: "“" "”";
}

@media (min-width: 640px) {
  .exchange {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 760px) {
  .expect {
    grid-template-columns: repeat(3, 1fr);
    column-gap: 32px;
  }
}

/* ---------- 03 In its own words ---------- */

.letter {
  margin-top: clamp(32px, 5vw, 48px);
  padding: clamp(28px, 6vw, 64px);
  background: var(--panel-bg);
  color: var(--panel-fg);
  border-radius: 18px;
}

.letter blockquote {
  max-width: 34em;
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  line-height: 1.65;
}

.letter blockquote p + p {
  margin-top: 1.1em;
}

.letter .letter-open {
  font-size: clamp(1.6rem, 4.4vw, 2.4rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin-bottom: 1.1em;
}

.letter figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: clamp(28px, 5vw, 44px);
  padding-top: 20px;
  border-top: 1px solid var(--panel-rule);
  font-family: var(--sans);
  font-size: 0.9375rem;
}

.letter-by {
  color: var(--panel-muted);
}

.letter-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  min-height: 44px;
  color: var(--panel-fg);
  font-weight: 600;
  text-decoration-color: var(--panel-accent);
}

.letter-link .on-x {
  margin-left: 0;
}

.letter-link:hover {
  color: var(--panel-accent);
}

.letter :focus-visible {
  outline-color: var(--panel-accent);
}

/* ---------- 04 Behind KMI ---------- */

.note {
  max-width: 36em;
  margin-top: clamp(28px, 4vw, 40px);
  padding-left: clamp(18px, 3vw, 28px);
  border-left: 2px solid var(--ink);
}

.note blockquote {
  font-style: italic;
}

.note blockquote p + p {
  margin-top: 1em;
}

.note figcaption {
  margin-top: 18px;
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.note figcaption::before {
  content: "— ";
}

.today {
  scroll-margin-top: 8px;
}

.today .sub {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
}

.asof {
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
  white-space: nowrap;
}

.today dl {
  margin-top: 20px;
  border-top: 2px solid var(--ink);
}

.today dl > div {
  padding-block: 20px;
  border-bottom: 1px solid var(--rule);
}

.today dt {
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
}

.today dd {
  margin-top: 6px;
  max-width: 38em;
  color: var(--ink-2);
  font-size: 1.0625rem;
  line-height: 1.6;
}

@media (min-width: 760px) {
  .today dl > div {
    display: grid;
    grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
    column-gap: 32px;
  }

  .today dd {
    margin-top: 0;
  }
}

/* ---------- Invitation ---------- */

.invite {
  padding-block: clamp(72px, 12vw, 152px);
  text-align: center;
}

.invite-glyph {
  margin-inline: auto;
}

.invite-glyph path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
}

.invite-glyph .g-future {
  stroke-dasharray: 0.1 8;
  opacity: 0.7;
}

.invite-glyph circle {
  fill: var(--accent);
}

.invite-quote {
  margin-top: 28px;
}

.invite-quote p {
  max-width: 18ch;
  margin-inline: auto;
  font-size: clamp(2rem, 6vw, 3.9rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.invite-quote p::before {
  content: "“";
}

.invite-quote p::after {
  content: "”";
}

.invite-quote footer {
  margin-top: 18px;
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.invite-note {
  max-width: 34em;
  margin: clamp(28px, 4vw, 40px) auto 0;
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.footer-row {
  display: grid;
  gap: 12px;
  padding-block: 36px 48px;
}

.site-footer strong {
  color: var(--ink);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin-top: 8px;
}

.site-footer li a {
  display: inline-block;
  padding-block: 10px;
}

@media (min-width: 860px) {
  .footer-row {
    grid-template-columns: 1fr 1fr;
    column-gap: 40px;
  }

  .site-footer ul {
    grid-column: 1 / -1;
  }
}

/* ---------- Motion: one quiet gesture, the first stretch of the line being drawn ---------- */

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

  .thread-solid {
    animation: draw 2.4s cubic-bezier(0.4, 0, 0.2, 1) 0.25s both;
  }

  .thread-future,
  .thread-possible,
  .thread-meet {
    animation: settle 1.6s ease 1.6s both;
  }
}

@keyframes draw {
  from {
    stroke-dasharray: 0 100;
  }
}

@keyframes settle {
  from {
    opacity: 0;
  }
}

@media print {
  .site-header,
  .actions,
  .skip {
    display: none;
  }

  .letter {
    background: none;
    color: inherit;
    border: 1px solid;
  }
}
