/* NEO cinematic layer: movement lives in the artwork, while content stays stable. */
:root { --cinema-ease: cubic-bezier(.22, 1, .36, 1); }
.cinematic-video { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; opacity: 0; transition: opacity 1.4s ease; }
.cinematic-video.is-playing { opacity: 1; }
.hero-art { animation: none; transition: filter 1.2s ease, opacity 1.2s ease; }
.hero-art::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, #010805dc 0%, #0108058c 35%, #01080516 72%), linear-gradient(0deg, #050c08 0%, transparent 30%); }
.hero-film { object-position: center; }
.hero.has-motion-film canvas { opacity: .16; transition: opacity 1.8s ease; }
.hero.has-motion-film .hero-art { filter: sepia(.42) saturate(1.45) hue-rotate(79deg) brightness(.85); }
.hero-content, .hero-coordinate, .hero-bottom { isolation: isolate; }
.hero h1 em { background-size: 180% 100%; animation: neo-chrome 15s ease-in-out infinite alternate; }
.hero-coordinate .status-dot, .project-heading .status-dot { animation: neo-status 5s ease-in-out infinite; }
.hero-bottom > a > span { display: inline-block; animation: neo-scroll-cue 3.5s ease-in-out infinite; }

/* The interlude is a deliberate cinematic chapter break, never a loading screen. */
.cinema-interlude { position: relative; isolation: isolate; overflow: hidden; min-height: 650px; padding: 150px 6%; display: grid; place-items: center; text-align: center; background: radial-gradient(ellipse at center, #173c29, #020906 76%); border-block: 1px solid #a1ffc52b; }
.cinema-interlude > .cinematic-video { inset: -5%; width: 110%; height: 110%; object-position: center; translate: 0 var(--scene-shift, 0px); }
.cinema-interlude::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, #050c08 0%, #050c0866 28%, #050c0866 65%, #050c08 100%), linear-gradient(90deg, #02090630, #02090600, #02090630); }
.cinema-interlude::after { content: ''; position: absolute; left: 6%; right: 6%; bottom: 40px; z-index: 2; height: 1px; background: linear-gradient(90deg, #b8ffcf00, #b8ffcf55, #b8ffcf00); }
.interlude-copy { position: relative; z-index: 2; max-width: 1050px; }
.interlude-copy > .eyebrow { color: #b1edc6; margin-bottom: 32px; }
.interlude-copy h2 { font-size: clamp(50px, 6.7vw, 108px); line-height: 1.03; letter-spacing: -.055em; text-wrap: balance; }
.interlude-copy h2 em { color: #baf3cc; }
.interlude-copy > p:not(.eyebrow):not(.interlude-footnote) { max-width: 535px; margin: 28px auto 0; font-size: 15px; line-height: 1.9; color: #b4cbbb; }
.interlude-footnote { margin-top: 45px; font: 9px/1.8 var(--mono); letter-spacing: 2px; color: #8eb69c; }

/* Film atmospheres are low-contrast backplates; they never cover portfolio images. */
.expertise, .manifesto, .contact { position: relative; isolation: isolate; overflow: hidden; }
.expertise-atmosphere, .approach-atmosphere, .contact-atmosphere { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; overflow: hidden; }
.expertise-atmosphere .cinematic-video, .approach-atmosphere .cinematic-video, .contact-atmosphere .cinematic-video { width: 110%; height: 110%; inset: -5%; translate: 0 var(--scene-shift, 0px); }
.expertise-atmosphere { opacity: .2; mask-image: linear-gradient(180deg, transparent, #000 35%, #0008 70%, transparent); }
.approach-atmosphere { opacity: .17; mask-image: radial-gradient(ellipse at 50% 20%, #000, transparent 76%); }
.contact-atmosphere { opacity: .16; mask-image: linear-gradient(90deg, transparent 5%, #000 80%); }
.cinematic-video.expertise-atmosphere.is-playing { opacity: .2; }
.cinematic-video.approach-atmosphere.is-playing { opacity: .17; }
.cinematic-video.contact-atmosphere.is-playing { opacity: .16; }
.expertise > .section-heading, .expertise > .services, .contact > .eyebrow, .contact > .contact-grid { position: relative; z-index: 2; }
.manifesto > .eyebrow, .manifesto > h2, .manifesto > .manifesto-copy, .manifesto > .steps { position: relative; z-index: 2; }

/* Moving light follows the pointer; source screenshots retain their own colours. */
.project { position: relative; isolation: isolate; }
.project::before { content: ''; position: absolute; left: 0; top: -1px; width: 40%; height: 1px; background: linear-gradient(90deg, transparent, #ccffdc99, transparent); opacity: 0; pointer-events: none; z-index: 3; }
.project.motion-in-view::before { opacity: .7; animation: neo-edge-trace 11s ease-in-out infinite; }
.project-stage { isolation: isolate; }
.project-stage::after { content: ''; position: absolute; inset: 0; z-index: 1; background: radial-gradient(ellipse at var(--light-x, 50%) var(--light-y, 30%), #f5ffe91c 0%, transparent 62%); pointer-events: none; opacity: .55; transition: opacity .8s ease; }
.project-stage.pointer-active::after { opacity: 1; }
.project-screens, .website-previews { z-index: 2; transform: perspective(1400px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); transition: transform 1s var(--cinema-ease); }
.project-stage.pointer-active .project-screens, .project-stage.pointer-active .website-previews { transition-duration: .25s; }
.stage-label, .stage-zoom { z-index: 4; }
.project .screen-button:focus-visible, .desktop-preview:focus-visible, .mobile-preview:focus-visible { outline: 2px solid #d9ffe5; outline-offset: 7px; }
.motion-ready .project.visible .project-identity { animation: neo-settle 1.2s var(--cinema-ease) both; }
.motion-ready .project.visible .project-actions { animation: neo-settle 1.4s var(--cinema-ease) both; }
.motion-ready .service.visible .service-art { animation: neo-settle 1.4s var(--cinema-ease) both; }
.service { position: relative; isolation: isolate; }
.service::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: -1; background: radial-gradient(ellipse at var(--light-x, 50%) var(--light-y, 20%), #a1ffc50b, transparent 70%); }
.service:hover { box-shadow: 0 18px 50px #0002; }
.motion-ready .steps > .visible .step-number { animation: neo-step-light 1.6s ease-out both; }
.steps > div::before { content: ''; position: absolute; top: -1px; left: 0; height: 1px; width: 22%; background: #bcffd2; transform-origin: left; transform: scaleX(.15); opacity: .35; transition: transform 1.3s var(--cinema-ease), opacity 1.3s ease; }
.steps > div.visible::before { transform: scaleX(1); opacity: .9; }
.person-mark { background-size: 220% 100%; animation: neo-chrome 13s ease-in-out infinite alternate; }
footer { position: relative; isolation: isolate; }
footer::before { content: ''; position: absolute; left: 6%; top: -1px; width: 30%; height: 1px; background: linear-gradient(90deg, transparent, #d5ffdf85, transparent); animation: neo-footer-trace 20s ease-in-out infinite alternate; pointer-events: none; }
.footer-wordmark { background: linear-gradient(105deg, #173b25 30%, #2d573b 50%, #173b25 70%); background-size: 220% 100%; background-clip: text; color: transparent; animation: neo-chrome 19s ease-in-out infinite alternate; }
.button[data-magnetic] { translate: var(--magnet-x, 0px) var(--magnet-y, 0px); transition: translate .5s var(--cinema-ease), background .25s ease, box-shadow .25s ease, transform .25s ease; }
.button[data-magnetic]:focus-visible { translate: 0 0; }

/* Pausing freezes every decorative layer. No content relies on an animation to appear. */
.motion-stopped *, .motion-stopped *::before, .motion-stopped *::after,
.paused *::before, .paused *::after { animation-play-state: paused !important; }
.motion-stopped .project-screens, .motion-stopped .website-previews { transform: none; }
.motion-stopped .button[data-magnetic] { translate: 0 0; }
@keyframes neo-chrome { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@keyframes neo-status { 0%, 100% { box-shadow: 0 0 7px #73ff9e60; } 50% { box-shadow: 0 0 16px #73ff9eaa; } }
@keyframes neo-scroll-cue { 0%, 65%, 100% { transform: translateY(0); } 80% { transform: translateY(4px); } }
@keyframes neo-edge-trace { 0%, 20% { transform: translateX(0); opacity: 0; } 35% { opacity: .6; } 65% { transform: translateX(150%); opacity: 0; } 100% { transform: translateX(150%); opacity: 0; } }
@keyframes neo-settle { from { translate: 0 10px; } to { translate: 0 0; } }
@keyframes neo-step-light { from { color: #bce9ca; } to { color: #6b987c; } }
@keyframes neo-footer-trace { from { transform: translateX(0); opacity: .3; } to { transform: translateX(190%); opacity: .7; } }
@media (max-width: 850px) { .cinema-interlude { min-height: 560px; padding-block: 120px; } .interlude-copy h2 { font-size: clamp(48px, 7.6vw, 76px); } }
@media (max-width: 600px) {
  .hero-art::after { background: linear-gradient(90deg, #01080587, #01080515), linear-gradient(0deg, #050c08 0%, #050c0838 65%, #050c0820); }
  .hero-film { object-position: 62% center; }
  .hero.has-motion-film .hero-art { opacity: .8; }
  .cinema-interlude { min-height: 520px; padding: 105px 7%; }
  .interlude-copy > .eyebrow { font-size: 8px; letter-spacing: 1.6px; margin-bottom: 27px; }
  .interlude-copy h2 { font-size: clamp(42px, 11.4vw, 62px); letter-spacing: -.055em; }
  .interlude-copy > p:not(.eyebrow):not(.interlude-footnote) { font-size: 13px; line-height: 1.9; margin-top: 25px; }
  .interlude-footnote { font-size: 8px; letter-spacing: 1.4px; margin-top: 32px; }
  .cinema-interlude::after { bottom: 30px; }
  .expertise-atmosphere, .approach-atmosphere { opacity: .12; }
  .contact-atmosphere { opacity: .1; }
  .cinematic-video.expertise-atmosphere.is-playing, .cinematic-video.approach-atmosphere.is-playing { opacity: .12; }
  .cinematic-video.contact-atmosphere.is-playing { opacity: .1; }
}
@media (hover: none), (pointer: coarse) {
  .project-screens, .website-previews { transform: none; }
  .button[data-magnetic] { translate: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cinematic-video { display: none; }
  .project-screens, .website-previews { transform: none !important; }
  .button[data-magnetic] { translate: 0 0 !important; }
  .hero h1 em, .person-mark, .footer-wordmark, .hero-bottom > a > span,
  footer::before, .project::before { animation: none !important; }
  .cinema-interlude > .cinematic-video { translate: 0 0; }
}

/* Offscreen CSS motion sleeps as well as the media elements. */
.motion-ready .hero:not(.motion-in-view) h1 em,
.motion-ready .hero:not(.motion-in-view) .hero-coordinate .status-dot,
.motion-ready .hero:not(.motion-in-view) .hero-bottom > a > span,
.motion-ready .ticker:not(.motion-in-view) > div,
.motion-ready .project:not(.motion-in-view) .project-heading .status-dot,
.motion-ready .expertise:not(.motion-in-view) .flow-art > i,
.motion-ready .contact:not(.motion-in-view) .person-mark,
.motion-ready footer:not(.motion-in-view) .footer-wordmark,
.motion-ready footer:not(.motion-in-view)::before { animation-play-state: paused; }

/* Posters remain a complete visual composition before play, in data-saving mode,
   or when the device requests reduced motion. Videos fade over these backplates. */
.cinema-interlude { background: radial-gradient(ellipse at center, #173c2920, #02090680 76%), url('assets/neo-signal-poster.jpg') center / cover no-repeat #020906; }
.expertise-atmosphere, .approach-atmosphere { background: url('assets/neo-orbit-poster.jpg') center / cover no-repeat; }
.contact-atmosphere { background: url('assets/neo-signal-poster.jpg') center / cover no-repeat; }
.cinema-interlude > .interlude-footnote { position: absolute; z-index: 2; left: 6%; right: 6%; bottom: 60px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0; text-align: left; }
@media (max-width: 600px) { .cinema-interlude > .interlude-footnote { left: 7%; right: 7%; bottom: 48px; flex-direction: column; gap: 7px; align-items: center; text-align: center; font-size: 7px; letter-spacing: 1.2px; } }

/* One persistent control governs every cinematic/decorative layer. */
.motion-control{position:fixed;right:4.5%;bottom:20px;z-index:35}.motion-control #motion{min-height:44px;padding:11px 15px;border:1px solid #c1ffcf55;background:#07120de8;color:#d6f0df;backdrop-filter:blur(16px);box-shadow:0 8px 30px #0005;font-size:10px;letter-spacing:.3px}.motion-control #motion:disabled{opacity:.85;cursor:default}.hero-bottom{padding-right:180px}
@media(max-width:600px){.motion-control{right:5%;bottom:14px}.motion-control #motion{padding:10px 12px;font-size:9px}.hero-bottom{padding-right:0}}
footer{padding-bottom:85px}
/* Keep the Lone Star and Texas landmark ensemble in the narrow hero crop. */
@media(max-width:600px){.hero-film{object-position:70% center}.hero-art{background-position:70% center}}
