/* Case studies: Flebo, Menteiz Aviation, Kargo360 (built from the Figma design exports) */

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

html, body, a { cursor: url("assets/cursor-pointer.svg") 9 4, auto; }

body.cs {
  font-family: 'Archivo', sans-serif;
  color: #1c1c1c;
  background: #f2f1ec;
}

.cs-page {
  max-width: 1440px;
  margin: 0 auto;
  background-color: #f2f1ec;
  background-image:
    linear-gradient(to right, rgba(20, 20, 20, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(20, 20, 20, 0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  overflow-x: hidden;
}

.wrap { padding: 0 104px; }

/* header */
.cs-header { display: flex; justify-content: space-between; align-items: flex-start; padding-top: 56px; }
.back { font-size: 15px; font-weight: 600; color: #1c1c1c; text-decoration: none; }
.palette { display: flex; align-items: center; gap: 16px; }
.swatches { display: grid; grid-template-columns: 22px 22px; grid-auto-rows: 22px; gap: 3px; }
.swatches span { display: block; }
.palette p { font-size: 11.5px; letter-spacing: 1.5px; color: #6f6d66; line-height: 1.5; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 48px; }
.chip { border: 1px solid #cfcdc4; background: #fff; padding: 10px 20px; font-size: 15.5px; font-weight: 600; }
.chip.active { background: #111; color: #fff; border-color: #111; }

/* hero text */
h1 { margin-top: 40px; font-size: clamp(42px, 6.8vw, 97px); line-height: 1.07; letter-spacing: -0.035em; font-weight: 700; max-width: 1220px; }
.sub { margin-top: 34px; font-size: clamp(18px, 1.7vw, 24px); max-width: 1180px; }

.stats { display: flex; gap: 90px; flex-wrap: wrap; margin-top: 64px; }
.stat .v { font-size: 40px; font-weight: 700; letter-spacing: -1px; }
.stat .c { margin-top: 6px; font-size: 15px; color: #55534c; }
.v.blue { color: #2b6cf0; } .v.teal { color: #0d9488; } .v.orange { color: #f0930d; }

.meta {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  border-top: 1px solid #b9b7ae; margin-top: 44px; padding-top: 22px; padding-bottom: 40px;
}
.meta .k { font-size: 16px; color: #9a978f; }
.meta .d { margin-top: 10px; font-size: 17.5px; font-weight: 700; }

/* content */
h2.hl {
  display: inline-block; margin: 90px 0 8px;
  background: #d6e03d; padding: 4px 18px 6px;
  font-size: clamp(30px, 3.2vw, 46px); font-weight: 800; letter-spacing: -0.5px;
}
h3 { margin: 64px 0 6px; font-size: clamp(23px, 2.1vw, 30px); font-weight: 700; }
h4 { margin: 34px 0 4px; font-size: 20px; font-weight: 700; }
.cs p { margin-top: 26px; font-size: 19.5px; line-height: 1.55; max-width: 1230px; }
.cs ul { margin: 18px 0 0 26px; }
.cs li { margin-top: 10px; font-size: 19.5px; line-height: 1.5; }
.cs blockquote {
  margin: 40px 0; padding: 4px 0 4px 28px; border-left: 5px solid #e02020;
  font-size: clamp(21px, 2vw, 27.5px); font-weight: 700; line-height: 1.35; max-width: 1200px;
}

/* figures */
.fig { display: block; width: calc(100% + 52px); margin: 64px -26px; }
.full { display: block; width: 100%; margin: 48px 0 0; }
img { max-width: none; }

/* footer */
.zig {
  height: 30px; margin-top: 110px;
  background: conic-gradient(from 135deg at 50% 0%, #0e0e0e 90deg, #0000 0) 0 0 / 64px 30px repeat-x;
}
.cs-footer { background: #0e0e0e; color: #fff; margin-top: -1px; }
.next { display: flex; align-items: center; gap: 34px; padding: 120px 0 150px; }
.folder { width: 84px; }
.next-label { font-size: 16px; font-weight: 600; }
.next-label span { color: #8d8d8d; font-weight: 400; }
.next-link { display: inline-block; margin-top: 10px; font-size: clamp(36px, 4vw, 58px); color: #fff; text-decoration: none; letter-spacing: -1px; }
.foot-row {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.14); padding: 26px 0 34px; font-size: 14px; color: #9a9a9a;
}
.foot-row a { color: #d8d8d8; text-decoration: none; }

/* reveals */
@media (prefers-reduced-motion: no-preference) {
  .rv { opacity: 0; translate: 0 26px; transition: opacity 0.7s ease, translate 0.8s cubic-bezier(0.22, 0.9, 0.3, 1); }
  .rv.in { opacity: 1; translate: 0 0; }
}

/* responsive */
@media (max-width: 900px) {
  .wrap { padding: 0 22px; }
  .fig { width: calc(100% + 20px); margin: 40px -10px; }
  .meta { grid-template-columns: 1fr 1fr; }
  .stats { gap: 40px; margin-top: 44px; }
  h2.hl { margin-top: 60px; }
  .next { padding: 70px 0 90px; gap: 20px; }
  .folder { width: 56px; }
}

/* ===== shared components for the Menteiz + Kargo360 case studies ===== */
.hand { font-family: 'Homemade Apple', cursive; }
.kicker { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; margin-top: 44px; }
.kicker.red { color: #e02020; } .kicker.navy { color: #172a4d; } .kicker.green { color: #2e7d32; }
.lead { font-size: 20px; font-weight: 700; margin-top: 12px; }
.cs .fig-caption { margin: 14px 0 0; font-size: 15px; color: #55534c; max-width: 900px; }
.cs .fig + .fig-caption { margin-top: -40px; }
.cs .full-wrap { margin: 56px 0 0; }
.cs .full-wrap .full { margin: 0; }

/* two-column card pairs (audiences, first answer / what shipped, before / after) */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 36px; }
.card { padding: 30px 32px; background: #fff; border: 1px solid #e2e0d9; }
.card h5 { font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -0.3px; }
.cs .card p { margin-top: 14px; font-size: 16.5px; line-height: 1.5; }
.cs .card p.kicker, .cs .token p.kicker, .cs .callout p.kicker, .cs .closing p.kicker, .cs p.kicker { font-size: 12px; letter-spacing: 2px; line-height: 1.4; }
.cs .card ol { margin: 16px 0 0 20px; } .cs .card ol li { font-size: 15px; line-height: 2; padding-left: 0; margin: 0; }
.card ul { margin: 18px 0 0; list-style: none; }
.card li { font-size: 15px; line-height: 1.5; margin-top: 8px; padding-left: 22px; position: relative; }
.card ul li::before { content: "\2014"; position: absolute; left: 0; color: #9a978f; }
.card .accent { margin-top: 26px; padding-top: 16px; border-top: 1px solid rgba(0, 0, 0, 0.1); font-size: 13px; color: #6f6d66; display: flex; align-items: center; gap: 8px; }
.card .accent i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.card.navy { background: #172a4d; color: #fff; border-color: #172a4d; }
.card.navy ul li::before { color: rgba(255, 255, 255, 0.5); }
.card.navy .accent { border-top-color: rgba(255, 255, 255, 0.18); color: rgba(255, 255, 255, 0.7); }
.card.no { background: #ecebe6; border-color: #ecebe6; } .card.no .kicker { margin-top: 0; color: #6f6d66; }
.card.yes { border: 1.5px solid #2e7d32; } .card.yes .kicker { margin-top: 0; color: #2e7d32; }
.card.no .kicker::before { content: "\2715  "; } .card.yes .kicker::before { content: "\2713  "; }
.pair-labels { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 56px; }
.pair-labels span { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; }

/* pinned rule cards */
.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 40px; }
.rule { position: relative; display: grid; grid-template-columns: 1fr 1.3fr; gap: 28px; padding: 40px 36px 36px; background: #fff; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.08); }
.rule::before { content: ""; position: absolute; top: -18px; left: 46%; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff6a6a, #c40000 70%); box-shadow: 0 6px 10px rgba(0, 0, 0, 0.25); }
.rule h5 { font-size: 20px; font-weight: 700; line-height: 1.3; }
.rule ul { margin: 0; padding-left: 20px; border-left: 2px solid #e02020; list-style: none; }
.rule li { font-size: 14.5px; line-height: 1.45; margin-top: 8px; }
.rule li::before { content: "\2022  "; color: #9a978f; }
.rule.solo { grid-column: 1 / -1; width: 60%; margin: 0 auto; }

/* token system */
.tokens { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 36px; }
.token { background: #fff; border: 1px solid #e2e0d9; padding: 22px 24px 26px; }
.token .kicker { margin-top: 0; color: #9a978f; }
.swatch-row { display: flex; margin-top: 18px; }
.swatch-row span { flex: 1; height: 40px; }
.swatch-names { display: flex; margin-top: 8px; font-size: 11px; color: #9a978f; }
.swatch-names span { flex: 1; }
.token .serif { margin-top: 16px; font-family: Georgia, 'Times New Roman', serif; font-size: 30px; }
.token .mono { margin-top: 18px; font-family: ui-monospace, Menlo, monospace; font-size: 12px; letter-spacing: 1px; color: #9a978f; }
.chips-status { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chips-status span { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 4px; }
.st-green { background: #dff3e4; color: #1e7a3a; } .st-purple { background: #ece6f8; color: #5b3fb0; } .st-yellow { background: #fff2c2; color: #8a6d00; } .st-red { background: #ffe1e1; color: #c62828; } .st-teal { background: #dff5f0; color: #157a63; }

/* user intent table */
.intent { display: grid; grid-template-columns: 200px 1fr; margin: 40px auto 0; max-width: 640px; background: #fff; }
.intent .side { background: #fff9c4; display: flex; align-items: center; justify-content: center; text-align: center; color: #1b4fd8; font-size: 22px; font-weight: 700; line-height: 1.5; padding: 24px; }
.intent .rows { display: grid; }
.intent .row { display: grid; grid-template-columns: 34px 1fr auto; gap: 14px; align-items: center; padding: 20px 24px; border-bottom: 1px solid #ecebe6; font-size: 16px; }
.intent .row:last-child { border-bottom: 0; }
.intent .n { width: 26px; height: 26px; border-radius: 50%; background: #172a4d; color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.intent .row b { color: #172a4d; }

/* commit chart */
.bars { margin-top: 40px; max-width: 900px; }
.bar { display: grid; grid-template-columns: 200px 1fr 40px; gap: 18px; align-items: center; font-size: 13.5px; color: #55534c; margin-top: 10px; }
.bar i { display: block; height: 12px; background: #e6e4dd; position: relative; }
.bar i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: #2e7d32; }
.bar b { text-align: right; }
.log { margin-top: 18px; font-family: ui-monospace, Menlo, monospace; font-size: 13.5px; color: #9a978f; line-height: 1.9; }
.log b { color: #55534c; font-weight: 400; margin-right: 8px; }
.note-dark { margin-top: 36px; background: #111; color: #fff; padding: 20px 24px; font-size: 14.5px; line-height: 1.55; max-width: 900px; }
.note-dark em { color: #f0930d; font-style: normal; }
.hand-note { margin-top: 22px; color: #1b6fd8; font-size: 17px; }

/* reflection + yellow next box */
.stars { margin-top: 30px; list-style: none; }
.stars li { position: relative; padding-left: 60px; margin-top: 26px; font-size: 18px; line-height: 1.5; }
.stars li::before { content: "\2731"; position: absolute; left: 0; top: -4px; font-size: 34px; color: #f2c200; }
.next-box { margin-top: 48px; background: #fff9c4; padding: 28px 34px 34px; }
.next-box .kicker { margin-top: 0; color: #55534c; text-transform: none; letter-spacing: 0; font-size: 16px; font-weight: 400; }
.cs .next-box blockquote { margin: 12px 0 0; }

/* Kargo: numbered sections, tables, pills, chain, operator cards, metrics */
.sec { display: grid; grid-template-columns: 220px 1fr; gap: 40px; margin-top: 90px; padding-top: 50px; border-top: 1px solid #d9d7cf; }
.cs .sec .num { margin: 0; font-size: 52px; font-weight: 300; line-height: 1; letter-spacing: -2px; }
.cs .sec .title { margin-top: 10px; font-size: 22px; font-weight: 600; }
.cs .sec .tag { margin-top: 8px; font-size: 13px; color: #6f6d66; line-height: 1.4; }
.sec .body > :first-child { margin-top: 0; }
.cs .sec p { font-size: 18px; }
.cs .sec h4 { margin-top: 40px; }
.cs .sec blockquote { font-size: clamp(20px, 1.8vw, 26px); }
.htable { width: 100%; border-collapse: collapse; margin-top: 30px; font-size: 14.5px; }
.htable th { text-align: left; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: #9a978f; padding: 10px 12px 10px 0; border-bottom: 1px solid #b9b7ae; }
.htable td { padding: 16px 12px 16px 0; border-bottom: 1px solid #e2e0d9; vertical-align: top; line-height: 1.45; }
.htable td:first-child { font-weight: 700; width: 24%; }
.htable td:last-child { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; white-space: nowrap; }
.sev-c { color: #c62828; } .sev-s { color: #b8860b; }
.errs { margin-top: 30px; display: grid; gap: 14px; }
.err { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: center; }
.err .pill { background: #c62828; color: #fff; font-size: 13px; padding: 10px 14px; border-radius: 3px; }
.err .pill::before { content: "! "; opacity: 0.7; }
.err p { margin: 0; font-size: 15px; line-height: 1.45; }
.chain { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 30px; padding: 24px; background: #fff; border: 1px solid #e2e0d9; }
.chain span { background: #1c1c1c; color: #fff; font-size: 13px; padding: 8px 14px; border-radius: 3px; }
.chain i { color: #9a978f; font-style: normal; }
.callout { margin-top: 30px; padding: 20px 24px; background: #fff; border-left: 4px solid #d6e03d; }
.callout.rose { background: #fff0ef; border-left-color: #e02020; } .callout.green { background: #eef7ee; border-left-color: #2e7d32; }
.callout .kicker { margin-top: 0; color: #6f6d66; }
.cs .callout p { margin-top: 8px; font-size: 16px; }
.ops { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; }
.op { background: #fff; border: 1px solid #e2e0d9; padding: 22px; }
.op .who { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.op .who i { width: 30px; height: 30px; border-radius: 50%; background: #c62828; color: #fff; font-style: normal; display: grid; place-items: center; font-size: 13px; }
.op .who small { display: block; font-weight: 400; font-size: 12px; color: #9a978f; }
.op .quote { margin-top: 14px; font-size: 14px; color: #1b6f4a; }
.op ul { list-style: none; margin: 14px 0 0; }
.op li { font-size: 13.5px; line-height: 1.4; margin-top: 6px; padding-left: 16px; position: relative; }
.op li::before { content: "\25B2"; position: absolute; left: 0; font-size: 8px; top: 5px; color: #c62828; }
.op .need { margin-top: 16px; padding-top: 12px; border-top: 1px solid #e2e0d9; font-size: 14px; }
.op .need b { display: block; font-size: 11px; letter-spacing: 2px; color: #9a978f; margin-bottom: 4px; }
.rules-list { margin-top: 20px; }
.rules-list div { padding: 20px 0; border-bottom: 1px solid #e2e0d9; }
.rules-list h5 { font-size: 17px; font-weight: 700; }
.rules-list h5::before { content: "\25A0  "; color: #2e7d32; font-size: 10px; vertical-align: middle; }
.cs .rules-list p { margin-top: 6px; font-size: 15px; color: #55534c; }
.objects { margin-top: 30px; background: #fff; border: 1px solid #e2e0d9; padding: 8px 24px; }
.obj { display: grid; grid-template-columns: 140px 1fr auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid #ecebe6; font-size: 14px; }
.obj:last-child { border-bottom: 0; }
.obj b { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
.obj .chips-status { margin: 0; }
.notes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 30px; }
.notes div { background: #fff; border: 1px solid #e2e0d9; padding: 18px 20px; }
.notes h5 { font-size: 15px; font-weight: 700; } .notes h5::before { content: "\25A0  "; color: #2e7d32; font-size: 9px; vertical-align: middle; }
.cs .notes p { margin-top: 6px; font-size: 14px; color: #55534c; }
.fig-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 30px; }
.fig-pair .fig { width: 100%; margin: 0; }
.fig-pair .cap, .cap-row .cap { margin-top: 12px; }
.cap h6 { font-size: 15px; font-weight: 700; } .cs .cap p { margin-top: 4px; font-size: 14px; color: #55534c; }
.cap-row { display: grid; gap: 24px; margin-top: 14px; }
.cap-row.c2 { grid-template-columns: 1fr 1fr; } .cap-row.c3 { grid-template-columns: repeat(3, 1fr); } .cap-row.c4 { grid-template-columns: repeat(4, 1fr); }
.side-fig { display: grid; grid-template-columns: 340px 1fr; gap: 40px; align-items: start; margin-top: 30px; }
.side-fig .fig { width: 100%; margin: 0; }
.annots div { padding: 14px 0 14px 16px; border-left: 3px solid #f2c200; margin-top: 14px; }
.annots h6 { font-size: 14px; font-weight: 700; }
.cs .annots p { margin-top: 4px; font-size: 14px; color: #55534c; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; }
.metric { background: #fff; border: 1px solid #e2e0d9; padding: 22px 24px; }
.metric h6 { font-size: 14px; font-weight: 700; }
.cs .metric p.big { margin-top: 10px; font-size: 32px; color: #2e7d32; letter-spacing: -0.5px; }
.metric .big small { font-size: 18px; margin-right: 6px; }
.cs .metric p { margin-top: 8px; font-size: 13.5px; color: #55534c; }
.closing { background: #0e0e0e; color: #fff; margin-top: 110px; padding: 90px 0 80px; }
.closing .kicker { margin-top: 0; color: #d6e03d; }
.closing h2 { margin-top: 20px; font-size: clamp(30px, 3.6vw, 52px); line-height: 1.15; letter-spacing: -1px; font-weight: 500; max-width: 1000px; }
.closing h2 em { color: #d6e03d; font-style: normal; }
.cs .closing p { font-size: 16px; color: #bdbdbd; max-width: 640px; }
.closing .box { margin-top: 36px; max-width: 1000px; background: #1c1c1c; border-left: 3px solid #d6e03d; padding: 20px 24px; }
.closing .box .kicker { color: #d6e03d; }
.cs .closing .box p { margin-top: 8px; color: #e6e6e6; }
.closing + .zig { margin-top: 0; }
.closing + .cs-footer { border-top: 1px solid rgba(255, 255, 255, 0.14); }

@media (max-width: 900px) {
  .pair, .rules, .tokens, .fig-pair, .notes, .metrics, .cap-row.c2, .cap-row.c3, .cap-row.c4, .ops, .pair-labels { grid-template-columns: 1fr; }
  .rule { grid-template-columns: 1fr; } .rule.solo { width: 100%; }
  .intent { grid-template-columns: 1fr; } .sec { grid-template-columns: 1fr; gap: 16px; }
  .err { grid-template-columns: 1fr; gap: 8px; } .side-fig { grid-template-columns: 1fr; }
  .bar { grid-template-columns: 120px 1fr 36px; } .obj { grid-template-columns: 1fr; gap: 6px; }
  .htable td:first-child { width: auto; }
}

/* Kargo360 page accents: peach heading highlight, red footer */
body.kargo h2.hl { background: #fcc8a3; }
body.kargo .zig { background: conic-gradient(from 135deg at 50% 0%, #ee4a4a 90deg, #0000 0) 0 0 / 64px 30px repeat-x; margin-top: 0; }
body.kargo .cs-footer { background: #ee4a4a; }
body.kargo .foot-row { border-top-color: rgba(255, 255, 255, 0.35); color: #ffe3e3; }
body.kargo .foot-row a, body.kargo .next-label span { color: #ffe3e3; }
body.kargo .closing { margin-top: 110px; }
.stats.divided .stat { padding-left: 22px; border-left: 3px solid #e02020; }
.stats.divided .stat:first-child { padding-left: 0; border-left: 0; }
.audit { margin-top: 36px; background: #fff; border: 1px solid #e2e0d9; padding: 26px 30px 30px; }
.audit .kicker { margin-top: 0; padding-left: 12px; border-left: 3px solid; }
.audit .kicker + .arow { margin-top: 6px; }
.audit .kicker.sev-s { border-color: #f0930d; color: #f0930d; }
.arow { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 14px 16px; margin-top: 10px; border: 1px solid #ecebe6; font-size: 13.5px; line-height: 1.5; color: #55534c; }
.arow b { color: #1c1c1c; }
.audit .kicker:nth-of-type(2) { margin-top: 30px; }
h3.green { color: #2e7d32; }
