/* Tabletten Tracker – ruhige App-Seite im Stil der App */

:root {
  --ground: #ffffff;
  --ground-soft: #f5f6f8;
  --ink: #111418;
  --ink-soft: #4d5560;
  --ink-faint: #6b7380;
  --rule: #e4e7eb;
  --accent: #0a6fe0;
  --accent-ink: #ffffff;
  --mesh-a: #bff0e6;
  --mesh-b: #d6dcff;
  --mesh-c: #f1ddff;
  --device: #16191d;
  --shadow: 0 1px 2px rgb(17 20 24 / 6%), 0 24px 48px -12px rgb(17 20 24 / 22%);
  --focus: #0a6fe0;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --step--1: 0.9375rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.625rem, 1.2rem + 1.6vw, 2.25rem);
  --step-3: clamp(2.375rem, 1.5rem + 3.4vw, 4rem);
  --gutter: clamp(20px, 5vw, 56px);
  --max: 1160px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0d0f12;
    --ground-soft: #15181c;
    --ink: #eef1f4;
    --ink-soft: #b2bac4;
    --ink-faint: #8e97a3;
    --rule: #262a30;
    --accent: #4da3ff;
    --accent-ink: #06121f;
    --mesh-a: #0f4a45;
    --mesh-b: #222a66;
    --mesh-c: #3d2357;
    --device: #000000;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 24px 48px -12px rgb(0 0 0 / 70%);
    --focus: #4da3ff;
    color-scheme: dark;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}

::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--ink); }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 2px; }

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin: 0;
}

p { margin: 0; text-wrap: pretty; }

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

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--ground);
  border-radius: 8px;
  z-index: 20;
}
.skip:focus { top: 12px; }

/* Kopfzeile */
header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
header.site.scrolled { border-bottom-color: var(--rule); }
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }
nav.site { display: flex; gap: 4px; font-size: var(--step--1); }
nav.site a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  transition: color 0.15s, background-color 0.15s;
}
nav.site a:hover { color: var(--ink); background: var(--ground-soft); }
nav.site a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* Store-Button */
.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 24px 8px 20px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--ground);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.16s var(--ease-out), opacity 0.16s;
}
.store svg { width: 20px; height: 20px; flex: none; }
.store:hover { text-decoration: none; opacity: 0.88; }
.store:active { transform: scale(0.97); }
.store small { display: block; font-size: 11px; font-weight: 500; opacity: 0.7; line-height: 1.1; }
.store span { line-height: 1.15; }
.store[aria-disabled="true"] { cursor: default; }
.store[aria-disabled="true"]:hover { opacity: 1; }
.store[aria-disabled="true"]:active { transform: none; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
  padding-top: clamp(40px, 7vw, 96px);
  padding-bottom: clamp(56px, 8vw, 112px);
}
.hero h1 { font-size: var(--step-3); font-weight: 700; letter-spacing: -0.035em; }
.hero .lead {
  margin-top: 24px;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 34ch;
}
.hero .actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.hero .facts {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.hero .facts li { display: flex; align-items: center; gap: 8px; }
.hero .facts svg { width: 16px; height: 16px; color: var(--accent); flex: none; }

/* Gerät */
.stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(24px, 4vw, 48px) 0;
}
@media (prefers-color-scheme: light) {
  .stage::before {
    content: "";
    position: absolute;
    inset: -6% -10%;
    -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent);
    mask-image: radial-gradient(closest-side, #000 55%, transparent);
    background:
      radial-gradient(70% 60% at 15% 20%, var(--mesh-a), transparent 70%),
      radial-gradient(60% 55% at 90% 30%, var(--mesh-b), transparent 70%),
      radial-gradient(70% 60% at 60% 95%, var(--mesh-c), transparent 70%);
    z-index: -1;
  }
}

.device {
  width: min(300px, 72vw);
  border-radius: 48px;
  padding: 9px;
  background: var(--device);
  box-shadow: var(--shadow);
  margin: 0;
}
.device img {
  width: 100%;
  height: auto;
  aspect-ratio: 1206 / 2622;
  border-radius: 40px;
  background: var(--ground-soft);
}
.device.small { width: min(310px, 72vw); }
.device { position: relative; }
.device.island::after {
  content: "";
  position: absolute;
  top: 4.2%;
  left: 50%;
  width: 31%;
  aspect-ratio: 3.4;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #000;
}
.caption {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-faint);
}

@media (prefers-reduced-motion: no-preference) {
  .hero .device { animation: settle 0.9s var(--ease-out) both; }
  @keyframes settle {
    from { opacity: 0; transform: translateY(24px) scale(0.98); }
  }
}

