/* ==========================================================================
   The homepage trailer: one screen, the story plays on a timeline.
   Everything is scoped to .theater so nothing leaks into shared components.
   ========================================================================== */
html.has-trailer { scrollbar-width: none; }
html.has-trailer::-webkit-scrollbar, html.has-trailer body::-webkit-scrollbar { display: none; width: 0; height: 0; }

.theater {
  --hot: var(--accent, #7cc4ff);
  --hot-ink: var(--accent-fg, #04101f);
  --muted: var(--text-tertiary, #8d9895);
  --mono: var(--font-mono, ui-monospace, Menlo, monospace);
  position: relative; height: 100vh; overflow: hidden; background: var(--bg);
}
@supports (height: 100svh) { .theater { height: 100svh; } }
.theater .wrap { width: min(1240px, 100% - 40px); margin-inline: auto; }

.tscene { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  opacity: 0; visibility: hidden; transition: opacity 1s ease, visibility 0s linear 1s; }
.tscene.is-active { opacity: 1; visibility: visible; transition: opacity 1s ease, visibility 0s; }

/* backdrops */
.tscene--sky { background:
    radial-gradient(70% 60% at 50% 50%, rgba(7,9,10,.55), rgba(7,9,10,.72) 100%),
    linear-gradient(180deg, rgba(7,9,10,.5) 0%, rgba(7,9,10,.2) 40%, rgba(7,9,10,.6) 85%, var(--bg) 100%),
    url("https://assets.northwestfalls.com/assets/media/home/sky-north.jpg") 55% 40% / cover no-repeat, var(--bg); }
.tscene--end { background:
    linear-gradient(180deg, rgba(7,9,10,.72) 0%, rgba(7,9,10,.55) 40%, rgba(7,9,10,.78) 100%),
    url("https://assets.northwestfalls.com/assets/media/home/path.jpg") 50% 60% / cover no-repeat, var(--bg); }

/* every line arrives the same way */
.tscene [data-at] { opacity: 0; transform: translateY(22px); filter: blur(8px);
  transition: opacity .9s ease, transform 1.1s cubic-bezier(.2,.8,.2,1), filter .9s ease; }
.tscene [data-at].is-on { opacity: 1; transform: none; filter: none; }
.tscene [data-at].is-on.is-dim { opacity: .26; }

.t-h1 { margin: 0; font-size: clamp(40px, 5.4vw, 74px); line-height: 1.04; letter-spacing: -.03em; font-weight: 800; text-wrap: balance; }
.t-line { margin: 0; font-size: clamp(28px, 3.8vw, 50px); line-height: 1.25; letter-spacing: -.02em; font-weight: 800; color: rgba(244,246,245,.9); text-wrap: balance; }
.t-line + .t-line { margin-top: 10px; }
.t-q { margin: 0; font-size: clamp(20px, 2.2vw, 28px); font-weight: 600; color: var(--hot); text-wrap: balance; }
.t-line + .t-q { margin-top: 64px; }
.t-big { font-size: clamp(44px, 6vw, 84px); letter-spacing: -.03em; }
.t-big + .t-q { margin-top: 18px; }

/* the number */
.t-num { margin: 0; font-size: clamp(64px, 12vw, 160px); line-height: 1; letter-spacing: -.02em; font-weight: 800; font-variant-numeric: tabular-nums; }
.t-num small { display: block; margin-top: 10px; font-size: clamp(16px, 1.6vw, 20px); letter-spacing: .02em; font-weight: 500; color: var(--muted); }
.t-num + .t-line { margin-top: 70px; }
.t-num + .t-line + .t-q { margin-top: 14px; }
.lift { transform: translateY(var(--lift, 0px)); transition: transform 1.5s cubic-bezier(.65,0,.35,1); }
.lift.is-up { transform: none; }

/* the first-demo callback */
.t-callback { display: inline-flex; align-items: center; gap: 12px; margin-top: 48px; padding: 12px 18px 12px 12px; border-radius: 16px;
  background: #14181b; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 20px 40px -24px rgba(0,0,0,.9); font-size: 15.5px; font-weight: 700; }
.t-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: rgba(124,196,255,.14); color: var(--hot); font-size: 13px; }
.t-kept { display: inline-flex; align-items: center; gap: 6px; margin-left: 18px; color: var(--hot); font-size: 12.5px; }

/* the ending */
.t-end-h { margin: 0; font-size: clamp(36px, 5vw, 66px); line-height: 1.05; letter-spacing: -.02em; font-weight: 800; }
.t-end-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 26px; text-decoration: none; color: var(--hot); font-size: clamp(20px, 2.2vw, 28px); font-weight: 700; }
.t-end-link i { font-size: .8em; transition: transform .25s; }
.t-end-link:hover i { transform: translateX(4px); }
.t-end-fine { margin: 22px 0 0; font-size: 14.5px; color: rgba(244,246,245,.6); }
.t-end-fine a { color: var(--hot); text-decoration: none; margin-left: 6px; }
.t-end-fine a:hover { text-decoration: underline; }

/* chaos, then calm */
.chaos { position: absolute; inset: 14vh 4vw; pointer-events: none; }
.chaos__chip { position: absolute; left: 50%; top: 50%; display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px 11px 14px; border-radius: 999px; background: #14181b; color: rgba(244,246,245,.85);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07), 0 18px 36px -20px rgba(0,0,0,.9);
  font-size: clamp(13px, 1.25vw, 16px); font-weight: 700; white-space: nowrap;
  transform: translate(-50%, -50%) rotate(0deg) scale(.2); opacity: 0;
  transition: left 1.1s cubic-bezier(.16,1,.3,1), top 1.1s cubic-bezier(.16,1,.3,1), transform 1.1s cubic-bezier(.16,1,.3,1), opacity .5s ease, filter .8s ease;
  transition-delay: calc(var(--i) * 35ms); }
.chaos__chip i { color: var(--muted); font-size: 1em; }
.chaos.is-burst .chaos__chip { left: var(--x); top: var(--y); opacity: 1; transform: translate(-50%, -50%) rotate(var(--r)) scale(1);
  animation: nw-restless var(--d) ease-in-out .9s infinite alternate; }
.chaos.is-burst.is-gone .chaos__chip { opacity: 0; filter: blur(10px); transform: translate(-50%, -50%) rotate(calc(var(--r) * 2.2)) scale(.75);
  animation-play-state: paused; transition-delay: calc((10 - var(--i)) * 35ms); }
@keyframes nw-restless { 0% { translate: 0 0; } 20% { translate: 10px -8px; } 45% { translate: -9px 6px; } 70% { translate: 7px 10px; } 100% { translate: -6px -9px; } }
.chaos__flash { position: absolute; left: 50%; top: 50%; display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 24px 14px 18px; border-radius: 999px; background: #181d21; color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 0 60px -10px rgba(124,196,255,.25);
  font-size: clamp(18px, 2vw, 24px); font-weight: 800; white-space: nowrap;
  transform: translate(-50%, -50%) scale(.6); opacity: 0; transition: opacity .35s ease, transform .5s cubic-bezier(.2,.8,.2,1); }
.chaos.is-in .chaos__flash { opacity: 1; transform: translate(-50%, -50%) scale(1); animation: nw-think .18s linear infinite; }
.chaos.is-burst .chaos__flash { opacity: 0; transform: translate(-50%, -50%) scale(2.2); filter: blur(12px); animation: none; transition: opacity .45s ease, transform .6s ease, filter .6s ease; }
@keyframes nw-think { 0% { translate: 0 0; rotate: 0deg; } 25% { translate: -2px 1px; rotate: -.8deg; } 50% { translate: 2px -1px; rotate: .6deg; } 75% { translate: -1px -2px; rotate: -.4deg; } 100% { translate: 0 0; rotate: 0deg; } }
[data-brand="dropbox"] i { color: #0061ff !important; }
[data-brand="google"] i { background: conic-gradient(from -45deg, #ea4335 0 25%, #4285f4 0 50%, #34a853 0 75%, #fbbc05 0); -webkit-background-clip: text; background-clip: text; color: transparent !important; }
[data-brand="icloud"] i { color: #3693f3 !important; }
[data-brand="whatsapp"] i { color: #25d366 !important; }
[data-brand="soundcloud"] i { color: #ff5500 !important; }
[data-brand="deleted"] i { color: #ff6b6b !important; }

/* controls */
.tctrl { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.tctrl__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.08); }
.tctrl__bar b { display: block; height: 100%; width: 0; background: var(--hot); box-shadow: 0 0 10px rgba(124,196,255,.6); }
.tctrl__btn { height: 36px; min-width: 36px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px;
  background: rgba(20,24,27,.72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
  color: rgba(244,246,245,.85); font: 700 13px var(--font-sans); cursor: pointer; transition: color .2s, box-shadow .2s; }
.tctrl__btn:hover { color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.tctrl__btn:focus-visible { outline: 2px solid var(--hot); outline-offset: 3px; }
.tctrl__btn i { font-size: 11px; }
.tctrl__btn[hidden] { display: none; }
.theater.is-paused .tscene * { animation-play-state: paused !important; }

.nw-sr-story { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (max-width: 600px) {
  .t-line + .t-q { margin-top: 44px; }
  .t-num + .t-line { margin-top: 48px; }
  .chaos { inset: 14vh 16px; }
  .chaos.is-burst .chaos__chip:nth-child(2) { left: 30%; top: 4%; }
  .chaos.is-burst .chaos__chip:nth-child(3) { left: 68%; top: 12%; }
  .chaos.is-burst .chaos__chip:nth-child(4) { left: 30%; top: 21%; }
  .chaos.is-burst .chaos__chip:nth-child(5) { left: 70%; top: 30%; }
  .chaos.is-burst .chaos__chip:nth-child(6) { left: 42%; top: 39%; }
  .chaos.is-burst .chaos__chip:nth-child(7) { left: 62%; top: 48%; }
  .chaos.is-burst .chaos__chip:nth-child(8) { left: 30%; top: 57%; }
  .chaos.is-burst .chaos__chip:nth-child(9) { left: 64%; top: 66%; }
  .chaos.is-burst .chaos__chip:nth-child(10) { left: 30%; top: 75%; }
  .chaos.is-burst .chaos__chip:nth-child(11) { left: 58%; top: 84%; }
  .chaos.is-burst .chaos__chip:nth-child(12) { left: 34%; top: 94%; }
  .chaos__chip { padding: 9px 14px 9px 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .chaos__chip, .chaos__flash { animation: none !important; }
  .lift { transform: none; transition: none; }
}

/* No glows */
.chaos__flash { box-shadow: inset 0 0 0 1px rgba(255,255,255,.1) !important; }
.tctrl__bar b { box-shadow: none !important; }

/* They all come together (2026-11-24): pulled to the centre, faster as they
   go, they meet, a thin ring ripples out and the mark settles, then fades. */
.chaos.is-burst.is-pull .chaos__chip {
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) rotate(calc(var(--r) * -2.5)) scale(.82);
  animation-play-state: paused;
  transition: left .8s cubic-bezier(.6, 0, .9, .45), top .8s cubic-bezier(.6, 0, .9, .45), transform .8s cubic-bezier(.6, 0, .9, .45), opacity .3s ease;
  transition-delay: calc(var(--i) * 22ms);
}
.chaos.is-burst.is-pull.is-clash .chaos__chip {
  opacity: 0; transform: translate(-50%, -50%) scale(.25);
  transition: opacity .18s ease, transform .22s ease-in; transition-delay: 0s;
}
.chaos__ring { position: absolute; left: 50%; top: 50%; width: 110px; height: 110px; margin: -55px 0 0 -55px;
  border-radius: 50%; border: 1.5px solid rgba(244, 246, 245, .6); opacity: 0; transform: scale(.2); pointer-events: none; }
.chaos.is-clash .chaos__ring { animation: nw-ring 1.2s cubic-bezier(.15, .75, .25, 1) forwards; }
.chaos.is-clash .chaos__ring--2 { animation-delay: .14s; border-color: rgba(124, 196, 255, .45); }
@keyframes nw-ring { 0% { opacity: .85; transform: scale(.2); } 100% { opacity: 0; transform: scale(7.5); } }
.chaos__core { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; opacity: 0; transform: scale(.3); }
.chaos__core img { display: block; width: 100%; height: 100%; object-fit: contain; transition: opacity .55s ease, transform .55s ease; }
.chaos.is-clash .chaos__core { animation: nw-core .8s cubic-bezier(.2, 1.5, .4, 1) forwards; }
@keyframes nw-core { 0% { opacity: 0; transform: scale(.3); } 35% { opacity: 1; transform: scale(1.18); } 100% { opacity: 1; transform: scale(1); } }
.chaos.is-rest .chaos__core img { opacity: 0; transform: scale(.85); }
@media (prefers-reduced-motion: reduce) {
  .chaos__ring, .chaos__core { display: none; }
}
