/* =========================================================
   INI PHYSIK – Modernes Webdesign
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ---------------------------------------------------------
   Grundlayout
   --------------------------------------------------------- */

:root {
    --background: #ffffff;
    --surface: #fff7fb;
    --surface-hover: #fff0f7;

    --text: #292338;
    --text-light: #756d7f;

    --primary: #d96b9b;
    --primary-dark: #b94d7c;
    --primary-light: #fff0f6;

    --accent: #8b6bb8;
    --accent-light: #f3edfa;

    --border: #f0dce6;

    --shadow-sm: 0 2px 8px rgba(80, 40, 70, 0.06);
    --shadow-md: 0 10px 28px rgba(80, 40, 70, 0.10);

    --radius: 14px;
    --max-width: 1100px;
}

/* ---------------------------------------------------------
   Body
   --------------------------------------------------------- */

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;

    background: var(--background);
    color: var(--text);

    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    font-size: 16px;
    line-height: 1.7;
}

/* ---------------------------------------------------------
   Überschriften
   --------------------------------------------------------- */

h1 {
    margin-top: 0;
    margin-bottom: 32px;

    color: var(--text);

    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.15;
    letter-spacing: -0.04em;
    font-weight: 700;
}

h2 {
    margin-top: 36px;
    margin-bottom: 18px;

    font-size: 1.6rem;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

h3 {
    font-size: 1.2rem;
    margin-top: 28px;
}

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */

footer {
    max-width: var(--max-width);
    margin: 0 auto;

    padding: 0 24px 50px;

    color: var(--text-light);
}

footer strong {
    color: var(--text);
}

footer p {
    line-height: 1.8;
}

/* ---------------------------------------------------------
   Responsive Design
   --------------------------------------------------------- */

@media (max-width: 800px) {

    nav ul {
        padding: 10px 16px;

        flex-wrap: wrap;
        justify-content: center;
    }

    nav li:first-child {
        width: 100%;
        margin-right: 0;
        margin-bottom: 4px;
        text-align: center;
    }

    nav a {
        padding: 7px 9px;
        font-size: 0.9rem;
    }

    main.container-fluid {
        padding: 40px 16px;
    }

    article {
        padding: 24px 22px;
    }

    footer {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 500px) {

    body {
        font-size: 15px;
    }

    h1 {
        font-size: 2rem;
    }

    nav ul {
        gap: 2px;
    }

    nav a {
        font-size: 0.84rem;
        padding: 6px 7px;
    }

    article {
        padding: 20px 18px;
        border-radius: 10px;
    }
}

/* =========================================================
   Einverständniserklärung / PDF-Formular
   ========================================================= */

.document {
    max-width: 850px;
    margin: 40px auto;
    padding: 55px 65px;

    background: white;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow: var(--shadow-md);

    color: var(--text);
}


/* ---------------------------------------------------------
   Kopfbereich
   --------------------------------------------------------- */

.document-header {
    display: flex;
    align-items: center;
    gap: 18px;

    padding-bottom: 25px;
    margin-bottom: 30px;

    border-bottom: 2px solid var(--border);
}

.document-logo {
    width: 65px;
    height: 65px;

    object-fit: contain;

    border-radius: 12px;
}

.document-organization {
    color: var(--primary);

    font-size: 0.8rem;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.document h1 {
    margin: 3px 0 0;

    font-size: 2rem;
    letter-spacing: -0.04em;
}


/* ---------------------------------------------------------
   Überschriften
   --------------------------------------------------------- */

.document-intro {
    margin-bottom: 35px;
}

.document h2 {
    margin: 0 0 8px;

    font-size: 1.45rem;
    line-height: 1.35;
}

.document h3 {
    margin: 32px 0 18px;

    color: var(--primary-dark);

    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.subtitle {
    margin: 0;

    color: var(--text-light);
    font-size: 0.95rem;
}


/* ---------------------------------------------------------
   Text
   --------------------------------------------------------- */

.document p {
    margin: 0 0 18px;

    font-size: 0.94rem;
    line-height: 1.65;

    text-align: justify;
}


/* ---------------------------------------------------------
   Formularfelder
   --------------------------------------------------------- */

.form-fields {
    margin-bottom: 25px;
}

.form-field {
    display: flex;
    align-items: flex-end;

    min-height: 38px;

    border-bottom: 1px solid #b9b4bd;

    margin-bottom: 12px;
}

.form-field span {
    padding-bottom: 4px;

    color: var(--text-light);

    font-size: 0.9rem;
}


/* ---------------------------------------------------------
   Erklärung
   --------------------------------------------------------- */

.declaration {
    margin-top: 25px;
}

.inline-line {
    display: inline-block;

    width: 190px;
    height: 22px;

    margin: 0 4px;

    vertical-align: bottom;

    border-bottom: 1px solid #777;
}


/* ---------------------------------------------------------
   Unterschrift
   --------------------------------------------------------- */

.signature-section {
    margin: 42px 0 35px;

    page-break-inside: avoid;
}

.signature-line {
    width: 75%;

    height: 42px;

    border-bottom: 1px solid #555;
}

.signature-label {
    margin-top: 8px;

    color: var(--text-light);

    font-size: 0.78rem;
}


/* ---------------------------------------------------------
   Wichtiger Hinweis
   --------------------------------------------------------- */

.important-note {
    margin-top: 35px;
    padding: 18px 20px;

    background: var(--primary-light);

    border-left: 4px solid var(--primary);

    border-radius: 8px;
}

.important-note strong {
    color: var(--primary-dark);
}

.important-note p {
    margin-top: 5px;
    margin-bottom: 0;

    font-size: 0.86rem;
}


/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */

.document-footer {
    margin-top: 40px;
    padding-top: 15px;

    border-top: 1px solid var(--border);

    color: var(--text-light);

    font-size: 0.75rem;
    text-align: center;
}


/* =========================================================
   PDF / DRUCK
   ========================================================= */

@media print {

    @page {
        size: A4;
        margin: 15mm;
    }

    body {
        background: white;
        color: #222;

        font-family:
            "Inter",
            Arial,
            Helvetica,
            sans-serif;
    }

    .document {
        width: 100%;
        max-width: none;

        margin: 0;
        padding: 0;

        border: none;
        border-radius: 0;

        box-shadow: none;
    }

    .document-header {
        margin-bottom: 22px;
    }

    .document-logo {
        width: 55px;
        height: 55px;
    }

    .document h1 {
        font-size: 1.8rem;
    }

    .document h2 {
        font-size: 1.25rem;
    }

    .document h3 {
        font-size: 1rem;
    }

    .document p {
        font-size: 10.5pt;
        line-height: 1.5;
    }

    .important-note {
        background: #fff4f8;
    }

    a {
        color: inherit;
    }

    /* Verhindert ungünstige Seitenumbrüche */
    section,
    .signature-section,
    .important-note {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 700px) {

    .document {
        margin: 15px;
        padding: 30px 22px;
    }

    .document-header {
        align-items: flex-start;
    }

    .document-logo {
        width: 50px;
        height: 50px;
    }

    .document h1 {
        font-size: 1.55rem;
    }

    .document h2 {
        font-size: 1.2rem;
    }

    .inline-line {
        width: 130px;
    }

    .signature-line {
        width: 100%;
    }
}