/* ==========================================================================
   Kirill Plysheuski - portfolio
   Light theme only. Geist. Single accent. Minimal motion.
   Shape rule: 6px for controls (buttons, tags), 14px for media and cards.
   ========================================================================== */

:root {
  color-scheme: light;

  /* Palette: Tailwind "Slate", as used on benroachdesign.com. Backup of the previous palette: styles.before-slate.css */
  --bg: #f8fafc;            /* page background (slate-50) */
  --surface: #ffffff;       /* cards */
  --ink: #0f172a;           /* text: primary (slate-900) */
  --ink-2: #475569;         /* text: captions, secondary strong (slate-600) */
  --muted: #64748b;         /* text: secondary (slate-500) */
  --line: #e2e8f0;          /* hairlines, secondary button border (slate-200) */
  --media: #e2e8f0;         /* image placeholders, timeline bars (slate-200) */
  --placeholder-text: #94a3b8; /* label inside placeholders (slate-400) */
  --accent: #0f172a;        /* UI accent (focus ring): same as primary text */
  --brand: #038688;         /* brand accent for text on light background (deep teal, contrast ~4.3:1) */
  --brand-bright: #36d8dc;  /* bright aqua from the reference: for fills and lines, too light for text on this background */

  /* Buttons */
  --btn-bg: #1e293b;        /* primary (slate-800) */
  --btn-bg-hover: #0f172a;
  --btn-fg: #f8fafc;
  --btn-2-fg: #0f172a;      /* secondary: transparent, border = --line */
  --btn-2-border-hover: #cbd5e1;   /* slate-300 */

  /* Links */
  --link: #0f172a;
  --link-hover: #0f172a;
  --link-muted: #475569;    /* menu and footer links at rest */

  --radius-s: 6px;
  --radius-m: 14px;

  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --gutter: clamp(16px, 4vw, 48px);
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] { display: none !important; }   /* a block with `hidden` stays hidden even if its own class sets display */
h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.container {
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.muted { color: var(--muted); }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--btn-bg); color: var(--btn-fg); padding: 10px 14px; border-radius: var(--radius-s);
  transition: top 160ms var(--ease-out);
}
.skip-link:focus { top: 12px; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.site-header.is-stuck { border-bottom-color: var(--line); }

.site-header__inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
/* Brand: circular photo + bold name */
.brand { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.brand__avatar { position: relative; flex: none; width: 36px; height: 36px; }
.brand__photo {
  position: absolute; inset: 0; border-radius: 999px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--line);
}
.brand__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Particle canvas: larger than the avatar so dots can scatter around it. Sized and drawn in main.js */
.brand__dust { position: absolute; left: -22px; top: 50%; z-index: 2; pointer-events: none; opacity: 0; transform: translateY(-50%); }
.brand.is-dusting .brand__dust { opacity: 1; }
.brand.is-dusting .brand__photo { opacity: 0; }
.brand__name { font-weight: 700; font-size: 16px; letter-spacing: -0.015em; }

.site-nav { display: flex; gap: clamp(16px, 3vw, 36px); font-size: 15px; }
.site-nav a { position: relative; padding-block: 6px; color: var(--link-muted); transition: color 160ms ease; white-space: nowrap; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 1px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform 220ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .site-nav a:hover { color: var(--link-hover); }
  .site-nav a:hover::after { transform: scaleX(1); }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: var(--radius-s);
  font-size: 15px; font-weight: 500; line-height: 1; white-space: nowrap;
  border: 1px solid transparent;
  transition: transform 160ms var(--ease-out), background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.btn:active { transform: scale(0.97); }
.btn__arrow { display: inline-block; transition: transform 220ms var(--ease-out); }

.btn--primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn--secondary { background: transparent; color: var(--btn-2-fg); border-color: var(--line); }

@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--btn-bg-hover); }
  .btn--secondary:hover { border-color: var(--btn-2-border-hover); }
  .btn:hover .btn__arrow { transform: translateX(3px); }
}

/* --------------------------------------------------------------------------
   Type
   -------------------------------------------------------------------------- */
.h2 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.08; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  padding-top: clamp(32px, 6vh, 72px); padding-bottom: clamp(0px, 1vw, 12px);
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(240px, 22vw, 320px);
  column-gap: clamp(32px, 5vw, 80px); align-items: start;
}
.hero__main { min-width: 0; }
/* Accent words ("Product design" in the hero, "From ambiguous" and "to products" in Approach): brand colour with a bright aqua light that follows the cursor inside the letters, plus one soft sheen that sweeps across it after load */
.hero__accent { color: var(--brand); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero__accent, .approach__accent {
    background:
      linear-gradient(100deg, transparent 42%, rgb(255 255 255 / 0.7) 50%, transparent 58%) -160% 0 / 260% 100% no-repeat,
      radial-gradient(150px circle at var(--mx, -400px) var(--my, -400px), var(--brand-bright) 0%, transparent 72%),
      linear-gradient(var(--brand), var(--brand));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
  }
  @media (prefers-reduced-motion: no-preference) {
    .js .hero__accent { animation: sheen 1500ms var(--ease-in-out) 900ms 1 both; }
    .approach__title.is-sheen .approach__accent { animation: sheen 1500ms var(--ease-in-out) 250ms 1 both; }   /* plays once when the heading scrolls into view */
  }
}
@keyframes sheen { from { background-position: -160% 0, 0 0, 0 0; } to { background-position: 160% 0, 0 0, 0 0; } }
.hero__photo {
  margin: 0; aspect-ratio: 3 / 4; border-radius: var(--radius-m); overflow: hidden; background: var(--media);
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 36%; display: block; }
.hero .metrics { grid-column: 1 / -1; }

.hero__title {
  font-size: clamp(40px, 6.1vw, 92px);
  font-weight: 600; letter-spacing: -0.05em; line-height: 1.02;   /* between the 500 body-heading weight and the 700 brand name */
  max-width: 26ch; text-wrap: balance;
}

.hero__row { margin-top: clamp(28px, 4.5vh, 52px); display: flex; flex-direction: column; gap: 32px; align-items: flex-start; }
.hero__lede { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.5; color: var(--muted); max-width: 52ch; }
.hero__lede strong { color: var(--ink); font-weight: 600; }   /* key phrases: darker and bolder, as in the reference */
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* Key figures: four soft cards (slate-100), big number on top, caption below */
.metrics {
  margin-top: clamp(24px, 4vh, 44px);
  display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 16px; row-gap: 16px;
}
.metrics__item {
  display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 14px;
  padding: 28px 24px 32px; background: #f1f5f9; border-radius: var(--radius-m);
}
.metrics__value { grid-row: 1; font-size: clamp(40px, 4.6vw, 64px); font-weight: 500; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
/* The "+" is smaller and lighter than the digits; vertical-align lifts it back to the middle of the digit height */
.metrics__plus { display: inline-block; transform-origin: left center; transition: opacity 320ms ease, transform 380ms var(--ease-out); color: var(--muted); font-size: 0.62em; font-weight: 500; letter-spacing: 0; vertical-align: 0.17em; margin-left: 0.04em; }
.metrics__num { display: inline-block; text-align: left; font-variant-numeric: tabular-nums; }   /* width is fixed in JS while counting, so the + doesn't jump */
.metrics.is-counting .metrics__plus { opacity: 0; transform: scale(0.6); }   /* hidden while the digits count */
.metrics__label { grid-row: 2; font-size: 16px; color: var(--ink-2); line-height: 1.4; max-width: 24ch; }
/* Results as proof: each card is a link to its case; same card look as before, a small case name at the bottom */
.metrics--proof { list-style: none; padding: 0; }
.metrics--proof > li { display: flex; min-width: 0; }
.metrics--proof .metrics__item { flex: 1; color: inherit; text-decoration: none; grid-template-rows: auto 1fr auto; transition: background-color 220ms ease, box-shadow 220ms ease; }
.metrics--proof .metrics__value { font-size: clamp(34px, 3.7vw, 52px); white-space: nowrap; }
.metrics__case { grid-row: 3; margin-top: 6px; font-size: 14px; font-weight: 500; color: var(--muted); display: inline-flex; gap: 6px; align-items: baseline; transition: color 200ms ease; }
.metrics__case span { transition: transform 240ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .metrics--proof .metrics__item:hover { background: #e9eff6; }
  .metrics--proof .metrics__item:hover .metrics__case { color: var(--brand); }
  .metrics--proof .metrics__item:hover .metrics__case span { transform: translate(2px, -2px); }
}
.metrics--proof .metrics__item:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
@media (max-width: 767px) {
  .metrics--proof .metrics__item { padding: 20px 16px 22px; gap: 10px; }
  .metrics--proof .metrics__value { font-size: clamp(22px, 6.4vw, 30px); }
  .metrics--proof .metrics__label { font-size: 14px; }
}

/* --------------------------------------------------------------------------
   Media placeholders (replace with <img>, <video> or a background image)
   -------------------------------------------------------------------------- */
.media {
  position: relative; width: 100%;
  background: var(--media); border-radius: var(--radius-m); overflow: hidden;
  display: grid; place-items: center;
}
.media::after {
  content: attr(data-label);
  font-family: var(--mono); font-size: 12px; color: var(--placeholder-text); letter-spacing: 0;
  padding: 0 16px; text-align: center;
}
.media img, .media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media:has(img)::after, .media:has(video)::after { display: none; }

.media--wide { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 4 / 5; }
/* Media band breaks out of the 1360px grid: about 30% larger than the grid on wide screens,
   and on a 1440 window it runs to ~36px from the edges. Taller than before (2:1). */
.media-band { max-width: none; padding-inline: clamp(20px, 2.5vw, 40px); padding-bottom: 0; }
.media-band .media { width: 100%; max-width: 1650px; margin-inline: auto; aspect-ratio: 2 / 1; max-height: 82vh; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding-block: clamp(56px, 7.5vw, 104px) 0; }

/* Expertise */
.expertise { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 40px; }
.expertise__head { grid-column: 1 / span 4; }
.expertise__groups { grid-column: 5 / span 8; }
.expertise__group {
  display: grid; grid-template-columns: 180px 1fr; column-gap: 24px;
  padding-block: 28px; border-top: 1px solid var(--line);
}
.expertise__group:last-child { border-bottom: 1px solid var(--line); }
.expertise__label { font-size: 15px; font-weight: 500; color: var(--muted); padding-top: 4px; }
.expertise__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; row-gap: 10px; font-size: 19px; letter-spacing: -0.01em; line-height: 1.35; }

/* Projects */
.projects__head { margin-bottom: clamp(24px, 3vw, 40px); }
.projects__all { margin-top: clamp(32px, 4vw, 56px); display: flex; justify-content: center; }

/* Project cards: bento grid. Row 1: two wide cards, row 2: three cards (5 projects).
   No card container: the preview carries the card, text sits below it. */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: clamp(40px, 5vw, 64px); }
