/* ============================================================
   PFARREIMANAGER – Design System
   Tradition bewahren. Modern verwalten.
   Abgestimmt auf die App (Inter, liturgisches Rot #D1212D),
   Instrument Serif bleibt als kursiver Akzent auf der Website.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=Instrument+Serif:ital@0;1&display=swap');

/* ---------- Design Tokens ---------- */
:root {
    /* Marke – liturgisches Rot (identisch zur App) */
    --pf-red: #D1212D;
    --pf-red-deep: #A8151F;
    --pf-red-dark: #A8151F;            /* Alias für Bestandsseiten */
    --pf-red-wash: rgba(209, 33, 45, 0.08);
    --pf-red-wash-strong: rgba(209, 33, 45, 0.14);
    --pf-red-ring: rgba(209, 33, 45, 0.16);

    /* Papier & Tinte – warme, ruhige Neutraltöne */
    --pf-ink: #1B1B1F;
    --pf-text: #1B1B1F;
    --pf-text-secondary: #66666F;
    --pf-bg: #FFFFFF;
    --pf-bg-light: #FAF8F7;
    --pf-paper: #FAF8F7;
    --pf-rose: #FFE7E4;
    --pf-border: #E7E4E3;
    --pf-border-strong: #D9D5D3;

    /* Signatur-Verläufe (aus der App) */
    --gradient-hero: linear-gradient(180deg, #D1212D 0%, #A8151F 20%, #FFE1DC 58%, #FAF8F7 100%);
    --gradient-soft: linear-gradient(180deg, #FFF5F3 0%, #FAF8F7 100%);
    --gradient-ink: linear-gradient(160deg, #26262B 0%, #17171A 100%);

    /* Typografie – Inter für alles, Instrument Serif als Akzent */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;

    /* Fluider Typo-Maßstab (~1.28) */
    --step--1: 0.875rem;
    --step-0: 1.0625rem;
    --step-1: clamp(1.15rem, 1.06rem + 0.45vw, 1.4rem);
    --step-2: clamp(1.4rem, 1.2rem + 1vw, 1.9rem);
    --step-3: clamp(1.9rem, 1.5rem + 2vw, 2.7rem);
    --step-4: clamp(2.5rem, 1.85rem + 3.3vw, 4rem);

    --measure: 64ch;

    /* Radius */
    --radius-card: 14px;
    --radius-btn: 11px;
    --radius-input: 9px;
    --radius-lg: 22px;
    --radius-pill: 9999px;

    /* Abstände */
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 48px;
    --space-2xl: 80px;
    --section-y: clamp(64px, 8vw, 116px);
    --container: 1160px;
    --container-prose: 720px;

    /* Schatten – geschichtet, weich */
    --shadow-xs: 0 1px 2px rgba(27, 27, 31, 0.05);
    --shadow-sm: 0 2px 10px rgba(27, 27, 31, 0.05);
    --shadow-md: 0 10px 30px rgba(27, 27, 31, 0.07), 0 2px 6px rgba(27, 27, 31, 0.04);
    --shadow-lg: 0 28px 64px rgba(27, 27, 31, 0.12), 0 8px 20px rgba(27, 27, 31, 0.06);
    --shadow-red: 0 12px 28px rgba(209, 33, 45, 0.26);
    --shadow: var(--shadow-md);        /* Alias für Bestandsseiten */
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: var(--step-0);
    background: var(--pf-bg);
    color: var(--pf-text);
    line-height: 1.65;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

::selection {
    background: var(--pf-rose);
    color: var(--pf-red-deep);
}

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

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: var(--section-y) 0;
}

.section--light {
    background: var(--pf-bg-light);
}

.section--soft {
    background: var(--gradient-soft);
}

/* ---------- Unterseiten-Hero (einheitlich für alle Seiten außer der Startseite) ---------- */
.page-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #FFFFFF 0%, var(--pf-bg-light) 100%);
    border-bottom: 1px solid var(--pf-border);
    padding: clamp(76px, 9vw, 108px) 0 clamp(48px, 6vw, 66px);
    text-align: center;
}

/* Weicher Marken-Schimmer hinter der Überschrift */
.page-hero::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -55%;
    width: min(780px, 130vw);
    aspect-ratio: 1;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(209, 33, 45, 0.10) 0%, rgba(209, 33, 45, 0.04) 38%, transparent 66%);
    pointer-events: none;
}

