/* ==========================================================================
   Autoservice Schattlack – Stylesheet
   --------------------------------------------------------------------------
   Aufbau:
     1. Design-Tokens (Farben, Schrift, Abstände)
     2. Grundlagen / Reset
     3. Layout-Helfer
     4. Komponenten (Buttons, Status, Kennzeichen, Formulare ...)
     5. Abschnitte (Header, Hero, Leistungen, Ersatzwagen, Über uns, Kontakt, Footer)
     6. Rechtstexte

   Keine externen Ressourcen: Schriften kommen vom System (DSGVO-freundlich,
   schnell). Die Überschriftenschrift greift auf DIN-ähnliche Systemschriften
   zurück (Bahnschrift unter Windows, DIN Alternate unter macOS/iOS).
   ========================================================================== */

/* 1. Design-Tokens ------------------------------------------------------- */
:root {
    /* Farben: Werkstattblau, Warngelb, kühles Hellgrau */
    --ink:        #14202b;   /* Text */
    --blue:       #1b3a5c;   /* Werkstattblau (Flächen, Links) */
    --blue-deep:  #10263d;   /* Hero, Footer */
    --signal:     #f5b800;   /* Warngelb: Aktionen, Markierungen */
    --signal-hi:  #ffcb2e;   /* Hover für Warngelb */
    --paper:      #edf0f3;   /* Seitenhintergrund */
    --white:      #ffffff;
    --line:       #c9d1d9;   /* Linien auf hellem Grund */
    --muted:      #46556a;   /* Zweittext auf hellem Grund (>= 6:1 Kontrast) */
    --ok:         #4ade80;   /* Status geöffnet (auf dunklem Grund) */
    --closed:     #fb923c;   /* Status geschlossen (auf dunklem Grund) */
    --error:      #9b2c1d;
    --success:    #1c6b44;

    /* Schrift */
    --font-head: "Bahnschrift", "DIN Alternate", "DIN 1451 Std", "Roboto Condensed",
                 "Arial Narrow", system-ui, sans-serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Abstände / Maße */
    --radius: 4px;
    --wrap: 72rem;
}

/* 2. Grundlagen ---------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 6.5rem;   /* Platz für den fixierten Header beim Anker-Sprung */
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font: 1.0625rem/1.6 var(--font-body);
    color: var(--ink);
    background: var(--paper);
}

h1, h2, h3 {
    font-family: var(--font-head);
    font-variation-settings: "wdth" 85;   /* schmalere Laufweite, falls die Schrift sie kennt */
    line-height: 1.1;
    margin: 0 0 .6em;
    text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 700; }

p { margin: 0 0 1em; max-width: 65ch; }

a { color: var(--blue); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }

address { font-style: normal; }

ul, ol { padding: 0; margin: 0; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.on-dark :focus-visible { outline-color: var(--signal); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation: none !important; transition: none !important; }
}

/* 3. Layout-Helfer ------------------------------------------------------- */
.wrap {
    width: min(100% - 2rem, var(--wrap));
    margin-inline: auto;
}

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

.skip-link {
    position: absolute;
    left: .5rem; top: -4rem;
    z-index: 100;
    background: var(--signal);
    color: var(--ink);
    padding: .6rem 1rem;
    font-weight: 700;
}
.skip-link:focus { top: .5rem; }

.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--white { background: var(--white); }
.section--blue { background: var(--blue); color: var(--white); }
.section__intro { margin-bottom: 2.5rem; }
.section__action { margin: 2.5rem 0 0; }

.on-dark a { color: var(--white); }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); line-height: 1.55; }

/* Zweispaltig: links Titel (haftet beim Scrollen), rechts Inhalt */
.split { display: grid; gap: 2rem; }
.split__head h2 { margin-bottom: .5em; }
@media (min-width: 56em) {
    .split { grid-template-columns: 1fr 2fr; gap: 4rem; }
    .split__head { position: sticky; top: 7rem; align-self: start; }
}

/* 4. Komponenten --------------------------------------------------------- */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 3rem;
    padding: .8rem 1.4rem;
    border: 2px solid transparent;
    border-radius: var(--radius);
    font: 700 1rem/1.2 var(--font-body);
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}
.btn--sm { min-height: 2.5rem; padding: .5rem 1rem; }
.btn--primary { background: var(--signal); color: var(--ink); }
.btn--primary:hover { background: var(--signal-hi); }
.on-dark .btn--primary { color: var(--ink); }
.btn--outline-light { border-color: var(--white); color: var(--white); background: transparent; }
.btn--outline-light:hover { background: rgba(255, 255, 255, .14); }
.btn--blue { background: var(--blue); color: var(--white); }
.btn--blue:hover { background: var(--blue-deep); }

