/* CEV — site styles. Tokens first, then base, layout, sections. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-var.woff2") format("woff2");
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/outfit-latin-var.woff2") format("woff2");
}

@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/dm-mono-latin-400.woff2") format("woff2");
}

/* ---------- Tokens ---------- */

:root {
  color-scheme: light;

  --bg: #F8FAFC;
  --surface: #F1F5F9;
  --text: #0F172A;
  --text-2: #475569;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --on-accent: #FFFFFF;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Outfit", var(--font);
  --font-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --fs-xs: 0.8125rem;  /* 13 */
  --fs-sm: 0.875rem;   /* 14 */
  --fs-base: 1rem;     /* 16 */
  --fs-body: 1.0625rem;/* 17, 18 from 768px */
  --fs-lead: 1.25rem;  /* 20 */
  --fs-h3: 1.375rem;   /* 22 */
  --fs-statement: clamp(1.5rem, 1.15rem + 1.3vw, 2.125rem);
  --fs-h2: clamp(2rem, 1.5rem + 1.6vw, 2.75rem);
  --fs-h1: clamp(2.75rem, 1.5rem + 5vw, 5rem);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* Radii follow the logo: soft bars, rounded-square nodes. */
  --radius-xs: 4px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --measure: 65ch;
  --section-y: clamp(var(--space-8), 10vw, var(--space-10));
  --section-y-tight: clamp(var(--space-8), 7vw, var(--space-9));
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0F172A;
    --surface: #162139;
    --text: #F1F5F9;
    --text-2: #94A3B8;
    --border: #263347;
    --border-strong: #334155;
    --accent: #60A5FA;
    --accent-hover: #93C5FD;
    --on-accent: #0F172A;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0F172A;
  --surface: #162139;
  --text: #F1F5F9;
  --text-2: #94A3B8;
  --border: #263347;
  --border-strong: #334155;
  --accent: #60A5FA;
  --accent-hover: #93C5FD;
  --on-accent: #0F172A;
}

/* Navy blocks (hero, contact). Always use the dark palette; in dark mode
   they sit one step deeper than the page so they still read as blocks. */
.invert {
  color-scheme: dark;
  --bg: #0F172A;
  --surface: #162139;
  --text: #F1F5F9;
  --text-2: #94A3B8;
  --border: #263347;
  --border-strong: #3B4A63;
  --accent: #60A5FA;
  --accent-hover: #93C5FD;
  --on-accent: #0F172A;
  background: var(--bg);
  color: var(--text);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .invert {
    --bg: #070D1C;
    --surface: #111A2E;
  }
}

:root[data-theme="dark"] .invert {
  --bg: #070D1C;
  --surface: #111A2E;
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 768px) {
  :root {
    --fs-body: 1.125rem;
  }
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
  line-height: 1;
  letter-spacing: -0.03em;
}

h2 {
  font-size: var(--fs-h2);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

h3 {
  font-size: var(--fs-h3);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

p,
li {
  text-wrap: pretty;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

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

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

a,
.button,
.theme-toggle {
  transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: var(--space-2) var(--space-4);
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius-sm);
}

main:focus {
  outline: none;
}

.skip-link:focus {
  top: var(--space-3);
  color: var(--bg);
}

/* Small mono label used for metadata: "For example", "Step 1". */
.label {
  display: block;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.01em;
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
  border-top: 1px solid var(--border);
}

/* No rule where a background change already separates sections. */
.section--surface,
.section--surface + .section,
.invert,
.section:has(+ .invert) + .invert {
  border-top: 0;
}

.section--tight {
  padding-block: var(--section-y-tight);
}

.section--surface {
  background: var(--surface);
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5) var(--space-6);
}

@media (min-width: 900px) {
  .grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
}

.text-2 {
  color: var(--text-2);
}

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

.site-header {
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-6);
  padding-block: var(--space-4);
}

.brand {
  display: inline-flex;
  margin-right: auto;
  border-radius: 2px;
}

.brand img {
  width: 83px;
  height: 32px;
}

.logo--dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo--light {
    display: none;
  }
  :root:not([data-theme="light"]) .logo--dark {
    display: block;
  }
}

:root[data-theme="dark"] .logo--light {
  display: none;
}

