/* Motion and interactive states for the Blade site (vanilla JS in /js/site.js).
   Everything is visible without JavaScript; html.js turns the entrance animations on. */
:root { --ease-film: cubic-bezier(0.22, 1, 0.36, 1); }

/* Content that settles into place (fade up, lose blur) */
html.js [data-in] { opacity: 0; transform: translateY(18px); filter: blur(6px); }
html.js [data-in].is-in {
  opacity: 1; transform: none; filter: blur(0);
  transition: opacity 1.1s var(--ease-film), transform 1.1s var(--ease-film), filter 1.1s var(--ease-film);
  transition-delay: var(--d, 0s);
}
/* Headings whose words sharpen in reading order */
html.js [data-lines] .w { display: inline-block; opacity: 0; filter: blur(10px); transform: translateY(0.25em); }
html.js [data-lines].is-in .w {
  opacity: 1; filter: blur(0); transform: none;
  transition: opacity 1.1s var(--ease-film), transform 1.1s var(--ease-film), filter 1.1s var(--ease-film);
  transition-delay: calc(var(--i, 0) * 0.05s + var(--d, 0s));
}
/* Page-top photographs rising in */
html.js [data-rise] { opacity: 0; transform: translateY(40px); }
html.js [data-rise].is-in { opacity: 1; transform: none; transition: opacity 1.2s var(--ease-film), transform 1.2s var(--ease-film); transition-delay: var(--d, 0s); }

/* Hero film */
.hero-slide { opacity: 0; transition: opacity 1.6s var(--ease-film); }
.hero-slide.is-on { opacity: 1; }
.hero-slide .hero-zoom { transform: scale(1); }
html.js .hero-slide.is-on .hero-zoom { animation: hero-zoom 8.6s linear both; }
@keyframes hero-zoom { from { transform: scale(1.14); } to { transform: scale(1); } }

/* Progress hairlines (hero scenes, dock stages) */
.bar-fill { transform-origin: left; transform: scaleX(0); }
.bar-fill.is-full { transform: scaleX(1); }
.bar-fill.is-run { animation: bar-run var(--dur, 7s) linear both; }
@keyframes bar-run { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Cross-fading frames (dock stories, document viewer) */
.fade-frame { opacity: 0; transition: opacity 0.9s var(--ease-film), transform 0.9s var(--ease-film); transform: scale(1.04); }
.fade-frame.is-on { opacity: 1; transform: none; }
.doc-frame { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease-film), transform 0.6s var(--ease-film); }
.doc-frame.is-on { opacity: 1; transform: none; }
.swap-text { animation: swap-in 0.7s var(--ease-film) both; }
@keyframes swap-in { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }

/* Mobile drawer */
#drawer, #drawer-backdrop { display: none; }
html.nav-open #drawer-backdrop { display: block; animation: fade-in 0.3s both; }
html.nav-open #drawer { display: block; animation: drawer-in 0.6s var(--ease-film) both; }
@keyframes drawer-in { from { transform: translateY(-100%); } to { transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.sub-list { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 0.35s var(--ease-film), opacity 0.35s; }
.sub-list > ul { min-height: 0; overflow: hidden; }
.sub-list.is-open { grid-template-rows: 1fr; opacity: 1; }

/* Accessibility panel */
.a11y-pop { animation: pop-in 0.2s both; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.a11y-knob { transition: transform 0.25s var(--ease-film); }
[aria-checked="true"] > .a11y-knob { transform: translateX(20px); }

/* Partner wall: a frame turns over to the next logo */
.flip-frame { transition: transform 0.8s var(--ease-film), opacity 0.8s var(--ease-film); }
.flip-frame.is-out { transform: rotateX(90deg); opacity: 0; }
.flip-frame.is-in-start { transform: rotateX(-90deg); opacity: 0; transition: none; }

/* Gallery viewer */
.viewer { animation: fade-in 0.4s both; }

/* Contact conversation */
.convo-progress { transition: transform 0.6s var(--ease-film); transform-origin: left; }

html[data-still] [data-in], html[data-still] [data-lines] .w, html[data-still] [data-rise] { opacity: 1 !important; transform: none !important; filter: none !important; }
html[data-still] .hero-slide .hero-zoom { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  html.js [data-in], html.js [data-lines] .w, html.js [data-rise] { opacity: 1; transform: none; filter: none; }
  .hero-slide .hero-zoom { animation: none !important; }
}

/* Header: always white, logo on the left with no card around it. The navy contact line folds away once the page moves
   and the bar tightens; the logo shrinks with it. */
.site-header { box-shadow: 0 1px 0 var(--line); transition: box-shadow .4s; }
.site-header.is-scrolled { box-shadow: 0 12px 30px -24px rgb(11 26 42 / 0.45); }
.site-topbar { height: 0; overflow: hidden; }
.site-topbar-link { color: #fff; transition: color .2s; }
.site-topbar-link:hover { color: rgb(255 255 255 / 0.7); }
.site-mainbar { height: 68px; transition: height .45s var(--ease-film); }
.site-logo { display: block; }
.site-logo img { display: block; width: 54px; height: auto; transition: width .45s var(--ease-film); }
@media (min-width: 1024px) {
  .site-topbar { height: 38px; transition: height .45s var(--ease-film); }
  .site-mainbar { height: 96px; }
  .site-logo img { width: 84px; }
  .site-header.is-scrolled .site-topbar { height: 0; }
  .site-header.is-scrolled .site-mainbar { height: 76px; }
  .site-header.is-scrolled .site-logo img { width: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .site-topbar, .site-mainbar, .site-logo img { transition: none; }
}
@media (min-width: 1024px) { .site-footer-cols { border-top: 0; padding-top: 8px; } }
.site-footer-logo img { display: block; width: 180px; height: auto; }
@media (min-width: 1024px) { .site-footer-logo img { width: 230px; } }
