/* ===================================================================
   KNS² Sauerland — Design System
   Kompetenz- und KI-Netzwerk Sauerland
   =================================================================== */

/* Fonts loaded via <link> in HTML */

/* ===== Tokens ===== */

:root {
    /* Brand — derived from KNS² logo */
    --kns-green: #3a6b35;
    --kns-green-deep: #1a3a18;
    --kns-green-light: #4d8a47;
    --kns-orange: #e8821e;
    --kns-orange-warm: #f09840;
    --kns-gray: #4a4a4a;
    --kns-gray-dark: #2a2a2a;
    --kns-blue: #2d7fc1;
    --kns-purple: #7b2d8e;

    /* Surfaces */
    --bg-primary: #fafbf9;
    --bg-cream: #f4f1eb;
    --bg-dark: #0f1f0e;
    --bg-card: #ffffff;

    /* Text */
    --text-primary: #1e2b1d;
    --text-secondary: #556654;
    --text-muted: #7a8a79;
    --text-on-dark: #e8ede7;
    --text-on-dark-muted: #a3b5a1;

    /* Spacing scale */
    --s-2xs: 0.25rem;
    --s-xs: 0.5rem;
    --s-sm: 0.75rem;
    --s-md: 1rem;
    --s-lg: 1.5rem;
    --s-xl: 2.5rem;
    --s-2xl: 4rem;
    --s-3xl: 6rem;
    --s-4xl: 8rem;

    /* Type */
    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;

    /* Layout */
    --max-w: 1140px;
    --radius: 6px;
    --radius-lg: 12px;
}

/* ===== Reset ===== */

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--text-primary);
    background: var(--bg-primary);
}

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

a {
    color: var(--kns-green);
    text-decoration: none;
    transition: color 0.25s ease;
}
a:hover { color: var(--kns-orange); }

/* ===== Typography ===== */

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.2;
    color: var(--kns-gray-dark);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p + p { margin-top: var(--s-md); }

/* ===== Utilities ===== */

.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding-inline: var(--s-lg);
}

.section-label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--kns-orange);
    margin-bottom: var(--s-sm);
}

.section-intro {
    max-width: 640px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: var(--s-2xl);
}

/* Scroll-triggered fade-in */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.stagger > .reveal:nth-child(1) { transition-delay: 0s; }
.stagger > .reveal:nth-child(2) { transition-delay: 0.1s; }
.stagger > .reveal:nth-child(3) { transition-delay: 0.2s; }
.stagger > .reveal:nth-child(4) { transition-delay: 0.3s; }

/* ===== Buttons ===== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--s-xs);
    padding: 0.85rem 2rem;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    text-align: center;
}

.btn--primary {
    background: var(--kns-orange);
    color: #fff;
    border-color: var(--kns-orange);
}
.btn--primary:hover {
    background: #d0741a;
    border-color: #d0741a;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 130, 30, 0.3);
}

.btn--ghost {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}
.btn--ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #fff;
    color: #fff;
    transform: translateY(-2px);
}

.btn--green {
    background: var(--kns-green);
    color: #fff;
    border-color: var(--kns-green);
}
.btn--green:hover {
    background: var(--kns-green-deep);
    border-color: var(--kns-green-deep);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(58, 107, 53, 0.3);
}

/* ===== Header ===== */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 251, 249, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(58, 107, 53, 0.12);
    padding: var(--s-sm) 0;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header__logo img {
    height: 52px;
    width: auto;
}

.nav {
    display: flex;
    gap: var(--s-xl);
    list-style: none;
}

.nav a {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    padding: var(--s-xs) 0;
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--kns-green);
    transition: width 0.3s ease;
}

.nav a:hover::after,
.nav a.active::after {
    width: 100%;
}

.nav a:hover { color: var(--kns-green); }

/* Mobile nav */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--s-xs);
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--kns-gray-dark);
    border-radius: 1px;
    transition: 0.3s ease;
}

/* ===== Hero ===== */

