/* ============================================================
   Alfonso Sanz – Main Stylesheet
   Design: Clean, accessible, senior-friendly, modern
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --color-bg:           #f8f9fa;
  --color-bg-alt:       #eef3f7;
  --color-surface:      #ffffff;
  --color-text:         #1e2d3d;
  --color-text-muted:   #4a5f72;
  --color-accent:       #177196;
  --color-accent-dark:  #104e68;
  --color-accent-light: #e6f2f7;
  --color-border:       #cdd8e3;
  --color-success:      #2e7d5e;

  --color-nav-bg:                  rgba(255, 255, 255, 0.96);
  --color-hero-bg:                 linear-gradient(135deg, #f0f7fb 0%, #f8f9fa 60%, #eef3f7 100%);
  --color-subpage-hero-bg:         linear-gradient(135deg, #f0f7fb 0%, #f8f9fa 100%);
  --color-mobile-nav-bg:           rgba(255, 255, 255, 0.98);
  --color-border-photo:            #ffffff;
  
  --color-form-feedback-success-bg:     #e8f5ee;
  --color-form-feedback-success-border: #b6dfc8;
  --color-form-feedback-error-bg:       #fef0f0;
  --color-form-feedback-error-border:   #f5c6c6;
  --color-form-feedback-error-text:     #c0392b;

  --font-sans: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  --font-size-body:   1.125rem;   /* 18px */
  --font-size-sm:     1rem;       /* 16px */
  --font-size-lg:     1.25rem;    /* 20px */
  --font-size-xl:     1.5rem;
  --font-size-2xl:    2rem;
  --font-size-3xl:    2.5rem;
  --font-size-hero:   clamp(1.8rem, 4vw, 2.75rem);

  --line-height-body: 1.75;
  --line-height-heading: 1.25;

  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   1.5rem;
  --space-lg:   2.5rem;
  --space-xl:   4rem;
  --space-2xl:  6rem;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-full: 9999px;

  --shadow-sm:  0 2px 8px rgba(30,45,61,0.08);
  --shadow-md:  0 6px 24px rgba(30,45,61,0.12);
  --shadow-lg:  0 12px 48px rgba(30,45,61,0.16);

  --nav-height: 70px;
  --max-width:  1100px;
  --transition: 200ms ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  font-size: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--color-accent-dark); }
a:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

ul { list-style: none; }

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.section-heading {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  line-height: var(--line-height-heading);
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.section-subheading {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
  line-height: 1.45;
}

.section-intro {
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--color-text-muted);
  max-width: 72ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.85em 1.8em;
  border-radius: var(--radius-full);
  font-size: var(--font-size-body);
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background-color var(--transition), color var(--transition),
              border-color var(--transition), transform 120ms ease,
              box-shadow var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.btn-primary:hover {
  background-color: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.btn-outline:hover {
  background-color: var(--color-accent);
  color: #fff;
  transform: translateY(-1px);
}

/* ---------- Navigation ---------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background-color: var(--color-nav-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  transition: box-shadow var(--transition);
}

.site-nav.scrolled { box-shadow: var(--shadow-sm); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav-brand span { color: var(--color-accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-links a {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  padding: 0.3em 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.nav-links .btn { border-bottom: none; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}
.nav-toggle span {
  display: block;
  height: 2.5px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: transform 300ms ease, opacity 200ms ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(8.75px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8.75px) rotate(-45deg); }

/* ---------- Hero Section ---------- */
.hero {
  padding-top: calc(var(--nav-height) + var(--space-xl));
  padding-bottom: var(--space-2xl);
  background: var(--color-hero-bg);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(26,127,168,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-xl);
}

.hero-content { max-width: 64ch; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 0.35em 1em;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}

.hero-headline {
  font-size: var(--font-size-hero);
  font-weight: 800;
  line-height: 1.18;
  color: var(--color-text);
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.hero-headline em {
  font-style: normal;
  color: var(--color-accent);
}

.hero-sub {
  font-size: var(--font-size-lg);
  line-height: 1.65;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  max-width: 58ch;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

.hero-trust {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

/* ---------- Hero Target Cards ---------- */
.hero-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-xs);
  width: 100%;
}

.hero-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  transition: transform 300ms ease, box-shadow 300ms ease, border-color 300ms ease;
  height: 100%;
  text-decoration: none; /* Make entire card clean block-link */
  color: inherit;
}

.hero-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}

/* Hover effect for button when card is hovered */
.hero-card:hover .btn {
  background-color: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

@media (prefers-color-scheme: dark) {
  .hero-card:hover .btn {
    color: #0b0f19;
  }
}

.hero-card .card-tag {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-accent);
  letter-spacing: 0.05em;
}

.hero-card .card-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  line-height: var(--line-height-heading);
}

