/* ============================================================
   BitSwizzler.io — stylesheet
   Dark charcoal + yellow. Angled sections, alternating reveals.
   ============================================================ */

:root {
  --bg:        #121214;
  --bg-a:      #18181c;
  --bg-b:      #1f1f25;
  --panel:     #232329;
  --line:      #2f2f37;
  --text:      #e9e9ee;
  --muted:     #a2a2ad;
  --yellow:    #FFD400;
  --yellow-2:  #ffb800;
  --steam:     #1b2838;
  --itch:      #fa5c5c;
  --font-head: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --angle:     6vw;           /* vertical size of the diagonal cut */
  --ease:      cubic-bezier(.2,.8,.2,1);
  --header-h:  72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: var(--yellow); text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 400; letter-spacing: .02em; line-height: 1; margin: 0; }

.anchor-offset { position: relative; top: calc(-1 * var(--header-h)); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.25rem; border-radius: 6px;
  font-weight: 600; font-size: .95rem; letter-spacing: .02em;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
  border: 2px solid transparent;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.btn svg { width: 1.1em; height: 1.1em; fill: currentColor; }
.btn-primary { background: var(--yellow); color: #111; }
.btn-primary:hover { background: var(--yellow-2); }
.btn-ghost { border-color: var(--yellow); color: var(--yellow); }
.btn-ghost:hover { background: rgba(255,212,0,.1); }
.btn-steam { background: var(--steam); color: #fff; border-color: #2a475e; }
.btn-itch { background: var(--itch); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center; gap: 2rem;
  padding: 0 clamp(1rem, 4vw, 3rem);
  background: linear-gradient(to bottom, rgba(18,18,20,.95), rgba(18,18,20,.6));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,212,0,.12);
  transition: transform .35s var(--ease), background .3s;
}
.site-header.hidden { transform: translateY(-100%); }
.site-header.scrolled { background: rgba(18,18,20,.95); }

.wordmark {
  font-family: var(--font-head);
  font-size: 2rem; letter-spacing: .06em; line-height: 1;
  color: var(--yellow);
  text-shadow: 0 0 18px rgba(255,212,0,.35);
  white-space: nowrap;
}
.wordmark span { color: #fff; }
.wordmark.small { font-size: 1.6rem; }

.nav { display: flex; gap: 1.5rem; margin-left: auto; }
.nav a {
  color: var(--text); font-weight: 600; font-size: .95rem; position: relative; padding: .25rem 0;
}
.nav a::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px;
  background: var(--yellow); transform: scaleX(0); transform-origin: right;
  transition: transform .3s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.store-links { display: flex; gap: .6rem; }
.site-header .btn { padding: .5rem 1rem; font-size: .85rem; }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; height: 100vh; min-height: 560px;
  display: grid; place-items: center; overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--angle)), 0 100%);
}
.carousel { position: absolute; inset: 0; }
.slide {
  position: absolute; inset: -5%;
  background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.08) translateX(4%);
  transition: opacity 1.1s var(--ease), transform 6s linear;
  will-change: opacity, transform;
}
.slide.is-active { opacity: 1; transform: scale(1) translateX(0); }
.slide.is-leaving { opacity: 0; transform: scale(1.04) translateX(-3%); transition: opacity 1.1s var(--ease), transform 1.2s var(--ease); }

