/* Shared styles of the support, privacy, terms and 404 pages (same tokens as the home page). */
:root {
  color-scheme: dark;
  --c-bg: #0b0b16;
  --c-bg-2: #1a1a2e;
  --c-filled: #0f3460;
  --c-passive: #2d2d4a;
  --c-orange: #ff6b35;
  --c-orange-l: #ff8a5c;
  --c-accent: #f7c59f;
  --c-text: #ffffff;
  --c-text-2: rgba(255, 255, 255, 0.78);
  --c-text-3: rgba(255, 255, 255, 0.6);
  --c-line: rgba(255, 255, 255, 0.1);
  --c-line-2: rgba(255, 255, 255, 0.18);
  --c-glass: rgba(22, 22, 42, 0.72);
  --font: "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "Cascadia Mono", Consolas, monospace;
  --radius-md: 0.9rem;
  --radius-lg: 1.4rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html {
  font-size: clamp(16px, 0.8333vw, 22px);
  background: var(--c-bg);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  line-height: 1.6;
  color: var(--c-text);
  background: radial-gradient(120% 90% at 50% 100%, var(--c-bg-2) 0%, var(--c-bg) 70%);
  -webkit-font-smoothing: antialiased;
}
h1, h2, p { margin: 0; }
a { color: inherit; }
::selection { background: var(--c-orange); color: #fff; }
:focus-visible { outline: 0.15rem solid var(--c-accent); outline-offset: 0.2rem; border-radius: 0.3rem; }

/* tilted plane of game cells, like the v2 hero floor */
.field {
  /* 200vh plane tilted 50deg under a 70vh perspective projects onto the bottom ~40% of the viewport */
  position: fixed; left: -120%; right: -120%; bottom: 0; height: 200vh; z-index: 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'168'%20height%3D'168'%3E%3Crect%20x%3D'0'%20y%3D'0'%20width%3D'34'%20height%3D'34'%20rx%3D'8'%20fill%3D'%23ff6b35'%20fill-opacity%3D'0.9'%2F%3E%3Crect%20x%3D'42'%20y%3D'0'%20width%3D'34'%20height%3D'34'%20rx%3D'8'%20fill%3D'%230f3460'%20fill-opacity%3D'1'%2F%3E%3Crect%20x%3D'84'%20y%3D'0'%20width%3D'34'%20height%3D'34'%20rx%3D'8'%20fill%3D'%232d2d4a'%20fill-opacity%3D'1'%2F%3E%3Crect%20x%3D'126'%20y%3D'0'%20width%3D'34'%20height%3D'34'%20rx%3D'8'%20fill%3D'%230f3460'%20fill-opacity%3D'1'%2F%3E%3Crect%20x%3D'0'%20y%3D'42'%20width%3D'34'%20height%3D'34'%20rx%3D'8'%20fill%3D'%232d2d4a'%20fill-opacity%3D'1'%2F%3E%3Crect%20x%3D'42'%20y%3D'42'%20width%3D'34'%20height%3D'34'%20rx%3D'8'%20fill%3D'%232d2d4a'%20fill-opacity%3D'1'%2F%3E%3Crect%20x%3D'84'%20y%3D'42'%20width%3D'34'%20height%3D'34'%20rx%3D'8'%20fill%3D'%23ff6b35'%20fill-opacity%3D'0.9'%2F%3E%3Crect%20x%3D'126'%20y%3D'42'%20width%3D'34'%20height%3D'34'%20rx%3D'8'%20fill%3D'%232d2d4a'%20fill-opacity%3D'1'%2F%3E%3Crect%20x%3D'0'%20y%3D'84'%20width%3D'34'%20height%3D'34'%20rx%3D'8'%20fill%3D'%230f3460'%20fill-opacity%3D'1'%2F%3E%3Crect%20x%3D'42'%20y%3D'84'%20width%3D'34'%20height%3D'34'%20rx%3D'8'%20fill%3D'%23ff6b35'%20fill-opacity%3D'0.9'%2F%3E%3Crect%20x%3D'84'%20y%3D'84'%20width%3D'34'%20height%3D'34'%20rx%3D'8'%20fill%3D'%230f3460'%20fill-opacity%3D'1'%2F%3E%3Crect%20x%3D'126'%20y%3D'84'%20width%3D'34'%20height%3D'34'%20rx%3D'8'%20fill%3D'%232d2d4a'%20fill-opacity%3D'1'%2F%3E%3Crect%20x%3D'0'%20y%3D'126'%20width%3D'34'%20height%3D'34'%20rx%3D'8'%20fill%3D'%232d2d4a'%20fill-opacity%3D'1'%2F%3E%3Crect%20x%3D'42'%20y%3D'126'%20width%3D'34'%20height%3D'34'%20rx%3D'8'%20fill%3D'%230f3460'%20fill-opacity%3D'1'%2F%3E%3Crect%20x%3D'84'%20y%3D'126'%20width%3D'34'%20height%3D'34'%20rx%3D'8'%20fill%3D'%232d2d4a'%20fill-opacity%3D'1'%2F%3E%3Crect%20x%3D'126'%20y%3D'126'%20width%3D'34'%20height%3D'34'%20rx%3D'8'%20fill%3D'%23ff6b35'%20fill-opacity%3D'0.9'%2F%3E%3C%2Fsvg%3E") center bottom / 9rem 9rem repeat;
  opacity: 0.75;
  transform: perspective(70vh) rotateX(50deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 60%);
  mask-image: linear-gradient(to top, #000 0%, transparent 60%);
}
.glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(90% 60% at 50% 105%, rgba(255, 107, 53, 0.22), transparent 60%),
    linear-gradient(to bottom, rgba(5, 5, 12, 0.6), transparent 30%);
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem 1.5rem;
  padding: 0.75rem clamp(1rem, 3vw, 3rem);
  background: rgba(11, 11, 22, 0.72);
  backdrop-filter: blur(1.2rem) saturate(1.4);
  -webkit-backdrop-filter: blur(1.2rem) saturate(1.4);
  border-bottom: 1px solid var(--c-line);
}
.nav__brand {
  display: flex; align-items: center; gap: 0.75rem; min-height: 2.75rem; text-decoration: none;
  font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em;
}
.nav__logo { display: block; width: 1.9rem; height: 1.9rem; border-radius: 0.45rem; }
.nav__links { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.nav__link {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1rem;
  border-radius: 99rem; text-decoration: none; font-size: 0.95rem; font-weight: 600; color: var(--c-text-2);
  white-space: nowrap; transition: color 0.2s, background 0.2s;
}
.nav__link:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.nav__link--active { color: #fff; background: rgba(255, 107, 53, 0.18); }
.seg {
  display: inline-flex; padding: 0.25rem; border-radius: 99rem;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--c-line);
}
.seg__btn {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  min-width: 3.2rem; min-height: 2.75rem; padding: 0 0.9rem; border: 0; border-radius: 99rem;
  background: transparent; font-family: var(--mono); font-size: 0.9rem; font-weight: 700; letter-spacing: 0.08em;
  color: var(--c-text-3); cursor: pointer; transition: background 0.25s, color 0.25s;
}
.seg__btn:hover { color: #fff; }
.seg__btn[aria-current="page"] { background: var(--c-orange); color: #fff; box-shadow: 0 0 1.2rem rgba(255, 107, 53, 0.45); }

/* ---------- document ---------- */
.doc {
  position: relative; z-index: 1; flex: 1;
  width: min(100% - 2rem, 50rem); margin: 0 auto; padding: clamp(2.5rem, 7vw, 6rem) 0 clamp(4rem, 9vw, 8rem);
}
.doc__title {
  font-size: clamp(2.1rem, 6vw, 4.2rem); line-height: 1.05; font-weight: 900; letter-spacing: -0.035em;
  hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word;
  background: linear-gradient(100deg, #fff 0%, #fff 55%, var(--c-accent) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-wrap: balance;
}
.doc__title::before {
  content: ""; display: block; width: 0.85rem; height: 0.85rem; margin-bottom: 1.4rem; border-radius: 0.2rem;
  background: var(--c-orange); box-shadow: 0 0 1.4rem rgba(255, 107, 53, 0.6);
}
.doc__panel {
  margin-top: 2.5rem; padding: clamp(1.4rem, 4vw, 2.6rem); border-radius: var(--radius-lg);
  background: var(--c-glass); border: 1px solid var(--c-line);
  backdrop-filter: blur(1rem); -webkit-backdrop-filter: blur(1rem);
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.35);
}
.doc__intro { font-size: 1.15rem; color: var(--c-text-2); }
.doc__heading {
  font-size: 1.25rem; line-height: 1.3; font-weight: 800; letter-spacing: -0.01em;
  hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word;
}
.doc__heading:not(:first-child) { margin-top: 2.2rem; padding-top: 2.2rem; border-top: 1px solid var(--c-line); }
.doc__text { margin-top: 0.7rem; color: var(--c-text-2); overflow-wrap: break-word; }
.mail {
  color: var(--c-orange-l); font-weight: 600; text-decoration: underline;
  text-decoration-color: rgba(255, 138, 92, 0.45); text-underline-offset: 0.2em; overflow-wrap: anywhere;
}
.mail:hover { color: #fff; text-decoration-color: var(--c-orange); }

/* ---------- support contacts ---------- */
.contacts { display: grid; gap: 1rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.contact {
  position: relative; padding: 1.3rem 1.4rem 1.3rem 3.6rem; border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--c-line);
  color: var(--c-text-2);
}
.contact::before {
  content: ""; position: absolute; left: 1.4rem; top: 1.6rem; width: 1.1rem; height: 1.1rem; border-radius: 0.25rem;
  background: var(--c-filled);
}
.contact:first-child::before { background: var(--c-orange); }
.contact__label { display: block; color: var(--c-text); font-weight: 700; }

/* ---------- footer ---------- */
.footer {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem 2rem;
  padding: 1.6rem clamp(1rem, 3vw, 3rem); border-top: 1px solid var(--c-line);
  background: rgba(8, 8, 16, 0.75); backdrop-filter: blur(1rem); -webkit-backdrop-filter: blur(1rem);
  font-size: 0.95rem; color: var(--c-text-3);
}
.footer__links { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.footer__link {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.9rem; border-radius: 0.6rem;
  text-decoration: none; color: var(--c-text-2);
}
.footer__link:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.footer__link--active { color: #fff; }
.footer__link--button { border: 0; background: none; font: inherit; cursor: pointer; }
.footer__rights { margin: 0; }

/* ---------- 404 ---------- */
.lost__block + .lost__block { margin-top: 2.2rem; padding-top: 2.2rem; border-top: 1px solid var(--c-line); }
.lost__title { font-size: 1.5rem; line-height: 1.2; font-weight: 800; }
.lost__text { margin-top: 0.6rem; color: var(--c-text-2); }
.lost__link {
  display: inline-flex; align-items: center; min-height: 2.9rem; margin-top: 1.2rem; padding: 0 1.3rem; border-radius: 0.8rem;
  text-decoration: none; font-weight: 700; color: #fff;
  background: rgba(255, 107, 53, 0.18); border: 1px solid rgba(255, 107, 53, 0.55);
}
.lost__link:hover { background: rgba(255, 107, 53, 0.3); border-color: var(--c-orange); }

@media (prefers-reduced-motion: no-preference) {
  .doc__title, .doc__panel { animation: rise 0.9s var(--ease-out) backwards; }
  .doc__panel { animation-delay: 0.12s; }
  @keyframes rise { from { opacity: 0; transform: translateY(1.5rem); } }
}
@media (max-width: 760px) {
  .nav { gap: 0.5rem 0.75rem; }
  .nav__brand { order: 1; font-size: 1.05rem; }
  .seg { order: 2; }
  .nav__menu { order: 3; flex: 1 0 100%; margin: 0 -0.5rem; }
  .nav__links { flex-wrap: wrap; }
  .nav__link { padding: 0 0.75rem; }
  .footer { justify-content: center; text-align: center; }
  .footer__links { justify-content: center; }
}

/* ---------- footer: "An Invenity game" line ---------- */
.footer__about { display: flex; flex-direction: column; gap: 0.2rem; }
.footer__made { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.1rem; }
.footer__made > span { margin-right: 0.4rem; }
.footer__made .footer__link { padding: 0 0.6rem; color: var(--c-orange-l, #ff8a5c); }
@media (max-width: 760px) {
  .footer__about { align-items: center; }
  .footer__made { justify-content: center; }
}
