/* ============================================================
   Gnucoop — Editorial Ledger
   Accent derived from the logo (#002C62), one hue at oklch H 257.
   ============================================================ */

:root {
  /* brand */
  --brand:        #002C62;   /* the logo colour, exactly */
  --accent:       #1F61B6;   /* accents on paper          5.55:1 */
  --accent-hover: #034A9A;
  --on-navy:      #96C0FB;   /* accents inside navy       7.31:1 */

  /* ground */
  --paper:   #F7F4ED;
  --surface: #FFFFFF;
  --rule:    #DED8CA;
  --rule-soft: #EDE7DA;
  --placeholder: #E7E1D4;

  /* ink */
  --ink:       #14181C;
  --ink-body:  #4A5259;      /* 7.24:1 on paper */
  --ink-muted: #686F77;      /* 4.63:1 on paper, 5.09:1 on white */
  --ink-prose: #24292E;      /* long-form reading ink */

  /* inside navy bands */
  --navy-surface: #12325D;
  --navy-rule:    #2E486D;
  --navy-text:    #A3B2C8;   /* 6.35:1 on navy */
  --navy-muted:   #899AB1;   /* 4.76:1 on navy */

  /* Ghost sets --gh-font-* when an editor picks fonts in admin; the theme's
     own pairing is the fallback. */
  --display: var(--gh-font-heading, 'Newsreader', Georgia, 'Times New Roman', serif);
  --body: var(--gh-font-body, 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif);

  --gutter: 120px;
  --measure: 680px;
  --max: 1440px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

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

/* ---------- layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }
.stack { display: flex; flex-direction: column; }

.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-muted); margin: 0;
}
.eyebrow--accent { color: var(--accent); }

/* ---------- type ---------- */
.display-1, .display-2, .display-3 {
  font-family: var(--display); font-weight: 400;
  letter-spacing: -0.025em; margin: 0; text-wrap: balance;
}
.display-1 { font-size: clamp(38px, 5.3vw, 76px); line-height: 1.02; }
.display-2 { font-size: clamp(32px, 3.2vw, 46px); line-height: 1.12; letter-spacing: -0.02em; }
.display-3 { font-size: clamp(24px, 1.9vw, 27px); line-height: 1.2;  letter-spacing: -0.01em; font-weight: 500; }

.lede { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; color: var(--ink-body); margin: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 14px 28px;
  font-size: 15px; font-weight: 600; border: 1px solid transparent;
  transition: background .15s ease, color .15s ease;
}
.btn--primary { background: var(--brand); color: var(--paper); }
.btn--primary:hover { background: var(--accent-hover); color: var(--paper); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--onaccent { background: var(--surface); color: var(--brand); }
.btn--onaccent:hover { background: var(--ink); color: var(--paper); }

.link-underline {
  font-size: 15px; font-weight: 600; white-space: nowrap;
  border-bottom: 1px solid var(--accent); padding-bottom: 3px;
}

/* ---------- header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 20px var(--gutter); border-bottom: 1px solid var(--rule);
  max-width: var(--max); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand__logo { height: 52px; width: auto; }
.brand__logo--sm { height: 38px; }
.brand__name { font-family: var(--display); font-size: 23px; font-weight: 600; letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; }
.nav a.is-current { color: var(--accent); border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
.header__end { display: flex; align-items: center; gap: 20px; }

.locale { display: flex; align-items: center; font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.locale > * {
  min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center;
}
.locale__sep { min-width: 0; color: var(--rule); }
.locale [aria-current="true"] { color: var(--ink); }
.locale a { color: var(--ink-muted); }

.nav-toggle { display: none; width: 48px; height: 48px; background: none; border: 1px solid var(--rule); cursor: pointer; align-items: center; justify-content: center; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 56px var(--gutter) 44px; max-width: var(--max); margin: 0 auto; }
.footer__cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
.footer__col { display: flex; flex-direction: column; gap: 11px; font-size: 14px; }
.footer__legal { font-size: 13px; color: var(--ink-muted); margin: 22px 0 0; }

/* ---------- sections ---------- */
.section { padding: 88px var(--gutter); max-width: var(--max); margin: 0 auto; }
.section--tight { padding-top: 0; }
.section--navy { background: var(--brand); color: var(--paper); max-width: none; }
.section--navy .inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section--navy .eyebrow { color: var(--navy-muted); }
.section--navy a:hover { color: var(--on-navy); }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-bottom: 48px; }

/* ---------- grids ---------- */
.grid { display: grid; gap: 40px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--hairline { gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.grid--hairline > * { background: var(--surface); }
.section--navy .grid--hairline { background: var(--navy-rule); border-color: var(--navy-rule); }
.section--navy .grid--hairline > * { background: var(--brand); }

/* ---------- cards ---------- */
.card-top { border-top: 2px solid var(--ink); padding-top: 20px; display: block; }
.card__media { background: var(--placeholder); border: 1px solid var(--rule); aspect-ratio: 3 / 2; margin-bottom: 18px; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.prose img, .prose figure > img { margin-inline: auto; }
.section--navy .card__media { background: var(--navy-surface); border-color: var(--navy-rule); }
.card__title { font-family: var(--display); font-size: 25px; font-weight: 500; line-height: 1.22; margin: 0 0 10px; }
.card__dek { font-size: 15px; line-height: 1.6; color: var(--ink-body); margin: 0; }
.section--navy .card__dek { color: var(--navy-text); }

.pillar { padding: 44px 40px; border-right: 1px solid var(--rule); }
.pillar__icon { color: var(--accent); margin-bottom: 24px; }

.numbered__n { font-family: var(--display); font-size: 15px; color: var(--accent); }
.numbered__title { font-size: 19px; font-weight: 600; margin: 14px 0 10px; }

/* ---------- at a glance ---------- */
.facts { border: 1px solid var(--rule); background: var(--surface); padding: 34px; align-self: start; }

.glance { display: flex; flex-direction: column; }
.glance__row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 20px; margin-bottom: 10px;
}
.glance__k { font-size: 15px; color: var(--ink-body); line-height: 1.35; }
.glance__v { font-family: var(--display); font-size: 26px; line-height: 1; white-space: nowrap; }
.glance__v--brand { color: var(--brand); }

/* Track and fill. Decorative: the progression builds to "always" rather than
   charting anything, so the bars are aria-hidden and never carry information
   the numbers do not already state. */
.glance__bar { height: 6px; background: #E5E0D3; margin-bottom: 26px; }
.glance__bar:last-child { margin-bottom: 0; }
.glance__bar > i { display: block; height: 100%; }

/* ---------- article ---------- */
.article-head { max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto; padding: 72px var(--gutter) 0; }
.article-hero { max-width: calc(1080px + 2 * var(--gutter)); margin: 0 auto 52px; padding: 0 var(--gutter); }
/* img{display:block} kills the inline centring images would otherwise get, so
   any image narrower than its frame pins to the left unless told otherwise. */
.article-hero img { margin-inline: auto; }
.byline { display: flex; align-items: center; gap: 14px; padding-bottom: 36px; }
.byline__avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--placeholder); border: 1px solid var(--rule); object-fit: cover; }

.prose { max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); color: var(--ink-prose); }
.prose > * { margin: 0 0 26px; }
.prose p, .prose li { font-size: 19px; line-height: 1.72; }
/* No lead-paragraph treatment. The design assumed a short editorial lead-in,
   but across the imported archive only 37% of posts open with a paragraph
   under 300 characters and 35% open with one over 600 — at which point larger,
   heavier type reads as a block of bold rather than an intro. Uniform body
   copy is the honest fit for this content. */
.prose li { margin-bottom: 10px; }
.prose h2 { font-family: var(--display); font-size: 32px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.2; margin: 48px 0 18px; }
.prose h3 { font-family: var(--display); font-size: 25px; font-weight: 500; margin: 36px 0 14px; }
.prose a { color: var(--accent); border-bottom: 1px solid #A7C6F2; }
.prose a:hover { border-bottom-color: var(--accent); }
.prose blockquote { border-left: 3px solid var(--accent); padding-left: 24px; font-family: var(--display); font-size: 24px; line-height: 1.45; color: var(--ink); }
.prose figcaption { font-size: 14px; color: var(--ink-muted); text-align: center; margin-top: 10px; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: var(--rule-soft); padding: 2px 6px; }
.prose pre { background: var(--ink); color: var(--paper); padding: 20px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; color: inherit; }

/* Koenig cards — required by gscan, and by anything written in Ghost from here */
.kg-card { margin: 0 0 26px; }
.kg-width-wide  { max-width: 1040px; margin-left: calc((var(--measure) - 1040px) / 2); margin-right: auto; }
.kg-width-full  { max-width: 100vw;  margin-left: calc(50% - 50vw); }
.kg-image { margin-inline: auto; }
.kg-embed-card, .kg-gallery-card { display: flex; flex-direction: column; align-items: center; }
.kg-gallery-row { display: flex; gap: 8px; }
.kg-bookmark-card a { display: flex; border: 1px solid var(--rule); background: var(--surface); border-bottom: 1px solid var(--rule); }
.kg-bookmark-content { padding: 20px; }
.kg-bookmark-title { font-weight: 600; }
.kg-bookmark-description { color: var(--ink-body); font-size: 15px; }
.kg-callout-card { background: var(--surface); border: 1px solid var(--rule); padding: 20px 24px; display: flex; gap: 14px; }
.kg-button-card { display: flex; justify-content: center; }
.kg-btn { display: inline-flex; min-height: 48px; align-items: center; padding: 14px 28px; background: var(--brand); color: var(--paper); font-weight: 600; }
.kg-table-card table { width: 100%; border-collapse: collapse; font-size: 16px; }
.kg-table-card th, .kg-table-card td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.kg-table-card th { width: 34%; color: var(--ink-muted); font-weight: 600; }
.kg-table-card caption { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); padding-bottom: 8px; }

/* ---------- tags & pagination ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 22px 0; }
.chip { border: 1px solid var(--rule); padding: 8px 15px; font-size: 13px; font-weight: 500; min-height: 40px; display: inline-flex; align-items: center; }
.chip--on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.pagination { display: flex; align-items: center; justify-content: space-between; padding-top: 26px; gap: 20px; }
.pagination__info { font-size: 14px; color: var(--ink-muted); }
.pagination__links { display: flex; gap: 8px; }
.pagination__links a, .pagination__links span { border: 1px solid var(--rule); padding: 10px 15px; font-size: 14px; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.pagination__links a { border-color: var(--ink); }
.pagination__links span { color: var(--ink-muted); }

/* ---------- closing band ---------- */
.cta-band { background: var(--accent); color: var(--surface); padding: 72px 80px; display: flex; align-items: center; justify-content: space-between; gap: 60px; }
.cta-band p { font-size: 18px; line-height: 1.55; margin: 0; max-width: 560px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  :root { --gutter: 48px; }
  .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  :root { --gutter: 20px; }
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.is-open { display: flex; position: absolute; inset: 78px 0 auto; flex-direction: column;
                 align-items: flex-start; gap: 0; background: var(--surface);
                 border-bottom: 1px solid var(--rule); padding: 8px 20px 16px; z-index: 20; }
  .nav.is-open a { padding: 14px 0; width: 100%; border-bottom: 1px solid var(--rule-soft); }
  .site-header { position: relative; padding: 14px var(--gutter); }
  .brand__logo { height: 38px; }
  .section { padding: 48px var(--gutter); }
  .section__head { flex-direction: column; align-items: flex-start; gap: 20px; margin-bottom: 32px; }
  .grid, .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .grid--hairline { gap: 1px; }
  .pillar { border-right: 0; border-bottom: 1px solid var(--rule); padding: 30px 0; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 36px 26px; gap: 26px; }
  .article-head, .article-hero, .prose { padding-inline: var(--gutter); }
  .kg-width-wide, .kg-width-full { max-width: 100%; margin-left: 0; }
  .prose p, .prose li { font-size: 17px; }
  .facts { padding: 22px 22px 6px; }
  .pagination { flex-direction: column; align-items: flex-start; }
}

/* ---------- services grid ---------- */
.svc { display: block; padding: 34px 30px; transition: background .15s ease; }
.svc:hover { background: var(--paper); color: inherit; }
.svc:hover .numbered__title { color: var(--accent); }
.svc__more { display: inline-block; margin-top: 16px; font-size: 14px; font-weight: 600; color: var(--accent); }

/* ---------- forms ---------- */
.form__row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.form__label { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); }
.form__input {
  font-family: inherit; font-size: 16px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--rule);
  padding: 13px 15px; min-height: 48px; width: 100%;
}
.form__input:focus-visible { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; }
textarea.form__input { resize: vertical; line-height: 1.6; }
.form__check { display: flex; align-items: flex-start; gap: 10px; margin: 24px 0 12px; font-size: 15px; color: var(--ink-body); }
.form__check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--brand); }
.form__check a { color: var(--accent); border-bottom: 1px solid var(--accent); }
.form__note { font-size: 13px; color: var(--ink-muted); margin: 0 0 20px; }
.form__note code { background: var(--rule-soft); padding: 2px 6px; font-family: ui-monospace, Menlo, monospace; }
.cta-band .form__label { color: inherit; }

