/* CxD case-study page styles — shared across all studies. Pairs with colors_and_type.css */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg-1); font-family: var(--font-sans); transition: background .3s, color .3s; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 32px; }
img { display: block; max-width: 100%; }

/* dark mode token overrides */
:root { --dot: rgba(34,51,59,0.07); }
html.dark {
  --bg: var(--navy-900); --bg-sunken: var(--navy-800); --bg-elevated: var(--navy-800);
  --fg-1: var(--grey-0); --fg-2: var(--navy-200); --fg-3: var(--navy-300);
  --fg-brand: var(--grey-0); --fg-accent: var(--orange-400);
  --border-1: var(--navy-600); --border-2: var(--navy-500);
  --dot: rgba(255,255,255,0.05);
}

/* floating nav */
nav.cbd { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 50; width: 95%; max-width: 1180px; }
nav.cbd .bar { background: rgba(255,255,255,0.85); border: 1px solid var(--grey-200); backdrop-filter: blur(20px); box-shadow: var(--shadow-md); border-radius: var(--radius-2xl); padding: 12px 22px; display: flex; align-items: center; justify-content: space-between; transition: background .3s, border-color .3s; }
html.dark nav.cbd .bar { background: rgba(24,41,49,0.85); border-color: var(--navy-600); }
nav.cbd .brand { display: flex; align-items: center; gap: 11px; }
nav.cbd .brand img { height: 34px; width: auto; }
nav.cbd .brand b { font-weight: var(--fw-bold); font-size: 19px; letter-spacing: var(--tracking-tight); color: var(--navy-700); }
html.dark nav.cbd .brand b { color: var(--grey-0); }
nav.cbd .links { display: flex; align-items: center; gap: 34px; }
nav.cbd .links a { font-size: 14px; font-weight: var(--fw-semibold); color: var(--grey-700); text-decoration: none; transition: color .2s; }
html.dark nav.cbd .links a { color: var(--navy-200); }
nav.cbd .links a:hover { color: var(--orange-600); }
nav.cbd .actions { display: flex; align-items: center; gap: 12px; }
.toggle { width: 38px; height: 38px; border-radius: var(--radius-md); border: 1px solid var(--grey-200); background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--navy-700); }
html.dark .toggle { border-color: var(--navy-600); color: var(--grey-0); }
.toggle svg { width: 18px; height: 18px; }
.toggle .sun { display: none; } html.dark .toggle .sun { display: block; } html.dark .toggle .moon { display: none; }
.btn-ghost { border: 1px solid rgba(34,51,59,0.2); color: var(--navy-700); font-size: 14px; font-weight: var(--fw-semibold); padding: 9px 18px; border-radius: var(--radius-md); text-decoration: none; transition: all .2s; }
html.dark .btn-ghost { border-color: rgba(255,255,255,0.25); color: var(--grey-0); }
.btn-solid { background: var(--navy-700); color: #fff; font-size: 14px; font-weight: var(--fw-semibold); padding: 9px 18px; border-radius: var(--radius-md); text-decoration: none; transition: background .2s; }
html.dark .btn-solid { background: var(--grey-0); color: var(--navy-700); }
@media (max-width: 980px) { nav.cbd .links { display: none; } nav.cbd .btn-ghost { display: none; } }

/* hero */
.hero { position: relative; background: var(--navy-800); overflow: hidden; }
html.dark .hero { background: var(--navy-950); }
.hero-photo { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.62; }
.hero-grad { position: absolute; inset: 0; background: linear-gradient(95deg, rgba(14,27,34,0.92) 22%, rgba(14,27,34,0.62) 55%, rgba(14,27,34,0.28) 100%); }
.hero .wrap { position: relative; padding: 150px 32px 78px; }
.eyebrow.lite { color: var(--orange-400); }
.hero h1 { color: #fff; font-size: 62px; line-height: 1.03; letter-spacing: var(--tracking-tighter); font-weight: var(--fw-extrabold); margin: 18px 0 0; max-width: 16ch; }
.hero .lede { color: var(--navy-100); font-size: 21px; line-height: 1.45; margin-top: 20px; max-width: 46ch; font-weight: var(--fw-medium); }
.hero .client { margin-top: 30px; display: inline-flex; align-items: center; gap: 12px; background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.16); border-radius: var(--radius-pill); padding: 9px 18px; white-space: nowrap; max-width: 100%; }
.hero .client b { color: #fff; font-weight: var(--fw-semibold); font-size: 14px; white-space: nowrap; flex-shrink: 0; }
.hero .client span { color: var(--navy-200); font-size: 13px; white-space: nowrap; flex-shrink: 0; }

/* results band */
.results { background: var(--navy-700); border-top: 1px solid var(--navy-600); }
.results .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 40px 32px; }
.metric { text-align: center; }
.metric .n { font-size: 46px; font-weight: var(--fw-extrabold); color: var(--orange-400); letter-spacing: var(--tracking-tight); line-height: 1; }
.metric .l { color: var(--navy-100); font-size: 14px; line-height: 1.4; margin-top: 10px; }

/* content sections */
section.block { padding: 72px 0; }
section.block.alt { background: var(--bg-sunken); }
section.block.textured { background-color: var(--bg-sunken); background-image: radial-gradient(var(--dot) 1.5px, transparent 1.5px); background-size: 22px 22px; }
.kicker { font-size: 13px; font-weight: var(--fw-semibold); letter-spacing: var(--tracking-widest); text-transform: uppercase; color: var(--fg-accent); margin-bottom: 14px; }
h2.sec { font-size: 36px; line-height: 1.1; letter-spacing: var(--tracking-tight); font-weight: var(--fw-extrabold); color: var(--fg-brand); margin: 0 0 8px; }
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 30px; }
.twocol h3 { font-size: 19px; font-weight: var(--fw-bold); color: var(--fg-1); margin: 0 0 10px; }
.twocol p { font-size: 16px; line-height: 1.65; color: var(--fg-2); margin: 0; }
.lead-statement { font-size: 26px; line-height: 1.4; font-weight: var(--fw-semibold); color: var(--fg-1); max-width: 32ch; margin-top: 24px; }
.lead-statement b { color: var(--fg-accent); }

