@import url('fonts.css');

/* ==========================================================================
   David Otwili, Advocate — design system
   Tokens mirror BRAND.md. Sharp corners, hairlines, paper tones.
   ========================================================================== */

:root {
  --ink: #12100e;
  --ink-2: #211d19;
  --ink-3: #3a342c;
  --ink-4: #6b6255;
  --paper: #f8f4ec;
  --paper-2: #efe8db;
  --paper-3: #e6ddcc;
  --line: #ded4c2;
  --line-dark: #3a342c;
  --brass: #b08430;
  --brass-dim: #8a6524;
  --brass-light: #d8b063;
  --clay: #9e4430;
  --sage: #3e5a4a;

  --serif: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: 'Inter', ui-sans-serif, 'Segoe UI Variable Text', 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', 'SFMono-Regular', Consolas, monospace;

  --wrap: 1180px;
  --gut: 24px;
  --pad-y: clamp(64px, 9vw, 128px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --step-1: clamp(1.13rem, 1.06rem + 0.34vw, 1.32rem);
  --step-2: clamp(1.3rem, 1.18rem + 0.6vw, 1.68rem);
  --step-3: clamp(1.6rem, 1.36rem + 1.2vw, 2.3rem);
  --step-4: clamp(2rem, 1.5rem + 2.4vw, 3.3rem);
  --step-5: clamp(2.5rem, 1.6rem + 4.4vw, 5rem);
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

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

/* paper grain — barely there, keeps flat colour from feeling synthetic */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--brass); color: var(--paper); }

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

h1, h2, h3, h4 {  font-family: var(--serif);
  font-weight: 380;
  font-variation-settings: 'opsz' 96, 'SOFT' 20, 'WONK' 0;
  letter-spacing: -0.021em;
  line-height: 1.06;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); line-height: 1.16; letter-spacing: -0.012em; }
h4 { font-size: var(--step-1); line-height: 1.2; letter-spacing: -0.008em; }

/* Section headings that sit directly under an h1 or inside a panel. Kept as
   real h2 elements so the document outline never skips a level. */
.subhead { font-size: var(--step-2); margin-top: 2.6em; }
.panel-h { font-size: 1.05rem; margin-bottom: 0.5em; }

p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 600; }
em { font-style: italic; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
  position: relative;
  z-index: 2;
}

.section { padding-block: var(--pad-y); position: relative; }
.section--tight { padding-block: clamp(44px, 6vw, 76px); }
.section--paper2 { background: var(--paper-2); }
.section--dark { background: var(--ink); color: var(--paper); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: var(--paper); }
.section--dark .lede { color: #cfc4b2; }

/* --------------------------------------------------------------------------
   Type utilities
   -------------------------------------------------------------------------- */

.eyebrow {
  font-family: var(--sans);
  font-size: 0.715rem;
  font-weight: 600;
  letter-spacing: 0.155em;
  text-transform: uppercase;
  color: var(--brass-dim);
  margin: 0 0 1.35em;
  display: flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--brass);
  flex: none;
}
.section--dark .eyebrow { color: var(--brass-light); }

.lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-3);
  max-width: 34ch;
}
.lede--wide { max-width: 58ch; }
.prose { max-width: 68ch; }
.prose p { font-size: var(--step-0); }
.prose--tight { max-width: 54ch; }

.dropcap::first-letter {
  font-family: var(--serif);
  float: left;
  font-size: 3.6em;
  line-height: 0.82;
  padding: 0.06em 0.1em 0 0;
  color: var(--brass-dim);
}

.cite {
  font-family: var(--mono);
  font-size: 0.8em;
  letter-spacing: -0.01em;
  color: var(--ink-3);
  background: var(--paper-3);
  padding: 0.14em 0.42em;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.section--dark .cite { background: #2b2620; color: #ddd2c0; border-color: var(--line-dark); }

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}
.section--dark .rule { background: var(--line-dark); }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 20px;
  z-index: 200;
}
.skip:focus { left: 12px; top: 12px; }

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.header[data-stuck='true'] {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--paper) 95%, transparent);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-right: auto;
  flex: none;
}
.brand__mark {
  width: 40px;
  height: 40px;
  flex: none;
}
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name {
  font-family: var(--serif);
  font-size: 1.16rem;
  letter-spacing: -0.015em;
  font-variation-settings: 'opsz' 40;
}
.brand__sub {
  font-size: 0.6rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-top: 5px;
  font-weight: 500;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  text-decoration: none;
  font-size: 0.865rem;
  font-weight: 450;
  color: var(--ink-3);
  padding: 10px 13px;
  position: relative;
  transition: color 0.2s var(--ease);
}
.nav a::after {
  content: '';
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 5px;
  height: 1px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current='page']::after { transform: scaleX(1); }