.page-hero .container {
    position: relative;
    z-index: 1;
    max-width: 820px;
}

.page-hero h1 {
    font-size: clamp(2.1rem, 1.5rem + 2.8vw, 3rem);
    margin-bottom: 16px;
}

.page-hero .lead {
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.page-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin-top: 30px;
}

/* ---------- Typografie ---------- */
h1, h2, h3, h4 {
    color: var(--pf-ink);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.12;
    text-wrap: balance;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { text-wrap: pretty; }

/* Akzent-Zeile (kursiv, rot) – eine eigene Display-Stimme, meist für
   eine ganze Teilzeile (wie „Einfach digital verwaltet.“). */
.serif {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.005em;
    color: var(--pf-red);
}

h1 .serif { display: inline-block; line-height: 1.05; }

/* Abschnitts-Marke: kurze rote Linie + Wort in Satzschreibung
   (statt gesperrter Versalien). */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--pf-red);
    margin-bottom: 16px;
}

.eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--pf-red);
    flex: none;
}

.eyebrow--center {
    display: flex;
    justify-content: center;
}

.lead {
    color: var(--pf-text-secondary);
    font-size: var(--step-1);
    line-height: 1.7;
    max-width: var(--measure);
}

/* Rote, dünne Linie als Trennelement */
.red-rule {
    width: 2rem;
    height: 2px;
    background: var(--pf-red);
    border-radius: 2px;
    margin: 16px 0;
}

.red-rule--center {
    margin-left: auto;
    margin-right: auto;
}

/* Fließtext-Seiten (Datenschutz, Impressum …) */
.prose {
    max-width: var(--container-prose);
}
.prose p { color: var(--pf-text-secondary); margin-bottom: 14px; }
.prose h2, .prose h3 { margin: 32px 0 12px; }
.prose ul { list-style: disc; padding-left: 22px; margin-bottom: 14px; }
.prose li { color: var(--pf-text-secondary); margin-bottom: 6px; }
.prose a { color: var(--pf-red); font-weight: 500; text-underline-offset: 2px; }
.prose a:hover { text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1;
    padding: 14px 26px;
    border-radius: var(--radius-btn);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
    white-space: nowrap;
}

