/* Variant B "Glass". Editorial Liquid Glass on warm paper: paper, bone and
   graphite, one bright ultramarine accent. Light by default, dark on demand.
   Tokens first, then base, glass, frame, components, pages, responsive, motion. */

:root {
  --bg: #f2efe9;          /* paper */
  --bg-2: #faf8f4;        /* paper soft */
  --ink: #111110;         /* graphite */
  --muted: #55524c;       /* 7:1 on paper */
  --line: #e3ded4;
  --bone: #c9bca6;
  --bone-deep: #8a7c66;
  --accent: #2b3bff;      /* ultramarine: 6.1:1 on paper, white on it 6.9:1 */
  --accent-ink: #ffffff;
  --accent-text: #2b3bff;
  --m1: rgba(201, 188, 166, .55);
  --m2: rgba(43, 59, 255, .10);
  --m3: rgba(255, 255, 255, .9);
  --m4: rgba(228, 218, 203, .8);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .17 0 0 0 0 .12 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-o: .8;
  --lg-bg: rgba(255, 255, 255, .58);
  --lg-bg-2: rgba(250, 248, 244, .26);
  --lg-strong: rgba(250, 248, 244, .80);
  --lg-rim: linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(255, 255, 255, .45) 35%, rgba(43, 59, 255, .22) 60%, rgba(201, 188, 166, .55) 78%, rgba(255, 255, 255, .9));
  --lg-edge: rgba(255, 255, 255, .8);
  --lg-spec: rgba(255, 255, 255, .95);
  --lg-shadow: 0 1px 2px rgba(60, 50, 30, .06), 0 14px 40px rgba(60, 50, 30, .10);
  --lg-shadow-up: 0 2px 4px rgba(60, 50, 30, .07), 0 28px 70px rgba(60, 50, 30, .18);
  --radius: 30px;
  --radius-sm: 20px;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1320px;
  --font-d: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --font-b: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.32, .72, 0, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-2: #161616;
  --ink: #f2efe9;
  --muted: #b3ab9d;
  --line: #262626;
  --accent: #6b76ff;
  --accent-ink: #0a0a0a;
  --accent-text: #8c95ff;
  --m1: rgba(201, 188, 166, .10);
  --m2: rgba(107, 118, 255, .13);
  --m3: rgba(255, 255, 255, .035);
  --m4: rgba(138, 124, 102, .12);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' 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 .10 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-o: .5;
  --lg-bg: rgba(255, 255, 255, .07);
  --lg-bg-2: rgba(255, 255, 255, .02);
  --lg-strong: rgba(17, 17, 16, .66);
  --lg-rim: linear-gradient(135deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .04) 38%, rgba(107, 118, 255, .34) 62%, rgba(201, 188, 166, .18) 80%, rgba(255, 255, 255, .16));
  --lg-edge: rgba(255, 255, 255, .14);
  --lg-spec: rgba(255, 255, 255, .22);
  --lg-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 40px rgba(0, 0, 0, .45);
  --lg-shadow-up: 0 2px 4px rgba(0, 0, 0, .4), 0 28px 70px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
/* The system decides first (light paper when it is light); the toggle wins. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0a0a;
    --bg-2: #161616;
    --ink: #f2efe9;
    --muted: #b3ab9d;
    --line: #262626;
    --accent: #6b76ff;
    --accent-ink: #0a0a0a;
    --accent-text: #8c95ff;
    --m1: rgba(201, 188, 166, .10);
    --m2: rgba(107, 118, 255, .13);
    --m3: rgba(255, 255, 255, .035);
    --m4: rgba(138, 124, 102, .12);
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' 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 .10 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    --grain-o: .5;
    --lg-bg: rgba(255, 255, 255, .07);
    --lg-bg-2: rgba(255, 255, 255, .02);
    --lg-strong: rgba(17, 17, 16, .66);
    --lg-rim: linear-gradient(135deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .04) 38%, rgba(107, 118, 255, .34) 62%, rgba(201, 188, 166, .18) 80%, rgba(255, 255, 255, .16));
    --lg-edge: rgba(255, 255, 255, .14);
    --lg-spec: rgba(255, 255, 255, .22);
    --lg-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 40px rgba(0, 0, 0, .45);
    --lg-shadow-up: 0 2px 4px rgba(0, 0, 0, .4), 0 28px 70px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

/* Cross document view transitions: the card grows into the project hero and back. */
@view-transition { navigation: auto; }
::view-transition-group(card),
::view-transition-group(card-img),
::view-transition-group(card-label) { animation-duration: .62s; animation-timing-function: var(--spring); }
::view-transition-old(card-img),
::view-transition-new(card-img) { width: 100%; height: 100%; object-fit: cover; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .32s; }

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 150px; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 var(--font-b); overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: .2em; }
h1, h2, h3, h4 { font-family: var(--font-d); font-weight: 500; line-height: 1.05; margin: 0; letter-spacing: -.01em; }
h3, h4 { font-family: var(--font-b); letter-spacing: -.005em; line-height: 1.25; }
h2 { font-weight: 500; font-size: clamp(38px, 4.6vw, 66px); letter-spacing: -.02em; }
h3 { font-size: 18px; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 10px; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 600; }
.skip:focus { top: 16px; }
kbd { font: 600 10px/1 var(--font-b); border: 1px solid var(--line); border-radius: 6px; padding: 3px 5px; color: var(--muted); }
.kicker { font: 600 12px/1.4 var(--font-b); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }

/* ------------------------------------------------------------- paper bg */
.mesh { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--bg); }
.mesh::after { content: ""; position: absolute; inset: 0; background-image: var(--grain); background-size: 160px; opacity: var(--grain-o); }
.mesh i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; will-change: transform; }
.mesh .m1 { left: -18vmax; top: -22vmax; background: radial-gradient(closest-side, var(--m1), transparent); animation: drift1 70s ease-in-out infinite alternate; }
.mesh .m2 { right: -24vmax; top: 6vmax; background: radial-gradient(closest-side, var(--m2), transparent); animation: drift2 84s ease-in-out infinite alternate; }
.mesh .m3 { left: 18vmax; bottom: -30vmax; background: radial-gradient(closest-side, var(--m3), transparent); animation: drift3 90s ease-in-out infinite alternate; }
.mesh .m4 { right: -8vmax; bottom: -26vmax; width: 46vmax; height: 46vmax; background: radial-gradient(closest-side, var(--m4), transparent); animation: drift1 76s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate3d(12vw, 10vh, 0) scale(1.1); } }
@keyframes drift2 { to { transform: translate3d(-14vw, 16vh, 0) scale(.92); } }
@keyframes drift3 { to { transform: translate3d(10vw, -12vh, 0) scale(1.06); } }

/* --------------------------------------------------------------- glass
   One recipe for bar, cards, buttons: fine blur, grain, a light rim with a
   faint ultramarine and bone dispersion, inner highlight, soft shadow.
   Elements change only --lg-fill. */
.lg, .pill, .btn {
  --lg-fill: linear-gradient(150deg, var(--lg-bg), var(--lg-bg-2));
  position: relative;
  border: 1px solid transparent;
  background: var(--grain) padding-box, var(--lg-fill) padding-box;
  background-size: 160px, auto;
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
  box-shadow: inset 0 1px 0 var(--lg-spec), inset 0 -1px 0 rgba(255, 255, 255, .05), var(--lg-shadow);
}
/* the rim: a 1px gradient ring cut out with a mask, so the fill stays clear */
.lg::after, .pill::after, .btn::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--lg-rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}

/* ------------------------------------------------------- pills, buttons */
.pill, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 500 14px/1 var(--font-b); color: var(--ink); text-decoration: none; cursor: pointer;
  height: 40px; padding: 0 16px; border-radius: 999px;
  transition: transform .25s var(--ease), box-shadow .25s;
}
.pill.round { width: 40px; padding: 0; }
.btn { height: 48px; padding: 0 22px; font-size: 15px; }
.btn-primary { --lg-fill: linear-gradient(160deg, color-mix(in srgb, var(--accent) 88%, #fff), var(--accent)); color: var(--accent-ink); }
.pill:hover, .btn:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 var(--lg-spec), var(--lg-shadow-up); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; line-height: 1.3; padding: 7px 14px; border-radius: 999px; }
.chip b { font-weight: 600; }

/* --------------------------------------------------------------- header */
.bar { position: sticky; top: 12px; z-index: 50; padding-inline: var(--gutter); margin-top: 12px; }
.bar-inner {
  max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; gap: 12px;
  padding: 7px 7px 7px 10px; border-radius: 999px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 22px/1 var(--font-d); white-space: nowrap; }
.mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font: 600 13px/1 var(--font-b); letter-spacing: .04em; }
.mark-sm { width: 26px; height: 26px; border-radius: 9px; font-size: 11px; }
.nav { display: flex; gap: 2px; margin-inline: auto; }
.nav a { padding: 9px 14px; border-radius: 999px; text-decoration: none; font-size: 15px; color: var(--muted); transition: background .2s, color .2s; }
.nav a:hover { color: var(--ink); background: var(--lg-bg); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--lg-strong); box-shadow: inset 0 1px 1px var(--lg-spec); }
.tools { display: flex; gap: 6px; margin-left: auto; }
.nav + .tools { margin-left: 0; }
.menu-btn { display: none; }

/* ----------------------------------------------------------------- page */
.block { margin-top: clamp(64px, 9vw, 128px); }
.section-head { display: grid; gap: 12px; margin-bottom: 28px; max-width: 760px; }
.section-lead { color: var(--muted); font-size: 18px; max-width: 62ch; }
.row-head { max-width: none; grid-template-columns: 1fr auto; align-items: end; }
.hint { font-size: 14px; }
.hint-touch { display: none; }
@media (hover: none) { .hint-keys { display: none; } .hint-touch { display: inline; } }
.more { margin-top: 28px; }
.lead-p { font: 500 clamp(24px, 2.4vw, 32px)/1.3 var(--font-d); }

/* ----------------------------------------------------------------- hero */
.hero { padding-top: clamp(40px, 6vw, 84px); }
.eyebrow { font-size: 13px; color: var(--ink); width: fit-content; }
.hero-h1 {
  margin-top: 20px; max-width: 17ch;
  font: 500 clamp(50px, 7.4vw, 116px)/.92 var(--font-d); letter-spacing: -.025em;
}
.hero-lead { margin-top: 22px; max-width: 54ch; font: 400 clamp(17px, 1.4vw, 20px)/1.6 var(--font-b); color: var(--muted); }
.scroll-cue { margin-top: 28px; }
.work { margin-top: clamp(48px, 6vw, 80px); }

