/* Shdwbx Studios — holding page. One mark, lit from inside by the shows. */
@font-face {
  font-family: "Space Mono";
  src: url("/fonts/space-mono-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
:root {
  --bg: #0b0b0b;
  --bone: #efe9df;
  --steel: #8f9799;
  --gut: max(24px, env(safe-area-inset-left, 0px));
  --fade: 2.8s;
  --ease: cubic-bezier(.2, .7, .1, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-rows: auto 1fr auto;
  background: var(--bg); color: var(--bone);
  font: 400 11px/1.65 "Space Mono", ui-monospace, Menlo, monospace;
  letter-spacing: .08em; text-transform: uppercase;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
/* film grain over everything, so the black reads as a dark room rather than a screen */
body::after {
  content: ""; position: fixed; inset: -10%; pointer-events: none; z-index: 5; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .94 0 0 0 0 .91 0 0 0 0 .87 0 0 0 .055 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}
a { color: inherit; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .5s var(--ease); }
a:hover, a:focus-visible { background-size: 100% 1px; }
a:focus-visible { outline: 1px solid var(--bone); outline-offset: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- top and bottom rails ---------- */
.top, .bot {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
  padding: max(22px, env(safe-area-inset-top, 0px)) var(--gut) 0;
  position: relative; z-index: 6;
  animation: rail 1.6s .9s var(--ease) both;
}
.bot { align-items: flex-end; padding-top: 0; padding-bottom: max(22px, env(safe-area-inset-bottom, 0px)); }
.bot p { margin: 0; }
.bot .mid { color: var(--steel); text-align: center; }
.bot .r { text-align: right; }
.type { display: block; background: none; line-height: 0; }
.type svg { height: 15px; width: auto; fill: var(--bone); }
@keyframes rail { from { opacity: 0; transform: translateY(6px); } }

/* ---------- the mark ---------- */
/* landing.js draws the mark on one WebGL canvas: frames, crossfades, drift and the halo all run on the GPU in a
   single pass, so nothing here animates a mask or a blur. Without WebGL (or JS) the masked first frame below stays. */
main { display: grid; place-items: center; padding: 40px var(--gut); position: relative; }
.stage {
  position: relative; width: min(88vw, 1280px, 190vh); aspect-ratio: 413.12 / 170.28;
  animation: rise 2.2s .1s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: scale(.975); } }
.lean { position: absolute; inset: 0; will-change: transform; }
.mark, .glow .m {
  position: absolute; inset: 0;
  -webkit-mask: url("/mark.svg") center / 100% 100% no-repeat;
  mask: url("/mark.svg") center / 100% 100% no-repeat;
}
.mark { overflow: hidden; background: var(--c, #222); }
.f { position: absolute; inset: -6%; }
.f img { display: block; width: 100%; height: 100%; object-fit: cover; }
.glow { position: absolute; inset: -6% -4%; filter: blur(46px) saturate(1.25); opacity: .55; pointer-events: none; }
.glow .m { inset: 6% 4%; }
.glow i { position: absolute; inset: 0; background: center / cover no-repeat; }

/* the canvas reaches past the mark so the halo has room: 22% of its height above and below, 10% of its width each side */
.gl { position: absolute; inset: -22% -10%; width: 120%; height: 144%; opacity: 0; transition: opacity .8s ease; pointer-events: none; }
.stage.gl-on .gl { opacity: 1; }
.stage.gl-done .mark, .stage.gl-done .glow { visibility: hidden; }

/* a hairline on the mark's edge keeps it legible when a frame goes dark */
.edge { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none;
  fill: none; stroke: rgba(239, 233, 223, .2); stroke-width: 1; vector-effect: non-scaling-stroke; }

/* ---------- no visible controls: the mark itself is the interface ---------- */
.stage.gl-on { cursor: pointer; touch-action: pan-y; }
.stage.dragging { cursor: ew-resize; }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .stage { width: 92vw; }
  .bot { display: grid; grid-template-columns: 1fr 1fr; row-gap: 14px; }
  .bot .mid { grid-column: 1 / -1; grid-row: 2; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
