/* ==========================================================================
   Nadam — Inner Clarity. Better Decisions. Meaningful Impact.
   Design system. Built to the Website Master Build Document (#980).
   Palette + type from Brand Identity Guidelines (#981).
   Editorial / essay-like. Words carry the page. Generous white space.
   ========================================================================== */

:root {
  /* Brand palette (#981) */
  --warm-charcoal: #2E2822;  /* H1, primary body, logo name */
  --deep-earth:    #3E3530;  /* H2, supporting body, lists */
  --bark-warm:     #7A6545;  /* subheadings, labels, metadata, captions */
  --maroon:        #7D2535;  /* dividers, accents, highlight tags */
  --sacred-gold:   #C2964A;  /* accents/tags/CTA on dark */
  --driftwood:     #C8C0B0;  /* body on dark, muted captions */
  --parchment:     #F5F1EB;  /* light bg / text on dark */
  --parchment-2:   #EFEAE1;  /* slightly deeper parchment for panels */
  --paper:         #FBF9F5;  /* near-white reading surface */

  /* Fonts */
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Rhythm */
  --measure: 38rem;          /* ideal reading width */
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --section-y: clamp(4.5rem, 11vw, 9rem);
}

/* ------- reset ------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--warm-charcoal);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* ------- typography ------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--warm-charcoal);
  line-height: 1.12;
  letter-spacing: 0.01em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.6rem, 6.5vw, 4.6rem); font-weight: 500; }
h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); color: var(--deep-earth); }
h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: var(--deep-earth); }
p { margin: 0 0 1.3em; }
em, .i { font-style: italic; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bark-warm);
  margin: 0 0 1.4rem;
}
.lede {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  line-height: 1.5;
  color: var(--deep-earth);
}
.muted { color: var(--bark-warm); }

/* maroon hairline accent under titles */
.rule {
  width: 64px; height: 2px; border: 0;
  background: var(--maroon);
  margin: 1.6rem 0;
}
.rule.center { margin-left: auto; margin-right: auto; }

/* ------- layout ------- */
.wrap { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: var(--gutter); }
.prose { max-width: var(--measure); }
.prose.center { margin-inline: auto; }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(3rem, 7vw, 5rem); }
.lift { margin-top: -1px; }

/* dark "deep earth" sections for contrast / pause */
.section--dark {
  background: var(--deep-earth);
  color: var(--parchment);
}
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--parchment); }
.section--dark .eyebrow { color: var(--sacred-gold); }
.section--dark .lede { color: var(--driftwood); }
.section--dark .muted { color: var(--driftwood); }
.section--dark .rule { background: var(--sacred-gold); }
.section--dark a.link { color: var(--sacred-gold); }

.section--parchment { background: var(--parchment); }

/* ------- buttons ------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95rem 1.9rem;
  border: 1px solid var(--warm-charcoal);
  color: var(--warm-charcoal);
  background: transparent;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
  cursor: pointer;
}
.btn:hover { background: var(--warm-charcoal); color: var(--parchment); }
.btn--primary { background: var(--maroon); border-color: var(--maroon); color: var(--parchment); }
.btn--primary:hover { background: #651d2b; border-color: #651d2b; }
.btn--ghost-light { border-color: var(--driftwood); color: var(--parchment); }
.btn--ghost-light:hover { background: var(--sacred-gold); border-color: var(--sacred-gold); color: var(--warm-charcoal); }
.btn--gold { background: var(--sacred-gold); border-color: var(--sacred-gold); color: var(--warm-charcoal); }
.btn--gold:hover { background: #ad8235; border-color: #ad8235; }
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

/* inline text link with underline accent */
a.link {
  color: var(--maroon);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: opacity .2s;
}
a.link:hover { opacity: .7; }

