/* Razaki Games site. One small stylesheet, system fonts, no scripts. Colours come from the game (src/ui/styles.css and
   the level palettes in src/levels/index.js): pink accent, warm gold, ice-blue gem, deep navy glass. */
:root {
  color-scheme: light dark;
  --bg: #fff7f0;
  --surface: #ffffff;
  --surface-2: #fdebe0;
  --ink: #2a1236;
  --ink-dim: #5b4766;
  --line: rgba(42, 18, 54, 0.14);
  --accent: #ff7aa8;
  --accent-2: #ffc86e;
  --link: #b81e5c;
  --focus: #0e7c93;
  --on-accent: #2a1236;
  --shadow: 0 18px 40px -18px rgba(42, 18, 54, 0.38), 0 2px 8px rgba(42, 18, 54, 0.08);
  --radius: 20px;
  --font: ui-rounded, 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, 'Segoe UI Variable Display', 'Segoe UI', system-ui, Roboto, 'Helvetica Neue', Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1131;
    --surface: #171b45;
    --surface-2: #1f2456;
    --ink: #ffffff;
    --ink-dim: rgba(255, 255, 255, 0.78);
    --line: rgba(255, 255, 255, 0.16);
    --link: #ff9cc0;
    --focus: #8eeaff;
    --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7), 0 2px 8px rgba(0, 0, 0, 0.3);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
}
a {
  color: var(--link);
  text-underline-offset: 0.18em;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}
.hero :focus-visible {
  outline-color: #fff;
}
.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 10;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}
.skip:focus {
  top: 12px;
}
.wrap {
  width: min(100% - 32px, 68rem);
  margin-inline: auto;
}
.narrow {
  width: min(100% - 32px, 46rem);
  margin-inline: auto;
}
h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 {
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  font-weight: 800;
}
h2 {
  font-size: clamp(1.5rem, 4.5vw, 2.1rem);
  margin-top: 0;
}
h3 {
  font-size: 1.2rem;
}
p {
  margin: 0 0 1em;
}
ul,
ol {
  padding-left: 1.25em;
  margin: 0 0 1em;
}
li {
  margin-bottom: 0.4em;
}
.dim {
  color: var(--ink-dim);
}

