/* ORB Games at orb.az.dev: the site's whole look, in the app's rust and cream.
   Served from /static/ on the channel host. */

/* Every color is a semantic token: the light values here, the dark ones under
   .dark on <html>, which the head's script sets before the first paint. A new
   color is a new token in both blocks, and its pairings join the contrast test
   (web/src/__tests__/orb-theme-contrast.test.ts). Rust is a fill, art and large
   display only, never text: it measures 3.46:1 on --o-bg. The type is
   ui-rounded where the browser has it (Safari), and the system font elsewhere;
   the site serves no font files. The layout steps wider from 720px.
   (No comments inside a token block: the contrast test reads them bare.) */
:root {
  --o-bg: #f6f0e6;
  --o-surface: #fffaf2;
  --o-sunken: #ede3d3;
  --o-ink: #1d120c;
  --o-soft: #5e3c2a;
  --o-link: #9a4520;
  --o-button: #6b4430;
  --o-button-ink: #fff6ea;
  --o-band: #6b4430;
  --o-band-ink: #fff6ea;
  --o-band-soft: #f1dcc4;
  --o-border: #e2d3be;
  --o-focus: #9a4520;
  --o-rust: #c36833;
  --o-owl: #e8bd6a;
  --o-cat: #d98f80;
  --o-glow: #ffe9b8;
  --o-rust-deep: #8e3a1f;
  --o-table: #e6d6bf;
  --o-table-edge: #d4bf9f;
  --o-right: #1f7a37;
  --o-right-ink: #fff6ea;
  --o-near: #8a5a00;
  --o-car: #c8372d;
  --o-tile-shadow: 0 2px 4px rgb(60 30 15 / 0.12), 0 24px 48px -20px rgb(110 45 20 / 0.45);
  --o-seat-shadow: 0 6px 14px -6px rgb(60 30 15 / 0.5);
  color-scheme: light;
  --o-font: ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* On screen only: a page prints light whatever the theme. */
@media screen {
  .dark {
    --o-bg: #1a120d;
    --o-surface: #251a14;
    --o-sunken: #2e2119;
    --o-ink: #fff6ea;
    --o-soft: #d8c3ac;
    --o-link: #eda26f;
    --o-button: #f1eadf;
    --o-button-ink: #1d120c;
    --o-band: #3a271d;
    --o-band-ink: #fff6ea;
    --o-band-soft: #e3cdb5;
    --o-border: #43322a;
    --o-focus: #eda26f;
    --o-rust: #c36833;
    --o-owl: #e8bd6a;
    --o-cat: #d98f80;
    --o-glow: #ffe9b8;
    --o-rust-deep: #8e3a1f;
    --o-table: #33251c;
    --o-table-edge: #4a372b;
    --o-right: #1f7a37;
    --o-right-ink: #fff6ea;
    --o-near: #e0a33a;
    --o-car: #e0574b;
    --o-tile-shadow: 0 2px 4px rgb(0 0 0 / 0.4), 0 24px 48px -20px rgb(0 0 0 / 0.7);
    --o-seat-shadow: 0 6px 14px -6px rgb(0 0 0 / 0.6);
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  font-family: var(--o-font);
  background: var(--o-bg);
  color: var(--o-ink);
  font-size: 17px;
  line-height: 1.5;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--o-link);
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--o-focus);
  outline-offset: 3px;
}

:where(h1, h2, h3, p) {
  margin: 0;
}

/* The container every row shares. */
.o-in {
  max-width: 1040px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* The mark in each theme. A page with scripting off is light, so it shows the light one. */
.only-dark {
  display: none;
}

@media screen {
  .dark .only-dark {
    display: block;
  }

  .dark .only-light {
    display: none;
  }
}

/* Header: the mark and the name, linking home. */
.o-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-block: 16px;
}

.o-top a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--o-ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.o-mark {
  width: 36px;
  height: 36px;
  border-radius: 22.5%;
}