/* ----------------------------------------------------------- work cards */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.card-li { min-width: 0; }
.card-li.is-big { grid-column: span 2; grid-row: span 2; }
.card-li.is-wide { grid-column: span 2; }
.card {
  position: relative; display: block; aspect-ratio: 1; isolation: isolate; overflow: hidden;
  border-radius: var(--radius); text-decoration: none; background: var(--bg-2);
  border: 1px solid var(--lg-edge); box-shadow: var(--lg-shadow);
  transition: transform .5s var(--spring), box-shadow .5s var(--spring);
}
.card-li.is-big .card { height: 100%; }
.card-li.is-wide .card { aspect-ratio: 2.05 / 1; }
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  box-shadow: inset 0 1px 1px var(--lg-spec), inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.card-media { position: absolute; inset: 0; overflow: hidden; }
.card-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  transform: scale(1.08) translate3d(calc(var(--px, 0) * -12px), calc(var(--py, 0) * -12px), 0);
  transition: transform .7s var(--spring);
}
.card-label {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 1;
  display: grid; gap: 3px; padding: 14px 16px 15px; border-radius: 22px;
  --lg-fill: linear-gradient(150deg, var(--lg-strong), var(--lg-bg));
}
.card-status { font: 600 11px/1.3 var(--font-b); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); }
.card-title { font: 600 25px/1.05 var(--font-d); }
.card-sub { font-size: 14px; line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.is-big .card-label { left: 18px; right: auto; bottom: 18px; max-width: min(460px, calc(100% - 36px)); padding: 20px 22px; border-radius: 26px; }
.is-big .card-title { font-size: clamp(34px, 3.4vw, 52px); font-weight: 500; letter-spacing: -.02em; }
.is-big .card-sub { font-size: 15px; -webkit-line-clamp: 3; }
.card-go {
  position: absolute; top: 14px; right: 14px; z-index: 1; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--lg-strong); border: 1px solid var(--lg-edge);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  opacity: 0; transform: scale(.85); transition: opacity .3s, transform .4s var(--spring);
}
@media (hover: hover) {
  .card:hover { transform: translateY(-6px); box-shadow: var(--lg-shadow-up); }
  .card:hover .card-go { opacity: 1; transform: none; }
}
.card:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: var(--radius); }
.card:focus-visible .card-go { opacity: 1; transform: none; }
.card:active { transform: scale(.985); }

/* ---------------------------------------------------------------- stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.stat { display: grid; gap: 6px; padding: 22px 24px; border-radius: 26px; align-content: start; }
.stat-n { font: 500 clamp(46px, 5vw, 70px)/.95 var(--font-d); letter-spacing: -.02em; }
.stat-l { color: var(--muted); font-size: 15px; line-height: 1.4; }
.stats-compact { margin-top: 14px; }
.stats-compact .stat { padding: 16px 18px; border-radius: 20px; }
.stats-compact .stat-n { font-size: 34px; }

/* ------------------------------------------------------ services, misc */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.svc { padding: 24px; border-radius: 26px; display: grid; gap: 10px; align-content: start; }
.svc-n { font: italic 500 32px/1 var(--font-d); color: var(--accent-text); }
.svc p, .feat p, .step p, .arch-item p, .tl p { color: var(--muted); font-size: 15px; line-height: 1.55; }
.mini-arch { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.mini-col { padding: 22px; border-radius: 26px; display: grid; gap: 8px; align-content: start; }
.mini-col p { color: var(--muted); font-size: 15px; }
.mini-n {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; margin-right: 10px;
  background: var(--ink); color: var(--bg); font: 600 13px/1 var(--font-b);
}
.about-teaser { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.frame { padding: 10px; border-radius: 34px; }
.frame img { border-radius: 25px; width: 100%; }

/* ------------------------------------------------------------ contact */
.contact-card { padding: clamp(24px, 4.5vw, 56px); border-radius: 38px; }
.contact-links { display: grid; gap: 14px; margin-top: 8px; justify-items: start; }
.copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.contact-label { font: 600 12px/1.4 var(--font-b); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); min-width: 90px; }
.contact-value { font: 500 clamp(22px, 2.4vw, 30px)/1.25 var(--font-d); overflow-wrap: anywhere; }
.copy-btn { height: 38px; padding: 0 14px; font-size: 14px; }

/* ------------------------------------------------------------- project */
.p-hero { position: relative; padding: 14px var(--gutter) 0; }
.p-card {
  position: relative; overflow: hidden; isolation: isolate; max-width: 1480px; margin: 0 auto;
  height: min(78vh, 800px); min-height: 440px; border-radius: 40px;
  border: 1px solid var(--lg-edge); box-shadow: var(--lg-shadow-up); background: var(--bg-2);
  view-transition-name: card;
}
.p-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; view-transition-name: card-img; }
.p-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(20, 16, 12, .28)); }
.p-head {
  position: absolute; left: clamp(14px, 2.4vw, 32px); bottom: clamp(14px, 2.4vw, 32px); z-index: 1;
  max-width: min(760px, calc(100% - 28px)); padding: clamp(18px, 2.4vw, 30px); border-radius: 30px;
  display: grid; gap: 8px; --lg-fill: linear-gradient(150deg, var(--lg-strong), var(--lg-bg));
  view-transition-name: card-label;
}
.p-head .kicker { color: var(--muted); }
.p-title { font: 500 clamp(46px, 7vw, 104px)/.92 var(--font-d); letter-spacing: -.025em; }
.close {
  position: fixed; z-index: 45; top: 104px; right: max(28px, calc(var(--gutter) + 22px));
  height: 48px; min-width: 48px; padding: 0 14px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  --lg-fill: linear-gradient(150deg, var(--lg-strong), var(--lg-bg));
}
.close kbd { border-color: var(--lg-edge); }
.p-index {
  position: sticky; top: 82px; z-index: 40; display: flex; align-items: center; gap: 2px;
  width: fit-content; max-width: calc(100% - 2 * var(--gutter)); margin: 18px auto 0; padding: 5px 6px 5px 12px;
  border-radius: 999px; overflow-x: auto; scrollbar-width: none;
}
.p-index::-webkit-scrollbar { display: none; }
.p-index > .icon { flex: none; color: var(--muted); margin-right: 4px; }
.seg {
  flex: none; padding: 8px 14px; border-radius: 999px; text-decoration: none; font: 500 14px/1.2 var(--font-b);
  color: var(--muted); background: transparent; border: 0; cursor: pointer; transition: background .25s, color .25s;
}
.seg:hover { color: var(--ink); }
.seg.is-on, .seg[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.p-what { display: grid; gap: 22px; margin-top: clamp(48px, 7vw, 88px); }
.p-lead { font: 500 clamp(26px, 2.8vw, 40px)/1.28 var(--font-d); max-width: 34ch; }
.meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 10px 0 0; max-width: 980px; }
.meta div { padding: 16px 20px; border-radius: 22px; }
.meta dt { font: 600 11px/1.4 var(--font-b); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.meta dd { margin: 4px 0 0; font: 500 16px/1.4 var(--font-b); }
.feats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 14px; }
.feat { padding: 22px; border-radius: 26px; display: grid; gap: 10px; align-content: start; transition: transform .4s var(--spring); }
.feat-n { width: fit-content; font: 600 12px/1 var(--font-b); letter-spacing: .08em; color: var(--accent-text); padding: 6px 10px; border-radius: 999px; background: var(--lg-strong); }
@media (hover: hover) { .feat:hover { transform: translateY(-3px); } }
.products, .cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.product, .case { padding: 24px; border-radius: 30px; display: grid; gap: 14px; align-content: start; }
.product-d { color: var(--muted); }
.case { padding: 12px 12px 22px; }
.case-body { display: grid; gap: 10px; padding: 0 10px; }
.case h3 a { text-decoration: none; }
.chips .chip { font-size: 13px; }