:root[data-theme="dark"] .logo--dark {
  display: block;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding-block: var(--space-2);
  color: var(--text);
  font-size: var(--fs-base);
  font-weight: 500;
  text-decoration: none;
}

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

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.theme-toggle[hidden] {
  display: none;
}

.theme-toggle:hover {
  border-color: var(--text-2);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: block;
  }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon {
    display: none;
  }
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

/* On small screens the nav drops to its own single row under the logo. */
@media (max-width: 719px) {
  .site-nav {
    order: 3;
    width: 100%;
  }
  .site-nav ul {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: var(--space-4);
  }
  .site-nav a {
    padding-block: 10px;
    font-size: var(--fs-sm);
  }
}

/* ---------- Buttons ---------- */

.button {
  display: inline-block;
  padding: 14px 22px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
}

.button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--on-accent);
}

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

.hero {
  padding-block: clamp(var(--space-7), 6vw, 88px);
}

.hero__grid {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}

.hero h1 {
  max-width: 16ch;
  font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
}

.hero__lead {
  max-width: 46ch;
  margin-top: var(--space-4);
  color: var(--text-2);
  font-size: var(--fs-lead);
  line-height: 1.55;
}

.hero__actions {
  margin-top: var(--space-6);
}

.hero__note {
  margin-top: var(--space-4);
  color: var(--text-2);
  font-size: var(--fs-sm);
}

.hero__figure {
  display: none;
}

@media (min-width: 600px) {
  .hero__figure {
    display: block;
    max-width: 520px;
  }
}

@media (min-width: 1080px) {
  .hero__grid {
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
    gap: var(--space-7);
  }
  .hero__figure {
    justify-self: end;
    width: 100%;
  }
}

/* Hero diagram: scattered files feeding one system. The system panel
   reuses the logo's E: bars with square nodes on a spine. */
.diagram {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  font-family: var(--font-mono);
  font-size: 12px;
}

.diagram text {
  fill: var(--text-2);
}

.d-box {
  fill: var(--surface);
  stroke: var(--border-strong);
}

.d-glyph {
  fill: none;
  stroke: var(--text-2);
  stroke-width: 1;
}

.d-wire {
  fill: none;
  stroke: var(--text-2);
  stroke-opacity: 0.55;
  stroke-width: 1;
}

.d-node {
  fill: var(--accent);
}

.d-panel {
  fill: var(--surface);
  stroke: var(--accent);
}

.diagram .d-panel-title {
  fill: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.d-rule {
  stroke: var(--border-strong);
}

.d-spine {
  stroke: var(--accent);
  stroke-width: 2;
}

.d-bar rect {
  fill: var(--accent);
}

.d-bar .d-bar-node {
  fill: var(--on-accent);
}

.diagram .d-bar text {
  fill: var(--on-accent);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
}

/* ---------- Section titles ---------- */

/* Every section title carries a rounded-square node from the logo's E. */
.section-title::before,
.contact h2::before {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  margin-bottom: var(--space-5);
  border-radius: var(--radius-xs);
  background: var(--accent);
}

.section-sub {
  max-width: 40ch;
  margin-top: var(--space-3);
  color: var(--text-2);
  font-size: var(--fs-lead);
}

/* ---------- What we build: bento of illustrated cards ---------- */

.bento {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-7);
}

@media (min-width: 900px) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* Systems leads: full width, illustration beside the text. */
  .card.card--wide {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: center;
  }
  .card.card--wide .card__art {
    margin: var(--space-3) 0 var(--space-3) var(--space-3);
    padding: var(--space-6);
  }
  .card.card--wide .card__body {
    padding: var(--space-6) var(--space-7);
  }
  .card.card--wide h3 {
    font-size: 2rem;
  }
}

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.card__art {
  margin: var(--space-3) var(--space-3) 0;
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
}

.card__body {
  padding: var(--space-5) var(--space-5) var(--space-6);
}

.card__body h3 {
  font-size: 1.5rem;
}

