/* RPX gate — two ways in: DECODE (A, lime) or DREAM (C, violet). */
:root {
  --bg: #050506;
  --fg: #e6e8e9;
  --dim: #6d7175;
  --faint: #3a3d41;
  --green: #c8ff00;
  --violet: #7770ff;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); font-family: var(--mono); -webkit-font-smoothing: antialiased; overflow: hidden; }
body { min-height: 100svh; }
#field { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.veil { position: fixed; inset: 0; background: var(--bg); opacity: 0; pointer-events: none; z-index: 20; transition: opacity .45s ease; }
.veil.on { opacity: 1; }

.top, .bottom { position: fixed; left: 0; right: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; padding: 26px clamp(20px, 4.4vw, 64px); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); pointer-events: none; }
.top { top: 0; }
.bottom { bottom: 0; padding-bottom: max(26px, env(safe-area-inset-bottom)); }
.mark { color: var(--fg); font-size: 17px; font-weight: 700; letter-spacing: .02em; display: inline-flex; align-items: flex-end; gap: 3px; }
.mark i { width: .5em; height: .09em; margin-bottom: .14em; background: var(--fg); animation: blink 1.1s steps(1, end) infinite; transition: background .4s; }
@keyframes blink { 50% { opacity: 0; } }
.tag { color: var(--fg); font-family: "JetBrains Mono", "RPX Money", ui-monospace, monospace; font-size: 12px; }
@font-face { font-family: "RPX Money"; font-weight: 100 900; font-display: swap; src: url("/gate/rpx-money.woff2") format("woff2"); }
.tag-line { display: inline-block; white-space: nowrap; }
.tw { display: inline-block; white-space: nowrap; }
.tc { display: inline-block; width: .76em; letter-spacing: 0; text-align: center; backface-visibility: hidden; }
.tc.money { color: var(--green); }
.tc.money.v { color: #a7a2ff; }
.tc.money.w { color: #fff; }
.msvg { display: inline-block; width: .55em; height: .8em; vertical-align: -.08em; fill: currentColor; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* hint: grey, with the two actions picked out */
.hold b { font-weight: 500; }
.hold b.w { color: var(--green); }
.hold b.g { color: #a7a2ff; }
.hold { display: none; }
.keys kbd { font: inherit; border: 1px solid var(--faint); border-radius: 2px; padding: 1px 5px; color: var(--fg); }

.gate { position: relative; z-index: 6; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 90px 20px; }
.gate::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 46% 40% at 50% 50%, rgba(5, 5, 6, .88), rgba(5, 5, 6, .55) 55%, rgba(5, 5, 6, 0) 100%); }
@media (max-width: 640px) { .gate::before { background: radial-gradient(ellipse 80% 42% at 50% 50%, rgba(5, 5, 6, .9), rgba(5, 5, 6, .5) 60%, rgba(5, 5, 6, 0) 100%); } }
.kicker { margin: 0 0 18px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.line { margin: 0 0 clamp(44px, 7vh, 72px); font-weight: 500; font-size: clamp(24px, 3.4vw, 46px); letter-spacing: -.02em; line-height: 1.15; min-height: 1.15em; transition: color .5s, text-shadow .5s; }

.choices { display: flex; align-items: flex-start; gap: clamp(28px, 5vw, 72px); }
.choice { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.or { align-self: center; margin-top: -30px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.sub { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); transition: color .4s; }

/* the capsule: half solid, half glass, a seam in the middle — a pill without saying pill */
.cap { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: none; --c: 200, 255, 0; position: relative; width: clamp(200px, 19vw, 250px); height: clamp(62px, 6vw, 74px); border-radius: 999px; border: 1px solid rgba(var(--c), .55); background: rgba(var(--c), .04); color: rgb(var(--c)); font: 700 clamp(14px, 1.25vw, 17px)/1 var(--mono); letter-spacing: .32em; cursor: pointer; padding: 0; overflow: hidden; isolation: isolate; transform: rotate(0deg); transition: transform .5s cubic-bezier(.2, .8, .2, 1), box-shadow .5s, border-color .5s; box-shadow: 0 0 0 rgba(var(--c), 0); -webkit-tap-highlight-color: transparent; }
.cap-dream { --c: 119, 112, 255; }
.cap-body { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(var(--c), .9) 0 50%, transparent 50% 100%); }
.cap-body::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(var(--c), .9); box-shadow: 0 0 10px rgba(var(--c), .8); }
.cap-body::after { content: ""; position: absolute; inset: 3px 12% auto 8%; height: 34%; border-radius: 999px; background: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0)); }
.cap-lab { position: absolute; inset: 0; display: grid; place-items: center; padding-left: .32em; }
.cap-lab-a { color: var(--bg); clip-path: inset(0 50% 0 0); }
.cap-lab-b { clip-path: inset(0 0 0 50%); }
.cap:hover, .cap:focus-visible, .cap.is-on { transform: rotate(-7deg) scale(1.05); border-color: rgba(var(--c), 1); box-shadow: 0 0 34px rgba(var(--c), .45), 0 0 90px rgba(var(--c), .18); outline: none; }
.cap:focus-visible { outline: 1px solid rgba(var(--c), .8); outline-offset: 6px; }
.cap:active { transform: rotate(-7deg) scale(.98); }
.cap[disabled] { cursor: default; }

body.is-decode .line { color: #f4ffd6; text-shadow: 0 0 22px rgba(200, 255, 0, .35); }
body.is-dream .line { color: #ecebff; text-shadow: 0 0 22px rgba(119, 112, 255, .5); }
body.is-decode .mark i { background: var(--green); }
body.is-dream .mark i { background: var(--violet); }
body.is-decode .choice:first-child .sub { color: var(--green); }
body.is-dream .choice:last-child .sub { color: #a7a2ff; }

.nojs { position: fixed; bottom: 80px; left: 0; right: 0; text-align: center; z-index: 9; }
.nojs a { color: var(--fg); }

@media (max-width: 640px) {
  .top, .bottom { padding: 20px; font-size: 10px; }
  .bottom { justify-content: center; }
  .keys { display: none; }
  .choices { flex-direction: column; align-items: center; gap: 22px; }
  .or { margin: -4px 0; }
  .cap { width: min(260px, 72vw); height: 64px; font-size: 15px; }
  .line { font-size: clamp(24px, 7.4vw, 32px); }
  .line span { display: block; }
}
@media (hover: none) { .keys { display: none; } .hold { display: inline; font-size: 11px; color: var(--dim); } .bottom { flex-direction: column; gap: 22px; justify-content: center; } }
@media (prefers-reduced-motion: reduce) {
  .mark i { animation: none; }
  .cap, .veil, .line { transition: none; }
}
