/* The subpages and the auth screens, in black glass (the black glass
 * spec, §4). The landing page is light paper, in landing.css on top of this
 * (the landing redesign, 2026-11-16).
 *
 * Every colour, size, corner and shadow is a custom property from
 * @gamesteel/design. A literal here is a value somebody guessed, and the site
 * and the editor drift apart one guess at a time. A test enforces it. */

*, *::before, *::after { box-sizing: border-box }
/* The nav's height, on one row, and wrapped onto two in a narrow window (its links under the logo and the buttons). */
:root { --nav-height: 58px; --nav-height-wrapped: 96px }
html { color-scheme: dark }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth }
}

body {
  /* The site's accent is the forge's red (the owner, 2026-10-12: "Demo and connect still have the green colors,
     instead of forge red"); the editor keeps its mint. Every rule here that names the accent takes it from these. */
  --accent: var(--forge);
  --accent-hi: var(--forge-hi);
  --accent-ink: var(--forge-ink);
  --shadow-lit: var(--shadow-forge-lit);
  --shadow-primary: var(--shadow-forge-primary);
  --glass-select-line: var(--glass-forge-line);
  --glass-select: var(--glass-forge-select);
  position: relative;
  margin: 0;
  min-height: 100vh;
  background: var(--grain), var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--size-body);
  line-height: var(--lead-body);
  -webkit-font-smoothing: antialiased;
  /* Its own block, so the nav's top margin stays inside the page: passing
     through, it moved the room's glow 16px down and left a dark strip above
     it. */
  display: flow-root;
  /* The sparks' canvas runs edge to edge at 100vw, which counts a scrollbar
     the page does not have room for. Clipping, not hiding, keeps the nav
     sticky. */
  overflow-x: clip;
}

a { color: inherit; text-decoration: none }
code { font-family: var(--mono); font-size: var(--size-small); color: var(--accent-hi) }

/* ---------- glass ---------- */

/* A see-through tint over the room, a sheen down its top, the grain that
   frosts it, and a 1px rim that catches the light at the top left. */
.nav, .button-glass, .nav-menu {
  position: relative;
  background: var(--grain), linear-gradient(180deg, var(--glass-sheen), transparent 42%), var(--glass-panel);
  box-shadow: var(--shadow-panel);
}
.nav::before, .button-glass::before, .nav-menu::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: linear-gradient(160deg, var(--glass-rim), var(--glass-rim-low) 24%, var(--glass-rim-low) 72%, var(--glass-rim-end));
  -webkit-mask: linear-gradient(currentColor 0 0) content-box, linear-gradient(currentColor 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
/* What floats over the page blurs it, live, and is the denser float: the
   page passes under the nav. */
.nav {
  background: var(--grain), linear-gradient(180deg, var(--glass-sheen), transparent 50%), var(--glass-float-over);
  -webkit-backdrop-filter: var(--blur-float);
  backdrop-filter: var(--blur-float);
}

/* ---------- shared pieces ---------- */

/* The hero's glow and sparks reach past its box; the page ends with its footer all the same. Clipping, not hiding, keeps
   the nav sticky. */
.page { width: min(1120px, calc(100% - 2 * var(--space-16))); margin: 0 auto; overflow-y: clip }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  min-height: 42px;
  padding: 0 var(--space-24);
  border: 0;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: var(--size-small);
  font-weight: var(--weight-card);
  color: var(--text);
  cursor: pointer;
  transition: filter 120ms ease-out, color 120ms ease-out;
}
.button-glass:hover { filter: brightness(1.25) }
.button-quiet { color: var(--text-2); background: transparent }
.button-quiet:hover { color: var(--text) }
.button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }


/* ---------- navigation ---------- */

.nav {
  position: sticky;
  top: var(--space-16);
  z-index: 3;
  display: flex;
  align-items: center;
  --nav-gap: var(--space-24);
  gap: var(--nav-gap);
  margin-top: var(--space-16);
  min-height: var(--nav-height);
  padding: var(--space-8) var(--space-8) var(--space-8) var(--space-24);
  border-radius: var(--radius-pill);
}
.wordmark { display: inline-flex; align-items: center; gap: var(--space-8); font-size: var(--size-card); font-weight: var(--weight-card); letter-spacing: var(--track-card) }
/* The logo (the owner, 2026-10-12): two drops of liquid steel melting into one, drawn by its own shader (studio
   tools/mark.ts), and the name beside them in polished steel, lit the same way. The gradient runs down the letters
   themselves, so the forge's orange reaches their lower edge. */
.wordmark-mark { flex: none; width: 44px; height: 28px; margin-block: calc(-1 * var(--space-4)) }
.wordmark-name { display: inline-block; line-height: 1; padding: 0.14em 0; margin: -0.1em 0 -0.02em; font-weight: 700; background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent }
/* A phone keeps the nav's first row whole, the logo, Log in and Start free: its buttons give up half their padding, and
   Log in, a word with no button round it, all but its open side's. */
