/*
 * Hintsight website – shared stylesheet for the landing page and the legal pages.
 *
 * Colours, radii, spacing and motion come from design/tokens.json (design language
 * "Neuronen", design/NEURONEN.md). Dark is the default; the light palette applies when the
 * system asks for it. No external requests: fonts are self-hosted (SIL OFL, licences next to
 * the font files), no CDN, no analytics, no cookies.
 *
 * Markup contract for the legal pages: see assets/legal-template.html.
 */

/* ---------------------------------------------------------------- Fonts */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/BricolageGrotesque-Variable.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Variable.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Variable.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ---------------------------------------------------------------- Tokens */

:root {
  color-scheme: dark light;

  /* color.dark.* */
  --bg: #07080a;
  --bg-sunken: #030405;
  --bg-raised: #101216;
  --bg-overlay: #171a20;
  --line: #23262e;
  --line-strong: #363b45;
  --text: #f2f4f7;
  --text-2: #a7aebb;
  --text-3: #7c8492;
  --text-inv: #0a0b0d;
  --ember: #ffae63;
  --ember-dim: #8a5e35;
  --thread: #7dd3c0;
  --insight: #a78bfa;
  --success: #5bd6a0;
  --warning: #f0c24b;
  --danger: #ff7a7a;
  --info: #6bc5e8;

  /* color.claim.dark.* – read by neurons.js as well */
  --c-fact: #6bc5e8;
  --c-decision: #a78bfa;
  --c-commitment: #ffae63;
  --c-open-question: #7dd3c0;
  --c-deadline: #ff7a7a;
  --c-preference: #e8a0d8;
  --c-relationship: #7ba0ea;
  --c-life-event: #b4e572;
  --c-concern: #e6dca7;
  --c-intention: #d96cef;

  /* Strength of the round glows (light mode glows less, NEURONEN rule 6). */
  --glow-strength: 1;
  --edge-alpha: 0.6;

  /* typography.families */
  --font-display: "Bricolage Grotesque", "Trebuchet MS", "Segoe UI", sans-serif;
  --font-text: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, monospace;
  --font-quote: "Instrument Serif", Georgia, "Times New Roman", serif;

  /* Fluid type, 360 px to 1600 px */
  --fs-hero: clamp(2.75rem, 1.9rem + 3.8vw, 5rem);
  --fs-h2: clamp(1.75rem, 1.35rem + 1.8vw, 2.75rem);
  --fs-h3: clamp(1.125rem, 1.05rem + 0.3vw, 1.3rem);
  --fs-lead: clamp(1.125rem, 1.02rem + 0.45vw, 1.375rem);
  --fs-body: 1.0625rem; /* bodyL 17 px */
  --fs-small: 0.9375rem; /* bodyM 15 px */
  --fs-overline: 0.75rem;

  /* radius.* */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* spacing.scale */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s7: 32px;
  --s8: 40px;
  --s9: 48px;
  --s10: 64px;

  --gutter: clamp(16px, 4vw, 40px);
  --content: 1160px;
  --section-gap: clamp(64px, 5rem + 3vw, 136px);

  /* motion.* */
  --ease-base: cubic-bezier(0.2, 0, 0, 1);
  --ease-quick: cubic-bezier(0.33, 1, 0.68, 1);
  --d-quick: 140ms;
  --d-base: 220ms;
}

@media (prefers-color-scheme: light) {
  :root {
    /* color.light.* */
    --bg: #faf9f7;
    --bg-sunken: #f1efeb;
    --bg-raised: #ffffff;
    --bg-overlay: #ffffff;
    --line: #e3dfd8;
    --line-strong: #ccc6bc;
    --text: #14161a;
    --text-2: #4b515c;
    --text-3: #5f6673;
    --text-inv: #ffffff;
    --ember: #a85e12;
    --ember-dim: #e0be94;
    --thread: #0f766e;
    --insight: #6d45d9;
    --success: #0e7a55;
    --warning: #8a6300;
    --danger: #c0392f;
    --info: #1e7fa6;

    /* color.claim.light.* */
    --c-fact: #1c789d;
    --c-decision: #6d45d9;
    --c-commitment: #a65e0c;
    --c-open-question: #12786a;
    --c-deadline: #c0392f;
    --c-preference: #a63c93;
    --c-relationship: #3563c0;
    --c-life-event: #587916;
    --c-concern: #685d27;
    --c-intention: #b812d9;

    --glow-strength: 0.55;
    --edge-alpha: 0.5;
  }
}

