/* ============================================
   Case Study shared stylesheet
   Matches the design tokens used on index.html
   ============================================ */

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

:root {
  --bg: #F8F7F4;
  --surface: #FFFFFF;
  --ink: #18181B;
  --ink-muted: #71717A;
  --ink-light: #A1A1AA;
  --accent: #B5936B;
  --accent-soft: #F3EDE4;
  --border: #E4E4E7;
  --radius: 12px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ── NAV (shared with homepage) ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 6vw, 5rem);
  height: 64px;
  background: rgba(248, 247, 244, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Sora', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

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

.nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }

.nav-cta {
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  color: var(--ink) !important;
  border: 1.5px solid var(--ink) !important;
  padding: 0.45rem 1.1rem;
  border-radius: 100px;
  transition: all 0.2s ease !important;
}
.nav-cta:hover { background: var(--ink) !important; color: var(--bg) !important; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  padding: 4px;
}

.nav-links.mobile-open {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: rgba(248,247,244,0.97);
  backdrop-filter: blur(14px);
  padding: 1.5rem clamp(1.25rem, 6vw, 5rem) 2rem;
  gap: 1.1rem;
  border-bottom: 1px solid var(--border);
}
.nav-links.mobile-open a { font-size: 0.95rem; }
.nav-links.mobile-open .nav-cta { align-self: flex-start; }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--ink);
  color: var(--bg);
  font-family: 'Manrope', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.8rem 1.6rem;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
}
.btn-primary:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: transparent;
  color: var(--ink);
  font-family: 'Manrope', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.8rem 1.6rem;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.btn-secondary:hover { border-color: var(--ink); transform: translateY(-2px); }

/* ── BACK LINK ── */
.back-bar {
  padding: clamp(5.5rem, 9vw, 7.5rem) clamp(1.25rem, 6vw, 5rem) 0;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.2s, gap 0.2s;
}
.back-link:hover { color: var(--ink); gap: 0.75rem; }

/* ── CASE HERO ── */
.case-hero {
  padding: 1.75rem clamp(1.25rem, 6vw, 5rem) clamp(3rem, 6vw, 4rem);
}

.case-hero-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.tag {
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
}

.case-hero-title {
  font-family: 'Sora', sans-serif;
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.85rem;
  max-width: 900px;
}

.case-hero-subtitle {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 400;
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
  max-width: 760px;
}

.case-hero-intro {
  font-size: 0.97rem;
  color: var(--ink-muted);
  font-weight: 500;
  line-height: 1.85;
  max-width: 700px;
  margin-bottom: 2.25rem;
}

