/* ==================================================================
   Salt & Ledger — shared stylesheet
   ------------------------------------------------------------------
   1.  Tokens
   2.  Reset and base
   3.  Layout
   4.  Typography
   5.  Buttons and links
   6.  Header and navigation
   7.  Footer
   8.  Page sections
   9.  Forms
   10. Utilities
   ================================================================== */


/* ==================================================================
   1. TOKENS
   Colour and type values come from the brand guidelines. Change a
   value here and it updates everywhere it is used.
   ================================================================== */

:root {
  /* Colour ------------------------------------------------------ */
  --iron:        #16211A;   /* the page */
  --green:       #23372C;   /* raised surface */
  --bone:        #F3EFE4;   /* primary type, the mark */
  --mist:        #C3C7BE;   /* secondary type */
  --ochre-light: #E0A94A;   /* accent type and links */
  --ochre:       #C98A2E;   /* fills and buttons */
  --hairline:    #2E4034;   /* borders and rules */
  --alert:       #E68A5E;   /* error states only — never a surface */

  /* Type -------------------------------------------------------- */
  --display: "Spectral", Georgia, "Times New Roman", serif;
  --body:    "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --script:  "Yellowtail", cursive;   /* the logo only */

  /* Spacing ----------------------------------------------------- */
  --container: 1200px;
  --gutter: 32px;
  --section-y: 120px;
  --rule: 1px solid var(--hairline);
}


/* ==================================================================
   2. RESET AND BASE
   ================================================================== */

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

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

body {
  margin: 0;
  background-color: var(--iron);
  color: var(--bone);
  font-family: var(--body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

/* Visible keyboard focus everywhere. */
:focus-visible {
  outline: 2px solid var(--ochre-light);
  outline-offset: 3px;
}

::selection { background: var(--ochre); color: var(--iron); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  background: var(--ochre);
  color: var(--iron);
  font-weight: 600;
}
.skip-link:focus { left: 0; }

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

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


/* ==================================================================
   3. LAYOUT
   ================================================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.section--tight { padding-top: 80px; padding-bottom: 80px; }
.section--raised { background-color: var(--green); }
.section--ruled { border-top: var(--rule); }

/* Editorial split: text column beside a supporting column. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 80px;
  align-items: start;
}
.split--wide-left { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.split--narrow-left { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }


/* ==================================================================
   4. TYPOGRAPHY
   Scale taken directly from the brand guidelines.
   ================================================================== */

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }

.h1, h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 62px;
  line-height: 1.04;
  letter-spacing: -0.01em;
}

.h2, h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.14;
}

.h3, h3 {
  font-family: var(--body);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
}

.lede {
  font-size: 20px;
  line-height: 1.55;
  color: var(--mist);
  max-width: 34em;
}

p { max-width: 36em; }
p + p { margin-top: 1.1em; }

.small { font-size: 13px; line-height: 1.55; color: var(--mist); }

/* Eyebrow — a label, always in mono, always above a heading. */
.eyebrow {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ochre-light);
  margin-bottom: 20px;
}
.eyebrow--mist { color: var(--mist); }

/* Data — every figure in the brand is set in mono. */
.data {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--mist);
}

.text-mist { color: var(--mist); }


/* ==================================================================
   5. BUTTONS AND LINKS
   ================================================================== */

/* In-copy links. Ochre is not legible at small sizes on green, so
   body links always use the lighter value. */
.prose a,
a.text-link {
  color: var(--ochre-light);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.prose a:hover,
a.text-link:hover { text-decoration-thickness: 2px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--body);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  padding: 17px 28px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.button--primary {
  background-color: var(--ochre);
  color: var(--iron);
}
.button--primary:hover { background-color: var(--ochre-light); }

.button--ghost {
  background-color: transparent;
  color: var(--bone);
  border-color: var(--hairline);
}
.button--ghost:hover { border-color: var(--bone); }

/* Secondary action: an underlined link with an arrow. */
.arrow-link {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 500;
  font-size: 15px;
  color: var(--ochre-light);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.arrow-link .arrow { transition: transform 0.18s ease; }
.arrow-link:hover .arrow { transform: translateX(4px); }

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  margin-top: 40px;
}


/* ==================================================================
   6. HEADER AND NAVIGATION
   ================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--iron);
  border-bottom: var(--rule);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 84px;
}

.site-header__logo { display: flex; align-items: center; text-decoration: none; }
.site-header__logo svg { display: block; }

.nav { display: flex; align-items: center; gap: 36px; }

/* The call to action sits in the header bar on desktop and inside the
   menu panel on mobile, so only one of the two is ever visible. */
.nav__cta { display: none; }

.nav__link {
  font-size: 15px;
  font-weight: 500;
  color: var(--bone);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}
.nav__link:hover { border-bottom-color: var(--ochre-light); }
.nav__link[aria-current="page"] {
  color: var(--ochre-light);
  border-bottom-color: var(--ochre-light);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 12px 16px;
  cursor: pointer;
}

.nav-toggle__bars { display: block; width: 18px; height: 9px; position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after  { bottom: 0; }


/* ==================================================================
   7. FOOTER
   ================================================================== */

.site-footer {
  border-top: var(--rule);
  padding-top: 80px;
  padding-bottom: 40px;
}

.site-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  padding-bottom: 64px;
}

.site-footer__heading {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 20px;
}

.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li + li { margin-top: 12px; }
.footer-list a { color: var(--bone); text-decoration: none; font-size: 15px; }
.footer-list a:hover { color: var(--ochre-light); }

.site-footer__bottom {
  border-top: var(--rule);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}


/* ==================================================================
   8. PAGE SECTIONS
   ================================================================== */

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

.hero { padding-top: 130px; padding-bottom: 130px; }

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 80px;
  align-items: center;
}