/* ---------------------------------------------------------------- Base */

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

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: 1.5;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg,
canvas,
picture {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}

h3,
h4 {
  font-family: var(--font-text);
  letter-spacing: 0;
  line-height: 1.3;
}

p {
  margin: 0 0 var(--s4);
  text-wrap: pretty;
}

p:last-child {
  margin-bottom: 0;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

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

strong {
  font-weight: 600;
}

code,
kbd,
.mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--s4);
  top: -100px;
  z-index: 100;
  padding: var(--s3) var(--s4);
  background: var(--ember);
  color: var(--text-inv);
  border-radius: var(--r-sm);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--s4);
}

.wrap {
  width: 100%;
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Visible placeholders for Christian: [Rechtsform], [App-Store-Link] … */
.ph {
  display: inline;
  padding: 0 0.3em;
  border-radius: var(--r-xs);
  background: color-mix(in srgb, var(--warning) 16%, transparent);
  color: var(--text);
  outline: 1px dashed var(--warning);
  outline-offset: -1px;
  font-family: var(--font-mono);
  font-size: 0.85em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header {
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
  }
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: var(--s5);
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: var(--s1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--s3);
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: var(--fs-small);
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--bg-raised);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 0.8125rem;
  font-weight: 600;
}

.lang-switch a,
.lang-switch span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 36px;
  padding: 0 var(--s2);
  border-radius: var(--r-pill);
  color: var(--text-2);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.lang-switch [aria-current] {
  background: var(--bg-overlay);
  color: var(--text);
}

.lang-switch a:hover {
  color: var(--text);
}

@media (max-width: 859px) {
  .site-nav .nav-optional {
    display: none;
  }
}

@media (max-width: 559px) {
  .site-nav {
    display: none;
  }
  .site-header .lang-switch {
    margin-left: auto;
  }
}

/* ---------------------------------------------------------------- Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 48px;
  padding: 0 var(--s6);
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--bg-raised);
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background var(--d-quick) var(--ease-quick),
    border-color var(--d-quick) var(--ease-quick);
}

.btn:hover {
  background: var(--bg-overlay);
  border-color: var(--text-3);
  text-decoration: none;
}

.btn-primary {
  background: var(--ember);
  border-color: var(--ember);
  color: var(--text-inv);
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--ember) 88%, var(--text));
  border-color: transparent;
}

.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.btn {
  white-space: nowrap;
}

/* ---------------------------------------------------------------- Sections */

main {
  display: block;
}

.section {
  padding-block: var(--section-gap) 0;
}

.overline {
  display: inline-block;
  margin: 0 0 var(--s3);
  color: var(--ember);
  font-size: var(--fs-overline);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-head {
  max-width: 46rem;
  margin-bottom: var(--s8);
}

.section-head h2 {
  font-size: var(--fs-h2);
  margin-bottom: var(--s4);
}

.section-head p {
  color: var(--text-2);
  font-size: var(--fs-lead);
  line-height: 1.5;
}

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

.hero {
  position: relative;
  padding-top: clamp(32px, 2rem + 4vw, 96px);
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: var(--s6);
}

@media (min-width: 960px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: var(--s9);
  }
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-title {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.5vw, 22px);
  margin-bottom: var(--s6);
}

