/* Color Bar — JustYeah landing. Hand-drawn look, same palette as the game (always light). */

@font-face {
  font-family: "Caveat";
  src: url("fonts/Caveat-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Pangolin";
  src: url("fonts/Pangolin-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #F6EEDD;
  --paper-dark: #EFE3CB;
  --card: #FFF9EC;
  --ink: #2A211C;
  --ink-soft: #6B5B4E;
  --ink-faint: #8A7B6C;
  --red: #E4473B;
  --green: #3FA34D;
  --blue: #2F6BD6;
  --coin: #F5C63C;
  --blush: #F28DB2;
  --wood: #E7B877;
  --wood-mid: #C98B4E;
  --wood-dark: #8C5A2E;

  --font-hand: "Caveat", "Comic Sans MS", "Chalkboard SE", cursive;
  --font-body: "Pangolin", "Chalkboard SE", "Comic Sans MS", system-ui, sans-serif;
  --gutter: 16px;
  --max: 1160px;
  --radius-wob: 22px 28px 20px 30px / 28px 20px 30px 22px;
}

*, *::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;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  background-color: var(--paper);
  background-image: radial-gradient(circle, rgba(42, 33, 28, 0.13) 1.1px, transparent 1.6px);
  background-size: 24px 24px;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; }

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

a { color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px dashed var(--blue); outline-offset: 4px; border-radius: 8px; }

h1, h2, h3 {
  font-family: var(--font-hand);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 0.35em;
  letter-spacing: 0.01em;
}
h1 { font-size: clamp(64px, 12vw, 132px); }
h2 { font-size: clamp(44px, 7vw, 72px); }
h3 { font-size: clamp(30px, 4vw, 36px); }
p { margin: 0 0 1em; }
/* Pangolin has no bold; faux bold renders badly, so emphasis is a highlighter stroke instead. */
strong {
  font-weight: 400;
  background: linear-gradient(transparent 58%, rgba(245, 198, 60, 0.5) 58%, rgba(245, 198, 60, 0.5) 92%, transparent 92%);
  padding: 0 2px;
}

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--card); padding: 8px 14px; z-index: 10;
}
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- wobbly outlines ---------- */

/* Anything with .wob gets its fill + ink outline drawn on a ::before layer that runs through
   an SVG displacement filter, so the text stays crisp while the edge wiggles. */
