/* ==========================================================================
   Praxform — praxform.com
   One stylesheet for the whole site. Edit tokens here, not in the pages.
   ========================================================================== */

:root {
  /* Colour */
  --ink:        #161b20;   /* dark sections, body text */
  --ink-soft:   #222a31;   /* dark section layering */
  --paper:      #eef0f1;   /* page background */
  --white:      #ffffff;
  --text-mute:  #596670;   /* secondary text on paper */
  --text-dim:   #9aa6ae;   /* secondary text on ink */
  --rule:       #c7ced3;   /* hairlines on paper */
  --rule-dark:  #333c44;   /* hairlines on ink */
  --accent:     #2f5bea;   /* brackets, primary action */
  --accent-deep:#1f3fae;

  /* Type */
  --display: "Archivo", system-ui, sans-serif;
  --prose:   "Source Serif 4", Georgia, serif;

  /* Space */
  --gutter: 1.5rem;
  --measure: 62ch;
  --max: 68rem;
}

/* --------------------------------------------------------------- reset -- */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--prose);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent-deep); text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }

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

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

/* --------------------------------------------------------- type system -- */

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

.display {
  font-size: clamp(2.75rem, 8.5vw, 5.25rem);
  letter-spacing: -0.035em;
  line-height: 0.98;
}

h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }

h3 {
  font-size: 1.1875rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

p { margin: 0 0 1.1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.125rem, 2.2vw, 1.375rem);
  line-height: 1.55;
  max-width: 34ch;
}

/* The bracket mark is the Praxform logo motif. It carries structure
   across the site, so it earns its place rather than decorating. */
.brk::before { content: "["; color: var(--accent); margin-right: 0.3em; }
.brk::after  { content: "]"; color: var(--accent); margin-left: 0.3em; }

/* ------------------------------------------------------------- layout -- */

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

.band { padding-block: clamp(3.5rem, 9vw, 6.5rem); }

.band--ink {
  background: var(--ink);
  color: var(--paper);
}
.band--ink h2 { color: var(--white); }
.band--ink a { color: var(--white); }

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

/* Two column: heading rail on the left, prose on the right. */
.split {
  display: grid;
  gap: clamp(1.25rem, 4vw, 3.5rem);
}
@media (min-width: 52rem) {
  .split {
    grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
    align-items: start;
  }
}

/* ------------------------------------------------------------ masthead -- */

.masthead {
  border-bottom: 1px solid var(--rule-dark);
  background: var(--ink);
}

.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: 0.08em;
  color: var(--white);
  text-decoration: none;
}
.wordmark::before { content: "["; color: var(--accent); margin-right: 0.25em; }
.wordmark::after  { content: "]"; color: var(--accent); margin-left: 0.25em; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  font-family: var(--display);
  font-size: 0.9375rem;
  font-weight: 500;
}
.nav a {
  color: var(--text-dim);
  text-decoration: none;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--white); }

/* ---------------------------------------------------------------- hero -- */

.hero {
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(3.5rem, 11vw, 8rem);
}

.hero__eyebrow {
  font-family: var(--display);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
}

.hero .display { color: var(--white); }

.hero__sub {
  margin-top: clamp(1.5rem, 4vw, 2.25rem);
  color: var(--text-dim);
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  line-height: 1.6;
  max-width: 48ch;
}
.hero__sub strong { color: var(--white); font-weight: 400; }

/* -------------------------------------------------------------- action -- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(2rem, 5vw, 2.75rem);
}

.btn {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  padding: 0.8rem 1.4rem;
  border: 1px solid transparent;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.btn--primary {
  background: var(--accent);
  color: var(--white);
}
.btn--primary:hover { background: var(--accent-deep); color: var(--white); }

.btn--ghost {
  border-color: var(--rule-dark);
  color: var(--paper);
}
.btn--ghost:hover { border-color: var(--text-dim); color: var(--white); }

.btn--onpaper {
  border-color: var(--ink);
  color: var(--ink);
}
.btn--onpaper:hover { background: var(--ink); color: var(--paper); }

/* --------------------------------------------------------- credentials -- */

.creds {
  margin-top: clamp(2.5rem, 7vw, 4rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule-dark);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  font-family: var(--display);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dim);
  list-style: none;
  padding-inline: 0;
}

/* --------------------------------------------------------------- lists -- */

.ticks {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: var(--measure);
}
.ticks li {
  position: relative;
  padding-left: 1.6rem;
  padding-block: 0.55rem;
  border-bottom: 1px solid var(--rule);
}
.ticks li:first-child { border-top: 1px solid var(--rule); }
.ticks li::before {
  content: "[";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--display);
  font-weight: 700;
}

/* The method is a genuine sequence, so it is numbered. */
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
}
.steps li {
  counter-increment: step;
  display: grid;
  gap: 0.15rem 1.25rem;
  padding-block: 1.35rem;
  border-top: 1px solid var(--rule);
}
.steps li:last-child { border-bottom: 1px solid var(--rule); }
@media (min-width: 40rem) {
  .steps li { grid-template-columns: 3.5rem minmax(0, 1fr); }
}
.steps li::before {
  content: counter(step);
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--accent);
  padding-top: 0.2rem;
}
.steps h3 { margin-bottom: 0.25rem; }
.steps p { color: var(--text-mute); }

/* ------------------------------------------------------------- callout -- */

.callout {
  border-left: 3px solid var(--accent);
  padding-left: clamp(1.25rem, 4vw, 2rem);
  max-width: 52ch;
}
.callout p { font-size: clamp(1.125rem, 2.2vw, 1.3125rem); line-height: 1.55; }

/* ---------------------------------------------------------------- prose -- */

.prose h3 { margin-top: 2.25rem; margin-bottom: 0.5rem; }
.prose h3:first-child { margin-top: 0; }
.prose ul { padding-left: 1.1rem; max-width: var(--measure); }
.prose li { margin-bottom: 0.45rem; }
.prose li strong { font-family: var(--display); font-weight: 600; }

.cv-group { margin-top: 2.5rem; }
.cv-group > h3 {
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  color: var(--text-mute);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1rem;
}
.cv-group ul { list-style: none; padding: 0; }
.cv-group li { margin-bottom: 0.8rem; max-width: var(--measure); }

/* --------------------------------------------------------------- legal -- */

.legal { max-width: 44rem; }
.legal h2 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); margin-top: 2.75rem; }
.legal h2:first-of-type { margin-top: 2rem; }
.legal p, .legal li { max-width: none; }
.legal ul { padding-left: 1.1rem; }
.legal li { margin-bottom: 0.5rem; }
.legal .updated {
  font-family: var(--display);
  font-size: 0.875rem;
  color: var(--text-mute);
  margin-top: 0.75rem;
}

/* -------------------------------------------------------------- footer -- */

.foot {
  background: var(--ink);
  color: var(--text-dim);
  padding-block: clamp(2.5rem, 6vw, 4rem);
  font-size: 0.9375rem;
}
.foot a { color: var(--paper); }
.foot p { max-width: 70ch; margin-bottom: 0.9em; }

.foot__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  font-family: var(--display);
  font-size: 0.9375rem;
  font-weight: 500;
}
.foot__nav a { text-decoration: none; }
.foot__nav a:hover { text-decoration: underline; }

.foot__fine {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-dark);
  font-size: 0.8125rem;
  line-height: 1.6;
}
.foot__fine p { margin-bottom: 0.8em; }

/* ------------------------------------------------------------ utility -- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--white);
  padding: 0.75rem 1rem;
  font-family: var(--display);
  z-index: 10;
}
.skip:focus { left: 0; }
