/* Baloo 2, self-hosted so no visitor data goes to Google. Licence: fonts/Baloo2-OFL.txt */

@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("fonts/baloo2-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("fonts/baloo2-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --yellow: #FFC833;
  --yellow-pattern: #F6BA2A;
  --orange: #F79617;
  --orange-deep: #ED7D31;
  --ink: #2E222F;
  --ink-soft: #5A4B5B;
  --white: #FFEADC;
  --peach: #FFDBC4;
  --cream: #FFF6DC;
  --max: 1000px;
  --edge: #150E16;
  --shop-fill: #FCD564; /* the game Shop background fill (kShopTileFill = kRewardTileYellow) */
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background-color: var(--shop-fill);
  color: var(--ink);
  font-family: "Baloo 2", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.5;
  overflow-x: hidden;
}

/* R30.261 — the game's real Shop background (lib/widgets/tiled_background.dart): the 17 × 17
   bg_pattern_noob_yellow_tile.png over #FCD564, drifting UP and LEFT at 1.848 base px/s
   (kShopTileDriftBasesPerSecond = 2.1 × 0.88), i.e. one whole tile every 17 / 1.848 = 9.2 s — a seamless loop.
   Drawn at 4 CSS px per source px (68 px tiles); a still pattern with reduced motion. */

body::before {
  content: "";
  position: fixed;
  top: 0;
  right: -68px;
  bottom: -68px;
  left: 0;
  z-index: -1;
  background-image: url("img/bg-shop-tile.png");
  background-size: 68px 68px;
  image-rendering: pixelated;
  animation: drift 9.2s linear infinite;
  will-change: transform;
}

@keyframes drift {
  to { transform: translate(-68px, -68px); }
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    animation: none;
  }
}

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

.pixel {
  image-rendering: pixelated;
}

a {
  color: var(--ink);
  text-decoration-color: var(--orange-deep);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* R30.262 — a hovered text link turns bolder instead of changing its underline. A stroke the colour of the text
   thickens the letters without changing their width, so nothing shifts or rewraps. Buttons are excluded. */
@media (hover: hover) {
  a:not(.btn):not(.brand):hover {
    -webkit-text-stroke: 0.6px currentColor;
  }
}

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

h1, h2, h3 {
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

/* Soft square corners, like the hero phone */

.px {
  border-radius: 7px;
}

.panel-label {
  display: inline-block;
  font-weight: 800;
  font-size: 1.2rem;
  line-height: 1.2;
  color: var(--ink);
}

/* Buttons */

.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  line-height: 1.2;
}

.btn svg {
  width: 24px;
  height: 24px;
  flex: none;
  fill: currentColor;
}

.btn small {
  display: block;
  font-size: 0.85rem;
  color: var(--yellow);
}

.btn strong {
  display: block;
  font-weight: 800;
  font-size: 1.2rem;
}

.btn-support {
  padding: 6px 16px;
  background: var(--orange);
  color: var(--ink);
}

a.btn-support:hover,
.btn-support[aria-current="page"] {
  background: var(--orange-deep);
  color: var(--ink);
}

/* Header */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

/* R30.261 — the app icon (assets/branding/pocketnoob_icon1024.png, 26 pixel cells across) at 78 px = 3 px per cell,
   with 2× / 3× files so each cell lands on whole device pixels. Rounded like a home-screen icon. */
.brand {
  display: block;
  border-radius: 18px;
  -webkit-tap-highlight-color: transparent;
}

.brand .app-icon {
  width: 78px;
  height: 78px;
  border-radius: 18px;
  box-shadow: 3px 4px 0 var(--edge);
  transition: transform 0.26s, box-shadow 0.26s;
  /* Light protection only: the icon can't be dragged out or long-pressed as an image, and a click reaches the Home
     link. Nothing else on the site is affected. */
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

@media (hover: hover) {
  .brand:hover .app-icon {
    transform: translate(1px, 1px);
    box-shadow: 2px 3px 0 var(--edge);
  }
}

/* R30.262 — the game's press: the control sinks into its shadow (in 70 ms) and springs back (260 ms). */
.brand.is-pressed .app-icon,
.brand:active .app-icon {
  transform: translate(3px, 4px);
  box-shadow: 0 0 0 var(--edge);
  transition-duration: 0.07s;
}

.brand:focus-visible {
  outline: none;
}

.brand:focus-visible .app-icon {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

/* Hero: a header-less panel, with the phone breaking out over its top edge */

.hero {
  position: relative;
  padding: 40px 0 24px;
  overflow-x: clip;
}

.hero-panel .panel-in {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  align-items: center;
  gap: 32px;
  padding: 40px 48px;
  overflow: visible;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4rem);
  line-height: 1.05;
}

.hero .lede {
  margin: 0 0 28px;
  max-width: 34ch;
}

.hero-scene {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  margin: -100px 0 -20px;
  perspective: 1100px;
}

.tilt {
  position: relative;
  transform-style: preserve-3d;
  transform: rotateY(-24deg) rotateX(10deg) rotateZ(5deg);
}

/* Scroll turn on top of the resting tilt. Pivots on the bottom edge so the
   phone keeps its gap to the panel. --scroll runs 0 → 1 (set in main.js). */
.tilt-spin {
  position: relative;
  transform-style: preserve-3d;
  transform-origin: 50% 100%;
  transform:
    rotateY(calc(var(--scroll, 0) * 26deg))
    rotateX(calc(var(--scroll, 0) * -14deg));
  will-change: transform;
}

.device,
.device-edge {
  border-radius: 7px;
}

.device {
  position: relative;
  width: 196px;
  padding: 10px 8px;
  background: var(--ink);
}

.device-edge {
  position: absolute;
  inset: 0;
  background: #150E16;
  transform: translateZ(var(--z));
}

.device-edge:nth-child(1) { --z: -30px; }
.device-edge:nth-child(2) { --z: -25px; }
.device-edge:nth-child(3) { --z: -20px; }
.device-edge:nth-child(4) { --z: -15px; }
.device-edge:nth-child(5) { --z: -10px; }
.device-edge:nth-child(6) { --z: -5px; }

.device video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 400 / 866;
  object-fit: cover;
  border-radius: 3px;
}

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Panels: outer ink layer is the 3px outline, inner layer is the fill */

.panel {
  position: relative;
  background: var(--ink);
  padding: 3px;
  margin-bottom: 24px;
}

.panel-in {
  background: var(--white);
  height: 100%;
}

.panel-head {
  background: var(--orange);
  padding: 9px 18px 8px;
}

.panel-body {
  padding: 20px 24px 24px;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.features .panel {
  margin-bottom: 0;
}

.feature .panel-head,
.feature .panel-body {
  text-align: center;
}

.feature h2 {
  font-size: 1.2rem;
  margin: 16px 0 0;
}

.phone {
  background: var(--ink);
  padding: 6px;
  max-width: 200px;
  margin: 0 auto;
}

.phone img,
.phone video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 1297;
  object-fit: cover;
}

.about .panel-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
  align-items: center;
  padding: 32px 56px;
}

