/* ==========================================================================
   Impart Planning — Stone & Bone
   Tokens are documented in BRAND.md and rendered at /brand/.
   ========================================================================== */

:root {
  /* Color */
  --ink:        #484742;
  --ink-deep:   #31302D;
  --stone:      #7A766A;
  --stone-dark: #5E5B52;
  --bone:       #EAE7DF;
  --bone-warm:  #E0DCD1;
  --paper:      #FBFAF7;
  --accent:     #8C5A3C;
  --accent-dim: #6F472F;
  --rule-dark:  #9A968A;  /* hairlines on ink bands — 3.15:1 against --ink */

  /* Type */
  --serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --sans:  "Cabin", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  /* Scale (fluid) */
  --step--1: clamp(0.82rem, 0.79rem + 0.12vw, 0.88rem);
  --step-0:  clamp(1rem, 0.96rem + 0.18vw, 1.08rem);
  --step-1:  clamp(1.2rem, 1.12rem + 0.38vw, 1.4rem);
  --step-2:  clamp(1.5rem, 1.33rem + 0.8vw, 2rem);
  --step-3:  clamp(2rem, 1.6rem + 1.9vw, 3.1rem);

  /* Space */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --band:   clamp(4rem, 9vw, 7.5rem);
  --measure: 62ch;
}

/* Reset ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0; }
p { margin: 0 0 1.1em; max-width: var(--measure); }
ul { margin: 0; padding: 0; list-style: none; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-dim); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

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

/* Utilities -------------------------------------------------------------- */
.wrap { width: min(72rem, 100% - (var(--gutter) * 2)); margin-inline: auto; }

.visually-hidden {
  position: absolute; 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: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--bone); padding: 0.75rem 1.25rem;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

.eyebrow, .section__index, .col__label, .label__no, .services__heading {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: var(--step--1);
}
.smallcaps { font-variant-caps: small-caps; letter-spacing: 0.06em; }

.rule { border: 0; border-top: 1px solid var(--bone-warm); margin: 2rem 0; }
.rule--wide { max-width: 7rem; border-top-color: var(--accent); border-top-width: 2px; margin: 2rem 0; }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.85rem 1.75rem;
  border: 1px solid var(--ink);
  text-decoration: none;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

/* Header ----------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--bone-warm);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4.25rem;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 0.7rem;
  color: var(--ink); text-decoration: none;
}
.wordmark__mark { width: 1.75rem; height: 1.75rem; flex: none; color: var(--accent); }
.wordmark__text { font-family: var(--serif); font-size: var(--step-1); letter-spacing: 0.01em; }

.site-nav ul { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2rem); }
.site-nav a {
  color: var(--stone-dark); text-decoration: none;
  font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.14em;
  padding-block: 0.35rem; border-bottom: 1px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="true"] {
  color: var(--ink); border-bottom-color: var(--accent);
}
.site-nav .nav-cta { color: var(--accent); }

.nav-toggle {
  display: none; align-items: center; gap: 0.6rem;
  background: none; border: 1px solid var(--bone-warm); color: var(--ink);
  font-family: var(--sans); font-size: var(--step--1);
  text-transform: uppercase; letter-spacing: 0.14em;
  padding: 0.55rem 0.9rem; cursor: pointer;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 1rem; height: 1px; background: var(--ink); content: "";
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before { position: absolute; top: -5px; }
.nav-toggle__bars::after  { position: absolute; top: 5px; }

@media (max-width: 47.99em) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--bone-warm);
    padding: 0.5rem var(--gutter) 1.25rem;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
  .site-nav a { display: block; padding: 0.7rem 0; width: 100%; }
}

/* Hero ------------------------------------------------------------------- */
.hero {
  padding-block: clamp(4rem, 11vw, 8.5rem) clamp(4rem, 9vw, 7rem);
  border-bottom: 1px solid var(--bone-warm);
}
.hero__inner { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: 1fr; }
@media (min-width: 56em) {
  .hero__inner { grid-template-columns: 1.15fr 1fr; align-items: end; }
  .hero__secondary { padding-bottom: 0.4rem; }
  .hero__secondary .rule--wide { margin-top: 0; }
}
.eyebrow { color: var(--stone-dark); margin: 0 0 1.5rem; }
.hero h1 {
  font-size: var(--step-3);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}
.hero__tagline {
  font-family: var(--serif); font-style: italic;
  font-size: var(--step-1); color: var(--stone-dark);
  max-width: 28ch; margin-bottom: 0;
}
.hero__lead {
  font-size: var(--step-2); font-family: var(--serif);
  line-height: 1.35; max-width: 26ch; margin-bottom: 0;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 2rem 0 0; max-width: none; }