.hero-card .card-text {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0;
}

.hero-card .btn {
  margin-top: auto;
  align-self: flex-start;
  font-size: var(--font-size-sm);
  padding: 0.6em 1.25em;
}

@media (max-width: 900px) {
  .hero-cards-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    margin-top: calc(var(--space-xl) + var(--space-sm)); /* Noticeably more margin-top (approx 80px) */
  }

  .hero-card .btn {
    align-self: stretch;
    justify-content: center;
    text-align: center;
  }
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  font-weight: 500;
}
.trust-item svg { color: var(--color-accent); flex-shrink: 0; }
.trust-divider { width: 1px; height: 20px; background: var(--color-border); }

/* Profile photo */
.hero-photo-wrap {
  flex-shrink: 0;
}

.photo-frame {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid var(--color-border-photo);
  box-shadow: var(--shadow-lg), 0 0 0 2px var(--color-accent-light);
  background-color: var(--color-accent-light);
  position: relative;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--color-accent);
  background: var(--color-accent-light);
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-align: center;
  padding: 1rem;
}

/* ---------- Sections shared ---------- */
section { padding-block: var(--space-2xl); }

.section-alt { background-color: var(--color-bg-alt); }

/* ---------- KI Section ---------- */
.ki-intro-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-xl);
  align-items: start;
  margin-bottom: var(--space-xl);
}

.ki-intro-text {
  display: flex;
  flex-direction: column;
}

.ki-intro-image-wrap {
  width: 100%;
}

.ki-image-frame {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 3px solid var(--color-border);
  box-shadow: var(--shadow-md);
  background: var(--color-accent-light);
  position: relative;
}

.ki-image-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.ki-image-frame .photo-placeholder {
  width: 100%;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--color-accent);
  background: var(--color-accent-light);
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.ki-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-block: var(--space-lg);
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-md);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-value {
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  font-weight: 800;
  color: var(--color-accent);
  display: block;
  margin-bottom: 0.3em;
  line-height: 1.1;
}

.stat-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  font-weight: 500;
  line-height: 1.4;
}

.ki-topics {
  margin-top: var(--space-lg);
}

.ki-topics h3 {
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.topic-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.topic-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: box-shadow var(--transition);
}
.topic-item:hover { box-shadow: var(--shadow-sm); }

.topic-icon {
  width: 44px;
  height: 44px;
  background: var(--color-accent-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  flex-shrink: 0;
}

.topic-text { font-size: var(--font-size-body); color: var(--color-text); line-height: 1.55; }

/* ---------- PC-Hilfe Section ---------- */
.pc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
  margin-top: var(--space-lg);
}

.service-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}

.service-icon {
  width: 48px;
  height: 48px;
  background: var(--color-accent-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  flex-shrink: 0;
}

.service-body h4 {
  font-size: var(--font-size-body);
  font-weight: 700;
  margin-bottom: 0.3em;
}

.service-body p {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.55;
}

.pc-callout {
  background: linear-gradient(135deg, var(--color-accent) 0%, #135f80 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  color: #fff;
  position: sticky;
  top: calc(var(--nav-height) + var(--space-md));
}

.pc-callout h3 {
  font-size: var(--font-size-xl);
  font-weight: 800;
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.pc-callout p {
  font-size: var(--font-size-body);
  opacity: 0.9;
  margin-bottom: var(--space-md);
  line-height: 1.65;
}

.callout-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  width: 100%;
}

.callout-phone-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  background-color: #ffffff;
  color: #104e68;
  border: 2px solid #ffffff;
  padding: 0.8em 1.5em;
  border-radius: var(--radius-full);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), background-color var(--transition), color var(--transition), box-shadow var(--transition);
  width: 100%;
  box-sizing: border-box;
}

