/* CEAS public visual refinement. This file only extends the established design system. */
:root{
  --display:"Avenir Next","Geist","Satoshi","Outfit",system-ui,sans-serif;
  --body:"Avenir Next","Geist","Satoshi",system-ui,sans-serif;
  --shadow-deep:0 28px 86px rgba(0,0,0,.38);
  --ease-command:cubic-bezier(.16,1,.3,1);
}
html,body{max-width:100%;overflow-x:clip}
body{background:radial-gradient(circle at 82% -8%,rgba(216,35,57,.035),transparent 29%),var(--bg)}
::selection{background:var(--accent);color:#fff}
:where(a,button,input,select,textarea):focus-visible{outline:2px solid #f44a5e;outline-offset:4px}
:where(h1,h2,h3,h4){overflow-wrap:normal;word-break:normal;hyphens:none}
:where(p,li,dd,figcaption){overflow-wrap:break-word}
:where(.shell,.header-grid,.footer-grid,.hero-grid-layout,.manifesto-grid,.doctrine-layout,.pillars-layout,.contact-grid,.knowledge-grid,.publication-filter-inner)>*{min-width:0}

/* Header: preserve the institutional shell while giving it a machined, calm depth. */
.site-header{background:linear-gradient(180deg,rgba(8,10,12,.94),rgba(5,6,7,.88));box-shadow:0 12px 42px rgba(0,0,0,.16)}
.site-header::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:1px;pointer-events:none;background:linear-gradient(90deg,transparent 3%,rgba(216,35,57,.38) 24%,rgba(255,255,255,.08) 48%,transparent 93%);opacity:.55}
.brand{transition:opacity .55s var(--ease-command),transform .55s var(--ease-command)}
.brand:hover{opacity:.9;transform:translateY(-1px)}
.desktop-nav a{transition:color .45s var(--ease-command)}
.desktop-nav a::after{transition:right .55s var(--ease-command)}
.header-actions{min-width:0}
.menu-button,.lang-switch,.button{transition:transform .55s var(--ease-command),background-color .55s var(--ease-command),border-color .55s var(--ease-command),color .55s var(--ease-command),box-shadow .55s var(--ease-command)}
.button:hover{box-shadow:0 12px 34px rgba(0,0,0,.2)}
.button:active{transform:translateY(1px) scale(.985)}

/* Typography and editorial rhythm. */
.hero h1,.hero-primary h1,.knowledge-hero h1,.search-hero h1{max-width:1100px;text-wrap:balance}
.section-heading h2,.manifesto-title h2,.doctrine-copy h2,.pillars-head h2,.invisible-copy h2,.visual-head h2,.publications-copy h2,.proof-copy h2,.contact-copy h2{max-width:1100px}
.manifesto-copy>p,.doctrine-copy>p:not(.eyebrow):not(.doctrine-quote),.invisible-copy>p:not(.eyebrow):not(.manifesto-line),.publications-copy>p:not(.eyebrow):not(.manifesto-line),.contact-copy>p:not(.eyebrow),.knowledge-main p{max-width:72ch}
.section,.section-compact,.proof-section{position:relative}
.section::after,.section-compact::after,.proof-section::after{content:"";position:absolute;left:5vw;right:5vw;bottom:-1px;height:1px;pointer-events:none;background:linear-gradient(90deg,transparent,rgba(255,255,255,.045),transparent)}

/* Media should read like intelligence exhibits, not generic cards. */
.hero-media img,.portrait-media img,.photo-card img,.doctrine-feature-visual,.screen-shell,.operational-radar-board{box-shadow:var(--shadow-deep)}
.hero-media img,.portrait-media img,.photo-card img{transition:transform 1s var(--ease-command),filter 1s var(--ease-command)}
@media (hover:hover) and (pointer:fine){
  .hero-media:hover img,.portrait-media:hover img,.photo-card:hover img{transform:scale(1.008);filter:contrast(1.025)}
}

/* Footer remains readable before the phone breakpoint; the previous two-column state could overflow. */
.footer-grid>*{min-width:0}
.footer-grid nav{min-width:0;flex-wrap:wrap;row-gap:10px}
.footer-grid p{min-width:0;overflow-wrap:anywhere}

/* Publication header actions: brand itself already links home, so the duplicate home CTA may recede on phones. */
.library-page .header-actions{flex-wrap:wrap;justify-content:flex-end}
.library-page .header-actions .button{white-space:normal;text-align:center;line-height:1.25}

/* Browser surfaces are part of the design system. */
*{scrollbar-color:#7a1723 #07090b;scrollbar-width:thin}
*::-webkit-scrollbar{width:9px;height:9px}
*::-webkit-scrollbar-track{background:#07090b}
*::-webkit-scrollbar-thumb{background:#721722;border:2px solid #07090b}
*::-webkit-scrollbar-thumb:hover{background:#9b1c2b}

@supports (animation-timeline:view()){
  .photo-card img,.portrait-media img{animation:ceas-media-drift linear both;animation-timeline:view();animation-range:entry 10% cover 70%}
  @keyframes ceas-media-drift{from{transform:scale(.985);filter:contrast(.96)}to{transform:scale(1.01);filter:contrast(1.025)}}
}

@media(max-width:1180px){
  .desktop-nav{display:none}
  .menu-button{display:block}
  .header-grid{grid-template-columns:minmax(0,1fr) auto}
}
@media(max-width:900px){
  .footer-grid{grid-template-columns:1fr!important;align-items:start!important;gap:22px!important}
  .footer-grid nav{display:flex;max-width:100%;gap:12px 18px}
  .footer-grid p{grid-column:auto!important;width:100%}
}
@media(max-width:600px){
  :root{--header:66px}
  .shell{width:min(calc(100% - 30px),var(--max))}
  .header-grid{gap:8px}
  .header-actions{gap:6px}
  .library-page .header-actions .button.text:last-child{display:none}
  .library-page .header-actions .button{min-height:42px;padding-inline:12px;font-size:8px;letter-spacing:.09em}
  input,select,textarea{font-size:16px}
  .classification-row{max-width:100%}
}
@media(max-width:360px){
  .brand-name{font-size:20px}
  .brand-signal{width:28px;height:28px}
  .library-page .header-actions .button{max-width:142px;padding-inline:9px}
}
@media(prefers-reduced-motion:reduce){
  .brand,.button,.menu-button,.lang-switch,.hero-media img,.portrait-media img,.photo-card img{transition:none!important;animation:none!important}
}