.nav a[aria-current='page'] { color: var(--ink); }

.header__cta { display: flex; align-items: center; gap: 10px; flex: none; }

.burger {
  display: none;
  background: none;
  border: 1px solid var(--line);
  padding: 10px;
  cursor: pointer;
  color: var(--ink);
  line-height: 0;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 550;
  letter-spacing: 0.005em;
  padding: 14px 24px;
  min-height: 46px;
  text-decoration: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: background 0.22s var(--ease), color 0.22s var(--ease),
    border-color 0.22s var(--ease), transform 0.22s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: var(--brass-dim); border-color: var(--brass-dim); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

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

.btn--brass { background: var(--brass); border-color: var(--brass); color: var(--ink); }
.btn--brass:hover { background: var(--brass-light); border-color: var(--brass-light); }

.btn--sm { padding: 10px 16px; min-height: 38px; font-size: 0.8rem; }
.btn--lg { padding: 17px 32px; min-height: 54px; font-size: 0.94rem; }

.section--dark .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.section--dark .btn:hover { background: var(--brass); border-color: var(--brass); }
.section--dark .btn--ghost { background: transparent; color: var(--paper); border-color: #4a433a; }
.section--dark .btn--ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 550;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--brass);
  padding-bottom: 3px;
  transition: gap 0.24s var(--ease), color 0.2s var(--ease);
}
.link-arrow:hover { gap: 14px; color: var(--brass-dim); }
.link-arrow svg { flex: none; }
.section--dark .link-arrow { color: var(--paper); }

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

.hero {
  position: relative;
  padding-block: clamp(56px, 8vw, 104px) clamp(48px, 7vw, 92px);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero h1 { margin-bottom: 0.42em; }
.hero h1 em {
  font-style: italic;
  color: var(--brass-dim);
  font-variation-settings: 'opsz' 144, 'SOFT' 40;
}
.hero__sub {
  font-size: var(--step-1);
  color: var(--ink-3);
  max-width: 44ch;
  line-height: 1.55;
  margin-bottom: 2em;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 2.4em; }

.hero__figure { position: relative; }
.hero__figure svg { width: 100%; height: auto; }
.hero__figure img { width: 100%; height: auto; }

.hero__note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--ink-4);
  line-height: 1.5;
  max-width: 40ch;
  padding-top: 1.4em;
  border-top: 1px solid var(--line);
}
.hero__note svg { flex: none; margin-top: 2px; color: var(--brass); }