.project-card { grid-column: span 4; display: flex; flex-direction: column; gap: 20px; }
.project-card:nth-child(-n+2) { grid-column: span 6; }
.project-card__media { position: relative; overflow: hidden; border-radius: var(--radius-m); }
/* brand-coloured light that follows the cursor over the cover (--mx / --my come from main.js, set on the card) */
.project-card__media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 320ms ease;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), rgb(54 216 220 / 0.3), transparent 62%);
}
@media (hover: hover) and (pointer: fine) { .project-card:hover .project-card__media::after { opacity: 1; } }
/* Round "go" button in the bottom-right corner of the preview: page-colour circle, dark chevron. Appears on hover or keyboard focus. */
.project-card__go {
  position: absolute; right: 16px; bottom: 16px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg); pointer-events: none;
  opacity: 0; transform: translateY(8px) scale(0.9);
  transition: opacity 220ms ease, transform 320ms var(--ease-out);
}
.project-card__go::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px;
  border-top: 2.5px solid var(--ink); border-right: 2.5px solid var(--ink); border-radius: 1px;
  transform: translate(-65%, -50%) rotate(45deg);
}
.project-card:focus-visible .project-card__go { opacity: 1; transform: none; }
.project-card .media { border-radius: 0; aspect-ratio: 4 / 3; transition: transform 600ms var(--ease-out); }
.project-card:nth-child(-n+2) .media { aspect-ratio: 4 / 3; }
.project-card__body { display: flex; flex-direction: column; gap: 6px; }
.project-card__meta { font-size: 18px; color: var(--muted); letter-spacing: -0.01em; line-height: 1.3; }
.project-card__title { font-size: clamp(22px, 2vw, 28px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; transition: color 200ms ease; }
.project-card__desc {
  margin-top: 4px; color: var(--muted); font-size: 16px; line-height: 1.5; max-width: 46ch;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
@media (hover: hover) and (pointer: fine) {
  .project-card:hover .media { transform: scale(1.03); }
  .project-card:hover .project-card__title { color: var(--brand); }
  .project-card:hover .project-card__go { opacity: 1; transform: none; }
}
/* Approach (timeline) */
.approach { text-align: center; }
.approach__accent { color: var(--brand); font-weight: 600; }
.approach__title {
  font-size: clamp(30px, 4.4vw, 60px); font-weight: 500; letter-spacing: -0.045em; line-height: 1.06;
  max-width: 20ch; margin-inline: auto; text-wrap: balance;
}

.seg {
  display: inline-flex; gap: 4px; margin-top: clamp(32px, 4vw, 48px);
  padding: 4px; background: var(--media); border-radius: var(--radius-s);
}
.seg__btn {
  padding: 11px 18px; border-radius: 4px; font-size: 15px; font-weight: 500; color: var(--muted);
  transition: background-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out);
}
.seg__btn:active { transform: scale(0.97); }
.seg__btn.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(16 19 23 / 0.08); }
@media (hover: hover) and (pointer: fine) { .seg__btn:not(.is-active):hover { color: var(--ink); } }

.phases { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.gantt { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); }   /* 10 = two sub-columns per phase (5 phases), for finer bar lengths */
.phases { margin-top: clamp(40px, 5vw, 64px); text-align: left; font-size: 14px; color: var(--muted); }
.phases span { padding-left: 14px; }

.gantt { position: relative; margin-top: 14px; row-gap: 10px; text-align: left; padding-block: 14px; }
/* Phase dividers: one line at each boundary between phases (none on the outer left edge, none at the bottom) */
.gantt::before {
  content: ""; position: absolute; top: 0; height: 71px; left: calc(100% / 5); right: 0; pointer-events: none;   /* 71px = top padding + first row + half the row gap: dividers stop before the second row */
  background-image: repeating-linear-gradient(to right, var(--line) 0, var(--line) 1px, transparent 1px, transparent calc(100% / 4));
}
/* Delivery tab: a divider before Discover (left edge) and the divider before Scale both run through both rows.
   The Scale one is clear of every second-row bar; the left one sits to the left of all bars. */