@media (max-width: 860px) {
  .section[style*="grid-template-columns:repeat(12"] { display: block !important; }
  .section[style*="grid-template-columns:repeat(12"] > div { margin-bottom: 32px; }
}

/* ---------- layout blocks available inside editable page content ----------
   Ghost's editor has no multi-column card, so these classes are applied from an
   HTML card in the page body. The text inside stays editable; only the wrapper
   is markup. Documented in the README. */
.prose .cols-2,
.prose .cols-3 { display: grid; gap: 0; border: 1px solid var(--rule); border-right: 0; margin: 0 0 26px; }
.prose .cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.prose .cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.prose .cols-2 > *,
.prose .cols-3 > * { padding: 34px 32px; border-right: 1px solid var(--rule); }
.prose .cols-2 h3, .prose .cols-3 h3 {
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); font-family: var(--body); margin: 0 0 18px;
}
.prose .cols-2 p, .prose .cols-3 p { font-size: 16px; line-height: 1.65; margin: 0; }
.prose .cols-3 .lead p, .prose .cols-2 .lead p { font-family: var(--display); font-size: 23px; line-height: 1.42; }

/* a plain fact list: label above value, hairline separated */
.prose .facts-list { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin: 0 0 26px; }
.prose .facts-list > * { background: var(--surface); padding: 26px 28px; }
.prose .facts-list h3 {
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-muted); font-family: var(--body); margin: 0 0 12px;
}
.prose .facts-list p { font-family: var(--display); font-size: 20px; line-height: 1.4; margin: 0; }
.prose .facts-list a { color: var(--accent); border: 0; font-weight: 600; }

