/* Viertelnach – Website. Farben wie die Farbwelt „Viertelnach“ der App:
   Graustufen, Akzente in Neongelb, Negatives in Rot. Dunkel als Standard, hell nach Systemeinstellung. */

:root {
  --bg: #171717;
  --surface: #1f1f1f;
  --raised: #262626;
  --line: #363636;
  --text: #f0f0f0;
  --soft: #a1a1a1;
  --faint: #6b6b6b;
  --accent: #ffef40;          /* Flächen, Markierungen */
  --accent-ink: #ffef40;      /* Akzent als Schrift */
  --on-accent: #141414;
  --negative: #e83b58;
  --ring-start: #ffffff;
  --ring-end: #4a4a4a;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
  --radius: 14px;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f5f5;
    --surface: #ffffff;
    --raised: #fafafa;
    --line: #dedede;
    --text: #1a1a1a;
    --soft: #5e5e5e;
    --faint: #9e9e9e;
    --accent-ink: #7a6a00;   /* Neongelb ist auf Weiß nicht lesbar */
    --ring-start: #1a1a1a;
    --ring-end: #c8c8c8;
    --shadow: 0 30px 70px -35px rgba(0, 0, 0, .35);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--accent-ink); }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 16px; }

/* Kopf */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; letter-spacing: -.01em; }
.brand img { border-radius: 7px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.site-nav a { text-decoration: none; color: var(--soft); padding: 7px 12px; border-radius: 999px; font-size: 15px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); background: var(--raised); }
.site-nav .nav-cta { background: var(--accent); color: var(--on-accent); font-weight: 600; margin-left: 6px; }
.site-nav .nav-cta:hover { background: var(--accent); color: var(--on-accent); filter: brightness(1.05); }
.menu-toggle { display: none; }

