/* Noodle Goal, noodlegoal.com
   The game's own Arena skin (Assets/Resources/GameUI.uss), carried over to the web:
   night-blue ground with diagonal pitch stripes, panels with a cut corner, slanted
   plates, and headings in Noodle Condensed leaning the way they lean in the game.
   One stylesheet for every page. No build step, no framework, no JavaScript. */

/* ---------- fonts (self-hosted, SIL OFL, fonts/OFL.txt) ---------- */
@font-face {
  font-family: "Noodle Condensed";
  src: url("fonts/noodle-extrabold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noodle Condensed";
  src: url("fonts/noodle-bold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rubik";
  src: url("fonts/rubik-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  color-scheme: dark light;

  --night: #09131d;
  --deep: #0d1b24;
  --panel: #11222c;
  --raised: #1b2f3a;
  --line: #2b4451;
  --line-soft: #1d3540;

  --ink: #eaf4ee;
  --soft: #cbdcdd;
  --muted: #9db4ba;
  --dim: #7d99a1;

  --lime: #c6f66c;
  --lime-deep: #a0d250;
  --lime-ink: #16290a;
  --mint: #58efd0;
  --gold: #ffd35c;
  --coral: #ff8f8f;

  /* semantic */
  --bg: var(--night);
  --bg-alt: var(--deep);
  --card: var(--panel);
  --card-2: var(--raised);
  --border: var(--line);
  --text: var(--ink);
  --text-soft: var(--soft);
  --text-muted: var(--muted);
  --accent: var(--lime);
  --accent-fill: var(--lime);
  --accent-ink: var(--lime-ink);
  --accent-2: var(--mint);
  --accent-3: var(--gold);
  --stripe: rgba(255, 255, 255, .028);
  --shadow: rgba(3, 9, 14, .55);
  --hard-shadow: #050c13;

  --display: "Noodle Condensed", "Arial Narrow", "Helvetica Neue Condensed", system-ui, sans-serif;
  --body: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1080px;
  --gutter: 20px;
  --radius: 14px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f2f6f1;
    --bg-alt: #e7eee6;
    --card: #ffffff;
    --card-2: #e2ecdf;
    --border: #c6d6c9;
    --line-soft: #d7e3d6;
    --text: #0b1a14;
    --text-soft: #2c4038;
    --text-muted: #4d6660;
    --accent: #3d6a10;        /* readable lime for text and links */
    --accent-fill: #c6f66c;   /* the game's lime stays a fill */
    --accent-ink: #16290a;
    --accent-2: #0d6a58;
    --accent-3: #7a5504;
    --stripe: rgba(11, 26, 20, .022);
    --shadow: rgba(19, 39, 30, .14);
    --hard-shadow: #d9e4d7;
  }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 clamp(15px, .55vw + 14px, 17px)/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* the pitch's diagonal stripes, drawn rather than downloaded */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(115deg,
      var(--stripe) 0 13px, transparent 13px 46px);
}

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

a {
  color: var(--accent);
  text-underline-offset: .22em;
  text-decoration-thickness: .08em;
}
a:hover { color: var(--text); }

:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent-fill);
  color: var(--accent-ink);
  padding: 10px 16px;
  font: 600 14px/1 var(--display);
  letter-spacing: .06em;
  z-index: 50;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- headings ---------- */
h1, h2, h3, .display {
  font-family: var(--display);
  font-weight: 800;
  font-style: italic;         /* the game obliques this face; browsers do the same */
  letter-spacing: -.005em;
  line-height: .98;
  margin: 0;
  text-wrap: balance;
}

h2 { font-size: clamp(30px, 5.4vw, 46px); }
h3 { font-size: clamp(20px, 2.6vw, 24px); letter-spacing: 0; }

.kicker {
  font: 600 12px/1 var(--display);
  font-style: italic;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 12px;
}

/* a heading over a lime rule, exactly like a window title in the game */
.ruled { padding-bottom: 14px; border-bottom: 3px solid var(--accent-fill); }

