/* ═══════════════════════════════════════════════════════════════
   PHRONESIS DESIGN SYSTEM
   One stylesheet for every page. Page-specific components live in a
   small <style> block on the page itself; everything shared is here.
   ═══════════════════════════════════════════════════════════════ */

:root{
  /* ground + ink */
  --ink:#08203F;
  --navy:#0B2559;
  --paper:#FBFCFD;
  --surface:#FFFFFF;
  --wash:#F1F6F9;
  --line:#DFE7ED;
  --line-soft:#EDF2F6;
  --muted:#5A6B7B;
  --faint:#8A9AA8;

  /* brand + signal */
  /* brand turquoise, matched to the logo. --teal is the brand colour (text on light,
     large type on dark, buttons with white labels). --teal-bright is the same hue lifted
     just enough for small text on the dark sections (4.7:1 on --ink; --teal is 3.6:1).
     --teal-wash is the pale tint behind pills. */
  --teal:#00838F;
  --teal-bright:#0098A5;
  --teal-wash:#E2F2F3;
  --green:#3DDC97;
  --green-ink:#0F7A52;
  --amber:#F5A524;
  --amber-ink:#A66B00;
  --red:#E5484D;

  /* type */
  --serif:'Newsreader',Georgia,'Times New Roman',serif;
  --sans:'Instrument Sans',-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;
  --mono:'DM Mono','SF Mono',Menlo,Consolas,monospace;

  --ease:cubic-bezier(.16,1,.3,1);
  --gut:clamp(20px,5vw,48px);
  --max:1180px;
}

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  background:var(--paper);
  color:var(--navy);
  font-family:var(--sans);
  font-size:16px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
img{max-width:100%}
a{color:inherit}
h1,h2,h3,h4{font-weight:400;text-wrap:balance}
ul{list-style:none}
:focus-visible{outline:2px solid var(--teal-bright);outline-offset:3px;border-radius:4px}

/* ═══ MOTIF: the decision node ═══
   One input, three branches, one lit. Used wherever the old design
   used a generic dash or bullet. */
.eyebrow{
  display:inline-flex;align-items:center;gap:9px;
  font-family:var(--mono);font-size:11px;font-weight:500;
  letter-spacing:.14em;text-transform:uppercase;color:var(--teal);
  margin-bottom:18px;
}
.eyebrow::before{
  content:'';width:17px;height:17px;flex:none;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300838F' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M6 12H12L17 6.5' opacity='.35'/%3E%3Cpath d='M6 12H17'/%3E%3Cpath d='M6 12H12L17 17.5' opacity='.35'/%3E%3Ccircle cx='5' cy='12' r='2.4' fill='%2300838F' stroke='none'/%3E%3Ccircle cx='18' cy='6.5' r='1.5' fill='%2300838F' stroke='none' opacity='.35'/%3E%3Ccircle cx='18' cy='12' r='1.9' fill='%2300838F' stroke='none'/%3E%3Ccircle cx='18' cy='17.5' r='1.5' fill='%2300838F' stroke='none' opacity='.35'/%3E%3C/svg%3E") center/contain no-repeat;
}
.eyebrow.center{justify-content:center}

/* ═══ TYPE SCALE ═══ */
.display{
  font-family:var(--serif);font-weight:400;
  font-size:clamp(38px,6.2vw,76px);line-height:1.02;letter-spacing:-.022em;
  font-optical-sizing:auto;color:var(--navy);
}
.h1{
  font-family:var(--serif);font-weight:400;
  font-size:clamp(34px,5.2vw,62px);line-height:1.05;letter-spacing:-.022em;
  font-optical-sizing:auto;color:var(--navy);
}
.h2{
  font-family:var(--serif);font-weight:400;
  font-size:clamp(28px,4vw,50px);line-height:1.08;letter-spacing:-.02em;
  color:var(--navy);
}
.h3{
  font-family:var(--serif);font-weight:400;
  font-size:clamp(20px,2.2vw,26px);line-height:1.16;letter-spacing:-.015em;
  color:var(--navy);
}
/* the accent span is the italic voice, not a colour swap */
.display em,.h1 em,.h2 em,.h3 em,.accent{
  font-style:italic;font-weight:400;color:var(--teal);
}
.lede{font-size:clamp(16px,1.5vw,18.5px);color:var(--muted);line-height:1.62;max-width:56ch}
.body-copy{font-size:15.5px;color:var(--muted);line-height:1.75;max-width:66ch}
.label{
  font-family:var(--mono);font-size:10px;font-weight:500;
  letter-spacing:.15em;text-transform:uppercase;color:var(--faint);
}

