/* ==========================================================================
   Frontier Integration - design system
   Editorial-technical: warm paper, ink, vermillion signal, teal support.
   ========================================================================== */

/* --- 1. Tokens ----------------------------------------------------------- */

:root {
  /* Surfaces */
  --paper:      #FAF8F4;
  --surface:    #FFFFFF;
  --surface-2:  #F2EEE6;
  --surface-3:  #EAE4D9;
  --inverse:    #14181D;
  --inverse-ink:#F4F1EB;

  /* Text */
  --ink:        #14181D;
  --ink-2:      #454E59;
  --ink-3:      #5C6572;   /* AA (4.5:1) on both --paper and --surface-2 */

  /* Lines */
  --line:       #E3DCD0;
  --line-2:     #D2C9BA;

  /* Brand */
  --accent:     #B03D19;
  --accent-fill:#C2451E;
  --accent-soft:#F7E7DF;
  --teal:       #0E5C58;
  --teal-soft:  #E0EDEB;

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --step--1: clamp(0.82rem, 0.80rem + 0.10vw, 0.88rem);
  --step-0:  clamp(1.02rem, 0.99rem + 0.14vw, 1.12rem);
  --step-1:  clamp(1.18rem, 1.12rem + 0.30vw, 1.38rem);
  --step-2:  clamp(1.42rem, 1.30rem + 0.60vw, 1.80rem);
  --step-3:  clamp(1.72rem, 1.48rem + 1.10vw, 2.45rem);
  --step-4:  clamp(2.10rem, 1.65rem + 2.05vw, 3.40rem);
  --step-5:  clamp(2.50rem, 1.75rem + 3.40vw, 4.60rem);

  /* Space */
  --sp-1: 0.375rem;  --sp-2: 0.75rem;  --sp-3: 1.125rem;
  --sp-4: 1.75rem;   --sp-5: 2.5rem;   --sp-6: 3.75rem;
  --sp-7: 5.5rem;    --sp-8: 8rem;

  --container: 1160px;
  --radius:    14px;
  --radius-sm: 8px;

  --shadow-sm: 0 1px 2px rgba(20,24,29,.05), 0 2px 8px rgba(20,24,29,.04);
  --shadow-md: 0 4px 12px rgba(20,24,29,.07), 0 14px 40px rgba(20,24,29,.07);
  --shadow-lg: 0 10px 26px rgba(20,24,29,.10), 0 30px 70px rgba(20,24,29,.10);

  --ease: cubic-bezier(.22,.68,.32,1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper:      #0B0E12;
  --surface:    #11161D;
  --surface-2:  #171E27;
  --surface-3:  #1F2731;
  --inverse:    #F4F1EB;
  --inverse-ink:#14181D;

  --ink:        #EFECE5;
  --ink-2:      #B3BBC5;
  --ink-3:      #838C98;

  --line:       #232B36;
  --line-2:     #313B48;

  --accent:     #FF8B5E;
  --accent-fill:#C2451E;
  --accent-soft:#2A1811;
  --teal:       #4FD1C5;
  --teal-soft:  #10251F;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,.45), 0 14px 40px rgba(0,0,0,.35);
  --shadow-lg: 0 10px 26px rgba(0,0,0,.5), 0 30px 70px rgba(0,0,0,.45);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #0B0E12;
    --surface:    #11161D;
    --surface-2:  #171E27;
    --surface-3:  #1F2731;
    --inverse:    #F4F1EB;
    --inverse-ink:#14181D;
    --ink:        #EFECE5;
    --ink-2:      #B3BBC5;
    --ink-3:      #838C98;
    --line:       #232B36;
    --line-2:     #313B48;
    --accent:     #FF8B5E;
    --accent-fill:#C2451E;
    --accent-soft:#2A1811;
    --teal:       #4FD1C5;
    --teal-soft:  #10251F;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow-md: 0 4px 12px rgba(0,0,0,.45), 0 14px 40px rgba(0,0,0,.35);
    --shadow-lg: 0 10px 26px rgba(0,0,0,.5), 0 30px 70px rgba(0,0,0,.45);
    color-scheme: dark;
  }
}