.hero-title img {
  width: clamp(64px, 3.5rem + 2vw, 96px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 22%;
}

.hero h1 {
  font-size: var(--fs-hero);
  letter-spacing: -0.035em;
  line-height: 1;
}

.hero .promise {
  margin-bottom: var(--s5);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}

.hero .promise em {
  font-style: normal;
  color: var(--ember);
}

.hero .lead {
  max-width: 38rem;
  color: var(--text-2);
  font-size: var(--fs-lead);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
  margin-top: var(--s7);
}

.hero-note {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  max-width: 34rem;
  margin-top: var(--s6);
  color: var(--text-2);
  font-size: var(--fs-small);
}

.hero-note strong {
  color: var(--text);
}

.hero-art {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin-inline: auto;
  aspect-ratio: 1;
}

@media (max-width: 959px) {
  .hero-art {
    max-width: 380px;
    margin-top: calc(-1 * var(--s4));
    margin-bottom: calc(-1 * var(--s6));
  }
}

.hero-art canvas {
  width: 100%;
  height: 100%;
}

/* The glowing node used as bullet and card mark: a round radial light, never a blur. */
.node {
  --node: var(--ember);
  position: relative;
  flex: none;
  width: 12px;
  height: 12px;
  margin: 6px;
  border-radius: 50%;
  background: var(--node);
  isolation: isolate;
}

.node::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(
    circle closest-side,
    color-mix(in srgb, var(--node) calc(55% * var(--glow-strength)), transparent),
    transparent
  );
  z-index: -1;
}

.hero-note .node {
  margin-top: 5px;
}

/* ---------------------------------------------------------------- Features */

.feature-group + .feature-group {
  margin-top: var(--s10);
}

.feature-group > h3 {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s5);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
  letter-spacing: -0.01em;
}

.feature-group > h3 .node {
  margin: 0 4px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: var(--s3);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 700px) {
  .cards-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.card {
  position: relative;
  padding: var(--s5);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-raised);
}

.card h4 {
  margin-bottom: var(--s2);
  font-size: 1.0625rem;
  font-weight: 600;
}

.card p {
  color: var(--text-2);
  font-size: var(--fs-small);
  line-height: 1.55;
}

.card .meta {
  display: block;
  margin-top: var(--s3);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.4;
}

.card-accent {
  border-left: 2px solid var(--node, var(--ember));
}

/* ---------------------------------------------------------------- Tour */

/* The ember glow behind each screenshot reaches past the viewport on phones;
   clip it at the full-width section so the page never gets wider than the screen. */
#tour {
  overflow-x: clip;
}

.tour {
  display: grid;
  gap: var(--s10);
  max-width: 980px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tour-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s6);
  align-items: center;
}

@media (min-width: 760px) {
  .tour-item {
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    gap: var(--s9);
  }
  .tour-item:nth-child(even) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  }
  .tour-item:nth-child(even) .shot {
    order: 2;
  }
}

@media (min-width: 1100px) {
  .tour-item,
  .tour-item:nth-child(even) {
    column-gap: var(--s10);
  }
  .tour-caption {
    max-width: 32rem;
  }
}

.shot {
  position: relative;
  width: min(100%, 320px);
  margin: 0 auto;
  isolation: isolate;
}

.shot::before {
  /* round ember light behind the screen */
  content: "";
  position: absolute;
  inset: -18% -30%;
  background: radial-gradient(
    closest-side,
    color-mix(in srgb, var(--ember) calc(14% * var(--glow-strength)), transparent),
    transparent
  );
  z-index: -1;
}

.shot img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xl);
  background: #07080a; /* the screenshots are dark app screens in both themes */
}

.tour-caption .step-no {
  display: block;
  margin-bottom: var(--s2);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.tour-caption h3 {
  margin-bottom: var(--s3);
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.875rem);
  letter-spacing: -0.015em;
}

.tour-caption p {
  color: var(--text-2);
}

/* ---------------------------------------------------------------- Steps */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: var(--s3);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: var(--s6) var(--s5) var(--s5);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-raised);
  counter-increment: step;
}

.steps li::before {
  content: "0" counter(step);
  display: block;
  margin-bottom: var(--s4);
  color: var(--ember);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
}

.steps h3 {
  margin-bottom: var(--s2);
  font-size: 1.125rem;
}

.steps p {
  color: var(--text-2);
  font-size: var(--fs-small);
}

.steps h4 {
  margin-bottom: var(--s2);
  font-size: 1.125rem;
  font-weight: 600;
}

/* ---------------------------------------------------------------- Circles */

