/* ──────────────────────────────────────────────────────────────────────────
   OrcaScale — Case Studies editorial re-skin (override layer)
   Loaded AFTER the page's own <style> + system.css + editorial.css.
   Re-maps the legacy neon palette to the restrained editorial one and tidies
   a few components. Content and the card engine are untouched.
   ────────────────────────────────────────────────────────────────────────── */

/* 1 — remap the legacy tokens to editorial (kills the neon, keeps one accent) */
:root{
  --navy:#070d18; --cyan:#1fb6a6; --cyan-glow:rgba(31,182,166,.16);
  --pink:#1fb6a6; --orange:#1fb6a6; --green:#1fb6a6;
  --line:rgba(255,255,255,.09); --line-soft:rgba(255,255,255,.05); --line-2:rgba(255,255,255,.05);
  --text:#eef1f5; --text-dim:#8a95a4; --text-faint:#5b6675;
  --bg-card:#0a1120; --ink:#eef1f5; --ink-2:#8a95a4;
}

/* 2 — clean the chrome: drop the grid texture + terminal header */
body.solid-bg{ background:#070d18; }
.bg-grid{ display:none !important; }
#top-bar, #module-dock, .footer-mini{ display:none !important; }
.console{ background:transparent !important; border:none !important; box-shadow:none !important; padding:clamp(120px,16vh,160px) clamp(20px,4vw,52px) 60px !important; max-width:1180px; margin:0 auto; }
.console-head{ display:none !important; }

/* 3 — editorial typography */
.page-header{ margin-bottom:18px; }
.page-header .eyebrow{ color:var(--cyan); font-size:.74rem; letter-spacing:.2em; text-transform:uppercase; font-weight:600; }
.page-header h1{ font-family:'Newsreader',Georgia,serif !important; font-weight:500 !important; font-size:clamp(2.2rem,5vw,4rem) !important; line-height:1.06; letter-spacing:-.015em; }
.page-header h1 .accent{ color:var(--cyan); -webkit-text-fill-color:var(--cyan); background:none; }
.page-header .lede{ color:var(--text-dim); font-size:clamp(1.02rem,1.4vw,1.18rem); line-height:1.65; max-width:36rem; }

/* 4 — the grid + cards */
/* Grid view only — leave focus-mode's rail+pane layout (below) untouched. */
body:not(.cs-focus) .case-grid{ display:grid !important; grid-template-columns:repeat(auto-fill,minmax(330px,1fr)) !important; gap:18px !important; }

/* Focus mode — clean thumbnail rail + prominent selected pane + clear "view live" cue */
body.cs-focus .case-grid{ grid-template-columns:300px minmax(0,1fr) !important; gap:22px !important; }
body.cs-focus .case--focused{ box-shadow:none !important; border-color:rgba(31,182,166,.55) !important; }
body.cs-focus .case:not(.case--focused){ border-radius:6px !important; }
body.cs-focus .case:not(.case--focused):hover{ border-color:rgba(31,182,166,.5) !important; transform:translateX(3px); }
body.cs-focus .case:not(.case--focused) .case-headline{ font-family:'Newsreader',Georgia,serif !important; font-weight:500 !important; }
body.cs-focus .case--focused .case-thumb::before{
  content:'\25B6  Click to explore the live system'; position:absolute; left:50%; bottom:16px; transform:translateX(-50%); z-index:4;
  display:inline-flex; align-items:center; font-family:'DM Sans',sans-serif; font-size:.82rem; font-weight:600;
  color:#04261f; background:#fff; padding:10px 18px; border-radius:100px; box-shadow:0 8px 26px rgba(0,0,0,.45);
  animation:csPulse 2.4s ease-in-out infinite; pointer-events:none; white-space:nowrap; }
@keyframes csPulse{ 0%,100%{ transform:translateX(-50%) translateY(0);} 50%{ transform:translateX(-50%) translateY(-5px);} }
body.cs-focus .case--focused .case-thumb .thumb-domain{ display:none; }
.case{ background:var(--bg-card) !important; border:1px solid var(--line) !important; border-radius:6px !important; box-shadow:none !important; overflow:hidden; transition:border-color .2s,transform .2s; }
.case:hover{ border-color:rgba(31,182,166,.45) !important; transform:translateY(-3px); }
.case-thumb{ border:none !important; border-bottom:1px solid var(--line) !important; border-radius:0 !important; }
.case-tag{ color:var(--text-faint) !important; letter-spacing:.14em; text-transform:uppercase; font-size:.68rem; }
.case-headline{ font-family:'Newsreader',Georgia,serif !important; font-weight:500 !important; letter-spacing:-.01em; color:var(--text) !important; }
.case-live{ color:var(--text-dim) !important; }
.case-live .dot{ background:var(--cyan) !important; box-shadow:none !important; }
.case-toggle{ color:var(--cyan) !important; }
.case-detail-inner .label{ color:var(--text-faint) !important; letter-spacing:.14em; }
.case-hero-title{ font-family:'Newsreader',Georgia,serif !important; font-weight:500 !important; }
.metric .v{ font-family:'Newsreader',Georgia,serif !important; color:var(--cyan) !important; }
.case-tag-chip{ border-color:var(--line) !important; color:var(--text-dim) !important; background:rgba(255,255,255,.025) !important; }
.det-block{ border-color:var(--line) !important; }

/* 5 — flat editorial buttons (no glow) */
.btn{ border-radius:4px !important; box-shadow:none !important; text-shadow:none !important; font-weight:600 !important; }
.btn-primary{ background:#fff !important; color:#0a0f18 !important; border:1px solid #fff !important; }
.btn-primary:hover{ background:#d8f3ec !important; }
.btn-secondary{ background:transparent !important; color:var(--text) !important; border:1px solid rgba(255,255,255,.22) !important; }
.btn-secondary:hover{ border-color:#fff !important; }
.btn-accent{ background:transparent !important; color:var(--cyan) !important; border:1px solid rgba(31,182,166,.4) !important; }

/* 6 — CTA strip + back button + preview modal */
.cta-strip{ background:rgba(31,182,166,.04) !important; border:1px solid var(--line) !important; border-radius:6px !important; box-shadow:none !important; }
.case-back{ color:var(--text-dim) !important; border-color:var(--line) !important; }
.preview-modal{ border:1px solid var(--line) !important; box-shadow:none !important; }
.preview-chrome{ background:var(--bg-card) !important; border-color:var(--line) !important; }

/* keep the editorial nav clear of the content */
.console{ padding-top:clamp(120px,16vh,160px) !important; }
