/* The maintenance page (maintenance/README.md). Its own file, not inline: the page's CSP allows only 'self'. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: #0b130e;
  color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
::selection { background: rgba(16, 185, 129, .3); color: #a7f3d0; }

/* Background: the home page's screenshot, its blur and darkening baked into the file (tools/background.py) */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; user-select: none; background: #0b130e; }
.bg img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.bg::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at center, transparent 45%, rgba(5, 9, 7, .45) 100%);
}

main {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}

/* Card */
.card {
  position: relative; width: 100%; max-width: 580px;
  padding: 32px 24px; border-radius: 24px; text-align: center; overflow: hidden;
  background: rgba(10, 18, 13, .58);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid rgba(52, 211, 153, .25);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .65);
  animation: fadeIn .7s ease-out both;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 40px; right: 40px; height: 1px;
  background: linear-gradient(to right, transparent, rgba(52, 211, 153, .5), transparent);
}
.logo {
  position: relative; width: 64px; height: 64px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  animation: pulseSlow 4s ease-in-out infinite;
}
.logo::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: rgba(115, 239, 0, .12); filter: blur(24px);
}
.logo svg { position: relative; width: 56px; height: 56px; color: #73ef00; filter: drop-shadow(0 0 12px rgba(115, 239, 0, .35)); }
.brand { margin-bottom: 12px; font-size: 14px; font-weight: 800; letter-spacing: -.025em; color: rgba(255, 255, 255, .95); }
.brand span { color: #73ef00; }
#text { transition: opacity .2s; }
#text.fading { opacity: 0; }
h1 { margin: 0 0 12px; font-size: 24px; line-height: 1.18; font-weight: 800; letter-spacing: -.025em; }
#subtitle { margin: 0 auto; max-width: 28rem; font-size: 14px; line-height: 1.625; color: rgba(228, 228, 231, .9); }

/* The way to the forum's archive, open to read while the site is away */
.invite {
  margin: 24px auto 14px; padding-top: 20px; max-width: 28rem; font-size: 14px; line-height: 1.6;
  color: rgba(228, 228, 231, .85); border-top: 1px solid rgba(255, 255, 255, .08);
}
.cta {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 12px;
  border: 1px solid rgba(115, 239, 0, .45); background: rgba(115, 239, 0, .08); color: #b5f56b;
  font-size: 14px; font-weight: 600; text-decoration: none; transition: background .15s, border-color .15s;
}
.cta:hover { background: rgba(115, 239, 0, .16); border-color: rgba(115, 239, 0, .7); }
.cta:focus-visible { outline: 2px solid #73ef00; outline-offset: 3px; }
.cta svg { width: 16px; height: 16px; }

/* Language switcher */
.lang { position: fixed; top: 16px; right: 16px; z-index: 2; }
.lang-btn {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; cursor: pointer;
  background: rgba(11, 20, 15, .8); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid rgba(52, 211, 153, .25); color: #fff; font: inherit; font-size: 12px; font-weight: 600;
  letter-spacing: .025em; box-shadow: 0 10px 15px rgba(0, 0, 0, .3); transition: background .15s;
}
.lang-btn:hover { background: rgba(17, 32, 24, .9); }
.lang-btn svg.chev { width: 14px; height: 14px; color: rgba(110, 231, 183, .8); transition: transform .2s; }
.lang-btn[aria-expanded="true"] svg.chev { transform: rotate(180deg); }
.flag { display: block; width: 20px; height: 14px; border-radius: 2px; overflow: hidden; flex-shrink: 0; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.flag svg { display: block; width: 100%; height: 100%; }
.lang-list {
  position: absolute; right: 0; margin-top: 8px; width: 176px; max-height: 75vh; overflow-y: auto;
  padding: 6px; border-radius: 16px; display: grid; gap: 2px;
  background: rgba(10, 19, 14, .95); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  border: 1px solid rgba(52, 211, 153, .25); box-shadow: 0 20px 50px rgba(0, 0, 0, .75);
}
.lang-list[hidden] { display: none; }
.lang-list button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 12px;
  border: 1px solid transparent; background: none; color: #e4e4e7; font: inherit; font-size: 12px; font-weight: 500;
  text-align: left; cursor: pointer; transition: background .15s;
}
.lang-list button:hover { background: rgba(255, 255, 255, .1); }
.lang-list button[aria-selected="true"] {
  background: rgba(16, 185, 129, .2); border-color: rgba(52, 211, 153, .3); color: #6ee7b7; font-weight: 700;
}
.lang-list .name { color: #a1a1aa; font-size: 11px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (min-width: 640px) {
  main { padding: 24px; }
  .card { padding: 36px 40px; }
  .brand { font-size: 16px; }
  h1 { font-size: 36px; }
  #subtitle { font-size: 16px; }
  .invite { font-size: 15px; }
  .lang-btn { font-size: 14px; }
  .lang-list { width: 192px; }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pulseSlow { 0%, 100% { opacity: .85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .card, .logo { animation: none; } }