/* The glow behind the three nets reaches past the viewport on phones. */
#kreise,
#circles {
  overflow-x: clip;
}

.circles-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s8);
  align-items: center;
}

@media (min-width: 900px) {
  .circles-intro {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--s9);
  }
}

.nets {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  isolation: isolate;
}

.nets svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.nets figcaption {
  margin-top: var(--s3);
  color: var(--text-3);
  font-size: 0.8125rem;
  line-height: 1.45;
  text-align: center;
}

.nets-edges line {
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-opacity: var(--edge-alpha);
}

.nets-edges line.nets-thin {
  stroke-width: 1.5;
  stroke-opacity: calc(var(--edge-alpha) * 0.7);
}

.nets-synapses line {
  stroke-width: 3;
  stroke-linecap: round;
  stroke-opacity: calc(var(--edge-alpha) * 0.55);
}

/* Light travelling along a shared synapse: a short dash, round caps, no blur. */
.nets-synapses line.nets-pulse {
  stroke-width: 3.5;
  stroke-opacity: 0.95;
  stroke-dasharray: 10 290;
  animation: nets-pulse 4.8s var(--ease-base) infinite;
}

.nets-synapses line.nets-pulse:nth-child(4) {
  animation-delay: 1.6s;
}

.nets-synapses line.nets-pulse:nth-child(6) {
  animation-delay: 3.2s;
}