@media (max-width: 420px) {
  .nav .button { padding: 0 var(--space-12) }
  .nav .button-quiet { padding-left: var(--space-4) }
  .nav-split-main { padding: 0 var(--space-8) 0 var(--space-12) }
  .nav-split-arrow { width: 32px }
}
/* The logo at the left, Log in and Sign up at the right, and the links in the very middle of the nav, whatever the
   logo's and the buttons' widths (the owner, 2026-10-12: "Center this"). */
.nav .wordmark { margin-right: auto }
/* Log in right beside Sign up (the owner, 2026-10-13: "move log in closer to sign up"): the nav's gap gives way between
   them, and Log in keeps its padding only on its open side. */
.nav .button-quiet { padding-right: var(--space-12); margin-right: calc(var(--space-8) - var(--nav-gap)) }
.nav-links { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: var(--space-24); font-size: var(--size-small); color: var(--text-2) }
.nav-links a:hover { color: var(--text) }
.nav-links a[aria-current="page"] { color: var(--text) }
/* Editor with its arrow fused on (the owner, 2026-10-25: "a fussioned arrow with the editor button to sign off"): the
   arrow opens Account and Sign out. A <details>, so it opens with JavaScript off; nav.js closes it on a click elsewhere
   and on Escape. */
/* Its menu hangs from the whole button, as wide as it (the owner, 2026-11-18: "Make this subpage the same width as the
   button in the navbar"). */
.nav-split { position: relative; display: inline-flex; align-items: stretch; min-height: 42px; border-radius: var(--radius-pill); font-size: var(--size-small); font-weight: var(--weight-card) }
.nav-split.button-glass:hover { filter: none }
.nav-split-main { display: inline-flex; align-items: center; padding: 0 var(--space-16) 0 var(--space-24); border-start-start-radius: var(--radius-pill); border-end-start-radius: var(--radius-pill); color: var(--text); transition: background-color 120ms ease-out }
.nav-split-more { display: flex }
.nav-split-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  padding-right: var(--space-4);
  list-style: none;
  cursor: pointer;
  border-left: 1px solid var(--glass-hair);
  border-start-end-radius: var(--radius-pill);
  border-end-end-radius: var(--radius-pill);
  transition: background-color 120ms ease-out;
}
.nav-split-arrow::-webkit-details-marker { display: none }
.nav-split-arrow::after { content: ''; width: 14px; height: 14px; background: var(--chevron) no-repeat center / contain; transition: transform 120ms ease-out }
.nav-split-more[open] > .nav-split-arrow::after { transform: rotate(180deg) }
.nav-split-main:hover, .nav-split-arrow:hover, .nav-split-more[open] > .nav-split-arrow { background-color: var(--glass-raised) }
.nav-split-main:focus-visible, .nav-split-arrow:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px }
/* Solid, not blurred: the nav's own blur would leave it nothing of the page to blur. */
.nav-menu {
  position: absolute;
  top: calc(100% + var(--space-12));
  right: 0;
  left: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--grain), linear-gradient(180deg, var(--glass-sheen), transparent 50%), var(--surface);
  box-shadow: var(--shadow-overlay);
}
.nav-menu form { margin: 0 }
.nav-menu-item { display: block; width: 100%; padding: var(--space-8) var(--space-12); border: 0; border-radius: var(--radius-md); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer }
.nav-menu-item:hover, .nav-menu-item:focus-visible { background: var(--glass-raised); outline: none }

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

/* The landing's hero holds its drawing in place behind its words. */
.hero { position: relative; isolation: isolate; max-width: 880px; margin: 0 auto; padding-top: var(--space-96); text-align: center }
/* The first screen is the hero's alone: its words in the middle of it, and
   the studio's picture below the fold. */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100svh - var(--space-16) - var(--nav-height));
  /* Everything in it, the AIs included, fits a laptop's first screen. */
  padding-top: var(--space-48);
  padding-bottom: var(--space-32);
}
/* White fading a little toward its foot, as light on glass does. */
.display {
  /* Its words are painted by its background, which reaches only its own box: a line shorter than the font's ascent and
     descent lost a capital's accent and the last line's tails (the text-fits check, 2026-11-16). Padding holds them,
     and the margins give the room back, so nothing round it moves. */
  padding: 0.14em 0;
  margin: calc(var(--space-24) - 0.14em) 0 -0.14em;
  font-size: var(--size-display);
  font-weight: var(--weight-display);
  letter-spacing: var(--track-display);
  line-height: var(--lead-display);
  background: linear-gradient(180deg, var(--text) 35%, color-mix(in srgb, var(--text) 68%, transparent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-wrap: balance;
  /* Review Focus 2: an unbroken word must not push the layout sideways. */
  overflow-wrap: break-word;
}
.lede {
  margin: var(--space-24) auto 0;
  max-width: 640px;
  font-size: var(--size-lede);
  font-weight: var(--weight-lede);
  letter-spacing: var(--track-lede);
  line-height: var(--lead-lede);
  color: var(--text-2);
  text-wrap: pretty;
}
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-12); margin-top: var(--space-24) }
.hero-actions .button { min-height: 50px; font-size: var(--size-body) }

