/* KFZ-Service Özmen · eine Datei für alle Seiten
   Vorlage: schwarzer Grund, weiße Überschriften, graue Fließtexte, Rot aus dem Logo für Aktionen,
   Fotos in dunklen, fein gerahmten Feldern. Schrift: Barlow, lokal eingebunden. */

@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #05070a;
  --panel: #0b0f14;
  --panel-2: #121821;
  --line: #1c2530;
  --ink: #ffffff;
  --text: #aab3bd;
  --muted: #8a94a0;
  --accent: #d0010c;
  --accent-hover: #e8111d;
  --accent-text: #ff4d57;

  --font: "Barlow", "Segoe UI", system-ui, -apple-system, sans-serif;

  --step-small: 0.9375rem;
  --step-body: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --step-lead: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);
  --step-h3: clamp(1.375rem, 1.2rem + 0.9vw, 1.875rem);
  --step-h2: clamp(1.75rem, 1.35rem + 1.9vw, 2.625rem);
  --step-h1: clamp(2.5rem, 1.5rem + 4.6vw, 4.5rem);

  --wrap: 1180px;
  --gutter: clamp(18px, 3vw, 32px);
  --gap-section: clamp(72px, 9vw, 128px);
  --radius: 14px;
  --radius-img: 10px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 24px;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--step-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset, legend { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
strong { font-weight: 600; color: var(--ink); }

h1, h2, h3 {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: var(--step-h1); line-height: 1.04; }
h2 { font-size: var(--step-h2); line-height: 1.12; }
h3 { font-size: var(--step-h3); line-height: 1.18; }

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

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: 12px;
  z-index: 10;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.skip:not(:focus) {
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}
.section { padding-top: var(--gap-section); }

/* ---------- Schaltflächen und Links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 26px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: var(--step-body);
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms linear, border-color 160ms linear, color 160ms linear, transform 180ms var(--ease-out);
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn-ghost {
  border-color: #3a4654;
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--accent-text); background: rgba(208, 1, 12, 0.18); }

.btn-small { min-height: 38px; padding: 6px 18px; font-size: var(--step-small); }

.link {
  color: var(--accent-text);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  transition: color 160ms linear;
}
.link:hover { color: #ff8a91; }

.label {
  display: block;
  margin-bottom: 12px;
  color: var(--accent-text);
  font-size: var(--step-small);
  font-weight: 600;
}

/* ---------- Kopf ---------- */

.topbar {
  border-bottom: 1px solid var(--line);
  font-size: var(--step-small);
}
.topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 42px;
}
.topbar a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.topbar a { display: inline-block; padding-block: 9px; }
.topbar a:hover { color: var(--accent-text); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 14px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  flex: none;
  text-decoration: none;
  transition: opacity 160ms linear;
}
.wordmark:hover { opacity: 0.85; }
.wordmark img { width: auto; height: 64px; }
.footer .wordmark img { height: 112px; }
.nav-links { display: flex; gap: clamp(18px, 2.4vw, 34px); }
.nav-links a {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  transition: color 160ms linear;
}
.nav-links a:hover { color: var(--ink); }

/* ---------- Erste Seite ---------- */

.hero {
  position: relative;
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}
.slides { display: grid; }
.slide {
  grid-area: 1 / 1;
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(480px, 46vw, 620px);
  isolation: isolate;
}
.js .slide {
  opacity: 0;
  visibility: hidden;
  transition: opacity 700ms var(--ease-out), visibility 0s linear 700ms;
}
.js .slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 700ms var(--ease-out), visibility 0s;
}
html:not(.js) .slide:not(:first-child),
html:not(.js) .slider-ui { display: none; }
.hero-photo {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: -2;
  width: 72%;
  height: 100%;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 50%;
  filter: brightness(0.96) contrast(1.05);
}
.slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, #05070a 0%, #05070a 28%, rgba(5, 7, 10, 0.7) 42%, rgba(5, 7, 10, 0.12) 62%, rgba(5, 7, 10, 0) 100%),
    linear-gradient(0deg, rgba(5, 7, 10, 0.6) 0%, rgba(5, 7, 10, 0) 26%);
}
.hero-text {
  width: min(100%, 580px);
  padding: clamp(28px, 5vw, 64px) clamp(28px, 5vw, 64px) clamp(84px, 8vw, 104px);
}
.slide-title {
  color: var(--ink);
  font-size: var(--step-h1);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.04;
  text-wrap: balance;
}