.o-h1 {
  font-size: 42px;
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.o-lede {
  font-size: 19px;
  color: var(--o-soft);
  margin-top: 16px;
  max-width: 32ch;
}

.o-button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  border: 0;
  background: var(--o-button);
  color: var(--o-button-ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  justify-self: start;
  cursor: pointer;
}

/* Home: the hero, its App Store button, and the table with the icon's tile and the toy. */
.o-hero {
  display: grid;
  gap: 32px;
  padding-block: 12px 56px;
}

.o-store {
  margin-top: 28px;
}

.o-soon {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 14px;
  border: 2px solid var(--o-soft);
  color: var(--o-ink);
  font-weight: 700;
  font-size: 16px;
}

.o-badge {
  display: inline-block;
}

/* No display here: .only-light and .only-dark pick the theme's badge. */
.o-badge img {
  height: 52px;
  width: auto;
  vertical-align: top;
}

.o-tilebox {
  justify-self: center;
  width: min(100%, 420px);
  display: grid;
  gap: 14px;
  justify-items: center;
}

/* The table seen from above: the top, the five faces seated on its rim, and the tile in the middle. */
.o-table {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}

.o-table-top {
  position: absolute;
  inset: 9%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, var(--o-surface), var(--o-table) 70%);
  box-shadow:
    inset 0 0 0 6px var(--o-table-edge),
    var(--o-tile-shadow);
}

.o-seat {
  position: absolute;
  width: 19%;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  color: var(--o-soft);
}

.o-seat img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow:
    0 0 0 4px var(--o-bg),
    var(--o-seat-shadow);
}

.o-tile {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 41%;
  transform: translate(-50%, -50%);
  aspect-ratio: 1;
  border-radius: 22.5%;
  overflow: hidden;
  box-shadow: var(--o-tile-shadow);
}

.o-tile img {
  width: 100%;
  height: 100%;
  vertical-align: top;
}

/* A disc button over each of the icon's discs, added by the toy's script. */
.o-disc {
  position: absolute;
  width: 16%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.o-disc::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, var(--o-glow), var(--o-owl) 72%);
  box-shadow:
    0 0 0 4px var(--o-glow),
    0 0 30px 10px var(--o-owl);
  opacity: 0;
  transition: opacity 0.12s;
}

/* The shared ring is lost on the tile's rust; cream holds 3:1 on both tiles. */
.o-disc:focus-visible {
  outline-color: var(--o-glow);
}

.o-disc.lit::after {
  opacity: 1;
}

.o-disc.miss::after {
  background: var(--o-cat);
  box-shadow: 0 0 0 4px var(--o-cat);
  opacity: 1;
}

/* Read by a screen reader, never seen: the toy's lit discs, by name. */
.o-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.o-toy-line {
  font-size: 15px;
  color: var(--o-soft);
  min-height: 1.5em;
  text-align: center;
}

/* Home: the sections below the hero. */
.o-sunken {
  background: var(--o-sunken);
}

.o-section {
  padding-block: 56px;
}

.o-h2 {
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin-bottom: 24px;
}

/* Around the table: the five faces, then Pip and Shalina, then the AI line. */
.o-cast {
  display: grid;
  gap: 16px;
}

.o-person {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  background: var(--o-surface);
  border-radius: 24px;
  padding: 16px;
}