@keyframes nets-pulse {
  from {
    stroke-dashoffset: 300;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nets-synapses line.nets-pulse {
    animation: none;
    stroke-dasharray: none;
    stroke-opacity: calc(var(--edge-alpha) * 0.9);
  }
}

.nets-halo {
  opacity: var(--glow-strength);
}

.nets-ring {
  fill: none;
  stroke-width: 1.5;
  stroke-opacity: 0.7;
}

.nets-label text {
  fill: var(--text-2);
  font-family: var(--font-text);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.steps-stack {
  grid-template-columns: minmax(0, 1fr);
}

.steps-stack li {
  padding: var(--s5);
}

.steps-stack li::before {
  margin-bottom: var(--s2);
}

.circles-network {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  margin: var(--s5) 0 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.circles-network .node {
  margin-top: 7px;
}

.example {
  margin-top: var(--s6);
}

.example-tag {
  margin-bottom: var(--s2);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.example-card {
  display: grid;
  gap: var(--s2);
  padding: var(--s4) var(--s5);
  border: 1px solid var(--line);
  border-left: 2px solid var(--c-deadline);
  border-radius: var(--r-md);
  background: var(--bg-raised);
}

.example-card p {
  margin: 0;
}

.example-title {
  display: flex;
  align-items: center;
  gap: var(--s2);
  color: var(--text);
  font-weight: 600;
  font-size: var(--fs-small);
}

.example-title .node {
  width: 8px;
  height: 8px;
  margin: 0 4px 0 2px;
}

.example-text {
  color: var(--text-2);
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.35;
}

.example-action {
  justify-self: start;
  color: var(--ember);
  font-size: var(--fs-small);
  font-weight: 600;
}

.circles-block {
  margin-top: var(--s10);
}

.circles-subhead {
  margin-bottom: var(--s5);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
  letter-spacing: -0.01em;
}

.scene {
  border-top: 2px solid var(--node, var(--ember));
}

.scene-tag {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-bottom: var(--s3);
  color: var(--text-3);
  font-size: var(--fs-overline);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scene-tag .node {
  width: 8px;
  height: 8px;
  margin: 0 4px 0 2px;
}

.scene h4 {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  letter-spacing: -0.01em;
}

.share-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.icloud-note {
  display: flex;
  align-items: flex-start;
  gap: var(--s4);
  max-width: 52rem;
  padding: var(--s6) var(--s5);
  border: 1px solid var(--line);
  border-left: 2px solid var(--c-fact);
  border-radius: var(--r-md);
  background: var(--bg-raised);
}

.icloud-note > .node {
  margin-top: 4px;
}

.icloud-note h3 {
  margin-bottom: var(--s3);
  font-size: 1.125rem;
}

.icloud-note p {
  color: var(--text-2);
  font-size: var(--fs-small);
}

.icloud-note .icloud-small {
  color: var(--text-3);
  font-size: 0.8125rem;
}

/* ---------------------------------------------------------------- Story */

.story {
  display: grid;
  gap: var(--s7);
  max-width: 50rem;
}

.story blockquote {
  margin: 0;
  padding-left: var(--s5);
  border-left: 2px solid var(--ember);
  font-family: var(--font-quote);
  font-style: italic;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem);
  line-height: 1.3;
}

.story blockquote footer {
  margin-top: var(--s3);
  color: var(--text-3);
  font-family: var(--font-text);
  font-style: normal;
  font-size: var(--fs-small);
}

.story-body p {
  color: var(--text-2);
}

.story-contact {
  color: var(--text-3);
  font-size: var(--fs-small);
}

.draft-note {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  justify-self: start;
  padding: var(--s1) var(--s3);
  border: 1px dashed var(--warning);
  border-radius: var(--r-pill);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* ---------------------------------------------------------------- Privacy */

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: var(--s3);
}

.privacy-col {
  padding: var(--s6) var(--s5);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-raised);
}

.privacy-col h3 {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s4);
  font-size: 1.125rem;
}

.privacy-col h3 .node {
  margin: 0 2px;
}

.privacy-col ul,
.checklist {
  display: grid;
  gap: var(--s3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.privacy-col li,
.checklist li {
  position: relative;
  padding-left: var(--s5);
  color: var(--text-2);
  font-size: var(--fs-small);
  line-height: 1.5;
}

.privacy-col li::before,
.checklist li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bullet, var(--text-3));
}

.privacy-col li strong,
.checklist li strong {
  color: var(--text);
}

.privacy-more {
  margin-top: var(--s6);
  color: var(--text-2);
}

/* ---------------------------------------------------------------- FAQ */

.faq {
  display: grid;
  gap: var(--s2);
  max-width: 52rem;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-raised);
}

.faq summary {
  position: relative;
  display: block;
  padding: var(--s5) var(--s9) var(--s5) var(--s5);
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  border-radius: var(--r-md);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: var(--s5);
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -6px;
  border-right: 2px solid var(--text-3);
  border-bottom: 2px solid var(--text-3);
  transform: rotate(45deg);
  transition: transform var(--d-base) var(--ease-base);
}

.faq details[open] summary::after {
  transform: rotate(-135deg);
  margin-top: -1px;
}

.faq .answer {
  padding: 0 var(--s5) var(--s5);
  color: var(--text-2);
}

.faq .answer ul {
  margin: 0 0 var(--s4);
  padding-left: 1.2em;
}

.faq .answer li + li {
  margin-top: var(--s1);
}

/* ---------------------------------------------------------------- Requirements */

.reqs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: var(--s3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.reqs li {
  padding: var(--s5);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-raised);
}

.reqs .req-label {
  display: block;
  margin-bottom: var(--s1);
  color: var(--text-3);
  font-size: var(--fs-overline);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reqs .req-value {
  display: block;
  margin-bottom: var(--s2);
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.reqs p {
  color: var(--text-2);
  font-size: var(--fs-small);
}

.cta-final {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
  margin-top: var(--s8);
}

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

.site-footer {
  margin-top: var(--section-gap);
  padding-block: var(--s8) var(--s9);
  border-top: 1px solid var(--line);
  background: var(--bg-sunken);
  color: var(--text-2);
  font-size: var(--fs-small);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s5) var(--s7);
}

.footer-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--s2);
  color: var(--text-2);
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s4);
}

.site-footer .lang-switch {
  margin-left: 0;
}

/* ---------------------------------------------------------------- Legal pages */

.legal {
  padding-top: clamp(32px, 2rem + 3vw, 80px);
}

.legal .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s8);
}

@media (min-width: 1024px) {
  .legal .wrap {
    grid-template-columns: 260px minmax(0, 46rem);
    column-gap: var(--s10);
    align-items: start;
  }
  .legal-head {
    grid-column: 1 / -1;
  }
  .legal .toc {
    position: sticky;
    top: 88px;
    max-height: calc(100vh - 110px);
    overflow: auto;
  }
}

