/* ==========================================================================
   Sendlinger Würmchen — Großtagespflege München
   Garden-green storybook identity derived from the logo (caterpillar + garden).
   Signature element: the Caterpillar Tagesablauf.
   ========================================================================== */

:root {
    /* Colour — sampled from Sendlinger_Wuermchen_Logo.png */
    --forest:     #3F6B2A;   /* deep green: headings, nav, footer, wordmark */
    --forest-dk:  #335721;   /* footer / hover */
    --leaf:       #7AAE3F;   /* leaf green: fills, icons, links, accents */
    --leaf-soft:  #A7C96E;   /* lighter leaf */
    --sprout:     #EAF3CC;   /* pale chartreuse: alternating sections */
    --sprout-dk:  #DCEBB4;   /* sprout border */
    --cream:      #FBFCF5;   /* warm off-white background */
    --coral:      #F08C5A;   /* warm coral (the logo heart): accent pop */
    --coral-deep: #CF6433;   /* coral for buttons/links (AA on white text) */
    --ink:        #39402E;   /* body text */
    --ink-soft:   #5E6650;   /* muted text */

    /* Type */
    --font-display: 'Fredoka', 'Trebuchet MS', system-ui, sans-serif;
    --font-body: 'Nunito', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

    /* Shape & depth (forest-tinted shadows for cohesion) */
    --r-sm: 12px;
    --r: 18px;
    --r-lg: 28px;
    --r-pill: 999px;
    --shadow-sm: 0 2px 12px rgba(63, 107, 42, 0.08);
    --shadow: 0 10px 30px rgba(63, 107, 42, 0.12);
    --maxw: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--ink);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--coral-deep); }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--forest);
    line-height: 1.15;
    font-weight: 600;
}

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

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--coral-deep);
    outline-offset: 3px;
    border-radius: 6px;
}

/* --- Header / Nav ----------------------------------------------------------- */
header {
    background: rgba(251, 252, 245, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 2px solid var(--sprout-dk);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    gap: 1rem;
}

.logo { display: inline-flex; align-items: center; }
.logo img { height: 74px; width: auto; }

nav ul {
    list-style: none;
    display: flex;
    gap: 0.15rem;
    flex-wrap: wrap;
    align-items: center;
}

nav a {
    color: var(--forest);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 0.98rem;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: var(--r-pill);
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

nav a:hover { background: var(--sprout); }

nav a.active {
    background: var(--leaf);
    color: #fff;
}

.mobile-menu { display: none; }

/* --- Buttons ---------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--coral-deep);
    color: #fff;
    padding: 0.85rem 1.9rem;
    text-decoration: none;
    border-radius: var(--r-pill);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    box-shadow: 0 6px 18px rgba(207, 100, 51, 0.32);
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.btn:hover { background: #b9531f; transform: translateY(-2px); }

.btn--ghost {
    background: transparent;
    color: var(--forest);
    border: 2px solid var(--leaf);
    box-shadow: none;
}

.btn--ghost:hover { background: var(--sprout); transform: translateY(-2px); }

/* --- Hero (the garden) ------------------------------------------------------ */
.hero {
    position: relative;
    background: var(--cream);
    padding: 4.5rem 0 0;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2.5rem;
    align-items: center;
    position: relative;
    z-index: 2;
    padding-bottom: 4.5rem;
}

.eyebrow {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--leaf);
    margin-bottom: 0.75rem;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero h1 .accent { color: var(--leaf); }

.hero-lead {
    font-size: 1.2rem;
    color: var(--ink-soft);
    max-width: 38ch;
    margin-bottom: 1.75rem;
}

.hero-actions { display: flex; gap: 0.85rem; flex-wrap: wrap; }

.hero-art {
    position: relative;
    display: grid;
    place-items: center;
}

.hero-art img {
    width: min(100%, 420px);
    height: auto;
}

/* soft rolling hill at the foot of the hero */
.hero-hill {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    width: 100%;
    display: block;
    z-index: 1;
    color: var(--sprout);
}

/* --- Sections --------------------------------------------------------------- */
.section { padding: 4.5rem 0; }
.section--alt { background: var(--sprout); }

.section-head {
    max-width: 60ch;
    margin: 0 auto 2.75rem;
    text-align: center;
}

.section-title { font-size: clamp(1.7rem, 3.5vw, 2.35rem); }

.section-subtitle {
    color: var(--ink-soft);
    font-size: 1.12rem;
    margin-top: 0.6rem;
}

.prose { max-width: 68ch; margin: 0 auto; }
.prose p { margin-bottom: 1.1rem; color: var(--ink); }
.prose p:last-child { margin-bottom: 0; }

/* --- Cards ------------------------------------------------------------------ */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.card {
    background: #fff;
    padding: 2rem 1.75rem;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(63, 107, 42, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.section--alt .card { background: var(--cream); }

.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.card-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--r);
    display: grid;
    place-items: center;
    font-size: 1.6rem;
    margin-bottom: 1.1rem;
    background: var(--sprout);
}

.section--alt .card-icon { background: #fff; }

.card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.card p { color: var(--ink-soft); }

/* leaf-marker lists */
.list-leaf { list-style: none; margin-top: 0.6rem; }
.list-leaf li {
    position: relative;
    padding-left: 1.6rem;
    margin-bottom: 0.5rem;
    color: var(--ink-soft);
}
.list-leaf li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 12px;
    height: 12px;
    background: var(--leaf);
    border-radius: 0 60% 60% 60%;
    transform: rotate(45deg);
}
.list-leaf--ordered { counter-reset: step; }
.list-leaf--ordered li::before {
    content: counter(step);
    counter-increment: step;
    top: 0.15em;
    width: 1.5em; height: 1.5em;
    border-radius: 50%;
    transform: none;
    color: #fff;
    font-family: var(--font-display);
    font-size: 0.8rem;
    display: grid;
    place-items: center;
}

/* --- Quick facts (home) ----------------------------------------------------- */
.facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
}
.fact {
    background: #fff;
    border-radius: var(--r-lg);
    padding: 1.6rem 1.25rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(63, 107, 42, 0.06);
}
.fact .fact-num {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2rem;
    color: var(--leaf);
    line-height: 1;
    margin-bottom: 0.35rem;
}
.fact p { color: var(--ink-soft); font-size: 0.95rem; }

/* --- Highlight quote -------------------------------------------------------- */
.quote {
    max-width: 62ch;
    margin: 2rem auto 0;
    background: rgba(240, 140, 90, 0.1);
    border-left: 5px solid var(--coral);
    padding: 1.25rem 1.6rem;
    border-radius: 0 var(--r) var(--r) 0;
    font-style: italic;
    color: var(--ink);
    font-size: 1.05rem;
}

/* --- Split (text + panel) --------------------------------------------------- */
.split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    align-items: start;
}