.o-person img,
.o-faces img {
  border-radius: 50%;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

.o-person h3 {
  font-size: 22px;
  font-weight: 800;
}

.o-person p {
  margin-top: 4px;
}

.o-faces-head {
  margin-top: 40px;
  display: grid;
  gap: 4px;
}

.o-faces-head h3 {
  font-size: 22px;
  font-weight: 800;
}

.o-faces-head p {
  color: var(--o-soft);
}

.o-faces {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.o-faces + .o-cast {
  margin-top: 40px;
}

.o-h2 + .o-faces-head {
  margin-top: 0;
}

/* The line under a section's heading, and the line about the AI. */
.o-sub {
  color: var(--o-soft);
  margin: -12px 0 24px;
  max-width: 60ch;
}

/* The AI line, set apart as a detail of one game. */
.o-ai {
  margin-top: 28px;
  max-width: 60ch;
  padding-left: 16px;
  border-left: 3px solid var(--o-owl);
}

.o-faces li {
  display: grid;
  gap: 6px;
  justify-items: center;
  font-size: 14px;
  font-weight: 700;
}

/* A few of the games: each card has a drawing of the game, then what it asks of you. */
.o-games {
  display: grid;
  gap: 14px;
}

.o-game {
  background: var(--o-surface);
  border: 1px solid var(--o-border);
  border-radius: 20px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.o-game-art {
  height: 150px;
  padding: 14px;
  display: grid;
  place-items: center;
  background: var(--o-sunken);
}

.o-game-art svg {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
}

.o-game-body {
  padding: 16px 18px 20px;
  display: grid;
  gap: 6px;
  align-content: start;
}

.o-asks {
  justify-self: start;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--o-soft);
  border: 1.5px solid var(--o-border);
  border-radius: 999px;
  padding: 2px 10px;
}

.o-game h3 {
  font-size: 20px;
  font-weight: 800;
  margin-top: 4px;
}

.o-game p {
  color: var(--o-soft);
}

/* Echo: the icon small, one disc lit. */
.o-mini-tile {
  position: relative;
  width: 112px;
  aspect-ratio: 1;
  border-radius: 22.5%;
  background: radial-gradient(circle at 40% 30%, var(--o-rust), var(--o-rust-deep));
  box-shadow: var(--o-seat-shadow);
}

.o-mini-tile i {
  position: absolute;
  width: 17%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 50% 35%, var(--o-button-ink), var(--o-band-soft));
}

.o-mini-tile i.on {
  background: radial-gradient(circle at 50% 38%, var(--o-glow), var(--o-owl) 72%);
  box-shadow:
    0 0 0 3px var(--o-glow),
    0 0 16px 5px var(--o-owl);
}

/* Secret Word: two guesses and the next row. */
.o-sw {
  display: grid;
  gap: 6px;
}

.o-sw div {
  display: grid;
  grid-template-columns: repeat(4, 32px);
  gap: 6px;
}

.o-sw span {
  height: 32px;
  border-radius: 8px;
  border: 2px solid var(--o-border);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 15px;
  background: var(--o-surface);
}

.o-sw .o-sw-r {
  background: var(--o-right);
  border-color: var(--o-right);
  color: var(--o-right-ink);
}

.o-sw .o-sw-n {
  border-color: var(--o-near);
  color: var(--o-near);
}

.o-sw .o-sw-x {
  background: var(--o-border);
  color: var(--o-soft);
}

.o-sw .o-sw-e {
  border-style: dashed;
}

/* Four in a Row and Traffic Jam, drawn in the site's colors. */
.o-c4-board {
  fill: var(--o-rust-deep);
}

.o-c4-hole {
  fill: var(--o-sunken);
}

.o-c4-a {
  fill: var(--o-owl);
}

.o-c4-b {
  fill: var(--o-glow);
}

.o-tj-lot {
  fill: var(--o-surface);
  stroke: var(--o-border);
  stroke-width: 2;
}

.o-tj-grid {
  stroke: var(--o-border);
  stroke-width: 1;
}

.o-tj-car,
.o-tj-exit {
  fill: var(--o-car);
}

.o-tj-exit {
  opacity: 0.35;
}

.o-tj-owl {
  fill: var(--o-owl);
}

.o-tj-cat {
  fill: var(--o-cat);
}

/* The four commitments, on the band under the hero, each after a cream disc. */
.o-promise {
  background: var(--o-band);
  color: var(--o-band-ink);
  padding-block: 32px;
}

.o-promise h2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  font-size: 21px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.o-promise span {
  display: flex;
  align-items: center;
  gap: 12px;
}

.o-promise span::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, var(--o-band-ink), var(--o-band-soft));
}