/* ------- header / nav ------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid color-mix(in srgb, var(--bark-warm) 22%, transparent);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 72px;
}
.brand { text-decoration: none; line-height: 1; display: flex; flex-direction: column; gap: 2px; }
.brand .name { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; letter-spacing: 0.02em; color: var(--warm-charcoal); }
.brand .brandline { font-family: var(--sans); font-size: 0.6rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--bark-warm); }
.nav-links { display: flex; align-items: center; gap: 1.9rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-family: var(--sans); font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.06em; text-decoration: none; color: var(--deep-earth);
  padding-bottom: 3px; border-bottom: 1.5px solid transparent; transition: border-color .2s, color .2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--maroon); border-color: var(--maroon); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--warm-charcoal); margin: 5px 0; transition: .25s; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid color-mix(in srgb, var(--bark-warm) 22%, transparent);
    padding: 0 var(--gutter);
    max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease;
  }
  .nav-links a { display: block; width: 100%; padding: .85rem 0; border-bottom: 1px solid color-mix(in srgb, var(--bark-warm) 14%, transparent); }
  .nav-links li:last-child a { border-bottom: 0; }
  .nav[data-open="true"] .nav-links { max-height: 70vh; padding-block: .5rem 1rem; }
}

/* ------- hero ------- */
.hero { padding-block: clamp(4.5rem, 12vw, 8.5rem) clamp(3.5rem, 9vw, 6rem); }
.hero h1 { max-width: 18ch; }
.hero .lede { max-width: 30ch; margin-top: 1.4rem; }

/* ------- components ------- */
.kicker-q {            /* large pulled question */
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1.32; color: var(--deep-earth); font-style: italic;
  max-width: 24ch;
}
.section--dark .kicker-q { color: var(--parchment); }
blockquote.pull {
  margin: 2.5rem 0; padding-left: 1.5rem;
  border-left: 2px solid var(--maroon);
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.4rem, 2.6vw, 1.85rem); line-height: 1.4; color: var(--deep-earth);
}
.section--dark blockquote.pull { border-color: var(--sacred-gold); color: var(--parchment); }

.tag {
  display: inline-block; font-family: var(--sans); font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  background: var(--maroon); color: var(--parchment);
  padding: 0.3rem 0.6rem; border-radius: 2px; vertical-align: middle;
}

/* grid of "the work" topics / resource cards */
.grid { display: grid; gap: clamp(1.25rem, 3vw, 2rem); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px){ .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper);
  border: 1px solid color-mix(in srgb, var(--bark-warm) 26%, transparent);
  padding: clamp(1.5rem, 3vw, 2.2rem);
}
.section--parchment .card { background: #fff; }
.card h3 { margin-bottom: .4rem; }
.card .num { font-family: var(--serif); font-size: 1.1rem; color: var(--maroon); }

/* A.C.R.E. steps */
.acre { display: grid; gap: 1.5rem; grid-template-columns: repeat(4,1fr); margin-top: 2.5rem; }
@media (max-width: 820px){ .acre { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px){ .acre { grid-template-columns: 1fr; } }
.acre .step .letter { font-family: var(--serif); font-size: 2.6rem; color: var(--maroon); line-height: 1; }
.section--dark .acre .step .letter { color: var(--sacred-gold); }
.acre .step h4 { font-size: 1.15rem; margin: .5rem 0 .35rem; letter-spacing: .08em; text-transform: uppercase; font-family: var(--sans); font-weight: 600; }

/* outcome story (Situation -> Awareness -> Different Choices -> Different Results) */
.outcome { margin-top: 2rem; }
.outcome ol { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 1px; background: color-mix(in srgb, var(--bark-warm) 22%, transparent); border: 1px solid color-mix(in srgb, var(--bark-warm) 22%, transparent); }
.outcome li { background: var(--paper); padding: 1rem 1.25rem; display: flex; gap: 1rem; align-items: baseline; }
.outcome li .lbl { font-family: var(--sans); font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--bark-warm); min-width: 9.5rem; }
.closing-line { margin-top: 1.1rem; font-family: var(--serif); font-style: italic; font-size: 1.22rem; line-height: 1.5; color: var(--deep-earth); }
.section--dark .closing-line { color: var(--parchment); }

/* logo strip */
.logos { display: flex; flex-wrap: wrap; gap: 2.5rem; align-items: center; opacity: .65; }
.logos span { font-family: var(--serif); font-style: italic; color: var(--bark-warm); font-size: 1.15rem; }

/* image slot — intentional, on-brand placeholder that names the photo required */
.imgslot {
  width: 100%;
  background:
    radial-gradient(120% 90% at 30% 25%, color-mix(in srgb, var(--driftwood) 55%, transparent), transparent 60%),
    linear-gradient(160deg, var(--parchment-2), var(--driftwood));
  border: 1px solid color-mix(in srgb, var(--bark-warm) 30%, transparent);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .7rem;
  text-align: center; padding: clamp(1.25rem, 3vw, 2rem); color: var(--bark-warm);
}
.imgslot.portrait { aspect-ratio: 4/5; }
.imgslot.wide { aspect-ratio: 16/10; }
.imgslot.tall { aspect-ratio: 3/4; }
.imgslot .ph-icon { font-size: 1.6rem; line-height: 1; opacity: .7; }
.imgslot .ph-title { font-family: var(--sans); font-size: .68rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.imgslot .ph-desc { font-family: var(--serif); font-style: italic; font-size: 1.02rem; line-height: 1.4; color: var(--deep-earth); max-width: 26ch; }
/* dark-section variant */
.section--dark .imgslot {
  background: rgba(245,241,235,.05);
  border-color: rgba(200,192,176,.32);
  color: var(--driftwood);
}
.section--dark .imgslot .ph-desc { color: var(--parchment); }

/* ------- figures / photography (no drop shadows per brand) ------- */
figure.fig { margin: 0; }
figure.fig img {
  width: 100%; display: block; object-fit: cover;
  border: 1px solid color-mix(in srgb, var(--bark-warm) 26%, transparent);
  filter: saturate(.97);
}
figure.fig.portrait img { aspect-ratio: 4/5; }
figure.fig.wide img { aspect-ratio: 16/10; }
figure.fig figcaption { margin-top: .6rem; font-size: .76rem; letter-spacing: .04em; color: var(--bark-warm); }
.section--dark figure.fig figcaption { color: var(--driftwood); }

/* media + text split — text keeps its reading measure, media fills the right */
.media-2 { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.75rem, 4.5vw, 4rem); align-items: center; }
.media-2.portraitcol { grid-template-columns: 1.15fr .85fr; }
.media-2.top { align-items: start; }
.media-2 .m-text { max-width: var(--measure); }
.media-2 .m-media { display: flex; }
.media-2 .m-media > * { width: 100%; }
.media-2 .fig.lead { order: 2; }
/* flip = media on the left, text on the right (DOM stays text-first for mobile/SEO) */
@media (min-width: 821px){
  .media-2.flip .m-text { order: 2; }
  .media-2.flip .m-media { order: 1; }
}
@media (max-width: 820px){
  .media-2, .media-2.portraitcol { grid-template-columns: 1fr; }
  .media-2 .fig.lead { order: 0; }
  .media-2 .m-text { max-width: none; }
}

/* small image atop a card */
.card .card-img { margin: -1px -1px 1.4rem; }
.card .card-img img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }

/* facts list */
.facts { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.facts li { padding: .65rem 0; border-bottom: 1px solid color-mix(in srgb, var(--bark-warm) 18%, transparent); padding-left: 1.4rem; position: relative; }
.facts li::before { content: ""; position: absolute; left: 0; top: 1.05rem; width: 6px; height: 6px; background: var(--maroon); border-radius: 50%; }

/* ------- forms (Connect) ------- */
.field { margin-bottom: 1.3rem; }
.field label { display: block; font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--bark-warm); margin-bottom: .5rem; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--sans); font-size: 1rem; color: var(--warm-charcoal);
  background: #fff; border: 1px solid color-mix(in srgb, var(--bark-warm) 35%, transparent);
  padding: .85rem 1rem; border-radius: 0;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--sacred-gold); outline-offset: 1px; border-color: var(--bark-warm); }
.form-note { font-size: .9rem; color: var(--bark-warm); }
.form-status { margin-top: 1rem; font-family: var(--sans); font-size: .95rem; }
.form-status.ok { color: #2f6b3f; }
.form-status.err { color: var(--maroon); }

/* ------- footer ------- */
.site-footer { background: var(--warm-charcoal); color: var(--driftwood); padding-block: clamp(3rem, 7vw, 5rem); }
.site-footer a { color: var(--driftwood); text-decoration: none; }
.site-footer a:hover { color: var(--parchment); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 760px){ .footer-grid { grid-template-columns: 1fr; gap: 2rem; } }
.footer-brand .name { font-family: var(--serif); font-size: 1.9rem; color: var(--parchment); }
.footer-brand .brandline { font-size: .7rem; letter-spacing: .24em; text-transform: uppercase; color: var(--sacred-gold); margin-top: .3rem; }
.footer-col h4 { font-family: var(--sans); font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--parchment); margin-bottom: 1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: .6rem; font-size: .95rem; }
.footer-base { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(245,241,235,.14); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: .82rem; color: rgba(200,192,176,.8); }

