/* ==========================================================================
   Kufer-Layout.de – Stylesheet
   Reines CSS, keine Abhängigkeiten. Light/Dark über [data-theme] auf <html>.
   Markenwerte aus kufer.de abgeleitet.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens: Light (Standard) ---------- */
:root,
[data-theme="light"] {
  color-scheme: light;

  --bg: #fefefe;
  --bg-tint: #e8f6f6;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --text: #1d1d1f;
  --text-body: rgba(42, 47, 51, 0.92);
  --muted: #4a4a4a;
  --line: rgba(29, 29, 31, 0.1);

  --brand: #10b8c7;          /* Kufer-Petrol – Flächen, Akzente, Fokus */
  --brand-rgb: 16 184 199;
  --brand-soft: #c6f5f5;
  --heading-accent: #0898a6; /* nur Überschriften ≥ 24px */
  --action: #087985;         /* Buttons & Links – 5,1:1 auf Weiß */
  --action-hover: #076570;
  --on-action: #ffffff;

  --badge-typo3-bg: #fdeee6;
  --badge-typo3-text: #9a3a0e;
  --badge-wp-bg: #e6f0fb;
  --badge-wp-text: #1d4f86;

  --topbar-bg: rgba(255, 255, 255, 0.82);
  --topbar-border: rgba(29, 29, 31, 0.08);

  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 36px rgba(17, 32, 39, 0.10);
  --shadow-lg: 0 16px 40px rgba(17, 32, 39, 0.14);
  --shadow-action: 0 10px 28px rgb(var(--brand-rgb) / 0.28);

  --page-bg:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgb(var(--brand-rgb) / 0.16), transparent 55%),
    radial-gradient(ellipse 60% 70% at 90% 40%, rgb(var(--brand-rgb) / 0.10), transparent 50%),
    linear-gradient(180deg, #ffffff 0%, #f0fafa 55%, #e8f6f6 100%);
}

/* ---------- Tokens: Dark ---------- */
[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0c1117;
  --bg-tint: #101b26;
  --surface: #1a2232;
  --surface-raised: #1f2a3d;
  --text: #f1f5f9;
  --text-body: rgba(226, 232, 240, 0.88);
  --muted: #94a3b8;
  --line: rgba(255, 255, 255, 0.08);

  --brand: #22d3e4;
  --brand-rgb: 34 211 228;
  --brand-soft: rgba(34, 211, 228, 0.12);
  --heading-accent: #67e8f9;
  --action: #22d3e4;
  --action-hover: #67e8f9;
  --on-action: #0c1117;

  --badge-typo3-bg: rgba(251, 146, 60, 0.14);
  --badge-typo3-text: #fdba74;
  --badge-wp-bg: rgba(96, 165, 250, 0.14);
  --badge-wp-text: #93c5fd;

  --topbar-bg: rgba(12, 17, 23, 0.78);
  --topbar-border: rgba(255, 255, 255, 0.08);

  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 36px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
  --shadow-action: 0 10px 28px rgb(var(--brand-rgb) / 0.25);

  --page-bg:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgb(var(--brand-rgb) / 0.08), transparent 55%),
    radial-gradient(ellipse 60% 70% at 90% 40%, rgb(var(--brand-rgb) / 0.05), transparent 50%),
    linear-gradient(180deg, #0c1117 0%, #0e1620 55%, #101b26 100%);
}


/* ---------- Skalen ---------- */
:root {
  --font: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  --fs-sm: 0.875rem;
  --fs-base: 1.0625rem;
  --fs-lg: 1.1875rem;
  --fs-h3: 1.25rem;
  --fs-h2: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  --fs-h1: clamp(2.375rem, 1.4rem + 4.4vw, 4.5rem);
  --lh: 1.6;
  --tracking-tight: -0.03em;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-section: clamp(4rem, 3rem + 5vw, 7.5rem);

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --container: 1240px;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);
  --topbar-h: 72px;

  --ease: 0.22s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: var(--lh);
  color: var(--text-body);
  background-color: var(--bg);
  background-image: var(--page-bg);
  background-repeat: no-repeat;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color var(--ease), color var(--ease);
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3 { color: var(--text); margin: 0; line-height: 1.12; letter-spacing: var(--tracking-tight); }
p { margin: 0 0 var(--space-4); }
ul { margin: 0; padding: 0; list-style: none; }

