/* Fihma Advisory design system
   Pez Logistics colors: navy ink, violet for actions, and a periwinkle
   highlighter that only ever marks work taken off someone's plate. One family (Archivo),
   with its width axis doing the work display faces usually do. */

:root {
  --paper: #FFFFFF;
  --mist: #FBF8F2;
  --ink: #16142B;
  --ledger: #4B3FD1;
  --ledger-deep: #3A30A8;
  --stone: #5A5770;
  --rule: #D9D5E8;
  --highlight: #8D9CFA;
  --highlight-soft: #B4BEFC;
  --marker: #C9CFFD;
  --on-dark: #CFCCE0;
  --tint: #E6E9FE;
  --lilac: #F3F2F8;
  --focus: #4B3FD1;

  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wide: 112;
  --measure: 66ch;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1120px;
}

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

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ledger); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

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

/* Type scale: 17 / 21 / 28 / 40 / 60 */
h1, h2, h3, .wordmark {
  font-stretch: 112%;
  font-variation-settings: 'wdth' var(--wide);
  letter-spacing: -0.015em;
  line-height: 1.08;
  font-weight: 800;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 6.4vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); line-height: 1.12; }
h3 { font-size: 1.3125rem; line-height: 1.25; font-weight: 700; letter-spacing: -0.005em; }
p { max-width: var(--measure); }
.lede { font-size: 1.25rem; line-height: 1.55; color: var(--stone); max-width: 34em; }
.muted { color: var(--stone); }
.small { font-size: 0.9375rem; }

/* Skip link */
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 200; }
.skip:focus { left: 8px; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: 0; z-index: 100; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.wordmark { font-size: 1.25rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.wordmark:hover { color: var(--ink); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-size: 0.9375rem; color: var(--ink); text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--highlight); text-decoration-thickness: 4px; text-underline-offset: 6px; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    font: inherit; font-size: 0.9375rem; background: none; border: 1px solid var(--rule);
    border-radius: 6px; padding: 8px 12px; color: var(--ink); cursor: pointer;
  }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--mist); font-size: 1.0625rem; }
  .nav .btn { margin-top: 12px; text-align: center; border-bottom: 0; }
}

/* Buttons */
.btn {
  display: inline-block; font: inherit; font-weight: 600; font-size: 1rem;
  background: var(--ledger); color: var(--paper); text-decoration: none;
  padding: 14px 24px; border-radius: 6px; border: 0; cursor: pointer;
  transition: background-color .15s;
}
.btn:hover { background: var(--ledger-deep); color: var(--paper); }
.btn-small { padding: 9px 16px; font-size: 0.9375rem; }
.nav .btn { color: var(--paper); }
.nav .btn:hover { text-decoration: none; }
.actions { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; margin-top: 32px; }

/* Sections */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section-mist { background: var(--mist); border-top: 0 !important; }
.section-ink { background: var(--tint); color: var(--ink); border-top: 0 !important; }
.section-ink a { color: var(--ledger); }
.section-ink .muted, .section-ink .lede { color: var(--stone); }
.section-head { max-width: 44rem; margin-bottom: 48px; }
.section-head h2 + p { margin-top: 16px; }

/* Hero */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 104px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.hero h1 { margin-bottom: 24px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .todo { padding: 22px 18px 18px; } .todo-total strong { font-size: 1.375rem; } }

