/* Shared styling for the linear case-study pages (MedBridge, FinFlow).
   Light Stone theme · Navy ink · Champagne accent, matches the portfolio's
   light palette. Static, image-based, mobile-first. */

:root {
  /* Light: warm off-white, charcoal ink, single warm accent */
  --stone:      #F4F1EA;   /* page base */
  --stone-2:    #ECE8DE;   /* alternating band */
  --surface:    #FFFFFF;   /* cards / image frames */
  --navy:       #1A1A1A;   /* primary ink */
  --navy-deep:  #141414;   /* header / footer */
  --muted:      #5B5853;   /* secondary text */
  --dim:        #6C6861;   /* labels (AA on cream) */
  --champ:      #9E7426;   /* accent, deepened for contrast on cream */
  --champ-deep: #856319;   /* accent hover */
  --line:       rgba(26, 26, 26, 0.12);
  --line-soft:  rgba(26, 26, 26, 0.07);
  --header-bg:  rgba(13, 13, 13, 0.86);
  --shadow-col: rgba(0, 0, 0, 0.4);
  --maxw: 1180px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
.dark {
  /* Dark: charcoal page, off-white text, single warm accent */
  --stone:      #0D0D0D;
  --stone-2:    #121212;
  --surface:    #181818;
  --navy:       #F4F1EA;
  --navy-deep:  #0A0A0A;
  --muted:      #A19E97;
  --dim:        #86837C;
  --champ:      #D4A85A;   /* accent */
  --champ-deep: #C2974A;
  --line:       rgba(244, 241, 234, 0.12);
  --line-soft:  rgba(244, 241, 234, 0.07);
  --header-bg:  rgba(13, 13, 13, 0.9);
  --shadow-col: rgba(0, 0, 0, 0.5);
}
html, body { transition: background-color .4s ease, color .4s ease; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--stone); }
body {
  margin: 0; background: var(--stone); color: var(--navy);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* Visible keyboard focus (was missing on case pages) */
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--champ);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---- header ------------------------------------------------------------ */
.cs-head {
  position: sticky; top: 0; z-index: 40;
  background: var(--header-bg); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(230, 223, 210, 0.12);
}
.cs-head__in {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.cs-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #E6DFD2; }
.cs-logo b { font-family: var(--serif); font-weight: 600; font-size: 18px; letter-spacing: .01em; }
.cs-back {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  color: #E6DFD2; font-family: var(--mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: .14em; opacity: .85; transition: opacity .2s;
}
.cs-back:hover { opacity: 1; }
.cs-head__right { display: flex; align-items: center; gap: 16px; }
.cs-theme {
  display: grid; place-items: center; height: 34px; width: 34px;
  border-radius: 999px; border: 1px solid rgba(230,223,210,0.18);
  background: transparent; color: #E6DFD2; cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}
.cs-theme:hover { border-color: rgba(230,223,210,0.4); color: #fff; }
.hidden { display: none !important; }

/* ---- layout ------------------------------------------------------------ */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { padding: 64px 0; }
section.band { background: var(--stone-2); }
.eyebrow {
  font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--champ);
  text-transform: uppercase; letter-spacing: .16em; margin: 0 0 14px;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; color: var(--navy); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.1; margin: 0 0 16px; }
h3 { font-size: 1.2rem; margin: 0 0 8px; }
p { color: var(--muted); max-width: 70ch; }
.lead { font-size: 1.18rem; color: var(--navy); }

/* ---- hero -------------------------------------------------------------- */
.hero { padding-top: 72px; padding-bottom: 40px; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.02; margin: 0 0 18px; font-weight: 500; }
.hero .sub { font-size: 1.25rem; color: var(--muted); max-width: 60ch; margin: 0 0 32px; }
.meta {
  display: flex; flex-wrap: wrap; gap: 14px 40px;
  border-top: 1px solid var(--line); padding-top: 24px; margin-top: 8px;
}
.meta div { min-width: 120px; }
.meta dt { font-family: var(--mono); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--dim); margin: 0 0 6px; }
.meta dd { margin: 0; font-weight: 600; font-size: 1rem; color: var(--navy); }
.meta dd.metric { color: var(--champ); font-family: var(--serif); font-size: 1.4rem; }

/* ---- artifact figure --------------------------------------------------- */
.fig { margin: 28px 0 0; }
.fig img {
  width: 100%; border-radius: 14px; border: 1px solid var(--line);
  box-shadow: 0 18px 40px -24px var(--shadow-col);
  background: #fff;
}
.fig figcaption {
  font-family: var(--mono); font-size: 12px; color: var(--dim);
  margin-top: 12px; letter-spacing: .02em;
}
.art-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.art-num { font-family: var(--mono); font-size: 13px; color: var(--champ); font-weight: 600; }

/* ---- results ----------------------------------------------------------- */
.results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; margin-top: 28px; }
.res {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px;
}
.res .v { font-family: var(--serif); font-size: 2rem; color: var(--champ); line-height: 1; }
.res .k { font-family: var(--mono); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); margin-top: 10px; }

/* ---- buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-weight: 600; font-size: .95rem; padding: 14px 24px; border-radius: 10px;
  transition: transform .2s, background .2s;
}
.btn-primary { background: var(--champ); color: #fff; }
.btn-primary:hover { background: var(--champ-deep); transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--line); color: var(--navy); }
.btn-ghost:hover { border-color: var(--champ); }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.proto-note { font-family: var(--mono); font-size: 12px; color: var(--dim); margin: 12px 0 0; letter-spacing: .02em; }

/* ---- two-col text ------------------------------------------------------ */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 48px; }
.cols .eyebrow { color: var(--dim); }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } section { padding: 48px 0; } }

/* ---- key-decision pull quote -------------------------------------------- */
.pullquote {
  margin: 44px 0 0;
  max-width: 880px;
  border-left: 3px solid var(--champ);
  padding: 6px 0 6px 28px;
}
.pullquote .eyebrow { margin-bottom: 10px; }
.pullquote blockquote {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  line-height: 1.45;
  color: var(--navy);
}

/* ---- next case study ----------------------------------------------------- */
.next-case { padding: 72px 0; }
.next-link {
  display: inline-flex; align-items: baseline; gap: 18px;
  font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em;
  font-size: clamp(2.2rem, 5.5vw, 3.6rem); line-height: 1.05;
  color: var(--navy); text-decoration: none;
  transition: color .25s ease;
}
.next-link span { transition: transform .3s ease; display: inline-block; }
.next-link:hover { color: var(--champ); }
.next-link:hover span { transform: translateX(8px); }
.next-sub { margin-top: 14px; }

/* ---- footer ------------------------------------------------------------ */
.cs-foot { background: var(--navy-deep); color: #E6DFD2; padding: 56px 0; margin-top: 0; }
.cs-foot a { color: var(--champ); text-decoration: none; }
.cs-foot a.btn-primary { color: #fff; }
.cs-foot .wrap { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.cs-foot .nav { display: flex; gap: 22px; font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: .12em; }