/* --- 2. Reset & base ----------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 36;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.018em;
  text-wrap: balance;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); letter-spacing: -0.01em; }

p { text-wrap: pretty; }

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

::selection { background: var(--accent-fill); color: #fff; }

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

.skip-link {
  position: absolute; top: -60px; left: var(--sp-3); z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: .6rem 1rem; border-radius: var(--radius-sm);
  text-decoration: none; font-weight: 600;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: var(--sp-3); color: var(--paper); }

/* --- 3. Layout ----------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 4vw, 2.5rem);
}
.container--narrow { max-width: 760px; }
.container--mid    { max-width: 940px; }

.section { padding-block: clamp(3.5rem, 8vw, var(--sp-8)); }
.section--tight { padding-block: clamp(2.5rem, 5vw, var(--sp-6)); }
.section--alt { background: var(--surface-2); }
.section--line { border-top: 1px solid var(--line); }

.stack > * + * { margin-top: var(--sp-3); }
.stack-lg > * + * { margin-top: var(--sp-5); }

.grid { display: grid; gap: var(--sp-4); }
@media (min-width: 720px)  { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 720px)  { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 720px)  { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* --- 4. Typographic helpers ---------------------------------------------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: currentColor;
  flex: none;
}
.eyebrow--plain::before { display: none; }

.lede    { font-size: var(--step-1); color: var(--ink-2); line-height: 1.55; }
.muted   { color: var(--ink-2); }
.small   { font-size: var(--step--1); color: var(--ink-3); }
.mono    { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .04em; }
.center  { text-align: center; }
.measure { max-width: 62ch; }
.measure-sm { max-width: 48ch; }

.section-head { max-width: 68ch; }
.section-head > * + * { margin-top: var(--sp-2); }
.section-head.center { margin-inline: auto; }
.section-head.center .eyebrow { justify-content: center; }

.mark { color: var(--accent); }
.underline-swash {
  background-image: linear-gradient(transparent 62%, var(--accent-soft) 62%);
  padding-inline: .08em;
}

/* --- 5. Buttons ---------------------------------------------------------- */

.btn {
  --btn-bg: var(--accent-fill);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .85rem 1.4rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid transparent;
  border-radius: 100px;
  font-weight: 600;
  font-size: .96rem;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  text-wrap: balance;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
/* Icons must never be shrunk away when a long label runs out of room. */
.btn svg { flex: none; }
.btn:hover {
  color: var(--btn-fg);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(194,69,30,.28);
}
.btn:active { transform: translateY(0); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: var(--line-2);
}
.btn--ghost:hover {
  background: var(--surface);
  border-color: var(--ink-3);
  box-shadow: var(--shadow-sm);
}

.btn--light {
  --btn-bg: var(--inverse-ink);
  --btn-fg: var(--inverse);
}
.btn--light:hover { box-shadow: 0 6px 20px rgba(0,0,0,.25); }

.btn--outline-light {
  --btn-bg: transparent;
  --btn-fg: var(--inverse-ink);
  border-color: color-mix(in srgb, var(--inverse-ink) 32%, transparent);
}
.btn--outline-light:hover { background: color-mix(in srgb, var(--inverse-ink) 10%, transparent); box-shadow: none; }

.btn--sm { padding: .6rem 1.05rem; font-size: .88rem; }
.btn--lg { padding: 1rem 1.7rem; font-size: 1.02rem; }
.btn--block { width: 100%; }

.btn .arrow { transition: transform .18s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.link-arrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-weight: 600; font-size: .94rem; text-decoration: none;
  color: var(--accent);
}
.link-arrow:hover { color: var(--accent); text-decoration: underline; }
.link-arrow svg { flex: none; transition: transform .18s var(--ease); }
.link-arrow:hover svg { transform: translateX(3px); }

/* --- 6. Header ----------------------------------------------------------- */

.header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.header.is-stuck {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
}
.header__inner {
  display: flex; align-items: center; gap: var(--sp-4);
  min-height: 70px;
}

.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  text-decoration: none; color: var(--ink);
  font-weight: 650; font-size: 1.02rem; letter-spacing: -0.02em;
  flex: none;
}
.brand:hover { color: var(--ink); }
.brand__mark { width: 30px; height: 30px; flex: none; }
.brand__name { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name b { font-weight: 650; }
.brand__name span {
  font-family: var(--font-mono); font-size: .58rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3);
  font-weight: 500;
}