.gantt--last-divider-full { box-shadow: inset 1px 0 0 var(--line); }
.gantt--last-divider-full::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: calc(100% * 4 / 5); width: 1px; background: var(--line); pointer-events: none;
}
.bar {
  position: relative; grid-column: var(--c); grid-row: var(--r);
  margin-inline: 4px; padding: 14px; min-height: 52px;
  display: flex; align-items: center;
  border-radius: var(--radius-s); background: var(--media); color: var(--ink);
  font-size: clamp(13px, 1.05vw, 15px); line-height: 1.25; font-weight: 500;
}
/* Highlighted bar: brand colour with a vertical gradient, a light top edge and a soft bottom shade for a little volume */
.bar--accent {
  color: #fff; font-weight: 600;
  background: linear-gradient(180deg, #2bc0c4 0%, #0d9a9d 55%, #038688 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.38), inset 0 -1px 0 rgb(0 0 0 / 0.12), 0 1px 2px rgb(3 134 136 / 0.25);
  text-shadow: 0 1px 1px rgb(0 0 0 / 0.18);
}

/* Design leadership tab: four theme columns, two rows. Row titles (Team, Product) sit above the first block of each row.
   Grid rows: 1 column titles, 2 "Team" title, 3 team blocks, 4 "Product" title, 5 product blocks, 6 closing lines. */
.lead {
  margin-top: clamp(40px, 5vw, 64px); text-align: left;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 16px; row-gap: 12px;
}
.lead { position: relative; isolation: isolate; }
/* Vertical dividers in the middle of each column gap, drawn behind the blocks like in Product delivery.
   The first two are gradients on the full height; the last one (before Growth) is a grid item that stops above the wide block. */
.lead::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(var(--line), var(--line)) calc((100% - 48px) / 4 + 8px) 0 / 1px 100% no-repeat,
    linear-gradient(var(--line), var(--line)) calc((100% - 48px) / 2 + 24px) 0 / 1px 100% no-repeat;
}
.lead__col { display: contents; }   /* --col is set on each column wrapper and inherited by its children */
.lead__head { grid-column: var(--col); grid-row: 1; margin: 0; padding: 0 0 4px 4px; font-size: 14px; font-weight: 400; color: var(--muted); }
.lead__rowtitle { grid-column: 1; grid-row: var(--r); margin: 10px 0 -2px; padding-left: 4px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.lead__card {
  grid-column: var(--col); margin: 0; padding: 14px 16px; display: flex; align-items: center;
  background: var(--media); border-radius: var(--radius-s);
  font-size: clamp(13px, 1.05vw, 15px); font-weight: 500; line-height: 1.3; color: var(--ink);
}
.lead__card[data-row="Team"] { grid-row: 3; }
.lead__card[data-row="Product"] { grid-row: 5; }
.lead__card--wide { grid-column: var(--col) / span 2; }   /* runs over the empty slot of the next column */
.lead__vline { grid-column: var(--col); grid-row: 1 / span 4; margin-left: -8px; border-left: 1px solid var(--line); pointer-events: none; }
.lead__foot { display: none; }   /* closing lines were removed; element kept in markup only for easy restore */

/* Approach effects: sliding thumb, bars that draw in, lines that grow, hover focus */
.seg { position: relative; }
.seg__thumb {
  position: absolute; top: 4px; left: 4px; height: calc(100% - 8px); width: 0; border-radius: 4px; pointer-events: none;
  background: var(--surface); box-shadow: 0 1px 2px rgb(15 23 42 / 0.08), 0 4px 10px -4px rgb(15 23 42 / 0.12);
  transition: transform 380ms var(--ease-out), width 380ms var(--ease-out);
}
.seg__btn { position: relative; z-index: 1; }
.seg.has-thumb .seg__btn.is-active { background: transparent; box-shadow: none; }

@keyframes bar-in { from { opacity: 0; transform: translateY(8px) scaleX(0.6); } to { opacity: 1; transform: none; } }
@keyframes line-in { from { transform: scaleY(0); } to { transform: none; } }
@keyframes label-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.approach.will-play .approach__panel:not(.is-play) :is(.bar, .lead__card, .phases span) { opacity: 0; }
.approach__panel.is-play .bar, .approach__panel.is-play .lead__card { animation: bar-in 640ms var(--ease-out) backwards; animation-delay: calc(var(--k, 0) * 70ms + 120ms); transform-origin: left center; }
.approach__panel.is-play .phases span { animation: label-in 480ms var(--ease-out) backwards; }
.approach__panel.is-play .gantt::before, .approach__panel.is-play .gantt::after { transform-origin: top; animation: line-in 700ms var(--ease-out) backwards; animation-delay: 80ms; }

/* Steps: no lift and no shadow; the only hover effect is the cursor-following light (same as the cards), drawn on top via ::after */
.bar, .lead__card { position: relative; overflow: hidden; }   /* position: relative keeps the glow inside each block */
.bar::after, .lead__card::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 320ms ease;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgb(54 216 220 / 0.3), transparent 62%);
}
.bar--accent::after { background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgb(255 255 255 / 0.32), transparent 62%); }
@media (hover: hover) and (pointer: fine) { .bar:hover::after, .lead__card:hover::after { opacity: 1; } }

.approach__panel { display: none; }
.approach__panel.is-active { display: block; animation: swap 360ms var(--ease-out); }
.approach__text { margin: 36px auto 0; max-width: 62ch; color: var(--muted); font-size: 17px; }

@keyframes swap { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Let's talk */
.cta-card {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: clamp(28px, 4vw, 56px);
}
.cta-card__title { font-size: clamp(36px, 4.4vw, 60px); font-weight: 500; letter-spacing: -0.045em; line-height: 1; }
.cta-card__text { margin-top: 14px; color: var(--muted); max-width: 34ch; }

/* Metric cards on Home share the look of the About cards: soft gradient, hairline border, deep shadow, lift and a cursor-following light */
.metrics__item {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fb 100%); border: 1px solid var(--line);
  transition: border-color 240ms ease;   /* no shadow on the metric cards */
}
.metrics__item::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 320ms ease;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 0%), rgb(54 216 220 / 0.2), transparent 62%);
}
.metrics__item > * { position: relative; }
.metrics__item::before { z-index: 1; }
@media (hover: hover) and (pointer: fine) {
  .metrics__item:hover { border-color: #cbd5e1; }
  .metrics__item:hover::before { opacity: 1; }
}
/* --------------------------------------------------------------------------
   Projects page
   -------------------------------------------------------------------------- */
.page-head { padding-top: clamp(40px, 7vh, 88px); padding-bottom: clamp(32px, 5vh, 56px); }
.page-title { font-size: clamp(64px, 13vw, 184px); font-weight: 600; letter-spacing: -0.06em; line-height: 0.92; }
.page-sub { margin-top: clamp(16px, 2.5vw, 28px); max-width: none; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.45; color: var(--muted); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.site-nav a[aria-current="page"]::after { transform: scaleX(1); height: 2px; background: var(--brand); }

.pgrid-wrap { padding-top: 0; }
.pgrid { display: grid; column-gap: 24px; row-gap: clamp(40px, 5vw, 64px); }
.pgrid .project-card, .pgrid .project-card:nth-child(-n+2) { grid-column: auto; }

/* Two wide columns, landscape previews (12 projects = 6 rows). One column on phones. */
.pgrid--c { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pgrid--c .project-card .media { aspect-ratio: 16 / 10; }
@media (max-width: 767px) { .pgrid--c { grid-template-columns: 1fr; } }
/* --------------------------------------------------------------------------
   About page
   -------------------------------------------------------------------------- */
.about-intro { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 40px; align-items: start; padding-bottom: 0; }
.about-intro__text { grid-column: 1 / span 8; }
.about-statement { font-size: clamp(30px, 3.6vw, 52px); font-weight: 500; letter-spacing: -0.04em; line-height: 1.08; text-wrap: balance; color: var(--ink); }
.about-intro__text p:not(.about-statement) { margin-top: 24px; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; color: var(--muted); max-width: 60ch; }
.about-intro__text strong { color: var(--ink); font-weight: 600; }

/* Career column next to the intro: a vertical timeline with logo circles (letters until the logos arrive) and a CV button */
.about-career { grid-column: 10 / span 3; }
.about-career__title { font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.timeline { list-style: none; position: relative; display: grid; gap: 40px; margin-bottom: 40px; }
.timeline::before { content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 2px; background: var(--line); }
.timeline__item { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 18px; align-items: start; }
.timeline__logo {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  background: var(--surface); box-shadow: 0 1px 2px rgb(15 23 42 / 0.08), 0 4px 12px rgb(15 23 42 / 0.06);
  font-size: 16px; font-weight: 600; color: var(--ink);
}
.timeline__logo { overflow: hidden; }
.timeline__logo img { width: 100%; height: 100%; object-fit: cover; display: block; }   /* square logos with their own background fill the tile */
.timeline__logo--wide img { width: 34px; height: auto; object-fit: contain; }   /* wide wordmarks on white sit inside it */
.timeline__text { display: flex; flex-direction: column; gap: 2px; color: var(--ink); font-size: 17px; line-height: 1.3; }
.timeline__text strong { color: var(--ink); font-weight: 700; font-size: 18px; }
.timeline__item--more .timeline__logo { font-size: 14px; color: var(--muted); }
.timeline__text a { color: var(--muted); font-size: 15px; transition: color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .timeline__text a:hover { color: var(--ink); } }
.timeline__years { color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }/* Career timeline appearance (plays when the list scrolls into view): the line draws top to bottom, each logo pops in with a small
   overshoot, its text slides in after it, and the CV button fades up last. .is-in comes from the reveal observer in main.js. */
@keyframes cv-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .js .timeline.reveal { opacity: 1; transform: none; transition: none; }   /* the list itself stays put; its parts animate */
  .js .timeline::before { transform: scaleY(0); transform-origin: top; transition: transform 1300ms var(--ease-in-out); }
  .js .timeline.is-in::before { transform: none; }
  .js .timeline__logo { transform: scale(0.5); opacity: 0; transition: transform 560ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 300ms ease; transition-delay: calc(var(--i, 0) * 170ms + 150ms); }
  .js .timeline__text { opacity: 0; transform: translateX(-14px); transition: opacity 460ms ease, transform 560ms var(--ease-out); transition-delay: calc(var(--i, 0) * 170ms + 260ms); }
  .js .timeline.is-in .timeline__logo { transform: none; opacity: 1; }
  .js .timeline.is-in .timeline__text { transform: none; opacity: 1; }
  /* the CV button waits for the list: hidden until the timeline starts, then rises in after the last item */
  .js .about-career .btn { opacity: 0; }
  .js .timeline.is-in ~ .btn { opacity: 1; animation: cv-in 560ms var(--ease-out) 1.1s backwards; }
}
.btn__doc {
  position: relative; display: inline-block; width: 13px; height: 17px; border: 1.8px solid currentColor; border-radius: 2px;
  background:
    linear-gradient(currentColor, currentColor) 2px 4px / 5px 1.6px no-repeat,
    linear-gradient(currentColor, currentColor) 2px 8px / 5px 1.6px no-repeat;
}
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: clamp(24px, 3vw, 40px); }

/* Career */
.career { list-style: none; border-top: 1px solid var(--line); }
.career__row {
  display: grid; grid-template-columns: 160px minmax(0, 1fr) minmax(0, 1.6fr); column-gap: 32px; align-items: baseline;
  padding-block: 26px; border-bottom: 1px solid var(--line);
}
.career__years { color: var(--muted); font-variant-numeric: tabular-nums; }
.career__who { display: flex; flex-direction: column; gap: 2px; }
.career__who strong { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.career__who em { font-style: normal; color: var(--muted); font-size: 15px; }
.career__what { color: var(--ink-2); max-width: 58ch; }

/* Philosophy */
.philo-lead { max-width: 52ch; font-size: clamp(20px, 2vw, 28px); line-height: 1.3; letter-spacing: -0.02em; color: var(--ink); margin-bottom: clamp(32px, 4vw, 56px); }
.philo { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); column-gap: 24px; padding-block: 40px; border-top: 1px solid var(--line); }
.philo__title { font-size: clamp(32px, 4vw, 56px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; color: var(--brand); }
.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 40px; }
.principles__group { grid-column: 1 / -1; font-size: 14px; color: var(--muted); margin-bottom: -12px; }
.principles__group:not(:first-child) { margin-top: 12px; }
.principle h4 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.principle p { margin-top: 10px; color: var(--ink-2); max-width: 46ch; }
/* Appearance: each principle fades up in turn (the .reveal observer in main.js adds .is-in); titles stay in view while their block scrolls */
.js .principle.reveal { transition-delay: calc(var(--i, 0) * 90ms); }   /* .js prefix: outranks the generic .js .reveal transition shorthand */
.principle h4 { transition: color 200ms ease; }   /* no underline; the title just takes the brand colour on hover */
.principle__tag { transition: color 200ms ease; }
/* Green light that follows the cursor inside each principle; padding and the matching negative margin give it a soft rounded area without moving the text */
.principle { position: relative; overflow: hidden; padding: 16px 14px; margin: -16px -14px; border-radius: var(--radius-m); }
.principle::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 320ms ease;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgb(54 216 220 / 0.2), transparent 62%);
}
@media (hover: hover) and (pointer: fine) {
  .principle:hover::after { opacity: 1; }
  .principle:hover h4 { color: var(--brand); }
  .principle:hover .principle__tag { color: var(--ink); }
}@media (min-width: 1024px) { .philo__title { position: sticky; top: 96px; align-self: start; } }.principle__tag { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--muted); }

