/* NAIZEL case study detail pages (/case-studies/<slug>/). Generated pages; content lives in naizel-case-studies-src.
   Palette: #021A12 #031F16 #052E22 #06402F / #047857 #059669 #0A8F63 / #D9A441 #E8B65A #F2C96E #F8D98A / #D1D5DB #5B6B64 #F7F3E9 #E5E1D3 */
.csd { font-family: "Plus Jakarta Sans", "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif; color: #052E22; background: #F7F3E9; }
.csd *, .csd *::before, .csd *::after { box-sizing: border-box; }
.csd h1, .csd h2, .csd h3, .csd h4 { font-family: inherit; text-wrap: balance; }
.csd p { text-wrap: pretty; }
.csd a { text-decoration: none; }
.csd img { display: block; max-width: 100%; }
.csd img.is-warm { filter: sepia(.25) saturate(1.1) hue-rotate(-10deg) contrast(1.05); }

/* ---------- shared section scaffolding ---------- */
/* Section padding comes from the site-wide --section-space system in the main stylesheet (2026-11-18). */
.csd-sec--cream { background: #F7F3E9; }
.csd-sec--white { background: #FFFFFF; }
.csd-sec--dark { background: radial-gradient(60% 70% at 85% 20%, rgba(5,150,105,.14), transparent 60%), #021A12; color: #FFFFFF; }
.csd-sec--forest { background: radial-gradient(50% 60% at 10% 90%, rgba(232,182,90,.10), transparent 60%), #052E22; color: #FFFFFF; }
.csd-head { max-width: 760px; margin-bottom: var(--section-head-space); }
.csd-head--row { max-width: none; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.csd-kicker { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #047857; }
.csd-kicker--gold { color: #E8B65A; }
.csd-h2 { margin: 0; font-size: clamp(28px, 3.2vw, 42px); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; color: inherit; }
.csd-p { margin: 18px 0 0; font-size: 17px; line-height: 1.7; color: #5B6B64; max-width: 70ch; }
.csd-p--light { color: #D1D5DB; }
.csd-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: #047857; }
.csd-link svg { width: 18px; height: 18px; transition: transform .25s ease; }
.csd-link:hover svg { transform: translateX(3px); }
.csd-link:focus-visible { outline: 2px solid #059669; outline-offset: 3px; border-radius: 4px; }

/* ---------- A. hero (split screen, dark) ---------- */
.csd-hero { background: radial-gradient(55% 80% at 90% 30%, rgba(5,150,105,.18), transparent 60%), linear-gradient(135deg, #021A12, #031F16); color: #FFFFFF; padding-block: clamp(48px, 6vw, 96px); overflow: hidden; }
.csd-hero__grid { display: grid; gap: clamp(32px, 4vw, 64px); align-items: center; }
.csd-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 28px; padding: 0; list-style: none; font-size: 14px; color: #D1D5DB; }
.csd-crumbs li + li::before { content: "/"; margin-right: 6px; color: #047857; }
.csd-crumbs a { color: #D1D5DB; }
.csd-crumbs a:hover { color: #F2C96E; }
.csd-crumbs [aria-current] { color: #FFFFFF; }
.csd-eyebrow { margin: 0 0 14px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #E8B65A; }
.csd-hero__title { margin: 0; font-size: clamp(34px, 4.4vw, 58px); font-weight: 800; line-height: 1.06; letter-spacing: -.025em; color: #FFFFFF; }
.csd-hero__lead { margin: 22px 0 0; font-size: clamp(17px, 1.4vw, 19px); line-height: 1.65; color: #D1D5DB; max-width: 60ch; }
.csd-badge { display: inline-flex; align-items: center; gap: 8px; margin: 28px 0 0; padding: 7px 14px; border: 1px solid rgba(5,150,105,.6); border-radius: 999px; font-size: 13px; font-weight: 600; color: #F8D98A; background: rgba(6,64,47,.45); }
.csd-badge span { width: 7px; height: 7px; border-radius: 50%; background: #E8B65A; box-shadow: 0 0 8px rgba(232,182,90,.8); }
.csd-hero__media { margin: 0; position: relative; border-radius: 24px; overflow: hidden; border: 1px solid rgba(5,150,105,.45); box-shadow: 0 30px 60px -30px rgba(0,0,0,.6), 0 0 0 6px rgba(6,64,47,.35); aspect-ratio: 16 / 10; }
.csd-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.csd-hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(2,26,18,.35)); pointer-events: none; }

/* ---------- B. overview (two columns) ---------- */
.csd-split { display: grid; gap: clamp(32px, 4vw, 72px); align-items: start; }
.csd-split .csd-p:first-of-type { margin-top: 22px; }
.csd-note { margin: 24px 0 0; padding: 14px 18px; border-left: 3px solid #D9A441; background: rgba(217,164,65,.08); border-radius: 0 10px 10px 0; font-size: 14.5px; line-height: 1.6; color: #5B6B64; max-width: 70ch; }
.csd-glance { background: #FFFFFF; border: 1px solid #E5E1D3; border-radius: 22px; padding: 28px; box-shadow: 0 14px 34px -22px rgba(2,26,18,.25); }
.csd-glance h3 { margin: 0 0 18px; font-size: 20px; font-weight: 800; color: #052E22; }
.csd-glance dl { margin: 0; display: grid; gap: 14px; }
.csd-glance dt { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #047857; }
.csd-glance dd { margin: 4px 0 0; font-size: 16px; font-weight: 600; color: #052E22; }
.csd-glance h4 { margin: 22px 0 10px; padding-top: 18px; border-top: 1px solid #E5E1D3; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #047857; }
.csd-glance ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.csd-glance li { position: relative; padding-left: 20px; font-size: 15px; line-height: 1.5; color: #374151; }
.csd-glance li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: #D9A441; }

/* ---------- C. challenges (numbered cards) ---------- */
.csd-chals { display: grid; gap: 20px; }
.csd-chal { position: relative; background: #F7F3E9; border: 1px solid #E5E1D3; border-radius: 20px; padding: 28px 28px 30px; transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease; }
.csd-chal:hover { border-color: #059669; box-shadow: 0 18px 40px -22px rgba(5,150,105,.45); transform: translateY(-3px); }
.csd-chal__num { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #052E22; color: #F2C96E; font-weight: 800; font-size: 15px; }
.csd-chal h3 { margin: 18px 0 0; font-size: 20px; font-weight: 800; line-height: 1.3; color: #052E22; }
.csd-chal p { margin: 10px 0 0; font-size: 15.5px; line-height: 1.65; color: #5B6B64; }

/* ---------- D. approach (pillars + flow) ---------- */
.csd-approach { display: grid; gap: clamp(32px, 4vw, 64px); align-items: start; }
.csd-pillars { margin: 0; padding: 0; list-style: none; display: grid; gap: 26px; }
.csd-pillar { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.csd-pillar__num { font-size: 15px; font-weight: 800; color: #E8B65A; padding-top: 3px; min-width: 28px; }
.csd-pillar h3 { margin: 0; font-size: 19px; font-weight: 800; color: #FFFFFF; }
.csd-pillar p { margin: 8px 0 0; font-size: 15.5px; line-height: 1.65; color: #D1D5DB; }
.csd-flow { background: rgba(6,64,47,.55); border: 1px solid rgba(5,150,105,.45); border-radius: 22px; padding: 28px; }
.csd-flow h3 { margin: 0 0 20px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #E8B65A; }
.csd-flow ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.csd-flow__step { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: #031F16; border: 1px solid rgba(5,150,105,.35); font-size: 15px; font-weight: 600; color: #FFFFFF; line-height: 1.4; }
.csd-flow__step + .csd-flow__step::before { content: ""; position: absolute; left: 31px; top: -15px; width: 2px; height: 15px; background: linear-gradient(#E8B65A, rgba(232,182,90,.35)); }
.csd-flow__idx { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid #E8B65A; color: #F2C96E; font-size: 13px; font-weight: 800; }
.csd-flow__step:last-child { border-color: rgba(232,182,90,.6); box-shadow: 0 0 22px rgba(232,182,90,.12); }

/* ---------- E. tech stack ---------- */
.csd-tech { display: grid; gap: 18px; }
.csd-tech__group { background: #FFFFFF; border: 1px solid #E5E1D3; border-radius: 20px; padding: 22px 24px 24px; }
.csd-tech__group h3 { margin: 0 0 14px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #047857; }
.csd-tech__group ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.csd-tech__group li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #F7F3E9; border: 1px solid #E5E1D3; font-size: 14.5px; font-weight: 600; color: #052E22; }
.csd-tech__group li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #059669; }

/* ---------- F. implementation timeline ---------- */
.csd-phases { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; position: relative; }
.csd-phase { position: relative; padding: 0 0 32px 64px; }
.csd-phase::before { content: ""; position: absolute; left: 21px; top: 44px; bottom: 0; width: 2px; background: linear-gradient(#059669, rgba(5,150,105,.2)); }
.csd-phase:last-child { padding-bottom: 0; }
.csd-phase:last-child::before { display: none; }
.csd-phase__num { position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #052E22; color: #F2C96E; font-weight: 800; box-shadow: 0 0 0 5px #FFFFFF, 0 0 0 6px rgba(5,150,105,.35); }
.csd-phase h3 { margin: 8px 0 0; font-size: 19px; font-weight: 800; color: #052E22; }
.csd-phase p { margin: 8px 0 0; font-size: 15.5px; line-height: 1.65; color: #5B6B64; max-width: 62ch; }

/* ---------- G. outcomes ---------- */
.csd-outs { display: grid; gap: 18px; }
.csd-out { position: relative; padding: 26px 26px 28px; border-radius: 20px; background: rgba(6,64,47,.6); border: 1px solid rgba(5,150,105,.45); overflow: hidden; transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease; }
.csd-out::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: linear-gradient(90deg, #E8B65A, rgba(232,182,90,0)); }
.csd-out:hover { border-color: #F2C96E; box-shadow: 0 0 0 1px rgba(242,201,110,.5), 0 14px 32px rgba(2,26,18,.5), 0 0 26px rgba(232,182,90,.2); transform: translateY(-3px); }
.csd-out h3 { margin: 0; font-size: 19px; font-weight: 800; color: #FFFFFF; line-height: 1.3; }
.csd-out p { margin: 10px 0 0; font-size: 15.5px; line-height: 1.65; color: #D1D5DB; }

/* ---------- H. related services ---------- */
.csd-svcs { display: grid; gap: 18px; }
.csd-svc { display: flex; flex-direction: column; background: #FFFFFF; border: 1px solid #E5E1D3; border-radius: 20px; overflow: hidden; color: #052E22; transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease; }
.csd-svc__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #052E22; }
.csd-svc__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; filter: hue-rotate(-60deg) saturate(.62) brightness(.9); /* same emerald treatment as the site's service renders */ }
.csd-svc__body { display: flex; flex-direction: column; flex: 1; gap: 14px; padding: 20px 22px 22px; }
.csd-svc__title { font-size: 17px; font-weight: 800; line-height: 1.35; }
.csd-svc__more { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: #047857; }
.csd-svc__more svg, .csd-mini__more svg { width: 16px; height: 16px; transition: transform .25s ease; }
.csd-svc:hover, .csd-svc:focus-visible { border-color: #059669; box-shadow: 0 18px 40px -20px rgba(5,150,105,.45); transform: translateY(-4px); }
.csd-svc:hover img { transform: scale(1.04); }
.csd-svc:hover .csd-svc__more svg, .csd-mini:hover .csd-mini__more svg { transform: translateX(3px); }
.csd-svc:focus-visible, .csd-mini:focus-visible { outline: 2px solid #059669; outline-offset: 3px; }

/* ---------- more case studies ---------- */
.csd-minis { display: grid; gap: 22px; }
.csd-mini { display: flex; flex-direction: column; background: #FFFFFF; border: 1px solid #E5E1D3; border-radius: 22px; overflow: hidden; color: #052E22; box-shadow: 0 14px 34px -22px rgba(2,26,18,.25); transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease; }
.csd-mini__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.csd-mini__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.csd-mini__body { display: flex; flex-direction: column; flex: 1; gap: 10px; padding: 22px 24px 24px; }
.csd-mini__tag { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #047857; }
.csd-mini__title { font-size: 19px; font-weight: 800; line-height: 1.3; }
.csd-mini__more { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: #047857; }
.csd-mini:hover { border-color: #059669; box-shadow: 0 18px 40px -16px rgba(5,150,105,.4); transform: translateY(-4px); }
.csd-mini:hover img { transform: scale(1.04); }

/* ---------- I. CTA (same language as the homepage CTA) ---------- */
.csd-cta { background: #F2C96E; color: #021A12; }
.csd-cta__title { margin: 0; font-size: clamp(32px, 4vw, 56px); font-weight: 800; line-height: 1.06; letter-spacing: -.02em; color: #021A12; max-width: 18ch; }
.csd-cta__text { margin: 20px 0 0; font-size: 18px; line-height: 1.65; color: #052E22; max-width: 60ch; }
.csd-cta__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.csd-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 28px; border-radius: 999px; font-size: 16px; font-weight: 600; white-space: nowrap; transition: background .25s ease, box-shadow .25s ease, transform .25s ease; }
.csd-btn--solid { background: #000000; color: #FFFFFF; border: 1.5px solid #000000; }
.csd-btn--solid:hover { background: #021A12; border-color: #021A12; transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgba(2,26,18,.55); }
.csd-btn--ghost { background: transparent; color: #021A12; border: 1.5px solid #021A12; }
.csd-btn--ghost:hover { background: rgba(2,26,18,.08); transform: translateY(-1px); }
.csd-btn:focus-visible { outline: 2px solid #021A12; outline-offset: 3px; }

/* ---------- responsive ---------- */
@media (min-width: 640px) {
  .csd-chals, .csd-outs, .csd-svcs, .csd-tech { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .csd-minis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .csd-hero__grid { grid-template-columns: minmax(0, 54fr) minmax(0, 46fr); }
  .csd-split { grid-template-columns: minmax(0, 62fr) minmax(0, 38fr); }
  .csd-glance { position: sticky; top: calc(var(--nz-header-h, 76px) + 24px); }
  .csd-approach { grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); }
  .csd-outs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .csd-svcs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .csd-tech { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  /* horizontal timeline */
  .csd-phases { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
  .csd-phase { padding: 64px 0 0; }
  .csd-phase::before { left: 44px; right: -24px; top: 21px; bottom: auto; width: auto; height: 2px; background: linear-gradient(90deg, #059669, rgba(5,150,105,.25)); }
  .csd-phase:last-child::before { display: none; }
  .csd-phase h3 { margin-top: 0; font-size: 18px; }
  .csd-phase p { font-size: 15px; }
}
@media (max-width: 479px) {
  .csd-cta__actions { flex-direction: column; }
  .csd-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .csd-chal, .csd-out, .csd-svc, .csd-mini, .csd-btn, .csd-svc__media img, .csd-mini__media img, .csd-link svg { transition: none; }
  .csd-chal:hover, .csd-out:hover, .csd-svc:hover, .csd-mini:hover, .csd-btn:hover { transform: none; }
  .csd-svc:hover img, .csd-mini:hover img { transform: none; }
}
