html {
  /* The document itself is the snap container, so window.scrollY
     (which drives the 3D scene) keeps working. */
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}
html::-webkit-scrollbar {
  display: none;
}

#main-view {
  transition: transform 0.6s ease;
}
body.showcase-open #main-view {
  transform: translateX(-100%);
}
html.locked {
  overflow: hidden;
}

body {
  text-align: center;
  background: #193549;
  color: white;
  font-weight: 100;
  font-size: 35px;
  margin: 0;
  font-family: "VT323", monospace;
}

.text {
  font-size: 20px;
}

h1 {
  font-size: 45px;
}

h2 {
  font-size: 35px;
}

canvas {
  width: 100%;
  height: 100%;
  position: fixed;
  left: 0;
  top: 0;
  z-index: -1;
}

/* Each panel is one full viewport and one snap target. */
.panel {
  height: 100vh;
  display: grid;
  place-items: center;
  padding: 0 1rem;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.blurb {                                                                                                                                                                                                     
  max-width: 32rem;                                                                                                                                                                                          
  margin: 0.75rem auto;                                                                                                                                                                                      
}    

/* Reveal animation, toggled by the IntersectionObserver in script2.js */
.slide-in {
  opacity: 0;
  transition: opacity 1.2s ease, transform 1.2s ease;
}
.from-left.slide-in {
  transform: translateX(-30%) scale(0.95);
}
.from-right.slide-in {
  transform: translateX(30%) scale(0.95);
}
.slide-in.active {
  opacity: 1;
  transform: translateX(0%) scale(1);
}

.showcase {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(100%);
  transition: transform 0.6s ease;
}

body.showcase-open .showcase.open {
  transform: translateX(0);
}

/* Showcase internals: text column on the left, sticky portrait video
   on the right (stacks on narrow screens). */
.back-btn {
  position: fixed;
  top: 1.25rem;
  left: 1.5rem;
  z-index: 10;
  font-family: inherit;
  font-size: 1.8rem;
  line-height: 1;
  color: #fff;
  background: rgba(25, 53, 73, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.back-btn:hover {
  border-color: #ffc600;
  color: #ffc600;
}

.showcase-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 5rem 2rem 6rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3.5rem;
  align-items: start;
  text-align: left;
}

/* Text-only showcase (no media): a single, centred, readable-width column. */
.showcase-inner--prose {
  grid-template-columns: minmax(0, 46rem);
  justify-content: center;
}
.showcase-inner--prose .showcase-text ul {
  padding-left: 1.2em;
}
.showcase-inner--prose .showcase-text li {
  margin: 0.6rem 0;
}

/* Stub showcase (no media): single, vertically-centred column. */
.showcase-inner--stub {
  grid-template-columns: 1fr;
  min-height: 100vh;
  place-content: center;
  text-align: center;
}
.showcase-text .coming-soon {
  margin-top: 1.5rem;
  font-size: 2rem;
  color: #ffc600;
}

.showcase-text {
  font-size: 1.3rem;
  line-height: 1.5;
}
.showcase-text h1 {
  font-size: 2.6rem;
  line-height: 1.05;
  margin: 0 0 0.5rem;
}
.showcase-text h2 {
  font-size: 1.9rem;
  margin: 2.5rem 0 0.75rem;
  color: #ffc600;
}
.showcase-text h3 {
  font-size: 1.5rem;
  margin: 1.75rem 0 0.4rem;
}
.showcase-text p {
  margin: 0.75rem 0;
}
.showcase-text .tagline {
  font-size: 1.55rem;
  opacity: 0.95;
}
.showcase-text .meta {
  opacity: 0.6;
  font-size: 1.05rem;
  line-height: 1.4;
}
.showcase-text hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin: 2rem 0;
}
.showcase-text a {
  color: #ffc600;
}
.showcase-text pre {
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.15;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
}
.showcase-text code {
  background: rgba(0, 0, 0, 0.25);
  padding: 0 0.25em;
  border-radius: 3px;
}
.showcase-text table {
  border-collapse: collapse;
  width: 100%;
  font-size: 1.1rem;
  margin: 0.75rem 0;
}
.showcase-text th,
.showcase-text td {
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.4rem 0.7rem;
  text-align: left;
}
.showcase-text th {
  color: #ffc600;
}

.showcase-media {
  position: sticky;
  top: 2rem;
  margin: 0;
}
.showcase-media video {
  height: min(80vh, 760px);
  width: auto;
  max-width: 100%;
  display: block;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #000;
}
.showcase-media figcaption {
  margin-top: 0.6rem;
  font-size: 1rem;
  opacity: 0.6;
  text-align: center;
}

@media (max-width: 820px) {
  .showcase-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 4.5rem 1.25rem 4rem;
  }
  .showcase-media {
    position: static;
    order: -1;
    justify-self: center;
  }
  .showcase-media video {
    height: auto;
    max-height: 70vh;
  }
}
