@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/schibsted-grotesk-latin.woff2") format("woff2");
}

:root {
  --sky: #e3eaec;
  --ink: #14242c;
  --ink-soft: #4a5d66;
  --rule-sky: #c3d0d4;
  --sea: #1f3d4b;
  --foam: #e6eef0;
  --foam-soft: #a7bec6;
  --rule-sea: #38596a;
  --gutter: clamp(1rem, 5vw, 4rem);
  --measure: 72rem;
  --band-space: clamp(4rem, 9vw, 7.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --sky: #0f1c23;
    --ink: #dfe7ea;
    --ink-soft: #8ea3ac;
    --rule-sky: #2a3c45;
    --sea: #081116;
    --foam: #d6e1e5;
    --foam-soft: #7f959e;
    --rule-sea: #1f3038;
  }
}

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

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

body {
  margin: 0;
  background: var(--sea);
  color: var(--ink);
  font-family: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul { margin: 0; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover { text-decoration-thickness: 2px; }

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 2px;
}

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

/* Bands: the page crosses the horizon twice, sky to sea and back. */

.sky {
  background: var(--sky);
  color: var(--ink);
  --dim: var(--ink-soft);
  --rule: var(--rule-sky);
}

.sea {
  background: var(--sea);
  color: var(--foam);
  --dim: var(--foam-soft);
  --rule: var(--rule-sea);
}

.band { padding-block: var(--band-space); }

.section + .section { margin-top: clamp(3.5rem, 8vw, 6rem); }

.label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dim);
}

.hero-band {
  min-height: 82svh;
  display: flex;
  flex-direction: column;
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-block: 1.75rem;
  font-size: 1rem;
}

.wordmark {
  font-weight: 650;
  letter-spacing: -0.01em;
}

.masthead a {
  color: var(--ink-soft);
  text-decoration: none;
}

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

.hero {
  margin-top: auto;
  padding-block: 4rem clamp(3rem, 7vw, 5.5rem);
}

.hero h1 {
  font-size: clamp(2.5rem, 8.2vw, 6.25rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 13ch;
  text-wrap: balance;
}

.hero p {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  max-width: 42ch;
  font-size: clamp(1.1875rem, 2.1vw, 1.5rem);
  line-height: 1.4;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.grid {
  display: grid;
  gap: 2.5rem clamp(2rem, 4vw, 3.5rem);
  margin-top: 2rem;
  padding: 0;
  list-style: none;
}

.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.grid h3 {
  font-size: clamp(1.25rem, 1.8vw, 1.4375rem);
  font-weight: 550;
  line-height: 1.25;
  letter-spacing: -0.012em;
}

.grid p {
  margin-top: 0.625rem;
  max-width: 42ch;
  color: var(--dim);
}

/* The method is an actual sequence, so it is numbered. */
.steps { counter-reset: step; }

.steps li {
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
}

.steps h3::before {
  counter-increment: step;
  content: counter(step);
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dim);
}

.about {
  margin-top: 2rem;
  max-width: 54ch;
  font-size: clamp(1.25rem, 2.2vw, 1.625rem);
  line-height: 1.35;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

.about + .about {
  margin-top: 1.25rem;
  max-width: 48ch;
  font-size: 1.0625rem;
  line-height: 1.55;
  letter-spacing: normal;
  color: var(--dim);
}

.contact p {
  margin-top: 2rem;
  max-width: 44ch;
  color: var(--dim);
}

.contact a {
  display: inline-block;
  margin-top: 1rem;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.foot {
  padding-block: clamp(4rem, 9vw, 6rem) 2rem;
  font-size: 0.875rem;
  color: var(--foam-soft);
}

@media (max-width: 52rem) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .masthead { flex-wrap: wrap; }
  .masthead a { font-size: 0.9375rem; }
  .hero-band { min-height: 76svh; }
}

.nowrap { white-space: nowrap; }

/* Multi-page additions */

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.75rem;
  padding-block: 1.75rem;
  font-size: 1rem;
}

.nav .wordmark { margin-right: auto; }

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

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

.nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

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

.page-head { padding-block: clamp(3rem, 7vw, 5rem) clamp(3rem, 7vw, 5.5rem); }

.page-head h1 {
  font-size: clamp(2.25rem, 6vw, 4.25rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.03em;
  max-width: 18ch;
  text-wrap: balance;
}

.page-head p {
  margin-top: clamp(1.25rem, 2.5vw, 1.75rem);
  max-width: 46ch;
  font-size: clamp(1.125rem, 1.9vw, 1.375rem);
  line-height: 1.45;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.prose {
  margin-top: 1.5rem;
  max-width: 62ch;
}

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

.more {
  display: inline-block;
  margin-top: 1.25rem;
  font-weight: 550;
}

.pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem clamp(2rem, 4vw, 3.5rem);
  margin-top: 2rem;
}

.pair h3 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.pair p {
  margin-top: 0.75rem;
  max-width: 40ch;
  color: var(--dim);
}

@media (max-width: 52rem) {
  .pair { grid-template-columns: 1fr; }
}

@media (max-width: 52rem) {
  /* Nav stacks: name on its own line, sections under it. Contact lives on every page. */
  .nav { gap: 0.5rem 1.25rem; font-size: 0.9375rem; }
  .nav .wordmark { flex-basis: 100%; margin-right: 0; font-size: 1rem; }
  .nav a[href^="mailto"] { display: none; }
}

/* Home hero credential and practice panels */

.credential {
  margin-top: clamp(1.5rem, 3vw, 2rem);
  max-width: 44ch;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-soft);
  border-top: 1px solid var(--rule-sky);
  padding-top: 1rem;
}

.hero h1 { max-width: 16ch; }

.pair-deep { gap: 3.5rem clamp(2.5rem, 5vw, 5rem); }

.contents {
  margin-top: 1.5rem;
  padding: 0;
  list-style: none;
  max-width: 40ch;
}

.contents li {
  border-top: 1px solid var(--rule);
  padding-block: 0.6rem;
  color: var(--foam);
}

.contents li:last-child { border-bottom: 1px solid var(--rule); }