/* --- Caterpillar Tagesablauf (SIGNATURE) ------------------------------------ */
.hours-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--forest);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 500;
    padding: 0.55rem 1.4rem;
    border-radius: var(--r-pill);
    margin: 0 auto 2.5rem;
}

.caterpillar { max-width: 760px; margin: 0 auto; }

.cat-head-wrap {
    width: 70px;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 2;
    margin-bottom: -10px;
}
.cat-head { width: 112px; height: auto; display: block; overflow: visible; }

.cat-track { position: relative; }

/* continuous body running through the segment bubbles */
.cat-track::before {
    content: "";
    position: absolute;
    top: 20px;
    bottom: 28px;
    left: 35px;
    width: 50px;
    transform: translateX(-50%);
    background: linear-gradient(var(--leaf-soft), var(--leaf));
    border-radius: var(--r-pill);
    opacity: 0.55;
    z-index: 0;
}

.cat-segment {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: 5px 0;
}

.cat-bubble {
    flex: 0 0 auto;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    text-align: center;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.92rem;
    border: 4px solid var(--cream);
    box-shadow: var(--shadow-sm);
}
.section--alt .cat-bubble { border-color: var(--sprout); }

.cat-segment:nth-child(odd)  .cat-bubble { background: var(--leaf); }
.cat-segment:nth-child(even) .cat-bubble { background: var(--forest); }

.cat-card {
    flex: 1 1 auto;
    background: #fff;
    border-radius: var(--r);
    padding: 0.85rem 1.25rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--leaf);
}
.cat-card h3 { font-size: 1.1rem; margin-bottom: 0.1rem; }
.cat-card p { color: var(--ink-soft); font-size: 0.93rem; }

/* --- Team ------------------------------------------------------------------- */
.team-group { margin-bottom: 3rem; }
.team-group:last-child { margin-bottom: 0; }

.team-group-heading {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--leaf);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: center;
    margin-bottom: 1.5rem;
}

.team-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    justify-content: center;
}

.team-card {
    background: #fff;
    padding: 2rem 1.5rem;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(63, 107, 42, 0.06);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.section--alt .team-card { background: var(--cream); }
.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(140deg, var(--leaf-soft), var(--leaf));
    color: #fff;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 2rem;
    margin: 0 auto 1rem;
    box-shadow: var(--shadow-sm);
}

