/* Cross Rush page: the game's own "paper and ink" look. Warm paper with faint
   doodles, chunky ink outlines on an ink base (like the game's ink cards),
   Fredoka type, and the game's tile colors. Only /cross-rush/ uses this file. */

@font-face {
  font-family: "Fredoka";
  src: url("/assets/fonts/fredoka-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f3ecdd;
  --doodle: #e0d2b6;
  --ink: #1e1719;
  --soft: #6e6258;
  --card: #fff;
  --cream: #fff3d6;
  --pink: #ff4d8d;
  --pink-deep: #d81b66;
  --cyan: #16c7ea;
  --cyan-deep: #0388b5;
  --gold: #ffc93c;
  --gold-deep: #f59e0b;
  --violet: #5b21ff;
  --violet-2: #b536f5;
  --line: 2.5px solid var(--ink);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font: 500 18px/1.5 Fredoka, system-ui, -apple-system, sans-serif;
  background-color: var(--paper);
  /* The game's paper doodles: stars, squiggles, crosses and squares */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' fill='none' stroke='%23e0d2b6' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M36 22l2 5 5 .5-4 3.4 1.3 5.1-4.3-2.8-4.3 2.8 1.3-5.1-4-3.4 5-.5z' fill='%23e0d2b6' stroke='none'/%3E%3Cpath d='M150 40q4-6 8 0t8 0'/%3E%3Cpath d='M200 120h10M205 115v10'/%3E%3Crect x='60' y='150' width='12' height='12' rx='3' transform='rotate(20 66 156)'/%3E%3Cpath d='M182 196l2 5 5 .5-4 3.4 1.3 5.1-4.3-2.8-4.3 2.8 1.3-5.1-4-3.4 5-.5z' fill='%23e0d2b6' stroke='none'/%3E%3Cpath d='M20 110q4-6 8 0t8 0' transform='rotate(-30 28 110)'/%3E%3Cpath d='M110 210h10M115 205v10' transform='rotate(25 115 210)'/%3E%3Crect x='120' y='96' width='12' height='12' rx='3' transform='rotate(-15 126 102)'/%3E%3C/svg%3E");
  overflow-x: clip;
}
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 10px; }
img { display: block; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1; letter-spacing: -0.01em; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 10; padding: 10px 16px; border: var(--line); border-radius: 14px; background: var(--gold); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* An ink card: face, ink outline and an ink base under it, like a sticker */
.ink { border: var(--line); border-radius: 22px; background: var(--card); box-shadow: 0 5px 0 var(--ink); }

/* Header */
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 22px; text-decoration: none; }
.brand svg { width: 36px; height: 36px; }
.nav ul { display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; }
.nav a { display: block; padding: 7px 16px; border: var(--line); border-radius: 999px; background: var(--cream); text-decoration: none; font-weight: 600; font-size: 16px; white-space: nowrap; box-shadow: 0 3px 0 var(--ink); transition: transform 0.1s, box-shadow 0.1s; }
.nav a:hover, .btn:hover { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }

.crumbs { margin: 0 0 18px; padding: 0; list-style: none; display: flex; gap: 8px; font-size: 16px; font-weight: 600; color: var(--soft); }
.crumbs li + li::before { content: "/"; margin-right: 8px; }
.crumbs a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Hero */
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; padding-block: 20px 70px; }
.hero .id img { width: 88px; height: 88px; border: var(--line); border-radius: 22px; box-shadow: 0 5px 0 var(--ink); margin-bottom: 22px; }
.hero h1 { font-size: clamp(60px, 8.5vw, 116px); }
.hero .tagline { margin: 14px 0 0; font-size: clamp(28px, 3.4vw, 44px); font-weight: 600; line-height: 1.1; }
.hl { display: inline-block; padding: 0 14px 4px; border: var(--line); border-radius: 16px; background: var(--gold); box-shadow: 0 4px 0 var(--ink); transform: rotate(-2deg); }
.hero .lead { max-width: 540px; margin: 26px 0 30px; font-size: 20px; font-weight: 400; }
.side { display: inline-block; padding: 0 12px 2px; border: 2px solid var(--ink); border-radius: 999px; font-weight: 600; color: #fff; }
.side-across { background: var(--pink); }
.side-down { background: var(--cyan-deep); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.store { display: inline-flex; align-items: center; gap: 12px; height: 62px; padding: 0 22px; border: var(--line); border-radius: 18px; background: var(--ink); color: #fff; box-shadow: 0 5px 0 var(--violet); }
.store svg { width: 26px; height: 26px; fill: currentColor; }
.store small { display: block; font-size: 12px; opacity: 0.8; line-height: 1.1; }
.store strong { display: block; font-size: 21px; line-height: 1.1; font-weight: 600; }
.platforms { font-weight: 600; }

/* The board: the game's purple, tiles on it, the cow watching */
.board-wrap { position: relative; }
.board { position: relative; display: grid; place-items: center; min-height: 430px; padding: 40px 20px; border: var(--line); border-radius: 30px; background: linear-gradient(160deg, var(--violet), var(--violet-2)); box-shadow: 0 6px 0 var(--ink); }
.tiles { display: grid; grid-template-columns: repeat(5, 62px); grid-template-rows: repeat(5, 62px); gap: 8px; }
.tiles span { display: grid; place-items: center; border: var(--line); border-radius: 14px; font-size: 32px; font-weight: 700; color: #fff; background: var(--c); box-shadow: 0 5px 0 var(--d); }
.tiles .a { --c: var(--pink); --d: var(--pink-deep); grid-row: 3; }
.tiles .d { --c: var(--cyan); --d: var(--cyan-deep); grid-column: 4; }
.tiles .x { --c: var(--gold); --d: var(--gold-deep); color: var(--ink); grid-row: 3; grid-column: 4; }
.sticker { position: absolute; padding: 8px 16px; border: var(--line); border-radius: 999px; background: var(--cream); font-weight: 600; font-size: 16px; white-space: nowrap; box-shadow: 0 3px 0 var(--ink); }
.s1 { top: -18px; left: 24px; background: var(--gold); transform: rotate(-6deg); }
.s2 { top: 26px; right: -14px; background: var(--pink); color: #fff; transform: rotate(8deg); }
.cow { position: absolute; left: -46px; bottom: -14px; width: 150px; transform: rotate(-4deg); }

/* Sections */
.block { padding: 90px 0 10px; }
.title { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 36px; }
.title h2 { font-size: clamp(40px, 5.4vw, 68px); }
.title p { margin: 0; max-width: 42ch; color: var(--soft); font-weight: 400; }

/* How a race works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: 6px; padding: 24px; font-weight: 400; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 8px; border: var(--line); border-radius: 12px; background: var(--gold); box-shadow: 0 3px 0 var(--gold-deep); font-weight: 700; font-size: 21px; }
.steps strong { font-size: 23px; font-weight: 600; }
.steps .gold { padding: 0 6px; border-radius: 6px; background: var(--gold); font-weight: 600; }

/* Ways to play */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.mode { padding: 28px; font-weight: 400; }
.mode .ico { width: 56px; height: 56px; display: grid; place-items: center; margin-bottom: 18px; border: var(--line); border-radius: 16px; background: var(--c); box-shadow: 0 3px 0 var(--ink); font-size: 26px; }
.mode h3 { font-size: 28px; font-weight: 600; margin-bottom: 8px; }
.mode p { margin: 0; color: #3d3430; }
.m1 { --c: #bfefff; }
.m2 { --c: #ffe08a; }
.m3 { --c: #ffc2d9; }
.m4 { --c: #ffd2b3; }
.m5 { --c: #dccfff; }
.m6 { --c: #c7f0d4; }

/* Help and privacy */
.help { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 100px 0 70px; }
.help .ink { position: relative; padding: 34px; font-weight: 400; }
.help h2 { font-size: clamp(32px, 3.4vw, 44px); margin-bottom: 12px; }
.help p { margin: 0 0 22px; }
.help .privacy { background: var(--cream); }
.hen { position: absolute; right: 22px; top: -54px; width: 96px; }
.btn { display: inline-flex; align-items: center; height: 54px; padding: 0 24px; border: var(--line); border-radius: 999px; background: var(--gold); font-weight: 600; text-decoration: none; box-shadow: 0 4px 0 var(--ink); transition: transform 0.1s, box-shadow 0.1s; }
.btn.alt { background: var(--card); }
.help .row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Footer */
.foot { border-top: var(--line); background: var(--cream); }
.foot .wrap { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 30px; padding-block: 40px 20px; }
.foot p { margin: 12px 0 0; max-width: 30ch; font-size: 16px; font-weight: 400; color: var(--soft); }
.foot h2 { margin-bottom: 12px; font-size: 15px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.2; color: var(--soft); }
.foot ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 16px; }
.foot ul a { text-decoration: none; }
.foot ul a:hover { text-decoration: underline; }
.legal { padding-block: 0 40px; font-size: 15px; color: var(--soft); }

@media (max-width: 900px) {
  .hero .wrap, .help { grid-template-columns: 1fr; }
  .steps, .modes { grid-template-columns: 1fr 1fr; }
  .board { min-height: 0; padding: 50px 10px; }
  .cow { left: -10px; bottom: -22px; width: 110px; }
  .title { flex-direction: column; align-items: flex-start; }
  .foot .wrap { grid-template-columns: 1fr 1fr; }
  .foot .about { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .nav li:not(:last-child) { display: none; }
  .steps, .modes { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(5, 46px); grid-template-rows: repeat(5, 46px); gap: 6px; }
  .tiles span { font-size: 22px; border-radius: 11px; }
  .s2 { right: 8px; }
  .cow { width: 88px; }
  .help .ink { padding: 26px 22px; }
  .hen { width: 72px; top: -40px; }
  .block { padding-top: 64px; }
  .help { margin: 80px 0 50px; }
}
@media (prefers-reduced-motion: reduce) { .nav a, .btn { transition: none; } }

/* Inner pages (support, privacy) */
.page-head { padding: 20px 0 10px; }
.page-head .breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; font-size: 16px; font-weight: 600; color: var(--soft); }
.page-head .breadcrumb li + li::before { content: "/"; margin-right: 8px; }
.page-head .breadcrumb a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.app-id { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-weight: 600; font-size: 20px; }
.app-id img { width: 48px; height: 48px; border: var(--line); border-radius: 14px; box-shadow: 0 3px 0 var(--ink); }
.page-head h1 { font-size: clamp(42px, 6.4vw, 80px); }
.page-head .lead { max-width: 640px; margin: 18px 0 0; font-size: 20px; font-weight: 400; }
.updated { margin: 12px 0 0; font-size: 15px; color: var(--soft); }
.section-tight { padding: 36px 0 30px; }
.narrow > *, .prose > * { max-width: 820px; }
.ph { padding: 1px 6px; border-radius: 6px; background: #fff1a8; font-weight: 600; }
.section-tight h2 { margin: 0 0 18px; font-size: clamp(30px, 3.6vw, 42px); }

.faq { display: grid; gap: 14px; }
.faq details { border: var(--line); border-radius: 18px; background: var(--card); box-shadow: 0 4px 0 var(--ink); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; cursor: pointer; list-style: none; font-weight: 600; font-size: 19px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: var(--line); border-radius: 10px; background: var(--gold); font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 22px 18px; font-weight: 400; }
.faq details > div p { margin: 0 0 10px; }

.contact-band { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; margin: 30px 0 60px; padding: 30px; border: var(--line); border-radius: 22px; background: var(--cream); box-shadow: 0 5px 0 var(--ink); font-weight: 400; }
.contact-band h2 { margin: 0 0 8px; }
.contact-band p { margin: 0; max-width: 52ch; }
.contact-band .hen { right: 30px; top: -50px; width: 84px; }

.prose { font-weight: 400; }
.prose h2 { margin: 44px 0 12px; font-size: 30px; }
.prose h3 { margin: 26px 0 8px; font-size: 22px; font-weight: 600; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 6px; }
.prose a { color: var(--pink-deep); font-weight: 500; text-underline-offset: 3px; }
.toc { padding: 22px 26px; border: var(--line); border-radius: 20px; background: var(--card); box-shadow: 0 4px 0 var(--ink); }
.toc h2 { margin: 0 0 10px; font-size: 24px; }
.toc ol { margin: 0; columns: 2; column-gap: 30px; }
.toc a { color: var(--ink); }
.table-scroll { overflow-x: auto; margin: 16px 0; border: var(--line); border-radius: 16px; background: var(--card); }
.table-scroll table { width: 100%; border-collapse: collapse; font-size: 16px; }
.table-scroll th, .table-scroll td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1.5px solid #e6dccb; }
.table-scroll th { background: var(--cream); font-weight: 600; }
.table-scroll tr:last-child td { border-bottom: 0; }
@media (max-width: 560px) { .toc ol { columns: 1; } .contact-band { padding: 24px 20px; } }
