/* =====================================================================
   CASE STUDY, Awake layout (black theme). Built by tools/case_awake.py.
   Huge name + accent stop, intro, facts row, big rounded image tiles,
   LABEL + headline | paragraphs sections, Next case, More projects.
   ===================================================================== */
.k-case main { overflow-x: clip; }
.k-wrap { width: min(1120px, 100% - 2 * var(--gutter)); margin: 0 auto; }
.k-row { width: min(1400px, 100% - 40px); margin: var(--space-8) auto 0; }

/* hero */
.k-hero { padding: var(--space-12) 0 0; }
.k-title { margin: var(--space-6) 0 0; font: 600 clamp(3.25rem, 7.4vw, 7rem)/1 var(--display); letter-spacing: -.045em; color: #fff; }
.k-title .dot, .k-next-title .dot { color: var(--blue); }
.k-intro { margin: var(--space-8) 0 0; max-width: 62ch; color: var(--muted); font-size: 1.0625rem; line-height: 1.6; }
.k-intro .k-line { color: #fff; }
.k-meta { display: flex; flex-wrap: wrap; gap: var(--space-6) var(--space-12); margin: var(--space-10, 40px) 0 0; }
.k-meta dt { color: var(--muted); font: 500 .75rem/1 var(--text); letter-spacing: .08em; text-transform: uppercase; }
.k-meta dd { margin: 8px 0 0; color: #fff; font-size: 1.125rem; line-height: 1.35; }
.k-meta dd a.u { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.k-hero-media { margin-top: var(--space-12); }
.k-sum { margin-top: var(--space-8); }

/* tiles */
.k-tile { position: relative; isolation: isolate; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 28px;
  background: radial-gradient(90% 80% at 50% 0%, #17224a 0%, #0d1328 45%, #0a0d18 100%); border: 1px solid #141a2b; }
.k-tile.herotile, .k-tile.wide { aspect-ratio: 16 / 9; }
.k-tile.lineup { aspect-ratio: 2 / 1; }
.k-shot img { display: block; width: 86%; height: auto; max-height: 86%; object-fit: contain; border-radius: 12px; box-shadow: 0 50px 90px -40px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.06); transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.k-tile:hover img { transform: scale(1.015); }
.k-video video { display: block; max-width: 92%; max-height: 90%; border-radius: 14px; }
.k-render::before { content: ""; position: absolute; inset: 10% 15%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(139,92,246,.35), rgba(39,118,239,.16) 55%, transparent 100%); filter: blur(30px); }
.k-render img { display: block; width: auto; height: 88%; max-width: 92%; object-fit: contain; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.k-render.lineup img { height: auto; width: 94%; }
.k-pair { width: min(1400px, 100% - 40px); margin: 30px auto 0; display: grid; grid-template-columns: 1.42fr 1fr; gap: 30px; }
.k-pair.flip { grid-template-columns: 1fr 1.42fr; }
.k-pair .k-tile { min-height: clamp(300px, 40vw, 600px); }
.k-pair .k-shot img { width: 88%; }
.k-row + .k-pair, .k-pair + .k-row, .k-pair + .k-pair { margin-top: 30px; }

/* sections */
.k-sec { padding-top: var(--space-24, 96px); }
.k-text { width: min(1040px, 100% - 2 * var(--gutter)); margin: 0 auto var(--space-12); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: var(--space-12); align-items: start; }
.k-text.k-more { margin-top: var(--space-12); }
.k-label { display: block; color: var(--muted); font: 500 .75rem/1 var(--text); letter-spacing: .08em; text-transform: uppercase; }
.k-head h2 { margin: var(--space-4) 0 0; font: 600 clamp(1.75rem, 1.6vw + 1.1rem, 2.75rem)/1.12 var(--display); letter-spacing: -.025em; color: #fff; }
.k-copy > p { margin: 0 0 var(--space-5, 20px); color: #d3d9e4; font-size: 1.125rem; line-height: 1.62; }
.k-copy > p:last-child { margin-bottom: 0; }
.k-copy > p.big { color: #fff; font: 500 clamp(1.25rem, .8vw + 1rem, 1.6rem)/1.45 var(--display); letter-spacing: -.01em; }
.k-copy .pullquote { margin: 0 0 var(--space-6); }
.k-block { width: min(1120px, 100% - 2 * var(--gutter)); margin: var(--space-8) auto 0; }
.k-block > * { margin-top: 0 !important; }
.k-block > .ia-fig, .k-block > .onb-fig { margin-left: 0 !important; width: auto !important; }
.k-tall { width: min(1040px, 100% - 2 * var(--gutter)); }
.k-sec > .k-row:first-of-type, .k-sec > .k-pair:first-of-type { margin-top: var(--space-12); }

/* next case */
.k-next { padding: calc(var(--space-24, 96px) * 1.4) 0 var(--space-12); }
.k-next-link { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); margin-top: var(--space-4); color: #fff; text-decoration: none; }
.k-next-title { font: 600 clamp(3rem, 7.4vw, 7rem)/1 var(--display); letter-spacing: -.045em; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.k-next-btn { flex: none; display: grid; place-items: center; width: clamp(64px, 7vw, 96px); aspect-ratio: 1; border-radius: 50%; background: var(--blue); color: #fff; transition: transform .5s cubic-bezier(.2,.7,.2,1), background .3s; }
.k-next-btn svg { width: 40%; height: 40%; }
.k-next-link:hover .k-next-btn { transform: rotate(45deg) scale(1.05); }
.k-next-link:hover .k-next-title { transform: translateX(8px); }
.k-next-type { margin: var(--space-4) 0 0; color: var(--muted); font-size: .9375rem; }

/* more projects */
.k-more { padding: var(--space-16) 0 var(--space-24, 96px); }
.k-more-title { margin: 0 0 var(--space-8); font: 600 clamp(2.25rem, 5.6vw, 5.5rem)/1 var(--display); letter-spacing: -.04em; text-transform: uppercase; color: #fff; }
.k-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid #1a2030; }
.k-list a { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); min-height: 64px; padding: var(--space-4) 0; border-bottom: 1px solid #1a2030; color: #fff; text-decoration: none; }
.k-list .m-name { font: 600 clamp(1.25rem, 1vw + 1rem, 1.75rem)/1.2 var(--display); letter-spacing: -.02em; transition: transform .35s cubic-bezier(.2,.7,.2,1), color .25s; }
.k-list .m-type { color: var(--muted); font-size: .9375rem; text-align: right; }
.k-list a:hover .m-name { transform: translateX(8px); color: #8fb2ff; }
.k-viewall { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; margin-top: var(--space-6); color: #fff; font: 500 .8125rem/1 var(--text); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.k-viewall svg { width: 16px; height: 16px; }

@media (max-width: 1024px) {
  .k-text { grid-template-columns: 1fr; gap: var(--space-5, 20px); }
  .k-text.k-more > div:first-child { display: none; }
}
@media (max-width: 760px) {
  .k-row, .k-pair { width: calc(100% - 24px); }
  .k-pair, .k-pair.flip { grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
  .k-row + .k-pair, .k-pair + .k-row, .k-pair + .k-pair { margin-top: 12px; }
  .k-pair .k-tile { min-height: 0; aspect-ratio: 4 / 3; }
  .k-tile { border-radius: 20px; }
  .k-tile.herotile.k-render, .k-tile.wide.k-render { aspect-ratio: 4 / 5; }
  .k-tile.lineup { aspect-ratio: auto; padding: var(--space-4) 0; }
  .k-shot img { width: 90%; }
  .k-meta { gap: var(--space-5, 20px) var(--space-8); }
  .k-sec { padding-top: var(--space-16); }
  .k-list a { flex-direction: column; gap: 4px; align-items: flex-start; }
  .k-list .m-type { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .k-shot img, .k-render img, .k-next-title, .k-next-btn, .k-list .m-name { transition: none; } }
/* tiles take the container width; renders are positioned inside so their natural size never drives the tile */
.k-tile { width: 100%; min-width: 0; }
.k-render img { position: absolute; inset: 0; margin: auto; width: 92%; height: 88%; max-width: none; object-fit: contain; }
.k-render.lineup img { position: static; width: 94%; height: auto; }
.k-pair .k-render img { height: 84%; }
@media (max-width: 760px) { .k-render.lineup img { width: 100%; } }
.k-meta dd a.u { display: inline-flex; align-items: center; min-height: 44px; margin: -12px 0; }

/* =====================================================================
   MANYPIXELS-STYLE MOCKUPS: bright flat brand tiles with a soft swoosh,
   full pages in a Safari window, collages as floating cards
   ===================================================================== */
.k-tile { background: var(--tile, #bfe3fb); border: 0; }
.k-tile::after { content: ""; position: absolute; z-index: 0; inset: auto -10% -35% 35%; height: 85%; border-radius: 50%; border: clamp(18px, 3vw, 44px) solid rgba(255,255,255,.28); transform: rotate(-12deg); pointer-events: none; }
.k-tile > * { position: relative; z-index: 1; }
.k-render::before { display: none; }
.k-render img { position: absolute; z-index: 1; }
.k-render img { filter: drop-shadow(0 30px 40px rgba(20,24,40,.22)); }

/* Safari window */
.bw { width: 84%; max-height: 88%; display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 40px 80px -30px rgba(20,24,40,.45); transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.k-tile:hover .bw { transform: translateY(-4px); }
.bw-bar { flex: none; display: grid; grid-template-columns: 1fr minmax(0, 2.2fr) 1fr; align-items: center; height: clamp(26px, 2.6vw, 38px); padding: 0 clamp(10px, 1.2vw, 16px); background: #f5f5f7; border-bottom: 1px solid #e3e3e8; }
.bw-dots { display: flex; gap: 6px; }
.bw-dots i { width: clamp(8px, .8vw, 11px); aspect-ratio: 1; border-radius: 50%; background: #ff5f57; }
.bw-dots i:nth-child(2) { background: #febc2e; } .bw-dots i:nth-child(3) { background: #28c840; }
.bw-url { display: flex; align-items: center; justify-content: center; gap: 6px; height: 64%; border-radius: 7px; background: #e8e8ed; color: #3c3c43; font: 500 clamp(9px, .8vw, 12px)/1 var(--text); white-space: nowrap; overflow: hidden; }
.bw-url svg { width: 1em; height: 1em; color: #8e8e93; }
.bw-act { display: flex; justify-content: flex-end; gap: 8px; }
.bw-act i { width: clamp(9px, .9vw, 13px); aspect-ratio: 1; border-radius: 3px; border: 1.6px solid #b5b5bb; }
.k-tile .bw img { position: static; display: block; width: 100%; height: auto; max-height: none; min-height: 0; flex: 1 1 auto; object-fit: cover; object-position: top center; border-radius: 0; box-shadow: none; transform: none !important; }
.k-pair .bw { width: 88%; }
.herotile .bw { width: 78%; }

/* floating cards (collages, composites) */
.k-card img { border-radius: 14px; box-shadow: 0 0 0 1px rgba(0,0,0,.05), 0 40px 80px -30px rgba(20,24,40,.45); }
.k-video video { box-shadow: 0 40px 80px -30px rgba(20,24,40,.45); }

/* tall pages: show the top of the page in the window, like a real browser viewport */
.k-tall { width: min(1400px, 100% - 40px); }
.k-tall > .shot.tall { max-height: none; overflow: visible; padding: clamp(28px, 5vw, 80px) 0; display: flex; justify-content: center; border-radius: 28px; background: var(--tile, #fde5a3); position: relative; overflow: hidden; }
.k-tall > .shot.tall img { width: 70%; max-height: 900px; object-fit: cover; object-position: top; border-radius: 14px; box-shadow: 0 40px 80px -30px rgba(20,24,40,.45); }
@media (max-width: 760px) {
  .bw, .k-pair .bw, .herotile .bw { width: 90%; border-radius: 10px; }
  .bw-act { display: none; } .bw-bar { grid-template-columns: auto 1fr; gap: 10px; }
  .k-tall > .shot.tall img { width: 88%; max-height: 520px; }
}
/* photo-real lifestyle renders fill their tile edge to edge */
.k-photo { background: #1a1a1a; }
.k-photo::after { content: none; }
.k-tile.k-photo img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; border-radius: 0; box-shadow: none; }
.k-pair .k-photo { aspect-ratio: auto; }

/* front-facing device comps (case_mockups.py): baked at the tile's aspect, so they fill it edge to edge */
.k-comp img { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; border-radius: 0; box-shadow: none; }
.k-tile.k-comp:hover img { transform: none; }
.k-comp.lineup { aspect-ratio: 2 / 1; }
@media (max-width: 760px) { .k-tile.k-comp.herotile, .k-tile.k-comp.wide { aspect-ratio: 16 / 9; } .k-tile.k-comp.lineup { aspect-ratio: 2 / 1; padding: 0; } }

/* MeetSession flow map, rebuilt as a native diagram in four stages */
.ms-flow .ia-stage + .ia-stage { margin-top: var(--space-8, 32px); padding-top: var(--space-8, 32px); border-top: 1px dashed #1f2637; }
.ms-flow .ia-step { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-right: 10px; border-radius: 50%; background: var(--blue); color: #fff; font: 700 .75rem/1 var(--display); vertical-align: middle; }
.ms-flow .ia-stage-t { display: inline; margin: 0; color: #fff; font: 700 1rem/1.3 var(--display); letter-spacing: -.01em; vertical-align: middle; }
.ms-flow .ia-entry { margin-top: var(--space-4); }
.ia-fig .pill.q { border-style: dashed; border-color: #5b8def; color: #cfe0ff; background: rgba(39,118,239,.08); }
.ms-flow .ia-branch h3 { font-size: .8125rem; }
.ia-branches.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .ia-branches.cols-3 { grid-template-columns: 1fr; } }

/* his own finished tiles: shown whole, at their own shape, equal columns */
.k-tile.flat { background: transparent; border-radius: 0; overflow: hidden; }
.k-tile.flat::before, .k-tile.flat::after { display: none; }
.k-comp.flat img { object-fit: contain; }
.k-pair.flat { grid-template-columns: 1fr 1fr; }
.k-pair.flat .k-tile { min-height: 0; }
@media (max-width: 760px) { .k-pair.flat { grid-template-columns: 1fr; } }

.k-more-shots { margin-top: var(--space-16); }

/* About and Résumé */
.info-hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--space-12); align-items: center; }
.info-title { font-size: clamp(2.4rem, 6vw, 5rem); line-height: 1.02; }
.info-photo { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 28px; }
.info-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.info-actions .btn { border-radius: 12px; }
.cv-list { display: grid; gap: var(--space-4); }
.cv-role { padding: var(--space-6); border: 1px solid #1f2637; border-radius: 20px; background: #0b0f1a; }
.cv-role h3 { margin: 0; font-size: 1.25rem; }
.cv-org { margin: var(--space-1) 0 var(--space-3); color: var(--muted); font-size: .9375rem; }
.cv-role ul { margin: 0; padding-left: 1.1em; display: grid; gap: var(--space-2); }
.cv-role p:last-child { margin-bottom: 0; }
.chips + .chips { margin-top: var(--space-4); }
@media (max-width: 760px) { .info-hero { grid-template-columns: 1fr; } .info-photo { max-width: 360px; } }
/* Résumé: each role leads with the company's logo on a tile in its brand colour */
.cv-head { display: flex; align-items: center; gap: 24px; margin-bottom: 20px; }
.cv-head .cv-org { margin-bottom: 0; }
.cv-head h3 { font-size: 1.375rem; }
.cv-logo { --c1: #1b2333; --c2: #0d121d; --glow: rgba(255,255,255,.10);
  position: relative; isolation: isolate; overflow: hidden; flex: 0 0 200px; height: 112px; display: grid; place-items: center; padding: 22px 26px;
  border-radius: 20px; background: linear-gradient(140deg, var(--c1), var(--c2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), inset 0 0 0 1px rgba(255,255,255,.06), 0 18px 40px -18px var(--glow);
  transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s; }
.cv-logo::before { content: ""; position: absolute; z-index: -1; inset: -40% -20% auto auto; width: 75%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent); }
.cv-logo::after { content: ""; position: absolute; z-index: -1; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.08), transparent 45%); }
.cv-logo img { max-width: 100%; max-height: 40px; width: auto; height: auto; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(0,0,0,.35)); }
.cv-role:hover .cv-logo { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 0 0 1px rgba(255,255,255,.08), 0 24px 48px -16px var(--glow); }
.cv-wordmark { font: 600 1.25rem/1.1 var(--display, inherit); color: #fff; text-align: center; letter-spacing: -.02em; }
.cv-afrilabs { --c1: #0e5a7d; --c2: #052c40; --glow: rgba(232,176,72,.38); }
.cv-devon    { --c1: #3a3f9e; --c2: #14163f; --glow: rgba(120,128,255,.40); }
.cv-slate    { --c1: #2050c8; --c2: #0d1f5c; --glow: rgba(90,150,255,.42); }
.cv-axao     { --c1: #3b3d42; --c2: #0c0d10; --glow: rgba(220,224,232,.28); }
.cv-oroko    { --c1: #3d2a10; --c2: #120c04; --glow: rgba(232,150,40,.40); }
.cv-helix    { --c1: #1f5c57; --c2: #0a2422; --glow: rgba(80,220,200,.32); }
.cv-afrilabs img { max-height: 42px; }
.cv-slate img { max-height: 44px; }
.cv-oroko img { max-height: 32px; }
@media (max-width: 560px) { .cv-head { flex-direction: column; align-items: flex-start; gap: 16px; } .cv-logo { flex-basis: auto; width: 100%; height: 104px; } }
@media (prefers-reduced-motion: reduce) { .cv-logo { transition: none; } }
