/* ===========================================================================
   xventures.de — legal pages (Impressum, Datenschutzerklaerung)
   ---------------------------------------------------------------------------
   These pages carry statutory text, so the job of the design is not to be
   clever: it is to make a long German legal document genuinely readable, and
   to make the parts a regulator or a visitor is looking for findable in
   seconds. Tokens are inherited verbatim from index.html so the pages read as
   part of the site rather than as a generator's output pasted on the end.

   Everything here is self-hosted. No font, script or stylesheet leaves the
   origin. See netlify.toml for the CSP that enforces that.
   =========================================================================== */

@import url("fonts.css");

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

:root {
  --bg: #050510;
  --bg-light: #0a0a1a;
  --bg-card: rgba(10,10,25,0.5);
  --text: #ffffff;
  --text-dim: rgba(255,255,255,0.62);
  --text-muted: rgba(255,255,255,0.34);
  --accent: #6fc899;
  --accent-dark: #3aa06d;
  --accent-glow: rgba(111,200,153,0.15);
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --nav-height: 64px;

  /* A single measure token: legal prose is unreadable past ~72 characters. */
  --measure: 68ch;
  --rail: 248px;
  --gutter: clamp(20px, 5vw, 64px);
}

html {
  scroll-behavior: smooth;
  /* Anchors must not land under the translucent bar. */
  scroll-padding-top: calc(var(--nav-height) + 28px);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  /* Body copy sits near zero tracking; only the display sizes get tightened. */
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: var(--accent); color: var(--bg); }

a { color: inherit; }

/* Atmosphere, not decoration: one still, very low-contrast radial so the page
   is not a flat black rectangle. It never animates, so it cannot become a
   slow looping oscillation for a motion-sensitive reader. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 600px at 12% -10%, rgba(111,200,153,0.055), transparent 70%),
    radial-gradient(700px 500px at 100% 0%, rgba(111,200,153,0.028), transparent 70%);
}

/* --------------------------------------------------------------------------
   Reading-progress hairline. Purely informational: how much document is left.
   -------------------------------------------------------------------------- */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  z-index: 60;
  will-change: transform;
}

/* --------------------------------------------------------------------------
   Translucent chrome. Content scrolls underneath rather than being pushed
   below an opaque strip.
   -------------------------------------------------------------------------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--gutter);
  background: rgba(5,5,16,0.72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
}

.bar__home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 160ms ease-out;
}
.bar__home:hover { color: var(--text); }
.bar__home svg { width: 14px; height: 14px; flex: none; }
.bar__home img { height: 15px; width: auto; opacity: 0.9; }

.bar__nav { display: flex; align-items: center; gap: 4px; }

.bar__nav a {
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 999px;
  transition: color 160ms ease-out, background-color 160ms ease-out;
}
.bar__nav a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.bar__nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-glow);
}

/* --------------------------------------------------------------------------
   Language switch. German is the binding version; English is a courtesy
   translation for a site whose content is English. Both live in this one
   document so they can never drift apart.
   -------------------------------------------------------------------------- */
.lang {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border-hover);
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
}

.lang button {
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font-display);
  color: var(--text-muted);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 5px 13px;
  border-radius: 999px;
  /* Feedback on press, not on release. */
  transition: color 140ms ease-out, background-color 140ms ease-out, transform 90ms ease-out;
}
.lang button:hover { color: var(--text); }
.lang button:active { transform: scale(0.96); }
.lang button[aria-pressed="true"] {
  color: var(--bg);
  background: var(--accent);
}
.lang button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */
.masthead {
  position: relative;
  z-index: 1;
  padding: clamp(56px, 9vw, 104px) var(--gutter) clamp(32px, 5vw, 52px);
  border-bottom: 1px solid var(--border);
}

.masthead__inner { max-width: calc(var(--rail) + var(--measure) + 72px); margin: 0 auto; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.masthead h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 6vw, 3.6rem);
  /* Large type reads too loose at default tracking, and wants tight leading. */
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
  text-wrap: balance;
  /* German legal vocabulary is built from compounds: "Datenschutzhinweise" is
     one 19-character word that cannot break at a space, and at 320px it was
     forcing the whole page into horizontal scroll. Hyphenation is the correct
     typographic answer for German and needs the lang attribute, which these
     pages set; break-word is the safety net for a browser without a German
     hyphenation dictionary. */
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
}

.masthead__lede {
  max-width: 58ch;
  color: var(--text-dim);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.stamp {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 7px 14px 7px 12px;
  border: 1px solid var(--border-hover);
  border-radius: 999px;
}
.stamp__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
  flex: none;
}

/* --------------------------------------------------------------------------
   Layout: sticky numbered rail + measured column
   -------------------------------------------------------------------------- */
.layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--rail) minmax(0, var(--measure));
  gap: 72px;
  justify-content: center;
  padding: clamp(40px, 6vw, 72px) var(--gutter) 120px;
  align-items: start;
}

