/* Codefab — shared case-study stylesheet. Matches the homepage brand system. */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #faf7f0; --bg-2: #f3ecdc; --bg-3: #ffffff;
  --line: #e5dcc4; --line-2: #d4c8a9;
  --text: #1a1612; --text-2: #5f574a; --text-3: #968b78;
  --accent: #d04500; --accent-2: #b03800;
  --accent-soft: rgba(208,69,0,0.07); --accent-line: rgba(208,69,0,0.18);
  --shadow-sm: 0 1px 3px rgba(26,22,18,.04), 0 1px 2px rgba(26,22,18,.03);
  --shadow-md: 0 4px 12px rgba(26,22,18,.06), 0 2px 6px rgba(26,22,18,.04);
  --shadow-lg: 0 20px 40px rgba(26,22,18,.10), 0 8px 16px rgba(26,22,18,.06);
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: 'Inter', system-ui, sans-serif; line-height: 1.6;
  overflow-x: hidden; font-feature-settings: "ss01", "cv11";
}
::selection { background: var(--accent); color: #fff; }
a { color: inherit; }
img { display: block; max-width: 100%; }

/* NAV */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,247,240,0.88);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid var(--line);
  padding: 18px 40px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo {
  font-family: 'Fraunces', serif; font-weight: 700; font-size: 22px;
  letter-spacing: -0.5px; text-decoration: none; color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
.logo .mark { width: 28px; height: 28px; background: var(--accent); border-radius: 50%; position: relative; }
.logo .mark::after { content: ''; position: absolute; inset: 9px; background: var(--bg); border-radius: 50%; }
.logo em { font-style: italic; font-weight: 500; color: var(--accent); }
nav ul { display: flex; gap: 32px; list-style: none; align-items: center; }
nav ul a { color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .2s; }
nav ul a:hover { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 14px;
  text-decoration: none; border-radius: 100px; padding: 11px 22px;
  transition: all .2s ease; border: none; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary.large { padding: 16px 32px; font-size: 16px; }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.btn-secondary:hover { border-color: var(--text); background: var(--bg-3); }
.btn-link { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; transition: gap .2s; }
.btn-link:hover { gap: 12px; }

.wrap { max-width: 920px; margin: 0 auto; padding: 0 40px; }
.wrap-wide { max-width: 1200px; margin: 0 auto; padding: 0 40px; }

/* BREADCRUMB */
.crumb { padding: 32px 0 0; font-size: 14px; color: var(--text-3); }
.crumb a { color: var(--text-3); text-decoration: none; transition: color .2s; }
.crumb a:hover { color: var(--accent); }

/* HERO */
.case-hero { padding: 40px 0 56px; }
.eyebrow { color: var(--accent); font-size: 14px; font-weight: 600; margin-bottom: 18px; display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ''; width: 24px; height: 1px; background: var(--accent); }
.case-hero h1 {
  font-family: 'Fraunces', serif; font-weight: 500;
  font-size: clamp(40px, 5.5vw, 72px); line-height: 1.04; letter-spacing: -2px;
  margin-bottom: 24px; font-feature-settings: "ss01";
}
.case-hero h1 em { font-style: italic; font-weight: 400; color: var(--accent); }
.case-lead { font-size: 20px; color: var(--text-2); max-width: 680px; line-height: 1.55; }

/* META BAR */
.meta-bar {
  display: flex; flex-wrap: wrap; gap: 36px;
  margin-top: 40px; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.meta-bar .item .k { font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--text-3); margin-bottom: 6px; }
.meta-bar .item .val { font-size: 15px; font-weight: 600; color: var(--text); }
.meta-bar .item .val a { color: var(--accent); text-decoration: none; }
.meta-bar .item .val a:hover { text-decoration: underline; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #4cb05c; }
.status-pill.progress .dot { background: var(--accent); }

/* HERO IMAGE */
.hero-shot { margin: 48px 0 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-lg); background: var(--bg-2); }
.hero-shot img { width: 100%; display: block; }
.shot-fallback {
  aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-size: 28px; color: rgba(255,255,255,.9); text-align: center; padding: 40px;
}

/* SECTION */
section.block { padding: 64px 0; }
section.block.tint { background: var(--bg-2); }
.block h2 {
  font-family: 'Fraunces', serif; font-weight: 500;
  font-size: clamp(30px, 4vw, 46px); line-height: 1.08; letter-spacing: -1px; margin-bottom: 22px; max-width: 760px;
}
.block h2 em { font-style: italic; color: var(--accent); font-weight: 400; }
.block p.body { font-size: 18px; color: var(--text-2); line-height: 1.7; margin-bottom: 18px; max-width: 760px; }
.block p.body strong { color: var(--text); font-weight: 600; }

/* FEATURE GRID */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 36px; }
.feature { background: var(--bg-3); border: 1px solid var(--line); border-radius: 14px; padding: 28px; }
.feature h3 { font-family: 'Fraunces', serif; font-weight: 500; font-size: 21px; letter-spacing: -0.3px; margin-bottom: 8px; }
.feature p { font-size: 15px; color: var(--text-2); line-height: 1.6; }

/* STAT ROW */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.stat { background: var(--bg-3); border: 1px solid var(--line); border-radius: 16px; padding: 32px 28px; }
.stat .v { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 46px; line-height: 1; letter-spacing: -1px; color: var(--text); }
.stat .v .plus { color: var(--accent); }
.stat .l { font-size: 14px; color: var(--text-3); margin-top: 8px; }

/* STACK CHIPS */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.chip { background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 100px; padding: 8px 16px; font-size: 13px; font-weight: 600; color: var(--text-2); }

/* GALLERY */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 36px; }
.gallery figure { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg-3); box-shadow: var(--shadow-sm); }
.gallery img { width: 100%; display: block; }
.gallery figcaption { padding: 12px 16px; font-size: 13px; color: var(--text-3); border-top: 1px solid var(--line); }