/* credential strip */
.strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.strip__inner {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 32px);
  padding-block: 20px;
  flex-wrap: wrap;
}
.strip__label {
  font-size: 0.66rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--ink-4);
  font-weight: 600;
  flex: none;
}
.strip__items {
  display: flex;
  gap: clamp(10px, 2vw, 26px);
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
}
.strip__item {
  font-family: var(--serif);
  font-size: 0.92rem;
  color: var(--ink-2);
  letter-spacing: -0.008em;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.strip__item span { color: var(--brass); font-family: var(--sans); font-size: 0.6rem; }

/* --------------------------------------------------------------------------
   Sections: split, areas, cards
   -------------------------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.split--even { grid-template-columns: 1fr 1fr; }
.split--rev > :first-child { order: 2; }

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: clamp(32px, 4vw, 56px);
}
.section__head h2 { margin: 0; max-width: 22ch; }

.areas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  border-top: 1px solid var(--line);
}
.area {
  display: block;
  text-decoration: none;
  padding: 30px 32px 32px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background 0.25s var(--ease), padding-left 0.25s var(--ease);
}
.area::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--brass);
  transition: width 0.25s var(--ease);
}
.area:hover { padding-left: 22px; background: color-mix(in srgb, var(--paper-2) 60%, transparent); }
.area:hover::before { width: 2px; }
.area__num {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--brass-dim);
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 14px;
}
.area h3, .area h2 { font-size: 1.32rem; margin-bottom: 0.4em; line-height: 1.16; letter-spacing: -0.012em; }
.area p { font-size: 0.9rem; color: var(--ink-3); margin: 0; max-width: 40ch; line-height: 1.55; }
.area__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 550;
  color: var(--brass-dim);
  margin-top: 16px;
  letter-spacing: 0.01em;
}
.area:hover .area__more { gap: 11px; }
.area__more { transition: gap 0.24s var(--ease); }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: clamp(24px, 3vw, 36px);
}
.card--flat { background: transparent; }
.card--dark { background: var(--ink-2); border-color: var(--line-dark); color: var(--paper); }

.tag {
  display: inline-block;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 5px 9px;
  border: 1px solid var(--line);
  color: var(--ink-4);
  background: var(--paper);
}
.tag--brass { border-color: var(--brass); color: var(--brass-dim); }
.tag--clay { border-color: var(--clay); color: var(--clay); background: #f7ece8; }
.tag--sage { border-color: var(--sage); color: var(--sage); background: #eaf0eb; }

/* stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.stat { background: var(--paper); padding: 26px 28px; }
.stat__n {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.03em;
  display: block;
  margin-bottom: 8px;
  font-variation-settings: 'opsz' 96;
}
.stat__l { font-size: 0.78rem; color: var(--ink-4); line-height: 1.4; display: block; }

/* process steps */
.steps { counter-reset: s; display: grid; gap: 0; border-top: 1px solid var(--line); }
.step {
  counter-increment: s;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  column-gap: 20px;
  row-gap: 6px;
  padding-block: 26px;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
/* The counter is a grid item too — pin it to the first column and let every
   real child live in the second, or the copy collapses into 64px. */
.step::before {
  content: '0' counter(s);
  grid-column: 1;
  grid-row: 1 / span 4;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--brass-dim);
  padding-top: 4px;
  letter-spacing: 0.04em;
}
.step > * { grid-column: 2; }
.step h3 { font-size: 1.2rem; margin-bottom: 0.3em; }
.step p { font-size: 0.9rem; color: var(--ink-3); margin: 0; max-width: 56ch; }

/* pull quote */
.pullquote {
  font-family: var(--serif);
  font-size: var(--step-3);
  line-height: 1.24;
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 120;
  max-width: 26ch;
  margin: 0;
  color: var(--ink);
}
.pullquote cite {
  display: block;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass-dim);
  margin-top: 1.6em;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   AI / Ask Counsel
   -------------------------------------------------------------------------- */

.ai {
  border: 1px solid var(--line);
  background: var(--paper);
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 520px;
}
.ai__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}
.ai__dot {
  width: 7px;
  height: 7px;
  background: var(--sage);
  border-radius: 50%;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sage) 18%, transparent);
  flex: none;
}
.ai__title { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.02em; }
.ai__meta { font-family: var(--mono); font-size: 0.68rem; color: var(--ink-4); margin-left: auto; }

.ai__log {
  padding: 24px 20px;
  overflow-y: visible;
  display: flex;
  flex-direction: column;
  gap: 18px;
  scroll-behavior: smooth;
}
.ai__log:empty { display: none; }

.msg { max-width: 92%; font-size: 0.9rem; line-height: 1.6; }
.msg--user {
  align-self: flex-end;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 16px;
}
.msg--ai { align-self: flex-start; width: 100%; max-width: 100%; }
.msg--ai > * + * { margin-top: 14px; }

.ai__empty {
  padding: 34px 24px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.ai__empty h4 { font-size: 1.05rem; margin-bottom: 0.5em; }
.ai__empty p { font-size: 0.86rem; color: var(--ink-4); margin-bottom: 1.2em; }

.suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.suggest button {
  font-family: var(--sans);
  font-size: 0.78rem;
  padding: 9px 13px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-3);
  cursor: pointer;
  text-align: left;
  line-height: 1.35;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}
.suggest button:hover { border-color: var(--brass); color: var(--ink); background: var(--paper-2); }