/* Every page speaks one language. The switcher is a plain list of links:
   in the footer on every page, and again under the heading on the legal ones,
   where a store reviewer or a player may have landed in the wrong language. */
.lang-row, .foot-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.lang-row { margin: 0 0 22px; }
.lang-row.centred { justify-content: center; margin-top: 30px; }
.lang-row a, .lang-row span {
  display: block;
  font: 600 12.5px/1 var(--display);
  font-style: italic;
  letter-spacing: .09em;
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-muted);
}
.lang-row a:hover { color: var(--text); border-color: var(--accent); }
.lang-row [aria-current] {
  color: var(--accent-ink);
  background: var(--accent-fill);
  border-color: var(--accent-fill);
}
.foot-langs { display: grid; gap: 8px; }
.foot-langs a { font-size: 14.5px; }
.foot-langs [aria-current] {
  font-size: 14.5px;
  color: var(--text);
  position: relative;
  padding-left: 15px;
}
.foot-langs [aria-current]::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 7px;
  height: 7px;
  background: var(--accent-fill);
}

/* one line at the foot of a translated legal page */
.translation-note {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-muted);
}

/* ---------- header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding-block: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 800 19px/1 var(--display);
  font-style: italic;
  letter-spacing: .01em;
  color: var(--text);
  text-decoration: none;
  flex: 0 0 auto;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand b { color: var(--accent); font-weight: 800; }

.site-nav {
  margin-left: auto;
  display: flex;
  gap: 2px;
  flex-wrap: nowrap;
  justify-content: flex-start;   /* flex-end would clip the first items when it scrolls */
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(90deg, #000 calc(100% - 20px), transparent);
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { white-space: nowrap; }
@media (min-width: 620px) { .site-nav { gap: 4px; mask-image: none; } }
.site-nav a {
  font: 600 13px/1 var(--display);
  font-style: italic;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding: 9px 10px;
  border-radius: 8px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--card-2);
}

/* the globe in the top bar jumps to the full language list in the footer */
.lang-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  margin-left: 4px;
}
.lang-jump .globe {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  flex: 0 0 auto;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(30px, 6vw, 66px) clamp(28px, 5vw, 56px);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -30% -55% 20%;
  height: 120%;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 72%);
  pointer-events: none;
  z-index: -1;
}
.hero .wrap {
  display: grid;
  gap: clamp(26px, 4vw, 44px);
}

.wordmark {
  font-size: clamp(56px, 15.5vw, 132px);
  line-height: .86;
  margin: 0 0 14px;
  text-shadow: 3px 5px 0 var(--hard-shadow);
}
.wordmark span { display: block; }
.wordmark .goal { color: var(--accent); }

.tagline {
  font: 600 clamp(19px, 3.4vw, 27px)/1.2 var(--display);
  font-style: italic;
  letter-spacing: .005em;
  color: var(--text);
  margin: 0 0 6px;
}
.tagline-sub {
  color: var(--text-muted);
  font-size: clamp(14px, 2vw, 16px);
  margin: 0 0 22px;
}

/* facts, on slanted plates */
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}
.facts li {
  font: 600 12.5px/1 var(--display);
  font-style: italic;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: var(--card-2);
  padding: 9px 14px;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
.facts li b { color: var(--accent); font-weight: 800; }

/* the phone in the hero */
.hero-shot {
  justify-self: center;
  width: min(258px, 66vw);
  position: relative;
}
.hero-shot img {
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 50px -18px var(--shadow), 0 4px 14px -6px var(--shadow);
  transform: rotate(-3deg);
}

.hero-copy { max-width: 42ch; }

@media (min-width: 760px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    align-items: center;
  }
  .hero-shot { width: min(310px, 100%); }
  .wordmark { font-size: clamp(76px, 9.4vw, 128px); }
}