a { color: var(--action); text-underline-offset: 0.2em; }
a:hover { color: var(--action-hover); }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-4); top: -100px;
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  background: var(--action);
  color: var(--on-action);
  border-radius: var(--radius-pill);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: var(--space-4); color: var(--on-action); }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  min-height: var(--topbar-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--text);
}
.brand:hover { color: var(--text); }
.brand__logo { height: 34px; width: auto; }
.brand__logo .logo-mark { fill: var(--brand); stroke: var(--brand); stroke-width: 4px; stroke-miterlimit: 10; }
.brand__logo .logo-type { fill: currentColor; }
.brand__suffix {
  padding-left: var(--space-3);
  border-left: 1px solid var(--line);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.6;
}

.nav { display: flex; align-items: center; gap: var(--space-2); }
.nav__list { display: flex; align-items: center; gap: var(--space-1); }

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-pill);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background-color var(--ease), color var(--ease);
}
.nav__link:hover { background: rgb(var(--brand-rgb) / 0.12); color: var(--text); }
.nav__link .ext { font-size: 0.8em; color: var(--muted); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: var(--space-2);
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--ease), background-color var(--ease);
}
.theme-toggle:hover { border-color: rgb(var(--brand-rgb) / 0.5); }
.theme-toggle__icon {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.theme-toggle__icon--moon { fill: currentColor; stroke: none; }
.theme-toggle__icon--sun { display: none; }
[data-theme="dark"] .theme-toggle__icon--moon { display: none; }
[data-theme="dark"] .theme-toggle__icon--sun { display: block; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 18px; height: 2px;
  margin-inline: auto;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .js .nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
    padding: var(--space-4) var(--gutter) var(--space-6);
    background: var(--bg);
    border-bottom: 1px solid var(--topbar-border);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .js .nav.is-open { display: flex; }
  .nav__list { flex-direction: column; align-items: stretch; }
  .nav__link { padding: 0.8rem 1rem; }
  .theme-toggle { margin-left: 0; justify-content: center; padding: 0.8rem 1rem; }
  /* Ohne JS: Navigation einfach umbrechen */
  html:not(.js) .nav-toggle { display: none; }
  html:not(.js) .topbar__inner { flex-wrap: wrap; padding-block: var(--space-3); }
  html:not(.js) .nav, html:not(.js) .nav__list { flex-wrap: wrap; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 52px;
  padding: 0.9rem 1.75rem;
  border: 0;
  border-radius: var(--radius-pill);
  font: inherit;
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--ease), box-shadow var(--ease), background-color var(--ease), color var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--action); color: var(--on-action); box-shadow: var(--shadow-action); }
.btn--primary:hover { background: var(--action-hover); color: var(--on-action); transform: translateY(-2px); }

.btn--secondary {
  background: rgb(var(--brand-rgb) / 0.08);
  color: var(--action);
  box-shadow: inset 0 0 0 2px rgb(var(--brand-rgb) / 0.35);
}
.btn--secondary:hover { background: rgb(var(--brand-rgb) / 0.16); color: var(--action-hover); transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3.5rem, 2rem + 6vw, 7rem) var(--space-section); }

.eyebrow {
  margin-bottom: var(--space-3);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--action);
}

.hero__title {
  font-size: var(--fs-h1);
  font-weight: 800;
  line-height: 1.02;
  margin-bottom: var(--space-6);
  max-width: 15ch;
}
.hero__title .accent { color: var(--heading-accent); display: block; }

.hero__lead { max-width: 62ch; font-size: var(--fs-lg); margin-bottom: var(--space-8); }