/* generic flow spacing inside prose blocks */
.flow > * + * { margin-top: 1.1em; }
.spacer-s { height: 1.5rem; } .spacer-m { height: 3rem; }

/* gentle entrance — content is ALWAYS visible (no opacity hiding), so it renders
   for no-JS, for SEO, and in full-page screenshots. Just a subtle settle. */
.reveal { animation: riseIn .7s ease-out both; }
@keyframes riseIn { from { transform: translateY(12px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce){ .reveal { animation: none; } html { scroll-behavior: auto; } }

/* ── Logo strip (Work In Practice — organisations) ───────────────────────── */
.logo-strip { margin-top: 2.5rem; }
.logo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 3.5vw, 3rem) clamp(1.75rem, 4vw, 3.5rem);
}
.logo-grid .logo {
  display: flex; align-items: center; justify-content: center;
  min-height: 92px; padding: 1rem 1.1rem;
  background: #fff;
  border: 1px solid rgba(46,40,34,.08);
  border-radius: 4px;
  transition: box-shadow .3s ease, transform .3s ease;
}
.logo-grid .logo:hover { box-shadow: 0 8px 22px rgba(46,40,34,.10); transform: translateY(-2px); }
.logo-grid .logo img {
  max-height: 56px; max-width: 100%; width: auto; height: auto;
  object-fit: contain;
}
@media (max-width: 900px){ .logo-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px){ .logo-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── Push Pattern gallery (Resources — Guides & Downloads) ────────────────── */
.pattern-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.1rem, 2.6vw, 1.9rem);
  margin-top: 2.5rem;
}
@media (max-width: 820px){ .pattern-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px){ .pattern-grid { grid-template-columns: 1fr; } }
.pattern-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--paper);
  border: 1px solid rgba(46,40,34,.10);
  border-radius: 4px; overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.pattern-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(46,40,34,.16); border-color: rgba(125,37,53,.35); }
.pattern-card img { width: 100%; aspect-ratio: 1024/1536; object-fit: cover; object-position: top center; display: block; }
.pattern-card .pc-meta { padding: .85rem 1rem 1.05rem; }
.pattern-card .pc-num { font-family: var(--serif); font-size: 1.05rem; color: var(--maroon); }
.pattern-card .pc-title { font-family: var(--serif); font-size: 1.35rem; line-height: 1.15; color: var(--warm-charcoal); margin-top: .1rem; }
.pattern-card .pc-view { display: inline-block; margin-top: .55rem; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--bark-warm); }
.pattern-card:hover .pc-view { color: var(--maroon); }

/* --- Image lightbox (full-screen zoomable viewer) --- */
.lightbox { position: fixed; inset: 0; z-index: 1000; display: none; background: rgba(26,22,18,.94); backdrop-filter: blur(2px); }
.lightbox.open { display: block; }
.lb-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; cursor: zoom-in; }
.lb-stage.zoomed { cursor: grab; }
.lb-stage.panning { cursor: grabbing; }
.lb-img { max-width: 92vw; max-height: 86vh; transform: translate(0,0) scale(1); transform-origin: center center; will-change: transform; user-select: none; -webkit-user-drag: none; box-shadow: 0 24px 70px rgba(0,0,0,.55); border-radius: 2px; }
.lb-close { position: absolute; top: .9rem; right: 1.1rem; z-index: 3; width: 2.6rem; height: 2.6rem; border: 1px solid rgba(245,241,235,.35); background: rgba(46,40,34,.55); color: var(--parchment); font-size: 1.7rem; line-height: 1; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s, border-color .15s; }
.lb-close:hover { background: var(--maroon); border-color: var(--maroon); }
.lb-controls { position: absolute; bottom: 1.2rem; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: .5rem; align-items: center; background: rgba(46,40,34,.55); border: 1px solid rgba(245,241,235,.22); border-radius: 999px; padding: .35rem .5rem; }
.lb-btn { min-width: 2.2rem; height: 2.2rem; padding: 0 .7rem; border: none; background: transparent; color: var(--parchment); font-family: var(--sans); font-size: 1.15rem; line-height: 1; border-radius: 999px; cursor: pointer; transition: background .15s; }
.lb-btn[data-lb="reset"] { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.lb-btn:hover { background: rgba(194,150,74,.35); }
.lb-hint { position: absolute; top: 1.1rem; left: 50%; transform: translateX(-50%); z-index: 3; color: var(--driftwood); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
@media (max-width: 560px){ .lb-hint { display: none; } }
