/* ============================================================================
   von Hebel – Design System
   ----------------------------------------------------------------------------
   Zentrale Tokens, Basis-Styles und Kernkomponenten.
   Farblogik: --safety-red = Fahrzeugtechnik/GTÜ · --engineering-blue =
   Ingenieurbüro/Gutachten · Schwarz/Graphit/Silber/Weiß = neutral.
   ========================================================================== */

/* ---- Fonts (self-hosted, SIL OFL) --------------------------------------- */
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/inter-700.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/inter-800.woff2") format("woff2"); }

/* ---- Tokens -------------------------------------------------------------- */
:root {
    /* Corporate-Farben (fixiert) */
    --black:            #000000;
    --graphite:         #6D7381;
    --safety-red:       #D51130;
    --silver:           #DDE4ED;
    --engineering-blue: #004AC6;
    --white:            #FFFFFF;

    /* Neutrale Funktionsfarben */
    --background-light: #F7F8FA;
    --border-light:     #E5E7EB;
    --text-dark:        #111318;
    --text-muted:       #60646C;

    /* Abgeleitete Funktionstöne */
    --red-hover:   #B60E29;
    --blue-hover:  #003CA1;
    --red-tint:    #FCE9EC;
    --blue-tint:   #E8EFFC;
    --whatsapp:        #25D366;
    --whatsapp-hover:  #1DA851;

    /* Kurz-Aliase */
    --color-red:  var(--safety-red);
    --color-blue: var(--engineering-blue);

    /* Layout */
    --container: 1440px;
    --content:   1280px;
    --prose:     68ch;
    --gutter:    clamp(20px, 4vw, 48px);

    /* Spacing */
    --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
    --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
    --space-9: 96px;
    --space-section: clamp(64px, 9vw, 120px);

    /* Radius & Schatten */
    --radius-sm: 6px;
    --radius-md: 10px;
    --shadow-hover: 0 6px 20px rgba(17, 19, 24, 0.07);

    /* Motion */
    --transition: 180ms ease;

    /* Typografie */
    --font-sans: "Inter", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --fs-h1:      clamp(2.25rem, 1.4rem + 2.9vw, 3.75rem);   /* 36 → 60 px */
    --fs-h2:      clamp(1.75rem, 1.35rem + 1.5vw, 2.5rem);   /* 28 → 40 px */
    --fs-h3:      clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem);   /* 20 → 24 px */
    --fs-lead:    clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);  /* 17 → 20 px */
    --fs-body:    1.0625rem;                                  /* 17 px */
    --fs-small:   0.9375rem;                                  /* 15 px */
    --fs-eyebrow: 0.8125rem;                                  /* 13 px */

    /* Header-Höhen */
    --topbar-h:  44px;
    --mainbar-h: 88px;
    --mainbar-h-compact: 66px;
}

/* ---- Reset & Basis -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    line-height: 1.65;
    color: var(--text-dark);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -0.02em; font-weight: 700; text-wrap: balance; }
h1 { font-size: var(--fs-h1); font-weight: 800; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p  { max-width: var(--prose); }

a { color: inherit; text-decoration: none; }
ul[class], ol[class] { list-style: none; padding: 0; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible { outline: 2px solid var(--engineering-blue); outline-offset: 2px; border-radius: 2px; }
.tone-ft :focus-visible, .btn--red:focus-visible { outline-color: var(--safety-red); }

::selection { background: var(--silver); color: var(--text-dark); }

/* ---- Utilities ------------------------------------------------------------ */
.container {
    width: min(100% - 2 * var(--gutter), var(--container));
    margin-inline: auto;
}
.container--content { width: min(100% - 2 * var(--gutter), var(--content)); }

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

.skip-link {
    position: absolute; top: -100%; left: var(--space-4); z-index: 200;
    padding: 10px 18px; background: var(--black); color: var(--white);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm); font-weight: 600;
}
.skip-link:focus { top: 0; }

/* Eyebrow: primäres Rot/Blau-Orientierungssignal */
.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: var(--fs-eyebrow); font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
}
.eyebrow--ft      { color: var(--safety-red); }
.eyebrow--ib      { color: var(--engineering-blue); }
.eyebrow--neutral { color: var(--graphite); }
.eyebrow--light   { color: rgba(255, 255, 255, 0.92); }
.eyebrow::before {
    content: ""; width: 26px; height: 2px; background: currentColor; flex: none;
}

