/* ==========================================================================
   Waterway Rumble — site styles
   One local stylesheet. No CDN, no web fonts, no trackers, nothing external.

   Palette + type treatment are lifted from the game's own UI
   (src/ui/styles.css): hot pink #ff4d9d, cyan #2fe0ff / #18b6f0, sunny
   yellow #ffe14d, deep navy ink #1a1030, and the heavy condensed
   "faked comic lettering" font stack (no network fonts are available to
   the game either, so the site matches it exactly).
   ========================================================================== */

:root {
  --ink: #1a1030;
  --ink-soft: #2b1c4a;
  --pink: #ff4d9d;
  --cyan: #2fe0ff;
  --cyan-deep: #18b6f0;
  --yellow: #ffe14d;
  --green: #7bff6b;
  --paper: #fffdf7;
  --paper-dim: #efe7f5;

  --comic-font: 'Bangers', 'Anton', 'Impact', 'Haettenschweiler', 'Arial Narrow Bold', 'Arial Black',
    system-ui, sans-serif;
  --body-font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --edge: 4px solid var(--ink);
  --pop: 6px 6px 0 var(--ink);
  --wrap: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--body-font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--paper);
  background-color: var(--ink);
  /* Halftone dots — the comic-print texture, drawn in CSS so nothing loads. */
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.07) 1.4px, transparent 1.5px),
    radial-gradient(1200px 600px at 50% -10%, rgba(47, 224, 255, 0.18), transparent 70%);
  background-size: 12px 12px, 100% 100%;
  overflow-x: hidden;
}

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

.wrap {
  width: min(var(--wrap), 100% - 2rem);
  margin-inline: auto;
}

/* Skip link — keyboard users first stop. */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--yellow);
  color: var(--ink);
  padding: 10px 16px;
  font-weight: 700;
  z-index: 50;
}
.skip:focus {
  left: 8px;
  top: 8px;
}

a {
  color: var(--cyan);
}
a:hover {
  color: var(--yellow);
}
:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

/* ---------- Comic lettering ---------- */
.comic {
  font-family: var(--comic-font);
  font-weight: 900;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  line-height: 0.95;
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
}

/* ---------- Site header ---------- */
.site-head {
  border-bottom: var(--edge);
  background: var(--ink);
}
.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand img {
  width: 38px;
  height: 38px;
  border: 3px solid var(--ink);
  border-radius: 10px;
  background: var(--paper);
}
.brand span {
  font-family: var(--comic-font);
  font-size: 22px;
  color: var(--pink);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 2px 2px 0 var(--cyan-deep);
  letter-spacing: 0.02em;
}
.site-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.site-nav a {
  font-family: var(--comic-font);
  font-size: 17px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: var(--cyan);
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: 5px 14px;
  box-shadow: 3px 3px 0 var(--ink);
}
.site-nav a:hover,
.site-nav a[aria-current='page'] {
  background: var(--yellow);
  color: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(28px, 6vw, 72px) 0 clamp(32px, 6vw, 76px);
  overflow: hidden;
}
/* Comic sunburst behind the hero — pure CSS, decorative only. */
.hero::before {
  content: '';
  position: absolute;
  inset: -30% -40% auto -40%;
  height: 160%;
  background: repeating-conic-gradient(
    from 0deg at 50% 30%,
    rgba(255, 255, 255, 0.055) 0deg 3deg,
    transparent 3deg 9deg
  );
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  display: grid;
  gap: clamp(24px, 4vw, 48px);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 880px) {
  .hero .wrap {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.hero-title {
  margin: 0 0 10px;
  font-family: var(--comic-font);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(44px, 11vw, 96px);
  line-height: 0.86;
  color: var(--pink);
  -webkit-text-stroke: 4px var(--ink);
  paint-order: stroke fill;
  transform: skewX(-8deg) rotate(-2deg);
  transform-origin: left center;
  text-shadow:
    5px 5px 0 var(--ink),
    10px 10px 0 rgba(47, 224, 255, 0.55);
}
.hero-title span {
  display: block;
}
.hook {
  font-family: var(--comic-font);
  font-size: clamp(20px, 4.4vw, 30px);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--yellow);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  margin: 18px 0 14px;
}
.hero p.lede {
  font-size: clamp(16px, 2.2vw, 19px);
  color: #f2e9ff;
  max-width: 34em;
  margin: 0 0 22px;
}

/* Hero art: icon tile + a real screenshot in a phone-ish frame. */
.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  min-height: 320px;
}
.hero-art .icon-tile {
  width: clamp(140px, 34vw, 220px);
  height: auto;
  border: 6px solid var(--ink);
  border-radius: 28px;
  box-shadow: 10px 10px 0 var(--ink);
  transform: rotate(-6deg);
  margin-right: -8%;
}
.hero-art .phone {
  width: clamp(150px, 36vw, 232px);
  height: auto;
  display: block;
  border: 6px solid var(--ink);
  border-radius: 22px;
  box-shadow: 10px 10px 0 rgba(255, 77, 157, 0.9);
  transform: rotate(4deg);
  background: var(--ink);
}