.toc {
  position: sticky;
  top: calc(var(--nav-height) + 32px);
  max-height: calc(100vh - var(--nav-height) - 64px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-hover) transparent;
}

.toc__label {
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-bottom: 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.toc ol { list-style: none; }

.toc a {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 8px;
  align-items: baseline;
  padding: 7px 10px 7px 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
  text-decoration: none;
  border-left: 1px solid var(--border);
  transition: color 150ms ease-out, border-color 150ms ease-out, background-color 150ms ease-out;
}
.toc a span:first-child {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--text-muted);
  transition: color 150ms ease-out;
}
.toc a:hover { color: var(--text); border-left-color: var(--border-hover); background: rgba(255,255,255,0.025); }

/* Scroll-spy state. Colour plus a solid rule, so it does not rely on colour
   alone and survives prefers-contrast. */
.toc a.is-active {
  color: var(--text);
  border-left-color: var(--accent);
  background: linear-gradient(90deg, var(--accent-glow), transparent 85%);
}
.toc a.is-active span:first-child { color: var(--accent); }

/* --------------------------------------------------------------------------
   Prose
   -------------------------------------------------------------------------- */
.doc { min-width: 0; }

.doc section { scroll-margin-top: calc(var(--nav-height) + 28px); }
.doc section + section { margin-top: clamp(44px, 6vw, 68px); }

.doc h2 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.012em;
  margin-bottom: 18px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: baseline;
  text-wrap: balance;
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
}

.doc h2 .num {
  font-size: 0.72em;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.doc section:first-child h2 { border-top: 0; padding-top: 0; }

.doc h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  margin: 30px 0 12px;
  color: var(--text);
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
}

.doc p { color: var(--text-dim); }
.doc p + p { margin-top: 15px; }

.doc strong { color: var(--text); font-weight: 600; }

.doc a:not(.btn) {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(111,200,153,0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color 160ms ease-out;
}
.doc a:not(.btn):hover { text-decoration-color: var(--accent); }

.doc ul, .doc ol { margin: 14px 0 0 0; padding-left: 0; list-style: none; }
.doc li {
  position: relative;
  color: var(--text-dim);
  padding-left: 22px;
  margin-top: 9px;
}
.doc ul > li::before {
  content: '';
  position: absolute;
  left: 4px; top: 0.72em;
  width: 5px; height: 1px;
  background: var(--accent);
  opacity: 0.75;
}
.doc ol { counter-reset: li; }
.doc ol > li { counter-increment: li; }
.doc ol > li::before {
  content: counter(li) '.';
  position: absolute;
  left: 0; top: 0;
  font-family: var(--font-display);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  line-height: 1.85;
}

/* Statutory citations. Set in the display face so "Art. 6 Abs. 1 lit. f
   DS-GVO" reads as a reference and not as shouting. */
.cite {
  font-family: var(--font-display);
  font-size: 0.92em;
  font-weight: 500;
  color: var(--text);
  /* Keeping "Art. 6 Abs. 1 lit. f DS-GVO" on one line aids reading, but not at
     the price of a sideways-scrolling page on a small phone. */
  white-space: nowrap;
}

@media (max-width: 480px) {
  .cite { white-space: normal; }
}

/* --------------------------------------------------------------------------
   Identity / controller block: a definition grid, not a paragraph. This is
   the single thing a regulator or a visitor comes to the page to read.
   -------------------------------------------------------------------------- */
.ident {
  margin-top: 20px;
  border: 1px solid var(--border-hover);
  border-radius: 14px;
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
}

.ident__row {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 8px 24px;
  padding: 15px 22px;
  border-top: 1px solid var(--border);
}
.ident__row:first-child { border-top: 0; }

.ident__key {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 3px;
}
.ident__val { color: var(--text); }
.ident__val .sub { display: block; color: var(--text-dim); font-size: 0.94em; }

/* --------------------------------------------------------------------------
   Callout. Art. 21 DS-GVO must be presented in a highlighted form, so the
   emphasis here is a legal requirement rather than a styling preference.
   -------------------------------------------------------------------------- */
.callout {
  margin: 22px 0 0;
  padding: 22px 26px;
  border: 1px solid rgba(111,200,153,0.3);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(111,200,153,0.075), rgba(111,200,153,0.02));
}
.callout__label {
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 11px;
}
.callout p { color: var(--text); }
.callout p + p { margin-top: 12px; }