/* CALLOUT */
.callout { background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 16px; padding: 32px 36px; margin-top: 40px; }
.callout p { font-family: 'Fraunces', serif; font-style: italic; font-size: 22px; line-height: 1.4; color: var(--text); }

/* CTA */
.case-cta { background: var(--text); color: var(--bg); border-radius: 28px; margin: 64px 40px; padding: 72px 40px; text-align: center; position: relative; overflow: hidden; }
.case-cta::before { content: ''; position: absolute; width: 500px; height: 500px; top: -180px; right: -80px; background: radial-gradient(circle, rgba(208,69,0,.35) 0%, transparent 60%); filter: blur(40px); }
.case-cta-inner { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
.case-cta h2 { font-family: 'Fraunces', serif; font-weight: 500; font-size: clamp(32px, 5vw, 56px); line-height: 1.05; letter-spacing: -1.5px; color: var(--bg); margin-bottom: 18px; }
.case-cta h2 em { font-style: italic; color: var(--accent); font-weight: 400; }
.case-cta p { color: rgba(250,247,240,.7); font-size: 18px; margin-bottom: 32px; }
.case-cta .btn-primary { background: var(--accent); color: #fff; }
.case-cta .btn-primary:hover { background: var(--accent-2); }
.case-cta .btn-ghost { color: var(--bg); border: 1px solid rgba(250,247,240,.25); background: transparent; margin-left: 8px; }

/* FOOTER */
footer { background: var(--text); color: var(--bg); padding: 56px 40px 40px; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-inner .logo { color: var(--bg); }
.footer-inner a.flink { color: rgba(250,247,240,.7); text-decoration: none; font-size: 14px; margin-left: 24px; }
.footer-inner a.flink:hover { color: var(--accent); }
.footer-copy { color: rgba(250,247,240,.4); font-size: 13px; margin-top: 28px; max-width: 1200px; margin-left: auto; margin-right: auto; }

/* MOBILE */
@media (max-width: 860px) {
  nav ul { display: none; }
  nav, .wrap, .wrap-wide { padding-left: 24px; padding-right: 24px; }
  .features, .stats, .gallery { grid-template-columns: 1fr; }
  .meta-bar { gap: 24px; }
  .case-cta { margin: 48px 0; border-radius: 0; }
}
