/* ============================================================
   André Kemper — Die Brücke zwischen Business und Technik
   Selbst gehostete Schriften, Light/Dark, keine externen Abhängigkeiten.
   ============================================================ */

/* ---------- Schriften (selbst gehostet) ---------- */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/fraunces-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/ibm-plex-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/ibm-plex-mono-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/ibm-plex-mono-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Basis / Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; }
img, picture, svg { display: block; max-width: 100%; }
input, button, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
ul, ol { list-style: none; padding: 0; }

/* ---------- Farb- und Design-Token ---------- */
:root {
  --navy: #16213b;
  --navy-700: #1d2c4c;
  --navy-600: #253861;
  --amber: #b9741a;
  --amber-600: #a2630f;

  --bg: #f3f1ec;
  --bg-raised: #fbfaf7;
  --surface: #ffffff;
  --text: #191d29;
  --text-muted: #51566b;
  --text-soft: #6d7288;
  --border: rgba(22, 33, 59, 0.14);
  --border-strong: rgba(22, 33, 59, 0.26);
  --shadow: 0 1px 2px rgba(22, 33, 59, 0.04), 0 10px 28px -14px rgba(22, 33, 59, 0.22);
  --shadow-hover: 0 1px 2px rgba(22, 33, 59, 0.06), 0 18px 36px -16px rgba(22, 33, 59, 0.3);
  --focus-ring: #a2630f;
  --scheme: light;

  --font-display: 'Fraunces', 'Iowan Old Style', ui-serif, Georgia, serif;
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --container: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 10px;
}

:root[data-theme='dark'] {
  --scheme: dark;
  --bg: #11172a;
  --bg-raised: #161d33;
  --surface: #182038;
  --text: #ece9e1;
  --text-muted: #b2b6c6;
  --text-soft: #8d92a6;
  --border: rgba(236, 233, 225, 0.12);
  --border-strong: rgba(236, 233, 225, 0.22);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px -14px rgba(0, 0, 0, 0.55);
  --shadow-hover: 0 1px 2px rgba(0, 0, 0, 0.35), 0 20px 40px -16px rgba(0, 0, 0, 0.6);
  --amber: #d08a32;
  --amber-600: #e09a42;
  --focus-ring: #e09a42;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --scheme: dark;
    --bg: #11172a;
    --bg-raised: #161d33;
    --surface: #182038;
    --text: #ece9e1;
    --text-muted: #b2b6c6;
    --text-soft: #8d92a6;
    --border: rgba(236, 233, 225, 0.12);
    --border-strong: rgba(236, 233, 225, 0.22);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px -14px rgba(0, 0, 0, 0.55);
    --shadow-hover: 0 1px 2px rgba(0, 0, 0, 0.35), 0 20px 40px -16px rgba(0, 0, 0, 0.6);
    --amber: #d08a32;
    --amber-600: #e09a42;
    --focus-ring: #e09a42;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  transition: background-color 0.25s ease, color 0.25s ease;
}

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

::selection { background: var(--amber); color: #fff; }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Typografie ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  text-wrap: balance;
  overflow-wrap: break-word;
  color: var(--text);
}

h1 { font-size: clamp(2.4rem, 1.6rem + 3.6vw, 4.25rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 1.4rem + 1.6vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.4rem); }

p { color: var(--text-muted); text-wrap: pretty; }

