/* reallyblack games, reallyblackgames.com (v4, October 2026)
   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;
  --chip-line: #3a3426;
  --panel: #0d0c10;

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

  --shell: 1120px; /* content width; the gutter is added outside it, as in the design */
  --gutter: clamp(20px, 4vw, 48px);
  --pad: clamp(24px, 4vw, 44px);
}

/* ---------- 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: calc(var(--shell) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- keyframes ---------- */

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

/* ---------- starfield: two tiled gradient layers, no markup per star ---------- */

.sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.sky-far {
  background-image:
    radial-gradient(1px 1px at 23px 41px, var(--ink), transparent),
    radial-gradient(1px 1px at 151px 87px, var(--ink), transparent),
    radial-gradient(1.5px 1.5px at 260px 190px, var(--gold), transparent),
    radial-gradient(1px 1px at 88px 230px, var(--ink), transparent),
    radial-gradient(1px 1px at 330px 300px, var(--muted), transparent),
    radial-gradient(1px 1px at 199px 355px, var(--ink), transparent);
  background-size: 380px 380px;
  opacity: 0.55;
}
.sky-near {
  background-image:
    radial-gradient(1.5px 1.5px at 60px 120px, var(--ink), transparent),
    radial-gradient(2px 2px at 410px 60px, var(--gold), transparent),
    radial-gradient(1.5px 1.5px at 300px 470px, var(--ink), transparent),
    radial-gradient(1px 1px at 520px 330px, var(--gold), transparent);
  background-size: 610px 560px;
  animation: twinkle 4.5s ease-in-out infinite alternate;
}

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

.hero {
  position: relative;
  /* Shortened on the captain's request (15 Oct): the design's hero is
     92vh + 128px with the wordmark in its middle; this keeps the lower half
     of that, so the wordmark sits near the top, the orbits are cropped by the
     top edge and the first project already shows on load. */
  --hero-c: clamp(170px, 20vh, 220px); /* wordmark and orbit centre, from the top */
  --hero-c: clamp(170px, 20svh, 220px);
  min-height: calc(46vh + 64px + var(--hero-c));
  min-height: calc(46svh + 64px + var(--hero-c));
  display: grid;
  grid-template-rows: calc(2 * var(--hero-c)) 1fr;
  justify-items: center;
  padding: 0 24px;
}

.orbits {
  position: absolute;
  left: 50%;
  top: var(--hero-c);
  transform: translate(-50%, -50%);
  width: min(760px, 110vw);
  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%;
  align-self: center;
  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: 480px;
  letter-spacing: 0.01em;
  text-wrap: pretty;
}

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

.margin-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
/* sized like the design: the 1px borders sit outside the stated box */
.ring,
.ring::after,
.diamond { box-sizing: content-box; }
.ring {
  position: absolute;
  right: -240px;
  top: 110vh;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(226, 176, 74, 0.12);
  border-radius: 50%;
}
.ring::after {
  content: "";
  position: absolute;
  inset: 64px;
  border: 1px solid rgba(226, 176, 74, 0.08);
  border-radius: 50%;
}
.diamond {
  position: absolute;
  left: clamp(10px, 3vw, 48px);
  top: 205vh;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(226, 176, 74, 0.5);
  transform: rotate(45deg);
  animation: float 7s ease-in-out infinite alternate;
}
.seed {
  position: absolute;
  right: -60px;
  top: 290vh;
  width: 220px;
  height: 220px;
  opacity: 0.14;
  animation: spin 200s linear infinite;
}

/* ---------- projects ---------- */

.project { margin-top: 120px; }
.project-first { margin-top: 24px; }

.project-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
}
.project-head .index { color: var(--muted); }
.project-head .when { color: var(--gold); text-align: right; }