/* stack grid */
.stack { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 32px; }
.tool { display: flex; align-items: flex-start; gap: 16px; background: var(--bg-elevated); border: 1px solid var(--border-1); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.tool .ic { width: 52px; height: 52px; border-radius: var(--radius-md); background: #fff; border: 1px solid var(--grey-200); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tool .ic img { width: 34px; height: 34px; object-fit: contain; }
.tool h4 { font-size: 16px; font-weight: var(--fw-bold); margin: 2px 0 4px; color: var(--fg-1); }
.tool p { font-size: 13.5px; line-height: 1.45; color: var(--fg-2); margin: 0; }

/* steps */
.steps { margin-top: 34px; display: flex; flex-direction: column; }
.step { display: grid; grid-template-columns: 64px 1fr; gap: 22px; padding-bottom: 30px; position: relative; }
.step:not(:last-child)::before { content: ""; position: absolute; left: 31px; top: 56px; bottom: 0; width: 2px; background: var(--border-2); }
.step .num { width: 64px; height: 64px; border-radius: 50%; background: var(--navy-700); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: var(--fw-extrabold); font-size: 22px; z-index: 1; }
html.dark .step .num { background: var(--navy-600); }
.step.accent .num { background: var(--orange-500); color: var(--navy-900); }
.step .body { padding-top: 14px; }
.step .body p { font-size: 16.5px; line-height: 1.55; color: var(--fg-1); margin: 0; }

/* closing */
.closing { background: var(--navy-700); color: #fff; }
html.dark .closing { background: var(--navy-800); }
.closing .wrap { padding: 64px 32px; }
.closing h2 { color: #fff; font-size: 30px; font-weight: var(--fw-extrabold); letter-spacing: var(--tracking-tight); margin: 0 0 10px; }
.closing .reslist { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; margin-top: 28px; }
.closing .ri { border-top: 2px solid var(--orange-500); padding-top: 14px; }
.closing .ri .n { font-size: 30px; font-weight: var(--fw-extrabold); color: var(--orange-400); letter-spacing: var(--tracking-tight); }
.closing .ri .l { color: var(--navy-100); font-size: 14px; margin-top: 6px; line-height: 1.4; }
.closing .note { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--navy-600); color: var(--navy-200); font-size: 14px; line-height: 1.6; max-width: 72ch; }

footer { background: var(--navy-900); }
footer .wrap { padding: 28px 32px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
footer span { color: rgba(255,255,255,0.4); font-size: 12px; }

@media (max-width: 820px) {
  .hero h1 { font-size: 40px; }
  .results .wrap, .closing .reslist { grid-template-columns: 1fr; }
  .twocol, .stack { grid-template-columns: 1fr; }
}

/* embedded interactive flowchart */
.flowframe { width: 100%; height: 660px; border: 1px solid var(--border-1); border-radius: 16px; background: #fff; display: block; margin-top: 16px; box-shadow: var(--shadow-md); }