.hero {
    position: relative;
    background: linear-gradient(160deg, var(--bg-dark) 0%, var(--kns-green-deep) 50%, #1f4a1c 100%);
    color: var(--text-on-dark);
    padding: var(--s-4xl) 0 var(--s-3xl);
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

/* Mountain silhouette */
.hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background:
        linear-gradient(165deg, transparent 40%, rgba(26, 58, 24, 0.4) 40.5%, rgba(26, 58, 24, 0.4) 41%, transparent 41.5%),
        linear-gradient(140deg, transparent 30%, rgba(58, 107, 53, 0.2) 30.5%, rgba(58, 107, 53, 0.2) 32%, transparent 32.5%),
        linear-gradient(155deg, transparent 55%, rgba(26, 58, 24, 0.3) 55.5%, rgba(26, 58, 24, 0.3) 57%, transparent 57.5%);
    pointer-events: none;
}

/* Network dot pattern */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero__label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--kns-orange);
    margin-bottom: var(--s-lg);
    opacity: 0;
    animation: fadeUp 0.8s 0.2s ease forwards;
}

.hero h1 {
    color: #fff;
    max-width: 780px;
    margin-bottom: var(--s-lg);
    opacity: 0;
    animation: fadeUp 0.8s 0.4s ease forwards;
}

.hero h1 .accent {
    color: var(--kns-orange);
    font-style: italic;
}

.hero__subtitle {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-on-dark-muted);
    max-width: 580px;
    margin-bottom: var(--s-xl);
    opacity: 0;
    animation: fadeUp 0.8s 0.6s ease forwards;
}

.hero__actions {
    display: flex;
    gap: var(--s-md);
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp 0.8s 0.8s ease forwards;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Event Banner ===== */

.event-banner {
    background: var(--kns-orange);
    color: #fff;
    padding: var(--s-lg) 0;
}

.event-banner__inner {
    display: flex;
    align-items: center;
    gap: var(--s-xl);
}

.event-banner__badge {
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.15);
    padding: var(--s-xs) var(--s-md);
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.event-banner__content {
    flex: 1;
}

.event-banner__content h3 {
    font-family: var(--font-display);
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: var(--s-2xs);
}

.event-banner__details {
    display: flex;
    gap: var(--s-lg);
    font-size: 0.9rem;
    opacity: 0.95;
    margin-bottom: var(--s-2xs);
}

.event-banner__note {
    font-size: 0.8rem;
    opacity: 0.8;
    margin: 0;
}

.event-banner .btn--green {
    flex-shrink: 0;
    background: #fff;
    color: var(--kns-orange);
    border-color: #fff;
}

.event-banner .btn--green:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--kns-orange);
    border-color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

@media (max-width: 900px) {
    .event-banner__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--s-md);
    }

    .event-banner__details {
        flex-direction: column;
        gap: var(--s-2xs);
    }
}

/* ===== Section: About ===== */

.about {
    padding: var(--s-3xl) 0;
}

.about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s-3xl);
    align-items: center;
}

.about__text h2 {
    margin-bottom: var(--s-lg);
}

.about__text p {
    color: var(--text-secondary);
    margin-bottom: var(--s-md);
}

.about__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s-lg);
}

.stat {
    padding: var(--s-xl) var(--s-lg);
    background: var(--bg-cream);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(58, 107, 53, 0.1);
}

.stat__number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--kns-green);
    line-height: 1;
    margin-bottom: var(--s-xs);
}

.stat__label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== Section: Focus Areas (Cards) ===== */

.focus {
    padding: var(--s-3xl) 0;
    background: var(--bg-cream);
}

.focus__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--s-lg);
}

.focus-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--s-xl);
    border: 1px solid rgba(58, 107, 53, 0.08);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    position: relative;
    overflow: hidden;
}

.focus-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--kns-green), var(--kns-orange));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.focus-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.focus-card:hover::before {
    transform: scaleX(1);
}

.focus-card__icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--kns-green), var(--kns-green-light));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: var(--s-lg);
    color: #fff;
}

.focus-card h3 {
    font-family: var(--font-display);
    color: var(--kns-gray-dark);
    margin-bottom: var(--s-sm);
}

.focus-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ===== Section: Target Audiences ===== */

.audiences {
    padding: var(--s-3xl) 0;
}

.audiences__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s-lg);
}

.audience {
    text-align: center;
    padding: var(--s-2xl) var(--s-lg);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(58, 107, 53, 0.1);
    transition: all 0.35s ease;
    background: var(--bg-card);
}

.audience:hover {
    border-color: var(--kns-green);
    box-shadow: 0 8px 30px rgba(58, 107, 53, 0.08);
}

