/* ==========================================================================
   Mophead Media, design tokens + shared components
   Single source of truth. No page may hard-code a hex or px radius that
   exists here. Every contrast pair below was measured; see REDESIGN-NOTES.md.
   ========================================================================== */

:root{
  /* ---- Surfaces (ivory dominates ~70% of any viewport) ---- */
  --ivory:#F7F3EC;
  --ivory-2:#F1ECE3;          /* alternating sections, ~4% darker  */
  --paper:#FFFDF9;            /* card + input surfaces             */

  /* ---- Ink ---- */
  --navy:#1C2740;
  --navy-deep:#111A2C;      /* footer depth */             /* body text + footer bg   13.43:1 on ivory */
  --slate:#5A6378;            /* secondary prose          5.44:1 on ivory */
  --muted:#646B7D;            /* captions, citations      4.82:1 on ivory */
  /* rgb triplets of the above, for the header's translucent glass and scrim */
  --navy-rgb:28,39,64; --ivory-rgb:247,243,236; --paper-rgb:255,253,249;

  /* ---- Action ----
     Token names are legacy role names: "harbor" is the primary colour and
     "ochre" the accent, whatever their hue. Blue + mint; refreshed 30 Sep 2026. */
  --harbor:#0A64BC;           /* primary (blue)           5.33:1 on ivory */
  --harbor-deep:#004F9A;      /* hover / pressed          8.12:1 under white */
  --teal-tint:#E1EEFF;        /* hovers, washes, shapes   */

  /* ---- Accent ----
     --ochre is a FILL ONLY; use navy for text on mint.
     Any accent-coloured text must use the darker --ochre-deep. */
  --ochre:#89C5B5;
  --ochre-deep:#286457;
  --ochre-tint:#E2F1EB;

  /* ---- Support ---- */
  --warn:#B3261E;             /* review flags only  5.91:1 on ivory */
  --line:#E3DDD2;
  --line-soft:#EDE7DC;
  --focus:var(--harbor);

  /* ---- Radius ---- */
  --r-sm:8px; --r-md:14px; --r-lg:22px; --r-pill:999px;

  /* ---- Elevation ---- */
  --sh-1:0 1px 2px rgba(28,39,64,.06);
  --sh-2:0 1px 2px rgba(28,39,64,.06), 0 8px 24px rgba(28,39,64,.08);
  --sh-lift:0 2px 4px rgba(28,39,64,.07), 0 14px 34px rgba(28,39,64,.12);

  /* ---- Spacing ---- */
  --s-1:4px; --s-2:8px; --s-3:12px; --s-4:16px; --s-5:24px;
  --s-6:32px; --s-7:48px; --s-8:64px; --s-9:96px;

  /* ---- Type scale (fluid on the top three) ---- */
  --t-12:12px; --t-14:14px; --t-16:16px; --t-18:18px; --t-22:22px; --t-28:28px;
  --t-36:clamp(28px,3.2vw,36px);
  --t-48:clamp(32px,4.4vw,48px);
  --t-64:clamp(36px,6vw,64px);

  /* ---- Families ---- */
  --f-display:'Plus Jakarta Sans','Figtree',system-ui,-apple-system,'Segoe UI',sans-serif;
  --f-body:'Instrument Sans',system-ui,-apple-system,'Segoe UI',sans-serif;
  --f-accent:'Kaushan Script','Brush Script MT',cursive;  /* pull quotes only */
  --f-accent-head:'Fraunces',Georgia,serif;              /* heading emphasis  */

  --measure:68ch;
  --maxw:1180px;
}

/* ---------------------------------------------------------------- base ---- */
*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  font-family:var(--f-body);font-size:var(--t-16);line-height:1.6;
  background:var(--ivory);color:var(--navy);
  -webkit-font-smoothing:antialiased;overflow-x:hidden;
}
h1,h2,h3,h4,h5{font-family:var(--f-display);font-weight:700;line-height:1.18;letter-spacing:-.015em}
h1{font-size:var(--t-64);line-height:1.12}
h2{font-size:var(--t-48)}
h3{font-size:var(--t-28)}
h4{font-size:var(--t-22)}

/* Emphasis inside a heading takes the accent face, Fraunces italic in
   harbor blue (5.33:1 on ivory), matching the homepage's accent phrases. */