/* ---------- store chips (no store links yet) ---------- */
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.stores > li { display: flex; flex: 1 1 196px; max-width: 300px; }
.store {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 1;
  padding: 11px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
}
.store svg { width: 24px; height: 24px; flex: 0 0 auto; fill: currentColor; opacity: .9; }
.store .top {
  display: block;
  font: 400 10.5px/1.25 var(--body);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-3);
}
.store .name {
  display: block;
  font: 800 17px/1.1 var(--display);
  font-style: italic;
  letter-spacing: .01em;
}
a.store:hover { border-color: var(--accent); color: var(--text); }
li.store { cursor: default; }

.stores-note {
  margin: 12px 0 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

/* ---------- sections ---------- */
section { padding-block: clamp(46px, 8vw, 84px); }
section.alt { background: var(--bg-alt); border-block: 1px solid var(--line-soft); }
.sec-head { max-width: 46ch; margin-bottom: clamp(26px, 4vw, 40px); }
.sec-head p { color: var(--text-muted); margin: 14px 0 0; }

/* ---------- how it works ---------- */
.how {
  display: grid;
  gap: clamp(22px, 4vw, 40px);
  align-items: center;
}
@media (min-width: 820px) { .how { grid-template-columns: 1fr 1fr; } }

.pitch {
  width: 100%;
  border-radius: var(--radius);
  background: var(--deep);
  border: 1px solid var(--border);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .pitch { background: #0d1b24; }
}

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 0 54px;
  margin-bottom: 24px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font: 800 19px/1 var(--display);
  font-style: italic;
  color: var(--accent-ink);
  background: var(--accent-fill);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}
.steps h3 { margin-bottom: 4px; }
.steps p { margin: 0; color: var(--text-soft); }

/* ---------- feature cards ---------- */
.cards {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 22px 20px 24px;
  /* the game's panel: two corners cut */
  clip-path: polygon(0 18px, 18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
}
.card .tag {
  font: 600 11px/1 var(--display);
  font-style: italic;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--accent-2);
  display: block;
  margin-bottom: 10px;
}
.card h3 { margin-bottom: 9px; }
.card p { margin: 0; color: var(--text-soft); font-size: .96em; }
.card.gold .tag { color: var(--accent-3); }
.card.lime .tag { color: var(--accent); }

/* ---------- screenshot gallery ---------- */
.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(216px, 58vw);
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px var(--gutter) 22px;
  margin-inline: calc(var(--gutter) * -1);
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}
.shots figure {
  margin: 0;
  scroll-snap-align: center;
}
.shots img {
  width: 100%;
  aspect-ratio: 1080 / 2160;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--deep);
  box-shadow: 0 16px 34px -20px var(--shadow);
}
.shots figcaption {
  margin-top: 11px;
  font: 600 12px/1.35 var(--display);
  font-style: italic;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.scroll-hint {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- honesty band ---------- */
.promises {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(214px, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.promises li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-2);
  padding: 15px 16px;
}
.promises b {
  font: 800 16px/1.15 var(--display);
  font-style: italic;
  letter-spacing: .01em;
  display: block;
}
.promises span {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 3px;
}
.promises svg { width: 21px; height: 21px; flex: 0 0 auto; margin-top: 2px; stroke: var(--accent-2); fill: none; stroke-width: 2.1; }

/* ---------- languages ---------- */
/* The game speaks six languages and so does this site, so the chips are the
   switcher as well as the claim. */
.langs-head { margin-top: 42px; }
.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}
.langs a, .langs span {
  display: block;
  font: 600 13px/1 var(--display);
  font-style: italic;
  letter-spacing: .09em;
  padding: 9px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-soft);
  text-decoration: none;
}
.langs a:hover { color: var(--text); border-color: var(--accent); }
.langs [aria-current] {
  color: var(--accent-ink);
  background: var(--accent-fill);
  border-color: var(--accent-fill);
}

