/* reallyblack games — reallyblackgames.com
   Single committed visual world: dark, cosmic, gold. No theme switching by design.
   Zero JavaScript. Zero third-party requests. Fonts are self-hosted. */

/* ---------- fonts (self-hosted, latin + latin-ext for Černý / ÚOOÚ) ---------- */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/space-grotesk-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/space-grotesk-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- tokens ---------- */

:root {
  color-scheme: dark;

  --bg: #08070a;
  --ink: #f4f1e8;
  --muted: #9b958a;
  --gold: #e2b04a;
  --gold-bright: #f0c878;
  --line: #262218;

  --sans: "Space Grotesk", "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --shell: 960px;
  --gutter: clamp(24px, 4vw, 48px);
}

/* ---------- base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--gold-bright); }
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: var(--gold);
  color: var(--bg);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  background: var(--gold);
  color: var(--bg);
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
}
.skip:focus {
  left: 12px;
  top: 12px;
}

/* ---------- page shell ---------- */

.page {
  position: relative;
  overflow: hidden;
}

.shell {
  position: relative;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- starfield ---------- */

.stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.stars i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  background: var(--c);
  border-radius: 50%;
  animation: twinkle var(--d) ease-in-out var(--dl) infinite alternate;
}

@keyframes twinkle {
  from { opacity: 0.1; }
  to { opacity: 0.85; }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes spin-rev {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  from { transform: translateY(0); }
  to { transform: translateY(-12px); }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 48px 24px;
}

.orbits {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(760px, 96vw);
  aspect-ratio: 1;
  pointer-events: none;
}
.orbits svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.orbits .slow { animation: spin 140s linear infinite; }
.orbits .fast { animation: spin-rev 90s linear infinite; }

.hero-copy {
  position: relative;
  /* width:100% keeps the grid item from resolving to max-content and
     overflowing on narrow screens; no max-width, so the wordmark still
     sets on one line on desktop as designed. */
  width: 100%;
  max-width: 100%;
  text-align: center;
  animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.wordmark {
  margin: 0;
  font-size: clamp(3rem, 9.5vw, 6.75rem);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.wordmark span { white-space: nowrap; }
.wordmark .games { color: var(--gold); }

.lede {
  margin: 28px auto 0;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.65;
  color: var(--muted);
  max-width: 520px;
  text-wrap: pretty;
}

.cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-decoration: none;
}
.cue:hover { color: var(--gold); }

/* ---------- decorative margin geometry ---------- */

.margin-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.ring {
  position: absolute;
  right: -220px;
  top: 120vh;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(226, 176, 74, 0.14);
  border-radius: 50%;
}
.ring::after {
  content: "";
  position: absolute;
  inset: 60px;
  border: 1px solid rgba(226, 176, 74, 0.1);
  border-radius: 50%;
}
.diamond {
  position: absolute;
  left: clamp(8px, 4vw, 64px);
  top: 145vh;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(226, 176, 74, 0.5);
  transform: rotate(45deg);
  animation: float 7s ease-in-out infinite alternate;
}
.dot {
  position: absolute;
  right: clamp(16px, 6vw, 96px);
  top: 180vh;
  width: 8px;
  height: 8px;
  background: rgba(226, 176, 74, 0.55);
  border-radius: 50%;
  animation: float 9s ease-in-out 1s infinite alternate;
}
.seed {
  position: absolute;
  left: -70px;
  top: 230vh;
  width: 220px;
  height: 220px;
  opacity: 0.16;
  animation: spin 200s linear infinite;
}

/* ---------- section head ---------- */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  margin-top: 40px;
}
.overline {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--gold);
}
.stack-note {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ---------- project rows ---------- */

.project {
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: clamp(20px, 4vw, 40px);
  align-items: start;
}
.project .glyph {
  width: 88px;
  height: 88px;
}
.project .glyph.turning { animation: spin 60s linear infinite; }
.project .body {
  display: grid;
  gap: 14px;
}
.project .status {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--gold);
}
.project .name {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.project p {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 560px;
  text-wrap: pretty;
}

@media (max-width: 560px) {
  .project { grid-template-columns: 60px 1fr; }
  .project .glyph { width: 60px; height: 60px; }
}

/* ---------- about + footer ---------- */

.about {
  margin-top: 120px;
  max-width: 720px;
}
.about .overline { margin-bottom: 24px; }
.about p {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
  text-wrap: pretty;
}
.about p + p { margin-top: 32px; }

.site-foot {
  position: relative;
  max-width: var(--shell);
  margin: 120px auto 0;
  border-top: 1px solid var(--line);
  padding: 32px var(--gutter) 56px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  display: grid;
  gap: 8px;
}
.site-foot .legal {
  max-width: 680px;
  text-wrap: pretty;
}

/* ---------- scroll reveal: deliberately not implemented ----------
   A view() timeline was tried here and removed. `.page` is a clipping
   container, so the timeline resolved against it, froze, and left every
   section's opacity decided by which side of the animation range the frozen
   value happened to land on — a coin flip whose losing side blanks the whole
   page below the hero, legal footer included. Content that proves a business
   identity does not get to depend on that. The `.reveal` class is kept in the
   markup as a hook; it intentionally styles nothing. */

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

/* ---------- inner pages (privacy, 404) ---------- */

.doc {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(56px, 12vh, 120px) var(--gutter) 0;
}
.doc .home-link {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-decoration: none;
  color: var(--muted);
}
.doc .home-link:hover { color: var(--gold); }
.doc h1 {
  margin: 32px 0 8px;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.doc .updated {
  margin: 0 0 48px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.doc h2 {
  margin: 48px 0 12px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--gold);
  text-transform: uppercase;
}
.doc p,
.doc li {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--muted);
  text-wrap: pretty;
}
.doc p { margin: 0 0 16px; }
.doc ul {
  margin: 0 0 16px;
  padding-left: 1.2em;
}
.doc li { margin: 6px 0; }
.doc strong {
  color: var(--ink);
  font-weight: 500;
}

.doc-foot {
  margin-top: 96px;
  border-top: 1px solid var(--line);
  padding: 32px 0 56px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

/* ---------- 404 ---------- */

.lost {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 48px 24px;
  position: relative;
}
.lost .code {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--gold);
}
.lost h1 {
  margin: 16px 0 12px;
  font-size: clamp(2rem, 7vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.lost p {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.65;
}

/* ---------- inline code (privacy policy) ---------- */

.doc code {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--ink);
  background: rgba(226, 176, 74, 0.09);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.05em 0.35em;
}
