/* The gate's other ways in (gate.js): B · red light (gate-door.js), C · slate (gate-slate.js), D · signal
   (gate-signal.js), and the lab's switcher. A · the lot pass is in revolve.css. Same house style as the Revolve:
   Anton stickers, paper cards with an ink border and a hard shadow, IBM Plex Mono labels, Caveat for anything written. */

/* ---- the lab: the four ways in (not on the public copy) */
.gate-lab { position: fixed; z-index: 4; top: max(12px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); display: flex; align-items: stretch;
  background: rgba(18,17,16,.92); border: 1px solid rgba(233,228,214,.28); font: 600 10px/1 "IBM Plex Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--paper);
  max-width: calc(100vw - 24px); overflow-x: auto; scrollbar-width: none; }
.gate-lab b { padding: .95em 1em; background: var(--tape); color: var(--tape-ink); font-weight: 600; white-space: nowrap; }
.gate-lab a { padding: .95em .9em; color: inherit; text-decoration: none; white-space: nowrap; opacity: .6; }
.gate-lab a:hover { opacity: 1; }
.gate-lab a.on { opacity: 1; box-shadow: inset 0 -3px 0 var(--tape); }
.gate.open .gate-lab, .gate.gd-in .gate-lab, .gate.cl-out .gate-lab, .gate.sg-in .gate-lab { opacity: 0; transition: opacity .25s; }
.gate-alt { z-index: 3; }

