/* Shared motion language: short entrances, deliberate depth, quiet ambient motion. */
:root { --motion-ease: cubic-bezier(.16,1,.3,1); }
@view-transition { navigation: auto; }
::view-transition-old(root),::view-transition-new(root) { animation-duration: .16s; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
:is(section, article)[id] { scroll-margin-top: 110px; }
.reveal { opacity: 1; transform: none; }
.reveal.motion-pending { opacity: 0; transform: translate3d(0,22px,0); }
.reveal.motion-entered { transition: opacity .65s var(--motion-ease), transform .65s var(--motion-ease); transition-delay: var(--motion-delay,0ms); }
.motion-title-line { display: inline-block; }
.premium-motion .cs-hero-content > *,
.premium-motion .motion-title-line,
.premium-motion .agency-service-row {
  animation: premium-rise .8s var(--motion-ease) backwards;
}
.premium-motion .cs-hero-content > :nth-child(2) { animation-delay: .08s; }
.premium-motion .cs-hero-content > :nth-child(3) { animation-delay: .22s; }
.premium-motion .cs-hero-content > :nth-child(4) { animation-delay: .32s; }
.premium-motion .cs-hero-content > :nth-child(5) { animation-delay: .4s; }
.premium-motion .motion-title-line { display: inline-block; }
.premium-motion .motion-title-line:nth-child(2), .premium-motion .agency-service-row:nth-child(2) { animation-delay: .16s; }
.premium-motion .motion-title-line:nth-child(3), .premium-motion .agency-service-row:nth-child(3) { animation-delay: .28s; }
.premium-motion .agency-service-row:nth-child(4) { animation-delay: .4s; }
.cs-hero-title .cs-gradient-text { position: relative; }
.cs-hero-title .cs-gradient-text::after { content: ''; position: absolute; left: 0; right: 0; bottom: -.09em; height: 2px; background: linear-gradient(90deg,#60a5fa,#a78bfa,transparent); transform-origin: left; animation: premium-line 1.1s var(--motion-ease) .45s both; }
.cs-hero-visual { position: relative; perspective: 1000px; }
.motion-tech-float { display: flex; gap: .55rem; justify-content: flex-end; margin-bottom: 1rem; transform: translate3d(var(--motion-px,0px),var(--motion-py,0px),0); transition: transform .3s ease-out; }
.motion-tech-float span { padding: .4rem .7rem; font: 500 .72rem/1.4 'Inter',sans-serif; color: var(--agency-copy); border: 1px solid color-mix(in srgb,var(--agency-blue) 28%,transparent); border-radius: 8px; background: var(--agency-surface); animation: premium-float 5s ease-in-out infinite alternate; }
.motion-tech-float span:nth-child(2) { animation-delay: -2s; }
.motion-tech-float span:nth-child(3) { animation-delay: -3s; }
.motion-scroll-cue { display: inline-flex; align-items: center; gap: .65rem; margin-top: 2.25rem; color: var(--agency-copy); font-size: .78rem; text-decoration: none; }
.motion-scroll-cue span { display: grid; place-items: center; width: 28px; height: 38px; border: 1px solid color-mix(in srgb,var(--agency-blue) 35%,transparent); border-radius: 20px; animation: premium-float 2s ease-in-out 3 alternate; }
:is(.cs-service-card,.cs-project-card,.cs-case-study-card,.cs-partner-offering-item,.cs-tech-pill) {
  transition: transform .35s var(--motion-ease), border-color .25s ease, box-shadow .35s ease, background-color .25s ease;
}
.cs-service-card, .cs-project-card { position: relative; isolation: isolate; }
.cs-service-card::after, .cs-project-card::after { content: ''; pointer-events: none; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(125deg,rgba(59,130,246,.12),transparent 55%,rgba(139,92,246,.08)); opacity: 0; transition: opacity .35s; z-index: -1; }
.cs-service-card:focus-within::after,.cs-project-card:focus-within::after { opacity: 1; }
.cs-project-card img,.cs-case-study-card img,.cs-product-showcase img { transition: transform .7s var(--motion-ease); }
.cs-project-card:focus-within,.cs-case-study-card:focus-within { border-color: #60a5fa; }
.cs-proj-tags > * { border: 1px solid color-mix(in srgb,var(--agency-blue) 20%,transparent); }
.motion-partner-models { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; margin-top: 1.5rem; }
.motion-partner-models article { padding: clamp(1.2rem,3vw,2rem); background: var(--agency-surface); border: 1px solid color-mix(in srgb,var(--agency-blue) 22%,transparent); border-radius: 18px; }
.motion-partner-models h3 { margin: .7rem 0; font-size: 1.25rem; }
.motion-partner-models p,.motion-partner-flow p { color: var(--agency-copy); line-height: 1.7; font-size: .9rem; margin: 0; }
.motion-partner-flow { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); list-style: none; padding: 0; margin: 2.5rem 0; gap: 1.5rem; }
.motion-partner-flow li { position: relative; }
.motion-partner-flow li::before { content: ''; position: absolute; left: 48px; right: -1.5rem; top: 20px; height: 1px; background: linear-gradient(90deg,#3b82f6,rgba(96,165,250,.15)); transform-origin: left; transition: transform .8s var(--motion-ease); }
.motion-partner-flow li:last-child::before { display: none; }
.motion-partner-flow li.motion-pending::before { transform: scaleX(0); }
.motion-partner-flow li > span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--agency-surface); color: #60a5fa; border: 1px solid rgba(96,165,250,.4); font-size: .8rem; }
.motion-partner-flow h3 { margin: 1rem 0 .5rem; font-size: 1rem; }
.header { transition: background-color .25s ease, box-shadow .25s ease, border-color .25s ease; }
.nav-link { text-underline-offset: 7px; }
.nav-link:hover,.nav-link:focus-visible { text-decoration: underline; }
:is(.cs-btn-primary,.cs-btn-secondary,.btn) { transition: transform .25s var(--motion-ease), box-shadow .25s ease, background-color .25s ease; }
:is(.cs-btn-primary,.cs-btn-secondary,.btn):active { transform: scale(.98); }
:is(.cs-btn-primary,.cs-btn-secondary) svg { transition: transform .25s var(--motion-ease); }
:is(.cs-btn-primary,.cs-btn-secondary):hover svg { transform: translateX(3px); }
:is(a,button,input,select,textarea,summary):focus-visible { outline: 2px solid #60a5fa; outline-offset: 4px; }
:is(input,select,textarea) { transition: border-color .2s ease, box-shadow .2s ease; }
:is(input,select,textarea):focus { box-shadow: 0 0 0 3px rgba(59,130,246,.14); }
@keyframes premium-rise { from { opacity: 0; transform: translate3d(0,20px,0); } to { opacity: 1; transform: none; } }
@keyframes premium-float { from { transform: translateY(0); } to { transform: translateY(-6px); } }
@keyframes premium-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (hover:hover) and (pointer:fine) and (min-width:901px) {
  .cs-service-card:hover,.cs-project-card:hover { transform: perspective(1000px) translateY(-6px) rotateX(var(--motion-rx,0deg)) rotateY(var(--motion-ry,0deg)); }
  .cs-service-card:hover::after,.cs-project-card:hover::after { opacity: 1; }
  .cs-project-card:hover img,.cs-case-study-card:hover img,.cs-product-showcase:hover img { transform: scale(1.025); }
  .cs-tech-pill:hover,.cs-partner-offering-item:hover { transform: translateY(-4px); }
}
.cs-tech-marquee-container:hover .cs-tech-marquee-track { animation-play-state: paused; }
:is(.hero-offscreen,.motion-background) .cs-hero *, :is(.hero-offscreen,.motion-background) .cs-hero *::before, :is(.hero-offscreen,.motion-background) .cs-hero *::after { animation-play-state: paused !important; }
.agency-motion-paused *, .agency-motion-paused *::before, .agency-motion-paused *::after { animation-play-state: paused !important; }
.agency-motion-paused .motion-pending { opacity: 1; transform: none; }
.agency-motion-paused :is(.cs-hero-content > *,.motion-title-line,.agency-service-row) { animation: none !important; }
@media (max-width:900px) {
  .motion-partner-flow { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .motion-partner-flow li:nth-child(2)::before { display:none; }
  .cs-hero-bg::before,.cs-hero-bg::after,.cs-hero-grid,.cs-hero-orb,.motion-tech-float span { animation: none !important; }
  .motion-tech-float { justify-content: center; }
  .reveal.motion-pending { transform: translateY(12px); }
  .nav-menu.active > * { animation: premium-rise .3s var(--motion-ease) backwards; }
}
@media (max-width:480px) {
  .motion-partner-models,.motion-partner-flow { grid-template-columns: 1fr; }
  .motion-partner-flow { gap: 1.5rem; }
  .motion-partner-flow li { padding-left: 56px; min-height: 78px; }
  .motion-partner-flow li > span { position:absolute; left:0; top:0; }
  .motion-partner-flow h3 { margin-top: 0; }
  .motion-partner-flow li::before,.motion-partner-flow li:nth-child(2)::before { display:block; left:19px; top:44px; bottom:-1.5rem; width:1px; height:auto; }
  .motion-partner-flow li:last-child::before { display:none; }
}
.motion-light *, .motion-light *::before,.motion-light *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
@media (prefers-reduced-motion:reduce) {
  ::view-transition-group(*),::view-transition-old(root),::view-transition-new(root) { animation: none !important; }
  html { scroll-behavior: auto !important; }
  *,*::before,*::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
  .reveal.motion-pending { opacity: 1; transform: none; }
  .cs-service-card:hover,.cs-project-card:hover,.cs-tech-pill:hover { transform: none; }
}
