/* dynamicruntime.com: one stylesheet for every page. Colors come from the Gedra mark (kd2/branding). */

:root {
  --purple: #7F77DD;
  --purple-deep: #5B53B8;
  --teal: #1D9E75;
  --coral: #D85A30;

  --bg: #FAF9F5;
  --bg-alt: #F1EFE8;
  --surface: #FFFFFF;
  --ink: #1F1D2B;
  --ink-soft: #55526A;
  --line: #E2DFD5;
  --accent: var(--purple-deep);
  --accent-ink: #FFFFFF;
  --shadow: 0 1px 2px rgba(31, 29, 43, .06), 0 8px 24px rgba(31, 29, 43, .06);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --measure: 68ch;
  --page: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15141C;
    --bg-alt: #1C1B25;
    --surface: #23222E;
    --ink: #EEEDF3;
    --ink-soft: #ABA8BD;
    --line: #34323F;
    --accent: #9D96EC;
    --accent-ink: #15141C;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: var(--measure); }
.prose h2 { margin-top: 1.6em; }
.prose li { margin-bottom: .4em; }

.eyebrow {
  font: 600 .8rem/1.2 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1rem;
}
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 60ch; }

/* Header */

.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.brand img { width: 36px; height: 36px; }
.brand-name { font: 600 1.45rem/1 var(--serif); }
.brand-by { font-size: .78rem; color: var(--ink-soft); display: block; margin-top: 3px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-size: .95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px var(--teal); }

/* Buttons */

.button {
  display: inline-block;
  padding: .7em 1.25em;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--accent);
}
.button:hover { filter: brightness(1.08); }
.button.secondary { background: transparent; color: var(--accent); }
.site-nav .button { color: var(--accent-ink); padding: .45em 1em; font-size: .9rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.75rem; }

/* Sections */

section { padding: clamp(48px, 8vw, 96px) 0; }
section.alt { background: var(--bg-alt); }
.section-head { max-width: 62ch; margin-bottom: 2.5rem; }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; }

.hero { padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(32px, 5vw, 64px); }
.hero-figure { margin-top: clamp(32px, 5vw, 56px); }
.page-hero { padding-bottom: clamp(24px, 4vw, 40px); }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card .kicker { font-size: .85rem; color: var(--ink-soft); margin-bottom: .4em; }

.pillar { border-top: 4px solid var(--purple); }
.pillar:nth-child(2) { border-top-color: var(--teal); }
.pillar:nth-child(3) { border-top-color: var(--coral); }
.pillar:nth-child(4) { border-top-color: var(--ink-soft); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.chips li {
  padding: .45em 1em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: .95rem;
}

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 3.25rem; margin-bottom: 1.75rem; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: .1em;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font: 600 1rem/2.1rem var(--sans);
  text-align: center;
}
.steps h3 { margin-bottom: .25em; }

.band { text-align: center; }
.band blockquote {
  font: 500 clamp(1.3rem, 3vw, 1.8rem)/1.35 var(--serif);
  max-width: 34ch;
  margin: 0 auto 1rem;
  text-wrap: balance;
}
.band cite { color: var(--ink-soft); font-style: normal; }

table { border-collapse: collapse; width: 100%; margin: 1rem 0 1.5rem; font-size: .97rem; }
th, td { text-align: left; padding: .7em .8em; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; }
.table-scroll { overflow-x: auto; }

code { font-family: var(--mono); font-size: .9em; background: var(--bg-alt); padding: .1em .35em; border-radius: 5px; }

.callout {
  border-left: 4px solid var(--coral);
  background: var(--surface);
  padding: 18px 22px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}

.cta-final { text-align: center; }
.cta-final .lede { margin: 0 auto; }
.cta-final .actions { justify-content: center; }

/* The hero illustration takes its colors from the page, so it follows light and dark. */
.illus .card-bg { fill: var(--surface); stroke: var(--line); }
.illus .soft { fill: var(--bg-alt); }
.illus .line { stroke: var(--line); }
.illus .ink { fill: var(--ink); }
.illus .ink-soft { fill: var(--ink-soft); }
.illus .flow { stroke: var(--ink-soft); }
.illus text { font-family: var(--sans); }

/* Footer */

.site-footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--ink-soft); font-size: .92rem; }
.site-footer .wrap { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.site-footer h4 { font: 600 .8rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin: 0 0 .75em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45em; }
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--ink); }
.illus .flow-head { fill: var(--ink-soft); }
.illus .ring { fill: none; stroke: var(--coral); }

/* Four cards: one row, two rows of two, or a column; never three and an orphan. */
.grid.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid.four { grid-template-columns: 1fr; } }

/* On a phone the hero illustration keeps a readable size and scrolls sideways within its own frame; the next
   card peeking in from the edge shows that it does. */
@media (max-width: 640px) {
  .hero-figure {
    overflow-x: auto;
    margin-left: calc(-1 * var(--gutter));
    margin-right: calc(-1 * var(--gutter));
    padding: 0 var(--gutter) 8px;
  }
  .hero-figure svg { width: 820px; max-width: none; }
  .site-nav { gap: 6px 16px; }
  .site-nav a { font-size: .9rem; }
}
