/*
 * CASDesk website — one stylesheet for every page, German and English.
 *
 * WHY no web fonts: fonts fetched from Google's servers send each visitor's IP
 * address to Google, which German courts have ruled needs consent (LG München I,
 * 2022). The system fonts look native on every device and need no banner.
 * WHY no framework: the site is a handful of static pages uploaded once; nothing
 * to update, nothing to break.
 */

:root {
  --navy: #1d3a7a;
  --navy-deep: #142a5c;
  --blue: #2c63d6;
  --wood: #b7793d;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --text: #1b2333;
  --muted: #55607a;
  --line: #d9deea;
  --shadow: 0 1px 2px rgba(20, 42, 92, .06), 0 12px 32px rgba(20, 42, 92, .10);
  --radius: 14px;
  --maxw: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --navy: #9db8ff;
    --navy-deep: #c9d7ff;
    --blue: #7ea6ff;
    --wood: #e0a96b;
    --bg: #0f1420;
    --surface: #161d2c;
    --surface-2: #1c2538;
    --text: #e6eaf3;
    --muted: #a3adc4;
    --line: #2a3550;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

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

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

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.2rem; }
.brand img { width: 36px; height: 36px; border-radius: 8px; }
.site-nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; }
.site-nav a { color: var(--text); text-decoration: none; font-size: .97rem; padding: 4px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--blue); }
.site-nav .lang {
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: .85rem;
}
.site-nav .soon { color: var(--muted); cursor: default; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero { padding: 64px 0 32px; text-align: center; }
.status {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 14px; font-size: .9rem; color: var(--muted);
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--wood); }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.3rem); line-height: 1.12; letter-spacing: -.02em;
  margin: 20px auto 16px; max-width: 18ch; color: var(--navy-deep);
}
.hero .lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--muted); max-width: 46rem; margin: 0 auto; }
.platforms { margin: 22px 0 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 10px; padding: 0; list-style: none; }
.platforms li { background: var(--surface-2); border-radius: 8px; padding: 3px 12px; font-size: .92rem; }

.shot {
  margin: 40px auto 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface);
}
.shot img { width: 100%; }
figure { margin: 0; }
figcaption { font-size: .9rem; color: var(--muted); padding: 10px 14px; border-top: 1px solid var(--line); background: var(--surface); text-align: left; }

/* ── Sections ─────────────────────────────────────────────── */
section { padding: 56px 0; }
section.alt { background: var(--surface); border-block: 1px solid var(--line); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); line-height: 1.2; margin: 0 0 12px; color: var(--navy-deep); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; margin: 0 0 6px; }
.intro { color: var(--muted); max-width: 44rem; margin: 0 0 32px; }

.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.mode {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
}
section.alt .mode { background: var(--bg); }
.mode .tag { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--wood); }
.mode p { margin: 6px 0 0; color: var(--muted); font-size: .97rem; }

.feature { display: grid; grid-template-columns: 1fr 1.25fr; gap: 40px; align-items: center; margin-top: 48px; }
.feature:first-of-type { margin-top: 8px; }
.feature.flip > :first-child { order: 2; }
.feature ul { padding-left: 1.1em; margin: 10px 0 0; color: var(--muted); }
.feature li { margin: 4px 0; }
.feature .shot { margin: 0; }
/* Portrait pictures of the Analysis mode: kept narrow so the text beside them leads. */
.feature .shot.tall { max-width: 460px; width: 100%; justify-self: center; }
@media (max-width: 820px) {
  .feature { grid-template-columns: 1fr; gap: 20px; }
  .feature.flip > :first-child { order: 0; }
}

/* A small label pairing the 2π/360° tags by text, not by colour alone. */
.tagpair { display: inline-flex; gap: 6px; vertical-align: middle; }
.tagpair span { font-size: .8rem; border-radius: 6px; padding: 0 6px; border: 1px solid var(--line); }
.t360 { background: #fde7da; color: #8a3b10; }
.t2pi { background: #dde9fb; color: #1d4c9c; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .t360 { background: #4a2a18; color: #ffcfae; }
  :root:not([data-theme="light"]) .t2pi { background: #1b3157; color: #bcd4ff; }
}

.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px 28px; margin-top: 8px; }
.points p { margin: 4px 0 0; color: var(--muted); }

.note {
  background: var(--surface-2); border-left: 4px solid var(--wood); border-radius: 8px;
  padding: 14px 18px; color: var(--text); margin-top: 24px; font-size: .97rem;
}

/* ── Plain text pages (Impressum, Datenschutz) ────────────── */
.page { padding: 48px 0 64px; }
.page .wrap { max-width: 760px; }
.page h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); color: var(--navy-deep); margin: 0 0 24px; }
.page h2 { font-size: 1.25rem; margin: 32px 0 8px; }
.page address { font-style: normal; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: .92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-left: auto; }
.site-footer a { color: var(--muted); }

@media (max-width: 640px) {
  .site-header .wrap { flex-wrap: wrap; gap: 6px 16px; padding-block: 10px; }
  .site-nav { margin-left: 0; width: 100%; }
  .hero { padding-top: 40px; }
  section { padding: 44px 0; }
}

/* ── Manual (Handbuch) ────────────────────────────────────── */
.manual { padding: 40px 0 64px; }
.manual .wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; }
.toc { position: sticky; top: 84px; font-size: .95rem; }
.toc h2 { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 5px 12px; margin-left: -2px; border-left: 2px solid transparent; color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--blue); }
.toc a[aria-current="page"] { border-left-color: var(--blue); color: var(--blue); font-weight: 600; }
.doc { max-width: 760px; }
.doc h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); color: var(--navy-deep); margin: 0 0 8px; }
.doc .stand { color: var(--muted); font-size: .92rem; margin: 0 0 28px; }
.doc h2 { font-size: 1.35rem; margin: 40px 0 10px; scroll-margin-top: 84px; }
.doc h3 { font-size: 1.08rem; margin: 26px 0 6px; scroll-margin-top: 84px; }
.doc p, .doc li { line-height: 1.65; }
.doc ol, .doc ul { padding-left: 1.3em; }
.doc li { margin: 4px 0; }
.doc figure.shot { margin: 18px 0 8px; }
.doc kbd {
  font: .88em/1.2 "Segoe UI", system-ui, sans-serif; background: var(--surface); border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; white-space: nowrap;
}
.doc .ui { font-weight: 600; }
.doc table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: .95rem; }
.doc th, .doc td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--muted); font-weight: 600; }
.doc .beta {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--wood); border: 1px solid currentColor; border-radius: 6px; padding: 0 6px; vertical-align: 2px;
}
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; }
.pager small { display: block; color: var(--muted); }
@media (max-width: 860px) {
  .manual .wrap { grid-template-columns: 1fr; gap: 16px; }
  .toc { position: static; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 4px 6px; border-left: 0; }
  .toc a { border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; margin: 0; }
  .toc a[aria-current="page"] { border-color: var(--blue); }
}
/* Typed input in the manual: the page's own font on a light chip, not a typewriter font,
   so x² + y² = 25 reads as mathematics rather than as code. */
.doc code { font: inherit; background: var(--surface-2); border-radius: 5px; padding: 0 5px; white-space: nowrap; }
