/* ==========================================================================
   EHS Hub — Landingpage
   Eigenständiges Stylesheet für den öffentlichen One-Pager (mobile-first).
   Schrift wird selbst gehostet: die CSP erlaubt nur font-src 'self', und
   Google Fonts direkt einzubinden wäre datenschutzrechtlich heikel.
   ========================================================================== */

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

@font-face {
    font-family: "Caveat";
    src: url("../fonts/caveat-latin-wght-normal.woff2") format("woff2");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Farben aus dem EHS-Logo: Navy #163869, Grün #52b337. Das Logo-Grün
       erreicht auf Weiß kein 4.5:1, daher für Buttons/Text die dunklere
       Stufe --green-700 (5.2:1). */
    --navy-950: #0c2244;
    --navy-900: #163869;
    --navy-800: #1f4a85;
    --navy-700: #2a5a9a;
    --navy-100: #e2e9f3;
    --navy-50:  #f0f4f9;

    --green-500: #52b337;   /* Logo */
    --green-600: #43a02c;
    --green-700: #2f7d23;
    --green-800: #276b1c;
    --green-100: #e3f4dc;
    --green-on-dark: #8fd975;

    --bg:        #f8fafc;
    --surface:   #ffffff;
    --border:    #e2e8f0;
    --text:      #0f172a;
    --text-soft: #475569;
    --danger:    #b91c1c;

    --radius:    12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow-md: 0 8px 24px rgba(11, 37, 69, .10);
    --ease:      cubic-bezier(.2, .7, .3, 1);

    --container: 1160px;
    --gutter:    16px;
    --header-h:  64px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.2; color: var(--navy-900); letter-spacing: -0.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: var(--navy-800); }
a:hover { color: var(--green-700); }

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

.skip-link {
    position: absolute;
    left: var(--gutter);
    top: -100px;
    z-index: 100;
    padding: 8px 14px;
    background: var(--navy-900);
    color: #fff;
    border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}
.container-narrow { max-width: 800px; }

