/* ========================================
   AKIM Stabilitas – Design System
   Single CSS file, mobile-first
   ======================================== */

/* --- 1. Custom Properties --- */
:root {
    --color-primary: hsl(209, 100%, 24%);
    --color-akzent: hsl(30.79, 63.33%, 47.06%);
    --color-primary-dark: hsl(209, 100%, 14%);
    --color-primary-light: hsl(209, 100%, 92%);
    --color-bg: hsl(0, 0%, 97%);
    --color-bg-neg: hsl(0, 0%, 12%);
    --color-bg-alt: hsl(0, 0%, 93%);
    --color-surface: hsl(0, 0%, 100%);
    --color-text: hsl(0, 0%, 15%);
    --color-text-muted: hsl(0, 0%, 40%);
    --color-border: hsl(0, 0%, 80%);

    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --fs-hero: clamp(2rem, 5vw, 3rem);
    --fs-h1: clamp(1.75rem, 4vw, 2.5rem);
    --fs-h2: clamp(1.25rem, 3vw, 1.75rem);
    --fs-h3: clamp(1.05rem, 2.5vw, 1.35rem);
    --fs-h4: clamp(0.95rem, 2vw, 1.15rem);
    --fs-body: clamp(0.95rem, 2vw, 1.125rem);
    --fs-small: clamp(0.8rem, 1.5vw, 0.9rem);
    --line-height: 1.7;

    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;

    --max-width: 1200px;
    --header-height: 70px;
    --radius: 8px;
    --radius-lg: 16px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-primary: hsl(209, 82.42%, 57.35%);
        --color-bg: hsl(0, 0%, 12%);
        --color-bg-neg: hsl(0, 0%, 97%);
        --color-bg-alt: hsl(0, 0%, 17%);
        --color-surface: hsl(0, 0%, 20%);
        --color-text: hsl(0, 0%, 90%);
        --color-text-muted: hsl(0, 0%, 65%);
        --color-border: hsl(0, 0%, 30%);
        --color-primary-light: hsl(200, 45%, 20%);
    }
}

/* --- 2. Reset --- */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* --- 3. Base Typography --- */
html {
    scroll-behavior: smooth;
    font-family: var(--font-family);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: var(--line-height);
}

body { font-size: var(--fs-body); }

h1 { font-size: var(--fs-h1); line-height: 1.2; }
h2 { font-size: var(--fs-h2); color: var(--color-akzent); line-height: 1.3; padding-bottom: var(--space-md); }
h3 { font-size: var(--fs-h3); color: var(--color-akzent); line-height: 1.4; }
h4 { font-size: var(--fs-h4); line-height: 1.4; font-weight: 600; }

p, li, dd { font-size: var(--fs-body); line-height: var(--line-height); }

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* --- 4. Skip Link --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-md);
    background: var(--color-primary);
    color: #fff;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius);
    z-index: 200;
    font-weight: 600;
}
.skip-link:focus {
    top: var(--space-sm);
}

