/* ── Design Tokens ── */
*, *::before, *::after { box-sizing: border-box; }

/* ── A11y Utilities ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 10001;
  background: var(--orange);
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
.skip-link:focus {
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
}

/* ── Globale Focus-Sichtbarkeit ── */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Touch-Target Minimum ── */
button,
.btn-primary,
.btn-secondary,
.btn-hero-primary,
.btn-hero-ghost,
.nav-link,
.nav-cta,
.form-input,
input[type="email"],
input[type="password"],
input[type="text"] {
  min-height: 44px;
}
/* Ausnahmen: kleine Icon-Buttons mit expliziter fester Größe */
.about-carousel-dot,
.carousel-dot,
.today-close,
.lightbox-close,
.carousel-btn,
.pwa-install-close {
  min-height: 0;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Scroll Progress Bar ── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #E6521F 0%, #ff8a4f 100%);
  box-shadow: 0 0 8px rgba(230,82,31,0.5);
  z-index: 10000;
  transition: width 0.08s linear;
  pointer-events: none;
}

:root {
  /* ── Brand Colors ── */
  --navy:        #1a3f5c;
  --navy-mid:    #2a5a80;
  --orange:      #E6521F;
  --orange-dark: #cf4418;
  --white:       #ffffff;
  --gray-light:  #f2f4f6;
  --gray-mid:    #d0d8e0;
  --text:        #1a1e2e;
  --muted:       #5a6478;

  /* ── Typography Scale (use these instead of arbitrary values) ── */
  --fs-xs:   0.75rem;    /* 12px – Caption, Eyebrow */
  --fs-sm:   0.875rem;   /* 14px – Small body, Card desc */
  --fs-base: 1rem;       /* 16px – Body */
  --fs-md:   1.125rem;   /* 18px – Lead paragraph */
  --fs-lg:   1.25rem;    /* 20px – Card title sm */
  --fs-xl:   1.5rem;     /* 24px – Section subtitle */
  --fs-2xl:  2rem;       /* 32px – Section title */
  --fs-3xl:  2.5rem;     /* 40px – Page title */

  --lh-tight:  1.15;     /* Headlines */
  --lh-snug:   1.4;      /* Subheads */
  --lh-normal: 1.6;      /* UI Text, Card body */
  --lh-loose:  1.75;     /* Long-form body, prose */

  /* ── Text Color Tokens (semantic) ── */
  --color-text-primary:    var(--text);     /* Headings, key content */
  --color-text-body:       var(--muted);    /* Body prose (about, posts, legal) */
  --color-text-secondary:  var(--muted);    /* Card metadata */
  --color-text-on-dark:    rgba(255,255,255,0.85);  /* Body text on navy */
  --color-text-on-dark-muted: rgba(255,255,255,0.65); /* Sub-text on navy (AA-konform) */
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('../fonts/BarlowCondensed-Bold.ttf') format('truetype');
  font-weight: 700 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('../fonts/BarlowCondensed-MediumItalic.ttf') format('truetype');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  width: 100%;
  max-width: 100vw;
}
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

/* ── Touch: nur vertikales Scrollen erlauben (Mobile) ── */
@media (max-width: 1023px) {
  html, body { touch-action: pan-y pinch-zoom; }
}

/* ── Global word-break safety net (verhindert lange deutsche Wörter sprengen Layout) ── */
p, h1, h2, h3, h4, h5, h6, li, td, th, dt, dd {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* ── Navigation ── */
.nav-outer {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 80px);
  max-width: 1160px;
  z-index: 200;
  transition: top 0.3s ease;
}
.nav-outer.stuck {
  top: 12px;
}
.nav-inner {
  background: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 68px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.14), 0 1px 4px rgba(0,0,0,0.08);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.nav-logo img { height: 44px; width: auto; }
.nav-logo-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy);
  line-height: 1.2;
  white-space: nowrap;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  cursor: pointer;
  border: none;
  background: none;
  display: inline-flex;
  align-items: center;
}
.nav-link:hover { color: var(--navy); background: var(--gray-light); }
.nav-link.active { color: var(--navy); position: relative; }
.nav-link.active::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--orange);
  border-radius: 1px;
  transform-origin: left center;
  animation: nav-underline-in 0.28s cubic-bezier(0.22,0.8,0.3,1);
}
@keyframes nav-underline-in {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}
.nav-cta {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  cursor: pointer;
  margin-left: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.nav-cta:hover {
  background: var(--orange-dark);
  box-shadow: 0 0 14px rgba(230,82,31,0.45), 0 4px 14px rgba(230,82,31,0.28);
  transform: translateY(-1px);
}

/* ── Logged-in user pill (replaces nav-cta) ── */
.nav-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-light);
  border: 1px solid var(--gray-mid);
  border-radius: 8px;
  padding: 6px 14px 6px 8px;
  margin-left: 8px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.nav-user-pill:hover {
  background: rgba(230,82,31,0.07);
  border-color: rgba(230,82,31,0.3);
}
.nav-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 0.75rem;
  color: #fff;
  flex-shrink: 0;
}
.nav-user-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--navy);
}