.callout-phone-btn:hover {
  background-color: rgba(255, 255, 255, 0.9);
  color: #104e68;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.callout-phone-btn svg {
  flex-shrink: 0;
  transition: transform var(--transition);
}

.callout-phone-btn:hover svg {
  transform: scale(1.1);
}

.callout-email-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  background-color: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
  padding: 0.8em 1.5em;
  border-radius: var(--radius-full);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform var(--transition), background-color var(--transition), color var(--transition), box-shadow var(--transition);
  width: 100%;
  box-sizing: border-box;
}

.callout-email-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.callout-email-btn svg {
  flex-shrink: 0;
  transition: transform var(--transition);
}

.callout-email-btn:hover svg {
  transform: scale(1.1);
}

/* ---------- Über mich Section ---------- */
.about-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.about-photo-wrap {
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about-photo {
  position: relative;
  z-index: 1;
  width: 300px;
  height: 300px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 4px solid var(--color-surface);
  box-shadow: 0 20px 40px rgba(23, 113, 150, 0.15), 0 8px 16px rgba(0, 0, 0, 0.06); /* Soft, diffuse shadow */
  background: var(--color-accent-light);
  margin-bottom: var(--space-sm);
}

.about-photo img { width: 100%; height: 100%; object-fit: cover; }

.about-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
  justify-content: center;
  margin-top: var(--space-sm);
}

.tag {
  background: var(--color-accent-light);
  color: var(--color-accent);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25em 0.75em;
  border-radius: var(--radius-full);
}

.about-text p {
  margin-bottom: var(--space-md);
  color: var(--color-text-muted);
}

.about-text p:last-child { margin-bottom: 0; }

.about-text strong { color: var(--color-text); font-weight: 700; }

/* ---------- Process Section ---------- */
.process-section { background: var(--color-bg-alt); }

.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  position: relative;
}

.process-steps::before {
  content: '';
  position: absolute;
  top: 36px;
  left: calc(100% / 6);
  right: calc(100% / 6);
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent-light), var(--color-accent), var(--color-accent-light));
  pointer-events: none;
}

.step-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}

.step-number {
  width: 72px;
  height: 72px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 auto var(--space-md);
  border: 4px solid var(--color-surface);
  box-shadow: 0 0 0 2px var(--color-accent);
  position: relative;
  z-index: 1;
}

.step-card h3 {
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-bottom: 0.5em;
}

.step-card p {
  font-size: var(--font-size-body);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ---------- Contact Section ---------- */
.contact-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.contact-method-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-method-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}