/* Header and hero: the game's sunrise sky over low-poly hills. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(60% 50% at 70% 100%, rgba(255, 231, 184, 0.55), transparent 70%), linear-gradient(170deg, #1d2260 0%, #4b5fc6 34%, #b3589f 68%, #f59fa6 88%, #ffbf86 100%);
}
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  z-index: -1;
  background: #fff;
}
.hero::before {
  height: 190px;
  opacity: 0.17;
  clip-path: polygon(0 62%, 8% 48%, 17% 58%, 28% 30%, 38% 48%, 52% 16%, 66% 52%, 78% 38%, 90% 54%, 100% 44%, 100% 100%, 0 100%);
}
.hero::after {
  height: 120px;
  opacity: 0.26;
  clip-path: polygon(0 58%, 14% 36%, 28% 54%, 46% 22%, 62% 50%, 80% 30%, 100% 52%, 100% 100%, 0 100%);
}
.hero a {
  color: #fff;
}
.hero .wrap {
  display: grid;
  gap: 1.5rem;
  padding-block: 1.25rem 7.5rem;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none;
  min-height: 44px;
}
.brand svg {
  width: 30px;
  height: 30px;
}
.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav li {
  margin: 0;
}
.nav ul a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.25rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}
@media (max-width: 480px) {
  .nav ul {
    gap: 0.25rem 0.5rem; /* four links in one row down to 360 px wide */
  }
  .nav ul a {
    padding-inline: 0;
  }
}
.nav ul a:hover,
.nav ul a[aria-current='page'] {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}
.hero-copy {
  max-width: 36rem;
  text-shadow: 0 1px 18px rgba(20, 12, 60, 0.35);
}
.hero-copy h1 {
  margin-bottom: 0.3em;
}
.lede {
  font-size: clamp(1.1rem, 3.2vw, 1.35rem);
  line-height: 1.45;
}
.route {
  display: none;
}
@media (min-width: 760px) {
  .hero .wrap {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
  .nav {
    grid-column: 1 / -1;
  }
  .route {
    display: block;
    width: 190px;
    margin-bottom: -4.5rem;
    filter: drop-shadow(0 10px 18px rgba(40, 20, 90, 0.35));
  }
}

/* Buttons and the store badge. */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.5rem;
}
.btn,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.6rem 1.35rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}
.btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--on-accent);
  box-shadow: 0 10px 24px -10px rgba(255, 122, 168, 0.9);
}
.hero a.btn {
  color: var(--on-accent);
}
.btn:hover {
  filter: brightness(1.06);
}
.btn--ghost {
  background: transparent;
  color: var(--link);
  box-shadow: inset 0 0 0 2px currentColor;
}
.hero a.btn--ghost {
  color: #fff;
}
.badge {
  flex-direction: column;
  gap: 0;
  padding-block: 0.45rem;
  border: 2px dashed currentColor;
  font-weight: 600;
  line-height: 1.2;
  opacity: 0.95;
}
.badge b {
  font-size: 1.05rem;
}
.badge small {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero .badge {
  color: #fff;
}
.card .badge {
  color: var(--ink-dim);
}

/* Sections and cards. */
main section {
  padding-block: clamp(2rem, 6vw, 3.5rem);
}
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  margin-top: 1.25rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}
.card h3 {
  margin-bottom: 0.4em;
}
.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}
.game {
  display: grid;
  gap: 1.25rem;
  align-items: center;
  grid-template-columns: auto 1fr;
}
.game img {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.game + .game {
  margin-top: 1rem;
}
.game .actions {
  grid-column: 1 / -1;
  margin-top: 0;
}
@media (min-width: 640px) {
  .game {
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
  }
  .game img {
    width: 128px;
    height: 128px;
    border-radius: 28px;
  }
  .game .actions {
    grid-column: auto;
    flex-direction: column;
    align-items: stretch;
  }
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}
.chips li {
  margin: 0;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 0.9rem;
  font-weight: 700;
}

/* Game pages (Tempo Line, Sludge Sumo). */
.shots {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
}
@media (min-width: 760px) {
  .shots {
    grid-template-columns: repeat(4, 1fr);
  }
}
.shots--wide {
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .shots--wide {
    grid-template-columns: repeat(2, 1fr);
  }
}
.shots li {
  margin: 0;
}
.shots figure {
  margin: 0;
}
.shots img {
  display: block;
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--surface-2);
}
.shots figcaption {
  margin-top: 0.6rem;
  font-size: 0.92rem;
  color: var(--ink-dim);
}
/* The level list: swatch, name, description. The name column is as wide as the longest title (the rows share it through a subgrid)
   and never wraps; on phones the name sits above the description instead. */
.levels {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: 0.75rem;
}
.levels li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0.25rem 1rem;
  align-items: center;
  margin: 0;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.levels .art {
  grid-row: span 2;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--art);
}
.levels strong {
  font-size: 1.05rem;
  white-space: nowrap;
}
.levels span {
  color: var(--ink-dim);
  font-size: 0.95rem;
}
@media (min-width: 640px) {
  .levels li {
    grid-template-columns: 56px 11rem 1fr; /* where subgrid is missing: room for the longest title today */
  }
  .levels .art {
    grid-row: auto;
  }
  @supports (grid-template-columns: subgrid) {
    .levels {
      grid-template-columns: max-content max-content 1fr;
      column-gap: 1rem;
    }
    .levels li {
      grid-template-columns: subgrid;
      grid-column: 1 / -1;
    }
  }
}
.credit {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent);
  border-radius: 12px;
  overflow-wrap: anywhere;
}
.credit p {
  margin: 0;
}
.credit small {
  display: block;
  margin-top: 0.5rem;
  color: var(--ink-dim);
}

/* Prose pages (privacy, support). */
.prose h1 {
  font-size: clamp(2rem, 6vw, 3rem);
}
.prose h2 {
  margin-top: 2rem;
  font-size: 1.4rem;
}
details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 0.75rem;
}
summary {
  cursor: pointer;
  min-height: 48px;
  padding: 0.75rem 1.1rem;
  font-weight: 800;
  list-style-position: inside;
}
details > div {
  padding: 0 1.1rem 0.4rem;
}
.callout {
  padding: 1rem 1.25rem;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.mail {
  font-size: 1.15rem;
  font-weight: 800;
}

/* Footer. */
footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem 2.5rem;
  color: var(--ink-dim);
  font-size: 0.95rem;
}
footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
footer li {
  margin: 0;
}
footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