h1 em,h2 em,h3 em{
  font-family:var(--f-accent-head);font-style:italic;font-weight:400;
  letter-spacing:-.045em;color:var(--harbor);
}

/* Rotating word. Every option occupies the same grid cell, so the container
   sizes to the widest and the headline never reflows mid-rotation. */
.rotator{display:inline-grid;vertical-align:top;text-align:left}
.rotator > em{
  grid-area:1/1;opacity:0;transform:translateY(.18em);
  transition:opacity .4s ease,transform .4s ease;
}
.rotator > em.is-on{opacity:1;transform:none}
@media(prefers-reduced-motion:reduce){
  /* No rotation, the first option stands as static copy. */
  .rotator > em{transition:none}
}
p{max-width:var(--measure);overflow-wrap:break-word}
/* A long URL or unbroken token must never widen the page. */
.case-section p,.card p,.lede,li{overflow-wrap:break-word}
a{color:var(--harbor);text-underline-offset:.18em}
a:hover{color:var(--harbor-deep)}
img,svg{max-width:100%;height:auto;display:block}
::selection{background:var(--teal-tint);color:var(--navy)}

:where(a,button,input,select,textarea,[tabindex]):focus-visible{
  outline:2px solid var(--focus);outline-offset:2px;border-radius:var(--r-sm);
}

/* Eyebrows are the only permitted all-caps. */
.eyebrow{
  font-family:var(--f-body);font-size:var(--t-12);font-weight:500;
  letter-spacing:.08em;text-transform:uppercase;color:var(--harbor);
}
.lede{font-size:var(--t-18);color:var(--slate);max-width:var(--measure)}
.wrap{max-width:var(--maxw);margin:0 auto;padding:0 20px}
@media(min-width:768px){.wrap{padding:0 32px}}

/* ------------------------------------------------------------ sections ---- */
.section{padding:var(--s-8) 0}
@media(min-width:768px){.section{padding:var(--s-9) 0}}
.section--alt{background:var(--ivory-2)}
.section--navy{background:var(--navy);color:var(--ivory)}
.section--navy h1,.section--navy h2,.section--navy h3{color:var(--ivory)}
.section--navy p{color:rgba(247,243,236,.82)}

/* Curve divider: one flippable SVG, max 60px. */
.divider-curve{display:block;width:100%;height:48px;color:var(--ivory-2)}
@media(min-width:768px){.divider-curve{height:60px}}
.divider-curve--flip{transform:scaleY(-1)}
.divider-curve svg{width:100%;height:100%;display:block}
.divider-curve path{fill:currentColor}

