/* Living Cosmos — site pages (front page, sign-in, price, legal). Sticker-book look: night sky, paper cards, thick ink outlines.
   Dials: VARIANCE 6 · MOTION 6 · DENSITY 3 */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Nunito:wght@500;700;800;900&display=swap');

:root {
  color-scheme: dark;
  --night: #121735; --night-2: #1b2250; --ink: #131836;
  --paper: #fff6df; --paper-2: #ffe9b8; --text: #f5f1ff; --soft: #b9bfe6;
  --sun: #ffc93c; --coral: #ff6b5e; --mint: #3ddbb4; --sky: #58b7ff; --grape: #b58cff;
  --display: 'Fredoka', 'Nunito', 'Arial Rounded MT Bold', 'Trebuchet MS', sans-serif;
  --body: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --edge: 3px solid var(--ink);
  --drop: 0 6px 0 var(--ink);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--text); font: 600 18px/1.55 var(--body); -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(2px 2px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(2px 2px at 72% 9%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 38% 42%, #cfd6ff 50%, transparent 51%), radial-gradient(2px 2px at 88% 55%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 22% 78%, #cfd6ff 50%, transparent 51%), radial-gradient(2px 2px at 58% 88%, #fff 50%, transparent 51%),
    radial-gradient(1200px 700px at 85% -10%, #2a3478 0%, transparent 60%),
    var(--night);
  background-size: 900px 900px, 900px 900px, 900px 900px, 900px 900px, 900px 900px, 900px 900px, auto, auto;
}
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; font-synthesis: none; line-height: 1.04; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* top bar */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 700 22px/1 var(--display); text-decoration: none; }
.logo svg { width: 38px; height: 38px; flex: none; }
.nav { display: flex; align-items: center; gap: 6px; font: 700 16px/1 var(--body); }
.nav a { text-decoration: none; padding: 12px 14px; border-radius: 999px; color: var(--soft); transition: color 0.2s ease, background-color 0.2s ease; }
.nav a:hover, .nav a:focus-visible { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.nav .me { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.nav .me img { width: 26px; height: 26px; border-radius: 50%; }

/* buttons: stickers you can press */
.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 14px 26px;
  font: 700 19px/1 var(--display); color: var(--ink); text-decoration: none; cursor: pointer;
  background: var(--sun); border: var(--edge); border-radius: 18px; box-shadow: var(--drop);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background-color 0.2s ease;
}
.btn:hover, .btn:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 0 var(--ink); background: #ffd75e; }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.btn.alt { background: var(--paper); }
.btn.alt:hover, .btn.alt:focus-visible { background: #fff; }
.btn.mint { background: var(--mint); }
.btn.mint:hover, .btn.mint:focus-visible { background: #62e8c6; }
.btn.small { min-height: 46px; padding: 10px 18px; font-size: 16px; border-radius: 14px; box-shadow: 0 4px 0 var(--ink); }
.btn[disabled] { opacity: 0.55; cursor: default; transform: none; }
.btn.wide { width: 100%; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }

/* paper card */
.card { background: var(--paper); color: var(--ink); border: var(--edge); border-radius: 26px; box-shadow: 0 8px 0 var(--ink); }
.tag { display: inline-block; padding: 6px 12px; font: 700 14px/1 var(--display); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); background: var(--mint); border: 2px solid var(--ink); border-radius: 999px; transform: rotate(-2deg); }
.note { color: var(--soft); font-size: 15px; line-height: 1.6; }
.note a { color: #dfe3ff; }
.err { min-height: 22px; margin-top: 12px; color: #ffb3aa; font-size: 15px; }
.card .err { color: #c2321f; }

/* fields */
.field { display: block; width: 100%; min-height: 56px; padding: 12px 16px; font: 700 19px/1.2 var(--body); color: var(--ink); background: #fff; border: var(--edge); border-radius: 16px; }
.field::placeholder { color: #9a9fbd; font-weight: 600; }
label.lab { display: block; margin: 0 0 8px; font: 700 15px/1.2 var(--body); color: #4b5278; }

/* footer */
.foot { margin-top: 96px; padding: 28px 0 44px; border-top: 2px dashed rgba(255, 255, 255, 0.16); display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between; color: var(--soft); font-size: 15px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot a { color: var(--soft); text-decoration: none; }
.foot a:hover, .foot a:focus-visible { color: var(--text); text-decoration: underline; }

/* legal pages */
.doc { max-width: 760px; margin: 24px auto 0; padding: 36px 34px; }
.doc h1 { font-size: clamp(34px, 6vw, 52px); margin-bottom: 8px; }
.doc h2 { font-size: 24px; margin: 30px 0 8px; }
.doc p, .doc li { font-size: 17px; line-height: 1.6; margin: 0 0 10px; }
.doc a { color: #2a4bd0; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .wrap { padding: 0 16px; }
  .nav a { padding: 10px 9px; font-size: 15px; }
  .logo span { display: none; }
  .doc { padding: 26px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Fredoka has no Cyrillic: Russian headings fall to Nunito, which wants its heaviest cut */
:lang(ru) h1, :lang(ru) h2, :lang(ru) h3, :lang(ru) .btn, :lang(ru) .logo, :lang(ru) .tag { font-weight: 900; }