.card__body p {
  margin-top: var(--space-2);
  color: var(--text-2);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 4px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

/* Illustrations: drawn only with theme tokens so they follow the theme. */
.il {
  display: block;
  width: 100%;
  height: auto;
}

.il-frame { fill: var(--surface); stroke: var(--border-strong); }
.il-side { fill: var(--bg); }
.il-rule { fill: none; stroke: var(--border-strong); }
.il-dot,
.il-muted { fill: var(--border-strong); }
.il-strong { fill: var(--text-2); }
.il-ink { fill: var(--text); }
.il-accent { fill: var(--accent); }
.il-on-accent { fill: var(--on-accent); }
.il-hl { fill: var(--accent); fill-opacity: 0.14; }
.il-pill { fill: none; stroke: var(--border-strong); }
.il-pill--on { fill: var(--accent); stroke: none; }

.il-wire {
  fill: none;
  stroke: var(--text-2);
  stroke-opacity: 0.5;
  stroke-width: 1.5;
  stroke-linecap: round;
}

/* ---------- Who it's for ---------- */

.fit__list {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-7);
  padding: 0;
  list-style: none;
}

@media (min-width: 900px) {
  .fit__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.fit__list li {
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-2);
  font-size: var(--fs-base);
}

.fit__list strong {
  display: block;
  margin: var(--space-4) 0 var(--space-1);
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--fs-lead);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.tile {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--bg);
  color: var(--accent);
}

.tile svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tile .dash {
  stroke-dasharray: 2 3;
}

/* ---------- How we work ---------- */

/* A timeline drawn like the logo's E: a spine with square nodes. */
.steps {
  position: relative;
  margin-top: var(--space-8);
  padding: 0 0 0 32px;
  list-style: none;
}

.steps::before {
  content: "";
  position: absolute;
  left: 5.5px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
}

.step {
  position: relative;
  padding-bottom: var(--space-7);
}

.step:last-child {
  padding-bottom: 0;
}

.step::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 2px;
  width: 14px;
  height: 14px;
  border-radius: var(--radius-xs);
  background: var(--accent);
  box-sizing: border-box;
}

.step .label {
  margin-bottom: var(--space-3);
  line-height: 18px;
}

.step p {
  max-width: 30ch;
  margin-top: var(--space-2);
  color: var(--text-2);
}

@media (min-width: 900px) {
  .steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: var(--space-6);
    padding: 40px 0 0;
  }
  .steps::before {
    left: 0;
    right: 0;
    top: 5.5px;
    bottom: auto;
    width: auto;
    height: 3px;
  }
  .step {
    padding-bottom: 0;
  }
  .step::before {
    left: 0;
    top: -40px;
  }
}

/* ---------- Selected work (placeholders) ---------- */

.work {
  margin-top: var(--space-7);
  padding: 0;
  list-style: none;
}

.work li {
  padding: var(--space-5);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
}

.work li + li {
  margin-top: var(--space-4);
}

.placeholder {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* ---------- About ---------- */

.about {
  display: grid;
  gap: var(--space-6);
  align-items: center;
}

@media (min-width: 720px) {
  .about {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: var(--space-8);
  }
}

.about__photo {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 220px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-2);
}

.about__body p {
  max-width: 56ch;
}

.about__body .about__name {
  margin: var(--space-4) 0 var(--space-3);
  color: var(--text-2);
}

.about__name strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Contact ---------- */

.section.contact {
  border-top: 0;
  padding-top: 0;
}

.contact__panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding: clamp(var(--space-6), 6vw, 72px);
  border-radius: var(--radius-lg);
}

.contact h2 {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
}

.contact__panel p {
  margin-top: var(--space-3);
  color: var(--text-2);
}

.contact__action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
}

.contact__action p {
  margin: 0;
  font-size: var(--fs-base);
}

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

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-2);
  font-size: var(--fs-sm);
}

.invert + .site-footer {
  border-top: 0;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
  padding-block: var(--space-6);
}

.site-footer img {
  width: 62px;
  height: 24px;
}

.site-footer p {
  margin: 0;
}

@media (min-width: 600px) {
  .site-footer p:last-child {
    margin-left: auto;
  }
}

/* ---------- 404 ---------- */

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

.page main {
  flex: 1;
}

.not-found {
  padding-block: clamp(var(--space-8), 14vw, 192px);
}