.legal-head h1 {
  margin-bottom: var(--s4);
  font-size: var(--fs-h2);
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s5);
  margin: 0;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.legal-meta dt {
  display: inline;
}

.legal-meta dd {
  display: inline;
  margin: 0 0 0 0.4em;
  color: var(--text-2);
}

.legal-intro {
  max-width: 46rem;
  margin-top: var(--s5);
  color: var(--text-2);
  font-size: var(--fs-lead);
}

.toc {
  padding: var(--s5);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-raised);
  font-size: var(--fs-small);
}

.toc h2 {
  margin-bottom: var(--s3);
  font-family: var(--font-text);
  font-size: var(--fs-overline);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.toc ol {
  margin: 0;
  padding-left: 1.3em;
}

.toc ol ol {
  margin-top: var(--s1);
}

/* Top level entries that already carry a letter ("A. Website") get no list number. */
.toc ol.toc-lettered {
  list-style: none;
  padding-left: 0;
}

.toc ol.toc-lettered ol {
  padding-left: 1.3em;
}

.toc li {
  margin: var(--s1) 0;
  color: var(--text-3);
}

.toc a {
  color: var(--text-2);
  text-decoration: none;
}

.toc a:hover {
  color: var(--text);
  text-decoration: underline;
}

.prose {
  max-width: min(46rem, 72ch);
  color: var(--text-2);
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Anchor targets clear the sticky header. */
.prose section[id],
.prose [id] {
  scroll-margin-top: 96px;
}

.prose section:target > :is(h2, h3, h4):first-child {
  color: var(--ember);
}

/* Self-link next to each heading, shown on hover/focus of the heading. */
.heading-anchor {
  margin-left: 0.4em;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.8em;
  font-weight: 400;
  text-decoration: none;
  opacity: 0;
  transition: opacity var(--d-quick) var(--ease-quick);
}

:is(h2, h3, h4):hover > .heading-anchor,
.heading-anchor:focus-visible {
  opacity: 1;
}

@media (hover: none) {
  .heading-anchor {
    opacity: 0.5;
  }
}

.heading-anchor:hover {
  color: var(--ember);
}

.prose h2 {
  margin: var(--s9) 0 var(--s4);
  padding-top: var(--s5);
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  letter-spacing: -0.015em;
}

.prose > h2:first-child,
.prose > section:first-child > h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin: var(--s7) 0 var(--s3);
  color: var(--text);
  font-size: 1.125rem;
}

.prose h4 {
  margin: var(--s6) 0 var(--s2);
  color: var(--text);
  font-size: 1rem;
}

.prose p,
.prose li {
  line-height: 1.65;
}

.prose ul,
.prose ol {
  margin: 0 0 var(--s4);
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: var(--s2);
}

.prose strong {
  color: var(--text);
}

.prose address {
  margin: 0 0 var(--s4);
  font-style: normal;
  line-height: 1.65;
}

.prose table {
  width: 100%;
  margin: 0 0 var(--s5);
  border-collapse: collapse;
  font-size: var(--fs-small);
}

.prose .table-scroll {
  margin: 0 0 var(--s5);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.prose .table-scroll table {
  min-width: 560px;
  margin: 0;
}

.prose th,
.prose td {
  padding: var(--s3);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  color: var(--text);
  font-weight: 600;
  background: var(--bg-raised);
}

@media (min-width: 641px) {
  .table-stack {
    table-layout: fixed;
  }
  .table-stack th:nth-child(1) { width: 31%; }
  .table-stack th:nth-child(2) { width: 23%; }
  .table-stack th:nth-child(3) { width: 22%; }
  .table-stack th:nth-child(4) { width: 24%; }
}

/* Data tables stack into one card per row on phones (labels from data-label). */
@media (max-width: 640px) {
  .prose .table-scroll {
    overflow: visible;
  }
  .prose .table-scroll table.table-stack {
    min-width: 0;
  }
  .table-stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .table-stack,
  .table-stack tbody,
  .table-stack tr,
  .table-stack td {
    display: block;
    width: 100%;
  }
  .table-stack tr {
    margin: 0 0 var(--s4);
    padding: var(--s3) var(--s4);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--bg-raised);
  }
  .prose .table-stack td {
    padding: var(--s2) 0;
    border-bottom: 1px solid var(--line);
  }
  .prose .table-stack td:last-child {
    border-bottom: 0;
  }
  .table-stack td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--text-3);
    font-size: var(--fs-overline);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .prose .table-stack td:first-child {
    color: var(--text);
    font-weight: 600;
  }
  .table-stack td:first-child::before {
    display: none;
  }
}