.slider-ui {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0 clamp(20px, 3vw, 32px) clamp(18px, 2.4vw, 28px) clamp(28px, 5vw, 64px);
}
.slider-dots { display: flex; align-items: center; gap: 4px; }
.slider-dot {
  position: relative;
  width: 36px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.slider-dot::before {
  content: "";
  position: absolute;
  inset: 14px 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.34);
  transition: background-color 200ms linear;
}
.slider-dot:hover::before { background: rgba(255, 255, 255, 0.7); }
.slider-dot[aria-current="true"]::before { background: var(--accent); }
.slider-arrows { display: flex; gap: 8px; }
.slider-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(5, 7, 10, 0.72);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 160ms linear, border-color 160ms linear, transform 180ms var(--ease-out);
}
.slider-btn:hover { border-color: var(--accent); background: var(--accent); }
.slider-btn:active { transform: scale(0.94); }
.slider-btn svg { width: 20px; height: 20px; }
.slider-btn .icon-play { display: none; }
.slider-btn.is-paused .icon-play { display: block; }
.slider-btn.is-paused .icon-pause { display: none; }
.hero-lead {
  margin-top: 20px;
  max-width: 30em;
  font-size: var(--step-lead);
  line-height: 1.5;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.hero-note { margin-top: 22px; font-size: var(--step-small); color: var(--muted); }

/* ---------- Leistungen ---------- */

.center-head {
  max-width: 44rem;
  margin-inline: auto;
  text-align: center;
}
.center-head p { margin-top: 14px; }

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: clamp(32px, 4vw, 52px);
}
.card {
  display: flex;
  flex-direction: column;
  padding: 10px 10px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  text-align: center;
  transition: border-color 200ms linear, transform 260ms var(--ease-out);
}
.card:hover { border-color: #2c3a4a; transform: translateY(-4px); }
.card-photo {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-img);
  overflow: hidden;
  background: var(--panel-2);
}
.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.88) contrast(1.05);
  transition: transform 700ms var(--ease-out);
}
.card:hover .card-photo img { transform: scale(1.05); }
.card h3 {
  margin-top: 20px;
  padding-inline: 8px;
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: 0;
}
.card p {
  flex: 1;
  margin-top: 6px;
  padding-inline: 10px;
  font-size: var(--step-small);
  line-height: 1.5;
}
.card .btn { align-self: center; margin-top: 16px; }

.cards-note { margin-top: 28px; text-align: center; }

/* ---------- HU-Rechner ---------- */