.nav { display: none; margin-left: auto; align-items: center; gap: .3rem; }
@media (min-width: 940px) { .nav { display: flex; } }
.nav a {
  color: var(--ink-2); text-decoration: none;
  font-size: .93rem; font-weight: 500;
  padding: .45rem .7rem; border-radius: var(--radius-sm);
  transition: color .15s var(--ease), background .15s var(--ease);
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

.header__actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
@media (min-width: 940px) { .header__actions { margin-left: 0; } }
.header__cta { display: none; }
@media (min-width: 1040px) { .header__cta { display: inline-flex; } }

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line);
  border-radius: 100px; cursor: pointer; color: var(--ink-2);
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line-2); }
.nav-toggle { display: grid; }
@media (min-width: 940px) { .nav-toggle { display: none; } }

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

/* Mobile drawer.
   Anchored to .header rather than the viewport on purpose: the header's
   backdrop-filter makes it a containing block, so `position: fixed` here
   would resolve against the header and collapse to zero height. */
.mobile-nav {
  position: absolute;
  top: 100%; left: 0; right: 0;
  height: calc(100vh - 100%);
  height: calc(100dvh - 100%);
  z-index: 99;
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: var(--sp-4) 0 var(--sp-6);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: none;
}
.mobile-nav.is-open { display: block; }
@media (min-width: 940px) { .mobile-nav { display: none !important; } }
.mobile-nav a {
  display: block; padding: .9rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
  font-size: 1.12rem; font-weight: 500;
}
.mobile-nav .btn { margin-top: var(--sp-4); }
body.nav-open { overflow: hidden; }

/* --- 7. Hero ------------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: clamp(3rem, 8vw, 6.5rem) clamp(3rem, 7vw, 5.5rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 55% at 78% 8%,  color-mix(in srgb, var(--accent-fill) 11%, transparent), transparent 62%),
    radial-gradient(55% 50% at 8% 92%, color-mix(in srgb, var(--teal) 10%, transparent), transparent 60%);
  pointer-events: none;
}
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 68px 68px;
  opacity: .5;
  mask-image: radial-gradient(80% 60% at 50% 0%, #000 10%, transparent 78%);
  -webkit-mask-image: radial-gradient(80% 60% at 50% 0%, #000 10%, transparent 78%);
  pointer-events: none;
}
.hero__inner { position: relative; }
.hero h1 { margin-top: var(--sp-3); max-width: 17ch; }
.hero .lede { margin-top: var(--sp-4); max-width: 56ch; }
.hero__actions {
  margin-top: var(--sp-5);
  display: flex; flex-wrap: wrap; gap: .75rem;
}
.hero__note {
  margin-top: var(--sp-4);
  display: flex; align-items: flex-start; gap: .55rem;
  font-size: .9rem; color: var(--ink-3); max-width: 52ch;
}
.hero__note svg { flex: none; margin-top: .22rem; color: var(--teal); }

.trustbar {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  display: grid; gap: var(--sp-4);
}
@media (min-width: 760px) { .trustbar { grid-template-columns: repeat(4, 1fr); gap: var(--sp-5); } }
.trustbar__item strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.trustbar__item span { font-size: .88rem; color: var(--ink-3); display: block; margin-top: .25rem; }

/* --- 8. Cards ------------------------------------------------------------ */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-4);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.card--hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-2);
}
.card__icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: var(--sp-3);
}
.card__icon--teal { background: var(--teal-soft); color: var(--teal); }
.card h3 { font-size: var(--step-1); }
.card p { margin-top: .5rem; color: var(--ink-2); font-size: .96rem; }

.card--flat { background: transparent; border-color: transparent; padding: 0; }

/* Problem cards */
.problem {
  border-left: 2px solid var(--line-2);
  padding-left: var(--sp-3);
}
.problem h3 { font-size: var(--step-1); }
.problem p { margin-top: .5rem; color: var(--ink-2); font-size: .95rem; }
.problem__tag {
  font-family: var(--font-mono); font-size: .68rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); display: block; margin-bottom: .5rem;
}

/* --- 9. Track split ------------------------------------------------------ */

.track {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-5) var(--sp-4) var(--sp-4);
  overflow: hidden;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.track:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.track::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--accent-fill);
}
.track--alt::before { background: var(--teal); }
.track__label {
  font-family: var(--font-mono); font-size: .7rem;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); font-weight: 500;
}
.track--alt .track__label { color: var(--teal); }
.track h3 { margin-top: .6rem; font-size: var(--step-3); }
.track > p { margin-top: var(--sp-2); color: var(--ink-2); }
.track ul { margin-top: var(--sp-3); }
.track .link-arrow { margin-top: auto; padding-top: var(--sp-4); }
.track--alt .link-arrow { color: var(--teal); }

