@font-face {
  font-family: StudioMotion;
  src: url('/assets/capabilities/Manrope.ttf') format('truetype');
  font-weight: 200 800;
  font-display: swap;
}

:root { --motion-blue: #2945ff; --motion-ease: cubic-bezier(.16,1,.3,1); }
.motion-hero, .motion-case-reel, .motion-next-case { font-family: StudioMotion, Arial, sans-serif; }
.motion-hero {
  box-sizing: border-box;
  width: min(1480px, calc(100% - 2 * clamp(22px, 5vw, 84px)));
  margin: auto;
  padding: 26px 0 35px;
  display: grid;
  grid-template-columns: 1fr 1.17fr;
  align-items: center;
  gap: 28px;
  min-height: min(650px, calc(91svh - 90px));
  color: #101319;
}
main:has(>.motion-hero) { isolation: isolate; }
body:has(.motion-hero) { overflow-x: clip; }
.motion-kicker { display: flex; align-items: center; gap: 13px; color: #526078; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .12em; }
.motion-kicker span { color: var(--motion-blue); font-size: 31px; line-height: 1; }
.motion-hero h1 { margin: 24px 0 12px; font-size: clamp(48px, 6.9vw, 107px); line-height: .99; font-weight: 760; letter-spacing: -.075em; }
.motion-hero h1 > span { display: block; overflow: hidden; padding: 2px 7px 10px 0; }
.motion-hero #hero-title > span { color: #101319; }
.motion-hero #hero-title > span:last-child { color: var(--motion-blue); }
.motion-hero h1 > span > span { display: block; animation: motion-line .8s var(--motion-ease) both; }
.motion-hero h1 > span:nth-child(2) > span { animation-delay: .08s; }
.motion-hero h1 > span:nth-child(3) > span { animation-delay: .16s; }
@keyframes motion-line { from { transform: translateY(105%); } to { transform: translateY(0); } }
.motion-hero-note { color: #57637b; font-size: clamp(12px, 1.2vw, 16px); }
.motion-hero-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 22px; font-size: 13px; font-weight: 650; }
.motion-hero-actions .motion-action { display: inline-flex; align-items: center; gap: 20px; min-height: 49px; padding: 0 17px; border-radius: 8px; background: #101319; color: #fff; }
.motion-action span { transition: transform .3s var(--motion-ease); }
.motion-action:hover span { transform: translate(3px,-3px); }
.motion-hero-offer { display: inline-block; margin-top: 14px; font-size: 11px; color: #526078; }
.motion-hero-stage { height: clamp(385px, 45vw, 580px); position: relative; isolation: isolate; perspective: 1400px; }
.motion-hero .hero-project { position: absolute; display: block; border-radius: 11px; overflow: hidden; border: 1px solid #10131924; background: #19302b; box-shadow: 0 20px 45px #18244023; transition: transform .7s var(--motion-ease), box-shadow .4s; }
.motion-hero .hero-project:nth-child(1) { width: 72%; height: 48%; left: 8%; top: 9%; rotate: -5deg; z-index: 1; }
.motion-hero .hero-project:nth-child(2) { width: 66%; height: 38%; left: 0; top: 52%; rotate: 3deg; z-index: 3; }
.motion-hero .hero-project:nth-child(3) { width: 57%; height: 43%; right: -1%; top: 35%; rotate: -3deg; z-index: 2; }
.motion-hero .hero-project:is(:hover,:focus-visible) { transform: translateY(-12px) translateZ(30px); box-shadow: 0 24px 44px #18244044; z-index: 5; }
.motion-hero .hero-project :is(img,video) { display: block; width: 100%; height: 100%; object-fit: cover; }
.motion-project-label { position: absolute; left: 12px; bottom: 9px; border-radius: 6px; padding: 5px 9px; background: #fff; color: #121724; font-size: 10px; opacity: 0; transition: opacity .2s; }
.hero-project:is(:hover,:focus-visible) .motion-project-label { opacity: 1; }
.motion-entro { position: absolute; top: 11%; left: 9%; color: white; font-size: clamp(18px, 3vw, 44px); letter-spacing: .14em; line-height: 1; text-shadow: 0 2px 15px #0008; }
.motion-entro small { display: block; margin-top: 8px; font-size: 8px; letter-spacing: .11em; text-transform: uppercase; }
.motion-wire { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 6; }
.motion-wire path { fill: none; stroke: var(--motion-blue); stroke-width: 1.6; stroke-dasharray: 1600; animation: motion-wire 1.6s .25s var(--motion-ease) both; }
.motion-wire circle { fill: white; stroke: var(--motion-blue); stroke-width: 2; }
@keyframes motion-wire { from { stroke-dashoffset: 1600; } to { stroke-dashoffset: 0; } }
.motion-robot { position: absolute; right: 0; top: 5%; width: clamp(55px, 7vw, 98px); height: auto; pointer-events: none; z-index: 7; image-rendering: pixelated; animation: motion-robot 4s ease-in-out infinite; }
@keyframes motion-robot { 50% { transform: translateY(-8px) rotate(-3deg); } }
.motion-hero-stage:has(.hero-project:hover) .motion-robot { rotate: 9deg; }

#work.work-section { position: relative; z-index: 2; isolation: isolate; }
#work .project { position: relative; min-width: 0; }
#work .project[hidden] { display: none; }
#work .project-preview { position: relative; }
#work .motion-preview-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #e7ebf5;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  z-index: 6;
  transition: opacity .48s ease;
}
#work video.motion-preview-layer { object-fit: cover; }
#work .catalog-preview-action { z-index: 7; }
#work .project[data-motion-playing] .motion-preview-layer { opacity: 1; }
#work [data-motion-detail] .motion-preview-layer { transform: scale(1.03); transition: opacity .48s ease, transform 2.7s var(--motion-ease); }
#work .project[data-motion-playing] [data-motion-detail] .motion-preview-layer { transform: scale(1.14); }
.motion-preview-button { display: none; position: absolute; top: 9px; left: 9px; z-index: 8; width: 36px; height: 36px; border: 1px solid #cad4e6; border-radius: 50%; background: #fff; color: #1b315c; cursor: pointer; }
.motion-ready .motion-preview-button { display: grid; place-items: center; }
.motion-preview-button[aria-pressed=true] { background: var(--motion-blue); color: white; }
@media (min-width: 960px) {
  #work.work-section .project-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  #work.work-section:not([data-motion-filter]) [data-motion-project="automotive"] { grid-column: span 2; }
  #work.work-section:not([data-motion-filter]) [data-motion-project="automotive"] .project-preview { aspect-ratio: 2.85; }
  #work.work-section:not([data-motion-filter]) [data-motion-project="emir"] { grid-column: span 2; }
  #work.work-section:not([data-motion-filter]) [data-motion-project="emir"] .project-preview { aspect-ratio: 2.85; }
}
@media (min-width:761px) and (max-height:800px) {
  .motion-hero-stage { height: clamp(290px,60svh,520px); }
  .motion-hero h1 { font-size: clamp(43px,min(6.9vw,11.3svh),99px); }
}
@media (min-width: 761px) and (prefers-reduced-motion: no-preference) {
  .motion-ready .motion-hero { position: sticky; top: 0; z-index: 0; opacity: var(--motion-hero-opacity,1); transform: scale(calc(1 - var(--motion-departure,0) * .055)); }
  .motion-ready .motion-hero .hero-project:nth-child(1) { translate: calc(55px * var(--motion-departure,0)) calc(-65px * var(--motion-departure,0)); }
  .motion-ready .motion-hero .hero-project:nth-child(2) { translate: calc(-50px * var(--motion-departure,0)) calc(25px * var(--motion-departure,0)); }
  .motion-ready .motion-hero .hero-project:nth-child(3) { translate: calc(80px * var(--motion-departure,0)) calc(-15px * var(--motion-departure,0)); }
  .motion-ready #work.work-section { background: var(--motion-work-paper,#f4f5f7); clip-path: inset(0 round calc((1 - var(--motion-arrival,1)) * 28px)); }
  .motion-ready #work .catalog-heading { transform: perspective(1000px) rotateX(calc((1 - var(--motion-arrival,1)) * 14deg)); transform-origin: top; }
  .motion-ready #services.capabilities-section { clip-path: circle(calc(var(--motion-ink,1) * 153%) at 87% 14%); }
  .motion-ready #contact { clip-path: inset(0 calc((1 - var(--motion-contact,1)) * 34%) 0 round calc((1 - var(--motion-contact,1)) * 85px)); }
  .motion-ready :is(#work,#services,#contact):is(:target,:focus-within) { clip-path: none; }
}

.motion-case-title { animation: motion-case-title .7s var(--motion-ease) both; }
@keyframes motion-case-title { from { clip-path: inset(0 0 85% 0); transform: translateY(18px); } to { clip-path: inset(0); transform: translateY(0); } }
.motion-case-reel { width: 100%; margin: clamp(28px,5vw,72px) auto; background: #101722; color: #f3f6ff; padding: clamp(18px,4vw,48px); border-radius: 18px; box-sizing: border-box; min-width: 0; }
.motion-case-reel h2 { margin: 0 0 20px; font-size: clamp(28px,4vw,52px); line-height: 1.05; letter-spacing: -.04em; }
.motion-case-stage { border-radius: 10px; overflow: hidden; background: #1d273a; }
.motion-case-stage a { position: relative; display: grid; }
.motion-case-stage img { width: 100%; height: clamp(220px,54vw,630px); object-fit: contain; display: block; }
.motion-case-zoom span { position: absolute; bottom: 12px; right: 12px; border-radius: 50%; padding: 8px 12px; background: #fff; color: #233552; }
.motion-case-controls, .motion-case-cart { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 15px; }
.motion-case-controls, .motion-case-cart { display: none; }
.motion-ready :is(.motion-case-controls,.motion-case-cart) { display: flex; }
.motion-case-controls output { min-width: 55px; text-align: center; font-variant-numeric: tabular-nums; }
.motion-case-reel :is(button,select) { font: inherit; line-height: 1.2; font-size: 13px; background: #212e46; color: #fff; border: 1px solid #50678c; border-radius: 8px; min-height: 42px; padding: 7px 12px; }
.motion-case-reel button { cursor: pointer; }
.motion-case-reel button:hover, .motion-case-reel button[aria-pressed=true] { background: #344eff; }
.motion-case-caption { margin: 14px 0; color: #c2cee2; font-size: 13px; }
.motion-case-thumbs { display: flex; list-style: none; padding: 0; margin: 0; gap: 10px; overflow-x: auto; scrollbar-color: #8395be #202c40; }
.motion-case-thumbs li { flex: 0 0 128px; }
.motion-case-thumbs a { display: block; padding: 4px; border: 1px solid #415471; border-radius: 7px; color: #d4def0; font-size: 10px; }
.motion-case-thumbs a[aria-current=true] { border-color: #879aff; background: #273a73; }
.motion-case-thumbs img { width: 100%; height: 68px; object-fit: contain; border-radius: 5px; background: #263343; }
.motion-case-thumbs span { display: block; padding: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.motion-case-film { width: 100%; aspect-ratio: 16/9; display: block; object-fit: cover; margin-bottom: 18px; border-radius: 10px; }
.motion-case-story { display: none; }
@media (min-width:761px) and (prefers-reduced-motion: no-preference) {
  .motion-ready .motion-case-story { display: block; height: 115svh; margin: 38px 0; }
  .motion-case-story-frame { position: sticky; top: 8svh; height: 58svh; overflow: hidden; border-radius: 16px; background: #121a28; }
  .motion-case-story-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #121a28; }
  .motion-case-story-frame img:nth-child(2) { clip-path: inset(0 clamp(0%,calc((.52 - var(--motion-story,0)) * 320%),100%) 0 0); }
  .motion-case-story-frame img:nth-child(3) { clip-path: inset(clamp(0%,calc((.91 - var(--motion-story,0)) * 350%),100%) 0 0); }
}
.motion-route-wipe { position: fixed; z-index: 1000; inset: 0; background: var(--route-color); pointer-events: none; }
.motion-route-wipe img { width: 100%; height: 100%; display: block; object-fit: contain; }
.motion-next-case { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 20px; margin: 36px auto; padding: 20px; background: #e7ecf6; color: #151c28; border-radius: 14px; }
.motion-next-case strong { display: block; margin-top: 9px; font-size: clamp(20px,3.5vw,46px); }
.motion-next-case img { width: 100%; max-height: 250px; object-fit: contain; border-radius: 8px; }
.motion-viewer { border: 0; border-radius: 12px; background: #101722; color: white; width: min(1100px,calc(100% - 26px)); max-width: none; max-height: 90svh; padding: 12px; }
.motion-viewer::backdrop { background: #07101edb; }
.motion-viewer header { display: flex; justify-content: flex-end; gap: 7px; margin-bottom: 8px; }
.motion-viewer button { min-width: 44px; min-height: 44px; border-radius: 7px; border: 1px solid #6b7fa3; background: #243550; color: white; cursor: pointer; }
.motion-viewer div { max-height: 74svh; overflow: auto; }
.motion-viewer img { display: block; width: 100%; max-width: none; }
@media (prefers-reduced-motion: no-preference) {
  [data-motion-cover] { animation: motion-cover-in .58s var(--motion-ease) both; }
  @keyframes motion-cover-in { from { clip-path: inset(7% round 15px); opacity: .6; } to { clip-path: inset(0); opacity: 1; } }
  .motion-viewer[open] { animation: motion-line .22s var(--motion-ease); }
}
@media (max-width:760px) {
  .motion-hero { width: calc(100% - 42px); display: block; min-height: 0; padding: 23px 0 12px; }
  .motion-kicker { font-size: 9px; gap: 7px; }
  .motion-kicker span { font-size: 24px; }
  .motion-hero h1 { margin: 15px 0 8px; font-size: clamp(40px,11vw,76px); }
  .motion-hero h1 > span { padding-bottom: 5px; }
  .motion-hero-actions { margin-top: 15px; gap: 11px; font-size: 11px; }
  .motion-hero-actions .motion-action { min-height: 44px; padding: 0 12px; gap: 10px; }
  .motion-hero-stage { height: clamp(224px,67vw,330px); margin-top: 12px; }
  .motion-entro small { font-size: 5px; }
  .motion-case-thumbs li { flex-basis: 96px; }
  .motion-case-thumbs img { height: 54px; }
}
@media (prefers-reduced-motion: reduce) {
  .motion-hero *, .motion-case-title { animation: none !important; transition: none !important; }
  .motion-preview-button, [data-motion-play] { display: none !important; }
}