.hu {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.hu-intro p { margin-top: 14px; max-width: 34em; }

.hu-fallback { margin-top: 20px; }
.js .hu-fallback { display: none; }
.hu-live { display: none; }
.js .hu-live { display: block; }

.hu-live fieldset { margin-top: 28px; }
.hu-live legend {
  margin-bottom: 12px;
  color: var(--ink);
  font-weight: 600;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip { position: relative; display: block; }
.chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.chip span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 44px;
  min-height: 44px;
  padding: 5px 16px 5px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  transition: background-color 160ms linear, border-color 160ms linear, transform 160ms var(--ease-out);
}
.chip-month span { width: 44px; padding: 5px; }
.chip:hover span { border-color: #3a4a5c; transform: translateY(-1px); }
.chip input:active + span { transform: scale(0.95); }
.chip input:checked + span { border-color: var(--accent); background: var(--accent); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--accent-text); outline-offset: 3px; }

.dot {
  flex: none;
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: var(--dot, #888);
}
.dot-orange { --dot: #ee8a2c; }
.dot-blau { --dot: #2f6fb0; }
.dot-gelb { --dot: #efc71f; }
.dot-braun { --dot: #7b4b2c; }
.dot-rosa { --dot: #e695b1; }
.dot-gruen { --dot: #3f9654; }

.hu-answer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius-img);
  background: var(--bg);
}
.hu-big {
  color: var(--ink);
  font-size: var(--step-h1);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.hu-big span { display: inline-block; }
.hu-big .hu-year { color: var(--accent-text); }
.hu-result { margin-top: 18px; }
.hu-answer .btn { margin-top: 24px; }

/* ---------- Werkstatt ---------- */

.left-head { max-width: 46rem; }
.left-head p { margin-top: 14px; }

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  margin-top: clamp(36px, 5vw, 64px);
}
.feature-photo {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.feature-photo .frame {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-img);
  overflow: hidden;
  background: var(--panel-2);
}
.feature-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.88) contrast(1.05);
}
.feature-text p { margin-top: 14px; max-width: 34em; }
.feature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* ---------- Anfahrt ---------- */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 18px;
  margin-top: clamp(32px, 4vw, 52px);
}
.contact-card {
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.contact-card dt {
  margin-top: 22px;
  color: var(--accent-text);
  font-size: var(--step-small);
  font-weight: 600;
}
.contact-card dt:first-child { margin-top: 0; }
.contact-card dd {
  margin-top: 4px;
  color: var(--ink);
  font-size: var(--step-lead);
  font-weight: 500;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.contact-card dd a { text-decoration: none; }
.contact-card dd a:hover { color: var(--accent-text); }
.contact-card .feature-actions { margin-top: auto; padding-top: 28px; }

.contact-pics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.contact-pics figure {
  display: flex;
  flex-direction: column;
  padding: 10px 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.contact-pics .frame {
  flex: 1;
  min-height: 240px;
  border-radius: var(--radius-img);
  overflow: hidden;
  background: var(--panel-2);
}
.contact-pics img { width: 100%; height: 100%; object-fit: cover; }
.contact-pics .map img { object-position: 50% 24%; }
.contact-pics figcaption {
  margin-top: 12px;
  padding-inline: 6px;
  font-size: var(--step-small);
  line-height: 1.45;
}

/* ---------- Fuß ---------- */

.footer {
  margin-top: var(--gap-section);
  border-top: 1px solid var(--line);
  background: var(--panel);
  font-size: var(--step-small);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 2fr) minmax(0, 2fr) minmax(0, 3fr);
  gap: 32px;
  padding-block: clamp(40px, 5vw, 64px);
}
.footer-title {
  margin-bottom: 14px;
  color: var(--ink);
  font-size: var(--step-body);
  font-weight: 600;
}
.footer-about p { margin-top: 16px; max-width: 26em; }
.footer-grid li a { display: inline-block; padding-block: 7px; }
.footer-grid address a:not(.btn) { display: inline-block; padding-block: 6px; }
.footer-grid a { text-decoration: none; transition: color 160ms linear; }
.footer-grid a:not(.btn):not(.wordmark):hover { color: var(--ink); }
.footer-grid address { font-style: normal; line-height: 1.7; }
.footer-grid address .btn { margin-top: 16px; }

.footer-end {
  padding-block: 22px 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.footer-end p { max-width: 46rem; }
.footer-end p + p { margin-top: 10px; }
.footer-end a { display: inline-block; padding-block: 6px; text-underline-offset: 0.22em; }
.footer-end a:hover { color: var(--ink); }

/* ---------- Rechtstexte ---------- */

.legal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
  padding-block: 18px;
}
.legal {
  width: min(100% - 2 * var(--gutter), 44rem);
  margin: clamp(32px, 5vw, 72px) auto var(--gap-section);
}
.legal h1 { font-size: var(--step-h2); }
.legal h2 { margin-top: 44px; font-size: 1.25rem; font-weight: 600; letter-spacing: 0; }
.legal p, .legal ul { margin-top: 12px; }
.legal ul { padding-left: 1.2em; list-style: disc; }
.legal li + li { margin-top: 6px; }
.todo { background: #efc71f; color: #161c1a; padding: 0 6px; font-weight: 600; }

/* ---------- Bewegung ---------- */

@media (prefers-reduced-motion: reduce) {
  .js .slide, .js .slide.is-active { transition: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .js .slide.is-active .hero-text > * {
    opacity: 0;
    transform: translateY(18px);
    animation: fade-up 800ms var(--ease-out) forwards;
  }
  .js .slide.is-active .hero-text > :nth-child(1) { animation-delay: 120ms; }
  .js .slide.is-active .hero-text > :nth-child(2) { animation-delay: 220ms; }
  .js .slide.is-active .hero-text > :nth-child(3) { animation-delay: 320ms; }
  .js .slide.is-active .hero-text > :nth-child(4) { animation-delay: 420ms; }

  .js .slide.is-active .hero-photo img {
    transform: scale(1.1);
    animation: settle 5200ms var(--ease-out) forwards;
  }

  .js [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out), border-color 200ms linear;
    transition-delay: calc(var(--d, 0) * 80ms);
  }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .card[data-reveal].is-in:hover { transform: translateY(-4px); transition-delay: 0ms; }

  .hu-big span.is-swap { animation: swap 480ms var(--ease-out); }
}

@keyframes fade-up { to { opacity: 1; transform: none; } }
@keyframes settle { to { transform: none; } }
@keyframes swap {
  from { transform: translateY(30%); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@media (min-width: 961px) {
  .chip-month span { min-width: 40px; width: 40px; min-height: 40px; }
  .hu-live .chips { gap: 6px; }
  .hu-live #hu-farben { gap: 8px; }
}

/* ---------- Tablet ---------- */

@media (max-width: 960px) {
  .nav-links { display: none; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hu { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Telefon ---------- */

@media (max-width: 640px) {
  .topbar .topbar-note { display: none; }
  .topbar .wrap { justify-content: space-between; }

  .nav .btn { min-height: 40px; padding: 8px 18px; }
  .wordmark img { height: 54px; }
  .footer .wordmark img { height: 96px; }

  .slide { display: block; min-height: 0; }
  .slide::before { display: none; }
  .slider-ui {
    position: static;
    gap: 8px;
    padding: 0 14px 16px 16px;
  }
  .slider-dots { flex: 1 1 auto; min-width: 0; }
  .slider-dot { flex: 1 1 26px; width: auto; max-width: 26px; min-width: 0; }
  .slider-dot::before { inset: 14px 3px; }
  .slider-arrows { gap: 6px; }
  .slider-btn { width: 42px; height: 42px; }
  .hero-photo {
    position: relative;
    inset: auto;
    z-index: 0;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    overflow: hidden;
  }
  .hero-photo img { object-position: 72% 50%; }
  .hero-text { padding: 24px 22px 20px; }

  .cards { grid-template-columns: 1fr; }
  .card { text-align: left; padding-bottom: 20px; }
  .card h3, .card p { padding-inline: 10px; }
  .card .btn { align-self: flex-start; margin-left: 10px; }

  .feature { grid-template-columns: 1fr; }
  .contact-pics { grid-template-columns: 1fr; }
  .contact-pics .frame { flex: none; min-height: 0; aspect-ratio: 4 / 3; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