.ticks { list-style: none; padding: 0; display: grid; gap: .6rem; }
.ticks li {
  display: grid; grid-template-columns: 18px 1fr; gap: .65rem;
  align-items: start; font-size: .95rem; color: var(--ink-2);
}
.ticks li::before {
  content: ""; width: 16px; height: 16px; margin-top: .3rem;
  border-radius: 50%;
  background-color: var(--accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23C2451E' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
  background-size: 12px; background-repeat: no-repeat; background-position: center;
}
.track--alt .ticks li::before {
  background-color: var(--teal-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230E5C58' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] .ticks li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23FF8B5E' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] .track--alt .ticks li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%234FD1C5' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
}

/* --- 10. Ladder ---------------------------------------------------------- */

.ladder { display: grid; gap: 0; margin-top: var(--sp-5); }
.rung {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  padding: var(--sp-5) 0;
  border-top: 1px solid var(--line);
  position: relative;
}
.rung:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 860px) {
  .rung { grid-template-columns: 200px 1fr 1fr; gap: var(--sp-5); align-items: start; }
}
.rung__num { display: flex; align-items: baseline; gap: .7rem; }
.rung__num b {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}
.rung__num span {
  font-family: var(--font-mono); font-size: .68rem;
  letter-spacing: .15em; text-transform: uppercase; color: var(--ink-3);
}
.rung__body h3 { font-size: var(--step-2); }
.rung__body p { margin-top: .6rem; color: var(--ink-2); }
.rung__aside .mono {
  color: var(--ink-3); text-transform: uppercase; letter-spacing: .13em;
  font-size: .68rem; display: block; margin-bottom: .7rem;
}

.chips { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; }
.chips li {
  font-size: .82rem;
  padding: .3rem .7rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--ink-2);
  background: var(--surface);
}

/* --- 11. Process --------------------------------------------------------- */

.steps { list-style: none; padding: 0; display: grid; gap: var(--sp-4); }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { position: relative; padding-top: var(--sp-4); border-top: 2px solid var(--line-2); }
.step:first-child { border-top-color: var(--accent-fill); }
.step__k {
  font-family: var(--font-mono); font-size: .7rem;
  letter-spacing: .15em; text-transform: uppercase; color: var(--ink-3);
  display: block; margin-bottom: .5rem;
}
.step h3 { font-size: var(--step-1); }
.step p { margin-top: .5rem; color: var(--ink-2); font-size: .94rem; }
.step__meta {
  margin-top: .85rem; font-size: .8rem; color: var(--accent);
  font-family: var(--font-mono); letter-spacing: .04em;
}

/* --- 12. Inverse block --------------------------------------------------- */

.inverse { background: var(--inverse); color: var(--inverse-ink); }
.inverse h2, .inverse h3 { color: var(--inverse-ink); }
.inverse p { color: color-mix(in srgb, var(--inverse-ink) 74%, transparent); }
.inverse .eyebrow { color: #FF8B5E; }
.inverse .principle {
  border-top: 1px solid color-mix(in srgb, var(--inverse-ink) 16%, transparent);
  padding-top: var(--sp-3);
}
.inverse .principle h3 { font-size: var(--step-1); }
.inverse .principle p { margin-top: .5rem; font-size: .95rem; }
:root[data-theme="dark"] .inverse .eyebrow { color: #C2451E; }

/* --- 13. FAQ ------------------------------------------------------------- */

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-4) 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -.012em;
  line-height: 1.3;
  transition: color .15s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary .plus {
  flex: none; width: 22px; height: 22px; margin-top: .25rem;
  position: relative; color: var(--ink-3);
}
.faq summary .plus::before,
.faq summary .plus::after {
  content: ""; position: absolute; inset: 50% 2px auto 2px;
  height: 1.5px; background: currentColor; border-radius: 2px;
  transition: transform .22s var(--ease);
}
.faq summary .plus::after { transform: rotate(90deg); }
.faq details[open] summary .plus::after { transform: rotate(0deg); }
.faq details[open] summary { color: var(--accent); }
.faq__answer { padding-bottom: var(--sp-4); max-width: 68ch; color: var(--ink-2); }
.faq__answer > * + * { margin-top: var(--sp-2); }

/* --- 14. Forms ----------------------------------------------------------- */

.form-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.35rem, 4vw, var(--sp-5));
  box-shadow: var(--shadow-md);
}
.field { display: block; }
/* Stack spacing only between top-level rows/fields — scoped with `form >` so it
   doesn't also match two .field siblings that share a .form-row grid (that
   match previously gave the second column extra margin-top, knocking it out
   of alignment with the first). */