/* ------------------------------------------------------------- buttons ---- */
.btn-primary,.btn-secondary{
  display:inline-flex;align-items:center;justify-content:center;gap:var(--s-2);
  font-family:var(--f-body);font-size:var(--t-16);font-weight:500;
  padding:14px 26px;min-height:48px;border-radius:var(--r-pill);
  text-decoration:none;cursor:pointer;border:2px solid transparent;white-space:nowrap;
  transition:background .2s ease,color .2s ease,transform .2s ease,box-shadow .2s ease;
}
.btn-primary{background:var(--harbor);color:#fff}          /* 5.90:1 */
.btn-primary:hover{background:var(--harbor-deep);color:#fff;transform:translateY(-2px);box-shadow:var(--sh-2)}
.btn-secondary{background:transparent;color:var(--harbor);border-color:var(--harbor)}
.btn-secondary:hover{background:var(--teal-tint);color:var(--harbor-deep);transform:translateY(-2px)}
.btn-primary:disabled,.btn-secondary:disabled{opacity:.45;cursor:not-allowed;transform:none}
.btn-sm{padding:10px 18px;min-height:40px;font-size:var(--t-14)}

/* --------------------------------------------------------------- cards ---- */
.card{
  background:var(--paper);border-radius:var(--r-lg);padding:var(--s-5);
  box-shadow:var(--sh-1);border:1px solid var(--line-soft);
  display:flex;flex-direction:column;
  transition:transform .2s ease,box-shadow .2s ease;
}
@media(min-width:768px){.card{padding:var(--s-6)}}
.card--interactive:hover{transform:translateY(-2px);box-shadow:var(--sh-lift)}
.card--interactive:hover .card-title{color:var(--harbor-deep)}
.card-title{font-family:var(--f-display);font-size:var(--t-22);font-weight:700;transition:color .2s ease}

/* --------------------------------------------- impact counter chip -------
   The one signature device: Jakarta figure + Instrument label + ochre
   citation marker. Unverified figures render .badge-pending instead. */
.chip-impact{
  display:inline-flex;flex-direction:column;gap:var(--s-1);
  background:var(--paper);border:1px solid var(--line-soft);
  border-radius:var(--r-lg);padding:var(--s-4) var(--s-5);
  box-shadow:var(--sh-1);min-width:0;
}
.chip-impact .chip-figure{
  font-family:var(--f-display);font-size:var(--t-36);font-weight:800;
  line-height:1.1;color:var(--navy);font-variant-numeric:tabular-nums;
}
.chip-impact .chip-label{font-size:var(--t-14);color:var(--slate);line-height:1.4}
.chip-cite{
  display:inline-flex;align-items:center;gap:6px;margin-top:var(--s-1);
  font-size:var(--t-12);color:var(--ochre-deep);      /* 5.01:1 */
  text-decoration:none;font-weight:500;
}
.chip-cite::before{
  content:'';width:7px;height:7px;border-radius:var(--r-pill);
  background:var(--ochre);flex:none;
}
.chip-cite:hover{color:var(--navy);text-decoration:underline}

/* Preserved from the previous system, restyled. Never replaced by a guess. */
.badge-pending{
  display:inline-flex;align-items:center;gap:6px;
  font-size:var(--t-12);font-weight:500;letter-spacing:.02em;
  padding:4px 12px;border-radius:var(--r-pill);
  background:var(--ochre-tint);color:var(--ochre-deep);
  border:1px solid rgba(137,197,181,.35);
}
.badge-pending::before{content:'';width:7px;height:7px;border-radius:var(--r-pill);background:var(--ochre)}
.badge-verified{
  display:inline-flex;align-items:center;gap:6px;
  font-size:var(--t-12);font-weight:500;padding:4px 12px;border-radius:var(--r-pill);
  background:var(--teal-tint);color:var(--harbor-deep);border:1px solid rgba(10,100,188,.28);
}

.tag-chip{
  display:inline-flex;align-items:center;font-size:var(--t-12);font-weight:500;
  padding:5px 12px;border-radius:var(--r-pill);
  background:var(--ochre-tint);color:var(--ochre-deep);border:1px solid rgba(137,197,181,.28);
}
.tag-chip--interactive{cursor:pointer;transition:background .15s ease}
.tag-chip--interactive:hover,.tag-chip--interactive[aria-pressed="true"]{background:var(--ochre);color:var(--navy)}

/* --------------------------------------------------------------- forms ---- */
input[type=text],input[type=email],input[type=number],select,textarea{
  width:100%;font-family:var(--f-body);font-size:var(--t-16);
  padding:12px 14px;min-height:48px;                 /* 44px+ touch target */
  background:var(--paper);color:var(--navy);
  border:1.5px solid var(--line);border-radius:var(--r-md);
}
input:focus,select:focus,textarea:focus{
  outline:none;border-color:var(--harbor);box-shadow:0 0 0 3px rgba(10,100,188,.18);
}
input[type=range]{width:100%;accent-color:var(--harbor);min-height:auto;padding:0;border:0;background:none}
input[type=checkbox],input[type=radio]{width:auto;min-height:auto;accent-color:var(--harbor)}
label{font-size:var(--t-14);font-weight:500}

/* -------------------------------------------------------------- photos ----
   Uniform warm grade so all imagery sits in one atmosphere. */
.img-warm{position:relative;border-radius:var(--r-lg);overflow:hidden;background:var(--teal-tint)}
.img-warm > img{filter:saturate(.92) contrast(.98) brightness(1.02);width:100%;display:block}
.img-warm::after{
  content:'';position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(160deg,rgba(10,100,188,.14),rgba(10,100,188,.04) 55%,transparent);
}
.img-warm--arch{border-radius:var(--r-lg) var(--r-lg) var(--r-lg) var(--r-lg);}
@supports(border-radius:50% 50% 22px 22px / 40% 40% 22px 22px){
  .img-warm--arch{border-radius:48% 48% var(--r-lg) var(--r-lg) / 32% 32% var(--r-lg) var(--r-lg)}
}

/* -------------------------------------------------------------- footer ----
   The header and its menus live in site-header.css (ported from index.html). */
.site-footer{background:var(--navy);color:var(--ivory);padding:var(--s-8) 0 var(--s-6);margin-top:var(--s-8)}
.footer-grid{display:grid;grid-template-columns:1fr;gap:var(--s-6);max-width:var(--maxw);margin:0 auto;padding:0 20px}
@media(min-width:768px){.footer-grid{grid-template-columns:2fr 1fr 1fr;padding:0 32px}}
.site-footer h2{font-size:var(--t-22);margin-bottom:var(--s-3);color:var(--ivory)}
.site-footer h3{
  font-family:var(--f-body);font-size:var(--t-12);font-weight:500;letter-spacing:.08em;
  text-transform:uppercase;color:var(--teal-tint);margin-bottom:var(--s-3);
}
.site-footer p{color:rgba(247,243,236,.82);max-width:44ch}
.site-footer ul{list-style:none;display:grid;gap:var(--s-2)}
.site-footer a{color:var(--ivory);text-decoration:none;font-size:var(--t-14)}
.site-footer a:hover{color:var(--teal-tint);text-decoration:underline}
.footer-note{
  max-width:var(--maxw);margin:var(--s-7) auto 0;padding:var(--s-5) 20px 0;
  border-top:1px solid rgba(247,243,236,.18);
  font-size:var(--t-14);color:rgba(247,243,236,.78);display:grid;gap:var(--s-3);
}
@media(min-width:768px){.footer-note{padding:var(--s-5) 32px 0}}
.footer-note p{max-width:72ch;color:rgba(247,243,236,.78)}
.footer-note a{text-decoration:underline;font-weight:500}

/* Review annotation. Not published copy, strip before launch. */
.review-flag{
  display:flex;gap:var(--s-2);align-items:flex-start;
  margin-top:var(--s-5);padding:var(--s-3) var(--s-4);
  border-left:3px solid var(--warn);border-radius:0 var(--r-sm) var(--r-sm) 0;
  background:rgba(179,38,30,.06);
  color:var(--warn);font-size:var(--t-14);font-weight:500;line-height:1.5;
}
.review-flag strong{font-weight:700}
.review-flag p{max-width:72ch;color:var(--warn)}

/* ---------------------------------------------------------- case study ----
   Shared by every client story so the four pages cannot drift apart. */
.case-hero{padding:var(--s-8) 0 var(--s-6)}
@media(min-width:768px){.case-hero{padding:var(--s-9) 0 var(--s-7)}}
.case-hero h1{margin:var(--s-3) 0 var(--s-4);max-width:18ch}
.case-logo{max-height:64px;width:auto;margin-bottom:var(--s-5)}
.case-meta{display:grid;grid-template-columns:1fr;gap:var(--s-4);margin-top:var(--s-6)}
@media(min-width:640px){.case-meta{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1000px){.case-meta{grid-template-columns:repeat(4,1fr)}}
.case-meta .k{font-size:var(--t-12);letter-spacing:.08em;text-transform:uppercase;color:var(--harbor);font-weight:500}
.case-meta .v{font-family:var(--f-display);font-weight:700;font-size:var(--t-18);margin-top:6px;line-height:1.25}
.case-section{padding:var(--s-7) 0;border-top:1px solid var(--line-soft)}
.case-section .k{font-size:var(--t-12);letter-spacing:.08em;text-transform:uppercase;color:var(--harbor);font-weight:500}
.case-section h2{font-size:var(--t-36);margin:var(--s-2) 0 var(--s-4);max-width:20ch}
.case-section p{margin-bottom:var(--s-3);color:var(--slate);font-size:var(--t-18)}
.case-quote{background:var(--teal-tint);border-radius:var(--r-lg);padding:var(--s-6);margin:var(--s-6) 0}
@media(min-width:768px){.case-quote{padding:var(--s-7)}}
.case-quote .who{display:flex;align-items:center;gap:var(--s-3);margin-top:var(--s-5)}
.case-quote .who img{width:52px;height:52px;border-radius:var(--r-pill);object-fit:cover;flex:none}
.case-quote .who span{font-size:var(--t-14);color:var(--slate)}
.case-quote .who strong{display:block;color:var(--navy);font-weight:600;font-size:var(--t-16)}
.case-services{display:flex;flex-wrap:wrap;gap:var(--s-2);margin-top:var(--s-4)}
.case-next{display:flex;align-items:center;gap:var(--s-4);flex-wrap:wrap;margin:var(--s-7) 0 var(--s-8);padding:var(--s-5);background:var(--ivory-2);border-radius:var(--r-lg)}
.case-next img{max-height:44px;width:auto}
.case-cards{display:grid;grid-template-columns:1fr;gap:var(--s-5)}
@media(min-width:700px){.case-cards{grid-template-columns:repeat(2,1fr)}}
.case-card .logo-wrap{height:56px;display:flex;align-items:center;margin-bottom:var(--s-4)}
.case-card .logo-wrap img{max-height:48px;max-width:180px;width:auto}
.case-card .case-thumb{aspect-ratio:1440/849;margin-bottom:var(--s-5)}
.case-card .case-thumb img{height:100%;object-fit:cover;object-position:top}
/* Stat chips. index.html carries its own copy inline; this is for the stories. */
.chip-row{display:grid;grid-template-columns:1fr;gap:var(--s-4)}
@media(min-width:560px){.chip-row{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1000px){.chip-row{grid-template-columns:repeat(3,1fr)}}
/* The live headlines colour one phrase. Harbor on ivory is 5.33:1. */
/* The emphasised phrase takes the accent face, as the homepage does:
   Fraunces italic in harbor blue (5.33:1 on ivory). */
.case-hero h1 strong,.case-section h2 strong{
  font-family:var(--f-accent-head);font-style:italic;font-weight:400;
  letter-spacing:-.045em;color:var(--harbor);
}
.case-hero .case-quote{margin:var(--s-7) 0 0}
.case-quote .k{margin-bottom:var(--s-3)}
/* Second voice on a page: the script face stays reserved for the lead quote. */
.case-quote-text{font-family:var(--f-display);font-size:var(--t-22);font-weight:600;line-height:1.45;color:var(--navy);max-width:42ch}
.case-section .case-quote + h2{margin-top:var(--s-7)}
.case-callout{background:var(--navy);border-radius:var(--r-lg);padding:var(--s-6);margin-top:var(--s-6)}
@media(min-width:768px){.case-callout{padding:var(--s-7)}}
.case-callout .case-callout-stat{font-family:var(--f-display);font-size:var(--t-28);font-weight:700;line-height:1.3;color:var(--ivory);max-width:32ch;margin:0}
.case-callout .case-callout-src{margin:var(--s-4) 0 0;font-size:var(--t-14);color:rgba(247,243,236,.82)}
.case-callout .case-callout-src strong{display:block;color:var(--ivory);font-weight:600}
.case-figure{margin-top:var(--s-6)}
.case-figure img{aspect-ratio:16/9;object-fit:cover}

/* --------------------------------------------------------------- misc ----- */
.pullquote{
  font-family:var(--f-accent);font-style:normal;font-weight:400;
  font-size:var(--t-36);line-height:1.45;color:var(--navy);max-width:22ch;
}
.crisis-note{font-size:var(--t-14);color:var(--slate)}
.crisis-note a{font-weight:500}
.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:10000;
  background:var(--navy);color:var(--ivory);padding:12px 20px;border-radius:0 0 var(--r-md) 0;
}
.skip-link:focus{left:0}

/* One reveal per section, 250ms. Disabled wholesale below. */
.reveal{opacity:0;transform:translateY(14px);transition:opacity .25s ease-out,transform .25s ease-out}
.reveal.in{opacity:1;transform:none}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.01ms !important;animation-iteration-count:1 !important;
    transition-duration:.01ms !important;scroll-behavior:auto !important;
  }
  .reveal{opacity:1;transform:none}
  .btn-primary:hover,.btn-secondary:hover,.card--interactive:hover{transform:none}
}
