/* foursix.app — umgesetzt aus BRAND.md.
 *
 * Ein Messinstrument in einem dunklen Raum: alles auf dem Bildschirm ist eine
 * Messung, und was keine Messung ist, wird nicht gezeichnet.
 *
 * Die Kontraste sind gerechnet, nicht geschaetzt. Die frueher benutzte 34-%-Stufe
 * ergab rund 2,2:1 und fiel durch WCAG AA; sie existiert hier nicht mehr. Was keine
 * 7:1 wert ist, ist es nicht wert, gezeigt zu werden.
 */

:root {
  --ground: #0b0d0e;
  --surface-1: #14181a;
  --surface-2: #1c2124;
  --rule: #262b2f;
  --rule-strong: #2e3438;

  --ink-1: #f2efe9; /* 16,97:1 */
  --ink-2: #c9c6c0; /* 11,43:1 */
  --ink-3: #9aa0a4; /*  7,36:1 */
  --ink-4: #6b7176; /*  3,94:1 — NUR Nicht-Text */

  --pulse: #e9a63c;  /* gemessene Physiologie, sonst nichts */
  --device: #8fb6d6; /* Maschinenzustand, nie zusammen mit pulse */

  --font-text: "Inter Tight", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
               system-ui, sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-7: 32px; --s-8: 48px; --s-9: 64px; --s-10: 96px;

  --measure: 33rem;
  --gutter: clamp(20px, 5vw, 48px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink-2);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* Jede Ziffer ist tabellarisch mit geschlitzter Null. Auch Ziffern mitten im Satz,
   damit eine Zahl nie mit Prosa verwechselt wird. */
.num, .value { font-family: var(--font-data); font-variant-numeric: tabular-nums slashed-zero; }

/* ---------- Kopf ---------- */

header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 13, 14, 0.86);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}
header.scrolled { border-bottom-color: var(--rule); }
header .wrap { display: flex; align-items: center; gap: var(--s-6); min-height: 60px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink-1); text-decoration: none;
  font-family: var(--font-data); font-size: 1.05rem; font-weight: 500; letter-spacing: 0.02em;
}
.brand img { width: 24px; height: 24px; display: block; }
/* Der Bindestrich ist bernsteinfarben, aus demselben Grund wie der Punkt im
   Zeichen: das Verhaeltnis ist deins und es wurde gemessen. */
.brand .dash { color: var(--pulse); }

nav.main { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px); margin-left: var(--s-7); }
nav.main a { color: var(--ink-3); text-decoration: none; font-size: 0.94rem; transition: color 0.2s; }
nav.main a:hover, nav.main a.here { color: var(--ink-1); }

.rail { margin-left: auto; display: flex; align-items: center; gap: var(--s-4); }
.lang {
  font-family: var(--font-data); font-size: 0.75rem; letter-spacing: 0.08em;
  color: var(--ink-4); text-decoration: none;
  border: 1px solid var(--rule); border-radius: 4px; padding: 3px 8px;
}
.lang:hover { color: var(--ink-1); border-color: var(--rule-strong); }
.signin { color: var(--ink-3); text-decoration: none; font-size: 0.94rem; }
.signin:hover { color: var(--ink-1); }

/* ---------- Knopf. 10 px ist der groesste Radius im Produkt. ---------- */

.btn {
  display: inline-block; padding: 11px 20px; border-radius: 10px;
  background: var(--ink-1); color: var(--ground);
  font-weight: 500; font-size: 0.94rem; text-decoration: none;
  border: 1px solid var(--ink-1);
}
.btn:hover { background: #fff; color: var(--ground); }
.btn.quiet { background: transparent; color: var(--ink-2); border-color: var(--rule-strong); }
.btn.quiet:hover { color: var(--ink-1); border-color: var(--ink-4); background: transparent; }
.btn.small { padding: 7px 14px; font-size: 0.88rem; }

/* ---------- Typografie. Nur die Schnitte 400 und 500. ---------- */

h1 {
  font-size: clamp(2rem, 4.6vw, 3rem); font-weight: 500; line-height: 1.14;
  letter-spacing: -0.022em; color: var(--ink-1);
  margin: 0 0 var(--s-5); max-width: 20ch; text-wrap: balance;
}
h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem); font-weight: 500; line-height: 1.24;
  letter-spacing: -0.015em; color: var(--ink-1);
  margin: 0 0 var(--s-4); max-width: 26ch; text-wrap: balance;
}
h3 { font-size: 1rem; font-weight: 500; color: var(--ink-1); margin: 0 0 var(--s-2); }

p { margin: 0 0 var(--s-4); max-width: var(--measure); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
.lead { font-size: 1.12rem; color: var(--ink-1); max-width: 42ch; }

a { color: var(--pulse); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink-1); }

.label {
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ink-3); margin: 0 0 var(--s-3);
}

section { padding: clamp(48px, 8vh, 88px) 0; }
section + section { border-top: 1px solid var(--rule); }

/* ---------- Hero ---------- */

