/* ---------- Tokens ----------
   Dark, iOS-like: pure black page, flat neutral surfaces with no strokes,
   and color reserved for cards. */
:root {
  --bg: #000;
  --surface: #111113;        /* neutral cards, grouped lists */
  --surface-2: #1C1C1E;      /* secondary buttons, chips */
  --surface-3: #2A2A2D;      /* hover */
  --text: #FFFFFF;
  --muted: rgba(255, 255, 255, .5);
  --soft: rgba(255, 255, 255, .62);
  --faint: rgba(255, 255, 255, .4);
  --sep: rgba(255, 255, 255, .08); /* hairline separators inside a surface */
  --green: #40D980;
  --cream: #FBF8F0;
  --r-card: 16px;
  --r-big: 24px;
  /* Card colors: deeper at the top (text), lighter at the bottom (visual) */
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.6 -.55'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --wd: 0; /* weight offset, see .win */
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --grotesk: "Schibsted Grotesk", var(--sans);
  --wrap: 1200px;
  --gutter: 120px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* Windows renders light text on dark noticeably heavier (no grayscale smoothing):
   every weight is lowered a little there so it reads like Figma / macOS. */
.win { --wd: 50; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: calc(400 - var(--wd));
  font-size: 16px;
  line-height: 1.5;
  font-optical-sizing: none; /* the "display" cut is narrower and would change the Figma line breaks */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, h4, ol, ul, figure, blockquote { margin: 0; }
button { font: inherit; color: inherit; }

.wrap { width: min(var(--wrap), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.muted { color: var(--muted); }

/* ---------- Type ---------- */
/* Big titles use a light weight: browser text renders heavier than Figma */
.sec-head {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  max-width: 680px; margin: 0 auto 56px; text-align: center;
}
.sec-head--last { margin-bottom: 0; }
/* Home (Figma): 8px title → subtitle, 32px heading → content (24px on mobile) */
.home .sec-head { margin-bottom: 32px; gap: 8px; }
@media (max-width: 760px) { .home .sec-head { margin-bottom: 24px; } }
.sec-title { font-size: 38px; line-height: 1.12; letter-spacing: -0.025em; font-weight: calc(500 - var(--wd)); text-wrap: balance; }
.sec-sub { font-size: 20px; line-height: 1.42; color: var(--muted); max-width: 640px; text-wrap: balance; }
.sec-sub .hi { color: rgba(255, 255, 255, .92); }
.sec-note { margin-top: 32px; text-align: center; font-size: 16px; line-height: 1.55; color: var(--faint); text-wrap: balance; }
.sec-body { font-size: 15px; line-height: 1.55; color: var(--faint); max-width: 540px; text-wrap: pretty; }

/* Used inside case chapters and the "next project" tile */
.headline { font-size: 25px; line-height: 1.2; letter-spacing: -0.015em; font-weight: calc(400 - var(--wd)); }
.headline .muted { display: block; }
.body { font-size: 16px; line-height: 1.55; color: var(--muted); max-width: 592px; }
.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--faint);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 46px; padding: 0 18px 0 22px;
  border: 0; border-radius: 999px;
  font-size: 14px; font-weight: calc(500 - var(--wd));
  transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.btn svg { flex: none; }
.btn:active { transform: scale(.97); }
.btn--solid { background: #fff; color: #000; }
.btn--solid:hover { background: rgba(255, 255, 255, .86); }
.btn--ghost { background: var(--surface-2); padding: 0 20px 0 18px; }
.btn--ghost:hover { background: var(--surface-3); }
.btn--lg { height: 48px; font-size: 15px; padding: 0 20px 0 24px; }
/* Figma "Get in touch" blue + outlined resume button */
.btn--blue { background: linear-gradient(135deg, #2440E8 0%, #5B7BFF 100%); color: #fff; transition: transform .2s var(--ease), filter .2s var(--ease); }
.btn--blue:hover { filter: brightness(1.1); }
/* Figma "Button · Get in touch": light grey grainy gradient (mesh "btnWhite" built by main.js) */
.btn--white { position: relative; isolation: isolate; overflow: hidden; padding: 0 22px; background: #E6E6E6; color: #000; transition: transform .2s var(--ease), filter .2s var(--ease); } /* label only, no icon: even padding */
.btn--white > .mesh { z-index: -1; border-radius: inherit; }
/* Hover: the light pill dims a touch (a brighter white would not show on an already light button) */
.btn--white:hover { filter: brightness(.9); }
/* Figma: icon on the left → 22px before the icon, 18px after the label (top right bottom left) */
.btn--icon-left { padding: 0 18px 0 22px; }
/* LinkedIn: outlined pill, no fill, with the white LinkedIn mark (18px left, 20px right, 8px gap) */
.btn--linkedin { padding: 0 20px 0 18px; gap: 8px; background: none; }
.btn--linkedin:hover { background: rgba(255, 255, 255, .05); }
/* LinkedIn mark on its own, no coloured badge behind it */
.btn__badge { flex: none; display: grid; place-items: center; width: 16px; height: 16px; }
.btn__badge svg { display: block; width: 15px; height: auto; }
.btn--outline { padding: 0 20px 0 18px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); color: #fff; }
.btn--outline:hover { background: rgba(255, 255, 255, .06); }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.link { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: calc(500 - var(--wd)); color: rgba(255, 255, 255, .92); transition: color .2s var(--ease); }
.link span { transition: transform .25s var(--ease-out); }
.link:hover { color: #fff; }
.link:hover span { transform: translateX(3px); }

/* ---------- Nav ---------- */
/* Full-width bar stuck to the top. At the top of the page it is fully transparent (no background, line or
   sheen); the liquid glass fades in once the page scrolls (.is-scrolled, set in main.js).
   Links are capsules; the row is the content width + 32px so the labels line up with the grid. */
.nav {
  --nav-h: 60px;
  position: sticky; top: 0; z-index: 10;
  background: rgba(21, 21, 21, 0);
  -webkit-backdrop-filter: blur(0) saturate(100%) brightness(1); backdrop-filter: blur(0) saturate(100%) brightness(1);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0);
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease), backdrop-filter .4s var(--ease), -webkit-backdrop-filter .4s var(--ease);
}
/* Soft sheen on the upper half of the glass, only when scrolled */
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0;
  background: linear-gradient(rgba(255, 255, 255, .05), rgba(255, 255, 255, 0) 60%);
  transition: opacity .4s var(--ease);
}
.nav.is-scrolled {
  background: rgba(21, 21, 21, .65);
  -webkit-backdrop-filter: blur(16px) saturate(190%) brightness(1.08); backdrop-filter: blur(16px) saturate(190%) brightness(1.08);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .05), 0 12px 32px -16px rgba(0, 0, 0, .6);
}
.nav.is-scrolled::before { opacity: 1; }
.nav__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: min(calc(var(--wrap) + 32px), calc(100% - 2 * var(--gutter) + 32px)); height: var(--nav-h);
}
.nav__links { display: flex; gap: 4px; }
.nav__links a {
  display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px; color: var(--soft);
  font-size: 16px; font-weight: 300; /* Light; no Windows offset, Inter is loaded from 300 */
  transition: background-color .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
}
.nav__links a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav__links a[aria-current="page"] {
  color: #fff; background: rgba(255, 255, 255, .05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
.nav__links a:focus-visible { outline-offset: 0; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 88px; display: flex; flex-direction: column; align-items: flex-start; gap: 28px; } /* the only left-aligned block */
.hero__title { font-size: 34px; line-height: 1.15; letter-spacing: -0.025em; font-weight: calc(400 - var(--wd)); }
.hero__name { display: block; font-size: 64px; line-height: 1.05; letter-spacing: -0.035em; font-weight: calc(500 - var(--wd)); margin-bottom: 12px; }
.hero__role { display: block; color: var(--muted); }
.status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 12px; border-radius: 999px;
  font-size: 13px; color: rgba(255, 255, 255, .75);
}
.status__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(64, 217, 128, .45); } 70% { box-shadow: 0 0 0 7px rgba(64, 217, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(64, 217, 128, 0); } }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- About ---------- */
.about { display: flex; justify-content: space-between; align-items: flex-start; gap: 72px; padding: 104px 0 88px; }
.about__text { flex: 0 1 825px; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.about__title { font-size: 40px; line-height: 1.2; letter-spacing: -0.025em; font-weight: calc(500 - var(--wd)); }
.about__title > span:not(.w) { font-weight: calc(400 - var(--wd)); color: var(--muted); }
.about__body { display: flex; flex-direction: column; gap: 16px; font-size: 18px; line-height: 1.55; color: var(--muted); }
.about__body strong { font-weight: inherit; color: #fff; }
/* photo in a hairline frame, like the case hero visual */
.about__photo { flex: none; width: 200px; padding: 6px; border-radius: 16px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.about__photo img { display: block; width: 100%; height: auto; border-radius: 12px; }

/* Facts: four plain resume columns */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; padding: 8px 0 104px; }
.facts__col { display: flex; flex-direction: column; gap: 28px; }
.facts__group h2 { margin-bottom: 8px; font-size: 14px; line-height: 1.6; letter-spacing: .04em; text-transform: uppercase; font-weight: calc(500 - var(--wd)); }
.facts__group ul { list-style: none; display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; font-size: 15px; line-height: 1.6; color: var(--muted); }
.facts__group b { font-weight: calc(400 - var(--wd)); color: rgba(255, 255, 255, .95); }
.facts__group a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .5); transition: text-decoration-color .2s; }
.facts__group a:hover { text-decoration-color: #fff; }

/* ---------- Case studies ----------
   Each project is a scene: the card comes into focus as it reaches the middle of the
   screen and the caption drifts a little slower (main.js, Motion scroll()).
   Cards alternate sides. */
.work { display: flex; flex-direction: column; padding-bottom: 24px; }
.work__item { position: relative; display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); align-items: center; gap: 64px; padding-block: 40px; }
.work__item:nth-child(even) { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
.work__item:nth-child(even) .work__media { order: 2; }
/* The first scene starts right under the hero */
.work__item:first-child { padding-top: 0; }
/* The card grows from its outer edge, so that edge stays on the text grid while it scales */
.work__media { transform-origin: 0 50%; }
.work__item:nth-child(even) .work__media { transform-origin: 100% 50%; }
/* Card = live gradient (760x480 in Figma) + mockup placed at 70,65 / 620x350 */
.showcase__card { position: relative; display: block; aspect-ratio: 760 / 480; border-radius: var(--r-big); overflow: hidden; isolation: isolate; }
.showcase__mockup {
  position: absolute; left: 9.21%; top: 13.54%; width: 81.58%; height: auto;
  border-radius: 10px; box-shadow: 0 24px 48px rgba(0, 0, 0, .4);
  transition: box-shadow .8s var(--ease-out); /* the lift itself is a Motion spring (main.js) */
}
.showcase__card:hover .showcase__mockup { box-shadow: 0 34px 70px rgba(0, 0, 0, .48); }
.work__caption { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding: 0 4px; }
/* Caption: the role at the company as the title, the project in one line under it */
.work__head { display: flex; flex-direction: column; gap: 12px; max-width: 380px; }
.work__title { font-size: 30px; line-height: 1.15; letter-spacing: -0.02em; font-weight: calc(500 - var(--wd)); text-wrap: balance; }
.work__sub { font-size: 18px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }

/* ---------- Live grainy gradients (built by main.js from the Figma blobs) ---------- */
.mesh { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: var(--mesh-base, #0B0B0C); pointer-events: none; }
/* Each blob glides on a slow circular orbit (linear = no speed changes, no turnarounds)
   while it gently breathes in size: together it reads as a slow, continuous wave. */
.mesh__blob {
  position: absolute; border-radius: 50%;
  will-change: transform, scale;
  animation:
    orbit var(--dur, 60s) linear var(--delay, 0s) infinite var(--dir, normal),
    breathe calc(var(--dur, 60s) / 2) ease-in-out var(--delay, 0s) infinite alternate;
}
@keyframes orbit {
  from { transform: rotate(0deg) translate3d(var(--r, 5%), 0, 0) rotate(0deg); }
  to   { transform: rotate(360deg) translate3d(var(--r, 5%), 0, 0) rotate(-360deg); }
}
@keyframes breathe { from { scale: 1; } to { scale: var(--ds, 1.08); } }
/* Film grain: static white monotone noise, like the Figma NOISE effect */
.mesh::after { content: ""; position: absolute; inset: 0; background: var(--noise); opacity: var(--grain, .12); }
.mesh.is-paused .mesh__blob { animation-play-state: paused; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }

/* Grouped list (iOS inset style): one surface, hairlines between rows */
.groups { max-width: 760px; margin-inline: auto; }
.group__label { font-size: 13px; letter-spacing: .02em; color: var(--faint); padding: 0 20px 8px; }
.group + .group__label { margin-top: 32px; }
.group { list-style: none; margin: 0; padding: 0 20px; background: var(--surface); border-radius: var(--r-card); }
.row { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 0; }
.row + .row::before, .group > li + li::before {
  content: ""; position: absolute; top: 0; left: 54px; right: 0; height: 1px; background: var(--sep);
}
.row__logo { width: 40px; height: 40px; border-radius: 9px; flex: none; }
.row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.row__name { font-size: 16px; font-weight: calc(500 - var(--wd)); letter-spacing: -0.005em; line-height: 1.2; }
.row__meta { font-size: 14px; color: var(--muted); line-height: 1.25; }
.row__dates { font-size: 13px; color: var(--muted); white-space: nowrap; transition: color .3s var(--ease); }

/* What I do: four colored cards */
.columns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.column {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 420px; padding: 28px 26px;
  border-radius: var(--r-card); background: #000;
}
.column h3 { font-size: 19px; font-weight: calc(500 - var(--wd)); letter-spacing: -0.01em; line-height: 1.3; }
.column p { font-size: 14.5px; line-height: 1.5; color: rgba(255, 255, 255, .75); }
/* screen blend: the illustrations' black masks take the card color, white lines stay white */
.column__illu { margin-top: auto; align-self: center; width: 100%; max-width: 234px; mix-blend-mode: screen; }

/* Stage: no background, the panel itself is the card, centered */
.stage { display: grid; place-items: center; }
.panel { width: 100%; background: var(--surface); border-radius: var(--r-card); }

/* Timeline */
.timeline { max-width: 1040px; padding: 51px 88px 32px 32px; position: relative; }
/* Each step draws the rail segment to the next dot, so it stays aligned at any width; the last one is the dashed "loop" */
.timeline__steps { --gap: 28px; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gap); position: relative; text-align: left; }
.step { position: relative; display: flex; flex-direction: column; gap: 8px; }
.step__rail { position: absolute; left: 5.5px; top: 5px; width: calc(100% + var(--gap)); height: 1px; background: rgba(255, 255, 255, .18); transform-origin: left center; }
.step:last-child .step__rail { left: 12px; width: min(110px, calc(100% - 12px)); background: none; border-top: 1px dashed rgba(255, 255, 255, .25); }
.step__dot { position: relative; z-index: 1; width: 11px; height: 11px; border-radius: 50%; background: var(--surface); border: 1px solid rgba(255, 255, 255, .6); margin-bottom: 30px; }
.step.is-first .step__dot { background: #fff; border-color: #fff; }
.step__num { font-size: 11px; letter-spacing: .04em; color: rgba(255, 255, 255, .35); line-height: 1.5; }
.step h3 { font-size: 18px; font-weight: calc(500 - var(--wd)); letter-spacing: -0.005em; line-height: 1.2; }
.step p { font-size: 13px; line-height: 1.5; color: var(--soft); }
.step__tag { font-family: var(--mono); font-size: 10px; letter-spacing: .04em; line-height: 1.5; color: rgba(255, 255, 255, .6); }

/* Terminal */
.terminal { max-width: 800px; font-family: var(--mono); font-size: 12px; line-height: 20px; overflow: hidden; }
.terminal__bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; background: rgba(255, 255, 255, .025); }
.terminal__dots { display: inline-flex; gap: 6px; margin-right: 16px; }
.terminal__dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.terminal__logo { width: 14px; height: 14px; }
.terminal__path { font-size: 11px; line-height: 19px; color: rgba(255, 255, 255, .48); margin-left: 4px; white-space: pre; }
.terminal__body { padding: 20px 20px 24px; display: flex; flex-direction: column; gap: 4px; white-space: pre-wrap; }
.t-strong { color: rgba(255, 255, 255, .95); }
.t-mid { color: rgba(255, 255, 255, .8); }
.t-dim { color: rgba(255, 255, 255, .58); }
.t-faint { color: rgba(255, 255, 255, .4); font-size: 11px; }
.t-gap { margin-top: 4px; }
.t-row { display: flex; justify-content: space-between; gap: 16px; }
.cursor { display: inline-block; width: 7px; height: 14px; vertical-align: -2px; background: rgba(255, 255, 255, .9); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Team */
/* Blueprint: the AI + team block sits on a technical grid (Figma "Blueprint"):
   16px lines, 64px major lines and crosses, aligned on the inner padding, soft halo + vignette.
   The grid layer sits at 40% opacity in Figma, so every line value below is the Figma value × .4.
   The grid spreads past the block (--bp-ext-*) and fades out on a long elliptical curve, so it has
   no visible edge; the text around it stays on top (see the z-index rule below). */
.blueprint {
  --bp-pad: 40px;
  --bp-ext-x: min(120px, var(--gutter));
  --bp-ext-y: 80px;
  --cross: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cpath d='M27.5 32h9M32 27.5v9' stroke='%23fff' stroke-opacity='.2'/%3E%3C/svg%3E");
  position: relative; isolation: isolate;
  display: flex; flex-direction: column; align-items: center; gap: 40px;
  padding: var(--bp-pad);
  background: radial-gradient(ellipse 520px 200px at 50% 50%, rgba(255, 255, 255, .06), transparent 75%);
}
.blueprint::before {
  content: ""; position: absolute; inset: calc(-1 * var(--bp-ext-y)) calc(-1 * var(--bp-ext-x)); z-index: -1; pointer-events: none;
  background:
    var(--cross),
    linear-gradient(90deg, rgba(255, 255, 255, .052) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .052) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .024) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .024) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px, 64px 64px, 16px 16px, 16px 16px;
  background-position:
    calc(var(--bp-ext-x) + var(--bp-pad) - 32px) calc(var(--bp-ext-y) + var(--bp-pad) - 32px),
    calc(var(--bp-ext-x) + var(--bp-pad) - .5px) 0, 0 calc(var(--bp-ext-y) + var(--bp-pad) - .5px),
    calc(var(--bp-ext-x) + var(--bp-pad) - .5px) 0, 0 calc(var(--bp-ext-y) + var(--bp-pad) - .5px);
  -webkit-mask-image: radial-gradient(ellipse closest-side at 50% 50%, #000 40%, rgba(0, 0, 0, .75) 55%, rgba(0, 0, 0, .45) 70%, rgba(0, 0, 0, .2) 84%, rgba(0, 0, 0, .05) 94%, transparent);
  mask-image: radial-gradient(ellipse closest-side at 50% 50%, #000 40%, rgba(0, 0, 0, .75) 55%, rgba(0, 0, 0, .45) 70%, rgba(0, 0, 0, .2) 84%, rgba(0, 0, 0, .05) 94%, transparent);
}
/* Headings and text next to a blueprint stay above its spread-out grid */
.sec-head, .chap__head, .chap > .sec-title, .split__head, .example { position: relative; z-index: 1; }
.blueprint > .duo { width: 100%; }
.blueprint > .sec-note { margin-top: 0; color: var(--muted); }
/* With AI and the team: terminal + team card side by side, same height */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) 388px; gap: 12px; }
.duo .terminal { max-width: none; }
.team-card { display: flex; flex-direction: column; gap: 10px; padding: 28px; border-radius: var(--r-card); background: var(--surface); }
/* The flow sits centered in its own inner frame, which takes the free height of the card */
.team-card__visual {
  flex: 1 1 auto; min-height: 160px; display: grid; place-items: center; margin-bottom: 18px; padding: 24px;
  border-radius: 12px; background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.team-card__flow { width: 100%; max-width: 280px; height: auto; }
.team-card__title { font-size: 20px; font-weight: calc(500 - var(--wd)); line-height: 1.25; letter-spacing: -0.015em; }
.team-card__text { font-size: 16px; line-height: 1.5; color: var(--muted); }

/* Projects */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  display: flex; flex-direction: column; gap: 20px;
  padding: 24px; background: var(--surface); border-radius: var(--r-card);
  transition: background-color .3s var(--ease);
}
.card:hover { background: #151517; }
.card__thumb { width: 56px; height: 56px; border-radius: 14px; flex: none; }
.card h3 { font-family: var(--grotesk); font-weight: calc(600 - var(--wd)); font-size: 18px; line-height: 1.25; color: var(--cream); }
.card p { font-family: var(--grotesk); font-size: 14px; line-height: 1.45; color: var(--muted); margin-top: 6px; }
/* 8/8 dashes like Figma (a CSS dashed border is too tight) */
.card--more { background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' rx='12' fill='none' stroke='%23fff' stroke-opacity='.16' stroke-width='2' stroke-dasharray='8 8'/%3E%3C/svg%3E"); justify-content: center; }
.card--more:hover { background-color: rgba(255, 255, 255, .02); }
.card--more { align-items: center; text-align: center; gap: 12px; }
.card--more p { margin: 0; font-family: var(--sans, inherit); font-size: 15px; color: rgba(255, 255, 255, .5); }
/* Home (Figma "Home · Dark iOS"): 12px corners on cards and blueprints, buttons stay pills */
.home .showcase__card, .home .column, .home .panel, .home .team-card, .home .card,
.home .contact, .home .group, .home .blueprint, .home .showcase__mockup { border-radius: 12px; }
/* Experience groups: 24px above and below the rows, 40px between them */
.home .group { padding: 4px 20px; }
.home .group .row { padding: 20px 0; }
.btn--case { font-size: 15px; }
/* Text button: no outline or fill, the label lines up with the caption; it just dims on hover */
.btn--text { height: auto; padding: 4px 0; background: none; color: #fff; transition: transform .2s var(--ease), color .2s var(--ease); }
.btn--text:hover { color: rgba(255, 255, 255, .75); }
/* Kobra-style DA (kobra.systems), shared by the home and the Mio case (body.kobra): #151515 page,
   #181818 cards with a faint top sheen, a hairline ring, a 1px top highlight and a soft drop shadow */
.kobra { --bg: #151515; --surface: #181818; }
.kobra :is(.group, .panel, .team-card, .card:not(.card--more), .bcard:not(.bcard--downloads),
  .pg-card--pain, .identity, .objective, .next__tile--bel) {
  background-color: #181818;
  background-image: linear-gradient(rgba(255, 255, 255, .035), transparent 55%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 0 0 1px rgba(255, 255, 255, .07),
    0 1px 2px rgba(0, 0, 0, .35), 0 12px 28px -12px rgba(0, 0, 0, .6);
}
.kobra .card:not(.card--more):hover { background-color: #1C1C1C; }
/* Same lift on the colored blocks; their gradient covers the box, so the top highlight and the ring
   sit on an overlay (Figma: ring 7% on the case cards, 3% on What I do and the contact block) */
.kobra :is(.showcase__card, .column, .contact, .bcard--downloads, .pg-card--gain) {
  position: relative; box-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 28px -12px rgba(0, 0, 0, .6);
}
.kobra :is(.showcase__card, .column, .contact, .bcard--downloads, .pg-card--gain)::after {
  content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), inset 0 0 0 1px rgba(255, 255, 255, var(--ring, .03));
}
.kobra :is(.showcase__card, .bcard--downloads, .pg-card--gain) { --ring: .07; }
.kobra .contact { --ring: .05; }
.kobra .row__logo { box-shadow: 0 0 0 .5px rgba(255, 255, 255, .08), 0 1px 2px rgba(0, 0, 0, .35), 0 12px 28px -12px rgba(0, 0, 0, .6); }
/* The Bel logo is a round badge: no square hairline around it, the shadow follows the circle */
.kobra .row__logo[src*="logo-bel"] { border-radius: 50%; box-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 28px -12px rgba(0, 0, 0, .6); }
/* Mio case: 12px corners like the home */
.case :is(.info, .bcard, .pg-card, .identity, .objective, .next__tile, .contact, .group) { border-radius: 12px; }

/* Elsewhere accordion */
.accordion { display: flex; gap: 10px; height: 420px; }
.accordion__item {
  position: relative; flex: 0 0 72px; min-width: 0;
  padding: 0; border: 0; border-radius: var(--r-card); overflow: hidden;
  background: #111; cursor: pointer;
  transition: flex-grow .6s var(--ease), flex-basis .6s var(--ease);
}
.accordion__item.is-open { flex: 1 1 auto; cursor: default; }
.accordion__item img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.02);
  transform: scale(1.02); transition: transform .8s var(--ease), filter .6s var(--ease);
}
.accordion__item:not(.is-open) img { filter: grayscale(1) blur(6px) brightness(.85); transform: scale(1.12); }
.accordion__veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .1), rgba(0, 0, 0, .65)); transition: opacity .5s var(--ease); }
.accordion__item.is-open .accordion__veil { opacity: 0; }
.accordion__label {
  position: absolute; left: 50%; bottom: 16px;
  transform: translateX(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  font-size: 12px; font-weight: calc(500 - var(--wd)); color: rgba(255, 255, 255, .9); white-space: nowrap;
  transition: opacity .3s var(--ease);
}
.accordion__item.is-open .accordion__label { opacity: 0; }
.accordion__tag {
  position: absolute; left: 14px; bottom: 14px;
  padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: calc(500 - var(--wd)); color: rgba(255, 255, 255, .95);
  background: rgba(30, 30, 32, .55); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
  opacity: 0; transform: translateY(6px); transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.accordion__item.is-open .accordion__tag { opacity: 1; transform: none; transition-delay: .25s; }
/* JS layout (main.js): strips keep a fixed width; opening = transform + clip-path, compositor only */
.accordion.is-js { position: relative; display: block; overflow: hidden; }
.accordion.is-js .accordion__item {
  position: absolute; top: 0; left: 0; height: 100%; width: var(--open-w);
  border-radius: 0;
  transform: translate3d(var(--x, 0px), 0, 0);
  clip-path: inset(0 var(--hide, 0px) 0 0 round var(--r-card));
  transition: transform .6s var(--ease-out), clip-path .6s var(--ease-out);
}
.accordion.is-js .accordion__item img { transform: translate3d(calc(var(--hide, 0px) * -.5), 0, 0) scale(1.02); transition: transform .6s var(--ease-out), filter .6s var(--ease); }
.accordion.is-js .accordion__item:not(.is-open) img { transform: translate3d(calc(var(--hide, 0px) * -.5), 0, 0) scale(1.12); }
.accordion.is-js .accordion__label { left: calc(var(--strip, 72px) / 2); }
.accordion.is-js .accordion__item:focus-visible { outline: none; }
.accordion.is-js .accordion__item:focus-visible .accordion__veil { opacity: 1; box-shadow: inset 0 0 0 2px #fff; }

/* ---------- Case studies v2 (Figma "Case · Mio" / "Case · Bel", English) ---------- */
.case-hero__logo { height: 32px; width: auto; margin-bottom: 4px; }
/* Same title size and heading → content gap as the chapters (40px / 64px) */
.case .sec-title { font-size: 40px; }
.case .sec-head { margin-bottom: 48px; }
@media (max-width: 760px) { .case .sec-title { font-size: 30px; } .case .sec-head { margin-bottom: 40px; } }
.case-visual--v2 .case-visual__inner { aspect-ratio: 1200 / 586; }
/* Figma "Gradient": a single block, no outer frame: 8px corners, 8% hairline, Kobra top highlight + shadows */
:is(.case-visual--v2, .case-visual--bel) .case-visual__frame { margin-inline: 0; padding: 0; border: 0; border-radius: 8px; box-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 24px 64px rgba(0, 0, 0, .35); } /* even, soft shadow: no negative spread, so the corners don't look cut */
:is(.case-visual--v2, .case-visual--bel) .case-visual__inner::after {
  content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
/* Screens exported with their outside stroke: the image starts 3px left/up of the phones */
.case-visual--v2 .case-visual__screens { left: 10%; top: 14.505%; width: 79.958%; }
/* Key figures: downloads card with the isometric phone, rating and ARR side by side, partners below */
.bento--v2 .bento__side { grid-template-rows: 126px 1fr; grid-auto-rows: auto; gap: 8px 12px; }
.bento--v2 .bcard--downloads { min-height: 274px; justify-content: flex-end; background: #2A0828; }
.bcard__bg { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; }
.bcard--arr { gap: 4px; }
.bcard--arr .bcard__value { font-size: 32px; }
.bcard--arr .bcard__label { margin: 0; font-size: 13px; color: rgba(255, 255, 255, .5); }
.bento--v2 .bcard--partners { gap: 16px; padding: 20px 0; }
/* Partner logos: same sizes and 24px gap as the Figma marquee */
.bento--v2 .marquee__set img { width: auto; margin-right: 24px; }
.bento--v2 .marquee__set img:nth-child(1) { height: 19px; }
.bento--v2 .marquee__set img:nth-child(2) { height: 23px; }
.bento--v2 .marquee__set img:nth-child(3) { height: 20px; }
.bento--v2 .marquee__set img:nth-child(4) { height: 32px; }
.bento--v2 .marquee__set img:nth-child(5) { height: 25px; }
.bento--v2 .bcard__head { padding-inline: 20px; font-size: 13px; font-weight: calc(400 - var(--wd)); color: rgba(255, 255, 255, .5); }
/* Split sections: heading on the left, content on the right (My role, Context) */
.split { display: flex; justify-content: space-between; align-items: flex-start; gap: 64px; padding: 72px 0; }
.split__head { flex: 0 1 404px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 96px; }
.split__head .sec-title { font-size: 40px; }
.split__text { font-size: 16px; line-height: 1.55; color: rgba(255, 255, 255, .5); }
.role-list { flex: 0 1 350px; display: flex; flex-direction: column; gap: 40px; }
.role-list h3 { margin-bottom: 8px; font-size: 14px; line-height: 1.6; letter-spacing: .04em; text-transform: uppercase; font-weight: calc(500 - var(--wd)); }
.role-list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, .5); }
/* Context (Figma "Cards"): problem card, a round arrow badge sitting on the gap, then the solution card */
.ctx-stack { flex: 0 1 540px; position: relative; display: flex; flex-direction: column; gap: 16px; }
.ctx-stack__arrow {
  position: absolute; left: 50%; top: calc(355px + 8px - 24px); z-index: 3; display: grid; place-items: center;
  width: 48px; height: 48px; margin-left: -24px; border-radius: 50%; background: #181818; box-shadow: inset 0 0 0 6px #121212;
}
.ctx-stack .pg-card { padding: 40px; gap: 26px; }
.ctx-stack .pg-card--pain { min-height: 355px; }
.ctx-stack .pg-card--gain { gap: 28px; }
.ctx-stack .pg-card__title { font-size: 26px; }
.ctx-stack .pg-card--gain .pg-card__title { font-size: 28px; }
.ctx-stack .pains { gap: 40px; }
.ctx-stack .pain img { width: 155px; margin-bottom: 22px; }
.ctx-stack .pain h4 { font-size: 19px; }
.ctx-stack .pain p { font-size: 16px; color: rgba(255, 255, 255, .7); }
.ctx-stack .promises li { font-size: 17px; color: #fff; }
.ctx-stack .promises li + li { border-top-color: rgba(255, 255, 255, .05); }
.ctx-stack .promises__check { width: 24px; height: 24px; background: none; }
/* Chapter: big title + grey subtitle, a paragraph, then the visual (mockups, cards, blueprint) */
.chap { display: flex; flex-direction: column; gap: 48px; padding: 72px 0; }
.chap > .sec-title { font-size: 40px; margin-bottom: -8px; }
/* Visuals with built-in empty margins are pulled back so the visible gap under the text stays 48px:
   the blueprint's inner padding (its grid fades out there) and the board image's transparent edges
   (64/2400 on the sides and bottom, 52/2400 on top, so the board content also lines up with the text). */
.chap > .blueprint { margin-block: calc(-1 * var(--bp-pad)); }
.chap > .board { margin: -2.17% -2.67% -2.67%; }
.chap__head { display: flex; flex-direction: column; gap: 40px; }
.chap__title { font-size: 40px; line-height: 1.12; letter-spacing: -0.025em; font-weight: calc(500 - var(--wd)); text-wrap: balance; }
.chap__title > span:not(.w) { display: block; margin-top: 8px; font-weight: calc(400 - var(--wd)); color: rgba(255, 255, 255, .5); }
.chap__text { max-width: 600px; font-size: 16px; line-height: 1.55; }
.chap__visual { width: 100%; height: auto; border-radius: 12px; }
/* Research: the workshop board is an image; its full content stays readable for screen readers */
.board img { width: 100%; height: auto; border-radius: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Memorizer bento: the lock-screen notification is live HTML over the image, centered where the
   Figma one sits (898.5, 489.5 in the 1200x640 bento). iOS dark-mode style: dense dark glass,
   38px icon, 15px text, gray time. Sizes follow the bento width (container units, 1px = 1/12 cqi). */
.memo { position: relative; container-type: inline-size; }
.memo__notif {
  position: absolute; left: 74.875%; top: 76.48%; width: 33.333cqi;
  translate: -50% -50%; pointer-events: none;
  display: grid; align-items: center; /* both notifications share one spot and stack */
}
.memo__notif > .memo__card { grid-area: 1 / 1; }
.memo__card {
  position: relative; display: flex; align-items: center; gap: 1cqi;
  padding: 1.083cqi 1.25cqi; border-radius: 1.833cqi; color: #fff;
  background: rgba(36, 36, 38, .62);
  box-shadow: inset 0 .083cqi 0 rgba(255, 255, 255, .1), 0 0 0 .083cqi rgba(255, 255, 255, .06), 0 1.25cqi 3.33cqi rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: blur(2.5cqi) saturate(180%); backdrop-filter: blur(2.5cqi) saturate(180%);
  font-family: -apple-system, "SF Pro Text", var(--sans);
  transform-origin: 50% 100%;
  animation: memo-first 12s cubic-bezier(.2, .8, .2, 1) infinite;
}
.memo__card--friend { animation-name: memo-second; }
.memo__icon { flex: none; width: 3.167cqi; height: 3.167cqi; border-radius: .75cqi; }
.memo__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .083cqi; font-size: 1.25cqi; line-height: 1.3; letter-spacing: -0.01em; }
.memo__text b { font-weight: calc(600 - var(--wd)); }
.memo__text span { font-weight: calc(400 - var(--wd)); color: rgba(255, 255, 255, .85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.memo__time { position: absolute; right: 1.25cqi; top: 1.083cqi; font-size: 1.083cqi; line-height: 1.3; color: rgba(255, 255, 255, .5); }
/* Friend activity: one-line message, poster on the right, the time sits just left of the poster */
.memo__card--friend .memo__time { right: calc(1.25cqi + 3.333cqi + 1cqi); }
.memo__card--friend .memo__text b { padding-right: 5cqi; }
.memo__thumb { flex: none; width: 3.333cqi; height: 4cqi; border-radius: .5cqi; object-fit: cover; }
/* 12s loop, stacked like the iOS lock screen: the first notification drops in, then the second
   lands on top and pushes it behind (smaller, dimmer, peeking below), then both slide away.
   Transform + opacity only: a filter would switch the glass blur off. */
@keyframes memo-first {
  0%       { opacity: 0; transform: translateY(-3.5cqi) scale(.94); }
  5%       { opacity: 1; transform: translateY(.25cqi) scale(1.01); }
  7%, 33%  { opacity: 1; transform: translateY(0) scale(1); }
  40%, 76% { opacity: .9; transform: translateY(3.25cqi) scale(.94); }
  84%      { opacity: 0; transform: translateY(-2cqi) scale(.9); }
  100%     { opacity: 0; transform: translateY(-3.5cqi) scale(.94); }
}
/* once pushed behind, the first card's content stays there but goes soft (blurred, dimmed) */
.memo__card:not(.memo__card--friend) > * { animation: memo-first-content 12s cubic-bezier(.2, .8, .2, 1) infinite; }
@keyframes memo-first-content {
  0%, 33%   { opacity: 1; filter: blur(0); }
  40%, 100% { opacity: .7; filter: blur(.2cqi); }
}
@keyframes memo-second {
  0%, 33%  { opacity: 0; transform: translateY(-3.5cqi) scale(.94); }
  38%      { opacity: 1; transform: translateY(.25cqi) scale(1.01); }
  40%, 76% { opacity: 1; transform: translateY(0) scale(1); }
  84%      { opacity: 0; transform: translateY(-2.5cqi) scale(.97); }
  100%     { opacity: 0; transform: translateY(-3.5cqi) scale(.94); }
}
@media (prefers-reduced-motion: reduce) { .memo__card, .memo__card > * { animation: none !important; } .memo__card--friend { display: none; } }
.chap__text--stack { display: flex; flex-direction: column; gap: 16px; }
/* Chapter with a visual on the right of the heading (Bel context) */
.chap--aside { flex-direction: row; align-items: center; justify-content: space-between; }
.chap--aside .chap__head { flex: 1 1 auto; min-width: 0; }
.chap__aside {
  flex: 0 1 520px; min-width: 0; border-radius: 12px; overflow: hidden; background-color: #181818;
  background-image: linear-gradient(rgba(255, 255, 255, .035), transparent 55%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 0 0 1px rgba(255, 255, 255, .07),
    0 1px 2px rgba(0, 0, 0, .35), 0 12px 28px -12px rgba(0, 0, 0, .6);
}
.chap__aside img { width: 100%; height: auto; }
@media (max-width: 1000px) { .chap--aside { flex-direction: column; align-items: stretch; } .chap__aside { flex: none; width: 100%; max-width: 520px; } }
.case-hero__logo--square { width: 56px; height: 56px; border-radius: 12px; }
.case-visual--bel .case-visual__inner { aspect-ratio: 1200 / 586; background: #0A2A1B; }
.case-visual--bel .case-visual__screens { left: 0; top: 0; width: 100%; }
.desktops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 42px; }
.desktops img { width: 100%; height: auto; border-radius: 12px; }
.desktops figure { display: flex; flex-direction: column; gap: 12px; }
.desktops figcaption { font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .5); }
.kpis--thirds .kpi { grid-column: span 2; }
.kpi__preview { width: 100%; height: auto !important; border-radius: 8px; margin-bottom: 8px; }
.example { display: flex; flex-direction: column; gap: 24px; }
/* Figma: title and description centred, 8px apart */
.example__label { text-align: center; }
.example__label h3 { font-size: 18px; line-height: 1.2; font-weight: calc(500 - var(--wd)); }
.example__label p { margin-top: 8px; font-size: 15px; line-height: 1.2; color: rgba(255, 255, 255, .5); }
.phones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; }
/* Phones keep their 1px outside stroke (in the image); one shared soft shadow follows the rounded shape */
.phones img { width: 100%; height: auto; } /* flat mockups: the screen and its 10% white outline (in the image), no shadow */
/* Pair: title on the left, text and visual on the right (pivot, design system) */
.pair { display: flex; justify-content: space-between; gap: 48px; padding: 72px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.pair__head { flex: 0 1 560px; }
.pair__title { font-size: 40px; line-height: 1.2; letter-spacing: -0.015em; font-weight: calc(400 - var(--wd)); }
.pair__sub { margin-top: 8px; font-size: 16px; line-height: 1.2; color: rgba(255, 255, 255, .45); }
.pair__body { flex: 0 1 592px; display: flex; flex-direction: column; gap: 40px; font-size: 16px; line-height: 1.55; }
.pair__body img { width: 100%; height: auto; border-radius: 12px; }
/* Research cards and KPI cards share the Kobra card look */
.research { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.rcard, .kpi {
  display: flex; flex-direction: column; gap: 16px; padding: 24px; margin: 0; border-radius: 12px; background-color: #181818;
  background-image: linear-gradient(rgba(255, 255, 255, .035), transparent 55%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 0 0 1px rgba(255, 255, 255, .07),
    0 1px 2px rgba(0, 0, 0, .35), 0 12px 28px -12px rgba(0, 0, 0, .6);
}
/* Row 1: goals (half) + two figures (quarter each); rows 2-3: three cards each */
.research > .rcard--wide { grid-column: span 6; }
.research > .rcard:nth-child(2), .research > .rcard:nth-child(3) { grid-column: span 3; }
.research > .rcard--third { grid-column: span 4; }
.rcard__eyebrow { font-size: 13px; line-height: 1.5; letter-spacing: .04em; text-transform: uppercase; font-weight: calc(500 - var(--wd)); color: rgba(255, 255, 255, .5); }
.rcard__title { margin: 0; font-size: 18px; line-height: 1.5; font-weight: calc(500 - var(--wd)); }
.rcard__num { font-size: 48px; line-height: 1; letter-spacing: -0.03em; font-weight: calc(500 - var(--wd)); }
.rcard__text, .rcard__list { margin: 0; padding: 0; list-style: none; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .5); }
.rcard__list { display: flex; flex-direction: column; gap: 4px; }
.kpis { width: 100%; max-width: 1072px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.kpi { grid-column: span 2; gap: 12px; }
.kpi--wide { grid-column: span 3; }
.kpi img { width: 100%; max-width: 478px; height: 64px; margin-bottom: 4px; object-fit: contain; object-position: left center; }
.kpi h3 { font-size: 18px; line-height: 1.5; font-weight: calc(500 - var(--wd)); }
.kpi p { font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .75); }
.kpi .kpi__more { margin-top: -6px; color: rgba(255, 255, 255, .5); }
@media (max-width: 1000px) {
  .split, .pair { flex-direction: column; gap: 32px; }
  .split__head { position: static; flex: none; }
  .ctx-stack, .role-list, .pair__head, .pair__body { flex: none; width: 100%; }
  .phones { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .research > .rcard--wide { grid-column: span 12; }
  .research > .rcard:nth-child(2), .research > .rcard:nth-child(3) { grid-column: span 6; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi, .kpi--wide { grid-column: span 1; }
}
@media (max-width: 760px) {
  .split, .pair, .chap { padding: 48px 0; }
  .chap { gap: 32px; }
  .chap__head { gap: 24px; }
  .chap__title, .pair__title, .split__head .sec-title, .chap > .sec-title { font-size: 30px; }
  .chap > .sec-title { margin-bottom: -8px; }
  .research > .rcard--wide, .research > .rcard:nth-child(2), .research > .rcard:nth-child(3), .research > .rcard--third { grid-column: span 12; }
  .kpis { grid-template-columns: 1fr; }
  .desktops { grid-template-columns: 1fr; gap: 24px; }
  .ctx-stack__arrow { position: static; margin: -30px auto; }
  .bento--v2 .bento__side { grid-template-rows: 126px auto; }
}

/* ---------- About: online resume (Figma "About · CV online") ---------- */
.page-about .contact { border-radius: 12px; }
/* Profile photo selected like a layer in Figma: square corners, a thin white box (50%) on its edge and a square
   handle on each corner (the handles are background layers of ::after: white squares, page-colour cores) */
.page-about .about__photo { position: relative; padding: 0; border-radius: 0; box-shadow: none; }
.page-about .about__photo img { border-radius: 0; }
.page-about .about__photo::before { content: ""; position: absolute; inset: 0; border: 1.5px solid rgba(255, 255, 255, .5); pointer-events: none; }
.page-about .about__photo::after {
  --h: 9px; --in: 6px; --b: 1.5px; --line: rgba(255, 255, 255, .5);
  content: ""; position: absolute; inset: calc(var(--h) / -2); pointer-events: none;
  background:
    linear-gradient(var(--bg), var(--bg)) left var(--b) top var(--b) / var(--in) var(--in) no-repeat,
    linear-gradient(var(--bg), var(--bg)) right var(--b) top var(--b) / var(--in) var(--in) no-repeat,
    linear-gradient(var(--bg), var(--bg)) left var(--b) bottom var(--b) / var(--in) var(--in) no-repeat,
    linear-gradient(var(--bg), var(--bg)) right var(--b) bottom var(--b) / var(--in) var(--in) no-repeat,
    linear-gradient(var(--line), var(--line)) left top / var(--h) var(--h) no-repeat,
    linear-gradient(var(--line), var(--line)) right top / var(--h) var(--h) no-repeat,
    linear-gradient(var(--line), var(--line)) left bottom / var(--h) var(--h) no-repeat,
    linear-gradient(var(--line), var(--line)) right bottom / var(--h) var(--h) no-repeat;
}
.cv { display: flex; gap: 32px; padding: 64px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.cv__title { flex: 1 1 0; font-size: 40px; line-height: 1.12; letter-spacing: -0.025em; font-weight: calc(500 - var(--wd)); }
.cv__content { flex: 0 0 600px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
/* Experience: expandable cards (native <details>, animated where ::details-content is supported) */
.xp {
  border-radius: 12px; background-color: #181818;
  background-image: linear-gradient(rgba(255, 255, 255, .035), transparent 55%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 0 0 1px rgba(255, 255, 255, .07),
    0 1px 2px rgba(0, 0, 0, .35), 0 12px 28px -12px rgba(0, 0, 0, .6);
  transition: background-color .25s var(--ease);
}
/* Hover: the whole card lights up a touch, like the other Kobra cards (only cards that open) */
details.xp:hover { background-color: #1C1C1C; }
details.xp { cursor: pointer; }
.xp__head { display: flex; align-items: center; gap: 16px; padding: 20px 20px 20px 24px; list-style: none; }
summary.xp__head { cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
summary.xp__head::-webkit-details-marker { display: none; }
summary.xp__head:focus { outline: none; }
summary.xp__head:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 12px; }
.xp__role { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.xp__title { font-size: 18px; line-height: 1.5; font-weight: calc(500 - var(--wd)); }
.xp__org, .xp__dates { font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .5); }
.xp__dates { flex: none; }
/* Toggle: closed, a white disc with a dark "+"; open, a quiet grey disc with a light "−" (the vertical bar folds flat) */
.xp__toggle { position: relative; flex: none; width: 28px; height: 28px; border-radius: 999px; background: rgba(255, 255, 255, .1); transition: background-color .25s var(--ease); }
.xp__toggle::before, .xp__toggle::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; margin: -.75px 0 0 -5px; border-radius: 2px; background: rgba(255, 255, 255, .75); transition: transform .35s var(--ease-out), background-color .25s var(--ease); }
.xp__toggle::after { transform: rotate(90deg); }
.xp:not([open]) .xp__toggle { background: #fff; }
.xp:not([open]) .xp__toggle::before, .xp:not([open]) .xp__toggle::after { background: #151515; }
details.xp[open]:hover .xp__toggle { background: rgba(255, 255, 255, .15); }
details.xp[open]:hover .xp__toggle::before, details.xp[open]:hover .xp__toggle::after { background: #fff; }
details.xp:not([open]):hover .xp__toggle { background: rgba(255, 255, 255, .85); }
.xp[open] .xp__toggle::after { transform: rotate(0deg); }
.xp__list { margin: 0; padding: 0 24px 20px 42px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .75); }
@supports selector(::details-content) {
  .page-about { interpolate-size: allow-keywords; }
  .xp::details-content { height: 0; overflow: clip; transition: height .35s var(--ease-out), content-visibility .35s allow-discrete; }
  .xp[open]::details-content { height: auto; }
  /* the list fades in slightly after the card starts opening, and fades out first when closing */
  .xp__list { opacity: 0; translate: 0 -4px; transition: opacity .2s var(--ease), translate .3s var(--ease-out); }
  .xp[open] .xp__list { opacity: 1; translate: 0 0; transition-delay: .08s; }
}
@media (prefers-reduced-motion: reduce) {
  .xp, .xp__toggle, .xp__toggle::before, .xp__toggle::after, .xp__list { transition: none !important; }
  .xp::details-content { transition: none !important; }
}
/* Education and details: plain rows with hairlines */
.cv-row { display: flex; align-items: center; gap: 16px; padding: 16px 0; }
.cv-row + .cv-row { border-top: 1px solid rgba(255, 255, 255, .1); }
.cv-row__text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.cv-row__title { flex: 1 1 auto; font-size: 18px; line-height: 1.5; font-weight: calc(500 - var(--wd)); }
.cv-row__sub, .cv-row__info { font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .5); }
.cv-row__info { flex: none; text-align: right; }
/* Expertise: 2x2 cards */
.cv__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.skill {
  display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: 12px; background-color: #181818;
  background-image: linear-gradient(rgba(255, 255, 255, .035), transparent 55%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 0 0 1px rgba(255, 255, 255, .07),
    0 1px 2px rgba(0, 0, 0, .35), 0 12px 28px -12px rgba(0, 0, 0, .6);
}
.skill__icon { margin-bottom: 8px; fill: none; stroke: rgba(255, 255, 255, .75); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.skill h3 { font-size: 18px; line-height: 1.5; font-weight: calc(500 - var(--wd)); }
.skill p { font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .5); }
/* Colored like the home "What I do" cards: live grainy gradient behind, ring + top highlight on top */
.skill:is(.skill--blue, .skill--pink, .skill--orange, .skill--teal) {
  position: relative; isolation: isolate; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 28px -12px rgba(0, 0, 0, .6);
}
.skill > .mesh { z-index: -1; }
.skill:is(.skill--blue, .skill--pink, .skill--orange, .skill--teal)::after {
  content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), inset 0 0 0 1px rgba(255, 255, 255, .03);
}
.skill:is(.skill--blue, .skill--pink, .skill--orange, .skill--teal) p { color: rgba(255, 255, 255, .75); }
.skill:is(.skill--blue, .skill--pink, .skill--orange, .skill--teal) .skill__icon { stroke: #fff; }
/* Things I love: a photo stack (after Motion's "Card stack"). Each card takes its photo's format; the
   top one stands straight, the two behind lean one way and the other and peek out. main.js places the
   cards (transform, z-index), drags the top one and sends it to the back. Without the script the cards
   just sit on top of each other, the first one in front. */
.stack { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.stack__deck {
  position: relative; width: 100%; height: 400px;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; outline: none;
}
.stack__deck.is-dragging { cursor: grabbing; }
.stack__deck:focus-visible { box-shadow: 0 0 0 2px #fff; border-radius: 16px; }
.stack__card {
  --w: 208px; --r: .75; --h: calc(var(--w) / var(--r)); /* one width for every card, the height follows its format */
  position: absolute; left: 50%; top: 50%; width: var(--w); height: var(--h); margin: calc(var(--h) / -2) 0 0 calc(var(--w) / -2);
  overflow: hidden; border-radius: 12px; background: #181818;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 1px 2px rgba(0, 0, 0, .35), 0 16px 32px -12px rgba(0, 0, 0, .6);
  will-change: transform;
}
/* Every photo has its own format (same width, the height changes): the stack changes shape as it turns */
.stack__card--landscape { --r: 1.3333; --w: 288px; } /* 4:3, wider so it doesn't shrink to a strip */
.stack__card--tall { --r: .6667; }       /* 2:3 */
.stack__card--slim { --r: .5625; }       /* 9:16 */
.stack__card--square { --r: 1; }         /* 1:1 */
.stack__card--wide { --r: 1.5; --w: 300px; } /* 3:2, wider too */
.stack__card--4x5 { --r: .8; }           /* 4:5 */
.stack__card:not(:first-child) { visibility: hidden; } /* no script: only the first photo shows */
.stack.is-live .stack__card { visibility: visible; }
.stack__card img, .stack__ph { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
/* Placeholder "photo": a gradient with a soft vignette and a small picture mark */
.stack__ph { position: relative; background: var(--ph); }
.stack__ph::after {
  content: ""; position: absolute; inset: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' fill='none' stroke='%23fff' stroke-opacity='.5' stroke-width='1.5'%3E%3Crect x='3' y='5' width='22' height='18' rx='3'/%3E%3Ccircle cx='10' cy='11' r='2'/%3E%3Cpath d='M4 21l7-7 5 5 3-3 5 5'/%3E%3C/svg%3E") center / 28px no-repeat,
    radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, .25));
}
.stack__caption { min-height: 24px; font-size: 16px; line-height: 1.5; color: rgba(255, 255, 255, .9); text-align: center; transition: opacity .2s var(--ease); }
.stack__caption.is-swapping { opacity: 0; }
@media (max-width: 760px) {
  .stack__deck { height: 340px; }
  .stack__card { --w: 176px; }
  .stack__card--landscape { --w: 244px; }
  .stack__card--wide { --w: 256px; }
}
@media (max-width: 760px) {
  .cv { flex-direction: column; gap: 24px; padding: 48px 0; }
  .cv__title { font-size: 30px; }
  .cv__content { flex-basis: auto; }
  .cv__grid { grid-template-columns: 1fr; }
  .xp__head { flex-wrap: wrap; padding: 16px 16px 16px 20px; }
  .xp__role { flex: 1 1 0; }
  .xp__dates { order: 3; flex-basis: 100%; margin-top: -12px; }
  .xp__list { padding: 0 20px 16px 38px; }
  .cv-row { align-items: flex-start; flex-direction: column; gap: 2px; }
  .cv-row__info { text-align: left; }
}

/* ---------- Footer ---------- */
.footer { padding: 72px 0 48px; }
.contact {
  position: relative;
  min-height: 400px; border-radius: var(--r-big); overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 32px;
  text-align: center; padding: 48px 24px;
  isolation: isolate;
}
.contact__title { font-size: 36px; line-height: 1.15; letter-spacing: -0.025em; font-weight: calc(400 - var(--wd)); }
.contact__actions { justify-content: center; }
.contact__title > span:not(.w) { display: block; color: rgba(255, 255, 255, .75); }
.bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 40px; }
.bottom__links { display: flex; gap: 24px; font-size: 14px; font-weight: calc(500 - var(--wd)); }
.bottom__links a { transition: color .2s; }
.bottom__links a:hover { color: var(--soft); }
.bottom__copy { font-size: 13px; color: var(--faint); }

/* ---------- Case study pages ---------- */
.case-hero { padding: 64px 0 40px; display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.case-hero__title { font-size: 44px; line-height: 1.1; letter-spacing: -0.03em; font-weight: calc(400 - var(--wd)); max-width: 900px; text-wrap: balance; }
.case-hero__title .muted { display: block; }
.case-hero__lead { font-size: 18px; line-height: 1.5; color: var(--muted); max-width: 800px; text-wrap: pretty; }

.info {
  display: grid; grid-template-columns: repeat(3, 1fr);
  max-width: 840px; margin-top: 40px; margin-bottom: 40px; padding: 20px 8px;
  text-align: center; /* Figma "Info card": no fill, no shadow, no separators; sits under the hero visual */
}
.info__item { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 4px 16px; }
.info__item p:last-child { font-size: 15px; font-weight: calc(500 - var(--wd)); }

/* Main visual: hairline frame around the gradient card */
.case-visual { padding-bottom: 0; }
.case-visual__frame { margin-inline: -7px; padding: 6px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; }
.case-visual__inner { position: relative; aspect-ratio: 1200 / 486; border-radius: 8px; overflow: hidden; isolation: isolate; background: #000; }
.case-visual__pattern { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.case-visual__screens { position: absolute; left: 10.58%; top: 9.05%; width: 77.5%; height: auto; }

/* Key figures: bento */
.bento { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 828px; margin-inline: auto; }
.bento__side { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 140px; gap: 12px; }
.bcard {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
  padding: 24px; border-radius: var(--r-card); background: var(--surface);
}
.bcard__icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .16); }
.bcard__value { font-size: 40px; font-weight: calc(500 - var(--wd)); line-height: 1; letter-spacing: -0.03em; }
.bcard__value--xl { font-size: 88px; letter-spacing: -0.04em; }
.bcard__label { margin-top: 6px; font-size: 14px; line-height: 1.3; color: rgba(255, 255, 255, .6); }
.bcard--downloads { min-height: 292px; background: #1A0B3D; }
.bcard--downloads .bcard__label { font-size: 17px; color: rgba(255, 255, 255, .75); }
.bcard--center { align-items: center; justify-content: center; padding: 20px; }
.bcard--center img { max-width: 100%; height: auto; }
.bcard--premium { grid-column: 1 / -1; justify-content: center; gap: 0; }
.bcard--partners { grid-column: 1 / -1; justify-content: flex-start; gap: 26px; padding: 24px 0 26px; }
.bcard__head { padding-inline: 28px; font-size: 17px; font-weight: calc(500 - var(--wd)); }
/* Logo carousel: one row, two identical sets, the track slides by exactly one set */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 96px, #000 calc(100% - 96px), transparent); mask-image: linear-gradient(90deg, transparent, #000 96px, #000 calc(100% - 96px), transparent); }
.marquee__track { display: flex; width: max-content; animation: marquee 28s linear infinite; }
.marquee__set { display: flex; align-items: center; height: 64px; }
.marquee__set img { flex: none; max-width: none; margin-right: 96px; opacity: .9; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Context: the problem, then what Mio brings */
.pain-gain { display: grid; grid-template-columns: 1fr 64px 1fr; }
.pain-gain__arrow { pointer-events: none; display: grid; place-items: center; font-size: 26px; font-weight: calc(500 - var(--wd)); color: rgba(255, 255, 255, .8); }
.pg-card { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; gap: 28px; padding: 32px; border-radius: var(--r-card); background: var(--surface); }
.pg-card--gain { background: #22124A; }
.pg-card__title { font-size: 28px; font-weight: calc(500 - var(--wd)); line-height: 1.18; letter-spacing: -0.02em; }
.pains { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.pain img { width: 170px; height: auto; margin-bottom: 24px; }
.pain h4 { margin: 0 0 8px; font-size: 19px; font-weight: calc(500 - var(--wd)); }
.pain p { font-size: 16px; line-height: 1.45; color: rgba(255, 255, 255, .75); }
.promises { list-style: none; margin: 0; padding: 0; }
.promises li { display: flex; align-items: center; gap: 14px; padding: 16px 0; font-size: 17px; line-height: 1.35; }
.promises li + li { border-top: 1px solid rgba(255, 255, 255, .2); }
.promises__check { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, .28); }

/* Chapter 01: Memorizer identity */
.identity { display: flex; flex-direction: column; gap: 22px; padding: 22px; border-radius: 16px; background: var(--surface); }
.identity__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.identity .eyebrow { margin-bottom: 10px; }
.identity__logo { width: 195px; height: auto; }
.identity__font { font-size: 17px; font-weight: calc(500 - var(--wd)); }
.swatches { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.swatches li { display: flex; align-items: center; gap: 10px; }
.swatches i { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--c); }
.swatches li:last-child i { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.swatches span { display: flex; flex-direction: column; gap: 2px; }
.swatches b { font-size: 14px; font-weight: calc(500 - var(--wd)); }
.swatches code { font-family: var(--mono); font-size: 11px; color: rgba(255, 255, 255, .5); }

/* Mockup that opens the full flow */
.flow-trigger { position: relative; display: block; padding: 0; border: 0; background: none; cursor: pointer; }
.flow-trigger img { width: 100%; height: auto; transition: opacity .3s var(--ease); }
.flow-trigger__pill {
  position: absolute; left: 50%; top: 50%;
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 20px 13px 18px;
  border-radius: 999px; background: #fff; color: #000; font-size: 15px; font-weight: calc(500 - var(--wd)); white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  opacity: 0; transform: translate(-50%, -50%) scale(.92); pointer-events: none;
  transition: opacity .25s var(--ease), transform .35s var(--ease-out);
}
.flow-trigger__pill svg { fill: #000; }
.flow-trigger:hover img, .flow-trigger:focus-visible img { opacity: .45; }
.flow-trigger:hover .flow-trigger__pill, .flow-trigger:focus-visible .flow-trigger__pill { opacity: 1; transform: translate(-50%, -50%) scale(1); }
@media (hover: none) { /* touch: always visible, under the phones */
  .flow-trigger__pill { top: auto; bottom: 12px; opacity: 1; transform: translateX(-50%); }
}

/* All-screens dialog */
.flow { width: min(1200px, calc(100% - 32px)); max-width: none; max-height: none; margin: auto; padding: 0; border: 0; background: transparent; color: inherit; overflow: visible; }
.flow::backdrop { background: rgba(0, 0, 0, .75); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.flow[open] { animation: flow-in .35s var(--ease-out); }
.flow[open]::backdrop { animation: flow-fade .3s var(--ease); }
@keyframes flow-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes flow-fade { from { opacity: 0; } }
html:has(.flow[open]) { overflow: hidden; }
.flow__panel { --sw: 250px; display: flex; flex-direction: column; gap: 24px; padding: 24px 0 28px; border-radius: 24px; background: var(--surface); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.flow__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 0 24px 0 28px; }
.flow__title { display: flex; align-items: center; gap: 8px; font-size: 16px; color: rgba(255, 255, 255, .5); }
.flow__brand { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: calc(500 - var(--wd)); }
.flow__actions { display: flex; align-items: center; gap: 12px; }
.flow__meta { font-size: 13px; color: rgba(255, 255, 255, .8); }
.flow__close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: var(--surface-2); cursor: pointer; transition: background-color .2s var(--ease); }
.flow__close:hover { background: var(--surface-3); }
.flow__viewport { position: relative; }
.flow__viewport::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 140px; pointer-events: none; background: linear-gradient(90deg, rgba(17, 17, 19, 0), #111113); transition: opacity .3s var(--ease); }
.flow__viewport.at-end::after { opacity: 0; }
.flow__screens { list-style: none; margin: 0; padding: 0 28px; display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 28px; overscroll-behavior-x: contain; scrollbar-width: none; }
.flow__screens::-webkit-scrollbar { display: none; }
.flow__screens li { flex: none; width: var(--sw); display: flex; flex-direction: column; gap: 14px; scroll-snap-align: start; }
.flow__screens img { width: var(--sw); height: calc(var(--sw) * 2.164); object-fit: cover; object-position: top; border-radius: 24px; background: #1a1a1a; }
.flow__screens p { display: flex; align-items: baseline; gap: 8px; font-size: 14px; color: rgba(255, 255, 255, .8); }
.flow__screens p span { font-family: var(--mono); font-size: 12px; color: rgba(255, 255, 255, .4); }
.flow__nav {
  position: absolute; z-index: 1; top: calc(var(--sw) * 1.082 - 22px);
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: #fff; color: #000; font-size: 18px; font-weight: calc(500 - var(--wd)); cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4); transition: opacity .25s var(--ease), transform .2s var(--ease);
}
.flow__nav:active { transform: scale(.94); }
.flow__nav--next { right: 28px; }
.flow__nav--prev { left: 28px; }
.flow__nav.is-hidden { opacity: 0; pointer-events: none; }
.flow__hint { padding: 0 28px; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: rgba(255, 255, 255, .4); }

.roles { max-width: 900px; margin-inline: auto; padding: 4px 24px; }
.roles li { position: relative; display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: 16px 0; font-size: 15px; color: var(--muted); }
.roles.group > li + li::before { left: 40px; }
.roles__name { display: flex; align-items: center; gap: 16px; color: #fff; font-weight: calc(500 - var(--wd)); align-self: start; }
.roles__name i { flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--surface-2); }

.chapter { padding: 56px 0 72px; display: flex; flex-direction: column; gap: 56px; }
.chapter__row { display: flex; justify-content: space-between; align-items: center; gap: 48px; }
.chapter__row--reverse { flex-direction: row-reverse; }
.chapter__head { flex: 0 1 560px; display: flex; flex-direction: column; gap: 20px; }
.chapter__num { font-size: 25px; line-height: 1.2; letter-spacing: -0.015em; font-weight: calc(400 - var(--wd)); margin-bottom: 8px; }
.chapter__num span { color: rgba(255, 255, 255, .35); margin-right: 12px; }
.chapter__visual { flex: 0 1 590px; width: 100%; max-width: 590px; min-width: 0; border-radius: var(--r-card); }
.mockups { display: flex; justify-content: center; align-items: flex-start; gap: 2.2%; border-radius: 0; }
.mockups img { flex: 0 1 31.86%; min-width: 0; width: 31.86%; height: auto; aspect-ratio: 564 / 1221; }
.flow-trigger .mockups { width: 100%; }
.objective { display: flex; gap: 14px; align-items: center; margin-top: 4px; padding: 14px 18px; background: var(--surface); border-radius: 16px; }
.objective img { flex: none; width: 14px; height: 14px; }
.objective p { display: flex; flex-direction: column; gap: 4px; font-size: 15px; font-weight: calc(500 - var(--wd)); color: rgba(255, 255, 255, .88); }

.next { display: flex; flex-direction: column; gap: 16px; padding: 72px 0 0; }
.next .eyebrow { padding-left: 4px; }
.next__tile {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 36px; background: var(--surface); border-radius: var(--r-big);
  transition: filter .4s var(--ease);
}
.next__tile--bel { background: var(--surface); }
.next__tile--bel::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--noise); opacity: .04; }
.next__tile--bel .muted { color: rgba(255, 255, 255, .7); }
.next__tile:hover { filter: brightness(1.08); }
.next__arrow { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #fff; color: #000; font-size: 18px; font-weight: calc(500 - var(--wd)); transition: transform .3s var(--ease); }
.next__tile:hover .next__arrow { transform: translateX(4px); }

/* ---------- Backstage strip (case footers) ----------
   Small mockups in one row, cropped to the column with both sides fading out: the row slides on its own,
   loops seamlessly and can be dragged (main.js adds .is-live and places the cards; extra rows, if any,
   slide the other way). Without the script it is a static row, centred. */
.strip {
  --w: 140px; --gap: 24px;
  --fade: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
  position: relative; margin-top: 48px; overflow: hidden;
  -webkit-mask-image: var(--fade); mask-image: var(--fade);
  cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.strip.is-dragging { cursor: grabbing; }
.strip__track { display: flex; justify-content: center; gap: var(--gap); }
.strip__item { flex: none; width: var(--w); margin: 0; }
.strip__item img { display: block; width: 100%; height: auto; pointer-events: none; -webkit-user-drag: none; }
.strip.is-live .strip__track { position: relative; display: block; height: calc(var(--w) * 1173 / 544); }
.strip.is-live .strip__track + .strip__track { margin-top: var(--gap); }
.strip.is-live .strip__item { position: absolute; left: 0; top: 0; will-change: transform; }

/* ---------- Smooth scroll (Lenis, see main.js) ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ---------- Page loader ----------
   Shown at every page switch (html.is-loading, set in the <head>). The c grows in the middle first, then a
   Figma-style selection frame draws around it and its four handles pop in. main.js then
   adds .loader-out (mark shrinks, overlay fades) and removes the classes. Leaving a page (.is-exiting)
   just fades the page to the loader colour, mark hidden, before the browser navigates. */
.loader { display: none; }
.is-loading .loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: #151515; }
.loader__logo { width: 72px; height: auto; overflow: visible; transition: transform .35s var(--ease), opacity .3s var(--ease); }
.loader__logo path { fill: #fff; }
/* Selection frame (Figma style): the box draws itself clockwise from the top left, and each handle
   pops in as the line reaches its corner */
.loader__box { fill: none; stroke: rgba(255, 255, 255, .5); stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: 1; animation: loader-box .6s cubic-bezier(.65, 0, .35, 1) .4s forwards; }
.loader__handle { fill: #151515; stroke: rgba(255, 255, 255, .5); stroke-width: 3; opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; transform: scale(.4); animation: loader-handle .4s cubic-bezier(.34, 1.56, .64, 1) calc(.4s + var(--i) * .15s) forwards; }
.loader__glyph { opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; transform: scale(.6); animation: loader-glyph .5s cubic-bezier(.16, 1, .3, 1) .1s forwards; }
@keyframes loader-box { to { stroke-dashoffset: 0; } }
@keyframes loader-handle { to { opacity: 1; transform: none; } }
@keyframes loader-glyph { to { opacity: 1; transform: none; } }
.loader-out .loader { opacity: 0; transition: opacity .45s var(--ease) .1s; }
.loader-out .loader__logo { opacity: 0; transform: scale(.88); }
.is-exiting .loader { animation: loader-cover .3s var(--ease) both; }
.is-exiting .loader__logo { visibility: hidden; }
@keyframes loader-cover { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .loader__corner, .loader__glyph { animation: none; opacity: 1; transform: none; }
  .loader__logo { transition: none; }
}

/* ---------- Motion ---------- */
/* Soft cross-fade between the home and the case studies (browsers that support it) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; animation-timing-function: var(--ease); }

/* Motion (motion.dev) animates these in from main.js; CSS only sets the starting state.
   Only runs when JS adds .motion on <html> (and reduced motion is off). */
.motion .rv-item, .motion .intro, .motion .rv-word, .motion .terminal .t-line { opacity: 0; }
/* Titles split into words by main.js: each word rises on its own (only when motion runs) */
.w { display: inline-block; }
/* Phone screens are wrapped so the entrance (wrapper) and the scroll parallax (image) don't collide */
.phone { display: block; min-width: 0; }
/* Reading progress on the case studies (drawn by main.js): a thin rail on the very left edge of the screen */
.progress-rail { position: fixed; left: 0; top: 0; bottom: 0; z-index: 20; width: 2px; background: rgba(255, 255, 255, .2); transform: scaleY(0); transform-origin: 50% 0; pointer-events: none; }
.motion .step__dot { opacity: 0; transform: scale(.4); }
.motion .step__rail { transform: scaleX(0); }

.column > * { position: relative; z-index: 1; }
.column > .mesh { position: absolute; z-index: -1; }

/* Hover details */
.card__thumb, .column__illu { transition: transform .5s var(--ease-out), opacity .5s var(--ease-out); }
.row:hover .row__dates { color: rgba(255, 255, 255, .75); }
.column:hover .column__illu { transform: translateY(-6px); }
.card:hover .card__thumb { transform: scale(1.06) rotate(-4deg); }
.roles li { transition: color .3s var(--ease); }
.roles li:hover { color: rgba(255, 255, 255, .7); }
.roles__name i { transition: background-color .3s var(--ease), transform .4s var(--ease-out); }
.roles li:hover .roles__name i { background: rgba(255, 255, 255, .16); transform: rotate(45deg) scale(.8); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  :root { --gutter: 48px; }
  .columns { grid-template-columns: repeat(2, 1fr); }
  .column { min-height: 380px; }
  .timeline { padding: 40px 28px 32px; }
  .timeline__steps { --gap: 20px; }
  .case-hero__title { font-size: 38px; }
  .chapter__row, .chapter__row--reverse { flex-direction: column; align-items: stretch; gap: 40px; }
  .chapter__head { flex: none; }
  .chapter__visual { align-self: center; flex: none; }
}

@media (max-width: 900px) {
  /* Scenes stack: card, then caption */
  .work__item, .work__item:nth-child(even) { grid-template-columns: 1fr; gap: 28px; min-height: 0; padding-block: 40px; }
  .work__item:nth-child(even) .work__media { order: 0; transform-origin: 0 50%; }
  .duo { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; --r-big: 20px; }
  .nav { --nav-h: 56px; }
  .nav__inner { width: calc(100% - 2 * var(--gutter) + 24px); }
  .nav__links { gap: 0; }
  .nav__links a { height: 34px; padding: 0 12px; }
  .hero { padding: 40px 0 64px; gap: 24px; }
  .hero__title { font-size: 28px; }
  .hero__name { font-size: 44px; margin-bottom: 8px; }
  .section { padding: 48px 0; }
  .sec-head { margin-bottom: 32px; gap: 10px; }
  .sec-title { font-size: 30px; }
  .sec-sub { font-size: 17px; }
  .headline { font-size: 22px; }
  .work { padding-bottom: 24px; }
  .work__item, .work__item:nth-child(even) { gap: 20px; padding-block: 28px; }
  .work__title { font-size: 24px; }
  .strip { --w: 96px; --gap: 14px; margin-top: 32px; }
  .work__sub { font-size: 16px; }
  .group { padding: 0 16px; }
  .group__label { padding: 0 16px 8px; }
  .row { align-items: flex-start; flex-wrap: wrap; }
  .row__dates { width: 100%; padding-left: 54px; margin-top: -6px; }
  .columns { grid-template-columns: 1fr; gap: 12px; }
  .column { min-height: 0; }
  .column__illu { margin-top: 20px; }
  .timeline { padding: 24px 20px; }
  .timeline__steps { grid-template-columns: 1fr; gap: 0; }
  .step { display: grid; grid-template-columns: 11px 1fr; column-gap: 16px; row-gap: 4px; padding: 0 0 20px; }
  .step__rail { left: 5px; top: 14px; bottom: 0; width: 1px; height: auto; transform-origin: center top; }
  .step:last-child .step__rail { width: 0; border-top: 0; border-left: 1px dashed rgba(255, 255, 255, .25); }
  .motion .step__rail { transform: scaleY(0); }
  .step > * { grid-column: 2; }
  .step__dot { grid-column: 1; grid-row: 1; margin: 3px 0 0; position: relative; z-index: 1; }
  .terminal { font-size: 11px; line-height: 18px; }
  .terminal br { display: none; }
  .terminal__path { overflow: hidden; text-overflow: ellipsis; }
  .t-faint { display: none; }
  .duo { grid-template-columns: 1fr; }
  .blueprint { --bp-pad: 16px; }
  .team-card { padding: 22px; }
  .team-card__visual { min-height: 120px; margin-bottom: 14px; }
  .cards { grid-template-columns: 1fr; gap: 12px; }
  .card { flex-direction: row; align-items: center; padding: 18px; }
  .card--more { flex-direction: column; }
  .accordion { height: 340px; gap: 6px; }
  .accordion__item { flex-basis: 44px; }
  .footer { padding-top: 48px; }
  .contact { min-height: 320px; }
  .contact__title { font-size: 28px; }
  .bottom { flex-direction: column-reverse; align-items: flex-start; }

  .about { flex-direction: column-reverse; gap: 28px; padding: 56px 0 56px; }
  .about__photo { width: 140px; }
  .about__title { font-size: 30px; }
  .about__body { font-size: 16px; }
  .facts { column-gap: 20px; padding-bottom: 72px; }
  .case-hero { padding: 40px 0 32px; gap: 18px; }
  .case-hero__title { font-size: 28px; }
  .case-hero__lead { font-size: 16px; }
  .info { grid-template-columns: 1fr; padding: 4px 16px; margin-top: 24px; margin-bottom: 24px; text-align: left; }
  .info__item { flex-direction: row; justify-content: space-between; align-items: baseline; padding: 14px 0; }
  .case-visual { padding-bottom: 0; }
  .bento { grid-template-columns: 1fr; }
  .bento__side { grid-auto-rows: 128px; }
  .bcard--downloads { min-height: 240px; }
  .bcard__value { font-size: 34px; }
  .bcard__value--xl { font-size: 72px; }
  .marquee__set img { margin-right: 64px; }
  .pain-gain { grid-template-columns: 1fr; }
  .pain-gain__arrow { height: 48px; rotate: 90deg; }
  .pg-card { padding: 24px; gap: 24px; }
  .pg-card__title { font-size: 23px; }
  .pains { gap: 16px; }
  .pain img { width: 130px; margin-bottom: 16px; }
  .pain p, .promises li { font-size: 15px; }
  .identity__top { flex-direction: column; align-items: flex-start; }
  .swatches { grid-template-columns: 1fr; gap: 10px; }
  .flow { width: calc(100% - 16px); }
  .flow__panel { --sw: 200px; gap: 18px; padding: 18px 0 20px; border-radius: 20px; }
  .flow__head { padding: 0 16px 0 20px; }
  .flow__meta { display: none; }
  .flow__screens { padding: 0 20px; gap: 14px; scroll-padding-inline: 20px; }
  .flow__nav { display: none; }
  .flow__hint { padding: 0 20px; }
  .roles { padding: 4px 16px; }
  .roles li { grid-template-columns: 1fr; gap: 6px; }
  .roles li > span:last-child { padding-left: 40px; }
  .chapter { padding: 40px 0 48px; gap: 40px; }
  .chapter__num { font-size: 22px; }
  .next { padding-top: 48px; }
  .next__tile { padding: 22px; }
}