.ai__input {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.ai__input textarea {
  flex: 1;
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.5;
  padding: 16px 18px;
  resize: none;
  color: var(--ink);
  min-height: 56px;
  max-height: 160px;
}
.ai__input textarea:focus { outline: none; }
.ai__input textarea::placeholder { color: var(--ink-4); }
.ai__send {
  border: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0 22px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 550;
  transition: background 0.2s var(--ease);
  flex: none;
}
.ai__send:hover { background: var(--brass-dim); }
.ai__send:disabled { opacity: 0.45; cursor: not-allowed; }

/* answer blocks */
.ans__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.ans__area {
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--brass-dim);
}
.ans h5 {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin: 20px 0 9px;
  font-weight: 600;
}
.ans h5:first-child { margin-top: 0; }
.ans p { font-size: 0.88rem; line-height: 1.62; margin-bottom: 0.8em; }
.ans ul, .ans ol { margin: 0 0 0.8em; padding-left: 1.1em; font-size: 0.88rem; line-height: 1.6; }
.ans li { margin-bottom: 0.4em; }
.ans li::marker { color: var(--brass); }

.auth {
  border-left: 2px solid var(--brass);
  padding: 10px 0 10px 14px;
  margin-bottom: 10px;
  font-size: 0.84rem;
}
.auth__t { font-weight: 600; display: block; margin-bottom: 2px; }
.auth__c {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--ink-4);
  display: block;
  margin-bottom: 4px;
}
.auth__h { color: var(--ink-3); font-size: 0.83rem; display: block; }
.auth a { color: var(--brass-dim); }

.alert {
  border: 1px solid var(--clay);
  background: #faf0ec;
  padding: 14px 16px;
  font-size: 0.84rem;
  line-height: 1.55;
  display: flex;
  gap: 11px;
  align-items: flex-start;
}
.alert svg { flex: none; color: var(--clay); margin-top: 2px; }
.alert strong { color: var(--clay); }

.disclaimer {
  font-size: 0.73rem;
  line-height: 1.5;
  color: var(--ink-4);
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 16px;
}

.typing { display: inline-flex; gap: 4px; align-items: center; }
.typing i {
  width: 5px;
  height: 5px;
  background: var(--brass);
  border-radius: 50%;
  animation: blink 1.3s infinite both;
}
.typing i:nth-child(2) { animation-delay: 0.18s; }
.typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes blink {
  0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

/* briefing pack */
.pack {
  border: 1px solid var(--line);
  background: #fffdf8;
  padding: clamp(24px, 4vw, 44px);
  font-size: 0.86rem;
  line-height: 1.6;
}
.pack__h {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 14px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.pack__h h4 { margin: 0; font-size: 1.25rem; }
.pack__ref { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-4); }
.pack dl { margin: 0 0 20px; display: grid; grid-template-columns: 130px 1fr; gap: 8px 16px; font-size: 0.83rem; }
.pack dt { color: var(--ink-4); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; padding-top: 3px; }
.pack dd { margin: 0; }
.pack h5 {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--brass-dim);
  margin: 24px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.pack ol, .pack ul { padding-left: 1.2em; margin: 0 0 12px; }
.pack li { margin-bottom: 5px; }

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  padding: 20px 44px 20px 0;
  font-family: var(--serif);
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  list-style: none;
  position: relative;
  transition: color 0.2s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--brass-dim); }