.lead { font-size: var(--fs-lead); color: var(--text-muted); }

/* ---- Buttons -------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 50px; padding: 13px 26px;
    border-radius: var(--radius-sm);
    font-weight: 600; font-size: 1rem; line-height: 1.2;
    transition: background-color var(--transition), border-color var(--transition), color var(--transition);
    text-align: center;
}
.btn .icon { flex: none; transition: transform var(--transition); }
.btn:hover .icon--arrow { transform: translateX(4px); }

.btn--red      { background: var(--safety-red); color: var(--white); }
.btn--red:hover, .btn--red:focus-visible { background: var(--red-hover); color: var(--white); }
.btn--blue     { background: var(--engineering-blue); color: var(--white); }
.btn--blue:hover, .btn--blue:focus-visible { background: var(--blue-hover); color: var(--white); }
.btn--black    { background: var(--black); color: var(--white); }
.btn--black:hover { background: #26282e; }
.btn--whatsapp { background: var(--whatsapp); color: var(--white); }
.btn--whatsapp:hover { background: var(--whatsapp-hover); }

.btn--outline       { background: transparent; border: 1.5px solid var(--border-light); color: var(--text-dark); }
.btn--outline:hover { border-color: var(--text-dark); }
.btn--outline-light       { background: transparent; border: 1.5px solid rgba(255,255,255,0.55); color: var(--white); }
.btn--outline-light:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }

.btn--block { width: 100%; }
.btn--sm    { min-height: 42px; padding: 9px 18px; font-size: var(--fs-small); }

/* Text-Link mit Pfeil */
.textlink {
    display: inline-flex; align-items: center; gap: 8px;
    font-weight: 600;
}
.textlink .icon { transition: transform var(--transition); }
.textlink:hover .icon { transform: translateX(4px); }
.textlink--ft { color: var(--safety-red); }
.textlink--ft:hover { color: var(--red-hover); }
.textlink--ib { color: var(--engineering-blue); }
.textlink--ib:hover { color: var(--blue-hover); }

/* ---- Cards ---------------------------------------------------------------- */
.card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

/* Bereichszugehörigkeit: 3px-Topline statt eingefärbter Flächen */
.card--topline { border-top: 3px solid var(--graphite); }
.card--ft.card--topline { border-top-color: var(--safety-red); }
.card--ib.card--topline { border-top-color: var(--engineering-blue); }

/* Icon-Chip (Line-Icon auf Tint-Fläche) */
.icon-chip {
    display: inline-flex; align-items: center; justify-content: center;
    width: 52px; height: 52px; border-radius: var(--radius-sm); flex: none;
}
.icon-chip--ft { background: var(--red-tint); color: var(--safety-red); }
.icon-chip--ib { background: var(--blue-tint); color: var(--engineering-blue); }
.icon-chip--neutral { background: var(--background-light); color: var(--graphite); }
.icon-chip--light { background: rgba(255,255,255,0.12); color: var(--white); }

/* ---- Formulare ------------------------------------------------------------ */
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: var(--fs-small); }
.field input, .field select, .field textarea {
    width: 100%; min-height: 50px; padding: 12px 14px;
    font: inherit; color: var(--text-dark);
    background: var(--white);
    border: 1px solid var(--border-light); border-radius: var(--radius-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--engineering-blue);
    box-shadow: 0 0 0 3px var(--blue-tint);
}
.field--error input, .field--error textarea { border-color: var(--safety-red); }
.field__error { color: var(--safety-red); font-size: var(--fs-small); font-weight: 500; }

.checkfield { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-small); color: var(--text-muted); }
.checkfield input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--engineering-blue); }
.checkfield a { color: var(--engineering-blue); text-decoration: underline; text-underline-offset: 2px; }

/* ---- Section-Reveal (dezent, einmalig) ------------------------------------ */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 420ms ease, transform 420ms ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
    .reveal { opacity: 1; transform: none; }
}

/* Platzhalterbilder (bis tools/download-assets.sh die Originale liefert) */
img.is-placeholder {
    /* Platzhalter bewusst unauffällig: kein Rahmen, keine Markierung –
       die Kennzeichnung steckt im Bildmotiv selbst. */
    background: var(--background-light, #F7F8FA);
}