/* Funktionsabschnitte */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
  padding-block: clamp(56px, 7vw, 96px);
  border-top: 1px solid var(--rule);
}
.feature.flip .text { order: 2; }
.feature h2 { font-size: var(--step-2); font-weight: 700; }
.feature .text > p { margin-top: 18px; color: var(--ink-soft); max-width: 46ch; }
.feature .text > p + p { margin-top: 12px; }
.feature ul.points {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  max-width: 46ch;
}
.feature ul.points li { display: grid; grid-template-columns: 20px 1fr; gap: 12px; color: var(--ink-soft); }
.feature ul.points svg { width: 18px; height: 18px; margin-top: 4px; color: var(--accent); }
.feature ul.points strong { color: var(--ink); font-weight: 600; }

/* Tagerechner */
.counter {
  margin-top: 36px;
  padding-block: 20px;
  border-block: 1px solid var(--rule);
  max-width: 460px;
}
.counter h3 { font-size: var(--step-0); font-weight: 600; letter-spacing: -0.01em; }
.counter .row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 16px; }
.counter label { font-size: var(--step--1); color: var(--ink-soft); }
.counter input[type="date"] {
  font: inherit;
  font-size: var(--step--1);
  color: var(--ink);
  background: var(--ground-soft);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 8px 10px;
  min-height: 42px;
}
.counter .check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.counter input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.counter output {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}
.counter output b {
  font-family: var(--font-display);
  font-size: 2.75rem;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
}
.counter output span { color: var(--ink-soft); font-size: var(--step--1); }
.counter output b.tick { animation: tick 0.35s var(--ease-out); }
@keyframes tick { from { opacity: 0.2; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .counter output b.tick { animation: none; } }
.counter noscript p { margin-top: 12px; font-size: var(--step--1); color: var(--ink-soft); }

/* Privatsphäre */
.privacy {
  padding-block: clamp(64px, 9vw, 120px);
  border-top: 1px solid var(--rule);
}
.privacy h2 { font-size: var(--step-2); font-weight: 700; max-width: 20ch; }
.privacy > p { margin-top: 18px; color: var(--ink-soft); max-width: 56ch; }
.privacy dl {
  margin: 48px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px clamp(24px, 4vw, 56px);
}
.privacy dt { font-weight: 600; font-size: var(--step-1); letter-spacing: -0.015em; }
.privacy dd { margin: 8px 0 0; color: var(--ink-soft); }

/* Hinweis */
.notice {
  margin-bottom: clamp(56px, 8vw, 96px);
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: var(--step--1);
  max-width: 72ch;
}
.notice strong { color: var(--ink); }

/* Abschluss */
.closing {
  text-align: center;
  padding-block: clamp(64px, 9vw, 120px);
  border-top: 1px solid var(--rule);
}
.closing img { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 28px; box-shadow: var(--shadow); }
.closing h2 { font-size: var(--step-2); font-weight: 700; }
.closing p { margin: 14px auto 0; color: var(--ink-soft); max-width: 44ch; }
.closing .store { margin-top: 32px; }

/* Textseiten */
main.doc { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(64px, 8vw, 96px); max-width: calc(72ch + 2 * var(--gutter)); }
main.doc h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); font-weight: 700; overflow-wrap: anywhere; hyphens: auto; }
main.doc .meta { color: var(--ink-faint); margin: 10px 0 40px; }
main.doc h2 { font-size: var(--step-1); font-weight: 650; letter-spacing: -0.015em; margin: 44px 0 10px; }
main.doc p + p { margin-top: 12px; }
main.doc ul { padding-left: 22px; margin: 12px 0; }
main.doc li { margin: 6px 0; }
main.doc .summary {
  padding-block: 4px 24px;
  border-bottom: 1px solid var(--rule);
}
main.doc .summary h2 { margin-top: 0; }
main.doc .muted { color: var(--ink-soft); }

/* FAQ */
.faq { margin-top: 8px; }
details { border-bottom: 1px solid var(--rule); }
summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-right: 1.75px solid var(--ink-faint);
  border-bottom: 1.75px solid var(--ink-faint);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.2s var(--ease-out);
}
details[open] summary::after { transform: translateY(2px) rotate(225deg); }
details p { padding-bottom: 18px; color: var(--ink-soft); }

/* Fußzeile */
footer.site {
  border-top: 1px solid var(--rule);
  padding: 32px 0 48px;
  color: var(--ink-faint);
  font-size: 14px;
}
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 20px; }
footer.site a { color: var(--ink-soft); text-decoration: none; }
footer.site a:hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 860px) {
  .hero, .feature { grid-template-columns: minmax(0, 1fr); }
  .hero { text-align: left; }
  .feature .media, .feature.flip .text { order: 0; }
  .feature .media { order: 2; }
  .privacy dl { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 520px) {
  .brand span { display: none; }
  nav.site a { padding: 6px 10px; }
}

.feature .media { display: grid; justify-items: center; }
[id] { scroll-margin-top: 88px; }

@media (prefers-color-scheme: dark) {
  .device { box-shadow: 0 0 0 1px rgb(255 255 255 / 14%), var(--shadow); }
}
