/* ==========================================================================
   Autoklinik Leipzig – Stylesheet
   Schriften lokal eingebunden (keine externen Anfragen, DSGVO-freundlich)
   ========================================================================== */

@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 Semi Condensed";
  src: url("../fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("../fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ---------- Tokens (Farben aus dem Logo abgeleitet) ---------- */
:root {
  --green-950: #0a4a1d;
  --green-900: #0e5f25;   /* Logo, unterer Verlauf */
  --green-800: #1d6e2f;
  --green-700: #317c39;   /* Logo, Mitte */
  --green-500: #56a04e;   /* Logo, oberer Verlauf */
  --green-100: #e3efdf;
  --green-50:  #f1f7ef;

  --cream:      #fdf0bc;  /* Logo, Felder */
  --cream-200:  #fbe7a6;
  --cream-50:   #fffaea;

  --ink:    #14221a;      /* grünstichiges Fast-Schwarz */
  --ink-2:  #435249;      /* Sekundärtext, 8.6:1 auf Weiß */
  --line:   #d9e3d6;
  --ground: #fbfcfa;
  --white:  #ffffff;

  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;

  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4rem, 9vw, 7rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-s: 0 1px 2px rgba(14, 40, 22, 0.06), 0 2px 6px rgba(14, 40, 22, 0.06);
  --shadow-m: 0 2px 4px rgba(14, 40, 22, 0.05), 0 12px 32px rgba(14, 40, 22, 0.12);

  --header-h: 4.5rem;
  --callbar-h: 0px;

  color-scheme: light;
  accent-color: var(--green-800);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  scrollbar-color: var(--green-700) var(--green-50);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ground);
  caret-color: var(--green-800);
  padding-bottom: var(--callbar-h);
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
}

::selection { background: var(--cream-200); color: var(--green-950); }

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

a {
  color: var(--green-800);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:not(.btn):not(.contact-tile):hover { color: var(--green-950); text-decoration-thickness: 2px; }

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}

p { margin: 0; text-wrap: pretty; }

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

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

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--green-900); color: var(--white);
  padding: 0.75rem 1rem; border-radius: var(--radius-s);
  font-weight: 600; text-decoration: none;
  transition: top 0.2s var(--ease-out);
}
.skip-link:focus { top: 1rem; color: var(--white); }

.icon {
  width: 1.25em; height: 1.25em;
  flex: none;
  fill: none; stroke: currentColor;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.6rem;
  min-height: 3.25rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-s);
  font: 600 1.0625rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background-color 0.18s ease, color 0.18s ease,
              border-color 0.18s ease, transform 0.18s var(--ease-out),
              box-shadow 0.18s ease;
  font-variant-numeric: tabular-nums;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--green-900); color: var(--white); }
.btn--primary:hover { background: var(--green-950); color: var(--white); }

.btn--cream { background: var(--cream); color: var(--green-950); box-shadow: var(--shadow-s); }
.btn--cream:hover { background: var(--white); color: var(--green-950); }

.btn--ghost-light { border-color: rgba(253, 240, 188, 0.55); color: var(--cream); }
.btn--ghost-light:hover { border-color: var(--cream); background: rgba(253, 240, 188, 0.1); color: var(--white); }

.btn--outline { border-color: var(--line); background: var(--white); color: var(--ink); }
.btn--outline:hover { border-color: var(--green-700); color: var(--green-950); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 20px rgba(14, 40, 22, 0.06); }

.site-header__inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex; align-items: center; gap: 0.75rem;
  color: var(--ink); text-decoration: none;
  margin-right: auto;
}
.brand:hover { color: var(--ink); }
.brand img { width: 3rem; height: 3rem; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1;
  letter-spacing: -0.005em;
}
.brand__name span { color: var(--green-800); }