.audience__icon {
    width: 72px;
    height: 72px;
    margin: 0 auto var(--s-lg);
    border-radius: 50%;
    background: var(--bg-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: background 0.3s ease;
}

.audience:hover .audience__icon {
    background: linear-gradient(135deg, var(--kns-green), var(--kns-green-light));
    color: #fff;
}

.audience h3 {
    font-family: var(--font-display);
    margin-bottom: var(--s-sm);
}

.audience p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== Section: Quote ===== */

.quote-section {
    padding: var(--s-3xl) 0;
    background: var(--bg-dark);
    text-align: center;
}

.quote {
    max-width: 700px;
    margin: 0 auto;
}

.quote p {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-style: italic;
    color: #fff;
    line-height: 1.5;
    margin-bottom: var(--s-md);
}

.quote cite {
    font-family: var(--font-body);
    font-style: normal;
    font-size: 0.85rem;
    color: var(--kns-orange);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ===== Section: Testimonial ===== */

.testimonial {
    padding: var(--s-3xl) 0;
    text-align: center;
}

.testimonial h2 {
    margin-bottom: var(--s-2xl);
}

.testimonial__card {
    max-width: 640px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid rgba(58, 107, 53, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--s-2xl);
}

.testimonial__card blockquote p {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--s-lg);
}

.testimonial__author {
    display: flex;
    flex-direction: column;
    gap: var(--s-2xs);
}

.testimonial__name {
    font-weight: 700;
    color: var(--text-primary);
}

.testimonial__role {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== Section: Supporters ===== */

.supporters {
    padding: var(--s-3xl) 0;
    background: var(--bg-cream);
    text-align: center;
}

.supporters h2 {
    margin-bottom: var(--s-2xl);
}

.supporters__logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--s-2xl);
    flex-wrap: wrap;
}

.supporters__logo {
    padding: var(--s-lg) var(--s-xl);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(58, 107, 53, 0.08);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.supporters__logo:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.supporters__logo-text {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .supporters__logos {
        flex-direction: column;
        gap: var(--s-md);
    }
}

/* ===== Section: CTA ===== */

.cta {
    padding: var(--s-3xl) 0;
    background: linear-gradient(160deg, var(--bg-dark) 0%, var(--kns-green-deep) 100%);
    color: var(--text-on-dark);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

.cta .container {
    position: relative;
    z-index: 1;
}

.cta h2 {
    color: #fff;
    margin-bottom: var(--s-md);
}

.cta p {
    color: var(--text-on-dark-muted);
    max-width: 540px;
    margin: 0 auto var(--s-xl);
    font-size: 1.1rem;
}

.cta__actions {
    display: flex;
    justify-content: center;
    gap: var(--s-md);
    flex-wrap: wrap;
}

/* ===== Footer ===== */

.footer {
    background: var(--bg-dark);
    color: var(--text-on-dark);
    padding: var(--s-3xl) 0 var(--s-lg);
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--s-2xl);
    margin-bottom: var(--s-2xl);
}

.footer__brand p {
    color: var(--text-on-dark-muted);
    font-size: 0.9rem;
    margin-top: var(--s-md);
    max-width: 320px;
}

.footer__brand img {
    height: 44px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.85;
}

.footer h4 {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--kns-orange);
    margin-bottom: var(--s-md);
}

.footer ul { list-style: none; }

.footer li { margin-bottom: var(--s-xs); }

.footer a {
    color: var(--text-on-dark-muted);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}
.footer a:hover { color: #fff; }

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: var(--s-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-on-dark-muted);
}

/* ===== Responsive ===== */

@media (max-width: 900px) {
    .about__grid {
        grid-template-columns: 1fr;
        gap: var(--s-2xl);
    }

    .audiences__grid {
        grid-template-columns: 1fr;
        gap: var(--s-md);
    }

    .footer__grid {
        grid-template-columns: 1fr;
        gap: var(--s-xl);
    }

    .footer__bottom {
        flex-direction: column;
        gap: var(--s-xs);
        text-align: center;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: var(--s-3xl) 0 var(--s-2xl);
        min-height: auto;
    }

    .nav-toggle { display: flex; }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(250, 251, 249, 0.97);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: var(--s-md) var(--s-lg);
        border-bottom: 1px solid rgba(58, 107, 53, 0.12);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
        gap: 0;
    }

    .nav--open { display: flex; }

    .nav a { padding: var(--s-sm) 0; }

    .about__stats {
        grid-template-columns: 1fr 1fr;
        gap: var(--s-md);
    }

    .hero__actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .cta__actions {
        flex-direction: column;
        align-items: center;
    }
}