.eyebrow {
    margin-bottom: 10px;
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--green-700);
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    font: inherit;
    font-weight: 600;
    font-size: .9375rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s var(--ease), border-color .15s var(--ease),
                color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-lg { min-height: 52px; padding: 14px 24px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-accent { background: var(--green-700); color: #fff; }
.btn-accent:hover { background: var(--green-800); color: #fff; box-shadow: 0 6px 16px rgba(47, 125, 35, .25); }

.btn-outline { border-color: var(--navy-900); color: var(--navy-900); background: transparent; }
.btn-outline:hover { background: var(--navy-900); color: #fff; }

.btn-ghost { color: var(--navy-900); background: transparent; }
.btn-ghost:hover { background: var(--navy-50); color: var(--navy-900); }

.btn[disabled] { opacity: .65; cursor: progress; transform: none; }

/* ── Header ──────────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(160%) blur(8px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--navy-900);
    text-decoration: none;
}
.brand:hover { color: var(--navy-900); }

/* Inline-Logo: Farben über Variablen, damit es im Footer invertiert werden kann */
.logo {
    --logo-ink: var(--navy-900);
    --logo-accent: var(--green-500);
    --logo-bg: #fff;
    display: block;
    height: 30px;
    width: auto;
    overflow: visible;
}
.logo-ink { fill: var(--logo-ink); }
.logo-accent { fill: var(--logo-accent); }
.logo-check, .logo-halo { fill: none; stroke-linejoin: miter; }
.logo-check { stroke: var(--logo-accent); stroke-width: 24; }
.logo-halo { stroke: var(--logo-bg); stroke-width: 36; }
.logo-claim { font-family: inherit; font-size: 32px; font-weight: 700; }

.nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--navy-900);
    border-radius: 2px;
    transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile: Navigation als ausklappbares Panel unter dem Header */
.site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    padding: 8px var(--gutter) 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}
.site-nav.is-open { display: block; }
.site-nav ul a {
    display: block;
    padding: 12px 4px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}
.site-nav ul a:hover { color: var(--green-700); }
.nav-actions { display: grid; gap: 10px; margin-top: 16px; }
.nav-actions .btn-ghost { border-color: var(--border); }

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero {
    padding: 40px 0 56px;
    background:
        radial-gradient(1200px 400px at 85% -10%, var(--navy-100), transparent 70%),
        var(--surface);
}
.hero-grid { display: grid; gap: 40px; align-items: center; }

.hero h1 {
    font-size: clamp(2rem, 6vw + .5rem, 3.25rem);
    font-weight: 800;
}
.lead {
    margin-top: 18px;
    font-size: 1.0625rem;
    color: var(--text-soft);
    max-width: 38rem;
}
.hero-actions { display: grid; gap: 12px; margin-top: 28px; }
.hero-points { display: grid; gap: 8px; margin-top: 24px; font-size: .9375rem; color: var(--text-soft); }
.hero-points li, .trust-list li { display: flex; align-items: center; gap: 10px; }

.check {
    flex: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--green-100)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f7d23' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
        center / 12px no-repeat;
}

.hero-media {
    position: relative;
    margin: 0;
    perspective: 1800px;
}
/* Weicher Akzent hinter der Platte */
.hero-media::before {
    content: "";
    position: absolute;
    inset: 12% 6% -4% 10%;
    border-radius: 32px;
    background: radial-gradient(closest-side, rgba(82, 179, 55, .28), transparent);
    filter: blur(24px);
    z-index: -1;
}

/* App-Screenshot als schwebende Platte: gestaffelte Schatten bilden die
   sichtbare Kante (Dicke), der weiche Schatten den Abstand zum Grund. */
.device {
    overflow: hidden;
    border: 1px solid #c9d4e5;
    border-radius: 14px;
    background: var(--surface);
    box-shadow:
        1px 1px 0 #b3c1d6,
        2px 2px 0 #a4b4cc,
        3px 3px 0 #95a7c2,
        4px 4px 0 #8699b7,
        5px 5px 0 var(--navy-700),
        6px 6px 0 var(--navy-800),
        7px 7px 0 var(--navy-900),
        30px 40px 60px -20px rgba(12, 34, 68, .45);
    transform: rotateX(8deg) rotateY(-6deg) rotateZ(1deg);
    transform-origin: 50% 100%;
    transition: transform .5s var(--ease);
}
.device img { width: 100%; height: auto; }

.media-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    aspect-ratio: 16 / 10;
    background: linear-gradient(160deg, var(--navy-50), #fff);
    color: var(--navy-700);
    font-weight: 500;
    font-size: .9375rem;
}
.media-placeholder svg {
    width: 56px;
    height: 56px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: .7;
}

/* ── Sektionen ───────────────────────────────────────────────────────── */
.section { padding: 64px 0; }
.section-alt { background: var(--navy-50); }

.section-head { max-width: 44rem; margin-bottom: 36px; }
.section-head h2, .about-copy h2, .contact-copy h2 { font-size: clamp(1.625rem, 3vw + .75rem, 2.25rem); font-weight: 750; }
.section-head p:not(.eyebrow) { margin-top: 14px; color: var(--text-soft); }

/* Problem & Lösung */
.problem-grid { display: grid; gap: 16px; }
.problem-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.problem-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.problem { padding: 22px 22px 18px; flex: 1; }
.problem h3 { font-size: 1.125rem; }
.problem p { margin-top: 8px; color: var(--text-soft); }
.solution {
    padding: 16px 22px 20px;
    background: #f5fbf2;
    border-top: 1px solid #d5ecca;
}
.solution-label {
    display: inline-block;
    margin-bottom: 4px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--green-700);
}

/* Funktionen */
.feature-grid { display: grid; gap: 16px; }
.feature-card {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.feature-card:hover { border-color: #c5d3e6; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-card h3 { margin-top: 16px; font-size: 1.0625rem; }
.feature-card p { margin-top: 6px; color: var(--text-soft); font-size: .9375rem; }
.feature-icon {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--navy-900);
    color: #fff;
}
.feature-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Über uns */
.about-grid { display: grid; gap: 36px; }
.about-copy > p:not(.eyebrow) { margin-top: 14px; color: var(--text-soft); }
.trust-list { display: grid; gap: 10px; margin-top: 22px; font-weight: 500; }

.welcome-card {
    position: relative;
    padding: 28px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 4px solid var(--green-500);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}
.welcome-kicker {
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--green-700);
}
.welcome-text { margin-top: 10px; color: var(--text-soft); }
.handwritten {
    margin: 18px 0 22px;
    font-family: "Caveat", "Segoe Print", "Bradley Hand", cursive;
    font-size: clamp(2.25rem, 5vw + 1rem, 3rem);
    font-weight: 600;
    line-height: 1.1;
    color: var(--navy-900);
    transform: rotate(-2deg);
    transform-origin: left center;
}

