/* wortspielwelt.de - one stylesheet for every page.
   System fonts only (no font files, nothing loaded from other hosts), light and dark via prefers-color-scheme. */

:root {
  color-scheme: light dark;
  --bg: #f7f4ee;
  --surface: #ffffff;
  --surface-2: #efebe3;
  --text: #1f1d1a;
  --muted: #5f5a52;
  --line: #ddd6ca;
  --link: #1f5f8b;
  --tile-green: #538d4e;
  --tile-yellow: #b59f3b;
  --tile-gray: #787c7e;
  --accent: #538d4e;
  --ph-bg: #fff1b8;
  --ph-line: #c99a00;
  --ph-text: #5a4300;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 4px 16px rgb(0 0 0 / 0.06);
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, ui-serif, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121316;
    --surface: #1c1d21;
    --surface-2: #26272c;
    --text: #ecebe8;
    --muted: #a9a59d;
    --line: #34353b;
    --link: #8cc4ef;
    --accent: #6fb46a;
    --ph-bg: #3d3210;
    --ph-line: #d4a72c;
    --ph-text: #ffe08a;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 4px 16px rgb(0 0 0 / 0.3);
  }
}

/* Per-app accent colours, set on <body>. */
.app-galaxie { --accent: #c9a24a; }
.app-fuenf, .app-flf { --accent: #538d4e; }
@media (prefers-color-scheme: dark) {
  .app-galaxie { --accent: #e3c06a; }
  .app-fuenf, .app-flf { --accent: #6fb46a; }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  overflow-wrap: break-word;
}

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

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: 62rem; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }
.narrow { max-width: 46rem; }

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

/* ---------- Header ---------- */

.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px;
}

.brand { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text); }
.brand .tiles { display: inline-flex; gap: 3px; }
.brand .tiles span {
  display: inline-grid; place-items: center;
  width: 1.55em; height: 1.55em; border-radius: 4px;
  font: 700 15px/1 var(--sans); color: #fff; text-transform: uppercase;
}
.brand .tiles span:nth-child(1) { background: var(--tile-green); }
.brand .tiles span:nth-child(2) { background: var(--tile-yellow); }
.brand .tiles span:nth-child(3) { background: var(--tile-gray); }
.brand .tiles span:nth-child(4) { background: var(--tile-green); }
.brand .rest { font: 600 21px/1 var(--serif); letter-spacing: 0.01em; }

.site-nav { display: flex; gap: 4px 16px; flex-wrap: wrap; font-size: 15px; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 4px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }

/* ---------- Typography ---------- */

main { padding: 32px 0 56px; }
@media (min-width: 700px) { main { padding: 48px 0 72px; } }

h1, h2, h3 { font-family: var(--serif); line-height: 1.2; font-weight: 600; }
h1 { font-size: clamp(30px, 6vw, 46px); margin: 0 0 12px; letter-spacing: -0.01em; }
h2 { font-size: clamp(22px, 3.6vw, 28px); margin: 44px 0 12px; }
h3 { font-size: 19px; margin: 28px 0 6px; font-family: var(--sans); }
p, ul, ol, dl { margin: 0 0 14px; }
ul { padding-left: 1.25em; }
li + li { margin-top: 4px; }

.lead { font-size: clamp(18px, 2.6vw, 21px); color: var(--muted); max-width: 40em; }
.small { font-size: 15px; color: var(--muted); }
.meta { font-size: 15px; color: var(--muted); margin-top: -4px; }

/* Placeholders that Peter fills in before going live. */
.ph {
  background: var(--ph-bg); color: var(--ph-text);
  border: 1px dashed var(--ph-line); border-radius: 4px;
  padding: 0 4px; font-weight: 600; white-space: normal;
}

.note {
  background: var(--surface-2); border-left: 4px solid var(--accent);
  border-radius: 6px; padding: 12px 16px; margin: 18px 0;
}

/* ---------- Start page ---------- */

.hero { padding-bottom: 8px; }
.hero h1 { font-size: clamp(34px, 7vw, 56px); }

.tiles-grid {
  display: grid; gap: 18px; margin: 32px 0 8px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
}

.app-tile {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.app-tile:hover { transform: translateY(-2px); }
.app-tile img { width: 88px; height: 88px; border-radius: 20px; }
.app-tile h2 { margin: 4px 0 0; font-size: 24px; }
.app-tile h2 a { color: var(--text); text-decoration: none; }
/* The title link covers the whole tile; the small links below sit above it. */
.app-tile h2 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.app-tile p { margin: 0; color: var(--muted); }
.app-tile .chips { margin-top: auto; }
.app-tile .tile-links { position: relative; z-index: 1; font-size: 15px; display: flex; gap: 14px; flex-wrap: wrap; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; margin: 0; }
.chips li {
  margin: 0; font-size: 13px; line-height: 1; padding: 6px 9px; border-radius: 99px;
  background: var(--surface-2); color: var(--muted);
}

.promise {
  display: grid; gap: 14px; padding: 0; list-style: none;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
}
.promise li { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.promise strong { display: block; }

/* ---------- App pages ---------- */

.app-hero { display: grid; gap: 20px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 640px) { .app-hero { grid-template-columns: auto 1fr; gap: 28px; } }
.app-hero .icon { width: 120px; height: 120px; border-radius: 27px; box-shadow: var(--shadow); }
@media (min-width: 640px) { .app-hero .icon { width: 148px; height: 148px; border-radius: 33px; } }
.app-hero h1 { margin-bottom: 4px; }
.app-hero .subtitle { font: 600 19px/1.3 var(--sans); color: var(--accent); margin: 0 0 10px; }

.store-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 16px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--text); color: var(--bg); border-radius: 10px;
  padding: 10px 16px; font-weight: 600; text-decoration: none;
}
.store-btn.pending { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--line); }

.subnav {
  display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 28px; padding: 0; list-style: none;
}
.subnav li { margin: 0; }
.subnav a {
  display: inline-block; padding: 7px 14px; border-radius: 99px; text-decoration: none;
  border: 1px solid var(--line); color: var(--text); background: var(--surface); font-size: 15px;
}
.subnav a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .subnav a[aria-current="page"] { color: #111; } }

.crumbs { font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.crumbs a { color: var(--muted); }

/* Horizontal screenshot strip: scrolls inside itself, never widens the page. */
.shots {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 2px 14px; margin: 28px 0 8px; list-style: none;
}
.shots li { margin: 0; flex: 0 0 auto; scroll-snap-align: start; }
.shots figure { margin: 0; }
.shots img { border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.shots.portrait img { width: min(62vw, 230px); }
.shots.landscape img { width: min(86vw, 560px); }
.shots figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }

.features { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.features section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 6px; }
.features h3 { margin-top: 0; color: var(--accent); }

.faq dt { font-weight: 650; margin-top: 18px; }
.faq dd { margin: 4px 0 0; }

.lang-switch { font-size: 15px; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); background: var(--surface); font-size: 15px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; padding-top: 20px; padding-bottom: 24px; }
.site-footer nav { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

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