.nav { display: flex; gap: 0.25rem; }
.nav a {
  display: inline-flex; align-items: center;
  min-height: 2.75rem; padding: 0 0.85rem;
  color: var(--ink-2); font-weight: 500; text-decoration: none;
  border-radius: var(--radius-s);
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav a:hover { color: var(--green-950); background: var(--green-50); }

.header-call { min-height: 2.875rem; padding: 0.55rem 1.1rem; font-size: 1rem; }

@media (max-width: 860px) {
  .nav { display: none; }
}
@media (max-width: 520px) {
  :root { --header-h: 4rem; }
  .brand img { width: 2.5rem; height: 2.5rem; }
  .brand__name { font-size: 1.2rem; }
  .header-call__text { display: none; }
  .header-call { width: 2.875rem; padding: 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: var(--white);
  background:
    linear-gradient(180deg, var(--green-700) 0%, var(--green-900) 62%, var(--green-950) 100%);
}

/* Kreuz aus dem Logo, groß angeschnitten */
.hero__mark {
  position: absolute; z-index: -1;
  right: -14rem; top: 50%;
  width: 46rem; height: 46rem;
  transform: translateY(-50%);
  opacity: 0.1;
  color: var(--cream);
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.hero h1 {
  font-size: clamp(2.6rem, 6.2vw, 4.6rem);
  letter-spacing: -0.02em;
  max-width: 13ch;
}
.hero h1 em { font-style: normal; color: var(--cream); }

.hero__lead {
  margin-top: 1.4rem;
  font-size: clamp(1.125rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  color: #f1f7ef;
  max-width: 38ch;
}

.hero__actions {
  display: flex; flex-wrap: wrap; gap: 0.85rem;
  margin-top: 2.25rem;
}
.hero__actions .btn { font-size: 1.125rem; }

/* Info-Karte rechts */
.info-card {
  background: var(--cream-50);
  color: var(--ink);
  border-radius: var(--radius-l);
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: 0 24px 60px rgba(4, 30, 12, 0.35);
}

.status {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.35rem 0.8rem 0.35rem 0.65rem;
  border-radius: 999px;
  font-weight: 600; font-size: 0.95rem;
  background: var(--green-100); color: var(--green-950);
}
.status::before {
  content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%;
  background: var(--green-700);
  box-shadow: 0 0 0 3px rgba(49, 124, 57, 0.2);
}
.status.is-closed { background: #f3e9dc; color: #5b3a12; }
.status.is-closed::before { background: #b5651d; box-shadow: 0 0 0 3px rgba(181, 101, 29, 0.2); }

.info-card__list { list-style: none; margin: 1.25rem 0 0; padding: 0; }
.info-card__list li {
  display: grid; grid-template-columns: 1.5rem 1fr; gap: 0.85rem;
  padding: 0.9rem 0;
  border-top: 1px solid #ece2bd;
}
.info-card__list li:first-child { border-top: 0; }
.info-card__list .icon { color: var(--green-800); margin-top: 0.15rem; }
.info-card__label { display: block; font-size: 0.875rem; color: var(--ink-2); font-weight: 500; }
.info-card__value { display: block; font-weight: 600; font-variant-numeric: tabular-nums; }
.info-card__value a { color: var(--ink); text-decoration: none; }
.info-card__value a:hover { color: var(--green-800); text-decoration: underline; }

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__mark { right: -18rem; width: 38rem; height: 38rem; top: 30%; }
}

/* ---------- Abschnitte ---------- */
.section { padding-block: var(--section); }
.section--tint { background: var(--green-50); }

.section__head { max-width: 40rem; margin-bottom: clamp(2rem, 5vw, 3.25rem); }
.section__head h2 { font-size: clamp(2.1rem, 4.4vw, 3.1rem); letter-spacing: -0.015em; }
.section__head p { margin-top: 1rem; color: var(--ink-2); font-size: 1.125rem; max-width: 60ch; }

/* ---------- Leistungen ---------- */
.services {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(2rem, 6vw, 5rem);
  border-top: 1px solid var(--line);
}
.service {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1.1rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}
.service__icon {
  display: grid; place-items: center;
  width: 3rem; height: 3rem;
  border-radius: var(--radius-m);
  background: var(--green-50);
  color: var(--green-800);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.service:hover .service__icon { background: var(--green-900); color: var(--cream); }
.service__icon .icon { width: 1.5rem; height: 1.5rem; }
.service h3 { font-size: 1.375rem; line-height: 1.2; }
.service p { margin-top: 0.35rem; color: var(--ink-2); max-width: 46ch; }

.services-note {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem;
  margin-top: 2.5rem;
  font-size: 1.125rem;
}
.services-note strong { font-weight: 600; }

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

/* ---------- Öffnungszeiten & Anfahrt ---------- */
.visit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
}
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
}
.panel h3 {
  display: flex; align-items: center; gap: 0.65rem;
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
}
.panel h3 .icon { color: var(--green-800); width: 1.6rem; height: 1.6rem; }

.hours { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours th, .hours td {
  text-align: left; padding: 0.8rem 0.75rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.0625rem;
}
.hours th { font-weight: 500; color: var(--ink-2); }
.hours td { text-align: right; font-weight: 600; }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }
.hours tr.is-today th, .hours tr.is-today td { background: var(--cream-50); color: var(--ink); }
.hours tr.is-today th { border-radius: var(--radius-s) 0 0 var(--radius-s); font-weight: 600; }
.hours tr.is-today td { border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.hours .closed { color: var(--ink-2); font-weight: 500; }
.hours__today-tag {
  display: inline-block; margin-left: 0.5rem;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em;
  padding: 0.1rem 0.45rem; border-radius: 999px;
  background: var(--green-900); color: var(--cream);
  vertical-align: 0.1em;
}

.address { font-style: normal; font-size: 1.25rem; line-height: 1.5; }
.address strong { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; display: block; }
.visit__links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.visit__hint { margin-top: 1.25rem; font-size: 0.95rem; color: var(--ink-2); }

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

/* ---------- Kontakt ---------- */
.contact {
  background: var(--cream);
  color: var(--green-950);
}
.contact .section__head p { color: #4d4a2c; }
.contact__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
}
.contact-tile {
  display: flex; flex-direction: column; gap: 0.35rem;
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  border-radius: var(--radius-l);
  background: var(--green-900);
  color: var(--white);
  text-decoration: none;
  box-shadow: var(--shadow-m);
  transition: transform 0.25s var(--ease-out), background-color 0.2s ease, box-shadow 0.25s ease;
  min-width: 0;
}
.contact-tile:hover {
  color: var(--white);
  background: var(--green-950);
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(14, 40, 22, 0.08), 0 20px 44px rgba(14, 40, 22, 0.2);
}
.contact-tile__icon {
  display: grid; place-items: center;
  width: 3.25rem; height: 3.25rem;
  border-radius: 50%;
  background: var(--cream); color: var(--green-950);
  margin-bottom: 1rem;
}
.contact-tile__icon .icon { width: 1.5rem; height: 1.5rem; }
.contact-tile__label { font-size: 1rem; color: #cfe2cb; font-weight: 500; }
.contact-tile__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.contact-tile__cta {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-top: 1rem; font-weight: 600; color: var(--cream);
}
.contact-tile__cta .icon { transition: transform 0.25s var(--ease-out); }
.contact-tile:hover .contact-tile__cta .icon { transform: translateX(4px); }

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

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green-950);
  color: #cfe2cb;
  padding-block: 3.5rem 2rem;
  font-size: 1rem;
}
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--cream); }
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}
.footer__brand { display: flex; gap: 1rem; align-items: flex-start; }
.footer__brand img { width: 3.5rem; height: 3.5rem; }
.footer__brand strong {
  display: block; color: var(--white);
  font-family: var(--font-display); font-size: 1.35rem; line-height: 1.1;
  margin-bottom: 0.35rem;
}
.footer__title { color: var(--white); font-weight: 600; margin-bottom: 0.6rem; }
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; font-variant-numeric: tabular-nums; }
.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(207, 226, 203, 0.18);
  font-size: 0.9375rem;
}
.footer__legal { display: flex; gap: 1.25rem; }

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

