/* ==========================================================================
   Ironfly Studios — legal pages (Impressum / Datenschutz / Nutzungsbedingungen)
   Same tokens and typefaces as the homepage, deliberately plain layout.
   ========================================================================== */

:root {
  --bg: #F2EEE5;
  --bg-2: #EAE5D8;
  --ink: #0E0E0C;
  --ink-2: #2A2925;
  --ink-soft: #6E6A60;
  --line: rgba(14,14,12,0.12);
  --line-soft: rgba(14,14,12,0.06);
  --orange: #F7931A;
  --grain-opacity: 0.35;
  --grain-blend: multiply;
  --easing: cubic-bezier(.2,.7,.2,1);
  --radius: 12px;
  --pad: clamp(16px, 4vw, 56px);
  --nav-h: 64px;
}

[data-theme="dark"] {
  --bg: #0D0D0B;
  --bg-2: #16140F;
  --ink: #F2EEE5;
  --ink-2: #C7C2B5;
  --ink-soft: #8A8574;
  --line: rgba(242,238,229,0.12);
  --line-soft: rgba(242,238,229,0.06);
  --grain-opacity: 0.18;
  --grain-blend: screen;
}

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

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Geist', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color .6s var(--easing), color .6s var(--easing);
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* Film grain, same as the homepage */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.wrap {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Nav ---------- */
.lnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
  transition: background-color .6s var(--easing), border-color .6s var(--easing);
}
.lnav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.lnav__logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: -12px;
}
.lnav__logo img {
  height: 68px;
  width: auto;
  transition: opacity .3s ease;
}
.lnav__logo .logo-dark { position: absolute; inset: 0; opacity: 0; }
[data-theme="dark"] .lnav__logo .logo-light { opacity: 0; }
[data-theme="dark"] .lnav__logo .logo-dark { opacity: 1; }

.lnav__menu {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.6vw, 34px);
}
.lnav__link {
  font-size: 14.5px;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  transition: color .3s ease;
}
.lnav__link:hover { color: var(--ink); }
.lnav__tools { display: flex; align-items: center; gap: 10px; }

@media (max-width: 720px) {
  .lnav__link { display: none; }
}

/* Language switch */
.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
}
.lang-switch button {
  min-width: 36px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--ink-soft);
  transition: background-color .3s var(--easing), color .3s ease;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}

/* Theme toggle */
.theme-toggle {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--ink);
  flex-shrink: 0;
  transition: border-color .3s ease, background-color .4s var(--easing), transform .4s var(--easing);
}
.theme-toggle:hover { border-color: var(--ink); background: var(--ink); }
.theme-toggle:hover .theme-toggle__icon { color: var(--bg); }
.theme-toggle:active { transform: scale(0.94); }
.theme-toggle__icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .5s var(--easing), transform .6s var(--easing), color .3s ease;
}
.theme-toggle__icon svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun  { opacity: 1; transform: rotate(0deg) scale(1); }
.theme-toggle .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.6); }
[data-theme="dark"] .theme-toggle .icon-sun  { opacity: 0; transform: rotate(90deg) scale(0.6); }
[data-theme="dark"] .theme-toggle .icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }

/* ---------- Page header ---------- */
.lhead {
  padding-top: calc(var(--nav-h) + clamp(48px, 7vw, 96px));
  padding-bottom: clamp(28px, 4vw, 44px);
}
.lhead__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: clamp(28px, 4vw, 44px);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  transition: color .3s ease;
}
.lhead__back:hover { color: var(--ink); }
.lhead__back svg { width: 14px; height: 14px; }

.ltitle {
  margin: 0;
  font-family: 'Geist', sans-serif;
  font-weight: 300;
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--ink);
  overflow-wrap: break-word;
  hyphens: manual;
}