.hero-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 60%, rgba(18,18,20,.2), rgba(18,18,20,.8) 70%),
    linear-gradient(to top, var(--bg) 0%, transparent 40%);
  pointer-events: none;
}
.hero-content {
  position: relative; z-index: 2; text-align: center; padding: 0 1.5rem;
  max-width: 900px;
  transform: translateY(calc(-1 * var(--angle) / 2));
}
.eyebrow {
  font-size: .85rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--yellow); margin: 0 0 1rem;
  animation: rise .9s var(--ease) both .2s;
}
.hero-title {
  font-size: clamp(4rem, 12vw, 10rem);
  color: var(--yellow);
  text-shadow: 0 0 40px rgba(255,212,0,.35), 0 8px 0 rgba(0,0,0,.35);
  animation: rise .9s var(--ease) both .35s;
}
.hero-title span { color: #fff; }
.hero-sub { color: var(--muted); font-size: 1.15rem; max-width: 560px; margin: 1.25rem auto 2rem; animation: rise .9s var(--ease) both .5s; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; animation: rise .9s var(--ease) both .65s; }
@keyframes rise { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }

.carousel-dots {
  position: absolute; z-index: 3; left: 50%; bottom: calc(var(--angle) + 1.5rem);
  transform: translateX(-50%); display: flex; gap: .5rem;
}
.carousel-dots button {
  width: 34px; height: 4px; border: 0; border-radius: 2px; cursor: pointer;
  background: rgba(255,255,255,.3); position: relative; overflow: hidden; padding: 0;
}
.carousel-dots button::after {
  content: ''; position: absolute; inset: 0; background: var(--yellow);
  transform: scaleX(0); transform-origin: left;
}
.carousel-dots button.is-active::after { animation: fill var(--dur, 5000ms) linear forwards; }
@keyframes fill { to { transform: scaleX(1); } }

.carousel-arrow {
  position: absolute; z-index: 3; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2);
  background: rgba(18,18,20,.5); color: #fff; font-size: 1.1rem; cursor: pointer;
  transition: background .2s, border-color .2s; backdrop-filter: blur(6px);
}
.carousel-arrow:hover { background: var(--yellow); color: #111; border-color: var(--yellow); }
.carousel-arrow.prev { left: 1.5rem; }
.carousel-arrow.next { right: 1.5rem; }

.scroll-hint {
  position: absolute; z-index: 3; left: 50%; bottom: calc(var(--angle) + 4rem);
  width: 22px; height: 36px; border: 2px solid rgba(255,255,255,.35); border-radius: 12px;
  transform: translateX(-50%);
}
.scroll-hint span {
  position: absolute; left: 50%; top: 6px; width: 4px; height: 8px; border-radius: 2px;
  background: var(--yellow); transform: translateX(-50%);
  animation: scrollhint 1.6s ease-in-out infinite;
}
@keyframes scrollhint { 0% { opacity: 1; top: 6px; } 100% { opacity: 0; top: 20px; } }

/* ---------- Angled sections ---------- */
.angled {
  position: relative;
  padding: calc(var(--angle) + 4rem) 0 calc(var(--angle) + 4rem);
  margin-top: calc(-1 * var(--angle));   /* overlap the previous section's cut */
}
.tone-a { background: var(--bg-a); }
.tone-b { background: var(--bg-b); }

/* alternate the diagonal direction per section */
.angled[data-dir="right"] { clip-path: polygon(0 var(--angle), 100% 0, 100% calc(100% - var(--angle)), 0 100%); }
.angled[data-dir="left"]  { clip-path: polygon(0 0, 100% var(--angle), 100% 100%, 0 calc(100% - var(--angle))); }

/* yellow accent line along the top cut */
.angled::before {
  content: ''; position: absolute; left: -5%; right: -5%; top: 0; height: 6px;
  background: linear-gradient(90deg, transparent, var(--yellow), transparent);
  opacity: .6;
  transform-origin: left center;
}
.angled[data-dir="right"]::before { transform: rotate(calc(-1 * atan(var(--angle) / 100vw))); top: var(--angle); }
.angled[data-dir="left"]::before  { transform: rotate(atan(var(--angle) / 100vw)); }

/* giant background number / watermark */
.game-section .section-num,
.model-section .section-num {
  display: block; font-family: var(--font-head); font-size: 1rem; letter-spacing: .3em;
  color: var(--yellow); margin-bottom: .75rem;
}

.game-inner {
  width: min(1200px, 92vw); margin: 0 auto;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.game-inner.flip { grid-template-columns: 1fr 1.15fr; }

.copy h2 { font-size: clamp(3rem, 6vw, 5rem); color: #fff; }
.copy .tagline { color: var(--yellow); font-weight: 600; margin: .75rem 0 1rem; font-size: 1.1rem; }
.copy p { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.25rem 0; }
.tags span {
  font-size: .75rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 999px; color: var(--text);
}
.links { display: flex; gap: .75rem; flex-wrap: wrap; }

/* video frame */
.video-frame {
  position: relative; aspect-ratio: 16 / 9; background: #000;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(255,212,0,.08);
  transform: perspective(1200px) rotateY(0deg);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}
.video-frame:hover { transform: perspective(1200px) rotateY(-3deg) translateY(-4px); box-shadow: 0 40px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,212,0,.25); }
.video-frame video { width: 100%; height: 100%; object-fit: cover; }
.sound-toggle {
  position: absolute; right: .75rem; bottom: .75rem; width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.6);
  color: #fff; cursor: pointer; font-size: 1rem; opacity: 0; transition: opacity .2s;
}
.video-frame:hover .sound-toggle { opacity: 1; }
.sound-toggle.on { background: var(--yellow); color: #111; opacity: 1; }

/* 3D model frame (<model-viewer>) */
.model-frame {
  position: relative; aspect-ratio: 4 / 3; background: radial-gradient(circle at 50% 40%, #2b2b33, #141417 70%);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(255,212,0,.08);
}
.model-frame model-viewer {
  width: 100%; height: 100%; display: block; background: transparent;
  --poster-color: transparent; --progress-bar-color: var(--yellow); --progress-bar-height: 3px;
}
.model-placeholder {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  color: var(--muted); font-size: .9rem; gap: 0; align-content: center;
  background: radial-gradient(circle at 50% 40%, #2b2b33, #141417 70%);
}
.model-placeholder p { margin: 2rem 0 0; }
.model-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.08); }
.model-progress .bar { height: 100%; width: 0; background: var(--yellow); transition: width .3s var(--ease); }
.model-progress.done { opacity: 0; transition: opacity .6s .4s; }
.cube { width: 110px; height: 110px; position: relative; transform-style: preserve-3d; animation: spin 9s linear infinite; }
.cube div {
  position: absolute; inset: 0; border: 2px solid var(--yellow);
  background: rgba(255,212,0,.06); box-shadow: inset 0 0 30px rgba(255,212,0,.08);
}
.cube div:nth-child(1) { transform: translateZ(55px); }
.cube div:nth-child(2) { transform: rotateY(180deg) translateZ(55px); }
.cube div:nth-child(3) { transform: rotateY(90deg) translateZ(55px); }
.cube div:nth-child(4) { transform: rotateY(-90deg) translateZ(55px); }
.cube div:nth-child(5) { transform: rotateX(90deg) translateZ(55px); }
.cube div:nth-child(6) { transform: rotateX(-90deg) translateZ(55px); }
@keyframes spin { from { transform: rotateX(-20deg) rotateY(0); } to { transform: rotateX(-20deg) rotateY(360deg); } }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  will-change: opacity, transform;
}
.reveal.from-left  { transform: translateX(-80px) skewX(4deg); }
.reveal.from-right { transform: translateX(80px) skewX(-4deg); }
.reveal.is-visible { opacity: 1; transform: none; }
.copy.reveal.is-visible { transition-delay: .15s; }

/* ---------- Divider band (marquee) ---------- */
.divider-band {
  position: relative; z-index: 2; background: var(--yellow); color: #111;
  padding: 1rem 0; overflow: hidden;
  transform: rotate(-1.2deg) scale(1.03);
  margin: calc(var(--angle) * -.5) 0;
}
.marquee-track {
  display: flex; gap: 2.5rem; white-space: nowrap; width: max-content;
  font-family: var(--font-head); font-size: 2rem; letter-spacing: .1em;
  animation: marquee 22s linear infinite;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Footer ---------- */
.site-footer { position: relative; padding: 5rem 1.5rem 3rem; background: var(--bg); text-align: center; border-top: 1px solid var(--line); }
.footer-inner { max-width: 700px; margin: 0 auto; display: grid; gap: 1.25rem; justify-items: center; color: var(--muted); }
.copyright { font-size: .8rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  :root { --angle: 9vw; --header-h: 64px; }
  .game-inner, .game-inner.flip { grid-template-columns: 1fr; }
  .game-inner.flip .copy { order: 2; }
  .game-inner.flip .media { order: 1; }
  .nav, .site-header .store-links { display: none; }
  .nav-toggle {
    display: block; margin-left: auto; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; position: relative;
  }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    content: ''; display: block; width: 24px; height: 2px; background: var(--yellow); position: absolute; left: 10px; transition: transform .3s, opacity .3s;
  }
  .nav-toggle span { top: 21px; }
  .nav-toggle span::before { top: -7px; left: 0; }
  .nav-toggle span::after { top: 7px; left: 0; }
  .site-header.menu-open .nav, .site-header.menu-open .store-links {
    display: flex; flex-direction: column; position: absolute; left: 0; right: 0;
    background: rgba(18,18,20,.98); padding: 1rem clamp(1rem, 4vw, 3rem); gap: 1rem;
  }
  .site-header.menu-open .nav { top: var(--header-h); }
  .site-header.menu-open .store-links { top: calc(var(--header-h) + 130px); padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
  .carousel-arrow { display: none; }
  .video-frame:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- "Coming soon" links ----------
   Add class="soon" to any .btn to grey it out, strike the label and stamp
   a yellow SOON tape across it. Remove the class to undo. Optional:
   data-soon="Wishlist" changes the tape text.                          */
.btn.soon {
  position: relative; cursor: not-allowed;
  background: #2a2a30 !important; color: #7a7a84 !important;
  text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--yellow);
  border-style: dashed; border-color: rgba(255,255,255,.25);
  overflow: visible; transform: none !important; box-shadow: none !important;
}
.btn.soon::after {
  content: attr(data-soon); position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  padding: .1rem .55rem; background: var(--yellow); color: #111;
  font-family: var(--font-head); font-size: .72rem; letter-spacing: .14em; line-height: 1.4;
  white-space: nowrap;   /* keep multi-word tapes on one strip instead of stacking */
  box-shadow: 0 2px 6px rgba(0,0,0,.5);
  /* torn-tape edges */
  clip-path: polygon(2% 0, 98% 4%, 100% 96%, 1% 100%);
  text-decoration: none;
}
.btn.soon:not([data-soon])::after { content: 'SOON'; }
.btn.soon:hover::after { animation: tape-wobble .5s var(--ease); }
@keyframes tape-wobble {
  0%   { transform: translate(-50%, -50%) rotate(-12deg); }
  25%  { transform: translate(-50%, -50%) rotate(-6deg) scale(1.08); }
  50%  { transform: translate(-50%, -50%) rotate(-16deg); }
  75%  { transform: translate(-50%, -50%) rotate(-10deg); }
  100% { transform: translate(-50%, -50%) rotate(-12deg); }
}

/* ============================================================
   Showcase page + landing-page teaser
   ============================================================ */
.nav a.active { color: var(--yellow); }
.nav a.active::after { transform: scaleX(1); }

/* teaser category chips (index.html) */
.cat-links { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.25rem 0; }
.cat-links a {
  font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600;
  padding: .35rem .8rem; border: 1px solid var(--yellow); border-radius: 999px; color: var(--yellow);
  transition: background .2s, color .2s;
}
.cat-links a:hover { background: var(--yellow); color: #111; }

/* page hero (showcase.html) */
.page-hero {
  position: relative; height: 58vh; min-height: 400px; display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(ellipse at 70% 30%, rgba(255,212,0,.14), transparent 55%),
    linear-gradient(160deg, #1f1f26 0%, var(--bg) 70%);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--angle)), 0 100%);
}
.page-hero::before {
  content: ''; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: linear-gradient(rgba(255,212,0,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,212,0,.06) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000, transparent 75%);
}
.page-hero-content { position: relative; text-align: center; padding: var(--header-h) 1.5rem var(--angle); max-width: 800px; }
.page-hero .hero-title { font-size: clamp(3.5rem, 10vw, 8rem); }

/* sticky category sub-nav */
.subnav {
  position: sticky; top: var(--header-h); z-index: 90;
  display: flex; justify-content: center; gap: .5rem; padding: .75rem 1rem;
  background: rgba(18,18,20,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,212,0,.15);
  margin-top: calc(-1 * var(--angle));
}
.subnav a {
  font-family: var(--font-head); font-size: 1.25rem; letter-spacing: .12em; color: var(--muted);
  padding: .3rem 1rem; border-radius: 999px; transition: color .2s, background .2s;
}
.subnav a:hover, .subnav a.active { color: #111; background: var(--yellow); }

/* category headings */
.category { padding-bottom: calc(var(--angle) + 2rem); }
.category-head { width: min(1200px, 92vw); margin: 0 auto 2rem; }
.category-head h2 { font-size: clamp(3.5rem, 8vw, 7rem); color: #fff; line-height: .95; }
.category-head p { color: var(--muted); max-width: 620px; margin: 1rem 0 0; }
.category-head .section-num { display: block; font-family: var(--font-head); font-size: 1rem; letter-spacing: .3em; color: var(--yellow); margin-bottom: .5rem; }
.category, .gallery-section, .model-section { scroll-margin-top: 4rem; }

/* galleries */
.gallery-inner { width: min(1200px, 92vw); margin: 0 auto; }
.gallery { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.gallery.ratio-landscape { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.gallery figure {
  margin: 0; position: relative; border-radius: 10px; overflow: hidden; background: var(--panel);
  border: 1px solid var(--line); box-shadow: 0 20px 40px rgba(0,0,0,.4);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s, opacity .9s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.gallery figure.is-visible { transition-delay: calc(var(--i, 0) * 70ms); }
.gallery figure:hover { transform: translateY(-6px); border-color: rgba(255,212,0,.5); box-shadow: 0 30px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(255,212,0,.25); }
.gallery figure a { display: block; aspect-ratio: 3 / 4; overflow: hidden; }
.gallery.ratio-landscape figure a { aspect-ratio: 4 / 3; }
.gallery figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption {
  display: flex; justify-content: space-between; align-items: center; gap: .5rem;
  padding: .75rem 1rem; font-size: .9rem;
}
.gallery figcaption span {
  font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--yellow);
  border: 1px solid rgba(255,212,0,.4); border-radius: 999px; padding: .2rem .6rem; white-space: nowrap;
}

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: rgba(10,10,12,.92); backdrop-filter: blur(6px);
  animation: lb-in .25s var(--ease);
}
.lightbox[hidden] { display: none; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox figure { margin: 0; text-align: center; max-width: 90vw; }
.lightbox img { max-width: 90vw; max-height: 82vh; border-radius: 8px; box-shadow: 0 40px 80px rgba(0,0,0,.7); animation: lb-img .35s var(--ease); }
@keyframes lb-img { from { opacity: 0; transform: scale(.96) translateY(10px); } to { opacity: 1; transform: none; } }
.lightbox figcaption { color: var(--muted); margin-top: 1rem; font-size: .95rem; }
.lightbox figcaption strong { color: #fff; margin-right: .75rem; }
.lightbox button {
  position: absolute; width: 52px; height: 52px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(255,255,255,.2); background: rgba(18,18,20,.6); color: #fff; font-size: 1.2rem;
  transition: background .2s, color .2s;
}
.lightbox button:hover { background: var(--yellow); color: #111; }
.lb-close { top: 1.25rem; right: 1.25rem; font-size: 1.6rem !important; }
.lb-prev { left: 1.25rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1.25rem; top: 50%; transform: translateY(-50%); }

@media (max-width: 900px) {
  .subnav a { font-size: 1.05rem; padding: .25rem .7rem; }
  .lb-prev, .lb-next { display: none; }
}

/* wireframe toggle on 3D viewers */
.wire-toggle {
  position: absolute; right: .75rem; top: .75rem; z-index: 2;
  padding: .3rem .7rem; border-radius: 999px; cursor: pointer;
  font: 600 .7rem/1.4 var(--font-body); letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); background: rgba(18,18,20,.6); border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(6px); transition: color .2s, background .2s, border-color .2s;
}
.wire-toggle:hover { color: #fff; border-color: rgba(255,212,0,.6); }
.wire-toggle[aria-pressed="true"] { color: #111; background: var(--yellow); border-color: var(--yellow); }
.wire-toggle[hidden] { display: none; }

/* masonry galleries: each piece keeps its own aspect ratio.
   CSS columns are the no-JS fallback; main.js switches to real shortest-column packing. */
.gallery.masonry { display: block; columns: 3 280px; column-gap: 1.25rem; }
.gallery.masonry figure { display: inline-block; width: 100%; margin: 0 0 1.25rem; break-inside: avoid; }
.gallery.masonry figure a { aspect-ratio: auto; }
.gallery.masonry figure img { height: auto; }
.gallery.masonry.is-packed { display: flex; gap: 1.25rem; align-items: flex-start; columns: auto; }
.gallery.masonry.is-packed .col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }
.gallery.masonry.is-packed figure { display: block; margin: 0; }

/* footer "lab" whisper link (Foley Fun) */
.lab-link { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; margin: 0; }
.lab-link a { color: var(--muted); opacity: .7; transition: color .2s, opacity .2s; }
.lab-link a:hover { color: var(--yellow); opacity: 1; }
.lab-link span { color: var(--muted); opacity: .5; }
.lab-link .sep { margin: 0 .35rem; }

/* round separator dots in the hero subtitle (drawn in CSS so they stay circular) */
.hero-sub .dot {
  display: inline-block;
  width: .42em; height: .42em;
  margin: 0 .85em;
  border-radius: 50%;
  background: var(--yellow);
  vertical-align: middle;
  position: relative; top: -.08em;
  box-shadow: 0 0 10px rgba(255,212,0,.5);
}
