/* OT HUB site: shared base for the real pages (landing, features, game, purchase, freemium, login). The p1-p5 prototypes keep proto.css. */

:root {
  --muted: rgba(255, 255, 255, .62);
  --faint: rgba(255, 255, 255, .38);
  --line: rgba(255, 255, 255, .12);
  --panel: rgba(255, 255, 255, .035);
  --live: #3ee07f;
  --gut: clamp(18px, 3.2vw, 44px);
  --bar-h: 78px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (max-width: 979px) { :root { --bar-h: 64px; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: #000; color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0; background: #000; color: #fff; overflow-x: hidden;
  font-family: Archivo, system-ui, sans-serif; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

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

/* film grain */
.grain {
  position: absolute; inset: -60px; z-index: 3; pointer-events: none; opacity: .14;
  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%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  animation: grain .9s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-28px, 14px); }
  40% { transform: translate(18px, -30px); }
  60% { transform: translate(-12px, 26px); }
  80% { transform: translate(30px, 8px); }
  100% { transform: translate(0, 0); }
}

/* small spaced capitals over a heading */
.eyebrow { margin: 0; font-size: 11px; font-weight: 600; font-stretch: 112%; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }

.btn {
  display: inline-block; padding: 16px 28px 15px; border-radius: 999px; text-decoration: none; text-align: center;
  font-size: 13px; font-weight: 700; font-stretch: 112%; letter-spacing: .14em; text-transform: uppercase;
  transition: transform .2s, background .2s, color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: #fff; color: #000; }
.btn--solid:hover { box-shadow: 0 10px 30px -10px rgba(255, 255, 255, .5); }
.btn--ghost { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .62); }
.btn--ghost:hover { background: rgba(255, 255, 255, .1); }
.btn--sm { padding: 12px 20px 11px; font-size: 11px; }
button.btn { border: 0; cursor: pointer; }
button.btn--ghost { background: none; }
.btn:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }

/* live player dot: pulses while the game has players, grey while it's offline */
.live-dot { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: pulse 2.2s infinite; }
.live-dot.is-off { background: var(--faint); animation: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(62, 224, 127, .55); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(62, 224, 127, 0); }
}

/* topbar: always on; clear over the footage, frosted glass once the page scrolls */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  height: calc(var(--bar-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(var(--gut), env(safe-area-inset-right)) 0 max(var(--gut), env(safe-area-inset-left));
  font-size: 12px; font-weight: 600; font-stretch: 112%; letter-spacing: .16em; text-transform: uppercase;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .5);
  transition: background-color .35s, box-shadow .35s, -webkit-backdrop-filter .35s, backdrop-filter .35s;
  animation: bar-in .9s var(--ease) .25s both;
}
@keyframes bar-in { from { opacity: 0; transform: translateY(-12px); } }
.bar::before { /* shade behind the bar so it reads over bright frames */
  content: ""; position: absolute; inset: 0 0 -56px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, .62), rgba(0, 0, 0, .26) 55%, transparent);
  transition: opacity .35s;
}
.bar.is-solid {
  background-color: rgba(10, 10, 10, .72); box-shadow: inset 0 -1px rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
}
.bar.is-solid::before { opacity: 0; }