/* The 404: Pip, the line, and the way home. */
.o-lost {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 14px;
  padding-block: 48px 72px;
}

.o-lost img {
  width: 160px;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  display: block;
}

.o-lost .o-button {
  justify-self: center;
  margin-top: 8px;
}

/* The reading pages: privacy, terms and support. */
.o-read {
  max-width: 40rem;
  padding-block: 20px 64px;
}

.o-read .o-h1 {
  font-size: 38px;
}

.o-read .o-lede {
  max-width: none;
  font-size: 19px;
}

.o-read .o-date {
  font-size: 15px;
  color: var(--o-soft);
  margin-top: 8px;
}

.o-read h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 36px 0 8px;
  letter-spacing: -0.01em;
}

.o-read p + p {
  margin-top: 12px;
}

.o-read ul {
  padding-left: 1.2em;
  margin: 0;
  display: grid;
  gap: 10px;
}

/* Support: the address, and the button the page's script adds to copy it. */
.o-address {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  background: var(--o-surface);
  border: 1px solid var(--o-border);
  border-radius: 20px;
  padding: 20px;
  margin: 28px 0;
}

.o-address strong {
  font-size: 24px;
  font-weight: 800;
  overflow-wrap: anywhere;
  user-select: all;
}

.o-quiet {
  background: transparent;
  color: var(--o-ink);
  border: 2px solid var(--o-soft);
  min-height: 44px;
  padding: 0 16px;
}

/* Footer: the site's links and the theme picker, then the family line. */
.o-foot {
  border-top: 1px solid var(--o-border);
  padding-block: 28px 36px;
  display: grid;
  gap: 18px;
}

.o-foot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: space-between;
}

.o-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.o-links a {
  font-weight: 700;
  color: var(--o-ink);
}

/* Who makes ORB Games, with Learn linked. */
.o-made {
  font-size: 15px;
}

/* The family line: the sister sites linked, this one in plain words. Each
   name stays on one line, so a narrow footer wraps between names. */
.o-family {
  font-size: 15px;
  color: var(--o-soft);
}

.o-family a,
.o-family [aria-current] {
  white-space: nowrap;
}

.o-family a {
  font-weight: 700;
}

.o-family [aria-current] {
  font-weight: 700;
  color: var(--o-ink);
}

/* The theme picker: System, Light, Dark. Shown by the script, which runs it. */
.o-theme {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--o-soft);
}

.o-theme[hidden] {
  display: none;
}

.o-theme button {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--o-soft);
  background: transparent;
  color: var(--o-ink);
  cursor: pointer;
}

.o-theme button[aria-pressed="true"] {
  background: var(--o-ink);
  color: var(--o-bg);
  border-color: var(--o-ink);
}

@media (min-width: 720px) {
  .o-in {
    padding-inline: 40px;
  }

  .o-h1 {
    font-size: 66px;
  }

  .o-lede {
    font-size: 21px;
  }

  .o-hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    padding-block: 32px 72px;
    gap: 48px;
  }

  .o-tilebox {
    width: min(100%, 460px);
  }

  .o-section {
    padding-block: 80px;
  }

  .o-h2 {
    font-size: 38px;
    margin-bottom: 32px;
  }

  .o-cast {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .o-person {
    grid-template-columns: 132px minmax(0, 1fr);
    padding: 20px;
    gap: 22px;
  }

  .o-faces {
    gap: 24px;
    max-width: 760px;
  }

  .o-faces li {
    font-size: 16px;
  }

  .o-games {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .o-promise {
    padding-block: 40px;
  }

  .o-promise h2 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    font-size: 26px;
  }



  .o-read {
    padding-block: 40px 96px;
  }

  .o-read .o-h1 {
    font-size: 52px;
  }
}

@media (min-width: 960px) {
  .o-games {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .o-disc::after {
    transition: none;
  }
}

@media print {
  .o-theme,
  .o-disc,
  .o-toy-line,
  .o-quiet {
    display: none;
  }
}