/* shared bits of the variants' cards */
.gx-card { background: var(--sheet); color: var(--ink); border: 2px solid var(--ink); box-shadow: 5px 5px 0 rgba(0,0,0,.55); }
.gx-field { display: block; }
.gx-field .label { display: block; opacity: .62; }
.gx-field input { display: block; width: 100%; margin: 4px 0 0; padding: 0 0 4px; border: 0; border-bottom: 1.5px solid var(--ink); border-radius: 0; background: transparent;
  font: 700 30px/1.1 Caveat, "Comic Sans MS", cursive; color: #1d2c4a; outline: none; }
.gx-field input::placeholder { color: rgba(29,44,74,.38); }
.gx-field input:focus { background: rgba(29,44,74,.05); }
.gx-tick { display: flex; align-items: center; gap: 9px; cursor: pointer; font: 500 12.5px/1.25 Archivo, Arial, sans-serif; }
.gx-tick b { display: block; font: 600 10px/1.3 "IBM Plex Mono", monospace; letter-spacing: .16em; text-transform: uppercase; }
.gx-tick input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 0; border: 2px solid var(--ink); border-radius: 3px; display: grid; place-items: center; cursor: pointer; background: transparent; }
.gx-tick input:checked::after { content: "✓"; font: 700 20px/1 Caveat, cursive; color: #1d2c4a; transform: translate(1px, -2px) rotate(-6deg); }
.gx-go { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px 14px; cursor: pointer;
  background: var(--ink); color: var(--paper); border: 0; border-radius: 0; font: 600 13px/1 "IBM Plex Mono", monospace; letter-spacing: .2em; text-transform: uppercase; transition: background .2s, transform .15s, opacity .3s; }
.gx-go i { font-style: normal; font-size: 18px; letter-spacing: 0; transition: transform .2s; }
.gx-go:not(:disabled):hover i { transform: translateX(4px); }
.gx-go:not(:disabled):active { transform: translateY(1px); }
.gx-go:disabled { background: #4a4640; cursor: wait; }
.gx-go:focus-visible, .gx-tick input:focus-visible { outline: 2px solid #1d2c4a; outline-offset: 3px; }

/* ---- B · red light: the door fills the window; the words in a column on the left (above it on a phone) */
.gate[data-v="door"] { display: block; background: #0b0a09; }
.gate[data-v="door"].gd-in { background: transparent; transition: background 0s .7s; }
.gd-gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.gd-col { position: absolute; left: var(--gut); top: 50%; transform: translateY(-47%); width: min(35vw, 500px); display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
  transition: opacity .45s, transform .6s cubic-bezier(.5,0,.75,0); }
.gd-kick { color: var(--paper); margin: 0 0 1.4em; text-shadow: 0 1px 0 #000; }
.gd-titles { display: grid; margin: 0 0 .2em; font-weight: 400; }
.gd-titles > .stk { grid-area: 1 / 1; }
.gd-titles .stk .ln { font-size: max(52px, min(6.2vw, 11vh)); }
.gd-titles .gd-come .ln b { background: var(--paper); }
.gd-titles .stk:not(.on) .ln { animation: none; opacity: 0; transition: opacity .25s; }
.gd-lede { position: relative; left: auto; top: auto; max-width: 26em; transform: rotate(-.4deg); }
.gd-form { width: min(100%, 400px); display: grid; gap: 14px; padding: 16px 18px 14px; transform: rotate(.35deg); }
.gd-status { margin: 0; text-align: center; opacity: .62; min-height: 1.2em; }
.gate.ready .gd-status { opacity: .85; }
.gd-push .gd-push-go, .gate.ready .gd-push .gd-push-wait { display: none; }
.gate.ready .gd-push .gd-push-go { display: inline; }
.gate.gd-nudge .gd-form { animation: gd-nudge .45s; }
@keyframes gd-nudge { 0%, 100% { transform: rotate(.35deg); } 20% { transform: translateX(-6px) rotate(.35deg); } 45% { transform: translateX(5px) rotate(.35deg); } 70% { transform: translateX(-3px) rotate(.35deg); } }
.gate.gd-in .gd-col { opacity: 0; transform: translate(-40px, -47%); }
.gate.gd-in .gate-alt { opacity: 0; transition: opacity .3s; }
.gate.gd-portrait .gd-col { top: auto; bottom: max(64px, calc(env(safe-area-inset-bottom) + 52px)); left: var(--gut); right: var(--gut); width: auto; transform: none; gap: 10px; }
.gate.gd-portrait .gd-kick { margin-bottom: .6em; }
.gate.gd-portrait .gd-titles .stk .ln { font-size: min(15vw, 64px); }
.gate.gd-portrait .gd-lede { display: none; }
.gate.gd-portrait .gd-form { width: 100%; }
.gate.gd-portrait.gd-in .gd-col { transform: translateY(40px); }
@media (max-height: 640px) { .gd-lede { display: none; } .gd-kick { margin-bottom: .6em; } }

/* ---- C · slate: a clapperboard over the dimmed opening (black acrylic, printed rules, marker, striped sticks) */
.gate[data-v="slate"] { align-content: center; transition: background .7s ease .2s, opacity .5s ease .7s; }
.gate[data-v="slate"].cl-out { background: rgba(18,17,16,0); opacity: 0; pointer-events: none; }
.cl { position: relative; display: grid; justify-items: center; gap: 14px; width: min(600px, calc(100vw - 32px)); margin-top: -2vh; }
.cl-kick { color: var(--paper); margin: 6px 0 0; text-shadow: 0 1px 0 #000; }
.cl-board { position: relative; width: 100%; margin: 0; transform: rotate(-1.6deg); filter: drop-shadow(0 26px 34px rgba(0,0,0,.6)) drop-shadow(0 4px 6px rgba(0,0,0,.5));
  transition: transform .55s cubic-bezier(.6,0,.85,.25); }
.gate.cl-out .cl-board { transform: translateY(110vh) rotate(-16deg); }
.gate.cl-out .cl-clap, .gate.cl-out .cl-help, .gate.cl-out .cl-kick, .gate.cl-out .gate-alt { opacity: 0; transition: opacity .2s; }
.cl-sticks { position: relative; height: clamp(44px, 9.5vw, 62px); }
.cl-base, .cl-top > i { position: absolute; inset: 0; border-radius: 5px 5px 2px 2px; border: 2px solid #0b0b0a;
  background: linear-gradient(180deg, rgba(255,255,255,.12), transparent 40%, rgba(0,0,0,.25)), repeating-linear-gradient(-56deg, #f1eee6 0 28px, #131211 28px 56px); }
.cl-base { top: auto; height: 47%; border-radius: 3px 3px 0 0; }
.cl-top { position: absolute; left: 0; right: 0; bottom: 47%; height: 47%; margin-bottom: 1px; transform-origin: 16px 100%; touch-action: none; cursor: default; }
.gate.ready:not(.cl-clapped) .cl-top { cursor: grab; }
.cl-top > i { background: linear-gradient(180deg, rgba(255,255,255,.16), transparent 45%, rgba(0,0,0,.3)), repeating-linear-gradient(56deg, #f1eee6 0 28px, #131211 28px 56px); box-shadow: 0 5px 8px rgba(0,0,0,.45); }
.cl-top.spring { transition: transform .65s cubic-bezier(.3,1.7,.45,1); }
.cl-top.snap { transition: transform .06s cubic-bezier(.7,0,1,1); }
.cl-pin { position: absolute; left: 6px; bottom: calc(47% - 11px); width: 22px; height: 22px; border-radius: 50%; z-index: 2;
  background: radial-gradient(circle at 35% 32%, #fbfaf6, #a9a59d 45%, #4a4741 80%); box-shadow: 0 1px 2px rgba(0,0,0,.6); }
.cl-face { position: relative; display: grid; padding: 6px 16px 10px; color: #f3f0e8; border: 2px solid #0b0b0a; border-top: 0; border-radius: 0 0 9px 9px;
  background: linear-gradient(118deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.07) 46%, rgba(255,255,255,0) 60%),
    repeating-linear-gradient(8deg, rgba(255,255,255,.018) 0 1px, transparent 1px 9px), radial-gradient(130% 100% at 30% 0%, #262422, #121110 70%); }
.cl-face::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); }
.gate.cl-clapped .cl-face { animation: cl-flash .25s; }
@keyframes cl-flash { 0% { filter: brightness(1.9); } 100% { filter: none; } }
.cl-row { display: grid; border-bottom: 2px solid rgba(243,240,232,.82); padding: 9px 2px 8px; }
.cl-k { display: block; font: 600 10px/1 "IBM Plex Mono", monospace; letter-spacing: .18em; text-transform: uppercase; color: rgba(243,240,232,.78); }
.cl-prod { grid-template-columns: auto 1fr; align-items: end; gap: 14px; }
.cl-name { width: 100%; min-width: 0; padding: 0 0 2px; border: 0; background: transparent; outline: none; color: #f6f3ea;
  font: 700 clamp(30px, 6.4vw, 44px)/1.05 Caveat, "Comic Sans MS", cursive; text-shadow: 0 0 1px rgba(255,255,255,.5); }
.cl-name::placeholder { color: rgba(243,240,232,.3); }
.cl-name:focus { background: rgba(255,255,255,.04); }
.cl-nums { grid-template-columns: 1.25fr 1fr 1fr; padding: 0; }
.cl-nums > div { padding: 8px 10px 6px; }
.cl-nums > div + div { border-left: 2px solid rgba(243,240,232,.82); }
.cl-nums b { display: block; margin-top: 6px; font: 400 clamp(42px, 9vw, 66px)/.95 Anton, Impact, sans-serif; color: #f6f3ea; text-align: center; letter-spacing: .01em; }
.cl-crew { grid-template-columns: 1fr 1fr; padding: 0; }
.cl-crew > div, .cl-meta > * { padding: 8px 10px 6px; }
.cl-crew > div + div { border-left: 2px solid rgba(243,240,232,.82); }
.cl-crew em, .cl-meta em { display: block; margin-top: 3px; font: 700 clamp(22px, 4.6vw, 28px)/1.1 Caveat, cursive; font-style: normal; color: #f6f3ea; }
.cl-meta { grid-template-columns: auto auto 1fr; padding: 0; border-bottom: 0; align-items: center; }
.cl-meta > * + * { border-left: 2px solid rgba(243,240,232,.82); align-self: stretch; }
.cl-boxes { display: grid; grid-template-columns: auto auto; gap: 6px 8px; align-content: center; }
.cl-boxes i { width: 15px; height: 15px; border: 1.5px solid rgba(243,240,232,.8); position: relative; }
.cl-boxes i.x::before, .cl-boxes i.x::after { content: ""; position: absolute; left: -3px; right: -3px; top: 50%; height: 2.5px; background: #f6f3ea; border-radius: 2px; transform: rotate(40deg); }
.cl-boxes i.x::after { transform: rotate(-48deg); }
.cl-snd { margin: 0; border: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.cl-snd legend { float: left; margin-right: 6px; padding: 0; }
.cl-snd label { position: relative; cursor: pointer; }
.cl-snd input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cl-snd span { display: inline-block; padding: 3px 8px 1px; font: 400 clamp(20px, 3.8vw, 24px)/1 Anton, Impact, sans-serif; letter-spacing: .04em; color: rgba(243,240,232,.55); text-transform: uppercase; }
.cl-snd input:checked + span { color: #f6f3ea; }
/* the marker ring round the choice */
.cl-snd input:checked + span::after { content: ""; position: absolute; inset: -5px -8px -3px -6px; border: 2.5px solid #f6f3ea; border-radius: 50% 46% 52% 44%; transform: rotate(-4deg); opacity: .95; }
.cl-snd input:focus-visible + span { outline: 2px solid var(--tape); outline-offset: 4px; }
.cl-foot { display: flex; justify-content: space-between; gap: 12px; padding: 8px 2px 0; border-top: 2px solid rgba(243,240,232,.82); }
.cl-co { font: 400 17px/1 Anton, Impact, sans-serif; text-transform: uppercase; letter-spacing: .02em; }
.cl-status { font: 600 10px/1.6 "IBM Plex Mono", monospace; letter-spacing: .14em; text-transform: uppercase; opacity: .78; text-align: right; }
.cl-clap { width: min(420px, 100%); margin-top: 8px; }
.cl-clap .cl-go, .gate.ready .cl-clap .cl-wait { display: none; }
.gate.ready .cl-clap .cl-go { display: inline; }
.cl-help { margin: 0; color: var(--paper); opacity: .66; text-align: center; }
.cl-board.cl-nudge { animation: cl-nudge .4s; }
@keyframes cl-nudge { 0%, 100% { transform: rotate(-1.6deg); } 30% { transform: rotate(-2.4deg) translateY(-4px); } 60% { transform: rotate(-1deg); } }
@media (max-height: 760px) { .cl-nums b { font-size: clamp(36px, 7vh, 52px); } .cl-row { padding-top: 6px; padding-bottom: 5px; } }
@media (max-width: 480px) { .cl-meta { grid-template-columns: auto 1fr; } .cl-meta .cl-snd { grid-column: 1 / -1; border-left: 0; border-top: 2px solid rgba(243,240,232,.82); } }

/* ---- D · signal: my monitor in the dark fills the window; the question under it */
.gate[data-v="signal"] { display: block; background: #070707; }
.gate[data-v="signal"].sg-in { background: transparent; transition: background 0s .6s; }
.sg-gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: text; }
.sg-ui { position: absolute; left: 50%; bottom: max(62px, calc(env(safe-area-inset-bottom) + 50px)); transform: translateX(-50%) rotate(-.3deg); width: min(620px, calc(100vw - 32px));
  display: grid; gap: 10px; margin: 0; transition: opacity .4s, transform .5s; }
.sg-kick { margin: 0; color: var(--paper); text-align: center; text-shadow: 0 1px 0 #000; }
.sg-field { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 14px; padding: 12px 18px 12px; background: var(--sheet); color: var(--ink); border: 2px solid var(--ink); box-shadow: 5px 5px 0 rgba(0,0,0,.55); }
.sg-q { font: 400 clamp(22px, 2.2vw, 30px)/1 Anton, Impact, sans-serif; text-transform: uppercase; white-space: nowrap; }
.sg-name { min-width: 0; width: 100%; padding: 0 0 3px; border: 0; border-bottom: 1.5px solid var(--ink); background: transparent; outline: none; border-radius: 0;
  font: 700 30px/1.05 Caveat, "Comic Sans MS", cursive; color: #1d2c4a; }
.sg-name::placeholder { color: rgba(29,44,74,.38); }
.sg-row { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; }
.sg-snd { color: var(--paper); }
.sg-snd input { border-color: var(--paper); }
.sg-snd input:checked::after { color: var(--paper); }
.sg-go { width: auto; min-width: 230px; background: var(--paper); color: var(--ink); }
.sg-go:disabled { background: #57534c; color: #d9d4c8; }
.sg-go .sg-in, .gate.ready .sg-go .sg-wait { display: none; }
.gate.ready .sg-go .sg-in { display: inline; }
.sg-status { margin: 0; color: var(--paper); opacity: .66; text-align: center; min-height: 1.2em; }
.gate.sg-in .sg-ui { opacity: 0; transform: translate(-50%, 30px); }
.gate.sg-in .gate-alt { opacity: 0; transition: opacity .3s; }
@media (max-width: 560px) { .sg-row { grid-template-columns: 1fr; } .sg-go { min-width: 0; width: 100%; } .sg-field { grid-template-columns: 1fr; gap: 6px; } }
