/* SIXORA / IMMERSIVE SCROLL MOTION
   Original, lightweight motion layer inspired by modern interaction libraries.
   CSS + native browser APIs only: no animation framework or runtime dependency. */
:root {
  --sx-motion-blue: #86a8f1;
  --sx-motion-cyan: #7dc9d0;
  --sx-motion-ease: cubic-bezier(.2,.75,.25,1);
  --sx-pointer-x: 50vw;
  --sx-pointer-y: 30vh;
  --sx-page-progress: 0;
}
html { scroll-behavior: smooth; }
body { position: relative; }
body.sx-pointer-enabled::before {
  content: "";
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  opacity: .32;
  background: radial-gradient(480px circle at var(--sx-pointer-x) var(--sx-pointer-y), rgba(92,137,224,.10), transparent 72%);
  transition: opacity .25s ease;
}
main, .footer { position: relative; z-index: 1; }
.site-header { transition: background .35s ease, border-color .35s ease, box-shadow .35s ease, height .35s ease; }
.site-header.is-scrolled {
  background: rgba(7,10,16,.94) !important;
  border-bottom-color: rgba(128,165,229,.30) !important;
  box-shadow: 0 14px 36px rgba(0,0,0,.28) !important;
}
.nav a { position: relative; }
.nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 5px;
  height: 1px;
  background: var(--sx-motion-cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s var(--sx-motion-ease);
}
.nav a:not(.nav-cta):hover::after,
.nav a[aria-current="location"]::after { transform: scaleX(1); }
.scroll-progress {
  height: 2px !important;
  background: linear-gradient(90deg,#6f94ef,#73c5cf) !important;
  box-shadow: 0 0 18px rgba(115,197,207,.32) !important;
  transform-origin: left center;
}
/* The hero artwork has a slow orbital rhythm, not a constant noisy animation. */
.studio-orbit.orbit-one { animation: sx-orbit-a 23s linear infinite; }
.studio-orbit.orbit-two { animation: sx-orbit-b 31s linear infinite; }
.studio-orbit.orbit-three { animation: sx-orbit-c 28s linear infinite; }
.studio-node { animation: sx-node-float 6s ease-in-out infinite; }
.studio-node.node-ai { animation-delay: -1.5s; }
.studio-node.node-app { animation-delay: -3s; }
.studio-node.node-media { animation-delay: -4.5s; }
.studio-core { animation: sx-core-breathe 7s ease-in-out infinite; }
.idea-orbit-one { animation: sx-orbit-a 26s linear infinite; }
.idea-orbit-two { animation: sx-orbit-b 34s linear infinite; }
.idea-orbit-three { animation: sx-orbit-c 30s linear infinite; }
.idea-core { animation: sx-core-breathe 8s ease-in-out infinite; }
.idea-float { animation: sx-node-float 6.5s ease-in-out infinite; }
.idea-float-app { animation-delay: -1.4s; }
.idea-float-ai { animation-delay: -2.8s; }
.idea-float-create { animation-delay: -4.2s; }
@keyframes sx-orbit-a { from { rotate: 0deg; } to { rotate: 360deg; } }
@keyframes sx-orbit-b { from { rotate: 360deg; } to { rotate: 0deg; } }
@keyframes sx-orbit-c { 0%,100% { rotate: -8deg; } 50% { rotate: 8deg; } }
@keyframes sx-node-float { 0%,100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@keyframes sx-core-breathe { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.16); } }
/* Scroll entrances: reveal on approach, then settle cleanly into the page. */
html.sx-motion-ready .sx-reveal {
  opacity: 0;
  filter: blur(7px);
  transform: translate3d(0,42px,0) scale(.985);
  transition: opacity .9s var(--sx-motion-ease), transform 1.05s var(--sx-motion-ease), filter .9s ease;
  transition-delay: var(--sx-reveal-delay,0ms);
  will-change: opacity, transform, filter;
}
html.sx-motion-ready .sx-reveal.sx-visible {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0,0,0) scale(1);
}
html.sx-motion-ready .sx-reveal.sx-reveal-left { transform: translate3d(-44px,18px,0); }
html.sx-motion-ready .sx-reveal.sx-reveal-right { transform: translate3d(44px,18px,0); }
html.sx-motion-ready .sx-reveal.sx-visible.sx-reveal-left,
html.sx-motion-ready .sx-reveal.sx-visible.sx-reveal-right { transform: translate3d(0,0,0); }
/* Spotlight and restrained 3D response on project, capability and people cards. */
.sx-card { position: relative; transform-style: preserve-3d; }
.sx-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(260px circle at var(--sx-card-x,50%) var(--sx-card-y,50%), rgba(133,171,239,.15), transparent 72%);
  transition: opacity .25s ease;
}
.sx-card.sx-tilt-active::after { opacity: 1; }
.project-card.sx-tilt-active,
.member-card.sx-tilt-active,
.service-card.sx-tilt-active,
.hero-art.sx-tilt-active {
  transform: perspective(1100px) rotateX(var(--sx-tilt-x,0deg)) rotateY(var(--sx-tilt-y,0deg)) translate3d(0,-5px,0);
  transition: transform .16s ease-out, border-color .25s ease, box-shadow .25s ease;
}
.project-card, .member-card, .service-card, .hero-art {
  transform-style: preserve-3d;
  backface-visibility: hidden;
}
.project-card:hover, .member-card:hover { border-color: rgba(130,165,225,.8) !important; }
.member-avatar, .project-visual, .service-icon { transform: translateZ(16px); }
.profile-link, .project-note, .button { transition: color .25s ease, background .25s ease, border-color .25s ease, transform .25s var(--sx-motion-ease); }
.button:hover { transform: translateY(-3px); }
.service-icon { transition: transform .45s var(--sx-motion-ease), background .35s ease; }
.service-card:hover .service-icon { transform: translateY(-3px) rotate(-7deg) scale(1.06); }
/* Continuous, seamless discipline strip on desktop and mobile. */
.ticker { overflow: hidden; }
.ticker > div {
  display: flex;
  align-items: center;
  width: max-content;
  white-space: nowrap;
  animation: sx-marquee 34s linear infinite;
  will-change: transform;
}
.ticker:hover > div { animation-play-state: paused; }
@keyframes sx-marquee { to { transform: translateX(-50%); } }
/* Compact chapter navigator: only visible on wide screens. */
.sx-chapter-rail {
  position: fixed;
  z-index: 25;
  top: 50%;
  right: 21px;
  display: grid;
  gap: 13px;
  transform: translateY(-50%);
  padding: 12px 9px;
  border: 1px solid rgba(116,145,190,.18);
  border-radius: 30px;
  background: rgba(9,14,23,.74);
  backdrop-filter: blur(14px);
}
.sx-chapter-rail button {
  position: relative;
  width: 8px; height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #60718b;
  cursor: pointer;
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
}
.sx-chapter-rail button::after {
  content: attr(data-label);
  position: absolute;
  top: 50%; right: 18px;
  width: max-content;
  max-width: 145px;
  padding: 5px 9px;
  border: 1px solid #34445a;
  border-radius: 3px;
  background: #111b2a;
  color: #dbe5f2;
  font: 600 9px 'DM Sans',sans-serif;
  letter-spacing: .3px;
  opacity: 0;
  pointer-events: none;
  transform: translate(5px,-50%);
  transition: opacity .2s ease, transform .2s ease;
}
.sx-chapter-rail button:hover::after,
.sx-chapter-rail button:focus-visible::after { opacity: 1; transform: translate(0,-50%); }
.sx-chapter-rail button.is-active {
  background: var(--sx-motion-cyan);
  transform: scale(1.42);
  box-shadow: 0 0 0 4px rgba(115,197,207,.13), 0 0 15px rgba(115,197,207,.45);
}
.sx-back-top {
  position: fixed;
  z-index: 26;
  right: 22px;
  bottom: 22px;
  display: grid;
  width: 42px; height: 42px;
  place-items: center;
  border: 1px solid #425979;
  border-radius: 50%;
  background: rgba(15,25,40,.92);
  color: #e6edf8;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease, background .25s ease, border-color .25s ease;
}
.sx-back-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.sx-back-top:hover { background: #203655; border-color: var(--sx-motion-cyan); }
/* Crisp finishing touches for the final contact panel and footer. */
.contact-panel { position: relative; overflow: hidden; }
.contact-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, #7698dc, #73c5cf, transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s var(--sx-motion-ease);
}
.contact-panel.sx-visible::before { transform: scaleX(1); }
.footer-tools a { transition: color .25s ease; }
.footer-tools a:hover { color: var(--sx-motion-cyan); }
@media (max-width: 1100px) {
  .sx-chapter-rail { display: none; }
}
@media (max-width: 600px) {
  .sx-back-top { right: 14px; bottom: 14px; width: 39px; height: 39px; }
  .project-card.sx-tilt-active, .member-card.sx-tilt-active, .service-card.sx-tilt-active, .hero-art.sx-tilt-active {
    transform: translate3d(0,-2px,0);
  }
  .ticker > div { animation-duration: 27s; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  body.sx-pointer-enabled::before { display: none; }
  .studio-orbit, .studio-node, .studio-core, .idea-orbit, .idea-core, .idea-float, .ticker > div { animation: none !important; }
  html.sx-motion-ready .sx-reveal,
  html.sx-motion-ready .sx-reveal.sx-visible {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    transition: none !important;
  }
  .sx-chapter-rail, .sx-back-top { display: none !important; }
}

/* Hero-specific scroll cue and scroll-linked art offset. */
.hero-art.sx-card {
  transform: translate3d(0,var(--sx-parallax-y,0px),0);
  transition: transform .22s ease-out, border-color .3s ease, box-shadow .3s ease;
}
.hero-art.sx-tilt-active {
  transform: perspective(1100px) rotateX(var(--sx-tilt-x,0deg)) rotateY(var(--sx-tilt-y,0deg)) translate3d(0,calc(var(--sx-parallax-y,0px) - 5px),0);
}
.hero-scroll-hint {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 27px;
  color: #73829a;
  font: 600 8px 'Space Grotesk',sans-serif;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}
.hero-scroll-hint::before {
  content: "";
  width: 25px; height: 1px;
  background: linear-gradient(90deg,#7dc9d0,transparent);
}
.hero-scroll-hint .scroll-cue {
  position: relative;
  display: inline-block;
  width: 15px; height: 23px;
  border: 1px solid #526b8e;
  border-radius: 10px;
}
.hero-scroll-hint .scroll-cue::after {
  content: "";
  position: absolute;
  top: 4px; left: 50%;
  width: 2px; height: 5px;
  border-radius: 2px;
  background: #8db4ee;
  transform: translateX(-50%);
  animation: sx-scroll-cue 1.8s ease-in-out infinite;
}
@keyframes sx-scroll-cue {
  0% { opacity: 0; transform: translate(-50%,0); }
  30% { opacity: 1; }
  80%,100% { opacity: 0; transform: translate(-50%,7px); }
}
@media (max-width: 600px) {
  .hero-scroll-hint { margin-top: 23px; }
  .hero-art.sx-tilt-active { transform: translate3d(0,var(--sx-parallax-y,0px),0); }
}

/* Member profile pages share the same gentle 3D language as the home page. */
.profile-skill-panel, .profile-person-link { position: relative; transform-style: preserve-3d; }
.profile-skill-panel.sx-tilt-active, .profile-person-link.sx-tilt-active {
  transform: perspective(1000px) rotateX(var(--sx-tilt-x,0deg)) rotateY(var(--sx-tilt-y,0deg)) translateY(-3px);
  transition: transform .16s ease-out, border-color .25s ease;
}

/* HIGH-VISIBILITY SCROLL CHOREOGRAPHY — v2 */
html.sx-motion-ready .sx-reveal {
  opacity: 0;
  filter: blur(10px);
  transform: translate3d(0,76px,0) scale(.975);
  transition:
    opacity .85s cubic-bezier(.16,1,.3,1),
    transform 1s cubic-bezier(.16,1,.3,1),
    filter .85s ease;
  transition-delay: var(--sx-reveal-delay,0ms);
}
html.sx-motion-ready .sx-reveal.sx-reveal-left { transform: translate3d(-76px,34px,0) scale(.98); }
html.sx-motion-ready .sx-reveal.sx-reveal-right { transform: translate3d(76px,34px,0) scale(.98); }
html.sx-motion-ready .sx-reveal.sx-visible,
html.sx-motion-ready .sx-reveal.sx-visible.sx-reveal-left,
html.sx-motion-ready .sx-reveal.sx-visible.sx-reveal-right {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0,0,0) scale(1);
}
html.sx-motion-ready .sx-reveal.sx-reveal-zoom { transform: translate3d(0,25px,0) scale(.91); }
html.sx-motion-ready .sx-reveal.sx-visible.sx-reveal-zoom { transform: translate3d(0,0,0) scale(1); }
.hero-copy > * { --sx-reveal-delay: 0ms; }
.hero-copy > :nth-child(2) { --sx-reveal-delay: 100ms; }
.hero-copy > :nth-child(3) { --sx-reveal-delay: 190ms; }
.hero-copy > :nth-child(4) { --sx-reveal-delay: 280ms; }
.hero-copy > :nth-child(5) { --sx-reveal-delay: 370ms; }
.logo-stage { isolation: isolate; }
.logo-aura { animation: sx-aura-breathe 5s ease-in-out infinite alternate; }
.logo-haze { animation: sx-haze-drift 12s ease-in-out infinite alternate; }
.logo-glint { animation: sx-glint-pass 5.5s ease-in-out infinite; }
.logo-glint.glint-two { animation-delay: -1.8s; }
.logo-glint.glint-three { animation-delay: -3.6s; }
@keyframes sx-aura-breathe { from { opacity: .42; transform: scale(.94); } to { opacity: .82; transform: scale(1.08); } }
@keyframes sx-haze-drift { from { transform: translate3d(-2%,1%,0); } to { transform: translate3d(3%,-2%,0); } }
@keyframes sx-glint-pass { 0%,100% { opacity: .12; transform: translate3d(-12px,7px,0) scale(.8); } 50% { opacity: .85; transform: translate3d(12px,-8px,0) scale(1.25); } }
/* A real fixed progress track, not a selector waiting for a missing element. */
.sx-progress-track {
  position: fixed;
  z-index: 100;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(125,153,194,.12);
  pointer-events: none;
}
.sx-progress-fill {
  width: 100%; height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg,#547de0,#75d1d2,#d6e5ff);
  box-shadow: 0 0 14px rgba(117,209,210,.5);
}
.sx-chapter-rail { right: 17px; gap: 17px; padding: 15px 11px; }
.sx-chapter-rail button { width: 9px; height: 9px; }
.sx-chapter-rail button.is-active { transform: scale(1.55); }
@media (max-width: 1100px) { .sx-chapter-rail { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .logo-aura, .logo-haze, .logo-glint { animation: none !important; }
  .sx-progress-track { display: none !important; }
}