.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-12); }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--space-3);
}
.fact {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  line-height: 1.45;
}
.fact strong { color: var(--text); display: block; }
.fact svg {
  flex: none;
  width: 36px; height: 36px;
  padding: 7px;
  border-radius: 10px;
  background: rgb(var(--brand-rgb) / 0.14);
  fill: none; stroke: var(--action); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Sektionen ---------- */
.section { padding-block: 0 var(--space-section); }

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4) var(--space-8);
  margin-bottom: var(--space-8);
}
.section__head .eyebrow { margin-bottom: var(--space-2); }
.section__title { font-size: var(--fs-h2); font-weight: 800; }

/* ---------- Filter-Chips ---------- */
.filter { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.filter[hidden] { display: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease);
}
.chip:hover { border-color: rgb(var(--brand-rgb) / 0.5); }
.chip[aria-pressed="true"] { background: var(--action); border-color: var(--action); color: var(--on-action); }
.chip__count {
  min-width: 1.6em;
  padding: 0 0.4em;
  border-radius: var(--radius-pill);
  background: rgb(var(--brand-rgb) / 0.14);
  font-size: 0.8125rem;
  text-align: center;
}
.chip[aria-pressed="true"] .chip__count { background: rgb(255 255 255 / 0.22); }
[data-theme="dark"] .chip[aria-pressed="true"] .chip__count { background: rgb(0 0 0 / 0.18); }

/* ---------- Layout-Karten ---------- */
.layout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: clamp(1rem, 0.5rem + 1.5vw, 1.75rem);
}

.layout-card[hidden] { display: none; }

.layout-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.layout-card__link:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgb(var(--brand-rgb) / 0.35); color: inherit; }
.layout-card__link:focus-visible { outline-offset: 4px; border-radius: var(--radius-md); }

.layout-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgb(var(--brand-rgb) / 0.18), rgb(var(--brand-rgb) / 0.04)),
    var(--bg-tint);
  border-bottom: 1px solid var(--line);
}
.layout-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.layout-card__link:hover .layout-card__media img { transform: scale(1.04); }

.layout-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  flex: 1;
  padding: var(--space-6);
}
.layout-card__title { font-size: 1.5rem; font-weight: 800; }
.layout-card__cta {
  margin-top: auto;
  padding-top: var(--space-2);
  color: var(--action);
  font-weight: 700;
  font-size: 0.9375rem;
}
.layout-card__link:hover .layout-card__cta { color: var(--action-hover); }

.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge--typo3 { background: var(--badge-typo3-bg); color: var(--badge-typo3-text); }
.badge--wordpress { background: var(--badge-wp-bg); color: var(--badge-wp-text); }

/* ---------- Kontakt ---------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: var(--space-8) var(--space-12);
  align-items: center;
  padding: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.contact__intro .section__title { margin-bottom: var(--space-4); }
.contact__intro p:last-child { margin-bottom: 0; }

.contact__list { display: grid; gap: var(--space-3); }

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-sm);
  background: rgb(var(--brand-rgb) / 0.07);
  color: var(--text);
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color var(--ease);
}
.contact-item:hover { background: rgb(var(--brand-rgb) / 0.15); color: var(--text); }
.contact-item svg {
  flex: none;
  width: 24px; height: 24px;
  fill: none; stroke: var(--action); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.contact-item__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}

@media (max-width: 860px) {
  .contact { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding-block: var(--space-8);
  font-size: 0.9375rem;
  color: var(--muted);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.footer p { margin: 0; }
.footer a { color: var(--text); text-decoration: none; font-weight: 600; }
.footer a:hover { color: var(--action); text-decoration: underline; }
.footer__links { display: flex; flex-wrap: wrap; gap: var(--space-6); }

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- Druck ---------- */
@media print {
  .topbar, .filter, .hero__actions { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Badges-Zeile in Karten + „Neu“-Label */
.layout-card__badges { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.badge--neu { background: var(--action); color: var(--on-action); }
