/* AImperator: cinematic backgrounds and the full-screen navigation scene. */
:root { scrollbar-gutter: stable; }
.masthead { position: sticky; top: 0; z-index: 30; }
.scroll-motion .manifesto-pin { top: 94px; height: calc(100svh - 94px); min-height: 440px; }
.menu-toggle { min-height: 48px; min-width: 80px; }
.menu-lines { position: relative; height: 12px; border: 0; }
.menu-lines::before,.menu-lines::after { content: ''; position: absolute; left: 0; width: 100%; height: 1px; background: currentColor; transition: transform .4s var(--ease); }
.menu-lines::before { top: 2px; }
.menu-lines::after { bottom: 2px; }
.menu-toggle[aria-expanded=true] .menu-lines { transform: none; }
.menu-toggle[aria-expanded=true] .menu-lines::before { transform: translateY(3.5px) rotate(45deg); }
.menu-toggle[aria-expanded=true] .menu-lines::after { transform: translateY(-3.5px) rotate(-45deg); }
.navigation-scene { padding: 28px var(--gutter); background: var(--marble); color: var(--carbon); }
.navigation-top,.navigation-atmosphere,.navigation-bottom { display: none; }
.navigation-links { display: flex; gap: 14px 26px; flex-wrap: wrap; font-size: 14px; }
.navigation-arrow { display: none; }
.scenes-ready .navigation-scene {
  --scene-bg: #bbc3bf; --scene-ink: #161d1a;
  position: fixed; inset: 0; z-index: 80; height: 100dvh; padding: 0 var(--gutter);
  display: flex; flex-direction: column; isolation: isolate; overflow: auto; overscroll-behavior: contain;
  color: var(--scene-ink); background: var(--scene-bg); visibility: hidden; pointer-events: none;
  clip-path: inset(0 0 100% 64% round 0 0 0 90px);
  transition: clip-path .72s cubic-bezier(.76,0,.24,1), background-color .5s, color .4s;
}
.scenes-ready .navigation-scene.is-visible { visibility: visible; }
.scenes-ready .navigation-scene.is-open { clip-path: inset(0 0 0 0 round 0); pointer-events: auto; }
.navigation-scene[data-scene=experience] { --scene-bg: #d5c9b4; --scene-ink: #25231e; }
.navigation-scene[data-scene=manifesto] { --scene-bg: #282e2b; --scene-ink: #eee9df; }
.navigation-scene[data-scene=services] { --scene-bg: #99aaa6; --scene-ink: #132623; }
.navigation-scene[data-scene=creative] { --scene-bg: #111512; --scene-ink: #f3eee5; }
.navigation-scene[data-scene=contact] { --scene-bg: #e9e7df; --scene-ink: #232821; }
.scenes-ready .navigation-top { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; height: 100px; gap: 20px; }
.navigation-top .brand-formula { font-size: 12px; letter-spacing: .09em; }
.menu-close { display: flex; gap: 25px; align-items: center; padding: 10px 0 10px 15px; min-height: 48px; font-size: 12px; }
.close-symbol { width: 30px; height: 30px; position: relative; display: block; transition: transform .5s var(--ease); }
.close-symbol::before,.close-symbol::after { content: ''; position: absolute; top: 14px; left: 0; width: 30px; height: 1px; background: currentColor; transform: rotate(45deg); }
.close-symbol::after { transform: rotate(-45deg); }
.menu-close:hover .close-symbol { transform: rotate(90deg); }
.scenes-ready .navigation-links { flex: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; padding: 18px 0 30px; }
.scenes-ready .navigation-links a { display: flex; align-items: baseline; gap: 45px; max-width: 100%; font-family: var(--serif); font-size: clamp(45px,6.3vw,98px); line-height: 1.12; letter-spacing: -.035em; padding: 3px 8px 7px 0; opacity: 0; transform: translate3d(0,48px,0); transition: transform .65s var(--ease), opacity .25s; }
.navigation-links a:nth-child(2) { --link-order: 1; }
.navigation-links a:nth-child(3) { --link-order: 2; }
.navigation-links a:nth-child(4) { --link-order: 3; }
.navigation-links a:nth-child(5) { --link-order: 4; }
.navigation-links a:nth-child(6) { --link-order: 5; }
.scenes-ready .is-open .navigation-links a { opacity: 1; transform: translate3d(0,0,0); transition-delay: calc(.23s + var(--link-order,0) * .042s); }
.scenes-ready .navigation-links a:hover,.scenes-ready .navigation-links a:focus-visible { transform: translate3d(14px,0,0); transition-delay: 0s; }
.scenes-ready .navigation-arrow { display: inline-block; font-family: var(--sans); font-size: .52em; transform: translate(-20px,5px); opacity: 0; transition: transform .4s var(--ease), opacity .3s; }
.navigation-links a:hover .navigation-arrow,.navigation-links a:focus-visible .navigation-arrow { opacity: 1; transform: translate(0,0); }
.scenes-ready .navigation-bottom { display: flex; align-items: center; justify-content: space-between; gap: 24px; font-size: 11px; border-top: 1px solid currentColor; padding: 24px 0; margin-top: auto; opacity: .85; flex-shrink: 0; }
.navigation-bottom a { min-height: 44px; display: flex; align-items: center; gap: 24px; }
.scenes-ready .navigation-atmosphere { display: block; position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.navigation-orbit { position: absolute; width: 60vw; height: 60vw; right: -18vw; top: 50%; border: 1px solid currentColor; border-radius: 50%; opacity: .2; transform: translateY(-50%) rotate(-28deg) scaleX(.75); transition: transform 1s var(--ease); }
.navigation-orbit::after { content: ''; position: absolute; inset: 11%; border: 1px solid currentColor; border-radius: inherit; }
.navigation-monogram { position: absolute; right: 3vw; top: 50%; font-family: var(--serif); font-size: 35vw; letter-spacing: -.08em; line-height: .8; opacity: .09; transform: translateY(-50%); transition: opacity .5s, transform 1s var(--ease); }
.navigation-years { position: absolute; right: 1vw; top: 50%; font-size: 37vw; line-height: .8; letter-spacing: -.08em; font-weight: 600; opacity: 0; transform: translateY(-42%); transition: opacity .5s, transform .8s var(--ease); }
[data-scene=experience] .navigation-years { opacity: .12; transform: translateY(-50%); }
[data-scene=experience] .navigation-monogram { opacity: 0; }
[data-scene=experience] .navigation-orbit { transform: translateY(-50%) rotate(30deg) scaleX(.45); }
[data-scene=services] .navigation-orbit { transform: translateY(-50%) rotate(-65deg) scaleX(.45); }
[data-scene=contact] .navigation-monogram { transform: translateY(-50%) scale(.85); }
.navigation-film { position: absolute; inset: 0 0 0 30%; width: 70%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity .5s, transform 1.1s var(--ease); mask-image: linear-gradient(90deg,transparent,#000 75%); }
[data-scene=creative] .navigation-film { opacity: .35; transform: scale(1); }
.navigation-scene a:focus-visible,.navigation-scene button:focus-visible { outline-color: currentColor; outline-offset: 3px; }
.menu-open { overflow: hidden; }
.menu-open body { overflow: hidden; }

.cinema-background { position: absolute; inset: 0; z-index: -2; overflow: hidden; background: #17201d; pointer-events: none; }
.cinema-background img,.cinema-background video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cinema-background video { opacity: 0; transition: opacity .65s; }
.cinema-background video.is-playing { opacity: 1; }
.hero-cinema { min-height: max(700px,calc(100svh - 94px)); }
.hero-film::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg,rgba(8,15,13,.86) 0%,rgba(8,15,13,.64) 46%,rgba(8,15,13,.2) 100%),linear-gradient(0deg,rgba(8,15,13,.75),transparent 50%); }
.hero-cinema .hero-copy { margin-top: 65px; margin-bottom: 75px; max-width: 1000px; }
.hero-cinema h1 { font-size: clamp(68px,9.2vw,146px); }
.hero-cinema .hero-description { color: #e1e1d9; max-width: 350px; }
.hero-cinema .hero-topline,.hero-cinema .hero-bottom { color: #e1e1d9; }
.hero-cinema .intro-formula { color: #eddfc3; }
.hero-cinema .hero-bottom { border-color: #e9e7df50; }
.hero-film-credit { display: inline-flex; align-items: center; gap: 16px; font-size: 10px; }
.hero-film-credit:hover { color: white; }
.creative-cinema { min-height: min(860px,100svh); position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; padding: 32px var(--gutter); overflow: hidden; color: #f5f1e8; }
.creative-film::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg,rgba(7,13,11,.8),rgba(7,13,11,.22) 80%),linear-gradient(90deg,rgba(7,13,11,.35),transparent); }
.creative-top,.creative-bottom { display: flex; align-items: center; justify-content: space-between; gap: 25px; font-size: 11px; }
.creative-top { padding-bottom: 22px; border-bottom: 1px solid #f5f1e850; }
.creative-copy { padding: 110px 0; }
.creative-copy h2 { font-family: var(--sans); font-size: clamp(60px,7.8vw,124px); letter-spacing: -.045em; }
.creative-copy h2 em { font-size: 1.23em; }
.creative-copy p { font-size: 14px; line-height: 1.7; margin-top: 32px; }
.creative-bottom { border-top: 1px solid #f5f1e850; padding-top: 20px; }
.reel-toggle { display: flex; align-items: center; gap: 18px; min-height: 44px; padding: 8px 0 8px 10px; font-size: 11px; }
.reel-toggle-icon { display: block; width: 9px; height: 12px; border-left: 2px solid; border-right: 2px solid; }
.reel-toggle[aria-pressed=true] .reel-toggle-icon { border: 0; border-left: 9px solid; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.reel-sources { display: flex; justify-content: space-between; align-items: center; gap: 16px 32px; padding: 22px var(--gutter); background: var(--carbon); color: var(--marble); font-size: 11px; }
.reel-sources>span { color: var(--muted); }
.reel-sources a { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 44px; }
.reel-sources a:hover { color: var(--gold); }
.motion-paused .ambient-video { transition: none; }
.motion-paused .navigation-scene,.motion-paused .navigation-links a,.motion-paused .navigation-arrow { transition: none; }

@media (min-width: 701px) and (max-height: 780px) {
  .scenes-ready .navigation-top { height: 80px; }
  .scenes-ready .navigation-links a { font-size: clamp(42px,7.3vh,72px); }
  .scenes-ready .navigation-bottom { padding: 8px 0; }
}
@media (max-width: 1000px) {
  .reel-sources { flex-wrap: wrap; justify-content: flex-start; }
  .reel-sources>span { flex-basis: 100%; }
}
@media (max-width: 700px) {
  .scroll-motion .manifesto-pin { top: 76px; height: calc(100svh - 76px); min-height: 430px; }
  .scenes-ready .navigation-top { height: 80px; }
  .navigation-top .brand-formula { font-size: 10px; letter-spacing: .02em; }
  .menu-close { gap: 14px; font-size: 11px; }
  .close-symbol { width: 26px; }
  .close-symbol::before,.close-symbol::after { width: 26px; }
  .scenes-ready .navigation-links { padding: 20px 0 40px; }
  .scenes-ready .navigation-links a { font-size: clamp(38px,10.7vw,68px); line-height: 1.22; padding: 7px 0; gap: 16px; letter-spacing: -.04em; }
  .scenes-ready .navigation-links a:hover,.scenes-ready .navigation-links a:focus-visible { transform: translateX(5px); }
  .scenes-ready .navigation-bottom { flex-wrap: wrap; gap: 5px; padding: 14px 0 max(18px,env(safe-area-inset-bottom)); font-size: 10px; }
  .navigation-bottom>span { flex-basis: 100%; }
  .navigation-orbit { width: 125vw; height: 125vw; right: -65vw; }
  .navigation-monogram,.navigation-years { font-size: 80vw; right: -20vw; top: 48%; opacity: .06; }
  .navigation-years { opacity: 0; }
  .navigation-film { inset: 0; width: 100%; mask-image: linear-gradient(90deg,transparent,#000); }
  .hero-cinema { min-height: max(700px,calc(100svh - 76px)); padding-top: 23px; }
  .hero-cinema .hero-copy { margin: 64px 0 70px; }
  .hero-cinema h1 { font-size: clamp(52px,13.6vw,86px); }
  .hero-cinema .machine-line { font-size: .5em; margin-top: 23px; }
  .hero-cinema .hero-description { font-size: 13px; max-width: 280px; }
  .hero-cinema .hero-cta { margin-top: 32px; }
  .hero-film::after { background: linear-gradient(90deg,rgba(8,15,13,.82),rgba(8,15,13,.35)),linear-gradient(0deg,rgba(8,15,13,.85),transparent 80%); }
  .hero-cinema .hero-bottom { flex-wrap: wrap; gap: 14px; padding: 20px 0; }
  .hero-cinema .hero-bottom>a { min-height: 30px; }
  .hero-film-credit { font-size: 9px; }
  .hero-film img,.hero-film video { object-position: 57% center; }
  .creative-cinema { min-height: 710px; padding-top: 24px; padding-bottom: 24px; }
  .creative-top { font-size: 9px; gap: 12px; }
  .creative-copy { padding: 130px 0 110px; }
  .creative-copy h2 { font-size: clamp(43px,11.2vw,68px); }
  .creative-copy p { font-size: 12px; }
  .creative-bottom { flex-wrap: wrap; gap: 8px; font-size: 10px; }
  .reel-toggle { padding-left: 0; }
  .reel-sources { gap: 5px; padding-top: 25px; padding-bottom: 25px; }
  .reel-sources a { flex-basis: 100%; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .reel-sources>span { margin-bottom: 10px; }
}
@media (max-height: 530px) and (orientation: landscape) {
  .scenes-ready .navigation-top { height: 68px; }
  .scenes-ready .navigation-links { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 28px; padding: 15px 0; }
  .scenes-ready .navigation-links a { font-size: 34px; }
  .scenes-ready .navigation-bottom { padding: 8px 0; }
}