.case-meta-row {
  display: flex;
  gap: clamp(1.5rem, 4vw, 3rem);
  flex-wrap: wrap;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.case-meta-item .meta-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 0.3rem;
}
.case-meta-item .meta-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.case-cover {
  margin: 0 clamp(1.25rem, 6vw, 5rem) clamp(1rem, 4vw, 2rem);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.case-cover img { width: 100%; }

/* ── SECTIONS ── */
.cs-section {
  padding: clamp(3rem, 6vw, 4.5rem) clamp(1.25rem, 6vw, 5rem);
  border-top: 1px solid var(--border);
}
.cs-section.no-border { border-top: none; }
.cs-section.dark {
  background: var(--ink);
  color: rgba(248,247,244,0.82);
  border-top: none;
}
.cs-section.tint { background: var(--surface); }

.cs-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.cs-heading {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 1.1rem;
  max-width: 760px;
}
.cs-section.dark .cs-heading { color: #fff; }

.cs-subheading {
  font-family: 'Sora', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 2rem 0 0.75rem;
}
.cs-section.dark .cs-subheading { color: #fff; }

.cs-text {
  font-size: 0.95rem;
  color: var(--ink-muted);
  font-weight: 500;
  line-height: 1.85;
  max-width: 720px;
  margin-bottom: 1.1rem;
}
.cs-text:last-child { margin-bottom: 0; }
.cs-text strong { color: var(--ink); font-weight: 600; }
.cs-section.dark .cs-text { color: rgba(248,247,244,0.68); }
.cs-section.dark .cs-text strong { color: #fff; }

.cs-list {
  max-width: 720px;
  margin: 0 0 1.1rem 1.15rem;
}
.cs-list li {
  font-size: 0.95rem;
  color: var(--ink-muted);
  font-weight: 500;
  line-height: 1.85;
}
.cs-list strong { color: var(--ink); font-weight: 600; }
.cs-section.dark .cs-list li { color: rgba(248,247,244,0.68); }
.cs-section.dark .cs-list strong { color: #fff; }

.cs-quote {
  border-left: 3px solid var(--accent);
  background: var(--surface);
  padding: 1.1rem 1.5rem;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink);
  font-weight: 500;
  max-width: 640px;
  margin: 1.25rem 0;
}
.cs-section.dark .cs-quote {
  background: rgba(248,247,244,0.06);
  color: #fff;
}

/* ── GRIDS / CARDS ── */
.cs-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.cs-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.cs-section.dark .cs-card {
  background: rgba(248,247,244,0.05);
  border-color: rgba(248,247,244,0.14);
}

.cs-card-title {
  font-family: 'Sora', sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--ink);
}
.cs-section.dark .cs-card-title { color: #fff; }

.cs-card-text {
  font-size: 0.85rem;
  color: var(--ink-muted);
  font-weight: 500;
  line-height: 1.7;
}
.cs-section.dark .cs-card-text { color: rgba(248,247,244,0.62); }

.cs-card.accent-left { border-left: 3px solid var(--accent); border-radius: 6px; }

/* Stat grid */
.cs-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.cs-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
}
.cs-section.dark .cs-stat-card {
  background: rgba(248,247,244,0.05);
  border-color: rgba(248,247,244,0.14);
}
.cs-stat-num {
  font-family: 'Sora', sans-serif;
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.cs-stat-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.3rem;
}
.cs-section.dark .cs-stat-label { color: #fff; }
.cs-stat-desc {
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-weight: 500;
  line-height: 1.55;
}
.cs-section.dark .cs-stat-desc { color: rgba(248,247,244,0.6); }

/* Numbered process steps */
.cs-step-num {
  font-family: 'Sora', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-light);
  letter-spacing: 0.05em;
}
.cs-eyebrow-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.cs-eyebrow-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-light);
}

/* ── IMAGES ── */
.cs-image {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  margin: 1.5rem 0;
}
.cs-image img { width: 100%; }
.cs-image-caption {
  font-size: 0.8rem;
  color: var(--ink-muted);
  font-weight: 500;
  text-align: center;
  margin-top: 0.65rem;
}
.cs-section.dark .cs-image-caption { color: rgba(248,247,244,0.55); }

.cs-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.cs-image-grid figure { margin: 0; }
.cs-image-grid img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: 100%;
}
.cs-image-grid figcaption {
  font-size: 0.8rem;
  color: var(--ink-muted);
  font-weight: 500;
  margin-top: 0.6rem;
  text-align: center;
}
.cs-section.dark .cs-image-grid figcaption { color: rgba(248,247,244,0.55); }

/* ── PERSONA CARD ── */
.cs-persona {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
  margin: 1.5rem 0;
}
.cs-persona-photo {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.cs-persona-photo img { width: 100%; }
.cs-persona-body .cs-persona-name {
  font-family: 'Sora', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.cs-persona-role {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.9rem;
}

/* ── TABLE ── */
.cs-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.cs-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  background: var(--surface);
}
.cs-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-light);
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.cs-table td {
  font-size: 0.83rem;
  color: var(--ink-muted);
  font-weight: 500;
  line-height: 1.55;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.cs-table tr:last-child td { border-bottom: none; }
.cs-table td strong, .cs-table td.cell-strong { color: var(--ink); font-weight: 600; }

/* ── DIVIDER DOTTED (accent moment) ── */
.cs-divider-dotted {
  border: none;
  border-top: 2px dotted rgba(248,247,244,0.3);
  margin: 2rem 0;
}

/* ── PREV / NEXT + MORE WORK ── */
.cs-more {
  padding: clamp(3rem, 6vw, 4.5rem) clamp(1.25rem, 6vw, 5rem);
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.cs-more-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.cs-more-card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.cs-more-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.09);
}
.cs-more-thumb {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem;
}
.cs-more-thumb img { width: 100%; height: 100%; object-fit: contain; }
.cs-more-body { padding: 1.4rem 1.6rem; }
.cs-more-eyebrow {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.cs-more-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ── FOOTER ── */
footer {
  background: var(--ink);
  border-top: 1px solid rgba(248,247,244,0.07);
  padding: 1.75rem clamp(1.25rem, 6vw, 5rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-name {
  font-family: 'Sora', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(248,247,244,0.4);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.footer-links a {
  font-size: 0.75rem;
  color: rgba(248,247,244,0.35);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.footer-links a:hover { color: rgba(248,247,244,0.75); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .menu-toggle { display: block; }
  .cs-persona { grid-template-columns: 1fr; }
  .cs-persona-photo { max-width: 320px; }
  .cs-more-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 0.75rem; text-align: center; }
}

@media (max-width: 600px) {
  .case-meta-row { gap: 1.25rem; }
}