a.link {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}
:root[data-theme='dark'] a.link { color: var(--text); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) a.link { color: var(--text); }
}
a.link:hover { text-decoration-color: var(--amber); color: var(--amber); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: '';
  width: 1.4em;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

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

section { padding-block: clamp(3.5rem, 6vw, 6.5rem); }

.section-head {
  max-width: 42rem;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}
.section-head p { margin-top: 0.9rem; font-size: 1.08rem; }

hr.rule {
  border: 0;
  border-top: 1px solid var(--border);
  margin-block: 0;
}

/* ---------- Barrierefreiheit ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--navy);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  text-decoration: none;
  z-index: 100;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

/* ---------- Kopfzeile ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
  gap: 1rem;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  text-decoration: none;
}
.brand span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
}
.main-nav a {
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--text-muted);
  position: relative;
  padding-block: 0.25rem;
}
.main-nav a:hover { color: var(--text); }
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--amber);
  transition: right 0.25s ease;
}
.main-nav a:hover::after { right: 0; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.theme-toggle:hover { border-color: var(--amber); transform: translateY(-1px); }
.theme-toggle svg { width: 1.1rem; height: 1.1rem; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme='dark'] .theme-toggle .icon-moon { display: none; }
:root[data-theme='dark'] .theme-toggle .icon-sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .icon-moon { display: none; }
  :root:not([data-theme='light']) .theme-toggle .icon-sun { display: block; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.98rem;
  font-weight: 500;
  padding: 0.85rem 1.5rem;
  border-radius: 7px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--amber);
  color: #fff8ef;
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--amber-600); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { border-color: var(--amber); color: var(--amber); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(3rem, 7vw, 6rem); }
.hero .container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero-copy .eyebrow { margin-bottom: 1.25rem; }
.hero-copy h1 { max-width: 16ch; }
.hero-copy .lede {
  margin-top: 1.4rem;
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.25rem);
  max-width: 42ch;
  color: var(--text-muted);
}
.hero-actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}
.hero-motif { justify-self: center; width: 100%; max-width: 360px; }
.hero-motif svg { width: 100%; height: auto; overflow: visible; }
.motif-halo { fill: var(--navy); opacity: 0.06; }
:root[data-theme='dark'] .motif-halo { opacity: 0.35; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .motif-halo { opacity: 0.35; }
}
.motif-line { fill: none; stroke: var(--border-strong); stroke-width: 1.5; }
.motif-node { fill: var(--surface); stroke: var(--border-strong); stroke-width: 1.5; }
.motif-node-center { fill: var(--amber); stroke: var(--amber); }
.motif-dot { fill: var(--amber); }
.motif-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  fill: var(--text-soft);
}
.motif-label-strong {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  fill: var(--text);
}

/* Einblend-Animation beim Laden */
.fade-in {
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.fade-in-1 { animation-delay: 0.05s; }
.fade-in-2 { animation-delay: 0.16s; }
.fade-in-3 { animation-delay: 0.27s; }
.fade-in-4 { animation-delay: 0.38s; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Intro / Lead ---------- */
.intro .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.intro-text {
  max-width: 54rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.5rem);
  color: var(--text);
  line-height: 1.5;
  text-wrap: pretty;
}
.intro-text strong { font-weight: 600; color: var(--navy); }
:root[data-theme='dark'] .intro-text strong { color: var(--amber-600); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .intro-text strong { color: var(--amber-600); }
}

/* ---------- Leistungen ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.service-card {
  background: var(--surface);
  padding: 1.9rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: background-color 0.25s ease, transform 0.25s ease;
  position: relative;
}
.service-card:hover { transform: translateY(-3px); z-index: 1; box-shadow: var(--shadow-hover); }
.service-card:nth-child(odd) .service-num { color: var(--amber); }
.service-card:nth-child(even) .service-num { color: var(--navy); }
:root[data-theme='dark'] .service-card:nth-child(even) .service-num { color: var(--text-soft); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .service-card:nth-child(even) .service-num { color: var(--text-soft); }
}
.service-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
}
.service-card h3 { font-weight: 600; }
.service-card p { font-size: 0.97rem; }

/* ---------- Profil ---------- */
.profile .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
}
@media (min-width: 61rem) {
  .profile .container { grid-template-columns: 0.95fr 1.3fr; align-items: start; }
}
.profile-photo {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
}
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-bio p + p { margin-top: 1.1rem; }
.profile-bio { font-size: 1.02rem; }

.timeline { margin-top: 2rem; }
.timeline-item {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1.25rem;
  padding-block: 1.1rem;
  border-top: 1px solid var(--border);
}
.timeline-item:last-child { border-bottom: 1px solid var(--border); }
.timeline-when {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-soft);
  padding-top: 0.15rem;
}
.timeline-what strong { font-weight: 600; color: var(--text); }
.timeline-what span { display: block; color: var(--text-soft); font-size: 0.92rem; margin-top: 0.15rem; }