/* The to-do list: the one loud element on the site */
.todo { border: 1px solid var(--rule); border-radius: 10px; padding: 28px 28px 24px; background: var(--paper); }
.todo-title { font-weight: 600; font-size: 1rem; margin-bottom: 4px; }
.todo-sub { font-size: 0.875rem; color: var(--stone); margin-bottom: 18px; }
.todo ul { list-style: none; }
.todo li { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: baseline; padding: 11px 0; border-top: 1px solid var(--mist); font-size: 1rem; }
.todo .task { padding: 1px 3px; margin: 0 -3px; }
.todo .done .task {
  background-image: linear-gradient(100deg, rgba(201,207,253,0) 0.6%, var(--marker) 2.2%, var(--marker) 97%, rgba(201,207,253,0) 99%);
  background-repeat: no-repeat; background-size: 100% 82%; background-position: 0 70%;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.todo .who { font-size: 0.8125rem; color: var(--stone); white-space: nowrap; }
.todo .done .who { color: var(--ledger); font-weight: 600; }
.todo-total { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 14px; }

.todo-total strong { white-space: nowrap; font-stretch: 112%; font-variation-settings: 'wdth' 112; font-size: 1.75rem; font-weight: 800; line-height: 1; }

@media (prefers-reduced-motion: no-preference) {
  .js .todo .done .task { background-size: 0% 82%; transition: background-size .45s cubic-bezier(.3,.7,.3,1); }
  .js .todo.go .done .task { background-size: 100% 82%; }
  .js .todo.go li:nth-child(2) .task { transition-delay: .25s; }
  .js .todo.go li:nth-child(3) .task { transition-delay: .5s; }
  .js .todo.go li:nth-child(4) .task { transition-delay: .75s; }
  .js .todo.go li:nth-child(5) .task { transition-delay: 1s; }
  .js .todo.go li:nth-child(6) .task { transition-delay: 1.25s; }
}

/* Proof strip */
.proof { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 2px solid var(--ink); }
.proof div { padding: 22px 24px 0 0; }
.proof div + div { padding-left: 24px; border-left: 1px solid var(--rule); }
.proof strong { display: block; font-stretch: 112%; font-variation-settings: 'wdth' 112; font-weight: 800; font-size: 2rem; line-height: 1.1; margin-bottom: 6px; }
@media (max-width: 640px) {
  .proof { grid-template-columns: 1fr; }
  .proof div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); margin-top: 18px; }
}

/* Two arms */
.arms { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.arm { padding: 36px 32px; border-radius: 10px; display: flex; flex-direction: column; gap: 14px; }
.arm-consult { background: var(--tint); color: var(--ink); }
.arm-consult .muted { color: var(--stone); }
.arm-consult a:not(.btn) { color: var(--ledger); }
.arm-data { background: var(--paper); border: 1px solid var(--ink); }
.arm .arm-name { font-weight: 600; font-size: 0.9375rem; }
.arm h3 { font-size: 1.625rem; }
.arm ul { list-style: none; margin-top: 4px; }
.arm li { padding: 8px 0; border-top: 1px solid rgba(141,156,250,.3); }
.arm .push { margin-top: auto; padding-top: 10px; }
.arm-consult .btn { background: var(--ledger); color: var(--paper); }
.arm-consult .btn:hover { background: var(--ledger-deep); color: var(--paper); }
@media (max-width: 820px) { .arms { grid-template-columns: 1fr; } }

/* Steps: a real sequence, so it is numbered */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: step; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 18px; }
.steps li::before { content: "Step " counter(step); display: block; font-size: 0.875rem; color: var(--stone); margin-bottom: 10px; }
.steps h3 { margin-bottom: 10px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* Columns of plain text */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.cols h3 { margin-bottom: 10px; }
.cols .kinds { margin-top: 12px; font-size: 0.9375rem; color: var(--stone); }
@media (max-width: 820px) { .cols { grid-template-columns: 1fr; gap: 32px; } }

/* Build list */
.build { display: grid; grid-template-columns: 220px 1fr; gap: 0 40px; }
.build dt { font-weight: 700; padding: 18px 0; border-top: 1px solid var(--rule); }
.build dd { padding: 18px 0; border-top: 1px solid var(--rule); }
.build dd ul { list-style: none; columns: 2; column-gap: 32px; }
.build dd li { break-inside: avoid; padding: 2px 0 8px; }
@media (max-width: 700px) {
  .build { grid-template-columns: 1fr; }
  .build dd { border-top: 0; padding-top: 0; }
  .build dd ul { columns: 1; }
}
.note-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 48px; }
.note { background: var(--mist); border-radius: 10px; padding: 28px; }
.note h3 { margin-bottom: 8px; }
.note .btn { margin-top: 18px; }
@media (max-width: 760px) { .note-row { grid-template-columns: 1fr; } }

