/* ═══════════════════════════════════════════════════════════
   BIT OF BLUE — shared styles
   Reset, design tokens, and the chrome used on every page (nav,
   footer, cookie banner, back-to-top, bilingual [data-lang] system).
   Page-specific layout stays in that page's own <style> block, which
   is loaded after this file and can override anything here.
   ═══════════════════════════════════════════════════════════ */

/* Self-hosted fonts (previously Google Fonts) — both are variable
   fonts, so one file per style covers every weight we use, and being
   same-origin means no extra DNS/TLS round trips to Google before
   text can render. Latin subset only (covers German + English). */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('fonts/plus-jakarta-sans.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('fonts/fraunces-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 300 600;
  font-display: swap;
  src: url('fonts/fraunces-italic.woff2') format('woff2');
}

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

:root {
  --blue:      #1a6fad;
  --blue-mid:  #2589cc;
  --blue-light:#d6eaf8;
  --blue-pale: #eef6fd;
  --white:     #ffffff;
  --off-white: #f7fbfe;
  --ink:       #0f2333;
  --ink-soft:  #3a5a72;
  --muted:     #7da8c4;
  --accent:    #f0a500;
  --border:    rgba(26,111,173,0.12);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Plus Jakarta Sans', system-ui, sans-serif;
  --nav-h: 130px;
}

html { scroll-behavior: smooth; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: var(--blue-light) transparent; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--blue-light); border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ═══════════════════ NAV ═══════════════════ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h);
  display: flex; align-items: center;
  padding: 0 2.5rem;
  background: transparent;
  flex-shrink: 0;
}
nav.transitions-ready {
  transition: background 0.35s, box-shadow 0.35s, backdrop-filter 0.35s, height 0.35s;
}
nav.scrolled {
  height: 100px;
  background: rgba(255,255,255,0.93);
  backdrop-filter: blur(16px);
  box-shadow: 0 2px 24px rgba(26,111,173,0.08);
  border-bottom: 1px solid var(--border);
}

.nav-center {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: flex; gap: 0.3rem;
}

.nav-logo {
  text-decoration: none;
  display: flex; align-items: center; gap: 0.5rem;
}
.nav-logo img {
  height: 72px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  transition: filter 0.35s, height 0.35s;
}
nav.scrolled .nav-logo img {
  filter: none;
  height: 56px;
}
nav.scrolled .nav-logo { color: var(--blue); }

