/* Shared styles for the long-form case study pages (/case-studies/*).
   Palette and type match the rest of insperaai.com. */
:root {
  --ink: #1b1b2a;
  --ink-2: #24243a;
  --cream: #fbf7f4;
  --lav: #ede7fb;
  --lav-2: #f3f2f9;
  --purple: #8b48eb;
  --purple-2: #a974ec;
  --purple-3: #c09bf1;
  --muted: #55566b;
  --muted-2: #9a9ba4;
  --line: #d8d9e0;
  --white: #ffffff;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: 'Plus Jakarta Sans', sans-serif; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--purple); }
img { max-width: 100%; display: block; }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(251,247,244,0.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--lav); }
.nav-in { max-width: 1160px; margin: 0 auto; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { text-decoration: none; font-size: 20px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; white-space: nowrap; }
.logo span { color: var(--purple); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { text-decoration: none; color: var(--ink); font-size: 15px; font-weight: 500; }
.nav-links .btn-sm { background: var(--purple); color: #fff; padding: 9px 16px; border-radius: 9px; font-weight: 700; font-size: 14px; }
@media (max-width: 720px) { .nav-links a:not(.btn-sm) { display: none; } }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* hero */
.hero { padding: 72px 0 40px; text-align: center; }
.crumb { font-size: 13px; color: var(--muted-2); margin-bottom: 22px; }
.crumb a { color: var(--muted-2); text-decoration: none; }
.kicker { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 22px; }
.pill { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--purple); background: var(--lav); padding: 6px 12px; border-radius: 999px; }
.hero h1 { font-size: clamp(34px, 5.6vw, 62px); line-height: 1.08; font-weight: 800; letter-spacing: -0.03em; margin: 0 auto 22px; max-width: 900px; }
.hero h1 em { font-style: normal; background: linear-gradient(135deg, var(--purple), var(--purple-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .sub { font-size: clamp(16px, 2vw, 19px); color: var(--muted); max-width: 680px; margin: 0 auto 34px; }
.hero-cta { display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(135deg, var(--purple), var(--purple-2)); color: #fff; font-weight: 700; font-size: 15px; padding: 15px 28px; border-radius: 11px; text-decoration: none; box-shadow: 0 10px 30px rgba(139,72,235,0.28); }

/* stat strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--lav); border: 1px solid var(--lav); border-radius: 20px; overflow: hidden; margin: 48px 0 0; }
.stat { background: var(--white); padding: 26px 18px; text-align: center; }
.stat .v { font-size: clamp(24px, 3.2vw, 34px); font-weight: 800; letter-spacing: -0.02em; color: var(--purple); line-height: 1.1; }
.stat .l { font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.4; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* sections */
section { padding: 72px 0; }
section.tint { background: var(--white); border-top: 1px solid var(--lav); border-bottom: 1px solid var(--lav); }
section.dark { background: var(--ink); color: var(--lav-2); }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--purple); margin-bottom: 12px; }
.dark .eyebrow { color: var(--purple-3); }
h2 { font-size: clamp(26px, 3.6vw, 38px); line-height: 1.18; letter-spacing: -0.02em; font-weight: 800; margin: 0 0 18px; }
h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 8px; line-height: 1.3; }
p { margin: 0 0 16px; }
.lead { font-size: 18px; color: var(--muted); }
.dark .lead, .dark p { color: #c4c5d1; }

/* the one change */
.shift { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-top: 30px; }
.shift div { background: var(--white); border: 1px solid var(--lav); border-radius: 14px; padding: 18px; font-weight: 600; font-size: 15px; color: var(--muted); }
.shift div s { color: var(--muted-2); }
.shift .yes { border-color: var(--purple); color: var(--ink); background: var(--lav); }
@media (max-width: 720px) { .shift { grid-template-columns: 1fr; } }

/* before list */
.pain { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.pain li { display: flex; gap: 14px; align-items: flex-start; background: var(--white); border: 1px solid var(--lav); border-radius: 14px; padding: 16px 18px; }
.pain li::before { content: ''; flex: 0 0 8px; height: 8px; margin-top: 9px; border-radius: 50%; background: #e0566b; }

/* build steps */
.step { display: grid; grid-template-columns: 72px 1fr; gap: 22px; padding: 34px 0; border-top: 1px solid var(--lav); }
.step:first-of-type { border-top: 0; }
.snum { width: 56px; height: 56px; border-radius: 16px; background: linear-gradient(135deg, var(--purple), var(--purple-2)); color: #fff; font-weight: 800; font-size: 22px; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 22px rgba(139,72,235,0.25); }
.step .tag { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 4px; }
.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.vs > div { border-radius: 14px; padding: 16px 18px; font-size: 14.5px; }
.vs .bad { background: var(--lav-2); color: var(--muted); }
.vs .good { background: var(--white); border: 1.5px solid var(--purple); }
.vs .h { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 6px; }
.vs .bad .h { color: var(--muted-2); }
.vs .good .h { color: var(--purple); }
.vs ul { margin: 0; padding-left: 18px; }
.vs li { margin-bottom: 4px; }
@media (max-width: 720px) { .step { grid-template-columns: 1fr; gap: 14px; } .vs { grid-template-columns: 1fr; } }

/* callout */
.callout { border-left: 4px solid var(--purple); background: var(--lav); border-radius: 0 14px 14px 0; padding: 16px 20px; margin: 18px 0 0; font-size: 15px; }
.callout.warn { border-color: #e0566b; background: #fdeef0; }
.callout b { color: var(--ink); }

/* question chips */
.qs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.qs span { font-size: 13px; font-weight: 600; background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.stage { background: var(--white); border: 1px solid var(--lav); border-radius: 16px; padding: 20px; margin-top: 14px; }
.stage .when { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--purple); }
.stage ol { margin: 10px 0 0; padding-left: 20px; }

/* funnel */
.funnel { display: grid; gap: 10px; margin-top: 30px; }
.frow { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; }
.bar { height: 58px; border-radius: 12px; display: flex; align-items: center; padding: 0 18px; color: #fff; font-weight: 700; font-size: 14.5px; background: linear-gradient(90deg, var(--purple), var(--purple-2)); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frow .fv { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; min-width: 110px; text-align: right; }
.dark .frow .fv { color: #fff; }
@media (max-width: 720px) { .bar { height: 50px; font-size: 13px; padding: 0 12px; } .frow .fv { font-size: 18px; min-width: 84px; } }

/* big numbers grid */
.nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.n { background: var(--ink-2); border: 1px solid #32334a; border-radius: 16px; padding: 22px; }
.n .v { font-size: 30px; font-weight: 800; color: #fff; letter-spacing: -0.02em; line-height: 1.1; }
.n .v small { font-size: 15px; color: var(--purple-3); font-weight: 700; }
.n .l { font-size: 13px; color: #9a9ba4; margin-top: 6px; }
@media (max-width: 720px) { .nums { grid-template-columns: 1fr 1fr; } }

/* tables */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 26px; background: var(--white); border: 1px solid var(--lav); border-radius: 16px; overflow: hidden; font-size: 15px; }
.tbl th, .tbl td { padding: 15px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--lav); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); background: var(--lav-2); }
.tbl td:first-child { font-weight: 700; }
.tbl td.after { color: var(--purple); font-weight: 700; }
.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .tbl { font-size: 13.5px; } .tbl th, .tbl td { padding: 11px 10px; } }

/* timeline */
.tl { position: relative; margin-top: 30px; padding-left: 30px; }
.tl::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--lav); }
.tl > div { position: relative; padding-bottom: 26px; }
.tl > div::before { content: ''; position: absolute; left: -29px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); border: 3px solid var(--purple); }
.tl .when { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--purple); }

/* quote */
.quote { background: var(--white); border: 1px solid var(--lav); border-radius: 22px; padding: 34px; position: relative; }
.quote p { font-size: 19px; line-height: 1.6; font-weight: 500; }
.quote .who { font-size: 14px; color: var(--muted); font-weight: 600; margin: 0; }
.quote .who b { color: var(--ink); }

/* video */
.video { position: relative; aspect-ratio: 16/9; border-radius: 20px; overflow: hidden; background: var(--ink); box-shadow: 0 20px 50px rgba(27,27,42,0.18); margin-top: 26px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* screenshot */
.shot { border-radius: 18px; overflow: hidden; border: 1px solid var(--lav); box-shadow: 0 18px 44px rgba(27,27,42,0.12); margin-top: 26px; }

/* tool logos */
.tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.tools span { display: inline-flex; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; font-size: 13.5px; font-weight: 700; }
.tools img { width: 20px; height: 20px; border-radius: 5px; object-fit: cover; }

/* calculator */
.calc { background: var(--white); border: 1px solid var(--lav); border-radius: 20px; padding: 26px; margin-top: 26px; }
.calc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.calc label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.calc input[type=range] {
  width: 100%; accent-color: var(--purple);
  height: 28px; margin: 4px 0; -webkit-appearance: none; appearance: none;
  background: transparent; touch-action: manipulation;
}
.calc input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: var(--lav); }
.calc input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 28px; height: 28px; border-radius: 999px;
  background: var(--purple); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(139,72,235,0.5);
  margin-top: -10px; cursor: pointer;
}
.calc input[type=range]::-moz-range-track { height: 8px; border-radius: 999px; background: var(--lav); }
.calc input[type=range]::-moz-range-thumb {
  width: 28px; height: 28px; border-radius: 999px; border: 3px solid #fff;
  background: var(--purple); box-shadow: 0 2px 8px rgba(139,72,235,0.5); cursor: pointer;
}
@media (max-width: 400px) {
  .wrap, .narrow { padding: 0 16px; }
  .hero { padding: 48px 0 28px; }
  .calc { padding: 18px 14px; border-radius: 16px; }
  .calc-out div { padding: 14px 10px; }
  section { padding: 48px 0; }
}
.calc .val { font-size: 20px; font-weight: 800; }
.calc-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 22px; }
.calc-out div { background: var(--lav-2); border-radius: 14px; padding: 16px; text-align: center; }
.calc-out .v { font-size: 26px; font-weight: 800; color: var(--purple); }
.calc-out .l { font-size: 12.5px; color: var(--muted); }
@media (max-width: 720px) { .calc-grid, .calc-out { grid-template-columns: 1fr; } }

/* lesson + cta */
.lesson { font-size: clamp(24px, 3.4vw, 36px); font-weight: 800; line-height: 1.25; letter-spacing: -0.02em; max-width: 820px; }
.lesson em { font-style: normal; color: var(--purple-3); }
.cta-box { margin-top: 40px; background: linear-gradient(135deg, #24243a, #181826); border: 1px solid #32334a; border-radius: 24px; padding: 40px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: center; }
.cta-box h3 { font-size: 26px; color: #fff; }
.cta-box .for { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--purple-3); background: rgba(169,116,236,0.16); padding: 6px 12px; border-radius: 999px; margin-bottom: 14px; }
.cta-box .go { display: flex; align-items: center; justify-content: center; gap: 8px; background: linear-gradient(135deg, var(--purple), var(--purple-2)); color: #fff; font-weight: 800; font-size: 16px; padding: 18px 26px; border-radius: 12px; text-decoration: none; text-align: center; box-shadow: 0 12px 30px rgba(139,72,235,0.35); }
.cta-box .fine { font-size: 12.5px; color: #9a9ba4; text-align: center; margin-top: 10px; }
@media (max-width: 720px) { .cta-box { grid-template-columns: 1fr; padding: 26px; } }

/* more case studies */
.more { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 22px; }
.more a { display: block; background: var(--white); border: 1px solid var(--lav); border-radius: 16px; padding: 20px; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.more a:hover { border-color: var(--purple); transform: translateY(-2px); }
.more .t { font-weight: 800; font-size: 16.5px; line-height: 1.35; }
.more .c { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--purple); margin-bottom: 6px; }
@media (max-width: 720px) { .more { grid-template-columns: 1fr; } }

.foot-note { font-size: 12.5px; color: var(--muted-2); line-height: 1.6; margin-top: 18px; }
.dark .foot-note { color: #8a8b98; }
footer { background: var(--ink); color: #6b6c7a; font-size: 13px; text-align: center; padding: 28px 24px; border-top: 1px solid #32334a; }
footer a { color: #d8d9e0; text-decoration: none; margin: 0 8px; }
.dark .lesson { color: #fff; }
