/* CANDEV case-study pages: shares tokens and shell with the homepage. */
/* Inter, self-hosted and subset. See tools/fonts.mjs. */
  @font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url(/fonts/inter-latin.woff2?v=1) format('woff2');
    unicode-range: U+0020-007E, U+00A0-00FF, U+0152-0153, U+0160-0161, U+0178,
                   U+017D-017E, U+2010-2015, U+2018-201F, U+2022, U+2026,
                   U+2032-2033, U+20AC, U+2122, U+2190-2192, U+2212;
  }
:root { --ink: #131026; --ink-80: rgba(19,16,38,.8); --ink-60: rgba(19,16,38,.62); --ink-20: rgba(19,16,38,.2); --ink-10: rgba(19,16,38,.1); --ink-05: rgba(19,16,38,.05); --panel: #f7f9fb; --accent: #933cf9; --deep: #4709bd; --pale: #efe6fd; --ice: #f6f3fd; --blob-a: #d9c2fb; --blob-b: #b1e3ff; --r-sm: 8px; --r-md: 16px; --r-lg: 24px; --r-pill: 80px; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--ink); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.02em; }
img { display: block; max-width: 100%; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(24px, 6vw, 80px); }
.wrap-tight { max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 28px); }
.accent { color: var(--accent); }
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.topbar header { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: inline-flex; align-items: center; }
.logo svg { display: block; height: 22px; width: auto; overflow: visible; }
/* animated logo: pen-drawn chevrons, letters slide out, one sheen */
.logo-svg { --dur-draw: .38s; --ease: cubic-bezier(.2, .8, .2, 1); }

/* chevron pen-strokes: lines inside masks, dashoffset 1 -> 0 (pathLength=1) */
.logo .draw {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: draw var(--dur-draw) cubic-bezier(.4, 0, .2, 1) forwards;
}
.logo .d1 { animation-delay: .05s; }   /* A thin leg, up   */
.logo .d2 { animation-delay: .29s; }   /* A thick leg, down: starts as the thin leg reaches the apex */
.logo .d3 { animation-delay: .05s; }   /* V thick leg, down */
.logo .d4 { animation-delay: .29s; }   /* V thin leg, up: starts as the thick leg reaches the curl */
@keyframes draw { to { stroke-dashoffset: 0; } }

/* dark letters: wipe + slide out from behind the nearest chevron */
.logo .ltr {
  opacity: 0;
  animation: reveal .55s var(--ease) forwards;
}
.logo .from-right { clip-path: inset(0 0 0 100%); transform: translateX(34px); }
.logo .from-left  { clip-path: inset(0 100% 0 0); transform: translateX(-34px); }
.logo .lC { animation-delay: .62s; }
.logo .lN { animation-delay: .68s; }
.logo .lD { animation-delay: .78s; }
.logo .lE { animation-delay: .82s; }
@keyframes reveal {
  to { opacity: 1; clip-path: inset(0 0 0 0); transform: translateX(0); }
}

/* one gradient sheen across the two chevrons once everything has landed */
.logo .sheen {
  transform: translateX(-260px);
  animation: sheen .9s cubic-bezier(.3, 0, .2, 1) 1.15s forwards;
}
@keyframes sheen { to { transform: translateX(760px); } }

@media (prefers-reduced-motion: reduce) {
  .logo .draw { animation: none; stroke-dashoffset: 0; }
  .logo .ltr  { animation: none; opacity: 1; clip-path: none; transform: none; }
  .logo .sheen { animation: none; opacity: 0; }
}
.nav { display: flex; gap: 28px; font-size: 14px; color: var(--ink-80); }
.nav a:hover { text-decoration: underline; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 0 28px; border-radius: var(--r-sm); font-size: 16px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background-color .2s ease, border-color .2s ease; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--deep); }
.btn-sm { height: 44px; padding: 0 20px; font-size: 14px; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--pale); }
.btn .sm { display: none; }
.hero-wrap { padding-top: 8px; }
.hero { position: relative; overflow: hidden; background: var(--ice); border-radius: var(--r-lg); padding: clamp(32px, 5vw, 64px) clamp(24px, 5vw, 56px); display: flex; flex-direction: column; gap: 20px; }
.blob { position: absolute; border-radius: 80px; pointer-events: none; filter: blur(90px); }
.hero .blob-a { width: 520px; height: 520px; left: -200px; top: -220px; background: var(--blob-a); }
.hero .blob-b { width: 480px; height: 480px; right: -160px; bottom: -240px; background: var(--blob-b); }
.hero > :not(.blob) { position: relative; }
/* The crumbs sit on the --blob-a wash, where --ink-60 is only 4.35:1 against
   12px text. --ink-80 clears the 4.5 floor with room to spare. */
.crumbs { display: flex; gap: 8px; font-size: 12px; font-weight: 600; color: var(--ink-80); }
.crumbs a:hover { text-decoration: underline; }
/* --accent is 3.07:1 on the --blob-a wash these eyebrows sit on. --deep clears
   4.5 against the blob, white and --pale alike. */