/* Rechtstexte (Impressum, Datenschutz) */
.legal { padding: 48px 0 80px; background: var(--surface); }
.legal h1 { font-size: clamp(1.875rem, 3vw + 1rem, 2.5rem); font-weight: 800; }
.legal h2 { margin-top: 40px; font-size: 1.375rem; }
.legal h3 { margin-top: 24px; font-size: 1.0625rem; }
.legal p, .legal ul { margin-top: 10px; color: var(--text-soft); }
.legal ul { padding-left: 1.25rem; list-style: disc; }
.legal address { margin-top: 10px; font-style: normal; color: var(--text); }
.legal .legal-meta { margin-top: 40px; font-size: .875rem; }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.faq details:hover { border-color: #c5d3e6; }
.faq details[open] { box-shadow: var(--shadow-sm); border-color: #c5d3e6; }
.faq summary {
    position: relative;
    padding: 18px 56px 18px 20px;
    font-weight: 600;
    color: var(--navy-900);
    cursor: pointer;
    list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "";
    position: absolute;
    right: 20px;
    top: 50%;
    width: 10px;
    height: 10px;
    margin-top: -7px;
    border-right: 2px solid var(--navy-700);
    border-bottom: 2px solid var(--navy-700);
    transform: rotate(45deg);
    transition: transform .2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-body { padding: 0 20px 20px; color: var(--text-soft); }

/* Kontakt */
.contact { background: var(--navy-900); color: #dbe5f1; }
.contact .eyebrow { color: var(--green-on-dark); }
.contact h2 { color: #fff; }
.contact-grid { display: grid; gap: 32px; }
.contact-copy > p:not(.eyebrow) { margin-top: 14px; }
.contact-login { font-size: .9375rem; }
.contact-login a { color: #fff; font-weight: 600; }
.contact-login a:hover { color: var(--green-on-dark); }

.contact-form {
    display: grid;
    gap: 16px;
    padding: 24px;
    background: var(--surface);
    border-radius: var(--radius);
    color: var(--text);
    box-shadow: 0 20px 40px rgba(0, 0, 0, .18);
}
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .9375rem; color: var(--navy-900); }
.field label span[aria-hidden] { color: var(--green-700); }
.optional { font-weight: 400; color: var(--text-soft); }
.field input, .field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    background: #fff;
    font: inherit;
    color: var(--text);
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:hover, .field textarea:hover { border-color: #94a3b8; }
.field input:focus, .field textarea:focus {
    outline: none;
    border-color: var(--navy-700);
    box-shadow: 0 0 0 3px rgba(29, 66, 115, .18);
}
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-error { font-size: .8125rem; color: var(--danger); }

.field-check {
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 10px;
}
.field-check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--green-700); }
.field-check label { font-weight: 400; font-size: .875rem; color: var(--text-soft); }
.field-check .field-error { grid-column: 2; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-status { min-height: 1.5em; font-size: .9375rem; font-weight: 500; }
.form-status.is-success { color: var(--green-700); }
.form-status.is-error { color: var(--danger); }

/* Footer */
.site-footer { padding: 32px 0; background: var(--navy-950); color: #9fb1c8; font-size: .875rem; }
.footer-inner { display: grid; gap: 18px; justify-items: start; }
.brand-inverse .logo {
    --logo-ink: #fff;
    --logo-bg: var(--navy-950);
    height: 52px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { color: #dbe5f1; text-decoration: none; }
.footer-links a:hover { color: var(--green-on-dark); text-decoration: underline; }

/* ── Ab Tablet ───────────────────────────────────────────────────────── */
@media (min-width: 640px) {
    :root { --gutter: 24px; }
    .hero-actions { display: flex; flex-wrap: wrap; }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-form { padding: 32px; }
}

/* ── Ab Desktop ──────────────────────────────────────────────────────── */
@media (min-width: 960px) {
    :root { --header-h: 72px; }

    .nav-toggle { display: none; }
    .site-nav {
        position: static;
        display: flex;
        align-items: center;
        gap: 28px;
        padding: 0;
        background: none;
        border: 0;
        box-shadow: none;
    }
    .site-nav ul { display: flex; gap: 4px; }
    .site-nav ul a { padding: 8px 12px; border: 0; border-radius: var(--radius-sm); font-size: .9375rem; }
    .site-nav ul a:hover { background: var(--navy-50); color: var(--navy-900); }
    .nav-actions { display: flex; margin: 0; }
    .nav-actions .btn-ghost { border-color: transparent; }

    .hero { padding: 72px 0 88px; }
    .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 48px; }
    .hero h1 { font-size: 3rem; }
    .device { transform: rotateY(-18deg) rotateX(10deg) rotateZ(3deg); transform-origin: 0 50%; }
    .hero-media:hover .device { transform: rotateY(-12deg) rotateX(7deg) rotateZ(2deg); }
    .welcome-card { padding: 36px; }

    .section { padding: 96px 0; }
    .problem-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .feature-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .about-grid { grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
    .contact-grid { grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: start; }

    .footer-inner { grid-template-columns: auto 1fr auto; align-items: center; gap: 32px; }
    .footer-links { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
    .btn:hover, .problem-card:hover, .feature-card:hover { transform: none; }
}
