/* Persistent application frame: only the stage may scroll. */
html.app-frame {
  width:100%; height:100%; min-height:0; overflow:hidden;
  overscroll-behavior:none;
}
.app-shell {
  position:fixed;
  top:var(--viewport-top,0px);
  left:var(--viewport-left,0px);
  width:var(--viewport-width,100%);
  height:100vh;
  height:100dvh;
  height:var(--viewport-height,var(--viewport-fallback));
  min-height:0; max-height:none; margin:0; padding:0;
  overflow:hidden; overscroll-behavior:none;
  --viewport-fallback:100vh;
  --header-h:80px;
  --footer-h:60px;
  --frame-pad:clamp(16px,2.5vw,48px);
  --header-total:calc(var(--header-h) + env(safe-area-inset-top,0px));
  --footer-total:calc(var(--footer-h) + env(safe-area-inset-bottom,0px));
}
@supports(height:100dvh) { .app-shell { --viewport-fallback:100dvh; } }
html:has(body.app-shell) { height:100%; overflow:hidden; overscroll-behavior:none; }
.site-header,.site-footer {
  position:absolute;
  inset-inline:0;
  background:#111216;
  z-index:20;
}
.site-header {
  top:0;
  border-bottom:1px solid var(--line);
  padding-top:env(safe-area-inset-top,0px);
}
.site-footer {
  bottom:0;
  border-top:1px solid var(--line);
  padding-bottom:env(safe-area-inset-bottom,0px);
}
.header-inner,.footer-inner {
  min-width:0;
  padding-inline:var(--frame-pad);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.header-inner {
  height:calc(var(--header-h) - 1px);
}
.footer-inner {
  height:calc(var(--footer-h) - 1px);
  display:grid;
  grid-template-columns:1fr auto 1fr;
}
.footer-inner>.footer-brand {
  grid-column:1;
  grid-row:1;
  justify-self:start;
}
.footer-inner>.scene-controls,.footer-inner>a[href="/"]:not(.footer-brand) {
  grid-column:2;
  grid-row:1;
  justify-self:center;
}
.footer-inner>.footer-contact:last-child {
  grid-column:3;
  grid-row:1;
  justify-self:end;
}
.brand {
  display:block;
  flex-shrink:0;
  width:clamp(170px,13.5vw,255px);
}
.brand img {
  width:100%;
  height:auto;
}
.main-nav {
  display:flex;
  align-items:center;
  gap:clamp(15px,1.7vw,32px);
  font-size:.86rem;
  font-weight:600;
  color:var(--muted);
}
.main-nav a {
  white-space:nowrap;
  padding-block:12px;
}
.main-nav a:hover,.main-nav a[aria-current="page"] {
  color:var(--cyan);
}
.main-nav .nav-contact {
  border:1px solid #515565;
  padding:.6em .9em;
  border-radius:4px;
  color:var(--text);
}
.main-nav .nav-contact[aria-current="page"] {
  border-color:var(--cyan);
}
.menu-toggle {
  display:none;
  background:transparent;
  border:1px solid var(--line);
  padding:8px 12px;
  min-height:44px;
  align-items:center;
  gap:10px;
  border-radius:4px;
}
.menu-icon {
  width:19px;
  height:12px;
  border-block:1px solid currentColor;
}
.menu-toggle[aria-expanded="true"] .menu-icon {
  transform:rotate(45deg);
  height:2px;
  border:0;
  background:currentColor;
  position:relative;
}
.menu-toggle[aria-expanded="true"] .menu-icon::after {
  content:"";
  position:absolute;
  inset:0;
  transform:rotate(90deg);
  background:currentColor;
}
.app-shell>main {
  position:absolute;
  inset:var(--actual-header,var(--header-total)) 0 var(--actual-footer,var(--footer-total));
  min-width:0;
  min-height:0;
  width:100%;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  container:stage / size;
  scroll-snap-type:y mandatory;
  scrollbar-width:thin;
  scrollbar-color:#666477 #191a20;
}
.app-shell>main:focus-visible {
  outline:2px solid var(--cyan);
  outline-offset:-2px;
}
.app-shell>main.paged {
  overflow:hidden;
  scroll-snap-type:none;
  overflow-anchor:none;
  touch-action:pan-y pinch-zoom;
}
.scene {
  width:100%;
  height:100%;
  min-height:100%;
  min-width:0;
  margin:0;
  max-height:100%;
  overflow:auto;
  overflow-anchor:none;
  overscroll-behavior:contain;
  scroll-snap-align:start;
  scroll-snap-stop:always;
  scrollbar-width:thin;
  scrollbar-color:#666477 #191a20;
}
.scene:focus {
  outline:none;
}
.scene.enter-down {
  animation:enter-down .24s ease-out both;
}
.scene.enter-up {
  animation:enter-up .24s ease-out both;
}
@keyframes enter-down {
  from {
    transform:translateY(5%);
    opacity:.45;
  }
  to {
    transform:translateY(0);
    opacity:1;
  }
}
@keyframes enter-up {
  from {
    transform:translateY(-5%);
    opacity:.45;
  }
  to {
    transform:translateY(0);
    opacity:1;
  }
}
.footer-brand,.footer-contact {
  font-size:.79rem;
  font-weight:600;
  color:var(--muted);
  white-space:nowrap;
}
.footer-brand:hover,.footer-contact:hover {
  color:var(--cyan);
}
.scene-controls {
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
}
.scene-status {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:.79rem;
  white-space:nowrap;
}
.scene-status #scene-count {
  color:var(--cyan);
  font-variant-numeric:tabular-nums;
}
.scene-status #scene-name {
  color:var(--muted);
}
.scene-arrow,.scene-dot {
  display:grid;
  place-items:center;
  border:0;
  background:transparent;
  padding:0;
  color:var(--text);
}
.scene-arrow {
  width:44px;
  height:44px;
  font-size:1.35rem;
}
.scene-arrow:disabled {
  color:#62646f;
}
.scene-arrow:hover:not(:disabled) {
  color:var(--cyan);
}
.scene-dots {
  display:flex;
  align-items:center;
}
.scene-dot {
  width:24px;
  height:36px;
}
.scene-dot::before {
  content:"";
  width:7px;
  height:7px;
  background:#737684;
  border-radius:50%;
}
.scene-dot[aria-current="location"]::before {
  width:10px;
  height:10px;
  background:var(--violet);
}
@media(max-width:1100px),(orientation:portrait) {
  .app-shell {
    --header-h:68px;
    --footer-h:54px;
  }
  .js .menu-toggle:not([hidden]) {
    display:flex;
  }
  .js .main-nav {
    display:none;
    position:absolute;
    inset:100% 0 auto;
    max-height:calc(var(--viewport-height,100dvh) - var(--header-total) - var(--footer-total));
    overflow-y:auto;
    flex-direction:column;
    align-items:stretch;
    gap:0;
    background:#181a20;
    border-bottom:1px solid var(--line);
    padding:8px var(--frame-pad) 14px;
    box-shadow:0 12px 24px #0008;
  }
  .js .main-nav.is-open {
    display:flex;
  }
  .js .main-nav a {
    padding:12px 0;
    border-bottom:1px solid var(--line);
  }
  .js .main-nav .nav-contact {
    border:0;
    color:var(--cyan);
    padding:12px 0;
  }
  .scene-dots {
    display:none;
  }
  html:not(.js) .header-inner {
    height:auto;
    min-height:var(--header-h);
    flex-wrap:wrap;
  }
  html:not(.js) .main-nav {
    overflow-x:auto;
    width:100%;
    gap:14px;
  }
}
@media(min-width:701px) and (orientation:portrait) {
  .app-shell {
    --header-h:90px;
    --footer-h:72px;
  }
  .brand {
    width:240px;
  }
  .scene-arrow {
    width:56px;
    height:56px;
  }
  .menu-toggle {
    min-height:58px;
  }
}
@media(max-width:700px) {
  .app-shell {
    --header-h:62px;
    --footer-h:54px;
    --frame-pad:12px;
  }
  .brand {
    width:158px;
  }
  .footer-brand,.footer-contact {
    font-size:.72rem;
  }
  .scene-status {
    display:grid;
    justify-items:center;
    gap:0;
    line-height:1.2;
    font-size:.72rem;
  }
  .scene-controls {
    gap:2px;
  }
  .scene-arrow {
    width:36px;
    height:44px;
  }
  .footer-inner {
    gap:5px;
  }
}
@media(max-height:450px) and (orientation:landscape) {
  .app-shell {
    --header-h:52px;
    --footer-h:42px;
  }
  .brand {
    width:150px;
  }
  .scene-arrow {
    height:38px;
  }
}