.btn--primary {
    background: linear-gradient(180deg, #D1212D 0%, var(--pf-red) 58%, var(--pf-red-deep) 100%);
    color: #fff;
    box-shadow: var(--shadow-red);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(209, 33, 45, 0.34);
}

.btn--outline {
    background: #fff;
    color: var(--pf-red-deep);
    border-color: var(--pf-border-strong);
}

.btn--outline:hover {
    border-color: var(--pf-red);
    color: var(--pf-red);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn--dark {
    background: var(--gradient-ink);
    color: #fff;
}

.btn--dark:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn--ghost {
    background: transparent;
    color: var(--pf-ink);
    border-color: transparent;
    padding-left: 12px;
    padding-right: 12px;
}
.btn--ghost:hover { color: var(--pf-red); }

.btn--lg {
    padding: 17px 34px;
    font-size: 1.05rem;
}

.btn--light {
    background: #fff;
    color: var(--pf-red-deep);
    border-color: #fff;
}
.btn--light:hover {
    background: #fff;
    color: var(--pf-red-deep);
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

/* ---------- Abschluss-CTA (ein roter Signatur-Moment pro Unterseite) ---------- */
.cta-band {
    background: var(--pf-bg-light);
}

.cta-band__inner {
    position: relative;
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    color: #fff;
    background: linear-gradient(150deg, #D1212D 0%, #A8151F 62%, #970F19 100%);
    border-radius: var(--radius-lg);
    padding: clamp(40px, 5vw, 66px) clamp(24px, 5vw, 60px);
    box-shadow: var(--shadow-red);
}

.cta-band__inner::before {
    content: "";
    position: absolute;
    right: -120px;
    top: -120px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 0 0 40px rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.cta-band__inner > * { position: relative; z-index: 1; }
.cta-band__inner h2 { color: #fff; font-size: var(--step-2); margin-bottom: 14px; }
.cta-band__inner h2 .serif { color: #fff; }
.cta-band__inner p { color: rgba(255, 255, 255, 0.9); max-width: 520px; margin: 0 auto 28px; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ---------- Cards ---------- */
.card {
    background: #fff;
    border: 1px solid var(--pf-border);
    border-radius: var(--radius-card);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--pf-border-strong);
}

.card--raised {
    box-shadow: var(--shadow-md);
}
.card--raised:hover {
    box-shadow: var(--shadow-lg);
}

.card--frame {
    border: 1.5px solid var(--pf-red);
    box-shadow: none;
}

/* Ein Signatur-Moment pro Seite: der Rot→Rosé-Verlauf mit weißer Schrift. */
.card--gradient {
    background: linear-gradient(155deg, #D1212D 0%, #A8151F 55%, #A8151F 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: var(--shadow-red);
}
.card--gradient h1,
.card--gradient h2,
.card--gradient h3 { color: #fff; }
.card--gradient p { color: rgba(255, 255, 255, 0.88); }
.card--gradient .serif { color: #fff; }
.card--gradient:hover { transform: translateY(-4px); box-shadow: 0 30px 66px rgba(209, 33, 45, 0.38); }

.card__icon {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    border-radius: 14px;
    background: linear-gradient(150deg, var(--pf-red-wash-strong) 0%, var(--pf-red-wash) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.card:hover .card__icon {
    background: linear-gradient(150deg, var(--pf-red) 0%, var(--pf-red-deep) 100%);
}
.card:hover .card__icon svg { color: #fff; }
.card__icon, .card__icon svg { transition: background .22s ease, color .22s ease; }

.card__icon svg {
    width: 25px;
    height: 25px;
    display: block;
    color: var(--pf-red);
}

.card--gradient .card__icon {
    background: rgba(255, 255, 255, 0.16);
}
.card--gradient .card__icon svg { color: #fff; }

.card h3 {
    font-size: var(--step-1);
    margin-bottom: 8px;
    letter-spacing: -0.015em;
}

.card p {
    color: var(--pf-text-secondary);
    font-size: 0.975rem;
}

.card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    color: var(--pf-red);
    font-weight: 600;
    font-size: 0.925rem;
}

.card__link:hover {
    gap: 10px;
}

/* ---------- Pill / Badge ---------- */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--pf-border);
    border-radius: var(--radius-pill);
    padding: 8px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pf-text-secondary);
    box-shadow: var(--shadow-xs);
}
.pill .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pf-red);
}

/* ---------- Signatur-Fläche (Hero, 404, CTA) ---------- */
.surface-gradient {
    background: var(--gradient-hero);
}

/* ---------- Grid ---------- */
.grid {
    display: grid;
    gap: 24px;
}

.grid--cards {
    grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 640px) {
    .grid--cards-2 { grid-template-columns: repeat(2, 1fr); }
    .grid--cards-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
    .grid--cards-4 { grid-template-columns: repeat(4, 1fr); }
}

.grid--two {
    grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 992px) {
    .grid--two {
        grid-template-columns: 1fr 1fr;
        gap: 48px;
        align-items: center;
    }
}

/* ---------- Abschnitts-Überschriften ---------- */
.section-head {
    max-width: 720px;
    margin: 0 auto clamp(40px, 5vw, 60px);
    text-align: center;
}

.section-head h2 {
    font-size: var(--step-3);
    margin-bottom: 16px;
}

.section-head .lead {
    margin-left: auto;
    margin-right: auto;
}

/* ---------- Formulare ---------- */
.field {
    display: block;
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.field .req {
    color: var(--pf-red);
}

.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 12px 14px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--pf-text);
    background: #fff;
    border: 1px solid var(--pf-border-strong);
    border-radius: var(--radius-input);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.field textarea {
    resize: vertical;
    min-height: 120px;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    border-color: var(--pf-red);
    box-shadow: 0 0 0 3px var(--pf-red-ring);
}

.field input::placeholder,
.field textarea::placeholder {
    color: #9b9aa1;
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 48px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 48px; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

/* Reveal-Animation – kurze, ruhige Einblendung */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .55s cubic-bezier(0.22, 1, 0.36, 1), transform .55s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* Form-Status (von js/forms.js manipuliert) */
.form-status {
    margin-top: 14px;
    font-size: 0.875rem;
}
.form-status.text-green-400,
.form-status.success { color: #15803d; }
.form-status.text-red-400,
.form-status.error { color: var(--pf-red-deep); }
.form-status.text-white\/60 { color: var(--pf-text-secondary); }

/* ============================================================
   Motion v2 – ruhige Bewegung (alles aus bei reduced-motion)
   ============================================================ */
.pf-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1000; background: linear-gradient(90deg, var(--pf-red), #ff6b75); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }

/* Hero: gestaffelter Einstieg */
@keyframes pf-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pf-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pf-breathe { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.05); opacity: .8; } }
.pf-hero__text > * { animation: pf-rise .8s cubic-bezier(.22, 1, .36, 1) both; }
.pf-hero__text > *:nth-child(2) { animation-delay: .08s; }
.pf-hero__text > *:nth-child(3) { animation-delay: .16s; }
.pf-hero__text > *:nth-child(4) { animation-delay: .24s; }
.pf-hero__text > *:nth-child(5) { animation-delay: .32s; }
.pf-hero__phone img { animation: pf-float 6s ease-in-out infinite; }
.pf-hero__visual svg.hero-glow { animation: pf-breathe 7s ease-in-out infinite; }

/* Karten: Anheben + Lichtfleck */
.card { position: relative; overflow: hidden; transition: transform .35s cubic-bezier(.22, 1, .36, 1), box-shadow .35s, border-color .35s; }
.card::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(209, 33, 45, .09), transparent 60%); }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--pf-red-ring); }
.card:hover::after { opacity: 1; }
.card__icon { transition: transform .35s cubic-bezier(.22, 1, .36, 1), background .3s; }
.card:hover .card__icon { transform: scale(1.1) rotate(-4deg); }

/* Buttons: Glanz-Sweep */
.btn--primary { position: relative; overflow: hidden; }
.btn--primary::after { content: ""; position: absolute; top: 0; left: -80%; width: 50%; height: 100%; transform: skewX(-20deg);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); transition: left .6s ease; }
.btn--primary:hover::after { left: 130%; }

/* "Neu in Version"-Streifen */
.pf-new { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 36px; }
.pf-new__item { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; overflow-wrap: break-word; }
.pf-new__item .card__icon { flex: none; margin: 0; }
.pf-new { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.pf-new__item h3 { font-size: 1.02rem; margin: 0 0 4px; }
.pf-new__item p { margin: 0; font-size: .92rem; }
.pf-new__tag { display: inline-flex; align-items: center; gap: 8px; background: var(--pf-red-wash); color: var(--pf-red-deep); font-weight: 700; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; padding: 6px 14px; border-radius: 999px; }
.pf-new__tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--pf-red); animation: pf-breathe 2s ease-in-out infinite; }
.pf-new__cta { text-align: center; margin-top: 30px; }

@media (prefers-reduced-motion: reduce) {
    .pf-hero__text > *, .pf-hero__phone img, .pf-hero__visual svg.hero-glow, .pf-new__tag i { animation: none !important; }
    .card:hover, .card:hover .card__icon { transform: none; }
    .btn--primary::after, .pf-progress { display: none; }
}