.team-card h3 { font-size: 1.2rem; margin-bottom: 0.2rem; }
.team-role {
    color: var(--coral-deep);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.team-card p { color: var(--ink-soft); font-size: 0.95rem; }

/* --- Gallery (placeholder) -------------------------------------------------- */
.gallery-section { margin-bottom: 2.75rem; }
.gallery-section:last-child { margin-bottom: 0; }
.gallery-section-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    text-align: center;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}
.gallery-ph {
    aspect-ratio: 4 / 3;
    border-radius: var(--r);
    background: var(--sprout);
    border: 2px dashed var(--leaf-soft);
    display: grid;
    place-items: center;
    color: var(--leaf);
    font-size: 2rem;
}
.section--alt .gallery-ph { background: #fff; }

.notice {
    max-width: 60ch;
    margin: 0 auto 2.5rem;
    background: rgba(122, 174, 63, 0.12);
    border: 1px solid var(--sprout-dk);
    border-radius: var(--r);
    padding: 1.1rem 1.5rem;
    text-align: center;
    color: var(--ink);
}

/* --- Contact ---------------------------------------------------------------- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem;
}
.contact-card {
    background: #fff;
    padding: 1.9rem 1.6rem;
    border-radius: var(--r-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(63, 107, 42, 0.06);
}
.section--alt .contact-card { background: var(--cream); }
.contact-card .card-icon { margin: 0 auto 0.9rem; }
.contact-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.contact-card p { color: var(--ink-soft); font-size: 0.97rem; }
.contact-card a {
    color: var(--forest);
    text-decoration: none;
    font-weight: 700;
    overflow-wrap: break-word;
}
.contact-card a:hover { color: var(--coral-deep); }
.placeholder { color: var(--ink-soft); font-style: italic; }

/* --- CTA banner ------------------------------------------------------------- */
.cta-banner {
    background: var(--forest);
    color: #fff;
    text-align: center;
    border-radius: var(--r-lg);
    padding: 3rem 1.5rem;
    max-width: 760px;
    margin: 0 auto;
}
.cta-banner h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 0.6rem; }
.cta-banner p { color: rgba(255, 255, 255, 0.85); margin-bottom: 1.6rem; max-width: 50ch; margin-inline: auto; }
.cta-banner .btn { background: var(--coral); }
.cta-banner .btn:hover { background: var(--coral-deep); }

/* --- Footer ----------------------------------------------------------------- */
footer {
    background: var(--forest-dk);
    color: rgba(255, 255, 255, 0.78);
    padding: 2.75rem 0;
    text-align: center;
    font-size: 0.95rem;
    margin-top: 0;
}
footer strong { color: #fff; font-family: var(--font-display); }
.footer-mark { font-size: 1.6rem; margin-bottom: 0.6rem; }
footer p { margin-bottom: 0.3rem; }
footer a { color: #fff; text-decoration: none; }
footer a:hover { text-decoration: underline; }
.footer-fine { margin-top: 0.9rem; font-size: 0.85rem; color: rgba(255, 255, 255, 0.6); }

/* --- Scroll-in animation hooks --------------------------------------------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* --- Responsive ------------------------------------------------------------- */
@media (max-width: 860px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; padding-bottom: 3.5rem; }
    .hero-lead { margin-inline: auto; }
    .hero-actions { justify-content: center; }
    .hero-art { order: -1; }
    .hero-art img { width: min(72%, 300px); }
}

@media (max-width: 768px) {
    .section { padding: 3.25rem 0; }
    .hero { padding-top: 3rem; }
}

@media (max-width: 640px) {
    .logo img { height: 56px; }

    nav ul {
        display: none;
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--cream);
        border-bottom: 2px solid var(--sprout-dk);
        padding: 0.6rem 1rem 1rem;
        box-shadow: var(--shadow);
        gap: 0.2rem;
    }
    nav ul.show { display: flex; }
    nav a { display: block; padding: 0.65rem 1rem; }

    .mobile-menu {
        display: inline-grid;
        place-items: center;
        background: var(--leaf);
        color: #fff;
        border: none;
        width: 44px;
        height: 44px;
        border-radius: var(--r-sm);
        cursor: pointer;
        font-size: 1.3rem;
        line-height: 1;
    }
    .header-content { position: relative; }

    .cat-bubble { width: 58px; height: 58px; font-size: 0.82rem; border-width: 3px; }
    .cat-head-wrap { width: 58px; }
    .cat-head { width: 96px; }
    .cat-track::before { left: 29px; width: 40px; }
    .cat-segment { gap: 0.8rem; }
    .cat-card { padding: 0.7rem 1rem; }
}

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