.eyebrow { font-size: 14px; font-weight: 600; color: var(--deep); }
.hero h1 { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.05; text-wrap: balance; max-width: 820px; }
.lede { font-size: 17px; line-height: 1.55; color: var(--ink-80); max-width: 680px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 16px; margin-top: 8px; }
.stat { background: #fff; border-radius: var(--r-md); padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 1px 2px rgba(19,16,38,.05); }
.stat b { font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; color: var(--accent); }
.stat span { font-size: 12px; line-height: 1.45; color: var(--ink-60); }
.article { display: grid; grid-template-columns: minmax(0, 720px); justify-content: start; gap: 56px; padding: 72px 0 0; }
.block { display: flex; flex-direction: column; gap: 16px; }
.block h2 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.15; }
.block p, .block li { font-size: 16px; line-height: 1.65; color: var(--ink-80); }
.block ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.role { background: var(--panel); border-radius: var(--r-md); padding: 20px 24px; font-size: 15px; line-height: 1.6; }
.role strong { color: var(--ink); font-weight: 600; }
.diagram-wrap { padding-top: 56px; }
.diagram { background: var(--panel); border-radius: var(--r-lg); padding: clamp(16px, 3vw, 32px); overflow-x: auto; }
.diagram svg { display: block; width: 100%; min-width: 760px; height: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--ink-60); padding-top: 12px; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; border: 1.5px solid rgba(19,16,38,.18); background: #f7f9fb; }
.legend i.o { background: var(--pale); border-color: var(--accent); }
.legend i.h { background: #fff; border-color: var(--accent); border-style: dashed; }
.steps { margin-top: 12px; background: var(--panel); border-radius: var(--r-md); padding: 6px 28px; }
.step { display: grid; grid-template-columns: 30px 170px minmax(0, 1fr); column-gap: 20px; align-items: start; padding: 20px 0; border-top: 1px solid var(--ink-06); }
.step:first-child { border-top: 0; }
.step i { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; font-style: normal; }
.step b { font-size: 15px; font-weight: 600; line-height: 1.3; padding-top: 5px; }
.step p { font-size: 14px; line-height: 1.55; color: var(--ink-80); max-width: 640px; padding-top: 4px; }
@media (max-width: 640px) { .steps { padding: 4px 20px; } .step { grid-template-columns: 30px minmax(0, 1fr); column-gap: 14px; row-gap: 6px; padding: 16px 0; } .step p { grid-column: 2; padding-top: 0; } }
.results { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; }
.results th, .results td { text-align: left; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--ink-10); vertical-align: top; line-height: 1.45; }
.results th { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-60); }
.results td.after { font-weight: 600; color: var(--accent); }
.results td.win { color: var(--ink-60); font-size: 13px; }
.table-wrap { overflow-x: auto; }
.note { font-size: 14px; line-height: 1.6; color: var(--ink-60); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: var(--r-pill); background: var(--panel); color: var(--ink-80); }
.more-wrap { padding-top: 72px; }
.more { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.more a { display: flex; flex-direction: column; gap: 8px; background: var(--panel); border-radius: var(--r-md); padding: 22px; transition: transform .25s ease, box-shadow .25s ease; }
.more a:hover { transform: translateY(-3px); box-shadow: 0 16px 40px -20px rgba(19,16,38,.25); }
.more .num { font-size: 12px; font-weight: 600; color: var(--accent); }
.more .t { font-size: 17px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.more .d { font-size: 13px; color: var(--ink-60); }
.cta-wrap { margin-top: 72px; }
.cta { position: relative; overflow: hidden; background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: clamp(40px, 6vw, 64px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 32px; align-items: center; }
.cta .blob { width: 420px; height: 420px; right: -120px; top: -200px; background: var(--accent); opacity: .55; filter: blur(80px); }
.cta .copy { position: relative; display: flex; flex-direction: column; gap: 12px; }
.cta .title { font-size: clamp(28px, 3vw, 40px); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; text-wrap: balance; }
.cta .sub { font-size: 14px; line-height: 1.55; color: rgba(255,255,255,.75); max-width: 480px; }
.cta .actions { position: relative; display: flex; justify-content: flex-end; }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 28px 0 40px; margin-top: 40px; border-top: 1px solid var(--ink-10); font-size: 12px; color: var(--ink-60); }
footer .brand { display: inline-flex; align-items: center; gap: 12px; }
footer .brand img { height: 14px; width: auto; opacity: .6; }
footer nav { display: flex; gap: 16px; }
footer a:hover { text-decoration: underline; }
@media (max-width: 760px) { .nav { display: none; } .cta .actions { justify-content: flex-start; } }
@media (max-width: 480px) { .btn .lg { display: none; } .btn .sm { display: inline; } .logo svg { height: 20px; } }
