/* Climbeat site styles. Palette from the game (godot/scripts/ui.gd). */

@font-face {
  font-family: "Baloo 2";
  src: url("fonts/Baloo2.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("fonts/Nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --bg: #121824;
  --panel: #243044;
  --line: #3a4a63;
  --fg: #f3eee3;
  --muted: #b4bfd0;       /* a little lighter than the game's #93a0b5, for text contrast */
  --left: #5ad8cb;        /* teal: left hand */
  --right: #ff8a5b;       /* coral: right hand */
  --warn: #ffd166;        /* yellow */
  --ink: #141a26;
  --radius: 18px;
  --max: 1040px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

a { color: var(--left); text-underline-offset: 3px; }
a:hover { color: var(--warn); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--warn);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 {
  font-family: "Baloo 2", "Nunito", system-ui, sans-serif;
  line-height: 1.15;
  font-weight: 800;
  margin: 1.6em 0 .5em;
}
h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; }  /* long German words on small phones */
h1 { font-size: clamp(2rem, 6vw, 2.8rem); margin-top: .4em; }
h2 { font-size: clamp(1.4rem, 4vw, 1.75rem); color: var(--warn); }
h3 { font-size: 1.2rem; }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--warn); color: var(--ink); padding: 8px 14px; border-radius: 10px;
  font-weight: 800; z-index: 10;
}
.skip:focus { left: 16px; }

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