form > .field + .field,
form > .form-row + .field,
form > .field + .form-row,
form > .form-row + .form-row { margin-top: var(--sp-3); }
.form-row { display: grid; gap: var(--sp-3); }
.form-row > .field + .field { margin-top: 0; }
@media (min-width: 620px) { .form-row { grid-template-columns: 1fr 1fr; } }

.field > span.label {
  display: block; font-size: .85rem; font-weight: 600;
  margin-bottom: .4rem; color: var(--ink);
}
.field .req { color: var(--accent); }
.field .hint { display: block; font-weight: 400; color: var(--ink-3); font-size: .8rem; margin-top: .2rem; }

.input, .select, .textarea {
  width: 100%;
  padding: .72rem .9rem;
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  font-size: .96rem;
  color: var(--ink);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease);
  appearance: none;
}
.textarea { min-height: 130px; resize: vertical; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); opacity: .75; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent-fill);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-fill) 16%, transparent);
  background: var(--surface);
}
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235C6572' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .85rem center;
  padding-right: 2.4rem;
}
:root[data-theme="dark"] .select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23838C98' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.checkline {
  display: grid; grid-template-columns: auto 1fr; gap: .65rem;
  align-items: start; font-size: .88rem; color: var(--ink-2);
  margin-top: var(--sp-3);
}
.checkline input { margin-top: .28rem; width: 16px; height: 16px; accent-color: var(--accent-fill); }

.hp { position: absolute !important; left: -9999px; opacity: 0; height: 0; width: 0; }

.form-status {
  margin-top: var(--sp-3);
  padding: .8rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status--ok  { background: var(--teal-soft); color: var(--teal); border: 1px solid color-mix(in srgb, var(--teal) 28%, transparent); }
.form-status--err { background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); }

.form-success { display: none; text-align: center; padding: var(--sp-4) 0; }
.form-success.is-visible { display: block; }
.form-success__icon {
  width: 56px; height: 56px; margin: 0 auto var(--sp-3);
  border-radius: 50%; display: grid; place-items: center;
  background: var(--teal-soft); color: var(--teal);
}

.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }

/* --- 15. CTA band -------------------------------------------------------- */

.cta-band { position: relative; overflow: hidden; }
.cta-band__inner { display: grid; gap: var(--sp-5); align-items: start; }
@media (min-width: 940px) {
  .cta-band__inner { grid-template-columns: 1fr 1.05fr; gap: var(--sp-6); }
}
.cta-list { list-style: none; padding: 0; display: grid; gap: var(--sp-3); margin-top: var(--sp-4); }
.cta-list li { display: grid; grid-template-columns: 26px 1fr; gap: .75rem; font-size: .95rem; }
.cta-list .n {
  font-family: var(--font-mono); font-size: .75rem; color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 50%; width: 24px; height: 24px;
  display: grid; place-items: center;
}

/* --- 16. Footer ---------------------------------------------------------- */

.footer {
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  padding-block: var(--sp-6) var(--sp-4);
}
.footer__grid { display: grid; gap: var(--sp-5); }
@media (min-width: 800px) { .footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--sp-4); } }
.footer h4 {
  font-family: var(--font-body); font-size: .78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3);
  margin-bottom: var(--sp-2);
}
.footer ul { list-style: none; padding: 0; display: grid; gap: .55rem; }
.footer a { color: var(--ink-2); text-decoration: none; font-size: .93rem; }
.footer a:hover { color: var(--accent); text-decoration: underline; }
.footer__bottom {
  margin-top: var(--sp-5); padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4);
  justify-content: space-between; align-items: center;
  font-size: .85rem; color: var(--ink-3);
}

/* --- 17. Interior page header -------------------------------------------- */

