/* RAUNDHAUS – gemeinsames Stylesheet
   CI: Petrol #0E5F6E · Grün #5A9E3A (nur Akzente) · Anthrazit #1F2A30 · Hellgrau #EEF2F3 */

:root {
  --petrol: #0E5F6E;
  --gruen: #5A9E3A;
  --bg: #F5F8F8;
  --surface: #FFFFFF;
  --text: #1F2A30;
  --muted: #51626A;
  --line: #D5DEE1;
  --link-hover: #0E5F6E;
  color-scheme: light;
}
/* Dunkel: nach Geräteeinstellung, solange niemand umgeschaltet hat … */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #172024;
    --surface: #1F2A30;
    --text: #EEF2F3;
    --muted: #A9B8BE;
    --line: #2E3D44;
    --link-hover: #7FC25E;
    color-scheme: dark;
  }
}
/* … oder per Umschalter gewählt */
:root[data-theme="dark"] {
  --bg: #172024;
  --surface: #1F2A30;
  --text: #EEF2F3;
  --muted: #A9B8BE;
  --line: #2E3D44;
  --link-hover: #7FC25E;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: Roboto, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

/* ---------- Startseite ---------- */
.home {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(4rem, 10vh, 6rem) 1.25rem clamp(3rem, 8vh, 6rem);
}
.stage { width: 100%; max-width: 46rem; text-align: center; }
.stage h1 { margin: 0; font-size: inherit; line-height: 0; }
.logo { display: block; width: min(100%, 36rem); height: auto; margin: 0 auto; }
.accent {
  width: 3rem;
  height: 3px;
  margin: clamp(2.25rem, 6vh, 3.5rem) auto 1.5rem;
  border-radius: 2px;
  background: var(--gruen);
}
.notice {
  max-width: 34rem;
  margin: 0 auto;
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
  color: var(--muted);
}
.notice strong { color: var(--text); font-weight: 600; }
.nowrap { white-space: nowrap; }
/* Englische Fassung des Hinweises: direkt darunter, etwas dezenter */
.notice-en {
  margin-top: 0.85rem;
  font-size: clamp(0.875rem, 0.84rem + 0.2vw, 0.95rem);
}
.notice-en strong { color: var(--muted); }

/* Logo: farbig im hellen, negativ im dunklen Modus */
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
}
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }

/* ---------- Unterseite Impressum & Datenschutz ---------- */
.page {
  flex: 1;
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) 1.25rem clamp(2.5rem, 6vw, 4rem);
}
.brand { display: inline-block; margin: 0 0 clamp(2rem, 5vw, 3rem); border-radius: 4px; }
.brand .logo { width: 11rem; margin: 0; }
.brand:focus-visible { outline: 2px solid var(--link-hover); outline-offset: 4px; }
.legal h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem);
  line-height: 1.25;
  font-weight: 700;
}
.legal .lead { margin: 0 0 1rem; color: var(--muted); }
.legal h2 {
  margin: 2.5rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 1.3rem;
  line-height: 1.3;
}
.legal h3 { margin: 1.5rem 0 0.35rem; font-size: 1rem; line-height: 1.4; }
.legal p, .legal address { margin: 0 0 1rem; }
.legal address { font-style: normal; }
.legal a { color: var(--link-hover); }
.legal .stand { margin-top: 2.5rem; font-size: 0.875rem; color: var(--muted); }

/* ---------- Fußzeile ---------- */
footer {
  padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
}
footer a {
  display: inline-block;
  padding: 0.5rem 0.25rem;
  color: inherit;
  text-decoration: none;
}
footer a:hover, footer a:focus-visible { color: var(--link-hover); text-decoration: underline; }
footer a:focus-visible { outline: 2px solid var(--link-hover); outline-offset: 2px; border-radius: 2px; }
footer a[aria-current="page"] { color: var(--text); }
.sep { margin: 0 0.5rem; opacity: 0.6; }

/* ---------- Umschalter Hell/Dunkel ---------- */
.theme-toggle {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { border-color: var(--muted); }
.theme-toggle:focus-visible { outline: 2px solid var(--link-hover); outline-offset: 3px; }
.theme-toggle svg { width: 1.25rem; height: 1.25rem; }
.icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: block; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }

/* ---------- Login (vorerst ohne Funktion) ---------- */
/* sitzt links neben dem Umschalter Hell/Dunkel (2,75rem breit + 0,5rem Abstand) */
.login-wrap {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  right: calc(max(1rem, env(safe-area-inset-right)) + 3.25rem);
  z-index: 10;
}
.login {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 2.75rem;
  padding: 0 1.1rem 0 0.95rem;
  border: 1px solid var(--line);
  border-radius: 1.375rem;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  cursor: default;
}
.login svg { width: 1.125rem; height: 1.125rem; flex: none; }
.login:hover { border-color: var(--muted); }
.login:focus-visible { outline: 2px solid var(--link-hover); outline-offset: 3px; }
/* Hinweis „Bald verfügbar · Coming soon“ unter dem Button */
.login-hint {
  position: absolute;
  top: calc(100% + 0.65rem);
  right: 0;
  width: max-content;
  max-width: 14rem;
  margin: 0;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.45;
  text-align: left;
  box-shadow: 0 6px 18px rgba(31, 42, 48, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  pointer-events: none;
}
.login-hint::before {
  content: "";
  position: absolute;
  top: -0.35rem;
  right: 2.6rem;   /* mittig unter dem Button */
  width: 0.6rem;
  height: 0.6rem;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--surface);
  transform: rotate(45deg);
}
.login-hint strong { display: block; color: var(--text); font-weight: 600; }
.login:hover + .login-hint,
.login:focus-visible + .login-hint,
.login-wrap.is-open .login-hint {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.login-wrap.is-closed .login-hint { opacity: 0; visibility: hidden; }   /* Esc blendet aus */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .login-hint { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
}
:root[data-theme="dark"] .login-hint { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }

/* ---------- Smartphone ---------- */
@media (max-width: 30rem) {
  .logo { width: min(100%, 17rem); }   /* Startseite: vertikale Logofassung */
  .brand .logo { width: 9.5rem; }
}

/* ---------- Bewegung nur, wenn erwünscht ---------- */
@media (prefers-reduced-motion: no-preference) {
  body, .theme-toggle, .login { transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; }
  .login-hint { transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s; }
  .stage { animation: einblenden 0.8s ease-out both; }
  @keyframes einblenden {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
  }
}
