:root {
  color-scheme: dark;
  background: #000;
  --viewport-height: 100vh;
  --reel-height: 400vh;
  --nav-gutter: clamp(1rem, 4vw, 4rem);
  --nav-top: max(.5rem, env(safe-area-inset-top));
  --nav-bottom: .65rem;
  --nav-link-height: 44px;
  --nav-height: calc(var(--nav-top) + var(--nav-link-height) + var(--nav-bottom));
  --video-bottom: max(.5rem, env(safe-area-inset-bottom));
}

@supports (height: 100dvh) {
  :root {
    --viewport-height: 100dvh;
    --reel-height: 400dvh;
  }
}

body {
  margin: 0;
  font: 1rem/1.5 system-ui, sans-serif;
}

#landscape-prompt {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  padding: clamp(1.5rem, 7vw, 3.5rem);
  color: #fff;
  background: #08050c;
  text-align: center;
}

#landscape-prompt[open] { display: grid; place-items: center; }
#landscape-prompt::backdrop { background: #08050c; }
body:has(#landscape-prompt[open]) { overflow: hidden; }

.landscape-message { max-width: 28rem; }
.landscape-message h1 { margin: 0; font-size: clamp(2rem, 9vw, 3rem); line-height: 1.05; }
.landscape-message p { margin: .9rem 0 0; color: #ded2e6; }

#enter-landscape {
  min-height: 44px;
  margin-top: 1.4rem;
  border: 0;
  border-radius: 99px;
  padding: .65rem 1.25rem;
  color: #1a1122;
  background: #d7a6ff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

#enter-landscape:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

.site-nav {
  position: fixed;
  z-index: 1;
  inset: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: var(--nav-top) var(--nav-gutter) var(--nav-bottom);
  background: linear-gradient(to bottom, rgb(0 0 0 / .82), transparent);
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: clamp(.65rem, 2.7vw, 2.35rem);
}

.site-nav a,
.site-nav button {
  display: inline-flex;
  align-items: center;
  min-height: var(--nav-link-height);
  border: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: clamp(.875rem, 1.25vw, 1.05rem);
  font-weight: 560;
  text-decoration: none;
  text-shadow: 0 1px 5px #000;
  white-space: nowrap;
  cursor: pointer;
}

.site-nav #home-link { font-weight: 730; }
.site-nav :is(a, button):hover,
.site-nav a[aria-current] { color: #f1d5ff; }

.nav-panel {
  position: fixed;
  inset: max(4rem, calc(env(safe-area-inset-top) + 3.5rem)) var(--nav-gutter) auto auto;
  width: max-content;
  max-width: min(22rem, calc(100% - 2 * var(--nav-gutter)));
  box-sizing: border-box;
  margin: 0;
  padding: .9rem 1.1rem;
  border: 1px solid #ffffff38;
  border-radius: 1rem;
  background: rgb(17 12 23 / .91);
  color: #fff;
  backdrop-filter: blur(14px);
}

.nav-panel h2 { margin: 0 0 .2rem; font-size: 1.1rem; }
.nav-panel p { margin: 0; }

.reel-ready .video-reel {
  height: var(--reel-height);
}

.video-reel { position: relative; }

.reel-about-anchor {
  position: absolute;
  top: calc(100% - var(--viewport-height));
}

.site-nav:where(#project-gallery *) {
  background: #0a070fe8;
}

.video-stage {
  position: sticky;
  top: 0;
  height: var(--viewport-height);
  overflow: hidden;
  background: #000;
}

.video-stage video {
  position: absolute;
  inset: var(--nav-height) 0 auto;
  width: 100%;
  height: calc(100% - var(--nav-height) - var(--video-bottom));
  object-fit: contain;
  pointer-events: none;
}

#opening-video { background: #000; }

#creative-work[hidden] { display: none; }

#play-intro {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  border: 1px solid #ffffff80;
  border-radius: 99px;
  padding: .65rem 1.25rem;
  background: #111e;
  color: white;
  font: inherit;
  cursor: pointer;
}

.site-nav :is(a, button):focus-visible,
#play-intro:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}
