/* ═══════════════════════════════════════════════════════════════
   CASE-STUDY.CSS
   Layout: Caleb Wu-style — sticky left sidebar + main content area.
   The sidebar lists all sections; the content scrolls past each one.

   Shared tokens mirror styles.css exactly.
   Color: #FAFAF9 background, #001F54 text.
   Fonts: Cormorant Garamond (nav wordmark), DM Serif Display (headings),
          Inter (body, labels, sidebar).
═══════════════════════════════════════════════════════════════ */


/* ─── DESIGN TOKENS ──────────────────────────────────────────── */

:root {
  --bg:           #FAFAF9;
  --text:         #001F54;
  --muted:        #4A5E7B;
  --subtle:       #9E9690;
  --teal:         #1A7A82;
  --teal-light:   rgba(26, 122, 130, 0.10);
  --border:       #E4DFD8;
  --placeholder:  #E8E4DC;

  --logo-serif: 'Cormorant Garamond', Georgia, serif;
  --serif:      'DM Serif Display', Georgia, serif;
  --sans:       'Inter', system-ui, -apple-system, sans-serif;
}


/* ─── RESET ──────────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a { color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}


/* ─── NAVIGATION (shared with homepage) ─────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 249, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--logo-serif);
  font-size: 1.5rem;          /* matches homepage exactly */
  font-weight: 500;
  font-style: normal;         /* upright, not italic — matches homepage */
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.nav-logo:hover { color: var(--muted); }

.logo-dot { color: var(--teal); }

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-list a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-list a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  padding: 4px;
  line-height: 0;
}


/* ─── PAGE HEADER (above layout grid) ───────────────────────── */
/*
   Title + metadata live here, outside the sidebar/content grid,
   so the full-width banner can follow without any constraint.

   Left padding = sidebar width (200px) + cs-main left padding (4.5rem)
   so the title aligns visually with the cs-main content column below.
*/

.cs-page-header {
  background: var(--bg);
}

.cs-page-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.5rem 4.5rem 2.5rem calc(200px + 4.5rem);
}

.cs-page-header .cs-breadcrumb {
  margin-bottom: 2rem;
}

.cs-page-header .cs-title {
  margin-bottom: 1.25rem;
}

.cs-page-header .cs-cover-meta {
  margin-bottom: 0;
}


/* ─── FULL-WIDTH BANNER (between header and layout grid) ─────── */
/*
   Sits outside every max-width container — naturally 100% of the
   viewport width. No negative margin tricks required.
*/

.cs-page-banner {
  line-height: 0;           /* removes the ghost gap beneath inline images */
  overflow: hidden;
}

.cs-page-banner img {
  display: block;
  width: 100%;
  height: auto;             /* natural landscape aspect ratio — no distortion */
  object-fit: cover;
}


/* ─── CASE STUDY LAYOUT ──────────────────────────────────────── */
/*
   Two-column grid: narrow sticky sidebar | scrollable content.
   The sidebar stays fixed on screen as you scroll through sections.
*/

.cs-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: calc(100vh - 68px);
  max-width: 1200px;
  margin: 0 auto;
}


/* ─── SIDEBAR ────────────────────────────────────────────────── */