/* ---------- Buttons / store badges ---------- */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 8px;
}
.badge {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 158px;
  padding: 8px 14px;
  border: var(--edge);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--pop);
  text-align: left;
}
.badge .badge-kicker {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: #5a4a72;
}
.badge .badge-store {
  font-family: var(--comic-font);
  font-size: 21px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink);
}
.badge.is-placeholder {
  background: var(--paper-dim);
  border-style: dashed;
  box-shadow: 4px 4px 0 rgba(26, 16, 48, 0.55);
}

.note {
  font-size: 14px;
  color: #cfc0e6;
  margin: 6px 0 0;
}

/* The "Play in your browser" slot — deliberately disabled, see index.html. */
.play-slot {
  margin: 26px 0 0;
  padding: 16px 18px;
  border: 3px dashed rgba(255, 255, 255, 0.4);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  max-width: 34em;
}
.btn-play {
  font-family: var(--comic-font);
  font-size: 26px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 12px 34px;
  border: var(--edge);
  border-radius: 14px;
  background: var(--green);
  color: var(--ink);
  box-shadow: var(--pop);
  cursor: pointer;
}
.btn-play[disabled] {
  background: #8f86a3;
  color: #efe9f7;
  box-shadow: 4px 4px 0 rgba(26, 16, 48, 0.6);
  cursor: not-allowed;
}

/* ---------- Sections ---------- */
section {
  padding: clamp(34px, 6vw, 64px) 0;
}
.section-title {
  font-family: var(--comic-font);
  font-size: clamp(30px, 6vw, 48px);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--cyan);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-1.4deg);
  margin: 0 0 8px;
}
.section-sub {
  color: #ded2f0;
  margin: 0 0 26px;
  max-width: 46em;
}

.band {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border-top: var(--edge);
  border-bottom: var(--edge);
}

/* Feature cards — 1 up on a phone, 2 up on a tablet, 3 up on a desktop. */
.features {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}
@media (min-width: 620px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 980px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
}
.card {
  background: var(--paper);
  color: var(--ink);
  border: var(--edge);
  border-radius: 18px;
  box-shadow: var(--pop);
  padding: 20px 22px;
}
.card:nth-child(3n + 1) {
  transform: rotate(-0.7deg);
}
.card:nth-child(3n + 3) {
  transform: rotate(0.7deg);
}
.card h3 {
  font-family: var(--comic-font);
  font-size: 25px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 8px;
  color: #c31d6d;
}
.card p {
  margin: 0;
  font-size: 16px;
}

/* Screenshot gallery — 2 up on a phone, 3 up from tablet width. */
.shots {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 760px) {
  .shots {
    gap: 24px;
    grid-template-columns: repeat(3, 1fr);
  }
}
.shots figure {
  margin: 0;
  max-width: 280px;
  justify-self: center;
  width: 100%;
}
.shots img {
  display: block;
  width: 100%;
  height: auto;
  border: 5px solid var(--ink);
  border-radius: 16px;
  box-shadow: 7px 7px 0 rgba(47, 224, 255, 0.75);
  background: var(--ink);
}
.shots figcaption {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.45;
  color: #e6dcf7;
}