.lhead__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  margin-top: clamp(28px, 4vw, 44px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.lmeta {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

/* Tabs between the three legal pages */
.ltabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ltabs a {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--ink-2);
  transition: border-color .3s ease, background-color .3s var(--easing), color .3s ease;
}
.ltabs a:hover { border-color: var(--ink); color: var(--ink); }
.ltabs a[aria-current="page"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

/* ---------- Body: TOC + content ---------- */
.lbody {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-top: clamp(24px, 4vw, 48px);
  padding-bottom: clamp(96px, 12vw, 160px);
}
@media (min-width: 960px) {
  .lbody {
    grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
    gap: clamp(48px, 7vw, 112px);
  }
  .lbody--single { grid-template-columns: minmax(0, 1fr); }
}

.ltoc { display: none; }
@media (min-width: 960px) {
  .ltoc {
    display: block;
    position: sticky;
    top: calc(var(--nav-h) + 40px);
    align-self: start;
    max-height: calc(100vh - var(--nav-h) - 80px);
    overflow-y: auto;
  }
}
.ltoc__label {
  margin-bottom: 16px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}
.ltoc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
}
.ltoc a {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 6px 0 6px 18px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink-soft);
  transition: color .3s ease;
}
.ltoc a::before {
  content: "";
  position: absolute;
  left: -1px; top: 5px; bottom: 5px;
  width: 1px;
  background: var(--ink);
  transform: scaleY(0);
  transition: transform .4s var(--easing);
}
.ltoc a span {
  flex: 0 0 22px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  padding-top: 2px;
}
.ltoc a:hover,
.ltoc a.is-active { color: var(--ink); }
.ltoc a.is-active::before { transform: scaleY(1); }

.lcontent { min-width: 0; max-width: 820px; }

/* ---------- Sections ---------- */
.lsec {
  padding: clamp(32px, 3.6vw, 44px) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--nav-h) + 24px);
}
.lsec:first-child { border-top: 0; padding-top: 0; }
.lsec h2 {
  display: flex;
  gap: 14px;
  align-items: baseline;
  margin: 0 0 18px;
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  font-size: clamp(19px, 1.7vw, 22px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
  overflow-wrap: break-word;
}
.lsec h2 .n {
  flex: 0 0 auto;
  min-width: 26px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-soft);
}
.lsec h3 {
  margin: 26px 0 8px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
}
.lsec p,
.lsec li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-2);
}
.lsec p { margin: 0 0 14px; max-width: 72ch; }
.lsec p:last-child { margin-bottom: 0; }
.lsec ul {
  margin: 6px 0 16px;
  padding: 0 0 0 20px;
  max-width: 72ch;
}
.lsec li { margin-bottom: 4px; padding-left: 4px; }
.lsec li::marker { color: var(--ink-soft); }
.lsec strong { font-weight: 500; color: var(--ink); }

.lsec a,
.imprint a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color .3s ease;
  overflow-wrap: anywhere;
}
.lsec a:hover,
.imprint a:hover { text-decoration-color: var(--ink); }

.address {
  margin: 4px 0 16px;
  font-style: normal;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-2);
}
.address strong { font-weight: 500; color: var(--ink); }

.lnote {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 72ch;
}

/* ---------- Impressum: label / value rows ---------- */
.imprint {
  margin: 0;
  border-top: 1px solid var(--line);
}
.imprint__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 720px) {
  .imprint__row {
    grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
    gap: 32px;
  }
}
.imprint dt {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  line-height: 1.9;
  color: var(--ink-soft);
}
.imprint dd {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.imprint dd p { margin: 0; max-width: 64ch; color: var(--ink-2); }
.imprint__sub {
  margin: 0 0 18px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

/* ---------- Footer (same as homepage) ---------- */
footer {
  position: relative;
  border-top: 1px solid var(--line);
  padding: 32px 0 28px;
}
.foot {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: center;
  text-align: center;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}
@media (min-width: 700px) {
  .foot { grid-template-columns: 1fr auto 1fr; text-align: left; }
  .foot__right { text-align: right; }
}
.foot__center { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; }
.foot__center a { transition: color .3s ease; }
.foot__center a:hover,
.foot__center a[aria-current="page"] { color: var(--ink); }

/* ---------- Print ---------- */
@media print {
  body::before, .lnav, .ltoc, .ltabs, .lhead__back, footer { display: none !important; }
  .lhead { padding-top: 0; }
  .lbody { display: block; padding: 0; }
  body { background: #fff; color: #000; }
}