.nav-btn {
  font-family: var(--font-body); font-size: 0.9rem;
  font-weight: 500; letter-spacing: 0.01em;
  color: rgba(255,255,255,0.85); background: none; border: none;
  padding: 0.55rem 1.2rem; border-radius: 100px;
  cursor: pointer; transition: background 0.18s, color 0.18s;
  text-decoration: none; display: inline-flex; align-items: center;
}
.nav-btn:hover { background: rgba(255,255,255,0.18); color: #fff; }
.nav-btn.active { background: rgba(255,255,255,0.22); color: #fff; }

nav.scrolled .nav-btn { color: var(--ink-soft); }
nav.scrolled .nav-btn:hover { background: var(--blue-pale); color: var(--blue); }
nav.scrolled .nav-btn.active { background: var(--blue); color: #fff; }

.lang-toggle { display: flex; gap: 0.3rem; margin-left: auto; }
.lang-btn {
  font-family: var(--font-body); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.06em; padding: 0.3rem 0.75rem;
  border: 1px solid rgba(255,255,255,0.4); border-radius: 100px;
  background: none; color: rgba(255,255,255,0.7); cursor: pointer;
  transition: all 0.18s;
}
.lang-btn.active,
.lang-btn:hover { border-color: rgba(255,255,255,0.9); color: #fff; background: rgba(255,255,255,0.15); }

nav.scrolled .lang-btn { border-color: var(--border); color: var(--muted); }
nav.scrolled .lang-btn.active,
nav.scrolled .lang-btn:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-pale); }

/* ═══════════════════ MINI-HERO (contact/imprint/privacy/admin) ═══════════════════ */
.contact-mini-hero {
  position: relative;
  min-height: 32vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.contact-mini-content {
  position: relative; z-index: 2;
  padding: 0 2.5rem 2rem;
  max-width: 600px;
  margin-left: 8vw;
}
.contact-mini-wave {
  position: absolute; bottom: -2px; left: 0; right: 0; z-index: 3;
  height: 140px; pointer-events: none;
}
.contact-mini-photo {
  position: absolute; inset: 0; z-index: 0;
  background:
    url('./img/header/header.webp')
    center 40% / cover no-repeat;
}
.contact-mini-photo::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    110deg,
    rgba(8,26,44,0.72) 0%,
    rgba(10,40,70,0.5) 55%,
    rgba(8,26,44,0.25) 100%
  );
}

/* ═══════════════════ MINI-HERO TEXT ═══════════════════ */
.hero-h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  font-weight: 300; line-height: 1.05;
  color: #fff; letter-spacing: -0.02em;
  margin-bottom: 0.8rem;
}
.hero-h1 em { font-style: italic; color: #7ed4f5; }

.hero-sub {
  font-size: 0.95rem; line-height: 1.75;
  color: rgba(255,255,255,0.8);
  font-weight: 400; margin-bottom: 0;
}

/* ═══════════════════ BACK TO TOP ═══════════════════ */
.back-to-top {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 150;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer;
  box-shadow: 0 8px 24px rgba(26,111,173,0.3);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s, background 0.2s;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: #155d94; }
.back-to-top svg { width: 20px; height: 20px; }
@media (max-width: 600px) { .back-to-top { bottom: 1.25rem; right: 1.25rem; width: 42px; height: 42px; } }

/* ═══════════════════ FOOTER ═══════════════════ */
footer {
  position: relative;
  flex-shrink: 0;
  background: var(--ink);
  color: rgba(255,255,255,0.5);
  padding: 1.5rem 2.5rem;
  font-size: 0.78rem;
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  flex-wrap: wrap;
}
footer a { color: rgba(255,255,255,0.5); text-decoration: none; transition: color 0.2s; }
footer a:hover { color: rgba(255,255,255,0.85); }
.footer-copy { font-size: 0.78rem; }

.footer-admin { position: absolute; bottom: 1rem; left: 1.25rem; opacity: 0.25; font-size: 0.85rem; transition: opacity 0.2s; }
.footer-admin:hover { opacity: 0.6; color: rgba(255,255,255,0.85); }

.footer-socials { display: flex; gap: 0.7rem; }
.footer-socials a {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6);
  transition: background 0.2s, color 0.2s;
}
.footer-socials a:hover { background: rgba(255,255,255,0.16); color: #fff; }
.footer-socials svg { width: 15px; height: 15px; }

/* ═══════════════════ COOKIE BANNER ═══════════════════ */
#cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: var(--ink); color: rgba(255,255,255,0.85);
  padding: 1.5rem 2rem;
  display: flex; align-items: flex-start; gap: 2rem; flex-wrap: wrap;
  box-shadow: 0 -4px 32px rgba(0,0,0,0.25);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
#cookie-banner.visible { transform: translateY(0); }
.cookie-text { flex: 1; min-width: 260px; }
.cookie-text strong { display: block; margin-bottom: 0.4rem; font-size: 0.95rem; color: #fff; }
.cookie-text strong[data-lang] { display: none; }
body.lang-de .cookie-text strong[data-lang="de"],
body.lang-en .cookie-text strong[data-lang="en"] { display: block; }
.cookie-text p { font-size: 0.82rem; line-height: 1.6; color: rgba(255,255,255,0.6); }
.cookie-text a { color: var(--blue-light); text-decoration: underline; }
.cookie-cats { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin-top: 0.8rem; }
.cookie-cat { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: rgba(255,255,255,0.7); }
.cookie-cat input[type="checkbox"] { accent-color: var(--blue-mid); width: 15px; height: 15px; }
.cookie-cat.locked { opacity: 0.5; cursor: not-allowed; }
.cookie-actions { display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-end; justify-content: center; }
.cookie-btn-accept {
  background: var(--blue); color: #fff; border: none; border-radius: 100px;
  padding: 0.6rem 1.5rem; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; font-family: var(--font-body); white-space: nowrap; transition: background 0.2s;
}
.cookie-btn-accept:hover { background: var(--blue-mid); }
.cookie-btn-save {
  background: transparent; color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.2); border-radius: 100px;
  padding: 0.5rem 1.2rem; font-size: 0.8rem; font-weight: 500;
  cursor: pointer; font-family: var(--font-body); white-space: nowrap; transition: all 0.2s;
}
.cookie-btn-save:hover { border-color: rgba(255,255,255,0.5); color: #fff; }

.icon-inline { width: 1em; height: 1em; flex-shrink: 0; vertical-align: -0.15em; margin-right: 0.3em; }
.icon-inline.icon-text { margin-right: 0.35em; }

/* ═══════════════════ LANG SYSTEM ═══════════════════ */
/* "body" bumps specificity above any plain page-local class rule (e.g.
   .section-tag { display: inline-block }), so the hidden-by-default
   state always wins regardless of whether this file or a page's own
   <style> loads last — only the higher-specificity body.lang-xx rules
   below should ever re-show an element. */
body [data-lang] { display: none; }
body.lang-de [data-lang="de"],
body.lang-en [data-lang="en"] { display: block; }
body.lang-de [data-lang="de"].inline,
body.lang-en [data-lang="en"].inline { display: inline; }
body.lang-de [data-lang="de"].flex,
body.lang-en [data-lang="en"].flex { display: flex; }
body.lang-de [data-lang="de"].grid,
body.lang-en [data-lang="en"].grid { display: grid; }

/* ═══════════════════ VIEW TRANSITIONS ═══════════════════ */
/* Names the nav and footer so a same-origin cross-document navigation
   (opted into per-page via <meta name="view-transition">) morphs them
   in place instead of the default hard cut — Chromium only for now,
   other browsers just ignore this and navigate as before. */
@media (prefers-reduced-motion: no-preference) {
  #main-nav { view-transition-name: main-nav; }
  footer { view-transition-name: main-footer; }
}

/* ═══════════════════ RESPONSIVE (shared chrome) ═══════════════════ */
@media (max-width: 600px) {
  nav { padding: 0 1rem; height: 64px; justify-content: space-between; }
  nav.scrolled { height: 60px; }
  .nav-logo img { height: 42px; }
  nav.scrolled .nav-logo img { height: 38px; }
  .nav-center { position: static; transform: none; gap: 0.2rem; }
  .nav-btn { font-size: 0.78rem; padding: 0.4rem 0.6rem; }
  .lang-toggle { margin-left: 0; gap: 0.3rem; }
  .lang-btn { padding: 0.25rem 0.6rem; font-size: 0.72rem; }
  .contact-mini-content { margin-left: 0; padding: 0 1.5rem 2rem; }
  .hero-sub { display: none !important; }
}

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