.bar a { text-decoration: none; }
.bar__logo { justify-self: start; padding: 10px 0; }
.bar__logo img { display: block; width: auto; height: 28px; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .45)); transition: opacity .2s; }
.bar__logo:hover img { opacity: .78; }
.bar__links { display: flex; gap: clamp(28px, 3.2vw, 46px); }
.bar__links a, .bar__login { position: relative; padding: 10px 0; color: rgba(255, 255, 255, .74); transition: color .2s; }
.bar__links a::after, .bar__login::after { /* underline grows out from the middle */
  content: ""; position: absolute; left: 0; right: .16em; bottom: 4px; height: 1.5px; background: currentColor;
  transform: scaleX(0); transition: transform .3s var(--ease);
}
.bar__links a:hover, .bar__login:hover { color: #fff; }
.bar__links a:hover::after, .bar__login:hover::after { transform: scaleX(1); }
.bar__links a[aria-current="page"], .bar__login[aria-current="page"] { color: #fff; } /* the page you're on keeps its underline */
.bar__links a[aria-current="page"]::after, .bar__login[aria-current="page"]::after { transform: scaleX(1); }
.bar__end { justify-self: end; display: flex; align-items: center; gap: 28px; }
.bar__cta {
  padding: 11px 18px 10px 20px; border-radius: 999px; background: #fff; color: #000; font-weight: 700; text-shadow: none;
  transition: transform .2s, box-shadow .2s;
}
.bar__cta:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -8px rgba(255, 255, 255, .55); }

/* narrow screens: the links move into a full-screen menu behind a two-line button */
.bar__menu {
  display: none; position: relative; width: 44px; height: 44px; margin-right: -10px; padding: 0;
  border: 0; background: none; color: #fff; cursor: pointer;
}
.bar__menu span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease); }
.bar__menu span:first-child { top: 18px; }
.bar__menu span:last-child { top: 25px; }
.menu-open .bar__menu span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-open .bar__menu span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.menu {
  position: fixed; inset: 0; z-index: 15; display: none; place-content: center; text-align: center;
  background: rgba(0, 0, 0, .7); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  opacity: 0; visibility: hidden; transition: opacity .35s, visibility 0s .35s;
}
.menu a {
  display: block; padding: 10px 28px; text-decoration: none;
  font-size: clamp(26px, 8vw, 34px); font-weight: 800; font-stretch: 125%; letter-spacing: .02em; text-transform: uppercase;
  opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .45s var(--ease);
}
.menu-open .menu { opacity: 1; visibility: visible; transition: opacity .35s; }
.menu-open .menu a { opacity: 1; transform: none; }
.menu-open .menu a:nth-child(2) { transition-delay: .04s; }
.menu-open .menu a:nth-child(3) { transition-delay: .08s; }
.menu-open .menu a:nth-child(4) { transition-delay: .12s; }
.menu-open main { opacity: .25; transition: opacity .35s; } /* keeps bright content from glowing through the blur */
@media (max-width: 979px) {
  .bar { grid-template-columns: auto 1fr; }
  .bar__links, .bar__login { display: none; }
  .bar__end { gap: 14px; }
  .bar__menu { display: block; }
  .menu { display: grid; }
}

/* inner pages (game, purchase, freemium, login): a big title, then plain rows split by thin lines */
.page { max-width: 1180px; margin: 0 auto; padding: calc(var(--bar-h) + 56px) var(--gut) 120px; animation: page-in .8s var(--ease) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(12px); } }
.page__title {
  margin: 18px 0 0; font-size: clamp(40px, 6.4vw, 96px); font-weight: 800; font-stretch: 125%; line-height: .9;
  text-transform: uppercase; text-wrap: balance;
}
.page__lead { max-width: 32em; margin: 24px 0 0; font-size: 18px; line-height: 1.5; color: var(--muted); text-wrap: balance; }
.rows { margin-top: 56px; }
/* one row per group: its name on the left, its contents on the right */
.row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px 40px; padding: 28px 0; border-top: 1px solid var(--line); }
.row__label { margin: 5px 0 0; font-size: 12px; font-weight: 600; font-stretch: 112%; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.row__text { margin: 0; font-size: 17px; line-height: 1.5; }
.row__text a, .page__lead a { text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .4); text-underline-offset: 4px; transition: text-decoration-color .2s; }
.row__text a:hover, .page__lead a:hover { text-decoration-color: #fff; }
@media (max-width: 760px) {
  .rows { margin-top: 36px; }
  .row { grid-template-columns: 1fr; padding: 22px 0; }
}

/* forms: a label in small capitals over a bare line you type on */
.field { display: block; margin-top: 26px; }
.field__label { display: block; font-size: 11px; font-weight: 600; font-stretch: 112%; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.field__label em { margin-left: 6px; font-style: normal; letter-spacing: .06em; text-transform: none; color: var(--faint); }
.field input {
  display: block; width: 100%; margin-top: 6px; padding: 10px 0 12px; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .26);
  border-radius: 0; background: none; color: #fff; font: inherit; font-size: 18px; outline: 0; transition: border-color .2s;
}
.field input:focus { border-bottom-color: #fff; }
.field input::placeholder { color: var(--faint); }
.field input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 60px #000 inset; caret-color: #fff; }
.field__hint { display: block; margin-top: 8px; font-size: 13px; line-height: 1.45; color: var(--faint); }
/* two choices side by side (log in / register): the picked one is white and underlined, like the topbar */
.switch { display: flex; gap: 30px; }
.switch button {
  position: relative; padding: 8px 0; border: 0; background: none; cursor: pointer; color: var(--faint);
  font-size: 12px; font-weight: 600; font-stretch: 112%; letter-spacing: .2em; text-transform: uppercase; transition: color .2s;
}
.switch button::after {
  content: ""; position: absolute; left: 0; right: .2em; bottom: 0; height: 1.5px; background: currentColor;
  transform: scaleX(0); transition: transform .3s var(--ease);
}
.switch button:hover, .switch .is-on { color: #fff; }
.switch .is-on::after { transform: scaleX(1); }
/* one line of feedback under a form or a button */
.say { min-height: 1.45em; margin: 14px 0 0; font-size: 14px; line-height: 1.45; color: #ff8a8a; }
.say.is-ok { color: var(--live); }

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