/* Knöpfe */
.button {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 999px;
  font-weight: 600; text-decoration: none; font-size: 16px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.button:hover { color: var(--text); border-color: var(--soft); }
.button.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.button.primary:hover { color: var(--on-accent); filter: brightness(1.05); }
.button svg { width: 18px; height: 18px; }

/* Startseite */
.hero { padding: 88px 0 72px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow { font: 600 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 18px; }
.hero h1 { font: 700 clamp(40px, 5.2vw, 62px)/1.04 var(--display); letter-spacing: -.035em; margin: 0 0 24px; }
.hero h1 em { font-style: normal; color: var(--accent-ink); }
.hero .lead { font-size: clamp(18px, 2vw, 21px); color: var(--soft); max-width: 34em; margin: 0 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-note { margin: 18px 0 0; font-size: 14px; color: var(--faint); }

.clock { position: relative; aspect-ratio: 1; width: min(460px, 100%); margin-inline: auto; }
.clock svg { width: 100%; height: 100%; overflow: visible; }
.clock .face { fill: var(--surface); }
.clock .readout {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
}
.clock .readout b { font: 500 clamp(40px, 6vw, 64px)/1 var(--mono); letter-spacing: -.03em; }
.clock .readout span { display: block; margin-top: 10px; color: var(--soft); font-size: 15px; }
.clock .readout i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px; }

.section { padding: 88px 0; border-top: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head h2 { font: 700 clamp(30px, 4vw, 44px)/1.08 var(--display); letter-spacing: -.03em; margin: 0 0 16px; }
.section-head p { color: var(--soft); font-size: 18px; margin: 0; }
.section-head .eyebrow, .split .eyebrow { color: var(--accent-ink); font-size: 12px; margin-bottom: 18px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; display: flex; flex-direction: column; gap: 10px;
}
.feature h3 { margin: 6px 0 0; font-size: 18px; letter-spacing: -.01em; }
.feature p { margin: 0; color: var(--soft); font-size: 15px; }
.feature a.more { margin-top: auto; padding-top: 8px; font-size: 14px; color: var(--soft); text-decoration: none; }
.feature a.more:hover { color: var(--accent-ink); }
.feature .icon { width: 40px; height: 40px; border-radius: 10px; background: var(--raised); border: 1px solid var(--line); display: grid; place-items: center; }
.feature .icon svg { width: 20px; height: 20px; stroke: var(--text); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.feature .icon .hi { stroke: var(--accent); }
.feature.wide { grid-column: span 2; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split h2 { font: 700 clamp(28px, 3.6vw, 40px)/1.1 var(--display); letter-spacing: -.03em; margin: 0 0 16px; }
.split p { color: var(--soft); font-size: 17px; }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 30px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--accent);
}
.checks li::after { content: ""; position: absolute; left: 6px; top: calc(.35em + 4px); width: 4px; height: 6px; border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* Nachgebaute Oberfläche (Beispieldaten) */
.mock {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); overflow: hidden; font-size: 14px;
}
.mock-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--raised); }
.mock-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.mock-bar span { margin-left: 10px; color: var(--soft); font-size: 13px; }
.mock-body { padding: 18px; display: grid; gap: 10px; }
.row { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.row small { display: block; color: var(--faint); font-size: 12px; }
.row .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.row .neg { color: var(--negative); }
.row .pos { color: var(--accent-ink); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: var(--soft); }
.total { display: flex; justify-content: space-between; padding: 12px 12px 2px; border-top: 1px solid var(--line); margin-top: 4px; font-weight: 600; }
.total .num { font-family: var(--mono); }
.timeline { display: grid; grid-template-columns: 44px 1fr; gap: 0 12px; font-size: 13px; }
.timeline .h { color: var(--faint); font-family: var(--mono); font-size: 11px; height: 38px; }
.timeline .lane { position: relative; border-left: 1px solid var(--line); }
.block { position: absolute; left: 8px; right: 8px; border-radius: 8px; padding: 6px 10px; background: var(--raised); border: 1px solid var(--line); overflow: hidden; }
.block b { display: block; font-weight: 600; }
.block small { color: var(--soft); font-family: var(--mono); font-size: 11px; }
.block.focus { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.block.plan { border: 1.5px dashed color-mix(in srgb, var(--accent) 70%, transparent); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.now { position: absolute; left: -4px; right: 0; height: 2px; background: var(--accent); }
.now::before { content: ""; position: absolute; left: -3px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.principle { padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); }
.principle b { display: block; font-size: 17px; margin-bottom: 6px; }
.principle p { margin: 0; color: var(--soft); font-size: 15px; }

.cta { text-align: center; padding: 96px 0; border-top: 1px solid var(--line); }
.cta img { width: 112px; border-radius: 26px; box-shadow: var(--shadow); }
.cta h2 { font: 700 clamp(32px, 4.4vw, 52px)/1.05 var(--display); letter-spacing: -.035em; margin: 28px 0 14px; }
.cta p { color: var(--soft); font-size: 18px; margin: 0 auto 30px; max-width: 34em; }

/* Dokumentation */
.docs { display: grid; grid-template-columns: 230px minmax(0, 1fr) 200px; gap: 48px; padding: 40px 0 96px; }
.sidebar, .toc { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; }
.side-group { margin-bottom: 22px; }
.side-group p, .toc p { font: 600 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin: 0 0 10px; }
.side-group ul, .toc ul { list-style: none; margin: 0; padding: 0; }
.side-group a { display: block; padding: 5px 10px; margin-left: -10px; border-radius: 8px; text-decoration: none; color: var(--soft); font-size: 15px; }
.side-group a:hover { color: var(--text); background: var(--raised); }
.side-group a[aria-current="page"] { color: var(--text); background: var(--raised); box-shadow: inset 2px 0 0 var(--accent); }
.toc a { display: block; padding: 4px 0; text-decoration: none; color: var(--faint); font-size: 13.5px; line-height: 1.4; }
.toc a:hover, .toc a.active { color: var(--text); }

.doc { min-width: 0; max-width: 760px; }
.doc h1 { font: 700 clamp(34px, 4.5vw, 46px)/1.08 var(--display); letter-spacing: -.03em; margin: 0 0 16px; }
.doc .eyebrow { color: var(--accent-ink); }
.doc .lead { font-size: 19px; color: var(--soft); margin: 0 0 36px; }
.doc h2 { font: 700 26px/1.25 var(--display); letter-spacing: -.02em; margin: 52px 0 14px; position: relative; }
.doc h3 { font-size: 18px; margin: 32px 0 8px; letter-spacing: -.01em; }
.doc p, .doc li { color: color-mix(in srgb, var(--text) 88%, var(--soft)); }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--faint); }
.anchor { position: absolute; left: -24px; color: var(--faint); text-decoration: none; opacity: 0; font-weight: 400; }
h2:hover .anchor { opacity: 1; }
.doc code, .plain code { font: .88em var(--mono); background: var(--raised); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
kbd { font: 600 .82em var(--mono); background: var(--raised); border: 1px solid var(--line); border-bottom-width: 2px; padding: 1px 7px; border-radius: 6px; white-space: nowrap; }
.path { font-weight: 600; }
.path::before { content: ""; }

.note, .warn, .tip {
  border: 1px solid var(--line); border-left: 3px solid var(--soft); background: var(--surface);
  padding: 14px 18px; border-radius: 10px; margin: 22px 0;
}
.note p, .warn p, .tip p { margin: 0; }
.note p + p, .warn p + p, .tip p + p { margin-top: 8px; }
.tip { border-left-color: var(--accent); }
.warn { border-left-color: var(--negative); }
.note strong:first-child, .tip strong:first-child, .warn strong:first-child { display: block; margin-bottom: 2px; }

.doc table { width: 100%; border-collapse: collapse; margin: 18px 0 26px; font-size: 15px; }
.doc th, .doc td { text-align: left; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { font: 600 12px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.doc td:first-child { white-space: nowrap; }
.steps { counter-reset: step; list-style: none; padding: 0 !important; }
.steps > li { counter-increment: step; position: relative; padding-left: 46px; margin: 18px 0; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -1px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font: 600 14px/1 var(--mono); background: var(--accent); color: var(--on-accent);
}
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 22px 0; }
.cards a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; background: var(--surface); }
.cards a:hover { border-color: var(--soft); color: var(--text); }
.cards b { display: block; }
.cards span { color: var(--soft); font-size: 14px; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line); }
.pager a { padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; font-weight: 600; }
.pager a:hover { border-color: var(--accent); color: var(--text); }
.pager span { display: block; font: 500 12px/1.6 var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.pager .next { grid-column: 2; text-align: right; }

details { border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; margin: 10px 0; background: var(--surface); }
details summary { cursor: pointer; padding: 15px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; font: 400 20px/1 var(--mono); color: var(--faint); }
details[open] summary::after { content: "–"; color: var(--accent-ink); }
details > *:not(summary) { margin-top: 0; }
details[open] { padding-bottom: 6px; }

/* Rechtliches */
.plain { max-width: 760px; padding: 56px 0 96px; }
.plain h1 { font: 700 40px/1.1 var(--display); letter-spacing: -.03em; }
.plain h2 { font-size: 21px; margin-top: 36px; }
.placeholder { background: color-mix(in srgb, var(--negative) 16%, transparent); border-radius: 4px; padding: 0 4px; }

/* Fuß */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0 56px; background: var(--surface); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; align-items: center; }
.footer-brand { display: flex; gap: 14px; align-items: center; }
.footer-brand img { border-radius: 9px; }
.footer-brand span { display: block; color: var(--soft); font-size: 14px; }
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-nav a { color: var(--soft); text-decoration: none; font-size: 15px; }
.footer-nav a:hover { color: var(--text); }
.footer-note { grid-column: 1 / -1; color: var(--faint); font-size: 13px; margin: 8px 0 0; }

/* Schmalere Fenster */
@media (max-width: 1100px) {
  .docs { grid-template-columns: 210px minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 900px) {
  .hero { padding: 56px 0 48px; }
  .hero-grid, .split { grid-template-columns: 1fr; gap: 40px; }
  .clock { width: min(340px, 86%); }
  .features { grid-template-columns: 1fr 1fr; }
  .feature.wide { grid-column: span 2; }
  .principles { grid-template-columns: 1fr 1fr; }
  .docs { grid-template-columns: 1fr; gap: 0; padding-top: 24px; }
  .sidebar { position: static; max-height: none; display: flex; gap: 8px; overflow-x: auto; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .side-group { margin: 0; display: contents; }
  .side-group p { display: none; }
  .side-group ul { display: contents; }
  .side-group li { flex: none; }
  .side-group a { margin: 0; white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 14px; }
  .side-group a[aria-current="page"] { box-shadow: none; border-color: var(--accent); }
  .anchor { display: none; }
}
@media (max-width: 720px) {
  .menu-toggle { display: grid; gap: 5px; margin-left: auto; width: 40px; height: 40px; place-content: center; background: none; border: 1px solid var(--line); border-radius: 10px; color: var(--text); cursor: pointer; }
  .menu-toggle span { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .site-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 12px 16px 18px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 14px; font-size: 17px; }
  .site-nav .nav-cta { margin: 6px 0 0; text-align: center; }
  .features, .principles, .cards { grid-template-columns: 1fr; }
  .feature.wide { grid-column: auto; }
  .section { padding: 64px 0; }
  .footer-inner { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: auto; }
  .row { grid-template-columns: 1fr auto; }
  .doc table { display: block; overflow-x: auto; }
  .doc td:first-child { white-space: normal; }
  .row > :nth-child(2) { display: none; }
}
