/* 2048 Atlas website. The game's own night sky: gold, lilac and rose over deep blue. */

@font-face {
  font-family: "Marcellus SC";
  src: url("/fonts/MarcellusSC-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/fonts/Figtree.ttf") format("truetype");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --night: #0d1436;
  --night-deep: #060a1f;
  --gold: #f2c46d;
  --text: #eaedff;
  --muted: #a3abd6;
  --lilac: #cdb8ff;
  --rose: #ff9a8f;
  --card: rgba(12, 16, 40, 0.95);
  --line: rgba(242, 196, 109, 0.25);
  --radius: 16px;
  --title: "Marcellus SC", "Optima", Georgia, serif;
  --body: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--night-deep); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  background-color: var(--night);
  /* A few small stars, CSS only: tiles of radial dots over a deepening gradient. */
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, rgba(234, 237, 255, 0.85), transparent),
    radial-gradient(1px 1px at 90px 70px, rgba(205, 184, 255, 0.8), transparent),
    radial-gradient(1.5px 1.5px at 150px 20px, rgba(242, 196, 109, 0.8), transparent),
    radial-gradient(1px 1px at 210px 120px, rgba(234, 237, 255, 0.7), transparent),
    radial-gradient(1px 1px at 60px 160px, rgba(255, 154, 143, 0.6), transparent),
    radial-gradient(1.5px 1.5px at 260px 200px, rgba(234, 237, 255, 0.75), transparent),
    linear-gradient(180deg, var(--night) 0%, var(--night-deep) 100%);
  background-size: 300px 240px, 300px 240px, 300px 240px, 300px 240px, 300px 240px, 300px 240px, 100% 100%;
  background-repeat: repeat, repeat, repeat, repeat, repeat, repeat, no-repeat;
  background-attachment: scroll, scroll, scroll, scroll, scroll, scroll, fixed;
}

img { max-width: 100%; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--lilac); }

h1, h2, h3 { font-family: var(--title); font-weight: 400; color: var(--gold); line-height: 1.2; letter-spacing: 0.02em; }

.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  background: var(--card);
  padding: 8px 14px;
  border-radius: 12px;
  z-index: 10;
}
.skip:focus { top: 12px; }

/* header */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  max-width: 960px;
  margin: 0 auto;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  text-decoration: none;
  font-family: var(--title);
  font-size: 20px;
  letter-spacing: 0.04em;
}
.brand img { border-radius: 8px; }
.top-nav { display: flex; gap: 4px; }
.top-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 16px;
}
.top-nav a:hover { color: var(--text); }
.top-nav a[aria-current="page"] { color: var(--text); background: var(--card); border: 1px solid var(--line); }

main { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* landing */

.hero { text-align: center; padding: 40px 0 24px; }
.app-icon { border-radius: 22%; box-shadow: 0 0 60px rgba(242, 196, 109, 0.25); }
.hero h1 { font-size: clamp(40px, 8vw, 64px); margin: 20px 0 8px; }
.lead { color: var(--text); max-width: 34em; margin-inline: auto; }
.hero .lead { font-size: 21px; }

.feature-grid {
  list-style: none;
  margin: 24px 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.feature h2 { font-size: 24px; margin: 0 0 6px; }
.feature p { margin: 0; color: var(--muted); }

.closing { text-align: center; padding: 16px 0 40px; }
.store {
  display: inline-block;
  margin: 0 0 16px;
  padding: 10px 24px;
  border-radius: 999px;
}
a.store { background: var(--gold); color: var(--night-deep); text-decoration: none; font-weight: 600; }
.store.soon { color: var(--muted); border: 1px solid var(--line); font-size: 16px; }
.beta { margin: -4px 0 16px; }
.store.beta-link { font-size: 16px; }
.more { color: var(--muted); margin: 0; }

/* documents */

.doc { max-width: 720px; margin: 0 auto; padding: 24px 0 40px; }
.doc h1 { font-size: clamp(34px, 6vw, 48px); margin: 16px 0 4px; }
.doc .updated { color: var(--muted); margin: 0 0 22px; font-size: 16px; }
.doc .lead { margin: 0 0 8px; max-width: none; color: var(--lilac); }
.doc section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 16px 0;
}
.doc section h2 { font-size: 24px; margin: 0 0 10px; }
.doc section > :last-child { margin-bottom: 0; }
.doc p { margin: 0 0 12px; }
.doc ul { padding-inline-start: 22px; }
.doc li { margin: 6px 0; }
.doc strong { color: var(--rose); font-weight: 600; }

/* 404 */

.not-found { text-align: center; padding: 64px 0; }
.not-found h1 { font-size: clamp(34px, 6vw, 48px); }
.button {
  display: inline-block;
  background: var(--gold);
  color: var(--night-deep);
  text-decoration: none;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 999px;
}
.button:hover { color: var(--night-deep); background: var(--lilac); }

/* footer */

.bottom {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  border-top: 1px solid var(--line);
}
.bottom p { margin: 4px 0; }
.bottom a { color: var(--muted); }
.bottom a:hover { color: var(--gold); }
.bottom-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 12px; }
.bottom-nav a[aria-current="page"] { color: var(--text); }
.bottom-languages ul { list-style: none; display: flex; justify-content: center; gap: 16px; margin: 12px 0 0; padding: 0; }
.bottom-languages a[aria-current="true"] { color: var(--lilac); font-weight: 600; }
