:root {
  --bg: #f3f4f6;
  --fg: #0f172a;
  --muted: #64748b;
  --card: #ffffff;
  --accent: #0ea5e9;
  --link: #64748b;
  --btn-bg: #0C2E42;
  --ring: #38bdf8;
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
  --radius: 16px;
}

html[data-theme="dark"] {
  --bg: #0C2E42;
  --fg: #e5e7eb;
  --muted: #cbd5e1;
  --card: #12324a;
  --accent: #7dd3fc;
  --link: #7dd3fc;
  --btn-bg: #ffffff;
  --btn-text: #0D2D43;
  --ring: #7dd3fc;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

/* Grundlayout */
* { box-sizing: border-box; }
html:focus-within { scroll-behavior: smooth; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica Neue, Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  cursor: none;
}
a, button, .button, .theme-toggle, #theme-toggle { cursor: none; }

img { max-width: 100%; height: auto; }

address {font-style: normal;}

/* Links */
a { color: var(--link); text-decoration: none; }
a:hover { opacity: .9; }

/* Skip Link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: .75rem 1rem;
  background: var(--fg);
  color: var(--bg);
  border-radius: .5rem;
  z-index: 10000;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: saturate(1) blur(8px);
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--fg) 12%, transparent);
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: .75rem 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  color: inherit;
}
.brand-logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  border-radius: 12px;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,.08));
}
.header-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}

/* Social Icons */
.social ul {
  display: flex;
  gap: .5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.icon-linkedin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--fg) 12%, transparent);
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--link);
  text-decoration: none;
}
.icon-linkedin svg {
  width: 16px;
  height: 16px;
  display: block;
}
.icon-linkedin:hover,
.icon-linkedin:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(2,6,23,.12);
}

/* Theme Toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--fg) 12%, transparent);
  background: var(--card);
  cursor: pointer;
  box-shadow: var(--shadow);
  color: var(--link);
}
.theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: inline; }

/* Layout */
.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  align-items: stretch;
}

/* Cards & Panels */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1rem, 2.5vw, 2rem);
  border: 1px solid color-mix(in oklab, var(--fg) 10%, transparent);
  opacity: 0;
  transform: translateY(8px);
}
.card.revealed {
  opacity: 1;
  transform: none;
  transition: opacity .6s ease, transform .6s ease;
}
.subtitle {
  color: var(--muted);
  margin-top: .25rem;
  margin-bottom: 1.25rem;
}
.grid { display: grid; gap: 1rem; }
.panel {
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  border: 1px solid color-mix(in oklab, var(--fg) 12%, transparent);
  border-radius: calc(var(--radius) - 4px);
  padding: 1rem;
}
.panel h2 { margin-top: 0; font-size: 1.1rem; }

/* Kontakt */
.contact a {
  color: var(--link);
  text-decoration: none;
}
.contact a:hover,
.contact a:focus-visible {
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Services */
.services-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
}
.service {
  background: var(--card);
  border: 1px solid color-mix(in oklab, var(--fg) 10%, transparent);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  word-wrap: break-word;
}
.service:hover,
.service:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(2,6,23,.12);
}
.service h3 {
  margin: .25rem 0 .25rem;
  font-size: 1.05rem;
}
.service p {
  margin: 0;
  color: var(--muted);
}
.service-icon {
  font-size: 1.25rem;
  line-height: 1;
}

/* Kacheln mittig zusammenhängend */
@media (min-width: 960px) {
  .layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 !important;
    align-items: stretch;
  }

  /* Linke Karte: rechte Ecken abrunden & Grenze rechts entfernen */
  .layout .intro {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
  }

  /* Rechte Karte (Hero): linke Ecken abrunden & Grenze links entfernen */
  .layout .hero {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: none;
  }
}

/* CTA */
.cta { margin-top: 1.25rem; }
.button {
  display: inline-block;
  padding: .75rem 1rem;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-text, #ffffff);
  text-decoration: none;
  border: 1px solid color-mix(in oklab, var(--fg) 16%, transparent);
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.button {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.button svg {
  flex-shrink: 0;
}
.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(2,6,23,.12);
  outline: 3px solid color-mix(in oklab, var(--ring) 40%, transparent);
  outline-offset: 2px;
}

/* Hero-Bild */
.hero {
  position: relative;
  border-radius: var(--radius);
  overflow: clip;
  box-shadow: var(--shadow);
  border: 1px solid color-mix(in oklab, var(--fg) 10%, transparent);
  opacity: 0;
  transform: translateY(8px);
}
.hero.revealed {
  opacity: 1;
  transform: none;
  transition: opacity .8s ease .1s, transform .8s ease .1s;
  margin: 0;
}
.hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .4s ease, scale .35s ease;
}
.hero:hover img { opacity: .92; scale: 1.02; }

/* Footer */
.site-footer {
  border-top: 1px solid color-mix(in oklab, var(--fg) 10%, transparent);
  margin-top: .5rem;
}
.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  font-size: .925rem;
}
.site-footer ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

/* Modal (Datenschutz) */
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 1100; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.modal-content {
  position: relative;
  margin: 6vh auto;
  max-width: 760px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--card);
  color: var(--fg);
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid color-mix(in oklab, var(--fg) 12%, transparent);
  padding: 1rem;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid color-mix(in oklab, var(--fg) 10%, transparent);
}
.modal-body { padding: 1rem 0; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: .5rem;
  border-top: 1px solid color-mix(in oklab, var(--fg) 10%, transparent);
}
.modal-close {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--fg);
}

/* Fokus-Styling */
:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Benutzer-Cursor-Kreis */
#cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0;
  border: 3px solid #D50E67;   /* Ring */
  background: transparent;      /* noch nicht gefüllt */
  z-index: 9999;
  transition:
    opacity .15s ease,
    background-color .2s ease,
    transform .2s ease,
    border-width .2s ease;      /* animiert den Übergang zum gefüllten Kreis */
  mix-blend-mode: normal;
}
body.has-pointer #cursor { opacity: .95; }

/* Hover/Fokus auf Links/Buttons → gefüllter Kreis statt Systemcursor */
#cursor.is-hovering-link {
  transform: translate(-50%, -50%) scale(1.1);
  background-color: #D50E67; /* füllt den Kreis */
  border-width: 0;           /* Ring verschwindet weich */
}

/* Bewegungen deaktivieren, falls gewünscht */
@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
  .card, .hero { transition: none !important; opacity: 1 !important; transform: none !important; }
  .hero img, .button, .icon-linkedin, .theme-toggle, .service, #cursor { transition: none !important; }
}

/* Screenreader only */
.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;
}

html[data-theme="dark"] .modal-content {
  color: #ffffff;
}
