@font-face { font-family: "Archivo"; src: url("/fonts/archivo-400.ttf") format("truetype"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("/fonts/archivo-600.ttf") format("truetype"); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("/fonts/archivo-700.ttf") format("truetype"); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/barlow-condensed-600.ttf") format("truetype"); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/barlow-condensed-700.ttf") format("truetype"); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/barlow-condensed-800.ttf") format("truetype"); font-style: normal; font-weight: 800; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/barlow-condensed-900.ttf") format("truetype"); font-style: normal; font-weight: 900; font-display: swap; }

:root {
  --ink: #0b0c0e;
  --ink-soft: #15181c;
  --steel: #252a30;
  --steel-light: #4a5058;
  --paper: #eee5cf;
  --paper-dark: #d7c9aa;
  --blue: #195cf6;
  --orange: #f04b17;
  --white: #fffdf5;
  --muted: #9aa0a8;
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --body: "Archivo", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--ink); color-scheme: dark; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--ink);
  color: var(--white);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  transform: translateY(-150%);
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
}

.skip-link:focus { transform: translateY(0); }

:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 4px;
}

.brand-bar {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 clamp(22px, 4vw, 72px);
  border-bottom: 1px solid #2c3036;
}

.wordmark, .library-wordmark {
  font: 800 26px/1 var(--display);
  letter-spacing: .08em;
  text-decoration: none;
}

.brand-bar__rule {
  height: 1px;
  flex: 1;
  background: #343941;
}

.privacy-mark {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #b7bcc3;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.privacy-mark svg { width: 18px; fill: var(--blue); }

.entry-grid {
  min-height: calc(100vh - 112px);
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(360px, .84fr);
}

.admission-ticket {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(52px, 8vw, 130px) clamp(30px, 8vw, 140px);
  background:
    linear-gradient(90deg, transparent 47px, rgba(11, 12, 14, .11) 48px, transparent 49px),
    repeating-linear-gradient(0deg, rgba(11, 12, 14, .028) 0 1px, transparent 1px 5px),
    var(--paper);
  color: var(--ink);
}

.admission-ticket::before,
.admission-ticket::after {
  content: "";
  position: absolute;
  z-index: 2;
  right: -10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ink);
}

.admission-ticket::before { top: 52px; }
.admission-ticket::after { bottom: 52px; }

.ticket-stamp {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--blue);
  font: 800 11px/1.05 var(--display);
  letter-spacing: .12em;
}

.ticket-stamp svg { width: 45px; fill: none; stroke: currentColor; stroke-width: 2; }

.ticket-copy { margin-top: clamp(36px, 6vw, 78px); max-width: 770px; }

.ticket-copy h1 {
  margin: 0;
  max-width: 850px;
  font: 900 clamp(58px, 7vw, 118px)/.78 var(--display);
  letter-spacing: -.035em;
  text-transform: uppercase;
}

.ticket-copy p {
  max-width: 540px;
  margin: 32px 0 0;
  color: #4d4a43;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.6;
}

.invite-form { margin-top: clamp(44px, 6vw, 78px); max-width: 650px; }

.invite-form label {
  display: block;
  margin-bottom: 10px;
  font: 800 13px/1 var(--display);
  letter-spacing: .13em;
  text-transform: uppercase;
}

.code-field {
  position: relative;
  background: var(--white);
  border: 2px solid var(--ink);
  box-shadow: 7px 7px 0 rgba(11, 12, 14, .18);
}

.code-field::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(25, 92, 246, .13);
}