/* A quieter variant for operational notes (e.g. "no cookies are set"). */
.note {
  margin: 20px 0 0;
  padding: 18px 22px;
  border: 1px solid var(--border-hover);
  border-radius: 12px;
  background: rgba(255,255,255,0.022);
}
.note p { color: var(--text-dim); font-size: 0.97em; }
.note__label {
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 9px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.foot {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  background: rgba(5,5,16,0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 34px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  align-items: center;
  justify-content: space-between;
}
.foot__copy { font-size: 12px; color: var(--text-muted); }
.foot__links { display: flex; flex-wrap: wrap; gap: 22px; }
.foot__links a {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 160ms ease-out;
}
.foot__links a:hover { color: var(--accent); }

/* --------------------------------------------------------------------------
   Load-in. One staggered reveal, opacity plus a small translate only.
   -------------------------------------------------------------------------- */
@keyframes rise {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
  to   { opacity: 1; transform: none; }
}
.rise {
  animation: rise 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.rise--1 { animation-delay: 40ms; }
.rise--2 { animation-delay: 110ms; }
.rise--3 { animation-delay: 180ms; }

/* --------------------------------------------------------------------------
   Language visibility
   -------------------------------------------------------------------------- */
[data-lang="de"] [lang="en"] { display: none; }
[data-lang="en"] [lang="de"] { display: none; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  :root { --rail: 210px; }
  .layout { gap: 44px; }
}

@media (max-width: 880px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-top: 28px;
  }
  .toc {
    position: static;
    max-height: none;
    overflow: visible;
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
  }
  .toc ol { columns: 2; column-gap: 24px; }
  .toc a { break-inside: avoid; }
  .ident__row { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 14px 18px; }
  .bar__nav a { padding: 7px 9px; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .toc ol { columns: 1; }
  .doc h2 { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .callout { padding: 18px 18px; }

  /* At phone width the wordmark plus both legal links plus the language
     switch do not fit on one row, and the overflow was pushing the EN button
     off-screen where it could not be tapped. The chevron alone carries the
     back-to-home affordance, so the wordmark is what goes. */
  .bar { gap: 8px; padding: 0 14px; }
  .bar__home span { display: none; }
  .bar__home img { display: none; }
  .bar__home svg { width: 18px; height: 18px; }
  .bar__nav { gap: 2px; }
  .bar__nav a { padding: 6px 8px; font-size: 12px; }
  .lang button { padding: 5px 10px; }
}

/* Very narrow phones (320-360px) need one more notch of room. The legal links
   keep their full words: "Impressum" and "Datenschutz" are the exact terms a
   visitor and a supervisory authority look for, so they are not abbreviated. */
@media (max-width: 420px) {
  :root { --gutter: 14px; }
  .bar { gap: 4px; padding: 0 10px; }
  .bar__nav a { padding: 6px 5px; font-size: 11px; letter-spacing: 0; }
  .lang { padding: 2px; }
  .lang button { padding: 4px 7px; font-size: 10.5px; letter-spacing: 0.04em; }
}

/* --------------------------------------------------------------------------
   Accessibility preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .progress { display: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .bar, .foot { background: #07071a; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .ident { background: #0a0a1c; backdrop-filter: none; -webkit-backdrop-filter: none; }
}

@media (prefers-contrast: more) {
  :root {
    --text-dim: rgba(255,255,255,0.88);
    --text-muted: rgba(255,255,255,0.68);
    --border: rgba(255,255,255,0.28);
    --border-hover: rgba(255,255,255,0.45);
  }
  .bar, .foot { background: #050510; }
  .toc a { border-left-color: var(--border); }
}

:where(a, button):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: var(--bg);
  padding: 12px 18px;
  font-weight: 600;
  border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* --------------------------------------------------------------------------
   Print. Legal pages get printed and filed, including by authorities, so the
   printed artefact is a real deliverable: black on white, URLs expanded,
   navigation dropped.
   -------------------------------------------------------------------------- */
@media print {
  @page { margin: 18mm 16mm; }
  body { background: #fff; color: #000; font-size: 10.5pt; line-height: 1.55; }
  body::before, .progress, .bar, .toc, .lang, .skip, .foot__links { display: none !important; }
  .masthead { border-bottom: 1px solid #999; padding: 0 0 14pt; }
  .layout { display: block; padding: 14pt 0 0; }
  .eyebrow, .doc h2 .num, .callout__label, .note__label { color: #000; }
  .doc p, .doc li, .masthead__lede, .foot__copy { color: #111; }
  .doc h2 { border-top: 1px solid #bbb; page-break-after: avoid; }
  .doc h3 { page-break-after: avoid; }
  .doc section { page-break-inside: auto; }
  .ident, .callout, .note {
    background: none; border: 1px solid #999; backdrop-filter: none;
    page-break-inside: avoid;
  }
  .callout { border-left: 3px solid #000; }
  .doc a:not(.btn) { color: #000; text-decoration: underline; }
  .doc a[href^="http"]::after { content: ' (' attr(href) ')'; font-size: 8.5pt; color: #444; }
  .stamp { border: 0; padding: 0; margin-top: 10pt; }
  .stamp__dot { display: none; }
  [data-lang] [lang="en"] { display: none !important; }
  [data-lang] [lang="de"] { display: revert !important; }
}
