/* Kopfrechnen — landing site
 * Cream + level palette pulled from the Android resource colors so the site
 * visually matches the app. Mobile-first, no JS, no analytics. */

:root {
  --bg: #fbf7f0;
  --surface-1: #f1ece2;
  --surface-2: #e7e0d2;
  --ink: #1c1c1e;
  --ink-secondary: #5a5a5c;
  --hairline: #d8d2c4;
  --teal: #0fae9e;
  --teal-light: #cfeee9;
  --blue: #5ba8e8;
  --blue-light: #dceaf7;
  --coral: #e8825b;
  --coral-light: #fbe4d6;
  --purple: #8a6be8;
  --purple-light: #e2d8fb;
  --yellow: #e8c56b;
  --yellow-light: #faecc6;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);
}

* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text",
               "Inter", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.wide { max-width: 760px; }

/* Header */
header {
  padding: 24px 0 16px;
  position: sticky;
  top: 0;
  background: rgba(251, 247, 240, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  z-index: 10;
  border-bottom: 1px solid transparent;
}
header.scrolled { border-bottom-color: var(--hairline); }
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
}
.brand img { width: 36px; height: 36px; border-radius: 8px; }
nav { float: right; }
nav a {
  margin-left: 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-secondary);
}
nav a:hover { color: var(--ink); text-decoration: none; }

/* Hero */
.hero {
  padding: 64px 0 56px;
  text-align: center;
}
.hero h1 {
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  font-weight: 800;
}
.hero p.lead {
  font-size: 19px;
  color: var(--ink-secondary);
  max-width: 620px;
  margin: 0 auto 36px;
}
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 14px 24px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: #0d998a; }
.btn-ghost { background: var(--surface-1); color: var(--ink); }

/* Sections */
section { padding: 56px 0; }
section h2 {
  font-size: 32px;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
  font-weight: 800;
}
section p.section-lead {
  font-size: 17px;
  color: var(--ink-secondary);
  margin: 0 0 32px;
  max-width: 640px;
}

/* Operation tiles preview row */
.op-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 36px 0 0;
}
.op-tile {
  border-radius: 22px;
  padding: 28px 18px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}
.op-tile .symbol {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.op-tile .glyph { font-size: 84px; font-weight: 800; line-height: 1; }
.op-tile .dot {
  width: 22px; height: 22px; border-radius: 50%;
}
.op-tile .colon { display: flex; flex-direction: column; gap: 12px; }
.op-tile .colon .dot { width: 14px; height: 14px; }
.op-tile .label { font-weight: 700; font-size: 16px; margin-top: 14px; }
.op-tile .desc { font-size: 12px; color: var(--ink-secondary); margin-top: 2px; }

/* Tile background uses the soft pastel; the symbol uses the strong tint.
 * .glyph is text (Plus / Minus) — only colour the type, no background.
 * .dot is a real circle (Mal / Geteilt) — only colour the fill. */
.op-plus    { background: var(--teal-light); }
.op-plus    .glyph { color: var(--teal); }
.op-minus   { background: var(--coral-light); }
.op-minus   .glyph { color: var(--coral); }
.op-mal     { background: var(--purple-light); }
.op-mal     .dot   { background-color: var(--purple); }
.op-geteilt { background: var(--yellow-light); }
.op-geteilt .dot   { background-color: var(--yellow); }

/* 4-column layout: tile on top, Stufen-list below, same width per column. */
.op-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 36px;
}
.op-column { display: flex; flex-direction: column; gap: 12px; }
.stufen-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stufe {
  background: var(--surface-1);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.stufe .num {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
  width: 26px;
  text-align: center;
}
.stufe .text {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.stufe .text .lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stufe .text .title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.stufe .arrow {
  color: var(--ink-secondary);
  font-size: 22px;
  font-weight: 400;
  flex-shrink: 0;
  line-height: 1;
}

/* Big-number colour matches the Bayern level palette. */
.lvl-1 .num { color: var(--teal); }
.lvl-2 .num { color: var(--blue); }
.lvl-3 .num { color: var(--purple); }
.lvl-4 .num { color: var(--coral); }
.lvl-5 .num { color: var(--yellow); }
.lvl-7 .num { color: var(--purple); }
.lvl-8 .num { color: var(--blue); }

/* Strategy rows: shown inside Mal/Geteilt columns below the Stufe row.
 * Same pill shape as .stufe, but no big number — text-only with title,
 * description, and exercise count. */
.strat {
  background: var(--surface-1);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.strat .text {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.strat .text .title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.strat .text .lbl {
  font-size: 12px;
  color: var(--ink-secondary);
  line-height: 1.4;
  margin-top: 2px;
}
.strat .text .count {
  font-size: 11px;
  color: var(--ink-secondary);
  font-weight: 600;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.strat .arrow {
  color: var(--ink-secondary);
  font-size: 22px;
  font-weight: 400;
  flex-shrink: 0;
  line-height: 1;
}

@media (max-width: 720px) {
  .op-columns { grid-template-columns: repeat(2, 1fr); }
}

/* Feature cards */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 24px;
}
.feature h3 {
  font-size: 17px;
  margin: 0 0 8px;
  font-weight: 700;
}
.feature p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-secondary);
}

/* Screenshot row */
.screens {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: center;
}
.screens img {
  border-radius: 28px;
  box-shadow: var(--shadow);
  max-height: 640px;
  margin: 0 auto;
}

/* Privacy callout */
.privacy-callout {
  background: var(--teal-light);
  border-radius: 24px;
  padding: 40px 32px;
  text-align: center;
}
.privacy-callout h2 { color: var(--teal); }

/* Article (legal pages) */
article {
  padding: 32px 0 64px;
  max-width: 760px;
  margin: 0 auto;
}
article h1 {
  font-size: 38px;
  letter-spacing: -0.015em;
  margin: 0 0 28px;
}
article h2 {
  font-size: 22px;
  margin: 32px 0 12px;
}
article p { margin: 0 0 16px; }
article ul { padding-left: 22px; }
article li { margin-bottom: 6px; }
article .meta { color: var(--ink-secondary); font-size: 14px; margin-bottom: 24px; }

/* Footer */
footer {
  padding: 40px 0 56px;
  border-top: 1px solid var(--hairline);
  background: var(--surface-1);
  margin-top: 48px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 28px;
}
.footer-grid h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-secondary);
  margin: 0 0 12px;
}
.footer-grid a {
  display: block;
  color: var(--ink);
  font-size: 14px;
  padding: 4px 0;
}
.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  color: var(--ink-secondary);
  font-size: 13px;
}

/* Mobile */
@media (max-width: 720px) {
  .hero { padding: 40px 0 32px; }
  .hero h1 { font-size: 38px; }
  .hero p.lead { font-size: 17px; }
  section { padding: 36px 0; }
  section h2 { font-size: 26px; }
  nav a { margin-left: 14px; font-size: 13px; }
  .op-grid { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: 1fr; }
  .screens { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
