/* ================================================================
   assets/css/shared.css
   Design-System für nicoegerer.de — eine Datei, alle Seiten.
   ================================================================ */

/* ── 0. Variablen ─────────────────────────────────────────────── */
:root {
  --blau:        #98d5eb;
  --beige:       #faf6f0;
  --grau:        #acabaa;
  --dunkel:      #25221e;
  --weiss:       #ffffff;

  --font-base:   'Inter', sans-serif;
  --font-serif:  'Playfair Display', serif;
  --font-script: 'Dancing Script', cursive;
  --font-rund:   'Fredoka', sans-serif;

  --gap-s:  1rem;
  --gap-m:  2rem;
  --gap-l:  4rem;
  --gap-xl: 6rem;

  --r:    20px;
  --r-s:  10px;
  --max-w: 1200px;
  --nav-h: 64px;
}

/* ── 1. Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a   { text-decoration: none; color: inherit; }

/* ── 2. Typography helpers ─────────────────────────────────────── */
.label {
  font-family: var(--font-rund);
  font-size: 1rem;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.4rem;
  color: #888;
}
.label.white { color: rgba(255,255,255,0.65); }

.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: var(--gap-s);
}
.section-heading.dark  { color: #111; }
.section-heading.white { color: var(--weiss); }

/* ── 3. Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.65rem 1.6rem;
  border-radius: 40px;
  font-size: 0.95rem;
  font-family: var(--font-base);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.22s ease;
  white-space: nowrap;
}
.btn-outline {
  background: transparent;
  color: var(--weiss);
  border-color: var(--weiss);
}
.btn-outline:hover { background: rgba(255,255,255,0.14); transform: translateY(-2px); }

.btn-light {
  background: rgba(255,255,255,0.1);
  color: var(--weiss);
  border-color: rgba(255,255,255,0.4);
}
.btn-light:hover { background: rgba(255,255,255,0.22); transform: translateY(-2px); }

.btn-dark-outline {
  background: transparent;
  color: #111;
  border-color: #111;
}
.btn-dark-outline:hover { background: #111; color: var(--weiss); transform: translateY(-2px); }

.btn-blau {
  background: var(--blau);
  color: #111;
  border-color: var(--blau);
}
.btn-blau:hover { background: #7bc8e0; border-color: #7bc8e0; transform: translateY(-2px); }

.link-arrow {
  font-size: 1rem;
  color: #444;
  transition: opacity 0.2s;
}
.link-arrow:hover { opacity: 0.55; }

/* ── 4. Tags ───────────────────────────────────────────────────── */
.tag {
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  padding: 0.2rem 0.75rem;
  font-size: 0.78rem;
  font-family: var(--font-base);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  cursor: default;
}
.tag:hover { background: rgba(255,255,255,0.1); color: var(--weiss); border-color: rgba(255,255,255,0.6); }

.tag-dark {
  background: transparent;
  color: #444;
  border: 1px solid #ccc;
  border-radius: 20px;
  padding: 0.2rem 0.75rem;
  font-size: 0.78rem;
  transition: background 0.2s, color 0.2s;
  cursor: default;
}
.tag-dark:hover { background: #f0f0f0; color: #111; }

/* ── 5. Navigation ─────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}
.nav.scrolled {
  background: rgba(10,10,10,0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 1.4rem;
}
.nav-logo {
  font-family: var(--font-rund);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--weiss);
  transition: color 0.2s;
}
.nav-logo:hover { color: #ffbf41; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Nav icon — wraps inline SVGs */
.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  opacity: 0.8;
  transition: opacity 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.nav-icon:hover { opacity: 1; transform: translateY(-2px); }
.nav-icon svg   { width: 22px; height: 22px; }

/* Burger button */
.burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: background 0.2s;
}
.burger:hover { background: rgba(255,255,255,0.1); }
.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--weiss);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ── 6. Sidebar ─────────────────────────────────────────────────── */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.sidebar-overlay.open { opacity: 1; pointer-events: all; }

.sidebar {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: clamp(240px, 22vw, 340px);
  background: var(--beige);
  z-index: 400;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.8rem;
  box-shadow: -8px 0 40px rgba(0,0,0,0.18);
}
.sidebar.open { transform: translateX(0); }