/* Öffnungsstatus (Text trägt die Information, die Farbe unterstützt nur) */
.status {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    margin: 0 0 1.5rem;
    padding: .4rem .9rem;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    font-weight: 600;
    font-size: .98rem;
}
.status__dot { width: .7rem; height: .7rem; border-radius: 50%; flex: none; }
.status--open .status__dot { background: var(--ok); }
.status--closed .status__dot { background: var(--closed); }

/* Hinweise / Meldungen */
.alert {
    margin: 0 0 1.5rem;
    padding: 1rem 1.2rem;
    border-left: 5px solid;
    border-radius: var(--radius);
    background: var(--paper);
}
.alert ul { margin: .5rem 0 0 1.2rem; }
.alert--error { border-color: var(--error); }
.alert--success { border-color: var(--success); }

.hint { font-size: .92rem; color: var(--muted); }

/* Formular */
.form-grid { display: grid; gap: 1.1rem; }
.form-grid .form-grid--2 { gap: 1.1rem; }
@media (min-width: 40em) {
    .form-grid--2 { grid-template-columns: 1fr 1fr; }
}
.form-grid .hint { margin: -.5rem 0 0; }

.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; }

input[type="text"],
input[type="tel"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: .7rem .8rem;
    border: 2px solid #7d8b99;
    border-radius: var(--radius);
    background: var(--white);
    color: var(--ink);
    font: inherit;
}
textarea { resize: vertical; min-height: 8rem; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--signal);
    outline-offset: 0;
    border-color: var(--blue);
}

.check { display: flex; gap: .75rem; align-items: flex-start; }
.check input { flex: none; width: 1.3rem; height: 1.3rem; margin-top: .2rem; accent-color: var(--blue); }

/* Honeypot: aus dem Sichtbereich, aber für Bots im DOM */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* 5. Abschnitte ---------------------------------------------------------- */

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--white);
    border-bottom: 1px solid var(--line);
}
.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .25rem 1rem;
    padding-block: .6rem;
}
.logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    order: 1;
}
.logo__img { display: block; width: auto; height: 3.25rem; }
.site-header__call { order: 2; }

/* Navigation: auf dem Handy eine eigene, wischbare Zeile */
.nav {
    order: 3;
    width: 100%;
    display: flex;
    gap: 1.4rem;
    overflow-x: auto;
    padding-block: .25rem;
}
.nav a {
    flex: none;
    padding: .4rem 0;
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 3px solid transparent;
}
.nav a:hover { border-bottom-color: var(--signal); }

@media (min-width: 48em) {
    .logo { order: 1; }
    .nav { order: 2; width: auto; margin-left: auto; overflow: visible; }
    .site-header__call { order: 3; }
}