.hero { padding: clamp(40px, 7vh, 72px) 0 clamp(44px, 8vh, 80px); }
.hero-grid { display: grid; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (min-width: 56rem) { .hero-grid { grid-template-columns: 1.05fr 0.95fr; } }
.hero .btn { margin-top: var(--s-6); }

.breather { position: relative; width: min(272px, 62vw); aspect-ratio: 1; margin: 0 auto; display: grid; place-items: center; }
.breather .track { position: absolute; inset: 6%; border-radius: 50%; border: 1px solid var(--rule); }
.breather .ring {
  position: absolute; inset: 6%; border-radius: 50%;
  border: 2px solid var(--ink-1); will-change: transform; transform: scale(0.78);
}
.breather .phase {
  font-family: var(--font-data); font-size: 0.78rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-3);
}

.rsa { width: 100%; height: 74px; display: block; margin-top: var(--s-5); }
.rsa-note { font-size: 0.82rem; color: var(--ink-3); text-align: center; margin: var(--s-2) auto 0; max-width: 36ch; }

/* ---------- Die Wert-Komponente ---------- */

.readings { border: 1px solid var(--rule); border-radius: 4px; background: var(--surface-1); max-width: 40rem; margin-top: var(--s-6); }
.reading { padding: var(--s-5) var(--s-6); }
.reading + .reading { border-top: 1px solid var(--rule); }

.reading .top { display: flex; align-items: baseline; gap: var(--s-4); }
.reading .name { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3); }
.reading .value { margin-left: auto; font-size: 1.55rem; font-weight: 400; color: var(--ink-1); line-height: 1.1; white-space: nowrap; }
.reading .value .unit { font-size: 0.55em; color: var(--ink-3); margin-left: 0.15em; }

/* Schiene: 2 px, eckige Enden, nie eine Pille. */
.strip { position: relative; height: 2px; background: var(--rule-strong); margin: var(--s-5) 0 var(--s-2); }
.strip .band { position: absolute; height: 2px; background: var(--ink-4); }
.strip .tick { position: absolute; width: 2px; height: 14px; top: -6px; background: var(--pulse); }
.strip.ungraded { background: none; border-top: 2px dashed var(--rule-strong); }
.strip .placeholder { position: absolute; width: 12px; height: 2px; top: 0; background: var(--ink-4); }

.axis { display: flex; justify-content: space-between; font-family: var(--font-data); font-size: 0.8rem; color: var(--ink-3); }
.axis.none { justify-content: center; }
.provenance { font-size: 0.75rem; color: var(--ink-3); margin: var(--s-2) 0 0; max-width: none; }
.verdict { color: var(--ink-1); margin: var(--s-3) 0 0; font-size: 0.98rem; max-width: none; }
.because { color: var(--ink-2); font-size: 0.88rem; margin: 2px 0 0; max-width: none; }

/* ---------- Raster ---------- */

.cols { display: grid; grid-template-columns: 1fr; gap: clamp(22px, 3.5vw, 40px); margin-top: var(--s-6); }
@media (min-width: 44rem) { .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cols p { margin-bottom: 0; }

.steps { margin-top: var(--s-6); }
.step { display: grid; grid-template-columns: auto 1fr; gap: var(--s-5); padding: var(--s-5) 0; border-top: 1px solid var(--rule); }
.step:last-child { border-bottom: 1px solid var(--rule); }
.step .n { font-family: var(--font-data); color: var(--ink-4); font-size: 0.9rem; padding-top: 3px; }
.step p:last-child { margin-bottom: 0; }

dl.faq { margin: var(--s-6) 0 0; }
dl.faq dt { color: var(--ink-1); font-weight: 500; margin-top: var(--s-7); }
dl.faq dd { margin: var(--s-2) 0 0; max-width: var(--measure); }

.foot-cta { border: 1px solid var(--rule); border-radius: 4px; background: var(--surface-1); padding: clamp(28px, 5vw, 44px); text-align: center; }
.foot-cta h2 { margin: 0 auto var(--s-3); text-align: center; }
.foot-cta p { margin: 0 auto var(--s-5); text-align: center; }

footer { border-top: 1px solid var(--rule); padding: var(--s-8) 0 var(--s-9); color: var(--ink-3); font-size: 0.85rem; }
footer p { max-width: 48rem; margin: 0 0 var(--s-3); }
footer .links { display: flex; flex-wrap: wrap; gap: var(--s-5); }
footer a { color: var(--ink-3); }
footer a:hover { color: var(--ink-1); }

/* ---------- Textseiten ---------- */

.doc { padding-top: clamp(40px, 7vh, 72px); padding-bottom: var(--s-9); max-width: calc(46rem + 2 * var(--gutter)); margin-inline: auto; }
.doc h1 { font-size: clamp(1.7rem, 3.4vw, 2.2rem); }
.doc h2 { font-size: 1.1rem; margin-top: var(--s-8); letter-spacing: 0; }
.doc .updated { font-family: var(--font-data); color: var(--ink-3); font-size: 0.85rem; margin: calc(var(--s-3) * -1) 0 var(--s-7); }

@media (max-width: 44rem) {
  header .wrap { flex-wrap: wrap; min-height: 0; padding-top: 10px; padding-bottom: 10px; }
  nav.main { order: 3; width: 100%; margin: 8px 0 0; justify-content: space-between; }
  .rail { margin-left: auto; }
  .lang { display: none; }
}