.sidebar-close {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: #555;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  margin-bottom: 1.2rem;
}
.sidebar-close:hover { background: #eee; color: #111; }

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.sidebar-link-main {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111;
  padding: 0.65rem 0;
  border-bottom: 1px solid #e8e4df;
  transition: color 0.18s, padding-left 0.18s;
}
.sidebar-link-main:hover,
.sidebar-link-main.active { color: #0072b5; }
.sidebar-link-main:hover  { padding-left: 6px; }

.sidebar-link-sub {
  font-size: 0.9rem;
  color: #666;
  padding: 0.45rem 0 0.45rem 0.8rem;
  border-bottom: 1px solid #e8e4df;
  transition: color 0.18s, padding-left 0.18s;
}
.sidebar-link-sub:hover { color: #0072b5; padding-left: 14px; }

/* ── 7. Page Hero (subpages) ───────────────────────────────────── */
.page-hero {
  min-height: 55vh;
  background: linear-gradient(135deg, var(--dunkel) 0%, #1a3340 55%, #0a1a22 100%);
  display: flex;
  align-items: flex-end;
  padding: calc(var(--nav-h) + 3rem) var(--gap-m) var(--gap-l);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(152,213,235,0.12) 0%, transparent 65%);
  pointer-events: none;
}
.page-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}
.page-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 400;
  color: var(--weiss);
  line-height: 1.1;
  margin-bottom: 1rem;
}
.page-hero-sub {
  color: rgba(255,255,255,0.6);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  max-width: 560px;
  line-height: 1.7;
}
.page-hero-accent { color: var(--blau); }

/* ── 8. Footer ─────────────────────────────────────────────────── */
.footer {
  background: var(--dunkel);
  padding: var(--gap-m) var(--gap-m) var(--gap-l);
}
.footer-inner {
  max-width: 95%;
  margin: 0 auto;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--gap-m);
}
.footer-links {
  display: flex;
  gap: var(--gap-l);
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--gap-m);
}
.footer-col { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-main {
  color: var(--weiss);
  font-size: 0.95rem;
  font-weight: 600;
  transition: opacity 0.2s;
  margin-right: clamp(0.8rem, 4vw, 70px);
}
.footer-main:hover { opacity: 0.65; }
.footer-sub {
  color: rgba(255,255,255,0.5);
  font-size: 0.82rem;
  transition: opacity 0.2s;
}
.footer-sub:hover { opacity: 1; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.footer-logo {
  font-family: var(--font-rund);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--weiss);
  transition: color 0.2s;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.footer-logo:hover { color: #ffbf41; }
.footer-social { display: flex; gap: 0.75rem; margin-left: auto; }
.footer-social-icon { width: 24px; height: 24px; }
.footer-social-icon svg { width: 18px; height: 18px; }

/* ── 9. Scroll Reveal ──────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── 10. Contact Form (shared) ─────────────────────────────────── */
.cf-success, .cf-error {
  display: none;
  margin-top: 1rem;
  padding: 0.9rem 1.2rem;
  border-radius: var(--r-s);
  font-size: 0.95rem;
}
.cf-success { background: rgba(80,200,120,0.12); color: #6fc98a; border: 1px solid #6fc98a44; }
.cf-error   { background: rgba(220,80,80,0.12);  color: #e07070; border: 1px solid #e0707044; }

/* ── 11. Timeline (shared) ─────────────────────────────────────── */
.tl-wrap {
  display: grid;
  grid-template-columns: 60px 1fr;
  max-width: 700px;
  margin: 0 auto;
}
.tl-line-col { display: flex; justify-content: center; }
.tl-track {
  width: 3px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  position: relative;
}
.tl-fill {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: var(--blau);
  border-radius: 2px;
  height: 0%;
  transition: height 0.2s ease;
}
.tl-entries {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 1.5rem;
}
.tl-card {
  padding: 1.5rem 1.8rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r);
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.55s ease, transform 0.55s ease, background 0.3s;
}
.tl-card.visible { opacity: 1; transform: translateX(0); }
.tl-card:hover   { background: rgba(255,255,255,0.08); }
.tl-year {
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--blau);
  display: block;
  margin-bottom: 0.4rem;
}
.tl-title {
  color: var(--weiss);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.tl-text  { color: rgba(255,255,255,0.55); font-size: 0.9rem; line-height: 1.6; }
.tl-more  { font-size: 0.88rem; color: var(--blau); display: inline-block; margin-top: 0.5rem; }
.tl-more:hover { opacity: 0.7; }

/* ── 12. Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .footer-links {
    justify-content: space-between;
    align-items: flex-start;
    gap: clamp(0.8rem, 2vw, var(--gap-l));
    width: 100%;
  }
  .footer-col { flex: 1 1 0; min-width: 0; }
  .footer-main { font-size: clamp(0.7rem, 1vw, 0.95rem); margin-right: 0; white-space: nowrap; }
  .footer-sub  { font-size: clamp(0.65rem, 0.9vw, 0.82rem); white-space: nowrap; }
}
@media (max-width: 600px) {
  :root { --gap-l: 2.2rem; --gap-xl: 3.2rem; }
  .sidebar { width: 80vw; }
  .page-hero { min-height: 45vh; }
}