/* --- 5. Header & Navigation --- */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-height);
    background: linear-gradient(135deg, var(--color-surface) 150px, hsla(200, 44.93%, 25.88%, 0) 150px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.header-inner {
    display: flex;
    align-items: center;
    height: 100%;
    padding-inline: var(--space-md);
}

.logo { flex-shrink: 0; }
.logo img { width: 110px; height: 60px; }

.header-inner nav {
    margin-left: auto;
}

.nav-list {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
    height: var(--header-height);
    margin: 0;
}
.nav-list a {
    color: #f1f1f1;
    text-decoration: none;
    font-size: var(--fs-body);
    display: flex;
    align-items: center;
    height: 100%;
    padding-inline: var(--space-xs);
    white-space: nowrap;
}
.nav-list a:hover { color: var(--color-primary-light); }
.nav-list a[aria-current="page"] {
    border-bottom: 3px solid #fff;
}

.nav-cta {
    background: var(--color-primary);
    padding: var(--space-sm) var(--space-md) !important;
    border-radius: var(--radius);
    height: auto !important;
    white-space: nowrap;
}
.nav-cta:hover {
    text-decoration: none !important;
    box-shadow: var(--shadow);
}

/* Hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-md);
    margin-left: auto;
}
.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-bg-neg);
    position: relative;
    transition: transform 0.3s;
}
.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}
.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

.nav-toggle[aria-expanded="true"] .hamburger { background: transparent; }
.nav-toggle[aria-expanded="true"] .hamburger::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .hamburger::after { top: 0; transform: rotate(-45deg); }

/* --- 6. Hero Section --- */
.hero {
    position: relative;
    width: 100%;
    min-height: 400px;
    background-image: url('../image/Header_Background.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
}
.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    padding: var(--space-xl) var(--space-md);
    max-width: 80%;
}
.hero-content h1 {
    font-size: var(--fs-hero);
    color: #fff;
}

/* Subpage hero */
.hero--sub {
    min-height: 220px;
    align-items: end;
}
.hero--sub .hero-content {
    padding: var(--space-lg) var(--space-md);
}
.hero--sub .hero-content h1 {
    font-size: var(--fs-h1);
}
.hero--sub + .container {
    position: relative;
    z-index: 2;
}

/* --- 7. Layout --- */
.container {
    width: min(90%, var(--max-width));
    margin-inline: auto;
    padding-block: var(--space-lg);
}

.section {
    background-color: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-block: var(--space-lg);
    box-shadow: var(--shadow);
}

.split {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    align-items: stretch;
}
.split > * { flex: 1 1 300px; }

.split--reverse { flex-direction: row-reverse; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

/* --- 8. Components --- */

/* Lined Title */
.lined-title {
    display: flex;
    align-items: center;
    text-align: center;
    font-size: var(--fs-h2);
    font-weight: 600;
    color: var(--color-primary);
    margin-block: var(--space-xl) var(--space-xs);
}
.lined-title::before,
.lined-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}
.lined-title::before { margin-right: var(--space-md); }
.lined-title::after { margin-left: var(--space-md); }

/* Card */
.card {
    background: var(--color-bg-alt);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    opacity: 0.9;
}
.card:hover {
    transform: translateY(-5%);
    opacity: 1.0;
    transition: 0.3s;
}
.card-header {
    background: var(--color-akzent);
    color: #fff;
    padding: var(--space-md) var(--space-lg);
    font-weight: 600;
    text-align: center;
}
.card-body {
    padding: var(--space-md) var(--space-lg);
}
.card-body p {
    color: var(--color-text);
}

/* CTA Button */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--color-akzent);
    color: #fff;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius);
    font-size: var(--fs-body);
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
    justify-content: center;
}
.cta-button:hover {
    background: var(--color-primary-dark);
    text-decoration: none;
    box-shadow: var(--shadow);
    color: #fff;
}

/* Intro CTA wrapper */
.intro-cta {
    text-align: center;
    margin-top: var(--space-lg);
    padding-bottom: var(--space-sm);
}
.intro-cta .cta-button {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--fs-h3);
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
}
.cta-section p {
    max-width: 700px;
    margin-inline: auto;
    margin-bottom: var(--space-lg);
}
.cta-section .cta-button {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--fs-h3);
}

/* Timeline */
.timeline { margin-block: var(--space-lg); }
.timeline-item {
    display: grid;
    grid-template-columns: minmax(100px, 1fr) 3px 2.5fr;
    gap: var(--space-md);
    padding-block: var(--space-md);
}
.timeline-date {
    text-align: right;
    font-weight: 600;
    color: var(--color-akzent);
    font-size: var(--fs-small);
    padding-top: var(--space-xs);
}
.timeline-line {
    background: var(--color-akzent);
    border-radius: 2px;
}
.timeline-content h3 {
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}
.timeline-content h4 {
    margin-top: var(--space-md);
    margin-bottom: var(--space-xs);
    color: var(--color-primary);
}
.timeline-content p {
    color: var(--color-text-muted);
}
.timeline-content p strong {
    color: var(--color-text);
}