/* numbers strip */
.prose .stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin: 0 0 26px; }
.prose .stats > * { border-top: 2px solid var(--ink); padding-top: 22px; }
.prose .stats strong {
  display: block; font-family: var(--display); font-weight: 400;
  font-size: clamp(38px, 4vw, 58px); line-height: 1; margin-bottom: 10px; letter-spacing: -.02em;
}
.prose .stats span { font-size: 15px; color: var(--ink-body); }

@media (max-width: 860px) {
  .prose .cols-2, .prose .cols-3, .prose .stats { grid-template-columns: minmax(0, 1fr); }
  .prose .cols-2 > *, .prose .cols-3 > * { border-right: 0; border-bottom: 1px solid var(--rule); }
  .prose .stats { gap: 24px; }
}

/* Page content spans the section rather than the article measure. The parent
   .section already supplies the gutter, so this must not add another. */
.prose--wide { max-width: none; padding-inline: 0; }

.contact-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }

/* contact form result + honeypot */
.form__result { border: 1px solid var(--rule); background: var(--surface); padding: 18px 22px; margin-bottom: 24px; }
.form__result p { margin: 0; font-size: 16px; line-height: 1.55; }
.form__result p a { color: var(--accent); border-bottom: 1px solid var(--accent); }
.form__result:has([data-form-sent]:not([hidden])) { border-left: 3px solid var(--accent); }
.form__pot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- social links ---------- */
.social { display: flex; gap: 8px; list-style: none; margin: 18px 0 0; padding: 0; }
.social a {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  background: var(--ink-muted); color: var(--paper); border-radius: 6px;
  transition: background .15s ease;
}
.social a:hover { background: var(--brand); color: var(--paper); }
