/* THE SITES' ONE STYLESHEET (SITE1). Both sites load it; a game's own site
   adds its look on top (`game-stopthedrop.css`) by redefining tokens.
   Layout: one centred column (~42rem of text), a quiet header and footer,
   16 px side gutter at every width. System fonts only: nothing is loaded
   from anywhere, and every platform gets its own native face. */

:root {
  /* Ink on a cool paper, one night-blue accent (the studio "dreams"). */
  --bg: #f6f7f9;
  --surface: #ffffff;
  --fg: #1b1d24;
  --muted: #5a5e6c;
  --line: #dfe1e8;
  --accent: #3b4cb0;
  --accent-ink: #f6f7f9;
  --mark: #fff0a8;
  --mark-ink: #4a3b00;

  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: var(--font-body);
  --font-hand: var(--font-body);

  /* Type scale: 1.2 steps from 1rem. */
  --step-0: 1rem;
  --step-1: 1.2rem;
  --step-2: 1.44rem;
  --step-3: 1.95rem;
  --step-4: 2.6rem;

  --gutter: 16px;
  --measure: 42rem;
  --radius: 10px;

  /* Safe areas, defined once (CLAUDE.md rule 10's shape). */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #121319;
    --surface: #1b1d26;
    --fg: #e8e9ef;
    --muted: #a0a4b3;
    --line: #2c2f3b;
    --accent: #9eaaf7;
    --accent-ink: #121319;
    --mark: #4a3f10;
    --mark-ink: #ffeaa0;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #121319;
  --surface: #1b1d26;
  --fg: #e8e9ef;
  --muted: #a0a4b3;
  --line: #2c2f3b;
  --accent: #9eaaf7;
  --accent-ink: #121319;
  --mark: #4a3f10;
  --mark-ink: #ffeaa0;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-wrap: break-word;
}

.wrap {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: calc(var(--gutter) + var(--safe-left));
  padding-right: calc(var(--gutter) + var(--safe-right));
}

main {
  flex: 1;
  padding-block: 2.5rem 4rem;
}

img {
  max-width: 100%;
  height: auto;
}

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

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus {
  left: calc(var(--gutter) + var(--safe-left));
  top: calc(0.5rem + var(--safe-top));
  background: var(--surface);
  padding: 0.4rem 0.8rem;
  z-index: 10;
}

/* --- header and footer ---------------------------------------------------- */

.site-head {
  padding-top: var(--safe-top);
  border-bottom: 1px solid var(--line);
}
.head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 0.9rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--fg);
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand svg,
.brand img {
  width: 28px;
  height: 28px;
  flex: none;
}
.site-head nav,
.foot-row nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
}
.site-head nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.site-head nav a:hover,
.site-head nav a[aria-current='page'] {
  color: var(--fg);
}

.site-foot {
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-bottom);
  color: var(--muted);
  font-size: 0.9rem;
}
.foot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1.5rem;
}
.foot-row a {
  color: var(--muted);
}

/* --- text ----------------------------------------------------------------- */

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 2.2em 0 0.6em;
}
h1 {
  font-size: var(--step-4);
  margin-top: 0;
  font-weight: 700;
}
h2 {
  font-size: var(--step-2);
  font-weight: 650;
}
h3 {
  font-size: var(--step-1);
  font-weight: 650;
}
p,
ul,
ol {
  margin: 0 0 1em;
}
ul,
ol {
  padding-left: 1.3em;
}
li + li {
  margin-top: 0.3em;
}
code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.92em;
}
.lede {
  font-size: var(--step-1);
  color: var(--muted);
  margin-bottom: 2rem;
}
.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.4rem;
}

/* The legal drafts' review markers and the draft note. */
mark.check {
  background: var(--mark);
  color: var(--mark-ink);
  padding: 0.05em 0.3em;
  border-radius: 4px;
  font-size: 0.9em;
}
.draft-note {
  border: 1px dashed var(--muted);
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.lang-switch {
  margin: -0.5rem 0 2rem;
  font-size: 0.95rem;
}

/* --- buttons -------------------------------------------------------------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.2rem 0 0;
}
.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}
.button.secondary {
  background: transparent;
  color: var(--accent);
}
.button:hover {
  filter: brightness(1.08);
}
/* Where the App Store button will be, while the app is not listed yet. */
.soon {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px dashed var(--muted);
  color: var(--muted);
  font-weight: 600;
}

/* --- the studio home: the games as cards ---------------------------------- */

.home-hero {
  padding-block: 1.5rem 1rem;
}
.games {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 3rem;
  padding: 0;
  list-style: none;
}
.game-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem;
}
.game-card + .game-card {
  margin-top: 0;
}
.game-card img {
  width: 88px;
  height: 88px;
  border-radius: 20px;
}
.game-card h3 {
  margin: 0.1rem 0 0.3rem;
}
.game-card p {
  margin: 0;
  color: var(--muted);
}
.game-card .actions {
  margin-top: 0.9rem;
}
@media (max-width: 30rem) {
  .game-card {
    grid-template-columns: minmax(0, 1fr);
  }
  .game-card img {
    width: 72px;
    height: 72px;
    border-radius: 16px;
  }
}

/* --- the contact box ------------------------------------------------------ */

.contact-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
}
.contact-box p {
  margin: 0;
}

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