/* Profile Grid (dl) */
.profile-grid { margin-block: var(--space-lg); }
.profile-row {
    display: grid;
    grid-template-columns: minmax(100px, 1fr) 3px 2.5fr;
    gap: var(--space-md);
    padding-block: var(--space-sm);
}
.profile-row dt {
    text-align: right;
    font-weight: 600;
    color: var(--color-akzent);
}
.profile-row .profile-line {
    background: var(--color-akzent);
    border-radius: 2px;
}
.profile-row dd {
    color: var(--color-text);
}
.profile-row dd ul {
    list-style: disc;
    padding-left: var(--space-md);
}

/* Wave Section */
.wave-section {
    position: relative;
    background: var(--color-primary-dark);
    overflow: hidden;
    margin-block: var(--space-xs);
}
.wave-inner {
    position: relative;
    z-index: 2;
    padding: calc(80px + var(--space-lg)) var(--space-md);
    text-align: center;
    color: #fff;
    max-width: 1000px;
    margin: auto;
}
.wave-inner h2 { color: #fff; }
.wave-inner p { color: #fff; }
.wave-inner strong { color: #fff; }

.wave {
    display: block;
    width: 100%;
    height: 82px;
    position: absolute;
    left: 0;
}
.wave path { fill: var(--color-bg); }
.wave-top { top: -2px; }
.wave-bottom { bottom: -2px; }

.wave-section .card {
    background: var(--color-surface);
}
.wave-section .card-body p {
    color: var(--color-text);
}

/* Quote Block */
.quote-block {
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
    max-width: 900px;
    margin-inline: auto;
}
.quote-block blockquote {
    font-style: italic;
    font-size: var(--fs-h2);
    line-height: 1.6;
    color: var(--color-text);
}
.quote-block cite {
    display: block;
    margin-top: var(--space-md);
    font-style: normal;
    font-weight: 600;
    color: var(--color-primary);
}

/* Leistung Page */
.p-center {
    text-align: center;
}

/* Strength Grid */
.strength-grid {
    display: grid;
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}
.strength-item {
    border-left: 3px solid var(--color-primary);
    padding-left: var(--space-lg);
    padding-block: var(--space-sm);
}
.strength-item h4 {
    color: var(--color-primary);
    margin-bottom: var(--space-xs);
}
.strength-item p {
    margin-bottom: var(--space-sm);
}
.testimonial {
    font-style: italic;
    color: var(--color-text-muted);
    font-size: var(--fs-small);
    border: none;
}

/* --- Erfolge Section --- */
.erfolge-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: stretch;
}

.erfolge-liste {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.erfolg-item {
    padding-bottom: var(--space-md);
    padding-left: var(--space-md);
    border-left: 2px solid var(--color-akzent);
    border-bottom: 1px solid var(--color-border);
}
.erfolg-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.erfolg-text {
    font-size: var(--fs-body);
    color: var(--color-text);
    line-height: var(--line-height);
}

.erfolge-bild {
    display: flex;
    flex-direction: column;
}

.erfolge-bild picture {
    flex: 1;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.erfolge-bild img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

.erfolge-cta {
    display: block;
    text-align: center;
    margin-top: var(--space-md);
}

/* --- Kontakt Layout --- */
.kontakt-layout {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: var(--space-lg);
    align-items: center;
}

.kontakt-bild {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 3 / 4;
}
.kontakt-bild img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.kontakt-inhalt {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.kontakt-intro {
    color: var(--color-text);
    line-height: var(--line-height);
    margin: 0;
    padding-bottom: 64px;
}

.kontakt-aktionen {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    padding-top: 64px;
}

/* Intro Section */
.intro-section {
    display: flex;
    flex-wrap: wrap-reverse;
    position: relative;
    margin-top: -100px;
    z-index: 4;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    max-width: var(--max-width);
    margin-inline: auto;
    width: min(90%, var(--max-width));
}
.intro-text {
    flex: 1 1 330px;
    padding: var(--space-lg);
}
.intro-text h2 { font-weight: 600; margin-bottom: var(--space-xs); }
.intro-text h3 { margin-bottom: var(--space-md); color: var(--color-text-muted); }
.intro-text p { margin-bottom: var(--space-sm); }

.intro-image {
    flex: 0 1 40%;
    min-width: 250px;
    background: var(--color-primary);
}
.intro-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding-top: var(--space-lg);
}

/* Success List */
.success-list {
    list-style: none;
    padding: 0;
}
.success-list li {
    padding: var(--space-sm) 0;
    padding-left: var(--space-lg);
    position: relative;
}
.success-list li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--color-akzent);
    font-weight: 700;
}

/* Central List */
.central-list {
    padding: var(--space-md);
}
.central-list li {
    padding: var(--space-md);
}

/* Projekte Intro */
.projekt-intro-line {
    width: 48px;
    height: 3px;
    background: var(--color-akzent);
    border-radius: 2px;
    margin-bottom: var(--space-md);
}
.projekt-intro-line + h2 {
    max-width: 780px;
    margin-bottom: var(--space-md);
}
.projekt-intro-line + h2 + p {
    max-width: 620px;
    color: var(--color-text-muted);
}

/* Legal Pages */
.legal-content {
    max-width: 800px;
    margin-inline: auto;
    padding: var(--space-lg) var(--space-md);
}
.legal-content h2 {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
}
.legal-content h3 {
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
}
.legal-content p {
    margin-bottom: var(--space-md);
}
.legal-content ul {
    list-style: disc;
    padding-left: var(--space-lg);
    margin-bottom: var(--space-md);
}
.legal-content address {
    font-style: normal;
    margin-bottom: var(--space-md);
}

/* --- 9. Back-To-Top Button --- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s;
    pointer-events: none;
    z-index: 99;
}
.back-to-top svg {
    width: 18px;
    height: 18px;
}
.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.back-to-top:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    outline: 2px solid var(--color-border);
    outline-offset: 2px;
}

/* --- 10. Footer --- */
.site-footer {
    background: var(--color-primary-dark);
    color: #f1f1f1;
    margin-top: var(--space-xl);
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-width);
    margin-inline: auto;
    padding: var(--space-md) var(--space-lg);
}
.footer-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}
.footer-left img {
    width: 90px;
    height: auto;
}
.footer-left p {
    font-size: var(--fs-small);
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}
.footer-inner nav {
    display: flex;
    gap: var(--space-lg);
}
.footer-inner nav a {
    color: #f1f1f1;
    text-decoration: none;
}
.footer-inner nav a:hover { text-decoration: underline; }