.not-found p {
  max-width: var(--measure);
  margin-top: var(--space-4);
  color: var(--text-2);
}

.not-found .hero__actions {
  margin-top: var(--space-6);
}

/* ---------- Interaction ---------- */

/* Sticky header from tablet up; on phones it stays in flow. */
@media (min-width: 720px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--bg);
  }
  main > section[id] {
    scroll-margin-top: 76px;
  }
}

.site-nav a[aria-current] {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* Secondary button: outline only. */
.button--quiet {
  border-color: var(--border-strong);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
}

.button--quiet:hover {
  border-color: var(--text-2);
  background: transparent;
  color: var(--text);
}

.contact__action .copy-email {
  padding: 10px 16px;
  font-size: var(--fs-sm);
}

/* Hero diagram: draws itself in once, then packets travel from each
   file into the system. Hovering a file lights its wire. */
.d-packet {
  fill: var(--accent);
}

.d-line .d-box,
.d-line .d-stub {
  transition: stroke 150ms ease, stroke-opacity 150ms ease;
}

.d-line:hover .d-box {
  stroke: var(--accent);
}

.d-line:hover .d-stub {
  stroke: var(--accent);
  stroke-opacity: 1;
}

@keyframes d-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes d-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes d-slide {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .d-wire {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: d-draw 450ms ease-out forwards;
  }
  .d-stub {
    animation-delay: calc(250ms + var(--i) * 80ms);
  }
  .d-bus {
    animation-delay: 750ms;
  }
  .d-trunk {
    animation-duration: 300ms;
    animation-delay: 1150ms;
  }
  .d-src {
    opacity: 0;
    animation: d-fade 400ms ease-out forwards;
    animation-delay: calc(var(--i) * 80ms);
  }
  .d-node {
    opacity: 0;
    animation: d-fade 200ms ease-out forwards;
    animation-delay: calc(600ms + var(--i) * 80ms);
  }
  .d-system {
    opacity: 0;
    animation: d-fade 400ms ease-out 1300ms forwards;
  }
  .d-bar {
    opacity: 0;
    animation: d-slide 350ms ease-out forwards;
  }
  .d-bar:nth-of-type(1) {
    animation-delay: 1550ms;
  }
  .d-bar:nth-of-type(2) {
    animation-delay: 1700ms;
  }
  .d-bar:nth-of-type(3) {
    animation-delay: 1850ms;
  }
  .d-packet {
    opacity: 0;
    animation: d-fade 300ms linear 2200ms forwards;
  }
}

@media (prefers-reduced-motion: reduce) {
  .d-packet {
    display: none;
  }
}

/* Timeline: a grey track with an accent fill that follows scroll
   progress (set by site.js). Without JS the fill is complete. */
.steps::before {
  background: var(--border-strong);
}

.steps::after {
  content: "";
  position: absolute;
  left: 5.5px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
  transform: scaleY(var(--progress, 1));
  transform-origin: top;
}

.step {
  z-index: 1;
}

.steps--live .step::before {
  border: 2px solid var(--accent);
  background: var(--surface);
  transition: background-color 200ms ease;
}

.steps--live .step.is-active::before {
  background: var(--accent);
}

.steps--live .step .label {
  transition: color 200ms ease;
}

.steps--live .step.is-active .label {
  color: var(--accent);
}

@media (min-width: 900px) {
  .steps::after {
    left: 0;
    right: 0;
    top: 5.5px;
    bottom: auto;
    width: auto;
    height: 3px;
    transform: scaleX(var(--progress, 1));
    transform-origin: left;
  }
}

/* Bars in the analytics card grow in when the card scrolls into view
   (.js and .is-visible are set by site.js). */
@media (prefers-reduced-motion: no-preference) {
  .js .il-bars rect {
    transform: scaleY(0.12);
    transform-box: fill-box;
    transform-origin: bottom;
    transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .js .il-bars rect:nth-child(2) { transition-delay: 80ms; }
  .js .il-bars rect:nth-child(3) { transition-delay: 160ms; }
  .js .il-bars rect:nth-child(4) { transition-delay: 240ms; }
  .js .il-bars rect:nth-child(5) { transition-delay: 320ms; }
  .js .is-visible .il-bars rect {
    transform: none;
  }
}