.contact-method-icon {
  width: 56px;
  height: 56px;
  background: var(--color-accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

.contact-method-card h3 {
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-bottom: 0.5em;
  color: var(--color-text);
}

.contact-method-card p {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: var(--space-md);
  flex-grow: 1;
}

.contact-method-link {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

.contact-method-link:hover {
  text-decoration: underline;
}

.contact-method-text {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.75);
  padding-block: var(--space-lg);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.footer-brand {
  font-size: var(--font-size-body);
  font-weight: 700;
  color: #fff;
}

.footer-copy {
  font-size: var(--font-size-sm);
}

.footer-links {
  display: flex;
  gap: var(--space-md);
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: var(--font-size-sm);
  text-decoration: underline;
  transition: color var(--transition);
}

.footer-links a:hover { color: #fff; }

/* ---------- Subpage (Impressum / Datenschutz) ---------- */
.subpage-hero {
  background: var(--color-subpage-hero-bg);
  padding: calc(var(--nav-height) + var(--space-xl)) 0 var(--space-xl);
}

.subpage-hero h1 {
  font-size: var(--font-size-3xl);
  font-weight: 800;
}

.subpage-content {
  padding-block: var(--space-xl);
}

.prose { max-width: 72ch; }
.prose h2 { font-size: var(--font-size-xl); font-weight: 700; margin-top: var(--space-lg); margin-bottom: var(--space-sm); color: var(--color-text); }
.prose h3 { font-size: var(--font-size-lg); font-weight: 600; margin-top: var(--space-md); margin-bottom: 0.5em; }
.prose p { margin-bottom: var(--space-sm); color: var(--color-text-muted); }
.prose a {
  color: var(--color-accent);
  text-decoration: underline;
}
.prose a:hover {
  text-decoration: none;
}
.prose ul { margin-left: var(--space-md); list-style: disc; margin-bottom: var(--space-sm); }
.prose li { margin-bottom: 0.4em; color: var(--color-text-muted); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: var(--space-lg);
  text-decoration: none;
}
.back-link:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-photo-wrap { order: -1; display: flex; justify-content: center; }

  .ki-intro-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
  }
  .ki-intro-image-wrap {
    max-width: 500px;
    margin-inline: auto;
  }

  .ki-stats { grid-template-columns: 1fr; }
  .pc-grid { grid-template-columns: 1fr; }
  .pc-callout { position: static; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo-wrap { display: flex; flex-direction: column; align-items: center; }
  .process-steps { grid-template-columns: 1fr; }
  .process-steps::before { display: none; }
  .contact-methods { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  :root {
    --space-2xl: 4rem;
    --font-size-body: 1.2rem;
    --font-size-sm: 1.05rem;
    --font-size-lg: 1.3rem;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--color-mobile-nav-bg);
    backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-md);
    gap: var(--space-xs);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    padding: 0.75em 0;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
    font-size: var(--font-size-body);
  }

  .nav-links a:last-child { border-bottom: none; }
  .nav-links .btn { margin-top: 0.5em; text-align: center; justify-content: center; }

  .nav-toggle { display: flex; }

  .form-row { grid-template-columns: 1fr; }

  .photo-frame { width: 180px; height: 180px; }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .ki-stats { grid-template-columns: 1fr; }
}

@media (min-width: 640px) and (max-width: 900px) {
  .ki-stats { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Scroll animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Skip link (accessibility) ---------- */
.skip-link {
  position: absolute;
  top: -999px;
  left: var(--space-sm);
  background: var(--color-accent);
  color: #fff;
  padding: 0.5em 1em;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 9999;
  text-decoration: none;
}
.skip-link:focus { top: var(--space-sm); }

/* ---------- Scroll-to-top button ---------- */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(23, 113, 150, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 250ms ease, transform 250ms ease,
              background-color 200ms ease, box-shadow 200ms ease;
  box-shadow: 0 4px 16px rgba(23, 113, 150, 0.25);
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-top:hover {
  background: rgba(23, 113, 150, 0.85);
  box-shadow: 0 6px 24px rgba(23, 113, 150, 0.4);
}

.scroll-top:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

/* ---------- Print ---------- */
@media print {
  .site-nav, .hero-actions, .site-footer { display: none; }
  body { font-size: 12pt; }
}

/* ---------- Dark Mode ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg:           #0b0f19;
    --color-bg-alt:       #111827;
    --color-surface:      #162235;       /* Slightly lighter, bluish-gray for cards */
    --color-text:         #f8fafc;       /* Bright, clean white-slate for headings */
    --color-text-muted:   #e2e8f0;       /* Highly readable light slate for all normal texts */
    --color-accent:       #38bdf8;       /* Vibrant sky blue for contrast */
    --color-accent-dark:  #0ea5e9;
    --color-accent-light: #0c4a6e;
    --color-border:       rgba(56, 189, 248, 0.25); /* Subtle, glowing blue border for cards */
    --color-success:      #34d399;       /* Vibrant green for dark mode */

    --color-nav-bg:                  rgba(11, 15, 25, 0.96);
    --color-hero-bg:                 linear-gradient(135deg, #0b0f19 0%, #111827 60%, #162235 100%);
    --color-subpage-hero-bg:         linear-gradient(135deg, #0b0f19 0%, #111827 100%);
    --color-mobile-nav-bg:           rgba(11, 15, 25, 0.98);
    --color-border-photo:            #162235;

    --shadow-sm:  0 4px 12px rgba(0,0,0,0.25);
    --shadow-md:  0 8px 30px rgba(0,0,0,0.35);
    --shadow-lg:  0 16px 48px rgba(0,0,0,0.45);
  }

  html, body, footer, .site-footer {
    background-color: var(--color-bg) !important;
  }

  /* Core styling overrides for premium dark mode contrast */
  .nav-brand {
    color: #ffffff;
  }

  .nav-links a {
    color: #e5e7eb;
  }

  .prose h2, .prose h3 {
    color: #ffffff;
  }

  .pc-callout {
    background: linear-gradient(135deg, #0f2d4a 0%, #081e33 100%);
    border: 1px solid var(--color-border);
  }

  .btn-outline:hover {
    color: #0b0f19;
  }

  .btn-primary {
    background-color: #135f80;
    border-color: #135f80;
    color: #ffffff;
  }
  .btn-primary:hover {
    background-color: #0d4a64;
    border-color: #0d4a64;
    color: #ffffff;
  }

  .step-number,
  .skip-link {
    color: #0b0f19;
  }

  img {
    filter: brightness(0.9) contrast(1.02);
  }

  .callout-phone-btn {
    background-color: #ffffff !important;
    color: #0b0f19 !important;
    border-color: #ffffff !important;
  }
  .callout-phone-btn:hover {
    background-color: rgba(255, 255, 255, 0.85) !important;
    color: #0b0f19 !important;
  }
  .callout-email-btn:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
  }
}

/* ---------- Mobile Landscape Mode ---------- */
@media (max-width: 900px) and (orientation: landscape) {
  :root {
    --nav-height: 50px;
    --font-size-body: 1rem;
    --font-size-sm: 0.9rem;
    --font-size-lg: 1.1rem;
    --space-xl: 2.5rem;
    --space-lg: 1.5rem;
    --space-md: 1rem;
    --space-sm: 0.75rem;
    --space-xs: 0.4rem;
  }

  html {
    scroll-padding-top: 0 !important;
  }

  .site-nav {
    position: absolute !important;
    height: 50px;
  }

  /* Flat Header Navigation links */
  .nav-inner {
    height: 100%;
  }

  /* Hero Section Spacing */
  .hero {
    padding-top: calc(var(--nav-height) + var(--space-sm)) !important;
    padding-bottom: var(--space-md) !important;
  }

  .hero-inner {
    gap: var(--space-md) !important;
    grid-template-columns: 1fr auto !important; /* Keep side-by-side in landscape for better screen height utilization */
    align-items: center;
  }

  /* Headline & Text sizes */
  .hero-headline {
    font-size: 1.8rem !important;
    line-height: 1.15;
    margin-bottom: var(--space-xs) !important;
  }

  .hero-eyebrow {
    margin-bottom: var(--space-xs) !important;
    padding: 0.25em 0.75em !important;
  }

  .hero-trust {
    margin-top: var(--space-xs) !important;
    gap: var(--space-sm) !important;
  }

  .section-heading {
    font-size: 1.6rem !important;
    line-height: 1.2;
    margin-bottom: var(--space-xs) !important;
  }

  /* Limit portrait image size in Hero */
  .photo-frame {
    width: 120px !important;
    height: 120px !important;
    border-width: 3px !important;
  }

  .hero-photo-wrap {
    order: 0 !important; /* Keep next to text, not stacked on top */
    display: flex;
    justify-content: center;
  }

  /* Target group cards: flat stacked rows for landscape */
  .hero-cards-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--space-xs) !important; /* tight vertical spacing */
    margin-top: var(--space-md) !important;
    overflow-x: visible !important;
    scroll-snap-type: none !important;
  }

  .hero-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 0.4rem 0.8rem !important; /* very compact padding */
    gap: var(--space-sm) !important;
    flex: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .hero-card .card-text {
    display: none !important; /* hide description texts */
  }

  .hero-card .card-tag {
    font-size: 0.75rem !important;
    margin: 0 !important;
    flex-shrink: 0;
  }

  .hero-card .card-title {
    font-size: 0.95rem !important;
    margin: 0 !important;
    font-weight: 700;
  }

  .hero-card .btn {
    margin-left: auto !important; /* push button to the far right */
    margin-top: 0 !important;
    padding: 0.4em 0.8em !important;
    font-size: 0.8rem !important;
    align-self: center !important;
    flex-shrink: 0;
  }
}