.cs-sidebar {
  position: sticky;
  top: 68px;                      /* height of the nav bar */
  height: calc(100vh - 68px);
  overflow-y: auto;
  padding: 3rem 1.5rem 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;

  /* Hidden on page load — fades in when the Problem section enters view,
     fades back out if the user scrolls back above it. */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

/* JS adds this class once the stats bar has scrolled out of view */
.cs-sidebar--visible {
  opacity: 1;
  pointer-events: auto;
}

/* "← Back" link */
.cs-back {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.cs-back:hover { color: var(--teal); }

/* Sidebar section nav */
.cs-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cs-nav-link {
  display: block;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 400;
  color: rgba(0, 31, 84, 0.28);  /* faint — inactive sections recede */
  text-decoration: none;
  padding: 0.35rem 0;
  transition: color 0.2s;
  line-height: 1.4;
}

.cs-nav-link:hover {
  color: rgba(0, 31, 84, 0.55);
}

.cs-nav-link.active {
  color: var(--text);             /* full dark — active section pops */
  font-weight: 600;
}


/* ─── MAIN CONTENT ───────────────────────────────────────────── */

.cs-main {
  padding: 3rem 4.5rem 8rem;  /* top reduced: no breadcrumb here anymore */
  /* no max-width — fills the full 1fr content column to align with metrics cards above */
}

/* Back link — "← Back to Work" at the top of every project page.
   Hover color is set per-page via the --page-accent CSS variable,
   defined in a <style> block in each page's <head>. */
.cs-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--sans);
  font-size: 0.875rem;           /* 14px */
  font-weight: 500;
  color: #999999;
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color 0.2s ease;
}

.cs-back-link:hover {
  color: var(--page-accent, var(--teal));
}

.cs-back-link svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.cs-back-link:hover svg {
  transform: translateX(-3px);
}


/* ─── COVER / OVERVIEW SECTION ───────────────────────────────── */

.cs-cover {
  margin-bottom: 4rem;
}

/* Small coral accent label above the title — "PRODUCT CASE STUDY" */
.cs-cover-label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #F07167;
  margin-bottom: 0.65rem;
}

/* Main project title — single display line, bold serif.
   "Redesigning Crime Reporting with NYPD" is ~39 chars; font-size is
   tuned so it fills the ~856px content column without wrapping. */
.cs-title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.1vw, 2.35rem);
  font-weight: 400;               /* DM Serif Display — display weight looks bold */
  font-style: normal;
  color: var(--text);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: 1.25rem;         /* metadata row follows directly below */
}

/* Meta row: partner | dates | category */
.cs-cover-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 2rem;               /* more horizontal breathing room */
  font-family: var(--sans);
  font-size: 0.9rem;              /* slightly larger for legibility */
  color: var(--muted);
}

.cs-cover-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cs-cover-meta span::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--teal);
  border-radius: 50%;
  flex-shrink: 0;
}

.cs-cover-meta span:first-child::before {
  display: none;
}

/* Category badge — solid blue pill with white text. Bold and readable. */
.cs-meta-badge {
  display: inline-flex;
  align-items: center;
  background: #0A3D6B;
  color: #ffffff;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  line-height: 1;
}

/* Remove the dot separator before the badge — the background sets it apart */
.cs-meta-badge::before {
  display: none !important;
}


/* ─── STATS BAR ──────────────────────────────────────────────── */

.cs-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 2rem 2.5rem;           /* inner padding for the panel feel */
  background: var(--teal-light);  /* subtle teal tint — highlights without being loud */
  border-top: 2px solid var(--teal);
  border-bottom: 2px solid var(--teal);
  border-radius: 2px;
  margin: 2.5rem 0 4rem;
}

.cs-stat-num {
  font-family: var(--serif);
  font-size: 2.75rem;             /* larger and more commanding */
  font-weight: 700;
  color: var(--teal);             /* accent color makes numbers pop */
  line-height: 1;
  margin-bottom: 0.4rem;
}

.cs-stat-label {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
}


/* ─── METRIC CARDS ───────────────────────────────────────────── */
/*
   Four colored stat cards in the page header — one number each,
   one accent color per card. Replace the old teal stats bar.
*/

.cs-metric-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 2rem;
}

/* Base card */
.cs-metric-card {
  border-radius: 12px;
  padding: 1.5rem 1rem;
  text-align: center;
}

/* Large serif number */
.cs-metric-num {
  font-family: var(--serif);
  font-size: 2rem;               /* 32px */
  font-weight: 400;
  line-height: 1;
  margin-bottom: 0.5rem;
}