/* ---------- call to action ---------- */
.cta {
  background: var(--card);
  border: 1px solid var(--border);
  padding: clamp(24px, 4vw, 40px);
  clip-path: polygon(0 22px, 22px 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
}
.cta h2 { margin-bottom: 10px; }
.cta > p { color: var(--text-muted); margin: 0 0 22px; max-width: 52ch; }

/* ---------- prose pages (privacy, support) ---------- */
.prose { padding-block: clamp(30px, 5vw, 54px) clamp(50px, 8vw, 88px); }
.prose .wrap { max-width: 760px; }
.prose h1 { font-size: clamp(32px, 6vw, 48px); margin-bottom: 10px; }
.prose h2 {
  font-size: clamp(21px, 3vw, 26px);
  margin: 40px 0 10px;
  color: var(--accent);
  scroll-margin-top: 76px;
}
.prose p, .prose li { color: var(--text-soft); }
.prose p { margin: 0 0 14px; }
/* The legal pages lean on <strong> a lot, and a filled chip on five words in one
   sentence is noise, so it is a quiet mint underline instead. */
.prose strong {
  color: var(--text);
  font-weight: 400;
  box-shadow: inset 0 -.3em 0 color-mix(in srgb, var(--accent-2) 22%, transparent);
}
.prose .updated { font-size: 13.5px; color: var(--text-muted); margin-bottom: 26px; }
.prose .lead {
  border-left: 3px solid var(--accent-2);
  background: var(--card);
  padding: 15px 18px;
  margin-bottom: 8px;
}
/* The root privacy and support pages carry English under the Turkish, because
   the stores and the game link straight to them. A rule and a little air make
   the seam obvious. */
.lang-split {
  margin-top: 64px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}
.lang-split .kicker { color: var(--accent-3); }

/* a quiet table of contents on the long pages */
.toc {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 18px 20px;
  margin: 26px 0 34px;
  clip-path: polygon(0 14px, 14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}
.toc p {
  font: 600 11px/1 var(--display);
  font-style: italic;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 12px;
}
.toc ol, .toc ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.toc a { font-size: 14.5px; }

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--border);
  padding-block: 40px 52px;
  background: var(--bg-alt);
}
.foot-top {
  display: grid;
  gap: 26px;
  margin-bottom: 30px;
}
@media (min-width: 560px) {
  .foot-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-about { grid-column: 1 / -1; }
}
@media (min-width: 920px) {
  .foot-top { grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); }
  .foot-about { grid-column: auto; }
}
.foot-top h2 {
  font-size: 15px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.foot-top ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-top a { font-size: 14.5px; }
.foot-about p { margin: 0 0 8px; color: var(--text-muted); font-size: 14.5px; max-width: 40ch; }
.legal {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-muted);
  border-top: 1px solid var(--line-soft);
  padding-top: 22px;
  margin: 0;
  max-width: 78ch;
}
.legal + .legal { margin-top: 10px; border: 0; padding-top: 0; }

/* ---------- 404 ---------- */
.oops {
  min-height: 78vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 20px;
}
.oops h1 { font-size: clamp(40px, 11vw, 92px); text-shadow: 3px 5px 0 var(--hard-shadow); margin-bottom: 16px; }
.oops p { color: var(--text-muted); margin: 0 0 8px; }

/* ---------- the animated bank shot ---------- */
/* The ball leaves the head, mirrors off the right wall, then the left, then goes in.
   The three corners are the real reflection points for that shot, not a doodle. */
.ball-path { stroke-dasharray: 7 9; animation: dash 1.5s linear infinite; }
.ball { animation: travel 4.8s linear infinite; }
.pop { transform-origin: 150px 30px; animation: pop 4.8s ease-out infinite; }
@keyframes dash { to { stroke-dashoffset: -32; } }
@keyframes travel {
  0%, 12%    { transform: translate(0, 0); }
  35.7%      { transform: translate(178px, -89px); }
  68.5%      { transform: translate(-68px, -212px); }
  85%, 100%  { transform: translate(55px, -274px); }
}
@keyframes pop {
  0%, 83%  { opacity: 0; transform: scale(.35); }
  89%      { opacity: 1; transform: scale(1.1); }
  100%     { opacity: 0; transform: scale(1.55); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ball-path, .ball, .pop { animation: none; }
  .ball { transform: translate(55px, -274px); }
  .pop { opacity: .85; transform: scale(1); }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  body::before, .site-head, .hero-shot, .shots { display: none; }
  body { background: #fff; color: #000; }
}