.wob { position: relative; isolation: isolate; }
.wob::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--wob-fill, var(--card));
  border: var(--wob-line, 3px) solid var(--ink);
  border-radius: var(--wob-radius, var(--radius-wob));
  box-shadow: var(--wob-shadow, 5px 6px 0 var(--ink));
  filter: url(#wob-a);
}
.boil-b.wob::before, .boil-b .wob-art { filter: url(#wob-b); }
.boil-c.wob::before, .boil-c .wob-art { filter: url(#wob-c); }
.wob-art { filter: url(#wob-a); }

/* marker underline under a word */
.mark { position: relative; white-space: nowrap; display: inline-block; }
.mark svg {
  position: absolute; left: -4%; width: 108%; bottom: -0.02em; height: 0.28em;
  z-index: -1; overflow: visible;
}
.mark--red { --mark: var(--red); }
.mark--green { --mark: var(--green); }
.mark--blue { --mark: var(--blue); }
.mark--coin { --mark: var(--coin); }
.mark path { stroke: var(--mark, var(--red)); }
.mark-wrap { position: relative; z-index: 0; }

/* ---------- header ---------- */

.site-head { padding: 18px 0 6px; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-family: var(--font-hand); font-size: 32px; line-height: 1;
}
.brand:hover { color: var(--ink); }
.brand img { width: 44px; height: 44px; border-radius: 11px; border: 2.5px solid var(--ink); }
.nav { display: flex; gap: 6px 18px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: 17px; }
.nav a:hover { color: var(--red); text-decoration: underline wavy var(--red); }
.nav .nav-extra { display: none; }
@media (min-width: 720px) { .nav .nav-extra { display: inline; } }

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

.btn {
  --wob-fill: var(--red);
  --wob-radius: 34px 40px 32px 44px / 40px 30px 44px 34px;
  --wob-line: 3.5px;
  --wob-shadow: 4px 5px 0 var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 58px;
  padding: 10px 28px 12px;
  color: #fff;
  font-family: var(--font-hand);
  font-size: 30px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  background: none;
  text-shadow: 0 2px 0 rgba(42, 33, 28, 0.25);
  transition: transform 90ms ease-out;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { color: #fff; transform: rotate(-1deg) translateY(-1px); }
.btn:active { transform: translate(3px, 4px) scale(1.03, 0.93); }
.btn:active::before { box-shadow: 1px 1px 0 var(--ink); }
.btn--green { --wob-fill: var(--green); }
.btn--blue { --wob-fill: var(--blue); }
.btn--card { --wob-fill: var(--card); color: var(--ink); text-shadow: none; }
.btn--card:hover { color: var(--ink); }

.btn small { display: block; font-family: var(--font-body); font-size: 14px; opacity: 0.9; letter-spacing: 0.02em; }
.btn .btn-text { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }

/* Coming-soon state of the App Store button */
.btn--store.is-soon {
  --wob-fill: var(--card);
  color: var(--ink);
  text-shadow: none;
  cursor: default;
}
.btn--store.is-soon::before { background-image: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(138, 123, 108, 0.14) 10px 13px); }
.btn--store.is-soon:hover { transform: none; color: var(--ink); }
.btn--store.is-soon:active { transform: translate(1px, 1px) scale(1.01, 0.98); }
.btn--store.is-soon small { color: var(--ink-soft); opacity: 1; }
.btn-glyph { width: 34px; height: 34px; flex: none; }

.meta-line { color: var(--ink-soft); font-size: 16px; margin-top: 18px; }
.meta-line span { white-space: nowrap; }

/* ---------- hero ---------- */

.hero { padding: 24px 0 40px; position: relative; overflow-x: clip; }
.hero .wrap { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: 1.1fr 0.9fr; gap: 40px; }
}
.hero-icon {
  width: 104px; height: 104px; border-radius: 24px;
  border: 3.5px solid var(--ink);
  box-shadow: 5px 6px 0 var(--ink);
  transform: rotate(-4deg);
  margin-bottom: 14px;
}
.hero h1 { margin-bottom: 0.08em; }
.hero .subtitle {
  font-family: var(--font-hand);
  font-size: clamp(30px, 4.6vw, 44px);
  line-height: 1.1;
  margin: 0 0 18px;
  color: var(--ink);
}
.hero .pitch { font-size: clamp(18px, 2vw, 21px); max-width: 34em; color: var(--ink); }
.hero .pitch em { font-style: normal; white-space: nowrap; }
.c-red { color: var(--red); }
.c-green { color: var(--green); }
.c-blue { color: var(--blue); }

.hero-stage {
  position: relative;
  width: min(100%, 420px);
  margin: 0 auto;
  padding: 24px 40px 30px;
}
@media (max-width: 420px) { .hero-stage { padding: 16px 28px 24px; } }

/* ---------- phone frame ---------- */

.phone {
  --wob-fill: var(--ink);
  --wob-radius: 54px 58px 52px 60px / 58px 52px 60px 54px;
  --wob-line: 3px;
  --wob-shadow: 7px 8px 0 rgba(42, 33, 28, 0.22);
  position: relative;
  padding: 11px;
  z-index: 1;
}
.phone img {
  width: 100%;
  aspect-ratio: 1320 / 2868;
  object-fit: cover;
  border-radius: 44px;
  background: var(--wood-mid);
}
.phone--sm { --wob-radius: 38px 42px 36px 44px / 42px 36px 44px 38px; padding: 8px; }
.phone--sm img { border-radius: 31px; }

/* decorative bits around phones */
.deco { position: absolute; pointer-events: none; z-index: 0; }
.blob { width: 58%; height: auto; }
.blob path { stroke: var(--ink); stroke-width: 4; }
.star path { fill: var(--coin); stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; }
.sparkle path { fill: var(--ink); }
.z-top { z-index: 2; }

.sticker {
  width: 92px; height: 92px; border-radius: 50%;
  clip-path: circle(47%);
}

/* ---------- sections ---------- */

.section { padding: 56px 0; position: relative; overflow-x: clip; }
@media (min-width: 900px) { .section { padding: 80px 0; } }
.section-head { max-width: 760px; margin-bottom: 28px; }
.section-head p { color: var(--ink-soft); font-size: 19px; }
.kicker {
  display: inline-block;
  font-family: var(--font-hand); font-size: 26px; line-height: 1;
  color: var(--ink-soft);
  margin-bottom: 6px;
  transform: rotate(-2deg);
}

.split { display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) {
  .split .phone-col { width: min(100%, 320px); }
  .split { grid-template-columns: 1fr 340px; gap: 56px; }
  .split--flip { grid-template-columns: 340px 1fr; }
  .split--flip > :first-child { order: 2; }
}
.split .phone-col { position: relative; width: min(100%, 290px); margin: 0 auto; padding: 16px 20px; }

/* cards */
.cards { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } }
.card { padding: 22px 22px 18px; }
.card:nth-child(3n+2) { --wob-radius: 28px 20px 30px 22px / 20px 30px 22px 28px; }
.card:nth-child(3n) { --wob-radius: 20px 30px 26px 18px / 26px 18px 30px 22px; }
.card h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 0.2em; }
.card p { margin: 0 0 0.5em; font-size: 17px; }
.card p:last-child { margin-bottom: 0; }
.card .dot {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid var(--ink); background: var(--dot, var(--red));
}
.card--wide { grid-column: 1 / -1; }

/* colour mixing diagram */
.mixer {
  --wob-fill: var(--ink);
  --wob-shadow: 5px 6px 0 rgba(42, 33, 28, 0.25);
  display: grid; gap: 18px; align-items: center;
  padding: 22px; color: var(--card);
}
@media (min-width: 620px) { .mixer { grid-template-columns: 200px 1fr; } }
.mixer svg { width: 200px; margin: 0 auto; }
.mixer h3 { color: var(--card); }
.mixer p { color: #E9DCC4; font-size: 17px; }
.mix-eq { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0; padding: 0; list-style: none; font-size: 17px; }
.mix-eq li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sw { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--card); display: inline-block; }

/* bullet list with hand-drawn ticks */
.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { position: relative; padding-left: 34px; margin: 0 0 10px; }
.ticks li::before {
  content: "";
  position: absolute; left: 2px; top: 0.35em;
  width: 20px; height: 16px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 16'%3E%3Cpath d='M2 9 C4 10 6 12 7.5 14 C10 8 13 5 18 2' fill='none' stroke='%233FA34D' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* number chips */
.chips { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 26px; padding: 0; list-style: none; }
.chip {
  --wob-shadow: 4px 5px 0 var(--ink);
  padding: 10px 12px 12px;
  text-align: center;
  flex: 1 1 0;
  min-width: 92px;
  max-width: 180px;
}
.chip b { display: block; font-family: var(--font-hand); font-size: 44px; line-height: 1; }
.chip span { font-size: 15px; color: var(--ink-soft); }
.chip--coin { --wob-fill: #FCE7A4; }
.chip--blush { --wob-fill: #FAD3E1; }
.chip--green { --wob-fill: #CFE8C9; }
.chip--blue { --wob-fill: #CFDDF6; }

.theme-tags { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 6px 0 18px; padding: 0; list-style: none; }
.theme-tags li {
  font-size: 16px; padding: 3px 12px 4px;
  border: 2px dashed var(--ink-faint); border-radius: 16px 12px 18px 12px;
  background: rgba(255, 249, 236, 0.7);
}

.stickers { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.stickers img { width: 76px; height: 76px; }
.stickers img:nth-child(odd) { transform: rotate(-6deg); }
.stickers img:nth-child(even) { transform: rotate(5deg); }

/* ---------- screenshot strip ---------- */

.strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(62vw, 250px);
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 12px var(--gutter) 26px;
  margin: 0 calc(-1 * var(--gutter));
  scrollbar-width: thin;
  scrollbar-color: var(--wood-mid) transparent;
  overscroll-behavior-x: contain;
}
.strip figure { margin: 0; scroll-snap-align: center; }
.strip figcaption {
  font-family: var(--font-hand); font-size: 26px; line-height: 1.1;
  text-align: center; margin-top: 12px;
}
.strip-hint { color: var(--ink-faint); font-size: 15px; margin: -4px 0 0; }

/* ---------- final CTA ---------- */

.cta {
  --wob-fill: var(--wood);
  --wob-shadow: 6px 7px 0 var(--ink);
  padding: 34px 24px 36px;
  text-align: center;
  margin: 0 auto;
  max-width: 760px;
}
.cta h2 { margin-bottom: 0.15em; }
.cta p { color: var(--ink); }

/* ---------- plain text pages (privacy, support) ---------- */

.page { padding: 20px 0 60px; }
.page .wrap { max-width: 860px; }
.doc { padding: 28px 22px 26px; }
@media (min-width: 720px) { .doc { padding: 44px 52px 40px; } }
.doc h1 { font-size: clamp(54px, 9vw, 84px); }
.doc h2 { font-size: clamp(34px, 5vw, 42px); margin-top: 1.2em; }
.doc h3 { font-size: 28px; margin-top: 1em; }
.doc ul { padding-left: 1.2em; margin: 0 0 1em; }
.doc li { margin-bottom: 0.4em; }
.doc .lead { font-size: 20px; }
.doc .muted { color: var(--ink-soft); }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: 16px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 2px dashed var(--paper-dark); }
.doc th { font-family: var(--font-hand); font-size: 22px; font-weight: 700; }
.table-scroll { overflow-x: auto; }
.note {
  --wob-fill: #FCE7A4;
  --wob-shadow: 3px 4px 0 var(--ink);
  padding: 16px 18px; margin: 0 0 1.2em;
}
.note p:last-child { margin: 0; }

.faq details { border-bottom: 2.5px dashed var(--paper-dark); padding: 12px 0; }
.faq summary {
  cursor: pointer; list-style: none;
  font-family: var(--font-hand); font-size: 28px; line-height: 1.15;
  display: flex; gap: 12px; align-items: baseline;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "+"; flex: none; width: 26px; text-align: center; color: var(--red);
  font-size: 34px; line-height: 0.8; transition: transform 120ms;
}
.faq details[open] summary::before { content: "–"; color: var(--blue); }
.faq details > div { padding: 8px 0 4px 38px; }
.faq details > div p:last-child { margin-bottom: 0; }

.mail {
  font-family: var(--font-hand); font-size: clamp(30px, 6vw, 42px); line-height: 1.1;
  word-break: break-word;
}

/* ---------- 404 ---------- */

.lost { text-align: center; padding: 40px 0 80px; }
.lost h1 { font-size: clamp(96px, 22vw, 180px); margin: 0; }
.lost .glass { width: 160px; margin: 0 auto 10px; }

/* ---------- footer ---------- */

.site-foot {
  margin-top: 30px;
  padding: 30px 0 40px;
  background: var(--wood-dark);
  color: #F6E6CC;
  position: relative;
  font-size: 16px;
}
.site-foot::before {
  content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 16px;
  background: var(--wood-dark);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 16' preserveAspectRatio='none'%3E%3Cpath d='M0 10 C20 4 40 14 60 8 S100 2 120 9 V16 H0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 16' preserveAspectRatio='none'%3E%3Cpath d='M0 10 C20 4 40 14 60 8 S100 2 120 9 V16 H0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.site-foot a { color: #FFF3D6; }
.site-foot a:hover { color: var(--coin); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.foot-note { color: #D9C3A2; font-size: 14px; width: 100%; margin: 6px 0 0; }

/* ---------- helpers ---------- */

.center { text-align: center; }
.tilt-l { transform: rotate(-2deg); }
.tilt-r { transform: rotate(2deg); }

@media (prefers-reduced-motion: reduce) {
  .btn, .btn:hover, .btn:active { transition: none; transform: none; }
}