/* ---------- the games ---------- */

/* The showcase games (the UI upgrade, part 2), on the Games page and, restyled light (landing.css), the landing page: each its
   picture, lit as it is pointed at, and its name and kind beneath, opening where it plays. No box round them (the
   owner hates cards, 2026-10-12). One game reads as well as three: the row centres what it has. */
.games { padding: var(--space-48) 0 0; scroll-margin-top: calc(var(--nav-height) + var(--space-32)) }
.games-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 420px)); justify-content: center; gap: var(--space-32); margin: 0; padding: 0; list-style: none }
.game { display: flex; flex-direction: column; color: var(--text) }
.game-picture { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); background: var(--bg); box-shadow: var(--shadow-panel); transition: filter 120ms ease-out, transform 160ms ease-out }
.game:hover .game-picture { filter: brightness(1.12); transform: translateY(-2px) }
.game:focus-visible { outline: none }
.game:focus-visible .game-picture { outline: 2px solid var(--accent); outline-offset: 3px }
.game-words { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-16) var(--space-4) 0; text-align: left }
.game-name { font-size: var(--size-card); font-weight: var(--weight-card); letter-spacing: var(--track-card) }
.game-kind { font-size: var(--size-small); line-height: var(--lead-small); color: var(--text-2) }
.game-play { margin-top: var(--space-4); font-size: var(--size-small); font-weight: var(--weight-card); color: var(--accent-hi) }
/* ---------- section heads ---------- */

.section-head {
  margin: 0;
  font-size: var(--size-section);
  font-weight: var(--weight-section);
  letter-spacing: var(--track-section);
  line-height: var(--lead-section);
  text-wrap: balance;
  overflow-wrap: break-word;
}
/* ---------- footer ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-24);
  padding: var(--space-32) 0 var(--space-48);
  border-top: 1px solid var(--glass-hair);
  font-size: var(--size-small);
  color: var(--text-3);
}
.foot .wordmark { color: var(--text) }
/* Six links since Pricing joined them: on a phone they wrap to a second line rather than push the page sideways. */
.foot-links { display: flex; flex-wrap: wrap; gap: var(--space-8) var(--space-24); margin-left: auto }
.foot-links a:hover { color: var(--text) }
/* The language switch (the owner, 2026-10-13): a segmented pill after the links, each language named in itself, the
   page's own raised. */
.foot-lang { display: flex; gap: var(--space-4); padding: var(--space-4); background: var(--glass-well); border: 1px solid var(--glass-hair); border-radius: var(--radius-pill) }
.foot-lang a { padding: var(--space-4) var(--space-12); border-radius: var(--radius-pill); color: var(--text-2) }
.foot-lang a:hover { color: var(--text) }
.foot-lang a[aria-current="true"] { color: var(--text); background: var(--glass-raised); box-shadow: var(--shadow-raised) }
/* The addresses to write to (the owner, 2026-10-26), a line of their own under the links: each what it is for, then
   the address. */
.foot-mail { display: flex; flex-wrap: wrap; flex-basis: 100%; gap: var(--space-8) var(--space-32); font-style: normal }
.foot-mail-item { white-space: nowrap }
.foot-mail-name { color: var(--text-3) }
.foot-mail a { color: var(--text-2) }
.foot-mail a:hover { color: var(--text) }

/* ---------- less transparency ---------- */

/* Somebody who asked their computer for less transparency gets the glass's
   solid stand-ins, and no blur. */
@media (prefers-reduced-transparency: reduce) {
  .nav, .button-glass { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none }
}

/* ---------- a narrow window ---------- */

@media (max-width: 900px) {
  .hero { padding-top: var(--space-64) }
  .display { font-size: var(--size-display-sm) }
  .section-head { font-size: var(--size-section-sm) }
  /* The row does not fit on a phone. It WRAPS inside its glass rather than
     hiding a link, because a link nobody can reach is a link that does
     nothing. */
  .nav { flex-wrap: wrap; --nav-gap: var(--space-12); padding: var(--space-8) var(--space-8) var(--space-8) var(--space-16); border-radius: var(--radius-xl) }
  .nav-links { position: static; transform: none; order: 3; width: 100%; justify-content: center; gap: var(--space-24); padding: 0 0 var(--space-4) }
  .foot-links { margin-left: 0 }
}
/* The smallest phones: the logo a little closer to Log in, so Start free still fits beside it on the nav's first row. */
@media (max-width: 380px) {
  .nav { --nav-gap: var(--space-8) }
}


@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important }
}