/* Fact strip */
.facts {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  padding: 0;
  margin: 0;
  list-style: none;
}
@media (min-width: 620px) {
  .facts {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 980px) {
  .facts {
    grid-template-columns: repeat(3, 1fr);
  }
}
.facts li {
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: var(--yellow);
  color: var(--ink);
  padding: 14px 16px;
  box-shadow: 5px 5px 0 var(--ink);
  font-weight: 600;
  font-size: 15.5px;
}
.facts li:nth-child(even) {
  background: var(--cyan);
}
/* Links inside the coloured tiles: the site-wide cyan link colour would
   vanish against them, so they get ink-dark text with an underline. */
.facts a {
  color: #0a2f5c;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}
.facts a:hover {
  color: #a5123f;
}

/* ---------- Sub-page (privacy / support) content ---------- */
.page-head {
  padding: 30px 0 8px;
  text-align: center;
}
.page-head img {
  display: block;
  width: min(420px, 100%);
  height: auto;
  margin: 0 auto 14px;
  border: 4px solid var(--ink);
  border-radius: 16px;
  box-shadow: var(--pop);
}
.page-title {
  font-family: var(--comic-font);
  font-size: clamp(32px, 7vw, 54px);
  text-transform: uppercase;
  color: var(--pink);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 4px 4px 0 var(--cyan-deep);
  margin: 0 0 6px;
  transform: rotate(-1deg);
}

.doc {
  background: var(--paper);
  color: var(--ink);
  border: var(--edge);
  border-radius: 20px;
  box-shadow: var(--pop);
  padding: clamp(20px, 4vw, 40px);
  margin: 22px auto 40px;
  max-width: 860px;
}
.doc h2 {
  font-family: var(--comic-font);
  font-size: clamp(24px, 4.6vw, 32px);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: #0b7fae;
  margin: 34px 0 10px;
  line-height: 1.05;
}
.doc h2:first-of-type {
  margin-top: 8px;
}
.doc h3 {
  font-size: 19px;
  margin: 26px 0 6px;
  color: #38215f;
}
.doc p,
.doc li {
  color: #241a3c;
}
.doc ul {
  padding-left: 22px;
}
.doc li {
  margin-bottom: 8px;
}
.doc a {
  color: #0b6f9c;
}
.doc a:hover {
  color: #b3155f;
}
.doc strong {
  color: #14092b;
}
.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: rgba(26, 16, 48, 0.07);
  border-radius: 5px;
  padding: 1px 5px;
}
.doc hr {
  border: none;
  border-top: 3px solid var(--ink);
  margin: 30px 0 20px;
}
.updated {
  font-weight: 700;
  color: #14092b;
  border-bottom: 3px solid var(--ink);
  padding-bottom: 14px;
}

/* The "this policy expires when ads/IAP land" caveat — must stay loud. */
.caveat {
  border: 4px solid var(--ink);
  border-left-width: 14px;
  border-radius: 14px;
  background: #fff3c4;
  padding: 18px 20px;
  margin: 22px 0 28px;
  box-shadow: 5px 5px 0 rgba(26, 16, 48, 0.8);
}
.caveat h2 {
  margin: 0 0 10px;
  color: #a5232b;
  font-size: clamp(21px, 4vw, 27px);
}
.caveat p:last-child {
  margin-bottom: 0;
}

/* Placeholder chips the owner has to fill in before publishing. */
.placeholder {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  font-weight: 700;
  background: #ffe14d;
  color: #14092b;
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 1px 7px;
  white-space: nowrap;
}

/* Data table in the privacy policy */
.table-scroll {
  overflow-x: auto;
  margin: 14px 0 20px;
  border: 3px solid var(--ink);
  border-radius: 12px;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 420px;
  font-size: 15.5px;
}
caption {
  text-align: left;
  padding: 10px 12px 0;
  font-size: 14px;
  color: #4a3a68;
}
th,
td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 2px solid rgba(26, 16, 48, 0.18);
  color: #241a3c;
}
thead th {
  background: var(--cyan);
  color: var(--ink);
  border-bottom: 3px solid var(--ink);
}
tbody tr:nth-child(even) {
  background: rgba(26, 16, 48, 0.045);
}
/* On a phone the table reflows to fit rather than asking for a sideways
   swipe — the cells are short phrases, so two narrow columns still read.
   The scroll container above stays as the safety net. */
@media (max-width: 560px) {
  table {
    min-width: 0;
    font-size: 14.5px;
  }
  th,
  td {
    padding: 8px 9px;
  }
}

/* FAQ */
.faq {
  margin-top: 10px;
}
.faq details {
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: #fff;
  margin-bottom: 12px;
  box-shadow: 4px 4px 0 rgba(26, 16, 48, 0.75);
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 700;
  font-size: 17px;
  color: #14092b;
  background: #f6efff;
  list-style-position: inside;
}
.faq summary:hover {
  background: #ffe9f4;
}
.faq details[open] summary {
  border-bottom: 3px solid var(--ink);
}
.faq .answer {
  padding: 14px 18px 4px;
}

/* ---------- Footer ---------- */
.site-foot {
  border-top: var(--edge);
  background: var(--ink);
  padding: 30px 0 40px;
}
.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: space-between;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.foot-links a {
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.foot-links a:hover {
  border-bottom-color: var(--yellow);
}
.foot-note {
  font-size: 14px;
  color: #bfb0d8;
  margin: 0;
}
.foot-tag {
  font-family: var(--comic-font);
  font-size: 19px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cyan);
}