/* Small label below the number */
.cs-metric-label {
  font-family: var(--sans);
  font-size: 0.6875rem;          /* 11px */
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.35;
}

/* Card 1 — soft purple */
.cs-metric-card--purple                     { background: rgba(106, 90, 205, 0.10); }
.cs-metric-card--purple .cs-metric-num      { color: #6A5ACD; }
.cs-metric-card--purple .cs-metric-label    { color: #4B3FA0; }

/* Card 2 — warm amber */
.cs-metric-card--amber                      { background: rgba(230, 126, 34, 0.10); }
.cs-metric-card--amber .cs-metric-num       { color: #D4710E; }
.cs-metric-card--amber .cs-metric-label     { color: #A8560A; }

/* Card 3 — emerald green */
.cs-metric-card--emerald                    { background: rgba(29, 158, 117, 0.10); }
.cs-metric-card--emerald .cs-metric-num     { color: #0F6E56; }
.cs-metric-card--emerald .cs-metric-label   { color: #0A5040; }

/* Card 4 — berry / rose */
.cs-metric-card--berry                      { background: rgba(200, 50, 80, 0.10); }
.cs-metric-card--berry .cs-metric-num       { color: #B03050; }
.cs-metric-card--berry .cs-metric-label     { color: #8A2040; }


/* ─── CONTENT SECTIONS ───────────────────────────────────────── */

.cs-section {
  margin-bottom: 3.5rem;
  scroll-margin-top: 88px;     /* offset for sticky nav */
}

/* Small uppercase label above each section — "PROBLEM", "MY ROLE", etc. */
.cs-label {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.85rem;
}

/* Bold sans-serif section heading — large and punchy (Caleb Wu style) */
.cs-heading {
  font-family: var(--sans);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

/* Body paragraphs */
.cs-body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.82;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.cs-body:last-child { margin-bottom: 0; }

/* Pull quote / HMW statement */
.cs-quote {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;
  font-weight: 400;
  color: var(--text);
  border-left: 3px solid var(--teal);
  padding: 0.75rem 0 0.75rem 1.5rem;
  margin: 2rem 0;
  line-height: 1.55;
  max-width: 580px;
}

/* Two-column layout within a section — for key insights, comparisons */
.cs-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin: 2rem 0;
}

.cs-two-col-item {}

.cs-two-col-label {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.cs-two-col-heading {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

/* ─── MY ROLE — TWO-COLUMN GRID ─────────────────────────────── */
/*
   60% skills (left) / 40% team (right), both top-aligned.
   Collapses to single column on mobile.
*/

.cs-role-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 2.5rem;
  align-items: stretch;
  margin-top: 1.5rem;
}

.cs-role-skills,
.cs-role-team {
  display: flex;
  flex-direction: column;
}

/* Team column: center content vertically */
.cs-role-team {
  justify-content: center;
  padding-bottom: 1.5rem;
}


/* ─── SKILL GROUPS (grouped by category) ────────────────────── */

.cs-skill-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.cs-skill-group:last-child {
  margin-bottom: 0;
}

/* Colored category label — "STRATEGY", "RESEARCH & DESIGN", etc. */
.cs-skill-category {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1;
}

/* Dot-separated skill names within each category */
.cs-skill-items {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.6;
}


/* ─── SKILL PILLS ────────────────────────────────────────────── */

.cs-skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0;
}

.cs-pill {
  display: inline-block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 20px;
  line-height: 1;
  white-space: nowrap;
}


/* ─── TEAM LIST ──────────────────────────────────────────────── */

.cs-team-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.cs-team-list li::before {
  content: '·';
  margin-right: 0.6rem;
  color: var(--muted);
}

.cs-team-bold {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.cs-team-muted {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
}


.cs-two-col-body {
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.72;
  color: var(--muted);
}


/* ─── FULL-BLEED BANNER IMAGE ────────────────────────────────── */
/*
   Breaks out of the cs-main side padding so the image runs edge-to-edge
   across the full content column. Negative margins mirror the padding
   values defined on .cs-main (4.5rem on desktop, 2rem tablet, 1.25rem mobile).
*/

.cs-img-fullbleed {
  margin: 2.5rem -4.5rem 4rem;
  overflow: hidden;
}

.cs-banner-img {
  display: block;
  width: 100%;
  height: auto;             /* natural landscape aspect ratio — no cropping */
  object-fit: cover;
  max-width: 100%;
}


/* ─── IMAGE TILES ─────────────────────────────────────────────── */
/*
   Gray melange tile that wraps every image on the case study pages.
   Image floats centered inside with padding visible on all sides.
*/

.img-tile {
  background: #F7F6F3;
  border-radius: 12px;
  padding: 3rem;
  margin: 2rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.img-tile img {
  max-width: 88%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Caption sits outside and below the tile */
.img-tile-caption {
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
  margin-top: 0.6rem;
  line-height: 1.5;
  text-align: center;
}

/* Two side-by-side tiles (e.g. comparison images) */
.img-tile-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 2rem 0;
}

.img-tile-pair .img-tile {
  margin: 0;
}


/* ─── IMAGE PLACEHOLDERS ─────────────────────────────────────── */
/*
   Prominent, labeled gray boxes — clearly marked for what image goes here.
   Heights:
     .cs-img--tall   : 420px — hero/cover images
     .cs-img--medium : 320px — key visuals, diagrams
     .cs-img--short  : 220px — supplementary visuals, small charts
     (default)       : 320px
*/

.cs-img {
  width: 100%;
  height: 320px;
  background: var(--placeholder);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem 0;
  flex-direction: column;
  gap: 0.5rem;
}

.cs-img--tall  { height: 420px; }
.cs-img--short { height: 220px; }

.cs-img-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0, 31, 84, 0.35);
  text-align: center;
  padding: 0 2.5rem;
  line-height: 1.6;
}

/* Two-column image pair */
.cs-img-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 2rem 0;
}

.cs-img-pair .cs-img {
  margin: 0;
}


/* ─── COMPARISON TABLE (Ideation / VCA) ──────────────────────── */

.cs-table-wrap {
  overflow-x: auto;
  margin: 2rem 0;
}

.cs-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.875rem;
}

.cs-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--text);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.cs-table td {
  padding: 0.85rem 1rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.55;
}

.cs-table tr:last-child td { border-bottom: none; }

.cs-table .highlight {
  color: var(--teal);
  font-weight: 600;
}


/* ─── METRICS / STAT CALLOUT ─────────────────────────────────── */

.cs-callout {
  background: var(--teal-light);
  border-left: 3px solid var(--teal);
  padding: 1.25rem 1.5rem;
  border-radius: 0 3px 3px 0;
  margin: 2rem 0;
}

.cs-callout-num {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--teal);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.cs-callout-label {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--muted);
}


/* ─── PROBLEM SECTION — SERIF HEADING VARIANT ───────────────── */
/*
   Used on the Problem heading only.
   DM Serif Display is inherently a heavyweight display face —
   no italic, just let the letterforms do the work.
*/

.cs-heading--serif {
  font-family: var(--serif);
  font-style: normal;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 400;             /* DM Serif Display has no true bold; 400 is its full weight */
  letter-spacing: -0.01em;
}


/* ─── PROBLEM SECTION — HMW PANEL ───────────────────────────── */
/*
   Full-width dark burgundy panel that frames the How Might We question
   as a designed statement piece, not just a text quote.
*/

.cs-hmw-panel {
  position: relative;
  background: #4A1525;
  border-radius: 12px;
  padding: 1.5rem 3rem;         /* slim banner height */
  margin: 2.5rem 0 3rem;
  overflow: hidden;             /* clips the ghost ? so it doesn't bleed outside */
}

/* Standalone variant — sits between Overview and Problem sections.
   Top margin is handled by the overview's own margin-bottom. */
.cs-hmw-panel--standalone {
  margin-top: 0;
  margin-bottom: 4rem;          /* generous gap before the Problem section label */
}

/* Ghost question mark — large, barely visible, top-right corner */
.cs-hmw-ghost {
  position: absolute;
  top: -0.5rem;
  right: 1.75rem;
  font-family: var(--serif);
  font-size: 8rem;              /* smaller to match slimmer panel height */
  font-weight: 400;
  color: rgba(255, 255, 255, 0.03);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

/* "HOW MIGHT WE" label — legible but subordinate */
.cs-hmw-label {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.75rem;
}

/* The question itself — white, display serif, full width */
.cs-hmw-question {
  font-family: var(--serif);
  font-size: 22px;
  font-style: normal;
  font-weight: 400;
  color: #ffffff;
  line-height: 1.45;
  max-width: none;
  margin: 0;
}


/* ─── PROBLEM SECTION — STICKY NOTES ─────────────────────────── */
/*
   Three cards arranged like sticky notes pinned to a board:
   slightly rotated, shallow drop shadow, tape tab at the top.
   Each note uses its own pastel background + dark-tinted text.
*/

/* Grid wrapper — allows the tape tabs to poke up above the row */
.cs-sticky-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-top: 18px;            /* room for the tape that overhangs the top edge */
  margin: 0 0 1rem;
}

/* Base sticky note styles */
.cs-sticky {
  position: relative;
  border-radius: 4px;
  padding: 2rem 1.5rem 1.75rem;
  box-shadow:
    0 4px 18px rgba(0, 31, 84, 0.10),
    0 1px 4px  rgba(0, 31, 84, 0.06);
}

/* Individual tilt angles — each note rotates a different way */
.cs-sticky--yellow { background: #FFF9C4; transform: rotate(-1.5deg); }
.cs-sticky--pink   { background: #FCE4EC; transform: rotate(1.2deg);  }
.cs-sticky--blue   { background: #E3F2FD; transform: rotate(-0.6deg); }

/* Tape tab — centered above each note */
.cs-sticky-tape {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 18px;
  border-radius: 2px;
}

.cs-sticky--yellow .cs-sticky-tape { background: rgba(255, 235,  59, 0.55); }
.cs-sticky--pink   .cs-sticky-tape { background: rgba(240,  98, 146, 0.28); }
.cs-sticky--blue   .cs-sticky-tape { background: rgba( 33, 150, 243, 0.22); }

/* Large serif number — the visual anchor for each note */
.cs-sticky-num {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 400;
  line-height: 1;
  margin-bottom: 0.45rem;
}

.cs-sticky--yellow .cs-sticky-num { color: #9A7800; }
.cs-sticky--pink   .cs-sticky-num { color: #AD1457; }
.cs-sticky--blue   .cs-sticky-num { color: #1565C0; }

/* Note title — small, bold */
.cs-sticky-title {
  font-family: var(--sans);
  font-size: 0.925rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.6rem;
}

.cs-sticky--yellow .cs-sticky-title { color: #5D4600; }
.cs-sticky--pink   .cs-sticky-title { color: #880E4F; }
.cs-sticky--blue   .cs-sticky-title { color: #0D47A1; }

/* Note body copy — same dark tint, lighter weight */
.cs-sticky-text {
  font-family: var(--sans);
  font-size: 0.865rem;
  line-height: 1.65;
  margin: 0;
}

.cs-sticky--yellow .cs-sticky-text { color: #6B5200; }
.cs-sticky--pink   .cs-sticky-text { color: #880E4F; }
.cs-sticky--blue   .cs-sticky-text { color: #0D47A1; }


/* ─── NEXT PROJECT LINK ──────────────────────────────────────── */

.cs-next {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}

.cs-next-label {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.75rem;
}

.cs-next-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  transition: gap 0.25s ease, color 0.2s;
}

.cs-next-link:hover {
  color: var(--teal);
  gap: 1rem;
}


/* ─── FOOTER (matches homepage) ──────────────────────────────── */

.footer {
  background: #001233;
  border-top: 2px solid var(--teal);
  position: relative;
  z-index: 20;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2.5rem 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.footer-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: rgba(250, 250, 249, 0.55);
  border: 1px solid rgba(250, 250, 249, 0.16);
  border-radius: 50%;
  font-size: 0.82rem;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}

.footer-social-icon:hover {
  color: var(--bg);
  border-color: rgba(250, 250, 249, 0.6);
}

.footer-copy {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: rgba(250, 250, 249, 0.45);
}

.footer-url {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: rgba(250, 250, 249, 0.25);
}


/* ─── RESPONSIVE — tablet (≤ 900px) ─────────────────────────── */

@media (max-width: 900px) {

  .cs-layout {
    grid-template-columns: 1fr;
  }

  /* Sidebar becomes a horizontal scrollable nav strip.
     Always visible on mobile — the scroll-reveal only applies to the desktop column. */
  .cs-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 2rem;
    flex-direction: row;
    gap: 0;
    overflow-x: auto;
    opacity: 1 !important;
    pointer-events: auto !important;
    transition: none !important;
  }

  .cs-back {
    flex-shrink: 0;
    margin-right: 2rem;
    padding-right: 2rem;
    border-right: 1px solid var(--border);
  }

  .cs-nav ul {
    flex-direction: row;
    gap: 0;
  }

  .cs-nav-link {
    padding: 0.35rem 0.75rem;
    white-space: nowrap;
    color: rgba(0, 31, 84, 0.38);   /* slightly more visible in horizontal strip */
  }

  .cs-nav-link.active {
    color: var(--text);
    font-weight: 600;
  }

  /* Page header: sidebar is gone, so drop the sidebar-offset left padding */
  .cs-page-header-inner {
    padding: 2.5rem 2rem 2rem;
  }

  /* Metric cards — drop to 2×2 grid on tablet */
  .cs-metric-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .cs-main {
    padding: 3rem 2rem 6rem;
  }

  .cs-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .cs-two-col {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .img-tile-pair,
  .cs-img-pair {
    grid-template-columns: 1fr;
  }

  /* Sticky notes — stack vertically on tablet */
  .cs-sticky-row {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Kill rotation when stacked so notes read cleanly */
  .cs-sticky { transform: none !important; }

  /* HMW panel — keep slim proportions */
  .cs-hmw-panel {
    padding: 1.75rem 2rem;
  }

  .footer-inner {
    padding: 2.75rem 2rem 3rem;
  }
}


/* ─── RESPONSIVE — mobile (≤ 640px) ─────────────────────────── */

@media (max-width: 640px) {

  .nav-toggle { display: flex; }

  .nav-list {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    gap: 1.25rem;
    box-shadow: 0 8px 28px rgba(0,31,84,0.08);
  }

  .nav-list.is-open { display: flex; }

  /* Role grid — stack to single column on mobile */
  .cs-role-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Page header — tighten on mobile */
  .cs-page-header-inner {
    padding: 2rem 1.25rem 1.75rem;
  }

  /* Metric cards — stay 2×2 on mobile */
  .cs-metric-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }

  .cs-metric-card {
    padding: 1.25rem 0.75rem;
  }

  .cs-main {
    padding: 2.5rem 1.25rem 5rem;
  }

  /* HMW panel — tighten on mobile */
  .cs-hmw-panel {
    padding: 1.5rem 1.5rem;
  }

  .cs-hmw-question {
    font-size: 22px;
  }

  .footer-inner {
    padding: 2.25rem 1.25rem 2.75rem;
  }
}
