:root {
  --ink: #17212c;
  --ink-soft: #46515e;
  --navy: #0f2540;
  --accent: #0b6e8a;
  --accent-dark: #084f63;
  --bg: #ffffff;
  --bg-alt: #f2f6f9;
  --line: #d9e1e8;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 37, 64, 0.1);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-dark); }
h1, h2, h3 { line-height: 1.2; color: var(--navy); margin: 0 0 0.6em; }
h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

/* Two-tone focus ring (white gap + dark ring): >= 3:1 on light and dark backgrounds */
:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px #fff;
  border-radius: 4px;
}

.wrap { width: min(100% - 2rem, 70rem); margin-inline: auto; }
.narrow { width: min(100% - 2rem, 46rem); }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--navy);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0 0 8px 8px;
  z-index: 100;
}
.skip-link:focus { top: 0; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding-block: 0.4rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  text-decoration: none;
  color: var(--navy);
}
.brand img { height: 2.75rem; width: auto; }
.brand-text { font-size: 0.85rem; line-height: 1.2; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-soft); }

.main-nav { order: 3; width: 100%; }
.main-nav ul { display: flex; flex-wrap: wrap; gap: 0 0.25rem; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.75rem;
  color: var(--ink);
  text-decoration: none;
  border-radius: 8px;
}
.main-nav a:hover { background: var(--bg-alt); color: var(--accent-dark); }

.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.lang-switch button {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.lang-switch button:focus-visible { outline: 3px solid var(--accent); outline-offset: -5px; box-shadow: none; }

/* Hero */
.hero {
  position: relative;
  min-height: min(82vh, 40rem);
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  background: var(--navy);
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(8, 24, 44, 0.9) 0%, rgba(8, 24, 44, 0.72) 55%, rgba(8, 24, 44, 0.45) 100%);
}
.hero-content { position: relative; padding-block: 4rem; }
.hero h1 { color: #fff; font-size: clamp(2rem, 6vw, 3.4rem); max-width: 20ch; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.85rem; font-weight: 600; color: #bfe6f2; margin-bottom: 0.8rem; }
.lead { font-size: clamp(1.05rem, 2.4vw, 1.25rem); max-width: 40rem; color: #eef4f8; }

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 1.5rem;
  background: #fff;
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25); }

/* Sections */
.section { padding-block: clamp(3rem, 8vw, 6rem); }
.section-alt { background: var(--bg-alt); }

.cards { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card-body { padding: 1.5rem; }
.card ul { margin: 0; padding-left: 1.2rem; color: var(--ink-soft); }

.intro { max-width: 46rem; font-size: 1.1rem; color: var(--ink-soft); }

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 1.25rem;
  margin: 1.5rem 0 0;
  padding: 0;
}
.steps li {
  counter-increment: step;
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--line);
}
.steps li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.steps p { margin: 0; color: var(--ink-soft); }

.page-title { font-size: clamp(1.8rem, 5vw, 2.6rem); margin-bottom: 1rem; }

.contact-line { font-size: 1.15rem; }

/* Legal */
.legal h3 { margin-top: 1.4em; font-size: 1.05rem; }
.legal p { margin-bottom: 0.6em; }

/* Footer */
.site-footer { background: var(--navy); color: #dbe6ef; padding-block: 1.5rem; font-size: 0.95rem; }
.site-footer p { margin: 0.25rem 0; }
.site-footer a { color: #fff; display: inline-block; padding-block: 0.7rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; }

/* Avoid a flash of German for English visitors (class set by init.js, removed by main.js) */
.lang-pending body { visibility: hidden; animation: lang-pending-fallback 0s 1.5s forwards; }
@keyframes lang-pending-fallback { to { visibility: visible; } }

/* Scroll reveal: only hidden when JS is active, always visible otherwise */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .cards .reveal:nth-child(2),
.js .steps .reveal:nth-child(2) { transition-delay: 0.08s; }
.js .steps .reveal:nth-child(3) { transition-delay: 0.16s; }
.js .steps .reveal:nth-child(4) { transition-delay: 0.24s; }

/* Gentle parallax-free hero zoom on load */
@media (prefers-reduced-motion: no-preference) {
  .hero-img { animation: hero-in 1.4s ease-out both; }
}
@keyframes hero-in { from { transform: scale(1.06); } to { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}

@media (max-width: 30rem) {
  .brand-text { display: none; }
}

@media (min-width: 48rem) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 60rem) {
  .header-inner { flex-wrap: nowrap; }
  .main-nav { order: 0; width: auto; margin-left: auto; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  html { scroll-padding-top: 4.5rem; }
}
