/* Shared stylesheet for the legal pages (privacy.html, terms.html).
   Served same-origin from /legal.css — the pages need no JavaScript and
   make no third-party requests. */

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

:root {
  --orange: #F7931A;
  --bg: #0a0a0f;
  --border: #1a1a2e;
  --text: #e8e8f0;
  --muted: #6a6a8a;
  --white: #ffffff;
}

html {
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Courier New', Courier, monospace;
  line-height: 1.7;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23grain)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* Ambient glow */
body::after {
  content: '';
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(247, 147, 26, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.brand-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 28px;
}

/* The legal document. The text between the LEGAL markers is generated
   verbatim from the app's legal.tsx by scripts/sync-legal.mjs — do not
   edit it by hand. Only inline <strong> wrappers style the headings, so
   this element's textContent is byte-identical to the app's text. */
.doc {
  white-space: pre-wrap;
  overflow-wrap: break-word;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
}

.doc .doc-title {
  font-size: clamp(26px, 5vw, 36px);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.doc .doc-h {
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.04em;
}

/* Bottom nav — same bar as the homepage: every legal surface links to
   every other (legal opens the Impressum modal on the homepage). */
.bottom-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 56px;
}

.bottom-nav a {
  background: none;
  border: 1px solid rgba(247, 147, 26, 0.3);
  border-radius: 20px;
  padding: 6px 16px;
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(0.65rem, 1.3vw, 0.8rem);
  color: rgba(247, 147, 26, 0.6);
  letter-spacing: 0.15em;
  transition: color 0.2s, border-color 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.bottom-nav a:hover {
  color: var(--orange);
  border-color: rgba(247, 147, 26, 0.6);
}

.bottom-nav a[aria-current="page"] {
  color: var(--orange);
  border-color: rgba(247, 147, 26, 0.6);
}

.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 40px 0;
}

.footer {
  text-align: center;
}

.footer p {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.footer p span {
  color: var(--orange);
}

/* Language switcher — shared by the EN/DE/ES legal pages. Plain links so the
   pages keep working without JavaScript. */
#lang-switcher {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.15em;
}

#lang-switcher .lang-globe {
  font-size: 1.1em;
  opacity: 0.75;
}

#lang-switcher a {
  color: rgba(247, 147, 26, 0.55);
  text-decoration: none;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 14px;
  transition: color 0.2s, border-color 0.2s;
}

#lang-switcher a:hover {
  color: var(--orange);
}

#lang-switcher a.lang-active {
  color: var(--orange);
  border-color: rgba(247, 147, 26, 0.5);
}

@media (max-width: 480px) {
  .container {
    padding: 40px 18px 64px;
  }
}

/* ── Mobile (≤600px) — desktop rendering unchanged ── */
@media (max-width: 600px) {
  /* 44px tap targets for the language switcher */
  #lang-switcher {
    top: 8px;
    right: 8px;
    gap: 2px;
  }

  #lang-switcher a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 6px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 22px;
  }

  /* Keep the enlarged switcher clear of the brand label */
  .container {
    padding-top: 72px;
  }

  /* 44px tap targets for the bottom-nav pills */
  .bottom-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
  }
}