/* Hero */
.hero {
    background: var(--blue-deep);
    color: var(--white);
    padding-top: clamp(2.5rem, 7vw, 5rem);
}
.hero__grid { display: grid; gap: 3rem; align-items: center; }
.hero h1 { color: var(--white); max-width: 14em; }
/* Firmenname als erste Zeile der Überschrift, in der Logofarbe */
.hero__brand {
    display: block;
    margin-bottom: .35em;
    font-size: clamp(1.3rem, 3vw, 1.9rem);
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #5593ce;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }

/* Fakten unter dem Hero: kurze, nüchterne Zusagen */
.facts {
    display: grid;
    gap: 1.25rem;
    margin: clamp(2.5rem, 6vw, 4rem) 0 0;
    padding: 1.5rem 0 2.5rem;
    list-style: none;
    border-top: 1px solid rgba(255, 255, 255, .22);
}
.facts li { display: grid; gap: .2rem; align-content: start; }
.facts strong { font-family: var(--font-head); font-size: 1.2rem; color: var(--signal); }
.facts span { color: #d3dde8; max-width: 32ch; }
@media (min-width: 48em) {
    .facts { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
}

/* Leistungen: Gruppen mit Trennlinie, keine Kartenoptik */
.service-groups {
    display: grid;
    gap: 2.5rem 2.5rem;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.service-group { border-top: 3px solid var(--ink); padding-top: .9rem; }
.service-group h3 { margin-bottom: .6rem; }
.service-group ul { list-style: none; }
.service-group li { padding: .4rem 0; border-bottom: 1px solid var(--line); }
.service-group li:last-child { border-bottom: 0; }

/* Ersatzwagen: eine echte Abfolge, daher nummeriert */
.steps {
    display: grid;
    gap: 2rem;
    list-style: none;
    counter-reset: step;
}
.steps li { counter-increment: step; padding-top: 1rem; border-top: 3px solid var(--signal); }
.steps li::before {
    content: counter(step);
    display: block;
    margin-bottom: .4rem;
    font: 700 2.4rem/1 var(--font-head);
    color: var(--signal);
}
/* Fahrzeugfotos sind freigestellt (weißer Grund), daher auf weißer Fläche */
.fleet { display: grid; gap: 1.5rem; margin-bottom: 3rem; }
.fleet__item { margin: 0; padding: 1rem; background: var(--white); border-radius: 8px; }
.fleet__item img { display: block; width: 100%; height: auto; aspect-ratio: 800 / 450; object-fit: contain; }
.fleet__item figcaption { margin-top: .5rem; color: var(--ink); font-weight: 600; }
@media (min-width: 48em) {
    .fleet { grid-template-columns: 1fr 1fr; }
}

.steps h3 { color: var(--white); }
.steps p { color: #dbe4ee; }
@media (min-width: 48em) {
    .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
}

/* Über uns: Zeitleiste (tatsächlich chronologisch) */
.timeline { list-style: none; border-left: 3px solid var(--ink); padding-left: 1.5rem; display: grid; gap: 1.75rem; }
.timeline li { position: relative; }
.timeline li::before {
    content: "";
    position: absolute;
    left: calc(-1.5rem - 9px);
    top: .4rem;
    width: 15px; height: 15px;
    background: var(--signal);
    border: 3px solid var(--ink);
    border-radius: 50%;
}
.timeline time { display: block; font: 700 1.25rem/1.2 var(--font-head); margin-bottom: .25rem; }
.timeline p { margin: 0; }

/* Über uns: Fotos unter der Zeitleiste, in der Inhaltsspalte */
.gallery { display: grid; gap: 1.25rem; }
.gallery figure { margin: 0; }
.gallery img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.gallery figcaption { margin-top: .4rem; font-size: .95rem; color: var(--muted); }
@media (min-width: 40em) {
    .gallery { grid-template-columns: 1fr 1fr; }
    .gallery__wide { grid-column: 1 / -1; }
}
@media (min-width: 56em) {
    .split > .gallery { grid-column: 2; }
}

/* Anfahrtsskizze */
.map { margin: 1rem 0 0; }
.map img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); }

/* Kontakt */
.contact-grid { display: grid; gap: 3rem; margin-top: 1.5rem; }
@media (min-width: 56em) {
    .contact-grid { grid-template-columns: 1fr 1.3fr; gap: 4rem; }
}
.contact-info h3, .contact-form h3 { margin-top: 0; }
.contact-info h3:not(:first-child) { margin-top: 2rem; }

.contact-list { margin: 1rem 0; }
.contact-list div { display: flex; gap: 1rem; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.contact-list dt { width: 5rem; flex: none; color: var(--muted); }
.contact-list dd { margin: 0; }

.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td { padding: .55rem .6rem; text-align: left; border-bottom: 1px solid var(--line); }
.hours th { font-weight: 600; }
.hours__today { background: #fff6d6; box-shadow: inset 4px 0 0 var(--signal); }

.contact-form {
    padding: clamp(1.25rem, 3vw, 2rem);
    background: var(--paper);
    border-radius: 8px;
}

/* Footer */
.site-footer {
    background: var(--blue-deep);
    color: #d3dde8;
    padding-block: 3rem 1.5rem;
}
.site-footer__grid { display: grid; gap: 2rem; }
@media (min-width: 48em) { .site-footer__grid { grid-template-columns: repeat(3, 1fr); } }
.site-footer__title { margin: 0 0 .5rem; color: var(--white); font: 700 1.15rem/1.2 var(--font-head); }
.site-footer p { margin-bottom: 0; }
.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .5rem 1.5rem;
    margin-top: 2.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, .2);
    font-size: .95rem;
}
.site-footer__legal p { margin: 0; }
.site-footer__legal nav { display: flex; gap: 1.2rem; }

/* 6. Rechtstexte ---------------------------------------------------------- */
.prose { max-width: 46rem; }
.prose h1 { font-size: clamp(2rem, 5vw, 3rem); }
.prose h2 { font-size: 1.5rem; margin-top: 2rem; }