.g-strip {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  padding: 6px var(--gutter) 24px; scrollbar-width: thin;
}
.g-item { flex: none; scroll-snap-align: start; padding: 8px; border-radius: 28px; max-width: 86vw; }
.g-item img { height: clamp(220px, 34vw, 380px); width: auto; max-width: calc(86vw - 16px); object-fit: cover; border-radius: 21px; }
.g-item figcaption { font-size: 13px; color: var(--muted); padding: 10px 8px 4px; max-width: 46ch; }

.story { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 4vw, 64px); }
.story h2 { font-size: clamp(32px, 3.4vw, 48px); }
.story-body { display: grid; gap: 14px; color: var(--muted); font-size: 18px; }
.layers { display: grid; gap: 8px; counter-reset: l; margin-top: 6px; }
.layers li { counter-increment: l; padding: 12px 16px 12px 52px; border-radius: 18px; color: var(--ink); font-size: 16px; }
.layers li::before { content: counter(l); position: absolute; left: 14px; top: 12px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 9px; background: var(--ink); color: var(--bg); font: 600 12px/1 var(--font-b); }
.stack-row { display: grid; gap: 16px; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.next {
  display: grid; grid-template-columns: 112px 1fr auto; gap: 20px; align-items: center;
  padding: 10px 22px 10px 10px; border-radius: 32px; text-decoration: none; transition: transform .5s var(--spring);
}
.next-media img { width: 112px; height: 112px; object-fit: cover; border-radius: 24px; }
.next-text { display: grid; gap: 4px; }
.next-title { font: 500 clamp(30px, 3.2vw, 44px)/1.02 var(--font-d); }
.next-go { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); }
@media (hover: hover) { .next:hover { transform: translateY(-4px); } }