/* ---------- Mobile Anrufleiste ---------- */
.callbar { display: none; }

@media (max-width: 720px) {
  :root { --callbar-h: calc(4.5rem + env(safe-area-inset-bottom)); }
  .callbar {
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 0.6rem;
    position: fixed; inset: auto 0 0 0; z-index: 60;
    padding: 0.65rem var(--gutter) calc(0.65rem + env(safe-area-inset-bottom));
    background: var(--white);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(14, 40, 22, 0.08);
  }
  .callbar .btn { min-height: 3.1rem; padding-inline: 0.75rem; }
}

/* ---------- Rechtstexte ---------- */
.legal { padding-block: clamp(3rem, 7vw, 5rem); }
.legal__body { max-width: 68ch; }
.legal h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); margin-bottom: 2rem; }
.legal h2 { font-size: 1.6rem; margin: 2.5rem 0 0.75rem; }
.legal h3 { font-size: 1.25rem; margin: 1.75rem 0 0.5rem; }
.legal p, .legal ul { margin: 0 0 1rem; }
.legal ul { padding-left: 1.25rem; }
.legal .placeholder { background: var(--cream); padding: 0 0.25em; border-radius: 3px; }
.footer__bottom--plain { margin-top: 0; padding-top: 0; border-top: 0; }
.legal__stand { margin-top: 2.5rem; color: var(--ink-2); }
.back-link { display: inline-flex; align-items: center; gap: 0.4rem; margin-bottom: 1.5rem; font-weight: 600; }

/* ---------- Bewegung ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__copy, .info-card {
    animation: rise 0.8s var(--ease-out) both;
  }
  .info-card { animation-delay: 0.12s; }
}
@keyframes rise {
  from { opacity: 0.001; transform: translateY(14px); filter: blur(4px); }
  to   { opacity: 1; transform: none; filter: none; }
}

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

@media (max-width: 520px) {
  .hero__actions .btn { flex: 1 1 100%; }
}