.panel {
  margin-top: 32px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 24px;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.copy {
  padding: var(--pad) var(--pad) 132px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.name {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.chip {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
  border: 1px solid var(--chip-line);
  border-radius: 999px;
  padding: 5px 10px;
}
.copy p {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 440px;
  text-wrap: pretty;
}

/* The key image bleeds out of the panel: masked in from the copy side and
   faded out at the bottom, where the screenshot strip overlaps it. */
.media {
  position: relative;
  min-height: 380px;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 28%),
    linear-gradient(to bottom, transparent 0%, #000 14%, #000 50%, transparent 96%);
  mask-image:
    linear-gradient(to right, transparent 0%, #000 28%),
    linear-gradient(to bottom, transparent 0%, #000 14%, #000 50%, transparent 96%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-gtd img { object-position: 50% 44%; }
.media-ufo img { object-position: 40% 50%; }
.media-drawn {
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 16%),
    linear-gradient(to bottom, #000 0%, #000 62%, transparent 98%);
  mask-image:
    linear-gradient(to right, transparent 0%, #000 16%),
    linear-gradient(to bottom, #000 0%, #000 62%, transparent 98%);
}
.media-drawn img { object-position: 50% 0%; }

/* Screenshot strip: pulled up over the panel's bottom edge; scrolls
   sideways (with snap) only when the cards don't fit. */
.strip {
  position: relative;
  margin-top: -112px;
  margin-bottom: -80px;
  padding: 16px var(--pad) 104px;
  display: flex;
  gap: clamp(16px, 2.5vw, 28px);
  align-items: flex-start;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }

.shot {
  box-sizing: content-box; /* flex-basis is the image width; the 1px gold rim sits outside it */
  margin: 0;
  scroll-snap-align: start;
  padding: 1px;
  border-radius: 22px;
  background: linear-gradient(155deg,
    rgba(240, 200, 120, 0.85) 0%,
    rgba(226, 176, 74, 0.12) 38%,
    rgba(226, 176, 74, 0.04) 62%,
    rgba(226, 176, 74, 0.55) 100%);
  box-shadow: 0 0 0 6px var(--bg), 0 40px 70px -36px rgba(226, 176, 74, 0.45);
  transition:
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.shot:hover {
  transform: translateY(-8px);
  box-shadow: 0 0 0 6px var(--bg), 0 50px 80px -34px rgba(226, 176, 74, 0.6);
}
.shot.phone { flex: 0 0 clamp(150px, 40vw, 216px); }
.shot.phone.lower { margin-top: 56px; }
.shot.wide {
  flex: 0 0 min(78vw, calc((100% - clamp(16px, 2.5vw, 28px)) / 2));
  border-radius: 16px;
}
.shot.wide.lower { margin-top: 44px; }

.frame {
  position: relative;
  border-radius: 21px;
  overflow: hidden;
  background: var(--bg);
}
.shot.wide .frame { border-radius: 15px; }
.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255, 240, 210, 0.1) 0%, rgba(255, 240, 210, 0) 30%);
  pointer-events: none;
}
.frame img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- about + contact ---------- */

.aside {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 16px 40px;
}
.about { margin-top: 140px; }
.contact { margin-top: 96px; }

.overline {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--gold);
}
.aside .overline { flex: 0 0 120px; }

.aside-body {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 600px;
}
.aside-body p {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--muted);
  text-wrap: pretty;
}
.aside-body p.strong { color: var(--ink); }

.mail {
  font-size: clamp(1.375rem, 3.5vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
  padding: 8px 0;
  overflow-wrap: anywhere;
}
.mail .at { color: var(--gold); }
.mail:hover { color: var(--gold); }
.mail:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

/* ---------- footer (outside <main>; § 435 Civil Code identification) ---------- */

.site-foot {
  margin-top: 140px;
  border-top: 1px solid var(--line);
  padding: 32px 0 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;
}
.foot-link {
  display: inline-block;
  padding: 10px 0;
}

/* ---------- scroll reveal: deliberately not implemented ----------
   A view() timeline was tried in v3 and removed. `.page` is a clipping
   container, so the timeline resolved against it, froze, and could leave
   every section below the hero invisible, legal footer included. Content
   that proves a business identity does not get to depend on that. */

@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;
}