/* --- 11. Media Queries --- */
@media (max-width: 767px) {
    .nav-list {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--color-primary-dark);
        flex-direction: column;
        padding: var(--space-md);
        gap: 0;
        height: auto;
        box-shadow: var(--shadow-lg);
    }
    .nav-list.is-open { display: flex; }
    .nav-list li { width: 100%; }
    .nav-list a {
        padding: var(--space-md);
        height: auto;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .nav-cta { text-align: center; margin-top: var(--space-sm); border-radius: var(--radius); }
    .nav-toggle { display: block; }

    .site-header {
        overflow: visible;
        background-color: var(--color-surface);
    }

    .intro-section { margin-top: -60px; }
    .intro-image { min-width: 100%; }

    .timeline-item,
    .profile-row {
        grid-template-columns: 1fr;
    }
    .timeline-date,
    .profile-row dt { text-align: left; }
    .timeline-line,
    .profile-row .profile-line { display: none; }

    .split { flex-direction: column; }

    .erfolge-section {
        grid-template-columns: 1fr;
    }
    .erfolge-bild {
        order: -1;
    }
    .erfolge-bild picture {
        max-height: 250px;
    }

    .kontakt-layout {
        grid-template-columns: 1fr;
    }
    .kontakt-bild {
        aspect-ratio: 4 / 3;
        max-height: 300px;
    }
    .kontakt-aktionen {
        padding-top: var(--space-md);
    }

    .footer-inner { flex-direction: column; text-align: center; gap: var(--space-md); }
    .footer-left { flex-direction: column; }
    .footer-inner nav { flex-direction: column; gap: var(--space-sm); }
}

@media (min-width: 768px) {
    .hero { min-height: 470px; }
    .hero--sub {
        min-height: 220px;
        align-items: center;
    }
}

@media (min-width: 1024px) {
    .container {
        padding-block: var(--space-md);
    }
}