.page-head {
  padding-block: clamp(2.5rem, 6vw, var(--sp-7)) clamp(2rem, 4vw, var(--sp-5));
  border-bottom: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.page-head::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(50% 70% at 88% 0%, color-mix(in srgb, var(--accent-fill) 9%, transparent), transparent 65%);
  pointer-events: none;
}
.page-head__inner { position: relative; }
.page-head h1 { margin-top: var(--sp-3); font-size: var(--step-4); max-width: 20ch; }
.page-head .lede { margin-top: var(--sp-3); max-width: 60ch; }

.breadcrumb { font-size: .84rem; color: var(--ink-3); }
.breadcrumb a { color: var(--ink-3); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

/* --- 18. Prose ----------------------------------------------------------- */

.prose { max-width: 68ch; }
.prose > * + * { margin-top: var(--sp-3); }
.prose h2 { font-size: var(--step-3); margin-top: var(--sp-6); }
.prose h3 { font-size: var(--step-1); margin-top: var(--sp-5); }
.prose ul, .prose ol { padding-left: 1.2rem; display: grid; gap: .5rem; color: var(--ink-2); }
.prose li::marker { color: var(--accent); }
.prose blockquote {
  border-left: 2px solid var(--accent-fill);
  padding-left: var(--sp-3);
  font-family: var(--font-display);
  font-size: var(--step-1);
  color: var(--ink);
}

/* --- 19. Utility --------------------------------------------------------- */

.divider { height: 1px; background: var(--line); border: 0; }
.pill {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .32rem .75rem; border-radius: 100px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: .8rem; color: var(--ink-2);
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }

.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .header, .footer, .mobile-nav, .hero__grid, .btn { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Focused service-led layout. Shared with the interior pages. */
:root { --radius: 5px; --radius-sm: 4px; }
.btn { border-radius: 4px; }
.btn:hover { box-shadow: none; }
.eyebrow { font-size: .875rem; letter-spacing: .08em; }
.brand__name span { font-family: var(--font-body); font-size: .75rem; letter-spacing: .015em; text-transform: none; margin-top: .3rem; }
.header { border-bottom: 1px solid var(--line); }
.header__inner { min-height: 84px; }
.section { padding-block: clamp(3rem, 6vw, 5.5rem); }
.intro { padding-block: clamp(3.5rem, 7vw, 6.5rem); }
.intro__layout { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.intro h1 { font-size: clamp(3.2rem, 5.7vw, 5rem); margin-block: 1.3rem 1.5rem; line-height: 1.03; letter-spacing: -.04em; }
.intro h1 em { color: var(--accent); font-weight: 500; }
.intro .lede { max-width: 34ch; font-size: 1.35rem; line-height: 1.45; color: var(--ink); }
.intro__description { color: var(--ink-2); margin-block: 1.1rem 1.8rem; max-width: 43ch; }
.starting-points { padding: 2rem 1.8rem; background: var(--surface-2); border-top: 3px solid var(--accent-fill); }
.starting-points > p { margin-bottom: 1.2rem; }
.starting-points a { display: grid; grid-template-columns: auto 1fr auto; gap: .85rem; align-items: baseline; padding-block: 1.5rem; border-bottom: 1px solid var(--line-2); color: var(--ink); text-decoration: none; line-height: 1.4; font-weight: 600; }
.starting-points a:last-child { border-bottom: 0; padding-bottom: .4rem; }
.starting-points a:hover { color: var(--accent); }
.starting-points__number { font-family: var(--font-mono); font-size: .875rem; color: var(--accent); }
.starting-points small { display: block; margin-top: .45rem; color: var(--ink-2); font-size: .875rem; font-weight: 400; }
.section-heading, .working-note { display: grid; grid-template-columns: 1fr 3fr; gap: 2rem; }
/* No font-size override: these use the global h2 (--step-4), like .offer-intro
   h2 does. The old clamp floor (1.9rem) sat within a few px of the global h3
   at mid viewports, flattening section headings into the card titles below. */
.section-heading p:not(.eyebrow) { margin-top: .9rem; color: var(--ink-2); }
.services-overview { border-top: 1px solid var(--line); }
.service-index { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3rem; }
.service-index article { border-top: 1px solid var(--ink-3); padding-top: 1.2rem; }
.service-index__number { color: var(--accent); font-family: var(--font-mono); font-size: .875rem; }
.service-index h3 { margin-block: 1.25rem .85rem; }
.service-index p { color: var(--ink-2); font-size: 1rem; }
.service-index .service-index__topics { margin-top: 1.25rem; font-size: .875rem; color: var(--accent); }
.audience-section { background: var(--surface-2); }
.audience-layout { display: grid; grid-template-columns: 1fr 1.4fr; gap: 4rem; }
.audience-layout h2 { margin-top: 1rem; }
.audience-options article + article { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--line-2); }
.audience-options p { margin-block: .8rem 1rem; color: var(--ink-2); }
.working-note p:not(.eyebrow) { margin-block: 1.3rem; color: var(--ink-2); max-width: 60ch; }
.closing { padding-block: 3.5rem; background: var(--surface-2); border-top: 1px solid var(--line); }
.closing__inner { display: flex; gap: 2rem; align-items: center; justify-content: space-between; }
.closing h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin-top: .9rem; }
.closing .btn { flex-shrink: 0; }
.page-head::before { display: none; }
.page-head h1 { max-width: 21ch; }
.page-head .lede { max-width: 56ch; }
.offer-list { border-top: 1px solid var(--line-2); }
.offer-row { display: grid; grid-template-columns: .45fr 1.3fr 2fr; gap: 2rem; padding-block: 2rem; border-bottom: 1px solid var(--line-2); scroll-margin-top: 7rem; }
.offer-row h3 { font-size: 1.6rem; }
.offer-row p { color: var(--ink-2); }
.offer-row .offer-example { font-size: .9375rem; margin-top: .75rem; color: var(--ink); }
.offer-row .offer-number { font-family: var(--font-mono); color: var(--accent); font-size: .875rem; }
/* Marks a service that is offered but not yet delivered for a client. */
.offer-stage {
  display: inline-block; margin-top: .9rem; padding: .22rem .65rem;
  border-radius: 100px; background: var(--teal-soft); color: var(--teal);
  font-family: var(--font-mono); font-size: .7rem;
  letter-spacing: .1em; text-transform: uppercase;
}
.offer-intro { margin-bottom: 2.5rem; }
.offer-intro p { margin-top: .9rem; color: var(--ink-2); max-width: 58ch; }
.editorial-split { display: grid; grid-template-columns: 1fr 1.5fr; gap: 4rem; }
.editorial-split h2 { font-size: 2.3rem; margin-top: 1rem; }
.editorial-split .stack h3 { font-family: var(--font-body); font-size: 1.15rem; }
.editorial-split .stack p { color: var(--ink-2); }
.editorial-split .stack article + article { padding-top: 1.6rem; border-top: 1px solid var(--line-2); }
.editorial-split .stack article p { margin-top: .5rem; }
.contact-layout { display: grid; grid-template-columns: 1fr 1.15fr; gap: 4rem; align-items: start; }
.contact-layout h1 { font-size: clamp(2.5rem, 4vw, 3.7rem); margin-block: 1rem 1.5rem; }
.contact-layout .lede { font-size: 1.15rem; }
.contact-note { margin-top: 2rem; color: var(--ink-2); }
.form-shell { box-shadow: none; }
.footer { padding-top: 3rem; }
.footer-simple { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.footer-simple nav { display: flex; flex-wrap: wrap; gap: 1.3rem; align-items: center; }
.reveal { opacity: 1; transform: none; }
@media (max-width: 939px) {
  .intro__layout { grid-template-columns: 1fr; }
  .intro__copy { max-width: 650px; }
  .starting-points { max-width: 650px; }
  .section-heading, .working-note { grid-template-columns: 1fr; gap: 1rem; }
  .audience-layout, .editorial-split, .contact-layout { grid-template-columns: 1fr; gap: 2.5rem; }
}
@media (max-width: 679px) {
  .service-index { grid-template-columns: 1fr; gap: 2rem; }
  .service-index h3 { margin-top: .7rem; }
  .offer-row { grid-template-columns: 2rem 1fr; gap: .75rem; }
  .offer-row > div { grid-column: 2; }
  .closing__inner { align-items: flex-start; flex-direction: column; }
  .starting-points { padding: 1.5rem 1.1rem; }
  .intro h1 { font-size: clamp(2.8rem, 10vw, 4.4rem); }
  .header__inner { gap: .5rem; }
  .brand { font-size: .9375rem; }
  .brand__mark { width: 26px; height: 26px; }
  .icon-btn { width: 40px; height: 40px; }
  .form-shell { padding: 1.2rem; }
}

.btn:disabled { opacity: .65; cursor: not-allowed; transform: none; box-shadow: none; }
@media (max-width: 380px) {
  .header .brand__name b { max-width: 130px; line-height: 1.15; }
  .header .brand__name span { display: none; }
}

.experience-line { font-size: .875rem; color: var(--ink-2); margin-block: -.5rem 1.5rem; }

/* Guides use a quiet reading layout and the existing brand typography. */
.nav a { padding-inline: .45rem; font-size: .875rem; }
.guide-list { border-top: 1px solid var(--line-2); }
.guide-row { display: grid; grid-template-columns: 1fr 2.5fr auto; gap: 2rem; align-items: baseline; padding-block: 2rem; border-bottom: 1px solid var(--line-2); }
.guide-row h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.2; }
.guide-row h3 a { color: var(--ink); text-decoration: none; }
.guide-row h3 a:hover { color: var(--accent); text-decoration: underline; }
.guide-row p:not(.eyebrow) { color: var(--ink-2); margin-top: .75rem; }
.guide-read { font-size: .9375rem; white-space: nowrap; }
.guide-article { padding-block: 3rem 5rem; }
.guide-article__head { margin-bottom: 2.5rem; }
.guide-article__head > .eyebrow { margin-top: 2.5rem; }
.guide-article__head h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); max-width: 23ch; margin-block: 1rem 1.5rem; }
.guide-article__head .lede { max-width: 55ch; }
.guide-byline { font-size: .875rem; margin-top: 1.5rem; color: var(--ink-2); }
.guide-prose { max-width: 68ch; }
.guide-prose h2 { line-height: 1.2; }
.guide-prose > p { color: var(--ink-2); }
.guide-example { border-left: 3px solid var(--accent-fill); background: var(--surface-2); padding: 1.5rem; }
.guide-example > * + * { margin-top: 1rem; }
.guide-help { margin-top: 3rem; padding: 1.5rem; background: var(--surface-2); }
.guide-help h2, .guide-related h2 { font-size: 1.5rem; margin: 0 0 1rem; }
.guide-help p { margin-bottom: 1rem; }
.guide-related { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line-2); }
.guide-related ul { gap: .75rem; }
.working-note .home-guide-link { margin-bottom: 0; font-size: .9375rem; }
@media (max-width: 799px) {
  .guide-row { grid-template-columns: 1fr; gap: .8rem; }
  .guide-read { justify-self: start; padding-block: .5rem; }
}