/* ═══ SECTION RHYTHM: deliberately uneven ═══ */
.wrap{max-width:var(--max);margin:0 auto;padding-inline:var(--gut)}
.wrap-narrow{max-width:900px;margin:0 auto;padding-inline:var(--gut)}
.s-tight{padding-block:clamp(52px,7vw,84px)}
.s-mid{padding-block:clamp(70px,9vw,114px)}
.s-tall{padding-block:clamp(86px,12vw,156px)}
.on-wash{background:var(--wash);border-block:1px solid var(--line)}
.on-surface{background:var(--surface);border-block:1px solid var(--line)}
.on-ink{background:var(--ink);color:#fff;position:relative;overflow:hidden}
.on-ink > *{position:relative;z-index:1}
.on-ink .h1,.on-ink .h2,.on-ink .h3{color:#fff}
.on-ink .h1 em,.on-ink .h2 em,.on-ink .h3 em,.on-ink .accent{color:var(--teal)}
.on-ink .lede,.on-ink .body-copy{color:rgba(255,255,255,.62)}
.on-ink .eyebrow{color:var(--teal-bright)}

/* ═══ BUTTONS ═══ */
/* On hover a second colour sweeps across left to right (--fill over the base colour) and the arrow nudges on */
.btn{
  display:inline-flex;align-items:center;gap:8px;text-decoration:none;
  font-family:var(--sans);font-size:14.5px;font-weight:500;
  padding:13px 24px;border-radius:10px;border:1px solid transparent;cursor:pointer;
  background-image:linear-gradient(var(--fill),var(--fill));background-repeat:no-repeat;
  background-position:left;background-size:0% 100%;
  transition:background-size .45s cubic-bezier(.65,0,.35,1),color .3s,border-color .3s;
}
.btn-primary{background-color:var(--navy);--fill:var(--teal);color:#fff}
.btn-teal{background-color:var(--teal);--fill:#00626B;color:#fff;font-weight:600}
.btn-ghost{background-color:transparent;--fill:var(--navy);color:var(--navy);border-color:var(--line)}
.on-ink .btn-ghost{--fill:#fff;color:#fff;border-color:rgba(255,255,255,.25)}
.btn .arr{transition:transform .25s var(--ease)}
@media(hover:hover){
  .btn:hover{background-size:100% 100%}
  .btn-ghost:hover{color:#fff;border-color:var(--navy)}
  .on-ink .btn-ghost:hover{color:var(--ink);border-color:#fff}
  .btn:hover .arr{transform:translateX(4px)}
  .btn[disabled]:hover{background-size:0% 100%}
}
.actions{display:flex;gap:11px 26px;flex-wrap:wrap;align-items:center}
/* the quieter second action: a link, not a second button */
.text-link{display:inline-flex;align-items:center;gap:6px;font-size:15px;font-weight:500;color:var(--navy);text-decoration:underline;text-decoration-color:var(--line);text-decoration-thickness:1.5px;text-underline-offset:5px;transition:color .2s,text-decoration-color .2s}
@media(hover:hover){.text-link:hover{color:var(--teal);text-decoration-color:currentColor}}
.more{margin-top:28px}

/* ═══ NAV ═══ */
nav{position:sticky;top:0;z-index:100;padding:14px var(--gut);transition:padding .35s var(--ease)}
.nav-inner{
  max-width:var(--max);margin:0 auto;display:flex;align-items:center;
  justify-content:space-between;gap:24px;
  padding:10px 10px 10px 18px;
  border:1px solid transparent;border-radius:14px;
  transition:background .35s var(--ease),border-color .35s var(--ease),box-shadow .35s var(--ease);
}
body.scrolled nav{padding-block:8px}
body.scrolled .nav-inner{
  background:var(--surface);
  border-color:var(--line);
  box-shadow:0 6px 28px rgba(8,32,63,.07);
}
/* The wordmark is ~9.3:1, so it is sized by width and allowed to shrink, never by
   height, which would squash it when the row gets tight. Everything else is pinned. */
.nav-logo{display:flex;align-items:center;text-decoration:none;flex:0 1 auto;min-width:0}
.nav-logo img{display:block;width:298px;max-width:100%;height:auto}
.nav-links{display:flex;align-items:center;gap:26px;flex:none}
.nav-links a{
  text-decoration:none;font-size:13.5px;color:var(--muted);
  position:relative;padding-block:3px;transition:color .2s;
}
.nav-links a::after{
  content:'';position:absolute;left:0;right:0;bottom:0;height:1.5px;
  background:var(--teal-bright);transform:scaleX(0);transform-origin:left;
  transition:transform .32s var(--ease);
}
.nav-links a:hover{color:var(--navy)}
.nav-links a:hover::after,.nav-links a.active::after{transform:scaleX(1)}
.nav-links a.active{color:var(--navy)}
.nav-cta{
  background:var(--navy);color:#fff!important;text-decoration:none;
  font-size:13.5px;font-weight:500;padding:9px 20px;border-radius:9px;
  transition:background .25s,transform .25s var(--ease);
}
.nav-cta::after{display:none!important}
.nav-cta:hover{background:var(--teal);transform:translateY(-1px)}

/* hamburger + mobile sheet */
.hamburger{display:none;flex:none;background:none;border:none;cursor:pointer;padding:8px;z-index:200}
.hamburger span{display:block;width:22px;height:1.5px;background:var(--navy);margin:5px 0;border-radius:2px;transition:transform .3s var(--ease),opacity .2s}
.hamburger.open span:nth-child(1){transform:rotate(45deg) translate(4.5px,4.5px)}
.hamburger.open span:nth-child(2){opacity:0}
.hamburger.open span:nth-child(3){transform:rotate(-45deg) translate(4.5px,-4.5px)}
.mobile-menu{
  display:none;position:fixed;inset:0;z-index:150;
  background:var(--surface);
  flex-direction:column;align-items:center;justify-content:center;
  opacity:0;transition:opacity .3s;
}
.mobile-menu.open{display:flex;opacity:1}
.mobile-menu a{
  font-family:var(--serif);font-size:26px;color:var(--navy);
  text-decoration:none;padding:14px 0;transition:color .2s;
}
.mobile-menu a:hover{color:var(--teal)}
.mobile-menu .mob-cta{
  margin-top:24px;background:var(--navy);color:#fff;
  font-family:var(--sans);font-size:15px;font-weight:500;
  padding:13px 30px;border-radius:10px;
}
/* links only show when the full-size wordmark (298px) still fits beside them */
@media(max-width:1000px){
  .nav-links{display:none}
  .hamburger{display:block}
}

/* ═══ PAGE HERO: sized to content, never 100vh ═══ */
.pg-hero{position:relative;overflow:hidden;padding-block:clamp(44px,6vw,76px) clamp(40px,6vw,66px)}
.pg-hero-in{position:relative;z-index:1;max-width:820px}
.pg-hero .lede{margin-top:18px}

/* ═══ REVEALS: three tiers, and visible without JS ═══ */
.js .rv{opacity:0}
.js .rv-head{transform:translateY(12px);letter-spacing:0em;
  transition:opacity .7s var(--ease),transform .7s var(--ease),letter-spacing .8s var(--ease)}
.js .rv-block{transform:translateY(32px);
  transition:opacity .75s var(--ease),transform .75s var(--ease);
  transition-delay:calc(var(--i,0) * 75ms)}
.js .rv.in{opacity:1;transform:none}
.js .h2.rv-head.in,.js .h1.rv-head.in,.js .display.rv-head.in{letter-spacing:-.02em}
.js .eyebrow.rv-head.in{letter-spacing:.14em}

/* ═══ FOOTER ═══ */
.site-footer{background:var(--paper);border-top:1px solid var(--line)}
.ft-grid{
  display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:clamp(28px,5vw,56px);
  padding-block:clamp(44px,6vw,68px) 36px;
}
.ft-brand img{display:block;width:260px;max-width:100%;height:auto;margin-bottom:14px}
.ft-tag{font-size:13px;color:var(--faint);line-height:1.65;max-width:30ch}
.ft-col h4{
  font-family:var(--mono);font-size:10px;font-weight:500;color:var(--faint);
  letter-spacing:.15em;text-transform:uppercase;margin-bottom:14px;
}
.ft-col a{
  display:block;color:var(--muted);text-decoration:none;
  font-size:13.5px;padding:5px 0;transition:color .2s,transform .2s var(--ease);
}
@media(hover:hover){.ft-col a:hover{color:var(--teal);transform:translateX(3px)}}
.ft-bot{
  border-top:1px solid var(--line);padding-block:22px 34px;
  display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;
  font-family:var(--mono);font-size:10.5px;letter-spacing:.06em;color:var(--faint);
}
@media(max-width:820px){.ft-grid{grid-template-columns:1fr 1fr}}
@media(max-width:520px){.ft-grid{grid-template-columns:1fr}.ft-bot{flex-direction:column;gap:8px}}

/* ═══ SHARED SMALL PARTS ═══ */
.ic{width:24px;height:24px;stroke-width:1.6;stroke:currentColor;fill:none;stroke-linecap:round;stroke-linejoin:round}
.pill{
  font-family:var(--mono);font-size:10px;font-weight:500;letter-spacing:.06em;
  padding:5px 11px;border-radius:100px;
  background:var(--teal-wash);color:var(--teal);border:1px solid rgba(0,131,143,.2);
}
.pills{display:flex;flex-wrap:wrap;gap:6px}
.rule{height:1px;background:var(--line);border:0}

/* a numbered/sequenced list: the number means order, so it stays mono and quiet */
.seq{border-top:1px solid var(--line)}
.seq-row{
  display:grid;grid-template-columns:64px 1fr;gap:28px;align-items:start;
  padding:26px 0;border-bottom:1px solid var(--line);
  transition:padding-left .35s var(--ease);
}
.seq-n{font-family:var(--mono);font-size:12px;color:var(--faint);letter-spacing:.1em;padding-top:5px;transition:color .3s}
@media(hover:hover){
  .seq-row:hover{padding-left:14px}
  .seq-row:hover .seq-n{color:var(--teal-bright)}
}
.seq-row p{font-size:14px;color:var(--muted);line-height:1.7;max-width:64ch;margin-top:5px}
@media(max-width:640px){.seq-row{grid-template-columns:1fr;gap:6px}}

/* a plain divided grid: borders instead of a shadowed card per item */
.grid-divided{display:grid;gap:0;border-top:1px solid var(--line)}
.grid-divided > *{
  padding:30px 26px 30px 0;border-right:1px solid var(--line);border-bottom:1px solid var(--line);
}
.grid-divided > *:not(:nth-child(3n+1)){padding-left:26px}
.grid-divided.cols-3{grid-template-columns:repeat(3,1fr)}
.grid-divided.cols-3 > *:nth-child(3n){border-right:0;padding-right:0}
@media(max-width:860px){
  .grid-divided.cols-3{grid-template-columns:1fr}
  .grid-divided > *{border-right:0!important;padding:24px 0!important}
}
.gd-mark{font-family:var(--mono);font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--teal);margin-bottom:12px}
.grid-divided h3{font-family:var(--serif);font-size:21px;letter-spacing:-.01em;margin-bottom:8px}
.grid-divided p{font-size:13.5px;color:var(--muted);line-height:1.65}

/* ═══ HERO ENTRANCE: the heading's words rise in, the italic word lands last, then the rest of the hero ═══
   A tiny script in <head> adds .hero-anim (skipped under reduced motion); phronesis-ui.js splits the
   words and adds .split. If that script never runs, the heading still appears after 1.2s. */
.hero-anim [data-hero]:not(.split){opacity:0;animation:heroShow 0s 1.2s forwards}
@keyframes heroShow{to{opacity:1}}
.hero-anim [data-hero] .hw{display:inline-block;animation:heroRise .9s var(--ease) both}
@keyframes heroRise{from{opacity:0;transform:translateY(.3em)}to{opacity:1;transform:none}}
.hero-anim [data-hero] ~ *{animation:heroFade .8s var(--ease) .6s both}
@keyframes heroFade{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}

/* ═══ MOTION HYGIENE ═══ */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.01ms!important;animation-iteration-count:1!important;
    transition-duration:.01ms!important;scroll-behavior:auto!important;
  }
  .js .rv{opacity:1!important;transform:none!important}
}