/* Sections --------------------------------------------------------------- */
.section { padding-block: var(--band); }
.section--bone { background: var(--bone); }
.section--ink { background: var(--ink); color: var(--bone); }
.section--ink a { color: var(--bone); }
.section--ink .section__index,
.section--ink .col__label { color: var(--bone-warm); }

.section__index { color: var(--stone-dark); margin: 0 0 0.9rem; }
.section__title {
  font-size: var(--step-2);
  padding-bottom: 1rem;
  border-bottom: 1px solid currentColor;
  margin-bottom: 2rem;
}
.section--ink .section__title { border-bottom-color: var(--rule-dark); }

.standfirst {
  font-family: var(--serif); font-size: var(--step-1); line-height: 1.5;
  max-width: 34ch; margin-bottom: 3rem;
}
.standfirst--tight { margin-bottom: 2.25rem; }

/* What We Do ------------------------------------------------------------- */
.cols { display: grid; gap: clamp(2rem, 4vw, 3rem); grid-template-columns: 1fr; }
@media (min-width: 48em) { .cols { grid-template-columns: repeat(3, 1fr); } }
.col p { max-width: 42ch; }
.col__label {
  color: var(--stone-dark);
  padding-top: 0.9rem;
  border-top: 2px solid var(--accent);
  margin-bottom: 0.9rem;
}

/* Services --------------------------------------------------------------- */
.services { display: grid; gap: clamp(2rem, 4vw, 3rem); grid-template-columns: 1fr; }
@media (min-width: 48em) { .services { grid-template-columns: repeat(3, 1fr); } }
.services__heading {
  font-family: var(--sans); color: var(--stone-dark);
  margin-bottom: 0.75rem;
}
.label {
  display: flex; gap: 0.9rem; align-items: baseline;
  font-family: var(--serif); font-size: var(--step-0); line-height: 1.4;
  padding: 0.85rem 0;
  border-top: 1px solid var(--bone-warm);
}
.section--bone .label { border-top-color: color-mix(in srgb, var(--stone) 35%, transparent); }
.label:last-child { border-bottom: 1px solid color-mix(in srgb, var(--stone) 35%, transparent); }
.label__no { color: var(--accent); flex: none; font-family: var(--sans); }

/* Expertise -------------------------------------------------------------- */
.expertise { display: grid; gap: clamp(2rem, 4vw, 3.5rem); grid-template-columns: 1fr; }
@media (min-width: 48em) { .expertise { grid-template-columns: 1.4fr 1fr; } }
.expertise__body { font-size: var(--step-1); font-family: var(--serif); line-height: 1.55; }
.standards li {
  padding: 0.7rem 0; border-top: 1px solid var(--rule-dark);
  font-size: var(--step--1); line-height: 1.5;
}
.pullquote {
  font-family: var(--serif); font-style: italic;
  font-size: var(--step-2); line-height: 1.35;
  max-width: 24ch;
  margin: clamp(3rem, 6vw, 4.5rem) 0 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--accent);
}

/* Contact ---------------------------------------------------------------- */
.contact { display: grid; gap: clamp(2rem, 4vw, 3.5rem); grid-template-columns: 1fr; }
@media (min-width: 48em) { .contact { grid-template-columns: 1.1fr 1fr; } }
.contact__email { font-family: var(--serif); font-size: var(--step-1); }
.subscribe { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
.subscribe input {
  flex: 1 1 14rem;
  font: inherit; color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--stone);
  padding: 0.8rem 1rem;
}
.subscribe input::placeholder { color: var(--stone); }
.subscribe__status { flex: 1 0 100%; margin: 0; font-size: var(--step--1); color: var(--stone-dark); }
.subscribe__status[data-state="error"] { color: var(--accent-dim); }

/* Footer ----------------------------------------------------------------- */
.site-footer {
  background: var(--ink-deep); color: var(--bone);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.site-footer a { color: var(--bone); }
.footer__tagline { font-family: var(--serif); font-size: var(--step-1); max-width: 30ch; margin-bottom: 0; }
.site-footer .rule { border-top-color: var(--rule-dark); }
.footer__meta {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem;
  font-size: var(--step--1); color: var(--bone-warm);
}
.footer__meta p { margin: 0; max-width: none; }

/* Print ------------------------------------------------------------------ */
@media print {
  .site-header, .subscribe, .skip-link { display: none; }
  body { background: #fff; color: #000; }
  .section--ink { background: #fff; color: #000; }
}