/* Selected work and newsletter signup. */
.project-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 3rem; margin-top: 3rem; }
.project-entry { border-top: 1px solid var(--line-2); padding-top: 1.5rem; display: flex; flex-direction: column; align-items: flex-start; }
/* Explicit size rather than the global h3 (--step-2): these are card titles in
   a two-column grid, so they sit a clear step below the section heading. */
.project-entry h3 { font-size: 1.35rem; margin-block: .8rem 1rem; }
.project-entry > p:not(.eyebrow) { color: var(--ink-2); margin-bottom: 1.25rem; }
.project-entry .link-arrow { margin-top: auto; }
.newsletter-band { background: var(--paper); border-top: 1px solid var(--line-2); padding-block: 3.5rem; }
.newsletter-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: start; }
.newsletter-layout h2 { font-size: 2.3rem; margin-block: .85rem 1rem; }
.newsletter-layout > div > p:not(.eyebrow) { max-width: 37ch; color: var(--ink-2); }
.newsletter-fields { display: flex; align-items: flex-end; gap: .75rem; }
.newsletter-fields .field { flex: 1; min-width: 0; }
.newsletter-fields .btn { flex-shrink: 0; min-height: 3rem; }
.newsletter-privacy { color: var(--ink-2); font-size: .875rem; margin-top: .8rem; }
.newsletter-page { max-width: 760px; }
.newsletter-page h1 { margin-block: 1.2rem 1.5rem; }
.newsletter-page .newsletter-signup { margin-top: 2.5rem; }
.newsletter-signup .form-success { text-align: left; }
.newsletter-signup .form-success p { margin-top: .8rem; }
@media (max-width: 799px) {
  .project-list, .newsletter-layout { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 479px) {
  .newsletter-fields { align-items: stretch; flex-direction: column; }
}