/* At a glance: three interactive cards (domains, local time, skills) */
.facts { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.fact {
  position: relative; overflow: hidden; min-width: 0; padding: clamp(24px, 3vw, 36px);
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fb 100%);
  border: 1px solid var(--line); border-radius: var(--radius-m);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04), 0 18px 40px -24px rgb(15 23 42 / 0.18);
  transition: transform 320ms var(--ease-out), box-shadow 320ms var(--ease-out), border-color 240ms ease;
}
/* soft brand-coloured light that follows the cursor (--mx / --my are set in about-page.js) */
.fact::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 320ms ease;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgb(54 216 220 / 0.2), transparent 62%);
}
.fact > * { position: relative; }
.fact::before { z-index: 1; }   /* the green light sits on top of the content */
@media (hover: hover) and (pointer: fine) {
  .fact:hover { border-color: #cbd5e1; }   /* no lift and no stronger shadow: the green light is the only hover effect */
  .fact:hover::before { opacity: 1; }
}
.fact--domains { grid-column: span 7; display: flex; flex-direction: column; gap: 22px; }
.fact--place { grid-column: span 5; display: flex; flex-direction: column; }
.fact--skills { grid-column: span 12; }
.fact__heading { font-size: clamp(22px, 2vw, 28px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
.fact__desc { margin-top: 8px; color: var(--muted); max-width: 46ch; }
.fact__head { margin-bottom: 4px; }

/* Chips (display-only tags and domain buttons) */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px;
  background: var(--surface); box-shadow: 0 0 0 1px var(--line); font-size: 16px; line-height: 1.2; color: var(--ink-2); white-space: nowrap;
  transition: transform 240ms var(--ease-out), background-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}
button.chip { cursor: pointer; }
.chip--static { color: var(--muted); }
.chip--brand { background: var(--brand); color: #fff; font-weight: 500; box-shadow: 0 6px 16px -8px rgb(3 134 136 / 0.7); }
.chip__count { font-size: 12px; font-variant-numeric: tabular-nums; padding: 2px 7px; border-radius: 999px; background: rgb(15 23 42 / 0.07); color: var(--muted); }
.chip--brand .chip__count { background: rgb(255 255 255 / 0.22); color: #fff; }
.chip:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  button.chip:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--brand), 0 8px 18px -10px rgb(3 134 136 / 0.6); color: var(--ink); }
  button.chip.chip--brand:hover { color: #fff; box-shadow: 0 10px 22px -8px rgb(3 134 136 / 0.8); }
}
button.chip[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }
button.chip[aria-pressed="true"] .chip__count { background: rgb(255 255 255 / 0.2); color: #fff; }

/* Related projects panel under the domain chips */
.domain-panel { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); min-height: 132px; }
.domain-panel__hint { color: var(--muted); }
.domain-panel__list { display: grid; gap: 4px; animation: panel-in 320ms var(--ease-out); }
.domain-panel__label { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.domain-panel__item { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 8px 12px; margin-inline: -12px; border-radius: var(--radius-s); transition: background-color 180ms ease; }
.domain-panel__item strong { font-weight: 500; letter-spacing: -0.01em; }
.domain-panel__item span { color: var(--muted); font-size: 14px; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .domain-panel__item:hover { background: rgb(15 23 42 / 0.05); } .domain-panel__item:hover strong { color: var(--brand); } }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Local time: big clock, date, day progress */
.clock { margin-top: auto; padding-top: 20px; display: flex; align-items: baseline; gap: 4px; font-family: var(--mono); font-weight: 500; font-size: clamp(64px, 7.5vw, 104px); letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.clock__sep { color: var(--brand); animation: blink 1s steps(2, start) infinite; }
@keyframes blink { 50% { opacity: 0.15; } }
.clock__date { margin-top: 14px; color: var(--ink-2); font-size: 17px; }
.daybar { margin-top: 20px; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.daybar__fill { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--brand-bright), var(--brand)); transition: width 1200ms var(--ease-out); }
.clock__zone { margin-top: 10px; font-size: 13px; color: var(--muted); }

/* Skills: three rows of pills drifting in alternating directions (pauses on hover; static and wrapped with reduced motion) */
.marquee { display: grid; gap: 14px; margin-top: 26px; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee__row { list-style: none; display: flex; gap: 12px; width: max-content; animation: drift 46s linear infinite; }
.marquee__row--rev { animation-direction: reverse; animation-duration: 54s; }
.marquee__row:nth-child(3) { animation-duration: 50s; }
.marquee:hover .marquee__row, .marquee:focus-within .marquee__row { animation-play-state: paused; }
.marquee__row li {
  padding: 12px 22px; border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); font-size: 17px; color: var(--ink-2); white-space: nowrap;
  transition: transform 240ms var(--ease-out), box-shadow 200ms ease, color 200ms ease;
}
@media (hover: hover) and (pointer: fine) { .marquee__row li:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--brand), 0 10px 20px -12px rgb(3 134 136 / 0.7); color: var(--ink); } }
@keyframes drift { to { transform: translateX(calc(-50% - 6px)); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { mask-image: none; -webkit-mask-image: none; }
  .marquee__row { animation: none; width: auto; flex-wrap: wrap; }
  .marquee__row[aria-hidden="true"] { display: none; }
  .clock__sep { animation: none; }
}

@media (max-width: 1023px) {
  .about-intro__text, .about-career { grid-column: 1 / -1; }
    .career__row { grid-template-columns: 120px minmax(0, 1fr); row-gap: 8px; }
  .career__what { grid-column: 2; }
  .philo { grid-template-columns: 1fr; row-gap: 24px; }
  .fact--skills, .fact--place, .fact--domains { grid-column: span 12; }
}
@media (max-width: 767px) {
  .section-head { flex-wrap: wrap; }
  .career__row { grid-template-columns: 1fr; row-gap: 6px; }
  .career__what { grid-column: 1; }
  .principles { grid-template-columns: 1fr; }
  .chip { white-space: normal; font-size: 15px; padding: 10px 16px; }
}
/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { margin-top: clamp(72px, 11vw, 144px); border-top: 1px solid var(--line); padding-block: 40px 48px; }
.site-footer__inner { display: grid; grid-template-columns: 1fr auto; row-gap: 24px; align-items: start; }
.site-footer__name { font-weight: 500; letter-spacing: -0.01em; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 15px; color: var(--link-muted); }
.site-footer__links a { transition: color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .site-footer__links a:hover { color: var(--link-hover); } }
.footer-copy__wrap { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.footer-copy { display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; margin: 0; border: 0; border-radius: 8px; background: transparent; color: var(--link-muted); cursor: pointer; transition: color 160ms ease, background-color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .footer-copy:hover { color: var(--link-hover); background: rgb(15 23 42 / 0.06); } }
.footer-copy:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.footer-copy.is-done { color: var(--brand); }
.footer-copy__tip { position: absolute; left: 100%; top: 50%; transform: translateY(-50%); margin-left: 6px; font-size: 13px; color: var(--brand); white-space: nowrap; opacity: 0; transition: opacity 160ms ease; pointer-events: none; }
.footer-copy__wrap.is-tip .footer-copy__tip { opacity: 1; }
.site-footer__copy { grid-column: 1 / -1; font-size: 14px; color: var(--muted); }

/* --------------------------------------------------------------------------
   Motion (minimal): load rise, scroll reveal. Only with JS, never with reduced motion.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-rise] { opacity: 0; transform: translateY(14px); animation: rise 640ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 70ms + 60ms); }
  .js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  .hero { grid-template-columns: 1fr; }
  .hero__photo { order: 2; width: min(100%, 360px); aspect-ratio: 4 / 5; margin-top: 40px; justify-self: center; }
  .hero .metrics { order: 3; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .expertise__head, .expertise__groups { grid-column: 1 / -1; }
  .project-card, .project-card:nth-child(-n+2) { grid-column: span 6; }
  .project-card:last-child { grid-column: span 12; }
}

@media (max-width: 767px) {
  body { font-size: 16px; }
  .site-header__inner { gap: 12px; }
  .brand { gap: 10px; }
  .brand__avatar { width: 32px; height: 32px; }
  .brand__name { font-size: 15px; }
  .site-nav { gap: 14px; font-size: 14px; }


  .project-card, .project-card:nth-child(-n+2), .project-card:last-child { grid-column: 1 / -1; }
  .project-card .media, .project-card:nth-child(-n+2) .media { aspect-ratio: 4 / 3; }

  .media--wide { aspect-ratio: 4 / 3; }
  .expertise__group { grid-template-columns: 1fr; row-gap: 12px; }
  .expertise__list { grid-template-columns: 1fr; }

  .seg { width: 100%; }
  .seg__btn { flex: 1; padding-inline: 8px; }
  .phases { display: none; }
  .gantt { grid-template-columns: 1fr; padding-block: 0; margin-top: 28px; }
  .gantt::before, .gantt::after { display: none; }
  .gantt--last-divider-full { box-shadow: none; }
  .bar { grid-column: 1 / -1; grid-row: auto; margin-inline: 0; }

  .lead { grid-template-columns: 1fr; row-gap: 28px; margin-top: 28px; }
  .lead::before, .lead__vline { display: none; }
  .lead__col { display: grid; row-gap: 10px; }
  .lead__head, .lead__card, .lead__foot { grid-row: auto; grid-column: auto; }
  .lead__rowtitle, .lead__foot { display: none; }
  .lead__card { display: block; }
  .lead__card::before { content: attr(data-row); display: block; margin-bottom: 4px; font-size: 12px; font-weight: 400; color: var(--muted); }
  .cta-card { flex-direction: column; align-items: flex-start; }
  .site-footer__inner { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .site-header__inner { gap: 8px; }
  .brand { gap: 8px; }
  .brand__avatar { width: 30px; height: 30px; }
  .brand__name { font-size: 14px; letter-spacing: -0.02em; }
  .site-nav { gap: 11px; font-size: 13px; }
  .hero__cta { justify-content: center; width: 100%; }   /* both buttons in one row, centred */
  .hero__cta .btn { flex: 0 1 auto; justify-content: center; }
  .metrics__label { font-size: 13px; }
}

/* Mobile: a little less space between the blocks */
@media (max-width: 767px) {
  .section { padding-block-start: 52px; }
  .hero { padding-bottom: 12px; }
}

/* --------------------------------------------------------------------------
   Contact page
   -------------------------------------------------------------------------- */
.contact { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; padding-bottom: clamp(56px, 8vw, 112px); }
.contact__label { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.contact__note { font-size: 14px; color: var(--muted); }
.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; }
/* the email sits inside a field; the button next to it is just a copy icon */
.copyfield { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); }
.copyfield__value { min-width: 0; font-size: clamp(18px, 2.6vw, 34px); font-weight: 500; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.copyfield__btn { flex: none; display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 0; border-radius: var(--radius-s); background: var(--ink); color: #fff; cursor: pointer; transition: background-color 200ms ease, transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .copyfield__btn:hover { background: #1e293b; transform: translateY(-1px); } }
.copyfield__btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.copyfield__btn.is-done { background: var(--brand); }
.copyfield__btn .btn__check { display: none; }
.copyfield__btn.is-done .btn__ic { display: none; }
.copyfield__btn.is-done .btn__check { display: block; }
.cbox--email .contact__note { margin-top: 14px; }
.btn__copy { width: 14px; height: 14px; display: inline-block; border: 1.5px solid currentColor; border-radius: 3px; position: relative; }
.btn__copy::after { content: ""; position: absolute; left: 3px; top: -5px; width: 12px; height: 12px; border: 1.5px solid currentColor; border-radius: 3px; border-left: 0; border-bottom: 0; opacity: .7; }

/* Bento grid (contact page; classes are cbox*): email wide on top-left, resume tall on the right, Telegram and LinkedIn side by side below the email */
.cbox { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.cbox--email { grid-column: span 8; min-height: 190px; justify-content: space-between; }
.cbox--resume { grid-column: span 4; grid-row: span 2; justify-content: space-between; gap: 18px; }
.cbox--link { grid-column: span 4; min-height: 150px; justify-content: space-between; }
.cbox__mail { font-size: clamp(22px, 3.4vw, 44px); font-weight: 500; letter-spacing: -0.04em; line-height: 1.1; overflow-wrap: anywhere; margin-block: 4px 18px; }
.cbox__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cbox__top { display: flex; align-items: flex-start; justify-content: space-between; }
.cbox__icon { color: var(--ink); }
.cbox__arrow { font-size: 22px; line-height: 1; color: var(--muted); transition: transform 240ms var(--ease-out), color 240ms ease; }
.cbox__name { margin-top: 18px; font-size: clamp(22px, 2vw, 28px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.cbox__handle { margin-top: 6px; color: var(--muted); font-size: 15px; }
@media (hover: hover) and (pointer: fine) { .cbox--link:hover .cbox__arrow, .cbox--resume:hover .cbox__arrow { transform: translate(3px, -3px); color: var(--brand); } }
.cbox:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

/* the sketch of the resume page */
.cbox__sheet { position: relative; flex: 1 0 190px; min-height: 0; overflow: hidden; margin: 2px 8% -34px; padding: 18px 18px; display: flex; flex-direction: column; gap: 9px; background: #fff; border: 1px solid var(--line); border-radius: 10px 10px 0 0; box-shadow: 0 18px 36px -22px rgb(15 23 42 / 0.35); transform: rotate(-1.6deg); transform-origin: 50% 100%; transition: transform 420ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .cbox--resume:hover .cbox__sheet { transform: rotate(0deg) translateY(-4px); } }
.cbox__sheet i { display: block; font-style: normal; }
.cbox__sheet-name { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.cbox__sheet-role { font-size: 11px; color: var(--brand); margin-top: -4px; }
.cbox__sheet-rule { height: 1px; background: var(--line); margin-block: 5px; }
.cbox__sheet-line { height: 6px; border-radius: 3px; background: #e8eef4; }
.cbox__sheet-line--s { width: 62%; }
.cbox__cta { position: relative; z-index: 2; display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 18px; border-radius: var(--radius-s); background: var(--ink); color: #fff; font-weight: 600; font-size: 15px; }
.cbox__cta .cbox__arrow { color: #fff; font-size: 18px; }
@media (max-width: 860px) {
  .cbox--email, .cbox--resume, .cbox--link { grid-column: 1 / -1; grid-row: auto; }
  .cbox--link { min-height: 140px; }
  .cbox__sheet { flex-basis: 200px; }
}
@media (min-width: 861px) and (max-width: 1040px) { .cbox--link { grid-column: span 4; } .cbox__handle { overflow-wrap: anywhere; } }
/* --------------------------------------------------------------------------
   Case-study template (project.html)
   -------------------------------------------------------------------------- */
.case-hero { padding-top: clamp(28px, 5vh, 56px); padding-bottom: clamp(28px, 4vw, 48px); }
.case-back { display: inline-flex; gap: 8px; font-size: 15px; color: var(--muted); transition: color 160ms ease; }
@media (hover: hover) { .case-back:hover { color: var(--ink); } }
.case-eyebrow { margin-top: clamp(28px, 5vw, 56px); font-size: 15px; color: var(--muted); }
.case-title { margin-top: 14px; font-size: clamp(44px, 8vw, 112px); font-weight: 600; letter-spacing: -0.055em; line-height: 0.98; max-width: 16ch; }
.case-lede { margin-top: clamp(18px, 2.5vw, 28px); max-width: 44ch; font-size: clamp(19px, 1.9vw, 26px); line-height: 1.4; color: var(--ink-2); letter-spacing: -0.015em; }
.case-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.case-chips li { padding: 7px 14px; font-size: 13px; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.case-chips li.is-status { background: var(--btn-bg); border-color: var(--btn-bg); color: #fff; font-weight: 500; }
.case-cover .media { aspect-ratio: 16 / 9; border-radius: var(--radius-m); overflow: hidden; }
.case-cover .media img { width: 100%; height: 100%; object-fit: cover; }
.case-label { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.case-tldr { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding-top: clamp(48px, 7vw, 96px); }
.case-tldr dl > div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.case-tldr dl > div:first-child { padding-top: 0; }
.case-tldr dt { color: var(--muted); font-size: 15px; }
.case-tldr dd { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.55; }

.case-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; padding-top: clamp(40px, 5vw, 72px); }
.case-results div { display: flex; flex-direction: column; gap: 8px; padding-top: 18px; border-top: 2px solid var(--brand); }
.case-results strong { font-size: clamp(40px, 5vw, 68px); font-weight: 600; letter-spacing: -0.05em; line-height: 1; }
.case-results span { color: var(--muted); font-size: 15px; }

.case-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding-top: clamp(56px, 8vw, 112px); }
.case-toc { position: sticky; top: 96px; align-self: start; }
.case-toc ul { display: flex; flex-direction: column; gap: 4px; }
.case-toc a { display: block; padding: 6px 0 6px 14px; border-left: 2px solid var(--line); font-size: 15px; color: var(--muted); transition: color 160ms ease, border-color 160ms ease; }
.case-toc a.is-on { color: var(--ink); border-left-color: var(--brand); font-weight: 500; }
.case-sections { display: flex; flex-direction: column; gap: clamp(56px, 8vw, 104px); }
.case-sec { scroll-margin-top: 96px; }
.case-sec__h { margin: 14px 0 20px; font-size: clamp(28px, 3.4vw, 44px); font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; }
.case-sec p + p { margin-top: 16px; }
.case-sec p:not(.case-label) { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.65; color: var(--ink-2); }
.case-sec__list { margin-top: 18px; display: grid; gap: 10px; }
.case-sec__list li { position: relative; padding-left: 22px; color: var(--ink-2); line-height: 1.55; }
.case-sec__list li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 8px; height: 2px; background: var(--brand); }
.case-fig { margin: 28px 0 0; }
.case-fig .media { border-radius: var(--radius-m); overflow: hidden; }
.case-fig .media { aspect-ratio: auto; }
.case-fig .media img { position: static; width: 100%; height: auto; display: block; }

.case-soon { padding-top: clamp(48px, 7vw, 96px); display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.case-soon__text { max-width: 52ch; font-size: clamp(18px, 1.7vw, 22px); line-height: 1.5; color: var(--ink-2); }
.case-gate { padding-top: clamp(40px, 6vw, 80px); }
.case-gate__card { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; padding: clamp(24px, 4vw, 44px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); }
.case-gate__title { font-size: clamp(24px, 2.6vw, 34px); font-weight: 600; letter-spacing: -0.03em; }
.case-gate__card p { color: var(--ink-2); max-width: 52ch; }

.case-next { padding-top: clamp(64px, 9vw, 128px); padding-bottom: clamp(56px, 8vw, 112px); }
.case-next__link { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.case-next__title { font-size: clamp(32px, 5vw, 72px); font-weight: 600; letter-spacing: -0.05em; line-height: 1.05; transition: color 200ms ease; }
.case-next__meta { color: var(--muted); font-size: 16px; }
@media (hover: hover) and (pointer: fine) { .case-next__link:hover .case-next__title { color: var(--brand); } .case-next__link:hover .btn__arrow { transform: translateX(3px); } }

@media (max-width: 860px) {
  .case-tldr, .case-body { grid-template-columns: 1fr; }
  .case-toc { display: none; }
  .case-tldr dl > div { grid-template-columns: 1fr; gap: 6px; }
}

/* case template: overview under the cover, contents list like the reference (no rail), empty section note */
.case-overview { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding-top: clamp(40px, 6vw, 80px); }
.case-overview div { max-width: 820px; }
.case-overview p:not(.case-label) { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.55; color: var(--ink-2); letter-spacing: -0.01em; }
.case-overview p + p { margin-top: 16px; }
.case-toc a { padding-left: 0; border-left: 0; }
.case-toc a.is-on { border-left: 0; color: var(--ink); font-weight: 600; }
.case-sec__empty { color: var(--muted); font-size: 16px; }
@media (max-width: 860px) { .case-overview { grid-template-columns: 1fr; } }

/* Overview rows: larger text and a brand stripe on top */
.case-tldr { padding-top: clamp(48px, 7vw, 96px); }
.case-tldr dl > div:first-child { padding-top: 0; }
.case-tldr dt { font-size: 16px; }
.case-tldr .case-label { color: var(--ink); font-weight: 700; font-size: clamp(20px, 2vw, 26px); letter-spacing: -0.02em; text-transform: none; line-height: 1.15; }
.case-tldr dd { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.5; letter-spacing: -0.01em; color: var(--ink); }

/* Section titles in the case body: sentence case, larger, bold, dark; screenshots fill the text column */
.case-sec .case-label { font-size: clamp(20px, 2vw, 26px); font-weight: 700; letter-spacing: -0.02em; text-transform: none; color: var(--ink); }
.case-fig .media { display: block; background: transparent; }
.case-fig .media img { max-width: 100%; }

/* Case sections: title + short description rows (Key Features, Impact Summary) */
.case-items { display: grid; gap: 0; margin-top: 8px; }
.case-items li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px 32px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.case-items li:first-child { padding-top: 0; }
.case-items strong { font-size: clamp(17px, 1.5vw, 20px); font-weight: 600; letter-spacing: -0.015em; line-height: 1.35; }
.case-items span { color: var(--ink-2); font-size: clamp(16px, 1.4vw, 19px); line-height: 1.55; }
.case-fig + .case-fig { margin-top: 20px; }
@media (max-width: 640px) { .case-items li { grid-template-columns: 1fr; } }

/* Overview "Details" row: short items with icons */
.case-meta { display: grid; gap: 10px; }
.case-meta li { display: flex; align-items: center; gap: 12px; font-size: clamp(16px, 1.4vw, 19px); color: var(--ink); }
.case-meta svg { flex: none; color: var(--muted); }

.case-loc { display: inline-flex; align-items: center; gap: 12px; }
.case-loc .flag { flex: none; border-radius: 3px; box-shadow: 0 0 0 1px rgb(15 23 42 / 0.12); }

/* Callout card inside a case section (dark card with a label, a headline and a line of text) */
.case-callout { margin-top: 28px; padding: clamp(24px, 3vw, 36px); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 20px; }
.case-sec p.case-callout__label { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.case-callout .case-callout__h { margin-top: 18px; font-size: clamp(24px, 2.6vw, 34px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; color: var(--ink); max-width: none; }
.case-sec p.case-callout__t { margin-top: 14px; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.55; color: var(--ink-2); max-width: none; }
.case-callout + .case-fig { margin-top: 28px; }



/* Bullet lists in case sections: round dark bullets */
.case-sec__list { margin-top: 14px; gap: 14px; }
.case-sec__list li { padding-left: 26px; color: var(--ink-2); font-size: clamp(16px, 1.4vw, 19px); line-height: 1.55; }
.case-sec__list li::before { top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }



/* highlighted phrases inside case text */
.case-sec strong { font-weight: 600; color: var(--ink); }

.case-sec .case-sec__sub { margin: 28px 0 0; font-size: clamp(18px, 1.6vw, 22px); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.case-sec .case-sec__sub + .case-sec__list { margin-top: 14px; }

/* Impact Summary: metric cards (same look and cursor light as the Home metrics) */
.case-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.case-stat {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-start; gap: 28px; min-height: 190px; padding: clamp(20px, 2.4vw, 30px);
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fb 100%); border: 1px solid var(--line); border-radius: var(--radius-m);
  transition: border-color 240ms ease;
}
.case-stat::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 320ms ease;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), rgb(54 216 220 / 0.2), transparent 62%); }
.case-stat > * { position: relative; }
.case-sec .case-stat strong { font-size: clamp(32px, 3.6vw, 48px); font-weight: 600; letter-spacing: -0.05em; line-height: 1; color: var(--ink); }
.case-stat span { font-size: clamp(15px, 1.3vw, 17px); line-height: 1.45; color: var(--muted); max-width: 30ch; }
@media (hover: hover) and (pointer: fine) { .case-stat:hover { border-color: #cbd5e1; } .case-stat:hover::before { opacity: 1; } }
@media (max-width: 640px) { .case-stats { grid-template-columns: 1fr; } .case-stat { min-height: 150px; } }

/* Picture viewer */
.case-fig img { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgb(15 23 42 / 0.86); display: flex; }
.lightbox[hidden] { display: none; }
.lightbox__scroll { flex: 1; overflow: auto; display: grid; place-items: center; padding: 56px 16px 24px; }
.lightbox img { display: block; width: min(100%, 1600px); min-width: min(100%, 900px); height: auto; border-radius: 10px; background: #fff; cursor: default; }
.lightbox__close { position: absolute; top: 12px; right: 16px; z-index: 1; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgb(255 255 255 / 0.14); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
body.is-lightbox { overflow: hidden; }
@media (max-width: 640px) { .lightbox img { width: 900px; max-width: none; } .lightbox__scroll { place-items: start; } }

/* Case closing: statement, then "You may also like" scroller */
.case-closing { padding-top: clamp(72px, 10vw, 140px); text-align: center; }
.case-closing__title { max-width: 18ch; }
.case-more { padding-top: clamp(24px, 4vw, 56px); padding-bottom: clamp(56px, 8vw, 112px); }
.case-more__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: clamp(20px, 3vw, 36px); }
.case-more__title { font-size: clamp(32px, 4vw, 56px); font-weight: 500; letter-spacing: -0.045em; line-height: 1.05; }
.case-more__nav { display: flex; gap: 10px; }
.case-more__btn { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--media); color: var(--ink); font-size: 20px; cursor: pointer; transition: background-color 160ms ease, opacity 160ms ease, transform 160ms var(--ease-out); }
.case-more__btn:active { transform: scale(0.95); }
.case-more__btn:disabled { opacity: 0.4; cursor: default; }
@media (hover: hover) { .case-more__btn:not(:disabled):hover { background: #cbd5e1; } }
.case-more__track { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.case-more__track::-webkit-scrollbar { display: none; }
.case-more__track > .project-card { flex: 0 0 calc((100% - 40px) / 3); scroll-snap-align: start; grid-column: auto; }
@media (max-width: 860px) { .case-more__track > .project-card { flex-basis: 70%; } }
@media (max-width: 520px) { .case-more__track > .project-card { flex-basis: 86%; } }

.case-closing__title { max-width: none; text-wrap: initial; }

/* the last divider under the Overview rows runs the full width of the page content */
.case-tldr dl > div:last-child { border-bottom: 0; }
.case-tldr::after { content: ""; grid-column: 1 / -1; height: 1px; background: var(--line); }

.case-closing__btn { margin-top: clamp(28px, 4vw, 44px); }
.case-closing { padding-bottom: clamp(56px, 8vw, 112px); }
.case-rule { height: 1px; background: var(--line); background-clip: content-box; }
.case-more { padding-top: clamp(40px, 6vw, 80px); }



/* One gap between the last block and the footer on every page */
:root { --footer-gap: clamp(56px, 7vw, 96px); }
.site-footer { margin-top: var(--footer-gap); }
.contact, .case-more { padding-bottom: 0; }

/* Template placeholders (shown while a slot has no content yet) */
.case-sec p.case-sec__empty { color: var(--muted); font-size: clamp(16px, 1.4vw, 19px); }
.case-sec__list.is-empty li { color: var(--muted); }
.case-fig__ph { aspect-ratio: 16 / 10; }
.case-fig .media.case-fig__ph { background: var(--media); border: 0; }
.case-fig__ph img { display: none; }
.case-fig__ph { cursor: default; }
.case-fig .media.case-fig__ph { aspect-ratio: 16 / 10; }

/* placeholder chips stay quiet until filled */
.case-chips li.is-empty { color: var(--muted); }
.case-chips li.is-status.is-empty { background: var(--media); border-color: var(--media); color: var(--muted); font-weight: 500; }

/* Client quote: a large line with a brand-colour bar */
.case-quote { margin: 32px 0 0; padding-left: 24px; border-left: 3px solid var(--brand); }
.case-sec .case-quote p { font-size: clamp(22px, 2.4vw, 32px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.25; color: var(--ink); }
.case-quote footer { margin-top: 14px; font-size: 15px; color: var(--muted); }
.case-quote.is-empty p, .case-sec .case-quote.is-empty p { color: var(--muted); }
/* an odd last result tile takes the full row */
.case-stats > .case-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* Focus: extra air only between the 1st and 2nd photo (the others keep the normal gap) */
#case[data-slug="upstream-intelligence"] #focus .case-fig:first-of-type + .case-fig { margin-top: clamp(40px, 5vw, 64px); }


/* spacing around lists and subheadings inside text blocks */
.case-sec .case-sec__list + p, .case-sec .case-sec__list + h3 { margin-top: 20px; }
.case-sec .case-sec__sub + p { margin-top: 12px; }

/* embedded video (Vimeo), 16:9, same width as the photos */
.case-video { margin: 28px 0 0; }
.case-video__frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-m); overflow: hidden; background: #0f172a; }
.case-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.case-video + .case-fig { margin-top: 20px; }


/* Betinia: the full-width last result tile lets its text run the whole width */
#case[data-slug="betinia"] .case-stats > .case-stat:last-child:nth-child(odd) span { max-width: none; }


/* the "+" in result tiles: same quiet grey and size as the "+" in the Home metrics */
.case-stat strong .case-plus { color: var(--muted); font-size: 0.8em; font-weight: 500; letter-spacing: 0; vertical-align: 0.17em; margin-inline: 0.04em; }


/* Before / After comparison slider (drag anywhere on the picture; tap to jump; arrow keys; double-click the handle to centre) */
.case-compare__frame { container-type: inline-size; position: relative; overflow: hidden; display: flex; justify-content: center; border-radius: var(--radius-m);
  /* dark gradient with a faint dot texture and two soft glows */
  background:
    radial-gradient(65% 60% at 50% 0%, rgb(54 216 220 / 0.27), transparent 72%),
    radial-gradient(50% 50% at 100% 100%, rgb(99 102 241 / 0.22), transparent 72%),
    radial-gradient(rgb(255 255 255 / 0.07) 1px, transparent 1.5px) 0 0 / 22px 22px,
    linear-gradient(180deg, #0b1220 0%, #0f1a2e 55%, #0a101c 100%);
  user-select: none; -webkit-user-select: none; touch-action: pan-y; cursor: ew-resize; }
/* Phone on the left, statements on the right, all on the dark frame */
.case-proto__stage.case-proto__stage--split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; column-gap: clamp(20px, 4vw, 56px); padding-inline: clamp(20px, 5vw, 64px); }
.case-vid__side { height: 100%; display: flex; align-items: center; justify-content: center; min-width: 0; }
.case-vid__list { list-style: none; margin: 0; padding: 0; min-width: 0; }
.case-vid__list li { display: grid; gap: 10px; padding: 26px 0; border-top: 1px solid rgb(255 255 255 / 0.14); }
.case-vid__list li:first-child { border-top: 0; padding-top: 0; }
.case-vid__list li:last-child { padding-bottom: 0; }
.case-vid__list strong { font-size: clamp(40px, 4.6vw, 60px); font-weight: 600; letter-spacing: -0.05em; line-height: 1; color: #fff; }
.case-vid__list span { font-size: clamp(15px, 1.3vw, 18px); line-height: 1.5; color: rgb(226 232 240 / 0.72); max-width: 28ch; }
.case-vid__list span b { color: #fff; font-weight: 600; }
.case-vid__list strong small { font-size: 0.4em; font-weight: 500; letter-spacing: 0; color: rgb(226 232 240 / 0.72); margin-right: 0.15em; }
/* "Get the app": logo + text + store button on the left, two phones on the right (the whole block scales with its width) */
.case-proto__stage.case-app__stage { display: grid; grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr); align-items: center; column-gap: clamp(16px, 3vw, 40px); padding-inline: clamp(20px, 5vw, 56px); height: auto !important; aspect-ratio: 8 / 5; }
.case-app__info { display: grid; justify-items: start; gap: clamp(14px, 2vw, 22px); min-width: 0; }
.case-app__logo { width: clamp(110px, 56%, 190px); height: auto; display: block; cursor: default !important; }
.case-app__info p { margin: 0; font-size: clamp(15px, 1.4vw, 19px); line-height: 1.5; color: rgb(226 232 240 / 0.88); max-width: 24ch; }
.case-app__btn { white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 999px; background: #fff; color: #0b1220; font-size: clamp(13px, 1.2vw, 15px); font-weight: 600; text-decoration: none; transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out); }
.case-app__btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgb(0 0 0 / 0.35); }
.case-app__btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.case-app__phones { position: relative; align-self: stretch; min-width: 0; }
.case-app__phone { position: absolute; display: block; max-width: none; height: auto; cursor: default !important; filter: drop-shadow(0 18px 36px rgb(0 0 0 / 0.45)); }
.case-app__phone--a { left: 0; top: 7%; width: 47%; }
.case-app__phone--b { right: 0; top: 33%; width: 47%; }
@media (max-width: 760px) {
  .case-proto__stage.case-app__stage { grid-template-columns: minmax(0, 1fr); aspect-ratio: auto; padding-block: 32px 0; row-gap: 28px; }
  .case-app__phones { height: 360px; }
  .case-app__phone--a { left: 6%; width: 42%; } .case-app__phone--b { right: 6%; width: 42%; }
}/* flip: the statements on the left, the phone on the right */
.case-proto__stage--flip .case-vid__side { order: 2; }
.case-proto__stage--flip .case-vid__list { order: 1; }
@media (max-width: 760px) { .case-proto__stage--flip .case-vid__side { order: 0; } .case-proto__stage--flip .case-vid__list { order: 0; } }
@media (max-width: 760px) { .case-proto__stage.case-proto__stage--split { grid-template-columns: minmax(0, 1fr); height: auto !important; padding-block: 28px; row-gap: 28px; } .case-vid__side { height: 460px; } }
/* Two pictures in one line */
.case-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; align-items: start; }
.case-row > .case-fig { margin: 0; min-width: 0; }
.case-row .case-compare__tag { top: 10px; padding: 5px 10px; font-size: 11px; }
@media (max-width: 640px) { .case-row { grid-template-columns: 1fr; } }
/* Scrolling phone prototype (same dark frame as the compare slider) */
.case-proto__frame { position: relative; overflow: hidden; display: flex; justify-content: center; border-radius: var(--radius-m);
  background:
    radial-gradient(65% 60% at 50% 0%, rgb(54 216 220 / 0.27), transparent 72%),
    radial-gradient(50% 50% at 100% 100%, rgb(99 102 241 / 0.22), transparent 72%),
    radial-gradient(rgb(255 255 255 / 0.07) 1px, transparent 1.5px) 0 0 / 22px 22px,
    linear-gradient(180deg, #0b1220 0%, #0f1a2e 55%, #0a101c 100%); }
.case-proto__stage { position: relative; width: 100%; display: flex; align-items: center; justify-content: center; }
.case-proto__phone { --h: 88%; position: relative; height: var(--h); aspect-ratio: 440 / 956; container-type: size; overflow: hidden;
  border-radius: 38px; background: #121823; box-shadow: 0 0 0 8px #04070d, 0 0 0 9px rgb(255 255 255 / 0.16), 0 24px 60px rgb(0 0 0 / 0.5); }
.case-proto__phone img { position: absolute; left: 0; width: 100%; height: auto; max-width: none; display: block; pointer-events: none; user-select: none; }
.case-proto__top { top: 0; z-index: 2; }
.case-proto__bottom { bottom: 0; z-index: 2; }
.case-proto__content { top: 24.477%; z-index: 1; will-change: transform; animation: proto-scroll 36s infinite; animation-play-state: paused; }
.case-proto.is-live .case-proto__content { animation-play-state: running; }
.case-proto:hover .case-proto__content { animation-play-state: paused; }
@keyframes proto-scroll {
  0%, 6%   { transform: translateY(0); animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  84%, 90% { transform: translateY(-68.44%); animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  100%     { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) { .case-proto__content { animation: none; } }
.case-vid__phone { position: relative; flex: none; height: 88%; overflow: hidden; background: #000; box-shadow: 0 24px 60px rgb(0 0 0 / 0.5); }
.case-vid__phone video { object-fit: fill; position: absolute; max-width: none; display: block; pointer-events: none; opacity: 1; transition: opacity 500ms ease; }
.case-vid__phone video.is-faded { opacity: 0; }
.case-compare__stage { position: relative; overflow: hidden; width: 100%; }
.case-compare__layer { position: absolute; inset: 0; display: flex; justify-content: center; pointer-events: none; }
.case-compare__layer--before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.case-compare__img { display: block; flex: none; max-width: none; pointer-events: none; }
.case-compare__line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: rgb(255 255 255 / 0.95); box-shadow: 0 0 0 1px rgb(15 23 42 / 0.18); pointer-events: none; }
.case-compare__handle {
  position: absolute; top: 50%; left: clamp(26px, var(--pos), calc(100% - 26px)); width: 44px; height: 44px; transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center; border-radius: 999px; background: #fff; color: var(--ink);
  box-shadow: 0 2px 12px rgb(15 23 42 / 0.35); cursor: grab; outline: none;
  transition: width 240ms var(--ease-out), box-shadow 240ms ease;
}
.case-compare__handle svg { flex: none; transition: transform 240ms var(--ease-out); }
.case-compare__handle svg:first-child { margin-right: -1px; }
.case-compare.is-dragging .case-compare__handle { width: 62px; cursor: grabbing; box-shadow: 0 4px 18px rgb(15 23 42 / 0.4); }
.case-compare.is-dragging .case-compare__handle svg:first-child { transform: translateX(-3px); }
.case-compare.is-dragging .case-compare__handle svg:last-child { transform: translateX(3px); }
.case-compare__handle:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--brand); }
.case-compare__tag { position: absolute; top: 14px; padding: 6px 12px; border-radius: 999px; background: rgb(15 23 42 / 0.72); color: #fff; font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; pointer-events: none; }
.case-compare__tag--l { left: 14px; }
.case-compare__tag--r { right: 14px; }
@media (prefers-reduced-motion: reduce) { .case-compare__handle, .case-compare__handle svg { transition: none; } }



/* Gradient bars background for the comparison (bg: "bars") */
.case-compare__bars { position: absolute; inset: 0; display: flex; overflow: hidden; pointer-events: none; }
.case-compare__bars span {
  flex: 1 1 0; margin-right: -1px; height: 100%; transform-origin: bottom; transform: scaleY(var(--s));   /* bars overlap by 1px so no seams show between them */
  background: linear-gradient(to top, #34406a 0%, rgb(39 47 68 / 0.75) 45%, rgb(39 47 68 / 0) 100%);
  animation: barPulse 2.4s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -0.18s); will-change: transform;
}
@keyframes barPulse { from { transform: scaleY(var(--s)); } to { transform: scaleY(calc(var(--s) * 0.38)); } }
@media (prefers-reduced-motion: reduce) { .case-compare__bars span { animation: none; } }
.case-compare--bars .case-compare__frame { background: #0a0e17; }


.case-compare__caption { margin-top: 10px; font-size: 14px; color: var(--muted); }


/* Contact: the email must not break mid-word on narrow phones */
@media (max-width: 480px) { .copyfield__value { font-size: 15px; letter-spacing: -0.02em; overflow-wrap: normal; } }

/* Home results only: %, + and arrows are lighter than the digits (same size) */
.metrics__value .sym { color: var(--muted); font-weight: 500; letter-spacing: 0; }
.metrics__value .sym { transition: opacity 320ms ease; }
.metrics.is-counting .sym { opacity: 0; }   /* the % and arrows fade in when the digits stop counting */