.code-field input {
  width: 100%;
  height: 68px;
  padding: 0 54px 0 20px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 700 clamp(17px, 1.5vw, 22px)/1 var(--body);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.code-field:focus-within { box-shadow: 7px 7px 0 var(--blue); }
.code-field input::placeholder { color: #858177; opacity: 1; }

.unlock-button {
  width: 100%;
  min-height: 70px;
  display: grid;
  grid-template-columns: 52px 1fr 34px;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 8px 18px 8px 8px;
  border: 0;
  background: var(--orange);
  color: white;
  cursor: pointer;
  text-align: left;
  box-shadow: 7px 7px 0 rgba(11, 12, 14, .25);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.unlock-button:hover { background: #d93f0e; }
.unlock-button:active { transform: translate(4px, 4px); box-shadow: 3px 3px 0 rgba(11, 12, 14, .25); }
.unlock-button:disabled { cursor: wait; opacity: .7; }

.unlock-button__hardware {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, .45);
  background: #cc3708;
}

.unlock-button__hardware i { width: 10px; height: 10px; border-radius: 50%; background: white; }
.unlock-button__label { font: 800 23px/1 var(--display); letter-spacing: .05em; text-transform: uppercase; }
.unlock-button svg { width: 34px; fill: none; stroke: currentColor; stroke-width: 2; }

.invite-status { min-height: 24px; margin: 16px 0 0; color: #b22608; font-size: 14px; font-weight: 600; }
.invite-status.is-pending { color: #4d4a43; }

.closed-gate {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(34px, 5vw, 82px);
  background:
    radial-gradient(circle at 50% 20%, rgba(44, 49, 56, .78), transparent 45%),
    repeating-linear-gradient(90deg, transparent 0 54px, rgba(255,255,255,.015) 54px 55px),
    #101216;
}

.gate-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #9298a0;
  font: 700 11px/1 var(--body);
  letter-spacing: .15em;
  text-transform: uppercase;
  white-space: nowrap;
}

.gate-heading span { height: 1px; flex: 1; background: #343941; }

.shutter {
  position: relative;
  flex: 1;
  min-height: 480px;
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid #424851;
  border-top: 8px solid #2a2f35;
  background: #1a1d21;
  box-shadow: inset 0 0 50px #070809, 0 24px 60px rgba(0, 0, 0, .4);
}

.shutter__slats {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, #2a2e34 0 11px, #15171a 11px 14px, #444a52 14px 15px),
    linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
}

.shutter__slats::before {
  content: "PRIVATE";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
  color: rgba(255,255,255,.035);
  font: 900 118px/1 var(--display);
  letter-spacing: .12em;
}

.shutter__lock {
  position: absolute;
  z-index: 1;
  top: 48%;
  left: 50%;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 2px solid #676e77;
  border-radius: 50%;
  background: #15171a;
  box-shadow: 0 10px 30px #08090a;
}

.shutter__lock svg { width: 48px; fill: none; stroke: var(--blue); stroke-width: 3; }
.shutter__handle { position: absolute; left: 30%; right: 30%; bottom: 28px; height: 8px; background: #060707; border: 1px solid #4a5057; }

.gate-plate {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 24px;
  color: #868c94;
}

.gate-plate span { color: var(--blue); font: 900 35px/1 var(--display); }
.gate-plate small { font-size: 9px; font-weight: 700; letter-spacing: .2em; }

.entry-footer {
  position: fixed;
  z-index: 5;
  inset: auto 0 0;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 clamp(22px, 4vw, 72px);
  background: #08090a;
  color: #7f858d;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.status-light { width: 7px; height: 7px; border-radius: 50%; background: #28d47f; box-shadow: 0 0 10px #28d47f; }
.entry-footer__line { height: 1px; flex: 1; background: #292d32; }

/* Authenticated cabinet index */
.library-loading {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  color: #a8adb4;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.library-loading__mark { color: var(--blue); font: 900 70px/1 var(--display); animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .35; } }

.library-shell { min-height: 100vh; display: grid; grid-template-columns: 76px minmax(0, 1fr); }

.library-rail {
  position: sticky;
  z-index: 10;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  padding: 20px 0;
  border-right: 1px solid #2a2e34;
  background: #08090a;
}

.rail-monogram {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--blue);
  text-decoration: none;
  font: 900 25px/1 var(--display);
}

.rail-rule { width: 28px; height: 1px; margin: 7px 0; background: #333840; }

.rail-action {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  color: #80868f;
  background: transparent;
  text-decoration: none;
}

.rail-action svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.rail-action--active { background: var(--paper); color: var(--ink); }
.rail-action--button { margin-top: auto; cursor: pointer; }
.rail-action:hover { color: white; }
.rail-action--active:hover { color: var(--ink); }

.cabinet-index { min-width: 0; padding: 20px clamp(20px, 4vw, 66px) 44px; }

.library-ticket {
  height: 78px;
  display: grid;
  grid-template-columns: minmax(220px, .8fr) 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 0 24px;
  background:
    repeating-linear-gradient(0deg, rgba(11,12,14,.025) 0 1px, transparent 1px 4px),
    var(--paper);
  color: var(--ink);
}

.library-ticket > div:first-child { display: flex; align-items: baseline; gap: 15px; }
.library-ticket > div:first-child span { font: 800 10px/1 var(--body); letter-spacing: .14em; }

.ticket-barcode {
  height: 28px;
  max-width: 280px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 9px);
  opacity: .8;
}

.ticket-state { display: flex; align-items: center; gap: 16px; }
.ticket-state span { color: var(--blue); font: 800 10px/1 var(--body); letter-spacing: .12em; }
.ticket-state strong { font: 900 26px/1 var(--display); }

.selected-game {
  position: relative;
  min-height: min(66vh, 760px);
  overflow: hidden;
  background: #171a1f;
}

.selected-game > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.selected-game__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5,6,7,.92) 0%, rgba(5,6,7,.48) 46%, rgba(5,6,7,.08) 72%), linear-gradient(0deg, rgba(5,6,7,.55), transparent 40%);
}

.selected-game__copy {
  position: absolute;
  z-index: 2;
  left: clamp(28px, 6vw, 92px);
  bottom: clamp(50px, 10vh, 120px);
  max-width: 610px;
}

.selected-game__copy > p:first-child {
  margin: 0 0 12px;
  color: #77a0ff;
  font: 800 12px/1 var(--body);
  letter-spacing: .18em;
  text-transform: uppercase;
}

.selected-game__copy h1 {
  margin: 0;
  font: 900 clamp(64px, 9vw, 145px)/.76 var(--display);
  letter-spacing: -.045em;
  text-transform: uppercase;
  text-wrap: balance;
}

.selected-game__copy > p:last-child { max-width: 520px; margin: 26px 0 0; color: #d2d5da; line-height: 1.6; }

.play-button {
  position: absolute;
  z-index: 3;
  right: clamp(28px, 5vw, 80px);
  bottom: clamp(34px, 7vh, 80px);
  width: 150px;
  height: 150px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 11px;
  border-radius: 50%;
  background: var(--orange);
  color: white;
  text-decoration: none;
  box-shadow: 0 20px 55px rgba(0,0,0,.5), inset 0 0 0 9px rgba(255,255,255,.1);
  transition: transform 160ms ease, background 160ms ease;
}

.play-button:hover { transform: scale(1.05); background: #ff5a20; }
.play-button span { font: 900 28px/1 var(--display); text-transform: uppercase; }
.play-button svg { width: 27px; fill: currentColor; }

.game-index { border-top: 8px solid var(--blue); background: var(--paper); color: var(--ink); }
.game-index__track { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.game-tab {
  min-height: 112px;
  display: grid;
  grid-template-columns: 34px 74px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 0;
  border-right: 1px solid #bdb092;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.game-tab:hover, .game-tab.is-active { background: var(--white); }
.game-tab.is-active { box-shadow: inset 0 -6px 0 var(--orange); }
.game-tab__number { color: var(--blue); font: 900 18px/1 var(--display); }
.game-tab img { width: 74px; height: 74px; object-fit: cover; filter: grayscale(1); }
.game-tab.is-active img { filter: none; }
.game-tab__label { overflow: hidden; font: 900 21px/.95 var(--display); letter-spacing: .02em; text-transform: uppercase; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .entry-grid { grid-template-columns: 1fr; }
  .admission-ticket { min-height: calc(100vh - 72px); padding-bottom: 105px; }
  .closed-gate { display: none; }
  .library-shell { grid-template-columns: 1fr; padding-bottom: 66px; }
  .library-rail { position: fixed; inset: auto 0 0; width: 100%; height: 66px; flex-direction: row; justify-content: center; padding: 9px 14px; border: 0; border-top: 1px solid #2a2e34; }
  .rail-monogram { margin-right: auto; }
  .rail-rule { display: none; }
  .rail-action--button { margin-top: 0; margin-left: auto; }
  .cabinet-index { padding: 12px 12px 28px; }
  .library-ticket { grid-template-columns: 1fr auto; gap: 12px; }
  .ticket-barcode { display: none; }
  .selected-game { min-height: 72vh; }
  .play-button { width: 112px; height: 112px; }
}

@media (max-width: 600px) {
  .brand-bar { height: 62px; padding: 0 18px; }
  .privacy-mark { font-size: 9px; letter-spacing: .09em; }
  .privacy-mark svg { display: none; }
  .admission-ticket { min-height: calc(100vh - 62px); padding: 38px 22px 90px; }
  .admission-ticket::before, .admission-ticket::after { display: none; }
  .ticket-copy { margin-top: 42px; }
  .ticket-copy h1 { font-size: clamp(53px, 17vw, 76px); }
  .ticket-copy p { margin-top: 24px; }
  .invite-form { margin-top: 38px; }
  .code-field input { height: 61px; font-size: 16px; }
  .unlock-button { min-height: 64px; grid-template-columns: 46px 1fr 28px; }
  .unlock-button__hardware { width: 46px; height: 46px; }
  .unlock-button__label { font-size: 19px; }
  .entry-footer { padding: 0 18px; }
  .library-ticket { height: 68px; padding: 0 15px; }
  .library-ticket > div:first-child { display: grid; gap: 4px; }
  .library-wordmark { font-size: 21px; }
  .ticket-state span { display: none; }
  .selected-game { min-height: calc(100vh - 164px); }
  .selected-game__shade { background: linear-gradient(0deg, rgba(5,6,7,.96) 0%, rgba(5,6,7,.28) 74%); }
  .selected-game__copy { left: 22px; right: 22px; bottom: 155px; }
  .selected-game__copy h1 { font-size: clamp(58px, 20vw, 90px); }
  .selected-game__copy > p:last-child { font-size: 14px; line-height: 1.5; }
  .play-button { left: 22px; right: auto; bottom: 24px; width: 105px; height: 105px; }
  .game-index__track { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