.about img {
  width: 96px;
}

.about p {
  margin: 0 0 0.6em;
}

.about .tagline {
  font-weight: 800;
  margin: 0;
}

/* Social proof: stats row, then quotes row */

.proof-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.proof-stat {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--white);
  line-height: 1.2;
}

.proof-stat strong {
  flex: none;
  min-width: 2em;
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  color: var(--yellow);
}

.proof-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 12px;
  color: var(--ink-soft);
}

.proof-sub p {
  margin: 0;
}

.yt-link {
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
}

.yt-link svg {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  margin-right: 4px;
  vertical-align: -0.3em;
}

/* Fan comments carousel: swipe or use the arrows */

.carousel-nav {
  display: flex;
  flex: none;
  gap: 8px;
}

.carousel-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
}

.carousel-btn svg {
  width: 16px;
  height: 16px;
}

.carousel-btn:hover {
  background: var(--orange-deep);
}

.carousel-btn:disabled {
  opacity: 0.3;
  cursor: default;
  background: var(--ink);
}

.quotes {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 28px) / 3);
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

.quotes::-webkit-scrollbar {
  display: none;
}

.quote {
  display: flex;
  scroll-snap-align: start;
  flex-direction: column;
  margin: 0;
  padding: 16px 20px;
  background: var(--ink);
  color: var(--white);
}

.quote blockquote {
  margin: 0;
}

/* Legal and support pages */

.doc {
  max-width: 800px;
  margin: 0 auto 24px;
}

.doc .panel-body {
  padding: 24px 32px 32px;
}

.doc h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.5rem);
}

.doc h2 {
  font-size: 1.6rem;
  margin-top: 1.4em;
}

.doc h3 {
  font-size: 1.35rem;
  margin-top: 1.2em;
}

.doc p,
.doc li {
  color: var(--ink-soft);
}

.doc strong {
  color: var(--ink);
  font-weight: 800;
}

.doc .summary {
  background: var(--cream);
  padding: 14px 18px;
  color: var(--ink);
}

.doc address {
  font-style: normal;
}

.table-scroll {
  overflow-x: auto;
  margin: 1em 0;
}

.doc table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: 0.95rem;
}

.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 8px 12px;
  border-bottom: 2px solid var(--cream);
}

.doc th {
  background: var(--cream);
  font-weight: 800;
}

.confirm {
  background: var(--orange-deep);
  color: var(--white);
  font-weight: 800;
  font-size: 0.85em;
  padding: 1px 8px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Footer */

.site-footer {
  padding: 4px 0 32px;
  text-transform: lowercase; /* R30.261 — a visual style only; the links and their destinations are unchanged */
}

.site-header .btn-support strong {
  text-transform: lowercase;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.site-footer a {
  color: var(--ink);
  text-decoration: none;
}



.site-footer p {
  margin: 0;
}

/* Mobile */

@media (max-width: 860px) {
  .hero-panel .panel-in {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 20px 24px;
  }

  .hero-scene {
    min-height: 300px;
    margin: -48px 0 0;
    grid-row: 1;
  }

  .device {
    width: 150px;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .panel-body,
  .doc .panel-body {
    padding: 18px 18px 22px;
  }

  .quotes {
    grid-auto-columns: 85%;
  }

  .proof-stats {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .proof-stat strong {
    font-size: 2.2rem;
  }

  .about .panel-body {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px 24px 28px;
  }

  .about img {
    width: 72px;
  }
}

/* v2.5: a solid dark edge under every bordered element, like the hero phone's side */

.panel {
  box-shadow: 5px 6px 0 var(--edge);
}

.panel-in {
  border-radius: 4px;
  overflow: hidden;
}

.quote {
  border-radius: 7px;
}

.phone,
.proof-stat {
  box-shadow: 4px 5px 0 var(--edge);
}

.btn,
.carousel-btn {
  box-shadow: 3px 4px 0 var(--edge);
  transition: transform 0.26s, box-shadow 0.26s;
  -webkit-tap-highlight-color: transparent;
}

.btn.is-pressed,
.btn:not([aria-disabled="true"]):active {
  transform: translate(3px, 4px) !important;
  box-shadow: 0 0 0 var(--edge) !important;
  transition-duration: 0.07s;
}

a.btn:hover,
.carousel-btn:not(:disabled):hover {
  transform: translate(2px, 2px);
  box-shadow: 1px 2px 0 var(--edge);
}