.faq summary::after {
  content: '';
  position: absolute;
  right: 8px;
  top: 50%;
  width: 11px;
  height: 11px;
  border-right: 1px solid var(--brass);
  border-bottom: 1px solid var(--brass);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details > div {
  padding: 0 44px 24px 0;
  font-size: 0.91rem;
  color: var(--ink-3);
  line-height: 1.62;
  max-width: 72ch;
}

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

.footer {
  background: var(--ink);
  color: #b8ad9b;
  padding-block: clamp(48px, 6vw, 80px) 28px;
  font-size: 0.86rem;
  position: relative;
  z-index: 2;
}
.footer a { color: #ddd2c0; text-decoration: none; transition: color 0.2s var(--ease); }
.footer a:hover { color: var(--brass-light); }
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: clamp(24px, 4vw, 56px);
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line-dark);
}
.footer h2.footer__title {
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.4em;
  font-weight: 600;
  line-height: 1.4;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer__brand .brand__name { color: var(--paper); }
.footer__brand .brand__sub { color: #8b8170; }
.footer__blurb { margin-top: 18px; max-width: 34ch; line-height: 1.6; font-size: 0.82rem; color: #8b8170; }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 24px;
  font-size: 0.74rem;
  color: #7d7466;
}
.footer__legal { max-width: 74ch; line-height: 1.55; margin-bottom: 16px; font-size: 0.73rem; color: #7d7466; }

/* --------------------------------------------------------------------------
   Floating contact
   -------------------------------------------------------------------------- */

.dock {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}
.dock a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  font-size: 0.82rem;
  font-weight: 550;
  text-decoration: none;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 0 6px 24px rgba(18, 16, 14, 0.16);
  transition: transform 0.22s var(--ease), background 0.22s var(--ease);
}
.dock a:hover { transform: translateY(-2px); background: var(--brass-dim); border-color: var(--brass-dim); }
.dock a.dock--wa { background: #1f7a4d; border-color: #1f7a4d; }
.dock a.dock--wa:hover { background: #186340; border-color: #186340; }

/* --------------------------------------------------------------------------
   Photography
   Treated as duotone so sourced photographs sit inside the palette instead of
   fighting it. Credits are always visible — the licences require it.
   -------------------------------------------------------------------------- */

.photo-band { position: relative; background: var(--ink); }
.photo-band img {
  width: 100%;
  height: clamp(240px, 40vw, 440px);
  object-fit: cover;
  object-position: center;
  display: block;
  filter: grayscale(0.35) sepia(0.14) contrast(1.03) saturate(0.85);
}
.photo-band__cap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px 28px;
  flex-wrap: wrap;
  padding-block: 12px;
  font-size: 0.7rem;
  letter-spacing: 0.01em;
  color: #8b8170;
  background: var(--ink);
}
.photo-band__cap a { color: #8b8170; text-decoration: underline; text-underline-offset: 3px; }
.photo-band__cap a:hover { color: var(--brass-light); }
.photo-band__cap em { font-style: normal; color: #b8ad9b; }

.photo { margin: 0; }
.photo img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(0.3) sepia(0.12) contrast(1.02) saturate(0.9);
}
.photo figcaption {
  font-size: 0.7rem;
  color: var(--ink-4);
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  line-height: 1.5;
}
.photo figcaption a { color: var(--ink-4); text-decoration: underline; text-underline-offset: 2px; }

.photo-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 700px) {
  .photo-duo { grid-template-columns: 1fr; }
}

/* Credits block on the legal page */
.credits { list-style: none; padding: 0; margin: 1.2em 0 0; display: grid; gap: 12px; font-size: 0.86rem; }
.credits li { padding-left: 14px; border-left: 1px solid var(--line); color: var(--ink-3); line-height: 1.5; }
.credits a { color: var(--brass-dim); }

/* --------------------------------------------------------------------------
   Reveal on scroll
   -------------------------------------------------------------------------- */

/* Content is visible by default. The reveal is additive: if JS fails, or the
   observer never fires, the page is still readable. Never hide copy. */
[data-reveal].is-in {
  animation: revealIn 0.6s var(--ease) both;
}
@keyframes revealIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Page hero (interior pages)
   -------------------------------------------------------------------------- */

.pagehead {
  padding-block: clamp(44px, 6vw, 84px) clamp(36px, 5vw, 60px);
  border-bottom: 1px solid var(--line);
}
.pagehead h1 { font-size: clamp(2.2rem, 4.6vw, 3.8rem); max-width: 20ch; }
.pagehead .lede { max-width: 60ch; margin-top: 1.1em; }
.crumbs {
  font-size: 0.74rem;
  color: var(--ink-4);
  margin-bottom: 1.6em;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.crumbs a { color: var(--ink-4); text-decoration: none; }
.crumbs a:hover { color: var(--brass-dim); }
.crumbs span { color: var(--line); }

/* article */
.article { max-width: 68ch; }
.article h2 { font-size: var(--step-3); margin-top: 2.2em; }
.article h3 { margin-top: 1.9em; }
.article p, .article li { font-size: 1.01rem; line-height: 1.72; color: var(--ink-2); }
.article ul, .article ol { margin-bottom: 1.3em; padding-left: 1.3em; }
.article li { margin-bottom: 0.5em; }
.article blockquote {
  margin: 2em 0;
  padding-left: 22px;
  border-left: 2px solid var(--brass);
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.4;
  color: var(--ink);
}
.article table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 0.9rem; }
.article th, .article td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.article th {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-4);
  font-weight: 600;
  border-bottom: 1px solid var(--ink);
}
.article code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--paper-2);
  padding: 0.12em 0.36em;
  border-bottom: 1px solid var(--line);
}