/* ── Layout ── */
.section-wrap { padding: 96px 40px; }
.section-wrap.alt { background: var(--gray-light); }
.container { max-width: 1160px; margin: 0 auto; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 16px;
}
.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--orange);
  border-radius: 1px;
}
.section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 3.5vw, 3rem);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: var(--text);
  margin: 0 0 20px;
}
.section-cta-row { display: flex; justify-content: center; margin-top: 44px; }

/* ── Buttons ── */
.btn-primary,
.btn-secondary,
.btn-hero-primary,
.btn-hero-ghost {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  border: none;
}
.btn-primary {
  background: var(--orange);
  color: #fff;
  font-size: 1rem;
  padding: 13px 30px;
}
.btn-primary:hover {
  background: var(--orange-dark);
  box-shadow: 0 0 14px rgba(230,82,31,0.45), 0 4px 16px rgba(230,82,31,0.28);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--navy);
  color: #fff;
  font-size: 1rem;
  padding: 13px 30px;
}
.btn-secondary:hover {
  background: var(--navy-mid);
  box-shadow: 0 4px 14px rgba(26,63,92,0.3);
  transform: translateY(-1px);
}
.btn-hero-primary {
  background: var(--orange);
  color: #fff;
  font-size: 1rem;
  padding: 14px 32px;
}
.btn-hero-primary:hover {
  background: var(--orange-dark);
  box-shadow: 0 0 20px rgba(230,82,31,0.5), 0 6px 24px rgba(230,82,31,0.3);
  transform: translateY(-2px);
}
.btn-hero-ghost {
  background: transparent;
  color: rgba(255,255,255,0.85);
  border: 1.5px solid rgba(255,255,255,0.3);
  font-size: 1rem;
  padding: 13px 28px;
}
.btn-hero-ghost:hover {
  border-color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.07);
  color: #fff;
}

/* ── Footer ── */
.footer { background: var(--navy); color: #fff; }
.footer-main { padding: 64px 40px 48px; position: relative; overflow: hidden; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 64px;
}
.footer-brand { display: flex; flex-direction: column; gap: 16px; }
.footer-logo { display: flex; align-items: center; gap: 12px; }
.footer-logo img {
  height: 48px;
  width: auto;
}
.footer-logo-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.9);
  line-height: 1.3;
  white-space: nowrap;
}
.footer-desc {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
  max-width: 360px;
}
.footer-col-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin: 0 0 20px;
}
.footer-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-nav-list li a {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-nav-list li a:hover { color: #fff; }
.footer-contact { display: flex; flex-direction: column; gap: 10px; }
.footer-contact-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
}
.footer-contact-icon { flex-shrink: 0; margin-top: 2px; opacity: 0.5; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 40px;
}
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-copyright {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.60);
  letter-spacing: 0.03em;
}
.footer-legal { display: flex; gap: 24px; }
.footer-legal a {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.60);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-legal a:hover { color: rgba(255,255,255,0.7); }

/* ── Hamburger button (injected by nav.js) ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 1px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.nav-inner.menu-open .nav-hamburger span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-inner.menu-open .nav-hamburger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-inner.menu-open .nav-hamburger span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Nav: hamburger (≤ 1279px) ── */
@media (max-width: 1279px) {
  .nav-outer { width: calc(100% - 48px); }
  .nav-inner { flex-wrap: wrap; height: auto; padding: 0 20px; align-items: center; }
  .nav-inner > .nav-logo { height: 64px; display: flex; align-items: center; }
  .nav-hamburger { display: flex; height: 64px; align-items: center; }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    padding: 8px 0 16px;
    gap: 2px;
    border-top: 1px solid var(--gray-light);
    order: 10;
  }
  .nav-inner.menu-open .nav-links { display: flex; }
  .nav-link { width: 100%; padding: 12px 10px; text-align: left; font-size: 0.95rem; border-radius: 6px; }
  .nav-cta, .nav-user-pill {
    display: none;
    order: 11;
    margin: 4px 0 14px;
    align-self: flex-start;
  }
  .nav-inner.menu-open .nav-cta,
  .nav-inner.menu-open .nav-user-pill { display: inline-flex; }
}

/* ── Tablet (768px – 1023px) ── */
@media (max-width: 1023px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-main { padding: 56px 32px 40px; }
  .footer-bottom { padding: 20px 32px; }
  .section-wrap { padding: 72px 32px; }
}

/* ── Mobile (< 768px) ── */
@media (max-width: 767px) {
  .nav-outer { width: calc(100% - 32px); top: 16px; }
  .nav-outer.stuck { top: 10px; }
  .nav-inner { padding: 0 16px; }
  .nav-inner > .nav-logo { height: 58px; }
  .nav-hamburger { height: 58px; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-main { padding: 44px 20px 32px; }
  .footer-bottom { padding: 16px 20px; }
  .footer-bottom-inner { flex-direction: column; gap: 10px; align-items: flex-start; }
  .footer-legal { flex-wrap: wrap; gap: 16px; }
  .section-wrap { padding: 52px 20px; }
  .section-cta-row { margin-top: 28px; }
  .btn-hero-primary,
  .btn-hero-ghost { width: 100%; justify-content: center; }
}