/* A lawyer's check marker: [PRÜFEN] / [REVIEW] */
.check {
  display: inline-block;
  padding: 0 0.4em;
  border-radius: var(--r-xs);
  background: color-mix(in srgb, var(--danger) 14%, transparent);
  color: var(--danger);
  font-family: var(--font-mono);
  font-size: 0.78em;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.note {
  margin: 0 0 var(--s5);
  padding: var(--s4) var(--s5);
  border: 1px solid var(--line);
  border-left: 2px solid var(--insight);
  border-radius: var(--r-sm);
  background: var(--bg-raised);
  color: var(--text-2);
  font-size: var(--fs-small);
}

/* A separately highlighted legal notice, e.g. the right to object (Art. 21(4) GDPR) */
.notice {
  margin: var(--s5) 0;
  padding: var(--s4) var(--s5);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ember);
  border-radius: var(--r-sm);
  background: var(--bg-raised);
}

.prose .notice h4 {
  margin-top: 0;
}

.prose .notice p:last-child {
  margin-bottom: 0;
}

.back-top {
  display: inline-block;
  margin-top: var(--s8);
  font-size: var(--fs-small);
}

/* ---------------------------------------------------------------- Print */

@media print {
  @page {
    margin: 18mm 16mm;
  }
  .site-header,
  .site-footer,
  .hero-art,
  .skip-link,
  .toc,
  .lang-switch,
  .heading-anchor,
  .back-top {
    display: none !important;
  }
  html {
    scroll-padding-top: 0;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 10.5pt;
  }
  .legal {
    padding-top: 0;
  }
  .legal-head {
    margin-bottom: 1.5em;
  }
  .legal .wrap {
    display: block;
    max-width: none;
    padding: 0;
  }
  .prose,
  .legal-intro {
    max-width: none;
  }
  .prose,
  .prose p,
  .prose li,
  .prose strong,
  .prose h2,
  .prose h3,
  .prose h4,
  .prose th,
  .prose td,
  .legal-head h1,
  .legal-meta,
  .legal-meta dd,
  .legal-intro {
    color: #000;
  }
  .prose h2,
  .prose h3,
  .prose h4 {
    break-after: avoid;
    page-break-after: avoid;
  }
  .prose h2 {
    border-top-color: #999;
  }
  .prose p,
  .prose li {
    orphans: 3;
    widows: 3;
  }
  .prose table,
  .prose tr {
    break-inside: avoid;
  }
  .prose .table-scroll {
    overflow: visible;
  }
  .prose .table-scroll table {
    min-width: 0;
  }
  .prose th {
    background: #eee;
  }
  .prose th,
  .prose td {
    border-bottom-color: #999;
  }
  .note,
  .notice {
    background: none;
    border-color: #999;
    color: #000;
  }
  .ph,
  .check {
    background: none;
    color: #000;
    outline: 1px dashed #000;
  }
  a {
    color: #000;
  }
  .prose a[href^="http"]::after {
    content: " <" attr(href) ">";
    font-size: 0.85em;
    overflow-wrap: anywhere;
  }
}

/* Teaser under the hero buttons: points to circles further down. */
.hero-teaser {
  margin: 14px 0 0;
  font-size: 15px;
}
.hero-teaser a {
  color: var(--text-2);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
}
.hero-teaser a:hover,
.hero-teaser a:focus-visible {
  color: var(--text);
  border-bottom-color: currentColor;
}
.hero-teaser strong { color: var(--thread); font-weight: 600; }