/* ---------- header ---------- */
.site-header {
  border-bottom: 2px solid var(--panel);
  background: rgba(18, 24, 36, .92);
  position: sticky; top: 0; z-index: 5;
  backdrop-filter: blur(8px);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 64px;
}
.brand { display: flex; align-items: center; }
.brand img { width: 128px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a {
  color: var(--fg); text-decoration: none; font-weight: 700;
  padding: 6px 10px; border-radius: 10px; font-size: .95rem;
}
.site-nav a:hover { background: var(--panel); color: var(--fg); }
.site-nav a[aria-current="page"] { color: var(--left); }

/* Language menu: a <details> dropdown, no script needed. */
.langs { position: relative; margin-left: 4px; }
.langs summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  border: 2px solid var(--line); border-radius: 10px;
  padding: 5px 10px; font-weight: 800; font-size: .95rem;
}
.langs summary:hover { background: var(--panel); }
.langs[open] summary { border-color: var(--left); }
.langs .globe { width: 18px; height: 18px; }
.langs ul {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20;
  list-style: none; margin: 0; padding: 6px; min-width: 170px;
  background: var(--panel); border: 3px solid var(--ink); border-radius: 14px;
  box-shadow: 0 0 0 2px var(--line), 0 14px 28px rgba(0, 0, 0, .5);
}
.langs li a {
  display: block; padding: 9px 12px; border-radius: 9px;
  color: var(--fg); text-decoration: none; font-weight: 700;
}
.langs li a:hover { background: var(--line); color: var(--fg); }
.langs li a[aria-current] { color: var(--left); }
.langs li a[aria-current]::after { content: " ✓"; }
.langs-footer a { font-weight: 600; }
@media (max-width: 560px) {
  .site-nav a { padding: 6px 7px; font-size: .9rem; }
  .brand img { width: 96px; }
}
@media (max-width: 480px) {
  .site-nav { flex-wrap: nowrap; }
  .site-nav .nav-privacy { display: none; }  /* still in the footer */
}
@media (max-width: 300px) {
  .site-nav .nav-page { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: "Baloo 2", system-ui, sans-serif; font-weight: 800; font-size: 1.2rem;
  letter-spacing: .02em;
  color: var(--ink); background: var(--right);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 12px 26px 10px;
  text-decoration: none;
  box-shadow: 0 6px 0 #b4532d, 0 0 0 3px var(--left);
  transition: transform .08s, box-shadow .08s;
}
.btn:hover { color: var(--ink); transform: translateY(-1px); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #b4532d, 0 0 0 3px var(--left); }
.btn--yellow { background: var(--warn); box-shadow: 0 6px 0 #b8902f, 0 0 0 3px var(--ink); }
.btn--yellow:active { box-shadow: 0 2px 0 #b8902f, 0 0 0 3px var(--ink); }

.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  background: #000; color: #fff; text-decoration: none;
  border: 2px solid #a6a6a6; border-radius: 14px;
  padding: 8px 20px 8px 16px; min-height: 56px;
}
.store-badge:hover { color: #fff; border-color: var(--fg); }
.store-badge svg { width: 26px; height: 32px; flex: none; }
.store-badge small { display: block; font-size: .72rem; line-height: 1.1; }
.store-badge strong { display: block; font-size: 1.35rem; line-height: 1.1; font-family: -apple-system, system-ui, sans-serif; }
.soon { display: block; margin-top: 10px; color: var(--muted); font-size: .95rem; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse at 15% 0%, rgba(90, 216, 203, .18), transparent 55%),
    radial-gradient(ellipse at 90% 10%, rgba(255, 138, 91, .18), transparent 55%),
    var(--bg);
  padding: 32px 0 48px;
  text-align: center;
}
.hero .logo { width: min(520px, 92%); margin: 0 auto; }
.tagline {
  font-family: "Baloo 2", system-ui, sans-serif; font-weight: 800;
  font-size: clamp(1.8rem, 7vw, 2.8rem);
  color: var(--warn); margin: .1em 0 .3em;
  text-shadow: 0 3px 0 var(--ink);
}
.lead { max-width: 640px; margin: 0 auto 1.6em; font-size: 1.15rem; }
.hero .cta { display: flex; flex-direction: column; align-items: center; }

/* ---------- screenshots ---------- */
.shots {
  display: grid; gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 8px 0 0;
  padding: 0; list-style: none;
}
.shots li { margin: 0; }
.shots figure { margin: 0; }
.shots img {
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: 0 0 0 3px var(--panel), 0 12px 28px rgba(0, 0, 0, .45);
  aspect-ratio: 479 / 1040;
  object-fit: cover;
  background: var(--panel);
}
.shots figcaption { text-align: center; color: var(--muted); font-size: .95rem; margin-top: 10px; font-weight: 700; }
@media (max-width: 820px) {
  .shots {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62%;
    overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px;
    overscroll-behavior-x: contain;
  }
  .shots li { scroll-snap-align: center; }
}

/* ---------- feature cards ---------- */
.section { padding: 40px 0; }
.section > .wrap > h2:first-child { margin-top: 0; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card {
  background: var(--panel); border-radius: var(--radius);
  border: 3px solid var(--ink); box-shadow: 0 0 0 2px var(--line);
  padding: 18px 20px;
}
.card h3 { margin: 0 0 .3em; }
.card p { margin: 0; }
.dot { display: inline-block; width: .8em; height: .8em; border-radius: 50%; margin-right: .35em; border: 2px solid var(--ink); vertical-align: -.05em; }
.dot--l { background: var(--left); } .dot--r { background: var(--right); } .dot--y { background: var(--warn); }

.pieces { columns: 2 220px; padding-left: 1.2em; margin: .4em 0 0; }
.pieces li { break-inside: avoid; }

/* ---------- document pages ---------- */
.doc { max-width: 760px; padding-top: 24px; padding-bottom: 48px; }
.doc .meta { color: var(--muted); margin-top: -.3em; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin: .25em 0; }
.note {
  background: var(--panel); border-left: 6px solid var(--left);
  border-radius: 12px; padding: 14px 18px; margin: 1.2em 0;
}
.note p:first-child { margin-top: 0; } .note p:last-child { margin-bottom: 0; }
.mail { font-weight: 800; font-size: 1.15rem; }

main details {
  background: var(--panel); border-radius: 14px; margin: 12px 0;
  border: 3px solid var(--ink); box-shadow: 0 0 0 2px var(--line);
}
main summary {
  cursor: pointer; padding: 14px 18px; font-weight: 800;
  font-family: "Baloo 2", system-ui, sans-serif; font-size: 1.15rem; line-height: 1.3;
  list-style: none; position: relative; padding-right: 44px;
}
summary::-webkit-details-marker { display: none; }
main summary::after {
  content: "+"; position: absolute; right: 18px; top: 10px;
  color: var(--warn); font-size: 1.5rem;
}
main details[open] summary::after { content: "–"; }
main details > div { padding: 0 18px 14px; }
main details > div > p:first-child { margin-top: 0; }

table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: .98rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--warn); font-family: "Baloo 2", system-ui, sans-serif; }
.table-scroll { overflow-x: auto; }

/* ---------- 404 ---------- */
.lost { text-align: center; padding: 56px 0 72px; }
.lost img { width: 160px; margin: 0 auto 12px; border-radius: 36px; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 2px solid var(--panel);
  padding: 28px 0 40px; color: var(--muted); font-size: .95rem;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; }
.site-footer a { color: var(--fg); font-weight: 700; }
.site-footer p { margin: .3em 0; }

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

/* Placeholder text that must be filled in before publishing (see README). */
.todo {
  background: var(--warn); color: var(--ink);
  padding: 0 .3em; border-radius: 4px; font-weight: 800;
}

.section p { max-width: 72ch; }