.byline {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 2.4em 0;
  font-size: 0.8rem;
  color: var(--ink-4);
  flex-wrap: wrap;
}
.byline strong { color: var(--ink); font-weight: 600; }
.byline .dot { color: var(--line); }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-4);
}
.field input, .field select, .field textarea {
  font-family: var(--sans);
  font-size: 0.92rem;
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  width: 100%;
  transition: border-color 0.2s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brass);
}
.field textarea { resize: vertical; min-height: 120px; }
.field__hint { font-size: 0.74rem; color: var(--ink-4); line-height: 1.45; }
.check { display: flex; gap: 11px; align-items: flex-start; font-size: 0.84rem; line-height: 1.5; margin-bottom: 14px; }
.check input { margin-top: 3px; flex: none; width: 16px; height: 16px; accent-color: var(--brass-dim); }

.formnote {
  font-size: 0.76rem;
  color: var(--ink-4);
  line-height: 1.55;
  border-left: 2px solid var(--line);
  padding-left: 14px;
  margin-top: 20px;
}

/* --------------------------------------------------------------------------
   Table of things (practice area detail, diaspora)
   -------------------------------------------------------------------------- */

.deflist { border-top: 1px solid var(--line); }
.deflist > div {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  gap: 28px;
  padding-block: 22px;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.deflist dt { font-family: var(--serif); font-size: 1.14rem; letter-spacing: -0.01em; }
.deflist dd { margin: 0; font-size: 0.9rem; color: var(--ink-3); line-height: 1.6; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 0.76rem;
  padding: 7px 12px;
  border: 1px solid var(--line);
  color: var(--ink-3);
  background: var(--paper);
  text-decoration: none;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.chip:hover { border-color: var(--brass); color: var(--ink); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__figure { max-width: 520px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .split--rev > :first-child { order: 0; }
}

@media (max-width: 860px) {
  .nav, .header__cta .btn--ghost { display: none; }
  .burger { display: block; }
  .header__inner { min-height: 64px; }
  .nav[data-open='true'] {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 12px var(--gut) 20px;
    gap: 0;
  }
  .nav[data-open='true'] a { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav[data-open='true'] a::after { display: none; }
  .header__cta .btn { padding: 10px 15px; min-height: 40px; font-size: 0.8rem; }
  .deflist > div { grid-template-columns: 1fr; gap: 8px; }
  .dock { right: 12px; bottom: 12px; }
  .dock a { padding: 12px 15px; font-size: 0.78rem; }
  .pack dl { grid-template-columns: 1fr; gap: 2px 0; }
  .pack dt { margin-top: 8px; }
}

@media (max-width: 560px) {
  :root { --gut: 18px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero__actions .btn { flex: 1 1 100%; }
  .area { padding-right: 0; }

  /* The header is the tightest row on a small phone — it must not overflow. */
  .header__inner { gap: 8px; }
  .brand { gap: 8px; min-width: 0; }
  .brand__mark { width: 30px; height: 30px; }
  .brand__name { font-size: 0.98rem; }
  .brand__sub { font-size: 0.5rem; letter-spacing: 0.13em; margin-top: 4px; }
  .header__cta { gap: 6px; min-width: 0; }
  .header__cta .btn { padding: 9px 11px; min-height: 38px; font-size: 0.74rem; }
  .burger { padding: 8px; }

  .dock { right: 10px; bottom: 10px; }
  .dock a { padding: 10px 13px; font-size: 0.74rem; }
}

/* --------------------------------------------------------------------------
   Print — the Briefing Pack must print cleanly
   -------------------------------------------------------------------------- */

@media print {
  body { background: #fff; font-size: 11pt; }
  body::before, .header, .footer, .dock, .hero__figure, .no-print { display: none !important; }
  .section, .section--dark { padding: 0; background: #fff; color: #000; }
  .pack { border: 0; padding: 0; background: #fff; }
  .pack__h { border-bottom-color: #000; }
  .ai, .ai__bar, .ai__input, .suggest, .disclaimer { display: none !important; }
  a { text-decoration: none; color: #000; }
  .article h2 { page-break-after: avoid; }
}