/* mock ups for client sites */
.mock { border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--bg-2); }
.mock-phone { display: grid; place-items: center; background: linear-gradient(160deg, var(--m3), var(--m1)); }
.mock-phone img { height: 90%; width: auto; border-radius: 18px; border: 4px solid #1d1b18; object-fit: cover; object-position: top; }
.mock-browser { display: grid; grid-template-rows: 28px 1fr; border: 1px solid var(--line); }
.mk-bar { display: flex; align-items: center; gap: 6px; padding: 0 10px; background: rgba(127, 127, 127, .14); }
.mk-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(127, 127, 127, .45); }
.mk-url { margin-left: 10px; height: 12px; flex: 1; max-width: 50%; border-radius: 6px; background: rgba(127, 127, 127, .22); }
.mk-body { padding: 14px; display: grid; gap: 12px; align-content: start; }
.mk-nav { display: flex; gap: 8px; align-items: center; }
.mk-nav span { height: 8px; width: 34px; border-radius: 4px; background: rgba(127, 127, 127, .35); }
.mk-nav .mk-logo { width: 22px; height: 22px; border-radius: 6px; margin-right: auto; }
.mk-nav .mk-logo.round { border-radius: 50%; }
.mk-nav .mk-cta { width: 56px; height: 18px; border-radius: 9px; }
.mk-hero { display: grid; gap: 8px; padding: 14px 0; }
.mk-h { height: 16px; width: 80%; border-radius: 6px; background: rgba(127, 127, 127, .45); }
.mk-h.short { width: 55%; }
.mk-btn { width: 90px; height: 22px; border-radius: 11px; margin-top: 6px; }
.mk-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mk-cards span { height: 48px; border-radius: 8px; background: rgba(127, 127, 127, .2); }
.mock-clinic .mk-body { background: linear-gradient(180deg, #e9f3f1, #f8fbfa); }
.mock-clinic .mk-logo, .mock-clinic .mk-cta, .mock-clinic .mk-btn { background: #1f7a6d; }
.mock-clinic .mk-h { background: #23413c; opacity: .75; }
.mock-clinic .mk-cards span { background: #cfe5e0; }
.mock-artist .mk-body { background: #f4f1ea; }
.mock-artist .mk-logo { background: #1b1b1b; }
.mk-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mk-gallery span { aspect-ratio: 4 / 5; border-radius: 4px; }
.mk-gallery .a1 { background: linear-gradient(135deg, #d9643a, #f2c14e); }
.mk-gallery .a2 { background: linear-gradient(160deg, #20415c, #6aa6b8); }
.mk-gallery .a3 { background: linear-gradient(120deg, #2c2c2c, #b9b2a5); }
.mk-gallery .a4 { background: linear-gradient(200deg, #6b8f71, #e8e1c8); }
.mk-gallery .a5 { background: linear-gradient(140deg, #8c2f39, #e7a977); }
.mk-gallery .a6 { background: linear-gradient(170deg, #3b3355, #c9b8d8); }

/* ------------------------------------------------- carousel glass stacks */
.cs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 36px 26px; }
.cs-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cstack { display: grid; gap: 14px; min-width: 0; }
.cstack[hidden] { display: none; }
/* No JS: a plain scroll-snap track. */
.cs-deck { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 24px; }
.cs-fig { flex: 0 0 100%; scroll-snap-align: start; border-radius: 24px; overflow: hidden; border: 1px solid var(--lg-edge); }
.cs-fig img { width: 100%; height: 100%; object-fit: cover; }
/* With JS: slides pile up as a glass stack, the top one turns away by itself. */
.js .cs-deck { display: block; position: relative; aspect-ratio: 4 / 5; overflow: visible; margin: 18px 18px 0 0; }
.js .cs-fig {
  position: absolute; inset: 0; box-shadow: var(--lg-shadow); background: var(--bg-2);
  opacity: 0; transform: translate3d(22px, -22px, 0) scale(.88); pointer-events: none;
  transition: transform .8s var(--spring), opacity .6s var(--ease);
}
.js .cs-fig:not([data-pos]):nth-child(1), .js .cs-fig[data-pos="0"] { opacity: 1; transform: none; z-index: 3; pointer-events: auto; }
.js .cs-fig:not([data-pos]):nth-child(2), .js .cs-fig[data-pos="1"] { opacity: .9; transform: translate3d(9px, -9px, 0) scale(.96) rotate(1.6deg); z-index: 2; }
.js .cs-fig:not([data-pos]):nth-child(3), .js .cs-fig[data-pos="2"] { opacity: .6; transform: translate3d(18px, -18px, 0) scale(.92) rotate(3.2deg); z-index: 1; }
.js .cs-fig[data-pos="out"] { opacity: 0; transform: translate3d(-40%, 8%, 0) rotate(-9deg) scale(.96); z-index: 4; }
.cs-deck:focus-visible { outline-offset: 6px; border-radius: 24px; }
.cs-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 10px 10px 16px; border-radius: 22px; }
.cs-meta { min-width: 0; }
.cs-meta h3 { font-size: 15px; line-height: 1.25; }
.tag { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cs-ctrl { display: flex; align-items: center; gap: 4px; flex: none; }
.cs-ctrl .pill { width: 34px; height: 34px; }
.cs-count { font: 500 12px/1 var(--font-b); font-variant-numeric: tabular-nums; color: var(--muted); min-width: 38px; text-align: center; }
html:not(.js) .cs-ctrl { display: none; }

.filters { display: flex; width: fit-content; max-width: 100%; gap: 2px; padding: 5px; border-radius: 999px; margin-bottom: 30px; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
html:not(.js) .filters { display: none; }

.vids { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; align-items: start; }
.vframe { padding: 8px; border-radius: 30px; }
.vframe video, .vframe img { width: 100%; border-radius: 23px; background: #000; }
.vframe img { background: none; }
.vframe figcaption { font-size: 14px; padding: 10px 8px 4px; color: var(--muted); }

.page-hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: clamp(28px, 5vw, 80px); align-items: center; padding-top: clamp(48px, 8vw, 110px); }
.ph-art { transform: rotate(2.5deg); max-width: 420px; justify-self: end; view-transition-name: card; }
.ph-art img { view-transition-name: card-img; }

/* --------------------------------------------------------- engineering */
.arch { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.arch-col { padding: 20px; border-radius: 28px; display: grid; gap: 14px; align-content: start; }
.arch-h { display: flex; align-items: center; font-size: 18px; }
.arch-col ul { display: grid; gap: 8px; }
.arch-item { padding: 14px 16px; border-radius: 18px; background: var(--lg-bg); border: 1px solid var(--lg-edge); }
.arch-item h4 { font-size: 15px; margin-bottom: 4px; }
.arch-item p { font-size: 14px; }
.selfcheck { margin-top: 14px; padding: 18px 22px; border-radius: 22px; color: var(--muted); }
.journey { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; counter-reset: j; }
.step { padding: 22px; border-radius: 26px; display: grid; gap: 8px; align-content: start; }
.table-wrap { overflow-x: auto; border-radius: 26px; padding: 6px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 13px 16px; border-bottom: 1px solid var(--line); }
thead th { font: 600 12px/1.4 var(--font-b); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
tbody th { font-weight: 600; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

/* --------------------------------------------------------------- about */
.svc .chips { margin-top: auto; padding-top: 6px; }
.svc .chip { font-size: 12px; }
.toolbox { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; list-style: none; }
.tool { padding: 24px; border-radius: 26px; display: grid; gap: 14px; align-content: start; }
.tool h3 { font-size: 18px; }
.case-body .btn { width: fit-content; margin-top: 4px; }
.about-body { display: grid; gap: 4px; min-width: 0; }
.about-body .stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 18px 0 18px; }
.about-body .stat { padding: 16px 18px; border-radius: 20px; }
.about-body .stat-n { font-size: clamp(28px, 3vw, 38px); }
.about-hero { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 80px); align-items: center; padding-top: clamp(40px, 6vw, 90px); }
.about-text { display: grid; gap: 18px; }
.about-text .hero-h1 { margin-top: 4px; font-size: clamp(48px, 6.4vw, 96px); }
.about-p { color: var(--muted); font-size: 18px; max-width: 60ch; }
.frame.big { transform: rotate(-1.5deg); }
.timeline { display: grid; gap: 12px; }
.tl { padding: 18px 22px; border-radius: 24px; display: grid; gap: 4px; }
.tl-period { font: 600 12px/1.4 var(--font-b); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); }
.tl-org { color: var(--muted); }

.nf { padding-top: clamp(56px, 10vw, 140px); }
.nf-card { padding: clamp(24px, 5vw, 64px); border-radius: 40px; display: grid; gap: 16px; max-width: 860px; }

/* -------------------------------------------------------------- footer */
.foot { margin-top: clamp(80px, 10vw, 140px); }
.foot-inner { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; padding-top: 28px; padding-bottom: 44px; border-top: 1px solid var(--line); font-size: 14px; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; font: 600 19px/1 var(--font-d); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* expand fallback (FLIP clone) */
.expand-clone { position: fixed; z-index: 90; margin: 0; object-fit: cover; transform-origin: 0 0; pointer-events: none; border-radius: var(--radius); box-shadow: var(--lg-shadow-up); }

/* ---------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .arch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-li.is-big { grid-row: auto; }
  .card-li.is-big .card { height: auto; aspect-ratio: 16 / 10; }
}
@media (max-width: 900px) {
  .js .nav {
    position: absolute; top: calc(100% + 8px); left: var(--gutter); right: var(--gutter);
    display: none; flex-direction: column; padding: 8px; border-radius: 26px; margin: 0;
    background: var(--bg-2); border: 1px solid var(--lg-edge); box-shadow: var(--lg-shadow-up);
  }
  .js .nav.is-open { display: flex; }
  .js .nav a { padding: 13px 16px; font-size: 17px; color: var(--ink); }
  .js .menu-btn { display: inline-flex; }
  .js .nav + .tools { margin-left: auto; }
  html:not(.js) .bar-inner { flex-wrap: wrap; border-radius: 28px; }
  html:not(.js) .nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .page-hero, .about-hero { grid-template-columns: 1fr; }
  .ph-art { justify-self: start; max-width: 300px; }
  .frame.big { max-width: 380px; }
  .about-teaser { grid-template-columns: 1fr; }
  .about-teaser .frame { max-width: 320px; }
  .story { grid-template-columns: 1fr; }
  .meta { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand-name { display: none; }
  .row-head { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; gap: 16px; }
  .card-li.is-big, .card-li.is-wide { grid-column: auto; }
  .card { aspect-ratio: 1; }
  .card-li.is-big .card, .card-li.is-wide .card { aspect-ratio: 1; }
  .is-big .card-label { left: 12px; right: 12px; bottom: 12px; max-width: none; padding: 16px 18px; }
  .card-go { opacity: 1; transform: none; }
  .cs-grid, .cs-grid-4 { grid-template-columns: 1fr; gap: 30px; }
  .vids { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .vframe { padding: 6px; border-radius: 22px; }
  .vframe video, .vframe img { border-radius: 17px; }
  .vframe figcaption { font-size: 13px; }
  .p-hero { padding-top: 10px; }
  .p-card { height: 72vh; min-height: 380px; border-radius: 30px; }
  .p-head { border-radius: 24px; }
  .close { top: auto; bottom: 18px; right: 16px; height: 54px; min-width: 54px; box-shadow: var(--lg-shadow-up); }
  .close kbd { display: none; }
  .p-index { top: 76px; margin-inline: var(--gutter); }
  .next { grid-template-columns: 76px 1fr; padding-right: 14px; }
  .next-media img { width: 76px; height: 76px; border-radius: 18px; }
  .next-go { display: none; }
  .arch { grid-template-columns: 1fr; }
  .copy-row { gap: 6px 12px; }
  .contact-label { min-width: 0; flex-basis: 100%; }
  .table-wrap { padding: 0; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; overflow: visible; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap th, .table-wrap td { display: block; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-wrap tr {
    margin-bottom: 12px; padding: 14px 18px; border-radius: 22px; border: 1px solid var(--lg-edge);
    background: linear-gradient(150deg, var(--lg-bg), var(--lg-bg-2));
    -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8);
  }
  .table-wrap th, .table-wrap td { padding: 6px 0; border: 0; }
  .table-wrap td::before { content: attr(data-label); display: block; font: 600 11px/1.4 var(--font-b); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
}

/* -------------------------------------------------------------- motion */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html { scroll-behavior: auto; }
  .mesh i { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .card-media img { transform: scale(1.04); }
  .card:hover, .next:hover, .feat:hover { transform: none; }
}
.product > .chip, .case-body > .chip { width: fit-content; }

/* about page grids: even rows (4 + 4, 5) */
.services.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.services.cols-5, .features.cols-5, .feats.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1180px) {
  .services.cols-4, .services.cols-5, .features.cols-5, .feats.cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .services.cols-4, .services.cols-5, .features.cols-5, .feats.cols-5 { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------ round 2: editorial */
.cta { height: 40px; padding: 0 16px; font-size: 14px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hero-contact { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 18px; font-size: 15px; color: var(--muted); }
.hero-contact a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.hero-contact a:hover { color: var(--ink); border-color: var(--accent); }
.hero-stats { margin-top: clamp(40px, 5vw, 64px); }
.hero-h1 { max-width: 16ch; }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent), inset 0 1px 0 var(--lg-spec); }
.kicker, .card-status, .tl-period, .feat-n { color: var(--accent-text); }
.card::after { box-shadow: inset 0 1px 0 var(--lg-spec), inset 0 0 0 1px rgba(255, 255, 255, .22); }
.js .cs-fig { background: linear-gradient(160deg, var(--bg-2), var(--line)); }
.js .cs-fig[data-pos="out"] { transition: transform .8s var(--spring), opacity .35s var(--ease); }
.seg.is-on, .seg[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
::selection { background: var(--accent); color: var(--accent-ink); }
@media (max-width: 900px) { .js .nav { background: var(--bg-2); } }
@media (max-width: 640px) {
  .cta { padding: 0 13px; }
  .hero-cta .btn { flex: 1 1 auto; }
}
@media (max-width: 360px) { .lang { display: none; } }

/* ------------------------------------------------ round 3: content keys */
.intro-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 6px 0 0; }
.intro-grid div { padding: 20px 22px; border-radius: 24px; display: grid; gap: 8px; align-content: start; }
.intro-grid dt { font: 600 11px/1.4 var(--font-b); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }
.intro-grid dd { margin: 0; font-size: 16px; line-height: 1.55; }
.intro-grid .is-result dd { font: 500 21px/1.3 var(--font-d); }
.p-what .meta div { padding: 12px 18px; }
.refs { margin-top: 18px; font-size: 14px; color: var(--muted); }
.cs-en { font-size: 12px; color: var(--muted); font-style: italic; margin-top: 2px; }
.lang-note { margin: -12px 0 24px; font-size: 14px; color: var(--muted); }
.stack-split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 16px; align-items: start; }
.bring { padding: 26px; border-radius: 28px; display: grid; gap: 12px; }
.bring h3 { font: 500 30px/1.05 var(--font-d); letter-spacing: -.01em; }
.bring p { color: var(--muted); font-size: 15px; }
@media (max-width: 900px) {
  .intro-grid, .stack-split { grid-template-columns: 1fr; }
}

/* ------------------------------------------------ round 4: review fixes */
/* Hero: text left, the first project as proof on the right; cards start above the fold. */
.hero { padding-top: clamp(28px, 4vw, 56px); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.hero-h1 { font-size: clamp(42px, 4.9vw, 74px); line-height: .98; max-width: 15ch; margin-top: 16px; }
.hero-roles { margin-top: 12px; font-size: 14px; letter-spacing: .02em; color: var(--muted); }
.hero-lead { margin-top: 18px; max-width: 56ch; font-size: clamp(16px, 1.25vw, 18px); }
.hero-cta { margin-top: 24px; }
.hero-contact { margin-top: 14px; }
.hero-card { max-width: 440px; width: 100%; justify-self: end; }
.hero-card .card { transform: rotate(1.5deg); }
.work { margin-top: clamp(40px, 5vw, 64px); }
.work .section-head { margin-bottom: 20px; }

/* Card label: one line (title and status); the description opens on hover or focus. */
.card-label { gap: 0; padding: 12px 16px; }
.card-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }
.card-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; font-size: 22px; }
.card-status { flex: none; white-space: nowrap; font-size: 10px; }
.is-big .card-label { padding: 14px 20px; }
.is-big .card-title { font-size: clamp(28px, 2.6vw, 38px); }
.card-sub {
  display: block; -webkit-line-clamp: unset; max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .45s var(--spring), opacity .3s var(--ease), margin .45s var(--spring);
}
.card:hover .card-sub, .card:focus-visible .card-sub { max-height: 5.6em; opacity: 1; margin-top: 6px; }
.card-desc { display: none; margin: 10px 4px 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
@media (hover: none) {
  .card-sub { display: none; }
  .card-desc { display: block; }
}
.card-li.is-wide .card, .card-li.is-big .card { width: 100%; }

/* Stats: room under the numbers, nothing touches. */
.stat { gap: 12px; padding: 24px 26px 22px; }
.stat-n { line-height: 1.05; padding-bottom: 2px; }
.stat-l { line-height: 1.45; }
.stats-compact .stat { gap: 8px; padding: 18px 20px; }

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; }
  .hero-card { justify-self: start; max-width: 360px; }
}
@media (max-width: 640px) {
  .hero-card { display: none; }
  .hero-h1 { font-size: clamp(40px, 11vw, 52px); }
}
.card-li { display: flex; flex-direction: column; }
.card-li.is-big .card { flex: 1 1 auto; }
.card-title { flex: none; max-width: 100%; }
.card-status { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hero-card { max-width: 520px; }
.hero-card .card { aspect-ratio: 1200 / 680; }
.hero-card .card-media img { object-position: center; }
.work .section-head { margin-bottom: 16px; }
.hero-card .card-media img { transform: translate3d(calc(var(--px, 0) * -4px), calc(var(--py, 0) * -4px), 0); }

/* ------------------------------------------------ round 5: mobile review */
html { overflow-x: clip; }
.js .cs-fig[data-pos="out"] { transform: translate3d(-14%, 4%, 0) rotate(-6deg) scale(.96); }
.js .cs-deck { touch-action: pan-y; }
.cstack { overflow: clip; overflow-clip-margin: 24px; }
.card-status { font-size: 11px; }
.close { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
@supports (padding: max(0px)) {
  .bar { padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
}

/* Touch screens and narrow windows: every tap target at least 44 px. */
@media (pointer: coarse), (max-width: 640px) {
  .pill, .btn { min-height: 44px; }
  .pill.round, .cs-ctrl .pill { width: 44px; height: 44px; }
  .bar-inner { padding: 6px 6px 6px 8px; }
  .brand { min-height: 44px; }
  .mark { width: 44px; height: 44px; border-radius: 14px; font-size: 14px; }
  .seg { min-height: 44px; padding: 12px 16px; }
  .hero-contact a { min-height: 44px; }
  .foot-links a, .foot-inner a { display: inline-flex; align-items: center; min-height: 44px; }
  .contact-value { display: inline-flex; align-items: center; min-height: 44px; }
  .copy-btn { height: 44px; }
  .p-index { padding: 4px 6px 4px 12px; }
  .case h3 a, .links a { min-height: 44px; display: inline-flex; align-items: center; }
}

@media (max-width: 640px) {
  /* Text at least 16 px; small uppercase labels and captions stay smaller on purpose. */
  .card-desc, .stat-l, .svc p, .feat p, .step p, .arch-item p, .tl p, .tl-org, .mini-col p,
  .product-d, .story-body, .about-p, .section-lead, .bring p, .selfcheck, .intro-grid dd,
  table, .table-wrap td, .table-wrap th, .muted, .hero-roles, .lang-note { font-size: 16px; }
  .vframe figcaption, .g-item figcaption, .refs, .foot-inner, .cs-meta h3 { font-size: 15px; }
  .chip, .chips .chip, .eyebrow { font-size: 14px; }
  .cs-en, .tag { font-size: 13px; }
  .arch-item h4 { font-size: 16px; }
  .hero-roles { line-height: 1.45; }
  .hero-cta .btn { min-height: 48px; }
  /* Filters wrap instead of hiding the last ones off screen. */
  .filters { flex-wrap: wrap; border-radius: 26px; width: 100%; }
  /* The fixed close button never sits on the last lines. */
  .is-project main { padding-bottom: 84px; }
  .vids { grid-template-columns: 1fr 1fr; }
  .foot-inner { flex-direction: column; align-items: flex-start; gap: 4px; }
  .foot-links { gap: 0 20px; }
}
@media (max-width: 380px) {
  .vids { grid-template-columns: 1fr; }
  .cta { padding: 0 12px; font-size: 13px; }
}
@media (max-width: 640px) { .hero-contact, .cs-meta h3 { font-size: 16px; } }
@media (max-width: 640px) { .hero .hero-card { display: none; } }
/* Engineering: the architecture diagram is proof, so it gets the full width. */
.page-hero.is-wide { grid-template-columns: 1fr; }
.page-hero.is-wide .ph-art { max-width: none; justify-self: stretch; transform: none; padding: 8px; }
.page-hero.is-wide .ph-art img { border-radius: 26px; }
@media (max-width: 640px) {
  .ph-art { max-width: 240px; }
  .page-hero.is-wide .ph-art { max-width: none; }
  /* Project hero on a phone: the cover at its own shape, the glass title under it. */
  .p-card { height: auto; min-height: 0; display: flex; flex-direction: column; background: var(--bg-2); }
  .p-img { position: relative; inset: auto; height: auto; aspect-ratio: 16 / 10; object-position: left top; }
  .p-shade { display: none; }
  .p-head { position: relative; left: auto; bottom: auto; margin: -28px 10px 10px; max-width: none; }
  .p-title { font-size: clamp(40px, 12vw, 54px); }
}
