/* Case pages (oker.com-style), shared by every /work/* page */
/* no side scrollbar, the page still scrolls */
html{scrollbar-width:none}html::-webkit-scrollbar,body::-webkit-scrollbar{display:none}
:root{
  --ink:#101010;--mute:#a0a0a0;--line:#e6e6e6;--bg:#fff;--g:16px;--r:4px;
  --f:Onest,"Helvetica Neue",Helvetica,Arial,sans-serif;
  /* oker.com scale, fluid between 390px and 1440px viewports */
  --t-title:clamp(36px,calc(36px + 124 * (100vw - 390px) / 1050),160px);
  --t-big:clamp(28px,calc(28px + 52 * (100vw - 390px) / 1050),80px);
  --t-mid:clamp(20px,calc(20px + 12 * (100vw - 390px) / 1050),32px);
  --t-sm:clamp(14px,calc(14px + 2 * (100vw - 390px) / 1050),16px);
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:450 var(--t-sm)/1.25 var(--f);letter-spacing:-.01em;-webkit-font-smoothing:antialiased}
a{color:inherit}
img,video{display:block;width:100%;height:auto;border-radius:var(--r)}
video{object-fit:cover;background:#000}

/* header — the same bar as the home page (its sizes were measured there): 52px bar, logo + "Madnomad" 16px,
   menu 16px centred between the logo and the pill, "Демо дни" with the orange glint running over it */
.hd{position:sticky;top:0;z-index:40;height:52px;background:#000;color:#fff;display:flex;align-items:center;padding:0 var(--g)}
.hd-logo{flex:none;display:flex;align-items:center;gap:12px;text-decoration:none;font:500 16px/16px var(--f);letter-spacing:-.01em}
.hd-logo img{flex:none;width:69px;height:12px;border-radius:0}
.hd-nav{flex:1;display:flex;justify-content:center;gap:40px;font:500 16px/20px var(--f);letter-spacing:-.01em}
.hd-nav a{text-decoration:none}
/* the home page's menu has a space after "Все проекты" and an empty character after the arrow: the same spacing */
.hd-nav a:first-child{padding-right:4.6px}
.hd-nav .demo{padding-right:14.7px}
.demo{display:inline-flex;align-items:center;gap:2.3px}
.demo span{background:linear-gradient(120deg,#fff 0%,#fff 35%,#ff6a0d 50%,#fff 65%,#fff 100%);background-size:200% auto;
  -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;animation:mnGlint 2s linear infinite}
.demo svg{flex:none;width:15px;height:15px;overflow:visible}
@keyframes mnGlint{from{background-position:125% center}to{background-position:-75% center}}
/* the pill: 36px tall, 16px sides, 14px medium, the arrow icon; on hover only the arrow moves (as on the home page) */
.pill{flex:none;display:inline-flex;align-items:center;gap:9px;background:#fff;color:#171717;text-decoration:none;border-radius:999px;padding:8px 16px;font:500 14px/20px var(--f);letter-spacing:-.01em}
.hd .pill{position:relative;top:2px} /* on the home page the pill sits 2px lower than the logo line */
.pill svg{flex:none;width:12px;height:10px;transition:transform .3s cubic-bezier(.2,.7,.2,1)}
.pill:hover svg{transform:translateX(4px)}
/* burger: three 14.5px lines in a 24px box, 16px from the edge; it turns into a cross while the menu is open */
.burger{display:none;margin-left:auto;background:none;border:0;padding:0;color:#fff;width:24px;height:24px;cursor:pointer}
.burger svg{display:block;width:24px;height:24px;overflow:visible}
.burger path{stroke:currentColor;stroke-width:1.5;stroke-linecap:round;transition:transform .3s cubic-bezier(.2,.7,.2,1),opacity .2s;transform-origin:12px 12px}
.burger[aria-expanded="true"] path:nth-child(1){transform:rotate(45deg) translateY(6.25px)}
.burger[aria-expanded="true"] path:nth-child(2){opacity:0}
.burger[aria-expanded="true"] path:nth-child(3){transform:rotate(-45deg) translateY(-6.25px)}
.menu{display:none}
@media(max-width:809px){
  .hd{height:60px}
  .hd-nav,.hd .pill{display:none}.burger{display:block}
  /* open menu: big rows with dividers from 112px down, the button full width at the bottom — the same menu as on
     the home page and «Проекты» (cms/cms.js, #mn-menu); only opacity and transform animate, so it stays smooth */
  .menu{display:flex;position:fixed;inset:60px 0 0;z-index:39;background:#000;color:#fff;padding:52px 20px calc(28px + env(safe-area-inset-bottom));flex-direction:column;justify-content:space-between;align-items:stretch;
    opacity:0;visibility:hidden;transition:opacity .25s ease,visibility 0s linear .25s;overscroll-behavior:contain}
  .menu.on{opacity:1;visibility:visible;transition:opacity .25s ease}
  .menu nav{align-self:stretch}
  .menu nav a,.menu .pill{transform:translateY(14px);opacity:0;transition:transform .45s cubic-bezier(.2,.7,.2,1),opacity .3s ease}
  .menu.on nav a,.menu.on .pill{transform:none;opacity:1}
  .menu.on nav a:nth-child(2){transition-delay:.05s}.menu.on nav a:nth-child(3){transition-delay:.1s}.menu.on .pill{transition-delay:.15s}
  .menu nav a{display:flex;align-items:center;box-sizing:border-box;height:75px;font:400 34px/1.1 var(--f);letter-spacing:-.02em;text-decoration:none;border-bottom:1px solid rgba(255,255,255,.16)}
  .menu nav .demo{padding:0;gap:8px;font-weight:400}
  .menu nav .demo svg{width:24px;height:24px}
  .menu .pill{display:flex;align-self:stretch;justify-content:center;height:56px;padding:0 16px;font-size:16px}
}

/* layout: 8-column grid, 16px gutters (oker.com) */
.wrap{padding:0 var(--g)}
.g8{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));column-gap:var(--g)}
.title{font:300 var(--t-title)/1.125 var(--f);letter-spacing:-.045em;margin:clamp(56px,8.3vw,120px) 0 0}
.hero{margin-top:var(--g)}
/* sound of the header video: a small round button, in the corner, following the mouse over the video */
.hero.has-snd{position:relative;cursor:pointer}
.snd{position:absolute;right:16px;bottom:16px;z-index:2;display:flex;align-items:center;justify-content:center;width:48px;height:48px;padding:0;border:0;border-radius:50%;background:rgba(16,16,16,.55);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);color:#fff;cursor:pointer;transition:transform .25s cubic-bezier(.2,.7,.2,1),background .2s}
.snd svg{width:22px;height:22px}
.snd.on{background:rgba(255,255,255,.85);color:#101010}
.snd.follow{right:auto;bottom:auto;transform:none;pointer-events:none;transition:background .2s}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* leaves room for the first line of the title under the hero */
.hero video,.hero img{aspect-ratio:16/9;max-height:calc(100svh - 52px - 32px - var(--t-big) * 1.2 - 32px)}
@media(max-width:809px){.hero video{aspect-ratio:358/544}}
/* layered hero: dark scene + the product on top, tilting after the mouse */
.hero.tilt{position:relative;aspect-ratio:16/9;max-height:calc(100svh - 52px - 32px - var(--t-big) * 1.2 - 32px);width:100%;background:#000;border-radius:var(--r);overflow:hidden;perspective:1400px}
.hero.tilt img{position:absolute;inset:0;width:100%;height:100%;max-height:none;aspect-ratio:auto;object-fit:cover}
.hero.tilt .t-card{transform:rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)) scale(1.02);transition:transform .6s cubic-bezier(.2,.7,.2,1);will-change:transform}
@media(max-width:809px){.hero.tilt{aspect-ratio:1/1}}
/* cut-out parallax hero (Равновесие): layers placed in % of the stage, each shifts by its depth --d */
.hero.lay{position:relative;aspect-ratio:16/9;width:100%;background:#ebebe7;border-radius:var(--r);overflow:hidden}
.hero.lay img{position:absolute;height:auto;max-height:none;aspect-ratio:auto;border-radius:0;
  transform:translate3d(calc(var(--mx,0) * var(--d) * -34px),calc(var(--my,0) * var(--d) * -22px),0) scaleX(var(--sx,1));transition:transform .9s cubic-bezier(.2,.7,.2,1);will-change:transform}
.hero.lay .scr{border-radius:clamp(8px,1vw,16px);box-shadow:0 30px 60px -20px rgba(20,40,20,.35)}
.hero.lay .soft{filter:blur(1.5px)}
.hero.lay .far{filter:saturate(.9) brightness(1.02)}
.hero.lay .bg{height:110%;object-fit:cover}
.hero.lay .dark{filter:brightness(.42) saturate(1.35) contrast(1.1)}
.hero.lay .fg{filter:blur(2px) saturate(1.15) brightness(.78) sepia(.12)}
.hero.lay .gr{filter:blur(1.2px)}
.hero.lay .fl{filter:blur(7px) saturate(1.5) brightness(.9);opacity:.85}
.hero.lay .lay-t{position:absolute;left:clamp(16px,2.2vw,32px);bottom:clamp(16px,2.6vw,36px);color:#fff;z-index:2;pointer-events:none;text-shadow:0 2px 16px rgba(0,0,0,.35)}
.hero.lay .lay-t span{display:block;font-size:clamp(12px,1.2vw,18px);opacity:.9}
.hero.lay .lay-t b{display:block;font-weight:500;font-size:clamp(28px,4.2vw,60px);line-height:1;letter-spacing:-.01em}
@media(max-width:809px){.hero.lay{aspect-ratio:4/3}}
/* hero cut out of a screen recording: the top (browser bar) is hidden, the frame keeps 16:9 */
.hero.crop{position:relative;aspect-ratio:16/9;max-height:calc(100svh - 52px - 32px - var(--t-big) * 1.2 - 32px);width:100%;background:#000;border-radius:var(--r);overflow:hidden}
.hero.crop video{position:absolute;left:0;top:calc(var(--top) * -1.06);width:100%;height:auto;max-height:none;aspect-ratio:auto}

.big{font:300 var(--t-big)/1.08 var(--f);letter-spacing:-.035em;margin:0}
.intro{margin-top:var(--g);align-items:start}
.intro .big{grid-column:1/6;max-width:800px}
/* display text a touch heavier than oker's light (set apart: a 350 weight inside the font shorthand is dropped) */
.title,.big,.stat b,.more h2{font-weight:350}
.meta{grid-column:7/9;display:grid;grid-template-columns:1fr 1fr;column-gap:var(--g);row-gap:16px;margin:0;padding-top:4px}
.meta dt{font-weight:500}
.meta dd a{display:block;width:max-content;text-decoration:none;transition:color .2s}
.meta dd a:hover,.meta dd a:focus-visible{color:var(--ink);text-decoration:underline;text-underline-offset:3px;outline:none}
.meta dd{margin:2px 0 0;color:var(--mute);font-size:.875em;line-height:1.43}

.about{margin:clamp(96px,14vw,200px) 0 clamp(96px,12vw,180px);border-top:1px solid var(--line);padding-top:clamp(16px,2.2vw,32px)}
.about .txt{grid-column:1/5;font:300 var(--t-mid)/1.125 var(--f);letter-spacing:-.02em}
.about .txt p{margin:0}.about .txt p+p{margin-top:1.1em}

.stack{display:flex;flex-direction:column;gap:var(--g)}
.stack+.stack{margin-top:var(--g)}
.two{display:grid;grid-template-columns:1fr 1fr;gap:var(--g)}
.sec{align-items:start}
.sec .lbl{grid-column:1/2;margin:0}
.sec .lbl span{display:block;color:var(--mute)}
.sec .lbl p{margin:0}
.sec .media{grid-column:5/9}
.statement{margin:clamp(96px,15vw,216px) 0 var(--g)}
.statement .big{grid-column:1/6}

/* split block: statement on top + label/text (or numbers) at the bottom on the left, media on the right */
.res,.sp{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:var(--g);margin-top:var(--g)}
.res-l,.sp-l{display:flex;flex-direction:column;justify-content:space-between;gap:48px;min-height:100%}
.res-l h2,.sp-l h2{margin:0;font:300 clamp(24px,calc(24px + 24 * (100vw - 390px) / 1050),48px)/1.08 var(--f);letter-spacing:-.03em;max-width:10.5em;text-wrap:balance}
.sp-l .lbl{margin:0;max-width:22em}
.sp-l .lbl span{display:block;color:var(--mute)}
.sp-l .lbl p{margin:0}
/* user flow as gray bubbles */
.flow{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:8px;width:max-content;max-width:min(560px,100%)}
.sp-l .lbl:has(.flow){max-width:none}
.sp-l .lbl .flow + p{margin-top:16px;max-width:26em} /* the line under the bubbles: own space, short measure */
.flow li{display:flex;white-space:nowrap}
.flow b{font-weight:450;background:#f2f2f2;color:var(--ink);border-radius:999px;padding:8px 14px;line-height:1}
.stats{display:grid;grid-template-columns:1fr 1fr;gap:var(--g)}
.stat{border-left:1px solid var(--line);padding-left:var(--g)}
.stat b{display:block;font:300 clamp(40px,4.4vw,64px)/1 var(--f);letter-spacing:-.04em}
.stat span{display:block;margin-top:8px;color:var(--mute);max-width:18em}

.more{margin:clamp(96px,12vw,180px) 0 0}
.more h2{font:300 clamp(24px,2.3vw,32px)/1.125 var(--f);letter-spacing:-.02em;margin:0 0 24px}
/* "Browse more" list (oker.com): tall rows, stacked tags, hovered row stays dark while the rest fade */
.row{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));column-gap:var(--g);padding:24px 0 56px;border-top:1px solid var(--line);text-decoration:none;transition:opacity .35s cubic-bezier(.2,.7,.2,1)}
.row .n{grid-column:1/3}.row .s{grid-column:3/5}
.row .t{grid-column:5/7;color:var(--mute)}.row .t i{display:block;font-style:normal}
.row .c{grid-column:8/9;justify-self:end;color:var(--mute);text-decoration:underline;text-underline-offset:3px}
.list:hover .row{opacity:.22}
.list .row:hover{opacity:1}
.list .row:hover .c,.list .row:hover .t{color:var(--ink)}
.row .n,.row .s,.row .t i,.row .c{transition:color .2s}
.list .row .n:hover,.list .row .s:hover,.list .row .t i:hover,.list .row .c:hover{color:var(--hover,#ff5b1f)}

@media(min-width:810px) and (max-width:1199px){.sec .lbl{grid-column:1/3}.intro .big{grid-column:1/7}.meta{grid-column:7/9;grid-template-columns:1fr}}
@media(max-width:809px){
  .g8{grid-template-columns:repeat(2,minmax(0,1fr))}
  .intro .big,.about .txt,.statement .big{grid-column:1/-1}
  .meta{grid-column:1/-1;margin-top:32px}
  .two,.res,.sp{grid-template-columns:1fr}
  .flow{width:auto;max-width:none}
  .sec .lbl{grid-column:1/-1;margin-bottom:16px}.sec .media{grid-column:1/-1}
  .row{grid-template-columns:1fr 1fr;row-gap:4px;padding:16px 0 32px}.row .n{grid-column:1/2}.row .c{grid-column:2/3;text-align:right}.row .s{grid-column:1/-1}.row .t{grid-column:1/-1;margin-top:8px}
}

/* ---- extra layouts for the other cases (oker.com/projects/ouch rhythm) ---- */
/* fixed frames: media is cropped to the frame, so every row keeps the same rhythm whatever the source ratio */
.fr{position:relative;overflow:hidden;border-radius:var(--r);background:#f2f2f2}
.fr>img,.fr>video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:0}
.a43{aspect-ratio:4/3}.a169{aspect-ratio:16/9}.a34{aspect-ratio:3/4}.a11{aspect-ratio:1/1}.a54{aspect-ratio:5/4}
.strip{aspect-ratio:1408/150}
.fr.contain>img,.fr.contain>video{object-fit:contain}
.three{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--g)}
/* offset row: caption in the left two columns, media across the other six */
.ofs{align-items:start}
.ofs .cap{grid-column:1/3;margin:0}
.ofs .cap span{display:block;color:var(--mute)}
.ofs .cap p{margin:0}
.ofs .fr,.ofs>img{grid-column:3/9}
/* a text block right after a big statement gets air, so two headings never stack */
.statement+.stack>.sp:first-child,.statement+.stack>.ofs:first-child,.quote+.stack>.sp:first-child,.quote+.stack>.ofs:first-child{margin-top:clamp(64px,8vw,120px)!important}
/* mirrored split block */
.sp.rev .sp-l{order:2}
/* single quote line between media */
.quote{margin:clamp(96px,14vw,200px) 0 clamp(20px,2.4vw,36px)}
.quote .big{grid-column:1/6}
/* floating award badge (TATE): pinned bottom-left, tilted, "Посмотреть кейс" always under it; while the page scrolls an echo of faded copies trails behind the picture (.badge-echo, case.js); hover straightens and enlarges it */
.badge{position:fixed;left:24px;bottom:24px;z-index:30;width:150px;display:flex;flex-direction:column;align-items:center;text-decoration:none;color:var(--ink)}
/* own compositing layer: the rotated shadow no longer repaints (flickers) while the page scrolls or on hover */
.badge img{width:100%;border-radius:8px;box-shadow:0 14px 32px rgba(0,0,0,.26);transform:translateZ(0) rotate(-6deg);position:relative;z-index:1;will-change:transform;backface-visibility:hidden;transition:transform .45s cubic-bezier(.2,.7,.2,1)}
.badge{will-change:transform;transform:translateZ(0)}
/* echo copies sit right under the picture, with the same tilt; case.js spreads them along the scroll and fades them */
.badge .badge-echo{position:absolute;top:0;left:0;z-index:0;box-shadow:none;opacity:0;pointer-events:none;transition:none}
/* red pill on its own layer above the picture, so the diploma's shadow never falls on it */
.badge-t{position:relative;z-index:2;margin-top:14px;font-size:13px;font-weight:500;line-height:1;white-space:nowrap;color:#fff;background:#ff3d0a;border-radius:999px;padding:9px 14px}
.badge:hover img,.badge:focus-visible img{transform:translateZ(0) rotate(0) scale(1.06)}
.badge:focus-visible{outline:none}
@media(max-width:809px){.badge{width:92px;left:12px;bottom:12px}.badge-t{align-self:flex-start;margin-top:10px;font-size:11px;padding:7px 10px}}
/* tag bubbles reused outside the flow block */
.tags{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.tags b{font-weight:450;background:#f2f2f2;border-radius:999px;padding:8px 14px;line-height:1;display:inline-block}
@media(max-width:809px){
  .three{grid-template-columns:1fr 1fr}
  .ofs .cap,.ofs .fr,.ofs>img,.quote .big{grid-column:1/-1}
  .ofs .cap{margin-bottom:16px}
  .sp.rev .sp-l{order:0}
  .a34{aspect-ratio:4/5}
}

/* frame sequence: ~10vh of scroll per frame, picture pinned under the header */
.seq{position:relative;height:calc(var(--frames,30) * 10vh + 100svh)}
.seq-in{position:sticky;top:calc(52px + var(--g));height:calc(100svh - 52px - var(--g) * 2);border-radius:var(--r);overflow:hidden;background:#111}
.seq-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:0}
/* caption sits bottom-right: the bottom-left corner belongs to the floating award badge */
.seq-cap{position:absolute;right:var(--g);bottom:calc(var(--g) + 14px);max-width:26em;color:#fff;text-shadow:0 1px 18px rgba(0,0,0,.35)}
.seq-cap span{display:block;opacity:.7;margin-bottom:6px}
.seq-cap p{margin:0}
.seq-bar{position:absolute;left:var(--g);right:var(--g);bottom:var(--g);height:2px;background:rgba(255,255,255,.25)}
.seq-bar i{display:block;height:100%;width:0;background:#fff}
@media(max-width:809px){.seq{height:calc(var(--frames,30) * 7vh + 70svh)}.seq-in{height:62svh;top:calc(52px + 8px)}}

/* reveal on scroll */
.rv{opacity:0;transform:translateY(32px);transition:opacity .9s cubic-bezier(.2,.7,.2,1),transform .9s cubic-bezier(.2,.7,.2,1)}
.rv.in{opacity:1;transform:none}
@media(prefers-reduced-motion:reduce){.rv{opacity:1;transform:none;transition:none}}

/* Vimeo background players (videos that live on Vimeo): the frame keeps the video's proportions */
.vim{position:relative;width:100%;background:#000;border-radius:var(--r);overflow:hidden}
.vim iframe{position:absolute;inset:0;width:100%;height:100%;border:0;pointer-events:none}
.hero.vimh .vim{max-height:calc(100svh - 52px - 32px - var(--t-big) * 1.2 - 32px);margin:0 auto}

/* the site itself (Равновесие): the whole page in a browser window on a grey table */
.site{background:#e9e9e6;border-radius:var(--r);padding:clamp(20px,6vw,110px) clamp(14px,11vw,220px)}
.site-win{border-radius:clamp(8px,.9vw,14px);overflow:hidden;background:#fff;box-shadow:0 50px 100px -50px rgba(20,24,20,.45),0 2px 8px rgba(0,0,0,.06)}
.site-bar{display:flex;gap:6px;align-items:center;height:clamp(18px,1.8vw,30px);padding:0 clamp(8px,1vw,14px);background:#f6f6f4;border-bottom:1px solid #e6e6e2}
.site-bar i{width:clamp(6px,.6vw,10px);height:clamp(6px,.6vw,10px);border-radius:50%;background:#d6d6d1}
.site-win img{display:block;width:100%;height:auto;max-height:none;aspect-ratio:auto;border-radius:0}

/* a live landing (EMCD Card, tools/live-landing.mjs): the real page in a frame 75% of the screen wide, stuck under the
   header while the case page scrolls it (case.js, data-live). Narrower than its desktop layout it is drawn at 1080px
   and scaled down, so a laptop still sees the desktop version; on a phone the frame is full width, the mobile version */
.live{position:relative;min-height:100svh;margin-top:clamp(64px,9vw,140px)}
.live-box{position:sticky;top:calc(52px + var(--g));width:75vw;height:calc(100svh - 52px - var(--g) * 2);margin:0 auto;border-radius:clamp(12px,1.4vw,24px);overflow:hidden;background:#0b0b0f;isolation:isolate}
/* a case without a cover: the title gets air under the header and stands 3× further from the edge (48px, not 16) */
.nohero .intro{margin-top:clamp(40px,6vw,96px);padding-left:calc(var(--g) * 2)}
.live-box iframe{display:block;border:0;transform-origin:0 0}
@media(max-width:809px){.live-box{width:100%;top:calc(52px + 8px);height:calc(100svh - 52px - 16px)}}

/* a black case page (Blockchain Life): white text on black, everything else follows the variables */
body.dark{--ink:#fff;--mute:#8c8c8c;--line:#262626;--bg:#000;background:#000!important;color:#fff}
body.dark .fr,body.dark .vim{background:#0d0d0d}
body.dark .flow b,body.dark .tags b{background:#1a1a1a;color:#fff}
body.dark a{color:inherit}
body.dark .mn-ft{background:#000!important;color:#fff!important;border-top-color:#262626!important}
body.dark .mn-ft a,body.dark .mn-ft-track a{color:#fff!important}