.hero__title { max-width: 13ch; }
.hero__lede { margin-top: 28px; }

.hero__seal { justify-self: center; opacity: 0.95; }


/* --- The ledger: the services index ------------------------------ */
/* The signature element. Services are set as a costed page: a line
   number, the line itself, and a note in the right-hand column. */

.ledger { border-top: var(--rule); }

.ledger__row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 0.55fr);
  gap: 24px;
  align-items: baseline;
  padding: 26px 0;
  border-bottom: var(--rule);
  text-decoration: none;
  color: inherit;
}
.ledger__row:hover { background-color: var(--green); }
.ledger__row:hover .ledger__title { color: var(--ochre-light); }

.ledger__index {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ochre-light);
}

.ledger__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
  transition: color 0.18s ease;
}

.ledger__note {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--mist);
  text-align: right;
}


/* --- Two paths --------------------------------------------------- */

.paths {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: var(--rule);
  border-bottom: var(--rule);
}

.path { padding: 48px 48px 48px 0; }
.path + .path { border-left: var(--rule); padding-left: 48px; padding-right: 0; }
.path__title { margin-top: 4px; margin-bottom: 16px; }
.path .button-row { margin-top: 28px; }


/* --- Approach: a numbered sequence, because order matters here --- */

.steps { border-top: var(--rule); }

.step {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 24px;
  padding: 34px 0;
  border-bottom: var(--rule);
}

.step__number {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ochre-light);
}

.step__title { margin-bottom: 10px; }


/* --- Cards used for case studies and insights -------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.card {
  display: flex;
  flex-direction: column;
  border-top: 2px solid var(--hairline);
  padding-top: 24px;
  text-decoration: none;
  color: inherit;
}
.card:hover { border-top-color: var(--ochre); }
.card__meta { margin-bottom: 14px; }
.card__title { font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1.2; }
.card__text { margin-top: 12px; font-size: 15px; color: var(--mist); }


/* --- Figures and image placeholders ------------------------------ */

.figure { margin: 0; }
.figure img { width: 100%; }
.figure figcaption {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--mist);
}

/* Full-width human photography band. */
.band { border-top: var(--rule); border-bottom: var(--rule); }
.band img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }


/* --- Closing call to action -------------------------------------- */

.cta-panel {
  background-color: var(--green);
  padding: 88px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}


/* ==================================================================
   9. FORMS
   ================================================================== */

.field { margin-bottom: 26px; }

.field label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 10px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background-color: transparent;
  border: 1px solid var(--hairline);
  color: var(--bone);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  padding: 14px 16px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--ochre-light);
  outline: none;
}
.field textarea { min-height: 150px; resize: vertical; }

.field--consent { display: flex; gap: 12px; align-items: flex-start; }
.field--consent input { width: auto; margin-top: 4px; }
.field--consent label { text-transform: none; letter-spacing: 0; font-family: var(--body); font-size: 14px; }

.field__error { color: var(--alert); font-size: 13px; margin-top: 8px; }

.form-message { padding: 20px 24px; border: 1px solid var(--hairline); margin-bottom: 32px; }
.form-message--ok    { border-color: var(--ochre); }
.form-message--error { border-color: var(--alert); color: var(--alert); }

/* Honeypot — hidden from people, visible to bots. */
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }


/* ==================================================================
   10. RESPONSIVE
   ================================================================== */

@media (max-width: 1100px) {
  :root { --section-y: 96px; }
  .hero__inner { gap: 48px; }
  .split, .split--wide-left, .split--narrow-left { gap: 48px; }
}

@media (max-width: 900px) {
  :root { --gutter: 24px; --section-y: 80px; }

  .h1, h1 { font-size: 44px; }
  .h2, h2 { font-size: 32px; }

  .nav, .site-header__cta { display: none; }
  .nav-toggle { display: inline-flex; }

  /* Mobile menu panel */
  .nav[data-open="true"] {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--iron);
    border-bottom: var(--rule);
    padding: 8px var(--gutter) 28px;
  }
  .nav[data-open="true"] .nav__link {
    padding: 18px 0;
    border-bottom: var(--rule);
    font-size: 18px;
  }
  .nav[data-open="true"] .nav__cta { display: inline-flex; margin-top: 24px; width: 100%; }

  .site-header { position: relative; }
  .site-header__inner { position: relative; }

  .hero { padding-top: 72px; padding-bottom: 72px; }
  .hero__inner { grid-template-columns: minmax(0, 1fr); }
  .hero__seal { order: -1; justify-self: start; }
  .hero__title { max-width: none; }

  .split, .split--wide-left, .split--narrow-left { grid-template-columns: minmax(0, 1fr); gap: 40px; }

  .paths { grid-template-columns: minmax(0, 1fr); }
  .path { padding: 40px 0; }
  .path + .path { border-left: 0; border-top: var(--rule); padding-left: 0; }

  .card-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }

  .cta-panel { grid-template-columns: minmax(0, 1fr); padding: 56px 28px; gap: 32px; }

  .site-footer__top { grid-template-columns: minmax(0, 1fr); gap: 44px; }
}

@media (max-width: 640px) {
  .h1, h1 { font-size: 38px; }
  .h2, h2 { font-size: 29px; }
  .lede { font-size: 18px; }

  .ledger__row { grid-template-columns: 40px minmax(0, 1fr); }
  .ledger__title { font-size: 21px; }
  .ledger__note { grid-column: 2; text-align: left; }

  .step { grid-template-columns: minmax(0, 1fr); gap: 10px; }

  .button, .nav__cta { width: 100%; }
  .button-row { gap: 20px; }
}
