@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=Newsreader:opsz,wght@6..72,400;6..72,500&display=swap");

/* Kestrel Capital — the annual statement.
   Navy paper, ivory type, one gold accent, thin rules. Nothing decorative that is not data. */

:root {
  --ink-navy: #0D1522;
  --ink-panel: #131E30;
  --rule: #2C3A50;
  --ivory: #EEE7D7;
  --ivory-muted: #ABA697;
  --gold: #C6A666;
  --gold-deep: #A88B4E;

  --font-serif: "Newsreader", "Iowan Old Style", "Georgia", serif;
  --font-sans: "IBM Plex Sans", "Helvetica Neue", "Arial", sans-serif;

  /* six sizes, no others */
  --fs-small: 0.875rem;
  --fs-body: 1.0625rem;
  --fs-lead: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --fs-h3: clamp(1.25rem, 1.15rem + 0.45vw, 1.5rem);
  --fs-h2: clamp(1.75rem, 1.45rem + 1.3vw, 2.5rem);
  --fs-h1: clamp(2.25rem, 1.6rem + 2.9vw, 4rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;
  --space-7: 6rem;

  --gutter: clamp(1.25rem, 5vw, 4rem);
  --max: 76rem;
  --measure: 38rem;
  --hair: 1px solid var(--rule);
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* ---------- base ---------- */

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

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

body {
  margin: 0;
  background: var(--ink-navy);
  color: var(--ivory);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-4);
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: none;
  word-break: normal;
}

h1 { font-size: var(--fs-h1); max-width: 18ch; }
h2 { font-size: var(--fs-h2); max-width: 22ch; }
h3 { font-size: var(--fs-h3); line-height: 1.25; font-weight: 500; margin-bottom: var(--space-2); }

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

a {
  color: var(--ivory);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 160ms var(--ease), text-decoration-color 160ms var(--ease);
}
a:hover { color: var(--gold); }

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

strong { font-weight: 600; }
small, .small { font-size: var(--fs-small); }

ul, ol { margin: 0; padding: 0; }

hr {
  border: 0;
  border-top: var(--hair);
  margin: var(--space-5) 0;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--ivory);
}

.muted { color: var(--ivory-muted); }

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

.measure { max-width: var(--measure); }

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-3);
  top: -4rem;
  z-index: 100;
  padding: var(--space-2) var(--space-3);
  background: var(--gold);
  color: var(--ink-navy);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: var(--space-3); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease);
}

.btn--primary {
  background: var(--gold);
  color: var(--ink-navy);
}
.btn--primary:hover {
  background: var(--gold-deep);
  color: var(--ink-navy);
}

.btn--quiet {
  background: transparent;
  color: var(--ivory);
  border-color: var(--rule);
}
.btn--quiet:hover {
  border-color: var(--gold);
  color: var(--ivory);
}

.text-link {
  font-weight: 500;
  white-space: nowrap;
}
.text-link::after { content: " \2192"; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  margin-top: var(--space-5);
}

/* ---------- header & nav ---------- */

.site-header {
  border-bottom: var(--hair);
  background: var(--ink-navy);
  position: relative;
  z-index: 10;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 4.5rem;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--font-serif);
  font-size: var(--fs-h3);
  font-weight: 500;
  color: var(--ivory);
  text-decoration: none;
  letter-spacing: 0;
  white-space: nowrap;
}
.brand:hover { color: var(--ivory); }
.brand__place {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--fs-small);
  font-weight: 400;
  color: var(--ivory-muted);
  line-height: 1.2;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  padding: 0 var(--space-3);
  background: transparent;
  color: var(--ivory);
  border: var(--hair);
  border-radius: 2px;
  font: inherit;
  font-size: var(--fs-small);
  font-weight: 500;
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--gold); }
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 1rem;
  height: 1px;
  background: currentColor;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

.site-nav {
  display: none;
  flex-basis: 100%;
  padding-bottom: var(--space-4);
}
.site-nav[data-open="true"] { display: block; }

