/* ConnectoLeads: one page, typography first. All colours live in the tokens below. */

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

:root {
  --bg: #f4f1ea;
  --ink: #17150f;
  --muted: #5a544a;
  --rule: #d9d3c7;
  --accent: #a3301c;
  --on-ink: #f4f1ea;
  color-scheme: light;

  --serif: "Newsreader Display", "Iowan Old Style", Georgia, serif;
  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(1.25rem, 4.5vw, 3.5rem);
  --margin-col: 13rem;
  --gap: clamp(2rem, 4vw, 4rem);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #13120f; --ink: #ece7dc; --muted: #a59d90; --rule: #34302a; --accent: #f08b6d; --on-ink: #13120f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #13120f; --ink: #ece7dc; --muted: #a59d90; --rule: #34302a; --accent: #f08b6d; --on-ink: #13120f;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 clamp(1rem, 0.96rem + 0.2vw, 1.125rem)/1.6 var(--sans);
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--on-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

.wrap { width: 100%; max-width: 84rem; margin-inline: auto; padding-inline: var(--pad); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: var(--bg); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { top: 1rem; }

/* Masthead */
.masthead {
  display: flex; align-items: center; gap: 1.5rem;
  padding-block: 1.5rem;
}
.wordmark {
  font: 400 1.375rem/1 var(--serif);
  letter-spacing: -0.01em;
  text-decoration: none;
  margin-right: auto;
}
.masthead nav { display: none; }
.masthead nav ul { display: flex; gap: 2rem; }
.masthead nav a, .theme {
  font-size: 0.875rem; text-decoration: none; color: var(--muted);
  transition: color .2s ease;
}
.masthead nav a:hover, .theme:hover { color: var(--ink); }
.theme {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: none; border: 1px solid var(--rule); border-radius: 999px;
  padding: 0.5rem 0.875rem; font-family: var(--sans); cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
.theme:hover { border-color: var(--ink); }
.theme-dot {
  width: 0.75rem; height: 0.75rem; border-radius: 50%;
  border: 1px solid currentColor;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

/* Hero */
.hero { padding-block: clamp(4rem, 13vw, 10rem) clamp(4rem, 10vw, 8rem); }
.kicker, .margin {
  font-size: 0.8125rem; font-weight: 500;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--muted);
}
.kicker { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
h1 {
  font: 400 clamp(2.875rem, 1.2rem + 7.4vw, 7.75rem)/0.98 var(--serif);
  letter-spacing: -0.03em;
}
h1 em { font-style: italic; color: var(--accent); }
.hero-body { margin-top: clamp(2.5rem, 5vw, 4rem); max-width: 34rem; }
.lede { font-size: clamp(1.125rem, 1rem + 0.45vw, 1.3125rem); line-height: 1.5; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-top: 2.5rem; }

.btn {
  display: inline-block;
  background: var(--ink); color: var(--bg);
  padding: 1rem 1.5rem; border-radius: 2px;
  font-weight: 500; text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -12px var(--ink); }
.text-link {
  font-weight: 500; text-decoration: underline;
  text-decoration-color: var(--rule); text-decoration-thickness: 1px; text-underline-offset: 0.35em;
  transition: text-decoration-color .2s ease, text-underline-offset .2s ease;
}
.text-link::after { content: "\2192"; display: inline-block; margin-left: 0.4em; transition: transform .2s ease; }
.text-link:hover { text-decoration-color: var(--accent); text-underline-offset: 0.45em; }
.text-link:hover::after { transform: translateX(3px); }

/* Chapters */
.chapter { padding-block: clamp(4rem, 9vw, 7.5rem); position: relative; }
.chapter::before {
  content: ""; position: absolute; top: 0; left: var(--pad); right: var(--pad);
  border-top: 1px solid var(--rule);
}
.margin { margin-bottom: 2.5rem; }
.num { color: var(--accent); font-variant-numeric: tabular-nums; margin-right: 0.75rem; }
.body { max-width: 52rem; }

h2 {
  font: 400 clamp(1.875rem, 1.3rem + 2.2vw, 3rem)/1.08 var(--serif);
  letter-spacing: -0.02em;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}
.body > h2 + * { margin-top: 0; }
.body > * + h2 { margin-top: clamp(4rem, 8vw, 6rem); }
h3 { font-size: 1rem; font-weight: 600; letter-spacing: 0; }
.prose { max-width: 38rem; }
.contact .body { max-width: none; }

/* What we ask for */
.pair, .terms { display: grid; gap: 2rem var(--gap); }
.pair dt, .terms dt {
  font: 400 clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem)/1.2 var(--serif);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}
.pair dd, .terms dd, .steps p { color: var(--muted); }
.pair > div { padding-top: 1.25rem; border-top: 1px solid var(--ink); }

/* Steps */
.steps { display: grid; gap: 0; counter-reset: none; }
.steps li {
  display: grid; grid-template-columns: 2.5rem 1fr; column-gap: 1rem;
  padding-block: 1.25rem; border-top: 1px solid var(--rule);
}
.steps li:last-child { border-bottom: 1px solid var(--rule); }
.steps .n {
  grid-row: span 2;
  font: italic 400 1.75rem/1 var(--serif); color: var(--accent);
}
.steps h3 { margin-bottom: 0.25rem; }

/* Expectations */
.terms > div { padding-top: 1.25rem; border-top: 1px solid var(--rule); }

/* Contact */
.mail {
  font: 400 clamp(1.75rem, 0.6rem + 4.4vw, 4.5rem)/1.05 var(--serif);
  letter-spacing: -0.025em;
  margin-bottom: 2rem;
  overflow-wrap: anywhere;
}
.mail a {
  text-decoration: underline; text-decoration-thickness: 1px;
  text-decoration-color: var(--rule); text-underline-offset: 0.18em;
  transition: text-decoration-color .2s ease, color .2s ease;
}
.mail a:hover { text-decoration-color: var(--accent); color: var(--accent); }

/* Footer */
.foot {
  display: flex; justify-content: space-between; gap: 1rem;
  padding-block: 2rem 3rem; font-size: 0.875rem; color: var(--muted);
  position: relative;
}
.foot::before { content: ""; position: absolute; top: 0; left: var(--pad); right: var(--pad); border-top: 1px solid var(--rule); }

/* Wider screens */
@media (min-width: 40rem) {
  .masthead nav { display: block; }
  .pair, .terms { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 64rem) {
  .chapter { display: grid; grid-template-columns: var(--margin-col) 1fr; column-gap: var(--gap); }
  .margin { margin: 0.75rem 0 0; position: sticky; top: 2rem; align-self: start; }
  .hero-body { margin-left: calc(var(--margin-col) + var(--gap)); }
  .steps { grid-template-columns: repeat(4, 1fr); column-gap: 1.5rem; }
  .steps li, .steps li:last-child { display: block; border-bottom: 0; padding-top: 1.25rem; }
  .steps .n { display: block; margin-bottom: 1.5rem; }
}
@media (max-width: 24rem) {
  .masthead { gap: 1rem; }
}