/* People */
.people { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.person { display: grid; grid-template-columns: 96px 1fr; gap: 20px; align-items: start; }
.person img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.person h3 { margin-bottom: 2px; }
.person .role { color: var(--stone); font-size: 0.9375rem; margin-bottom: 10px; }
.person p + p { margin-top: 12px; }
@media (max-width: 820px) { .people { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .person { grid-template-columns: 1fr; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.9375rem; margin-bottom: 6px; }
.field .opt { font-weight: 400; color: var(--stone); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid #B3AECB; border-radius: 6px; padding: 12px 14px;
}
.field textarea { min-height: 128px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; }
.contact-info dl { display: grid; gap: 20px; }
.contact-info dt { font-size: 0.875rem; color: var(--stone); }
.contact-info dd { font-size: 1.125rem; font-weight: 600; }
@media (max-width: 820px) { .contact-grid, .form-row { grid-template-columns: 1fr; } }

/* Ask an AI */
.ask { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.ask p { margin-right: 8px; }
.ask-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.ask button {
  font: inherit; font-size: 0.9375rem; background: var(--paper); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 6px; padding: 8px 14px; cursor: pointer;
}
.ask button:hover { border-color: var(--ink); }

/* Footer */
.site-footer { background: var(--lilac); color: var(--stone); border-top: 1px solid var(--rule); padding: 56px 0 40px; font-size: 0.9375rem; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-grid .wordmark { color: var(--ink); display: inline-block; margin-bottom: 10px; }
.footer-grid h2 { font-size: 0.9375rem; font-weight: 600; font-stretch: 100%; font-variation-settings: 'wdth' 100; letter-spacing: 0; color: var(--ink); margin-bottom: 10px; }
.footer-grid ul { list-style: none; display: grid; gap: 6px; }
.footer-base { max-width: none; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rule); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* Articles (blog, case study, about) */
.page-head { padding: clamp(48px, 7vw, 88px) 0 clamp(32px, 5vw, 56px); }
.page-head h1 { max-width: 18em; margin-bottom: 20px; }
.byline { font-size: 0.9375rem; color: var(--stone); margin-top: 20px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0; border-top: 2px solid var(--ink); margin: 0 0 48px; max-width: 46rem; }
.facts dt, .facts dd { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.facts dt { color: var(--stone); padding-right: 28px; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } .facts dt { border-bottom: 0; padding-bottom: 0; } }
.prose { max-width: 42rem; padding-bottom: clamp(64px, 9vw, 112px); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: 1.75rem; margin-top: 2.2em; }
.prose ul { padding-left: 1.25em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--ledger); }
.prose table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { border-bottom: 2px solid var(--ink); font-weight: 600; }
.prose .cta { background: var(--mist); border-radius: 10px; padding: 28px; margin-top: 2.5em; }
.prose .cta .btn { margin-top: 16px; }
.post-list { list-style: none; max-width: 46rem; padding-bottom: clamp(64px, 9vw, 112px); }
.post-list li { border-top: 2px solid var(--ink); padding: 22px 0 8px; }
.post-list .meta { font-size: 0.9375rem; color: var(--stone); margin-bottom: 8px; }
.post-list h2 { font-size: 1.625rem; margin-bottom: 10px; }
.post-list h2 a { color: var(--ink); text-decoration: none; }
.post-list h2 a:hover { text-decoration: underline; }
.beliefs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.beliefs > div { border-top: 2px solid var(--ink); padding-top: 18px; }
.beliefs h3 { margin-bottom: 10px; }
@media (max-width: 820px) { .beliefs { grid-template-columns: 1fr; gap: 28px; } }
.center-page { min-height: 70vh; display: grid; place-items: center; text-align: left; padding: 64px 0; }