.site-nav__list {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.site-nav__list li { border-top: var(--hair); }
.site-nav__list a {
  display: block;
  padding: var(--space-3) 0;
  text-decoration: none;
  color: var(--ivory);
}
.site-nav__list a:hover { color: var(--gold); }
.site-nav__list a[aria-current="page"] {
  color: var(--gold);
}

.header-cta { display: none; }
.site-nav .site-nav__cta { margin-top: var(--space-3); }

/* ---------- sections ---------- */

.section {
  padding-block: var(--space-6);
  border-top: var(--hair);
}
.section--first { border-top: 0; }

.section__head { margin-bottom: var(--space-5); }
.section__head .lead { color: var(--ivory-muted); }

.split {
  display: grid;
  gap: var(--space-5);
}

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

.hero { padding-block: var(--space-6) var(--space-6); }
.hero__grid {
  display: grid;
  gap: var(--space-6);
  align-items: end;
}
.hero .lead { max-width: 34rem; }

.page-intro { padding-block: var(--space-6) var(--space-5); }
.page-intro .lead { max-width: 36rem; color: var(--ivory-muted); }

/* ---------- ledger: facts set as figures ---------- */

.ledger {
  margin: 0;
  border-top: 1px solid var(--ivory-muted);
}
.ledger__row {
  display: grid;
  grid-template-columns: minmax(6.5rem, 9.5rem) 1fr;
  gap: var(--space-4);
  align-items: baseline;
  padding-block: var(--space-3);
  border-bottom: var(--hair);
}
.ledger dt {
  font-family: var(--font-sans);
  font-size: var(--fs-h2);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ivory);
  white-space: nowrap;
}
.ledger dd {
  margin: 0;
  color: var(--ivory-muted);
  font-size: var(--fs-small);
  line-height: 1.45;
}
.ledger__caption {
  margin-top: var(--space-3);
  font-size: var(--fs-small);
  color: var(--ivory-muted);
}

/* ---------- ruled rows: principles, services, articles, team ---------- */

.rows {
  list-style: none;
  border-top: 1px solid var(--ivory-muted);
}
.row {
  display: grid;
  gap: var(--space-2) var(--space-5);
  padding-block: var(--space-4);
  border-bottom: var(--hair);
}
.row__title { margin: 0; }
.row__title a { text-decoration: none; }
.row__title a:hover { color: var(--gold); }
.row__body { color: var(--ivory-muted); }
.row__body p { color: var(--ivory-muted); }
.row__link { align-self: start; }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-2);
  margin: var(--space-2) 0 0;
  font-size: var(--fs-small);
  color: var(--ivory-muted);
}
.meta > * + *::before {
  content: "\00B7";
  margin-right: var(--space-2);
}

/* ---------- planner ---------- */

.planner {
  background: var(--ink-panel);
  border: var(--hair);
  padding: var(--space-4);
}
.planner__grid {
  display: grid;
  gap: var(--space-5);
}

.planner__controls {
  display: grid;
  gap: var(--space-4);
  align-content: start;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.control { display: grid; gap: var(--space-2); }
.control__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
}
.control__label {
  font-size: var(--fs-small);
  color: var(--ivory-muted);
}
.control__value {
  font-size: var(--fs-lead);
  font-weight: 500;
  color: var(--ivory);
  white-space: nowrap;
}
.control__note {
  font-size: var(--fs-small);
  color: var(--ivory-muted);
  margin: 0;
}

.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 1.75rem;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.range::-webkit-slider-runnable-track {
  height: 1px;
  background: var(--ivory-muted);
}
.range::-moz-range-track {
  height: 1px;
  background: var(--ivory-muted);
}
.range::-moz-range-progress {
  height: 2px;
  background: var(--gold);
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: -0.53rem;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--ink-panel);
  transition: transform 160ms var(--ease);
}
.range::-moz-range-thumb {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--ink-panel);
}
.range:hover::-webkit-slider-thumb { transform: scale(1.15); }
.range:focus-visible { outline-offset: 4px; }