/* ---------- Arbeitsweise ---------- */
.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem 2.5rem;
}
.principle {
  border-top: 2px solid var(--border-strong);
  padding-top: 1.1rem;
}
.principle:hover { border-top-color: var(--amber); }
.principle h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.principle p { font-size: 0.95rem; }

/* ---------- Kontakt ---------- */
.contact {
  background: var(--navy);
  color: #f1efe8;
  border-radius: clamp(14px, 2vw, 28px);
  margin-inline: var(--gutter);
}
@media (min-width: 100rem) { .contact { margin-inline: auto; max-width: var(--container); } }
.contact .container { max-width: none; padding-block: clamp(3rem, 6vw, 5.5rem); }
.contact .section-head { max-width: 38rem; }
.contact .eyebrow { color: var(--amber-600); }
.contact h2 { color: #fff; }
.contact .section-head p { color: #c7cada; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 61rem) { .contact-grid { grid-template-columns: 1fr 1fr; } }

.contact-primary { display: flex; flex-direction: column; gap: 1.5rem; align-items: flex-start; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.contact .btn-secondary { border-color: rgba(241,239,232,0.3); color: #f1efe8; }
.contact .btn-secondary:hover { border-color: var(--amber-600); color: var(--amber-600); }

.contact-detail {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.copy-field {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(241, 239, 232, 0.08);
  border: 1px solid rgba(241, 239, 232, 0.18);
  border-radius: 8px;
  padding: 0.55rem 0.6rem 0.55rem 0.95rem;
}
.copy-field code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #f1efe8;
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(241, 239, 232, 0.12);
  border: 1px solid transparent;
  color: #f1efe8;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.copy-btn:hover { background: var(--amber); color: #fff8ef; }
.copy-btn svg { width: 0.9rem; height: 0.9rem; }

.contact-meta { display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.92rem; color: #c7cada; }
.contact-meta a { text-decoration: underline; text-decoration-color: rgba(241,239,232,0.3); text-underline-offset: 3px; }
.contact-meta a:hover { color: var(--amber-600); text-decoration-color: var(--amber-600); }

/* Kalender: Klick-zum-Laden */
.calendar-box {
  border: 1px solid rgba(241, 239, 232, 0.18);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(241, 239, 232, 0.05);
  min-height: 22rem;
  display: flex;
}
.calendar-placeholder {
  margin: auto;
  text-align: center;
  padding: 2.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 24rem;
}
.calendar-placeholder p { color: #c7cada; font-size: 0.9rem; }
.calendar-box iframe {
  width: 100%;
  min-height: 32rem;
  border: 0;
  display: block;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); }
.site-footer .container {
  padding-block: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-soft);
}
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { text-decoration: none; color: var(--text-soft); }
.footer-links a:hover { color: var(--amber); }

/* ---------- Rechtsseiten (Impressum/Datenschutz) ---------- */
.legal {
  max-width: 44rem;
}
.legal h1 { margin-bottom: 0.5rem; }
.legal .updated { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-soft); margin-bottom: 2.5rem; }
.legal h2 { font-size: 1.25rem; margin-top: 2.5rem; margin-bottom: 0.75rem; }
.legal p, .legal li { font-size: 0.98rem; margin-top: 0.6rem; }
.legal ul { list-style: disc; padding-left: 1.3rem; }
.legal ul li { margin-top: 0.35rem; }
.legal address { font-style: normal; }
.legal a.link { word-break: break-word; }

/* ---------- Responsive ---------- */
@media (max-width: 61rem) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-motif { order: -1; max-width: 260px; }
  .main-nav { display: none; }
}

@media (max-width: 30rem) {
  .timeline-item { grid-template-columns: 1fr; gap: 0.3rem; }
  .btn { width: 100%; justify-content: center; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
}