.planner__chart { min-width: 0; }
.chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.chart__grid line { stroke: var(--rule); stroke-width: 1; }
.chart__axis { stroke: var(--ivory-muted); stroke-width: 1; }
.chart__tick {
  fill: var(--ivory-muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.chart__line { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.chart__line--grown { stroke: var(--gold); stroke-width: 2.5; }
.chart__line--contributed { stroke: var(--ivory); stroke-width: 1.5; }
.chart__line--fees { stroke: var(--ivory-muted); stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart__label {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
}
.chart__label--grown { fill: var(--gold); }
.chart__label--contributed { fill: var(--ivory); }
.chart__label--fees { fill: var(--ivory-muted); }

.legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-3);
  font-size: var(--fs-small);
  color: var(--ivory-muted);
}
.legend li { display: inline-flex; align-items: center; gap: var(--space-2); }
.legend__key {
  display: inline-block;
  width: 1.5rem;
  height: 0;
  border-top: 2px solid var(--ivory);
}
.legend__key--grown { border-top: 3px solid var(--gold); }
.legend__key--contributed { border-top: 2px solid var(--ivory); }
.legend__key--fees { border-top: 2px dashed var(--ivory-muted); }

.planner__results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--space-4);
  margin: var(--space-5) 0 0;
  border-top: 1px solid var(--ivory-muted);
}
.planner__results div {
  padding-block: var(--space-3);
  border-bottom: var(--hair);
}
.planner__results dt {
  font-size: var(--fs-small);
  color: var(--ivory-muted);
}
.planner__results dd {
  margin: var(--space-1) 0 0;
  font-size: var(--fs-h3);
  font-weight: 500;
  color: var(--ivory);
  white-space: nowrap;
}
.planner__results .is-accent dd { color: var(--gold); }

.planner__risk {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: var(--hair);
  max-width: 46rem;
}
.planner__risk h3 { font-size: var(--fs-h3); }
.planner__risk p { color: var(--ivory-muted); }

/* ---------- conversation band ---------- */

.conversation__grid {
  display: grid;
  gap: var(--space-5);
  align-items: end;
}
.address {
  font-style: normal;
  color: var(--ivory-muted);
  line-height: 1.6;
}

/* ---------- forms ---------- */

.form {
  display: grid;
  gap: var(--space-4);
  max-width: 40rem;
}
.form__row { display: grid; gap: var(--space-4); }
.form__field { display: grid; gap: var(--space-2); }
.form__label {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--ivory);
}
.form__hint {
  font-size: var(--fs-small);
  color: var(--ivory-muted);
  margin: 0;
}
.form__input {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  background: var(--ink-panel);
  color: var(--ivory);
  border: 1px solid var(--rule);
  border-bottom-color: var(--ivory-muted);
  border-radius: 2px;
  font: inherit;
  font-size: var(--fs-body);
  transition: border-color 160ms var(--ease);
}
.form__input::placeholder { color: var(--ivory-muted); }
.form__input:hover { border-color: var(--ivory-muted); }
.form__input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}
textarea.form__input { min-height: 9rem; resize: vertical; line-height: 1.5; }
select.form__input {
  -webkit-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #ABA697 50%), linear-gradient(135deg, #ABA697 50%, transparent 50%);
  background-position: calc(100% - 1.25rem) 50%, calc(100% - 0.9rem) 50%;
  background-size: 0.35rem 0.35rem;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
}
.form__check {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  font-size: var(--fs-small);
  color: var(--ivory-muted);
}
.form__check input {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.2rem;
  accent-color: var(--gold);
}
.form__field[data-state="error"] .form__input { border-color: var(--gold); border-width: 2px; }
.form__field[data-state="error"] .form__label::after { content: " \2014 required"; color: var(--gold); }
.form__status {
  min-height: 1.6em;
  margin: 0;
  font-size: var(--fs-small);
  color: var(--ivory-muted);
}
.form__status[data-state="sent"] { color: var(--ivory); }
.form__status[data-state="error"] { color: var(--gold); }

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

.site-footer {
  margin-top: var(--space-6);
  padding-block: var(--space-6) var(--space-5);
  background: var(--ink-panel);
  border-top: var(--hair);
  font-size: var(--fs-small);
  color: var(--ivory-muted);
}
.footer__grid {
  display: grid;
  gap: var(--space-5);
}
.footer__brand {
  font-family: var(--font-serif);
  font-size: var(--fs-h3);
  color: var(--ivory);
  margin-bottom: var(--space-2);
}
.footer__title {
  font-family: var(--font-sans);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ivory);
  margin-bottom: var(--space-3);
}
.footer__list { list-style: none; display: grid; gap: var(--space-2); }
.footer__list a { color: var(--ivory-muted); text-decoration-color: var(--rule); }
.footer__list a:hover { color: var(--ivory); text-decoration-color: var(--gold); }
.footer__legal {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: var(--hair);
  display: grid;
  gap: var(--space-3);
}
.footer__legal p { max-width: 52rem; color: var(--ivory-muted); }
.footer__legal strong { color: var(--ivory); font-weight: 500; }

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

.prose { max-width: var(--measure); }
.prose h2 { font-size: var(--fs-h3); font-weight: 500; margin-top: var(--space-5); }
.prose ul { padding-left: 1.2em; margin-bottom: var(--space-3); }
.prose li { margin-bottom: var(--space-2); }

/* ---------- styleguide ---------- */

.swatches {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: var(--space-4);
}
.swatch__chip {
  height: 5rem;
  border: var(--hair);
  margin-bottom: var(--space-2);
}
.swatch__chip--navy { background: #0D1522; }
.swatch__chip--panel { background: #131E30; }
.swatch__chip--rule { background: #2C3A50; }
.swatch__chip--ivory { background: #EEE7D7; }
.swatch__chip--muted { background: #ABA697; }
.swatch__chip--gold { background: #C6A666; }
.swatch__chip--gold-deep { background: #A88B4E; }
.swatch__name { font-weight: 500; color: var(--ivory); }
.swatch__meta { font-size: var(--fs-small); color: var(--ivory-muted); }

.specimen { border-bottom: var(--hair); padding-block: var(--space-3); }
.specimen__tag { font-size: var(--fs-small); color: var(--ivory-muted); display: block; margin-bottom: var(--space-1); }
.specimen--h1 { font-family: var(--font-serif); font-size: var(--fs-h1); line-height: 1.12; }
.specimen--h2 { font-family: var(--font-serif); font-size: var(--fs-h2); line-height: 1.12; }
.specimen--h3 { font-family: var(--font-serif); font-size: var(--fs-h3); font-weight: 500; }
.specimen--lead { font-size: var(--fs-lead); }
.specimen--body { font-size: var(--fs-body); }
.specimen--small { font-size: var(--fs-small); }

/* ---------- motion: hero entrance only ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: reveal 700ms var(--ease) both;
  }
  .reveal--late { animation-delay: 160ms; }
}
@keyframes reveal {
  from { opacity: 0; transform: translateY(0.75rem); }
  to { opacity: 1; transform: none; }
}

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

/* ---------- breakpoints ---------- */

@media (min-width: 600px) {
  .planner { padding: var(--space-5); }
  .planner__results { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .form__row { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .row { grid-template-columns: minmax(12rem, 1fr) 2fr; }
  .row__link { grid-column: 2; }
}

@media (min-width: 900px) {
  .section { padding-block: var(--space-7); }
  .hero { padding-block: var(--space-7); }
  .hero__grid { grid-template-columns: 7fr 5fr; }
  .split { grid-template-columns: 1fr 2fr; gap: var(--space-6); }
  .conversation__grid { grid-template-columns: 2fr 1fr; }

  .nav-toggle { display: none; }
  .site-header__inner { flex-wrap: nowrap; }
  .site-nav,
  .site-nav[data-open="true"],
  .site-nav[data-open="false"] {
    display: block;
    flex-basis: auto;
    padding: 0;
    margin-left: auto;
  }
  .site-nav__list { flex-direction: row; gap: var(--space-4); }
  .site-nav__list li { border-top: 0; }
  .site-nav__list a { padding: var(--space-2) 0; font-size: var(--fs-small); font-weight: 500; }
  .site-nav__list a[aria-current="page"] {
    text-decoration: underline;
    text-decoration-color: var(--gold);
    text-underline-offset: 0.4em;
  }
  .site-nav .site-nav__cta { display: none; }
  .header-cta { display: inline-flex; min-height: 2.75rem; padding: 0.5rem 1.125rem; font-size: var(--fs-small); }

  .footer__grid { grid-template-columns: 2fr 1fr 1fr; }
}

@media (min-width: 1200px) {
  .planner__grid { grid-template-columns: 19rem 1fr; gap: var(--space-6); }
  .row { grid-template-columns: 1fr 2fr 9rem; align-items: baseline; }
  .row__link { grid-column: auto; justify-self: end; }
}

@media print {
  body { background: #fff; color: #000; }
  .site-header, .site-nav, .nav-toggle, .header-cta { display: none; }
}

/* === insights: article prose === */
.prose > h2:first-child { margin-top: 0; }
.prose .meta { margin-bottom: var(--space-4); }
.prose h3 { margin-top: var(--space-4); }

/* === contact: consent checkbox === */
.form__check .form__input {
  flex: none;
  min-height: 0;
  padding: 0;
}
