/* ==========================================================================
   SCHÄRPUNKT IT – CENTRAL MASTER STYLESHEET (style.css)
   ========================================================================== */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('resources/inter-v20-latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('resources/inter-v20-latin-italic.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('resources/inter-v20-latin-700.woff2') format('woff2');
}

/* --- 1. CSS RESET & GLOBAL BASICS --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #0e2238;
    --primary-blue-dark: #081421;
    --accent-gold: #bd925a;
    --accent-gold-hover: #a37b47;
    --accent-gold-text: #8a6a3d; /* Abgedunkeltes Gold für Fliesstext-Links auf Weiss (WCAG AA, ~5:1) */
    --light-bg: #f8f9fa;
    --text-dark: #1f2937;
    --text-muted: #4b5563;
    --border-light: #e5e7eb;
    --dot-inactive: #6b7280; /* dunkler als --border-light: WCAG-Kontrast 4.6:1 auf --light-bg (Minimum für UI-Elemente: 3:1) */
    --white: #ffffff;

    /* --- TYPOGRAFIE KONZEPT (ZENTRALE STEUERUNG) --- */
    --fs-hero: 40px;
    --fs-h2: 32px;
    --fs-h3: 22px;
    --fs-h4: 20px;
    --fs-body-large: 18px;
    --fs-body: 15px;
    --fs-small: 13px;

    /* Schriftstärken */
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-black: 800;
}

html {
    scroll-padding-top: 120px; /* Verhindert, dass der fixed Header Inhalte verdeckt */
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    color: var(--text-dark);
    font-size: var(--fs-body);
    font-weight: var(--fw-regular);
    line-height: 1.6;
    background-color: var(--white);
	-webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Globale Überschriften-Standards */

h1, h2, h3, h4, .header-slogan, footer {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

h1 {
    font-size: var(--fs-hero);
    font-weight: var(--fw-black);
    color: var(--primary-blue);
    line-height: 1.25;
}

h2 {
    font-size: var(--fs-h2);
    font-weight: var(--fw-bold);
    color: var(--primary-blue);
    text-align: center;
}

h3 {
    font-size: var(--fs-h3);
    font-weight: var(--fw-bold);
    color: var(--white);
}

h4 {
    font-size: var(--fs-h4);
    font-weight: var(--fw-semibold);
    color: var(--white);
}

/* Skip-Link: für Tastatur-/Screenreader-Nutzer, überspringt die Navigation.
   Nur bei Tastaturfokus sichtbar, ansonsten ausserhalb des Viewports. */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 1100; /* über dem fixierten Header (z-index: 1000) */
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 12px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: var(--fw-semibold);
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 16px;
}

/* --- 2. HEADER & BRANDING --- */
header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-light);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 24px 0;
    box-shadow: 0 0px 0px rgba(0, 0, 0, 0);

    /* Scroll-Animationen */
    animation: shrinkHeader both linear;
    animation-timeline: scroll();
    animation-range: 0px 120px;
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 16px;
}

.logo-link {
    text-decoration: none;
    color: inherit;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 16px;

    animation: shrinkGap both linear;
    animation-timeline: scroll();
    animation-range: 0px 120px;
}

.logo-img {
    width: auto;
    display: block;
    height: 36px;

    animation: shrinkLogo both linear;
    animation-timeline: scroll();
    animation-range: 0px 120px;
}

.header-slogan {
    font-weight: var(--fw-semibold);
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.1;
    font-size: var(--fs-small);
    white-space: nowrap;
    border-left: 2px solid var(--accent-gold);
    padding-left: 16px;

    animation: shrinkSlogan both linear;
    animation-timeline: scroll();
    animation-range: 0px 120px;
}

/* --- 3. NAVIGATION (DESKTOP) --- */
.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
}

.header-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 24px;

    animation: shrinkNavGap both linear;
    animation-timeline: scroll();
    animation-range: 0px 120px;
}

.header-nav a {
    text-decoration: none;
    color: var(--primary-blue);
    font-size: var(--fs-body);
    font-weight: var(--fw-medium);
    white-space: nowrap;
    transition: color 0.2s ease;

    animation: shrinkNavLinks both linear;
    animation-timeline: scroll();
    animation-range: 0px 120px;
}

.header-nav a:hover {
    color: var(--accent-gold);
}

.header-nav .nav-cta {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;

    animation: shrinkNavButton both linear;
    animation-timeline: scroll();
    animation-range: 0px 120px;
}

.header-nav .nav-cta:hover {
    background-color: var(--accent-gold);
    color: var(--primary-blue);
}

/* --- 4. SCROLL ANIMATIONS (KEYFRAMES) --- */
@keyframes shrinkHeader { to { padding: 10px 0; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); } }
@keyframes shrinkGap { to { gap: 12px; } }
@keyframes shrinkLogo { to { height: 20px; } }
@keyframes shrinkSlogan { to { font-size: 10px; padding-left: 12px; } }
@keyframes shrinkNavGap { to { gap: 16px; } }
@keyframes shrinkNavLinks { to { font-size: 13px; } }
@keyframes shrinkNavButton { to { padding: 6px 12px; } }
/* --- 5. GLOBAL COMPONENTS & LAYOUT --- */
main {
    margin-top: 86px;
}

.btn {
    display: inline-block;
    background-color: var(--accent-gold);
    color: var(--white);
    text-decoration: none;
    padding: 16px 36px;
    font-weight: var(--fw-semibold);
    font-size: 16px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.btn:hover {
    background-color: var(--accent-gold-hover);
}

.section-title {
    margin-bottom: 40px;
}

.section-intro {
    text-align: center;
    max-width: 750px;
    margin: 0 auto 48px auto;
    color: var(--text-muted);
    font-size: var(--fs-body-large);
    line-height: 1.6;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

/* --- 6. SECTIONS --- */
/* Hero Section */
.hero {
    padding: 90px 0;
    background-color: var(--white);
}

.hero h1 {
    margin-bottom: 24px;
}

.hero p {
    font-size: var(--fs-body-large);
    color: var(--text-muted);
    max-width: 950px;
    margin-bottom: 40px;
}

/* Portfolio & Erfolge Basissektionen */
.portfolio {
    padding: 60px 0;
    background-color: var(--light-bg);
}

#successes.portfolio-section {
    padding: 100px 0;
    background-color: var(--light-bg);
}

/* Über Mich Section */
.about-section {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 90px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.about-section h2 {
    color: var(--accent-gold);
    margin-bottom: 24px;
    text-align: left;
}

.about-section p {
    font-size: var(--fs-body-large);
    max-width: 1000px;
    color: #e5e7eb;
    margin-bottom: 20px;
}

/* Tech-Abkürzungen */
.tech-terms-section {
    background-color: var(--light-bg);
    padding: 80px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.tech-terms-section h2 {
    margin-bottom: 24px;
    text-align: left;
}

.tech-terms-section p {
    max-width: 1000px;
    color: var(--text-dark);
}

.tech-terms-intro {
    margin-bottom: 24px;
}

.tech-explanation-list {
    max-width: 1000px;
    margin-bottom: 24px;
    list-style: none;
    padding: 0;
}

.tech-explanation-list li {
    margin-bottom: 16px;
    position: relative;
    padding-left: 24px;
    color: var(--text-dark);
}

.tech-explanation-list li::before {
    content: "▪";
    color: var(--accent-gold);
    position: absolute;
    left: 0;
    top: 0;
}

.tech-terms-summary {
    font-size: var(--fs-body-large);
}

/* --- Layout-Raster für Text und Bild --- */
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.about-content {
    max-width: 100%;
}

/* --- LinkedIn Button --- */
.about-cta-container {
    margin-top: 32px;
    display: flex;
    justify-content: flex-start;
}

.linkedin-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background-color: transparent;
    color: var(--accent-gold);
    border: 2px solid var(--accent-gold);
    border-radius: 6px;
    font-size: var(--fs-body-large);
    font-weight: var(--fw-semibold);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.linkedin-btn:hover {
    background-color: var(--accent-gold);
    color: var(--primary-blue-dark); /* Dunkler Text auf Gold für perfekten Kontrast */
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(189, 146, 90, 0.2);
}

.linkedin-btn:active {
    transform: translateY(0);
}

.linkedin-icon {
    width: 20px;
    height: 20px;
    fill: currentColor; /* Übernimmt automatisch die Textfarbe (Gold/Dunkelblau) */
    transition: fill 0.3s ease;
}

/* --- Bild-Container & Rundes Portrait --- */
.about-image-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

/* Name + Rolle unter dem Portrait: einziger Ort auf der Seite, an dem der Name
   sichtbar (nicht nur im Alt-Text) erscheint – wichtig fürs Vertrauen bei einer
   Einzelperson-Beratung */
.about-portrait-caption {
    text-align: center;
    line-height: 1.4;
}

.about-portrait-caption strong {
    display: block;
    color: var(--white);
    font-size: var(--fs-h4);
    font-weight: var(--fw-semibold);
}

.about-portrait-caption span {
    display: block;
    color: var(--accent-gold);
    font-size: var(--fs-small);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.portrait-link {
    display: inline-block;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent-gold);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

.about-portrait.image-circle {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.portrait-link:hover .about-portrait.image-circle {
    transform: scale(1.05);
}

.portrait-link:hover {
    border-color: var(--accent-gold-hover);
    box-shadow: 0 18px 40px rgba(189, 146, 90, 0.25);
}

/* --- 7. CARDS DETAILED --- */
.card {
    background: var(--white);
    border: 1px solid var(--border-light);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, border-color 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-gold);
}

/* --- Service-Karten mit Icon-Badge (Dienstleistungsportfolio) --- */
.service-card-icon {
    width: 140px;
    height: 140px;
    margin: 0 auto 24px auto;
    padding: 20px;
    background-color: var(--light-bg);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.card:hover .service-card-icon {
    background-color: rgba(189, 146, 90, 0.12);
    border-color: var(--accent-gold);
    transform: translateY(-2px);
}

.service-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.service-card-title {
    color: var(--primary-blue);
    text-align: center;
    margin-bottom: 20px;
}

/* Kopfbereich der Erfolgsgeschichten-Karten (blauer Balken mit Titel, .no-image unten) */
.card-image {
    margin-top: -40px;
    margin-left: -40px;
    margin-right: -40px;
    margin-bottom: 25px;
    overflow: hidden;
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
    position: relative;
}

/* Spezialfall: Erfolgsgeschichten ohne Bild (Blauer Balken) */
.card-image.no-image {
    background: var(--primary-blue);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image.no-image::after {
    display: none;
}

.card-image.no-image h3 {
    position: static;
    text-align: center;
    padding: 0 20px;
    color: var(--white);
}

/* Listen-Inhalte der Portfolio-Karten */
.card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.card ul li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 20px;
    color: var(--text-muted);
}

.card ul li::before {
    content: "▪";
    color: var(--accent-gold);
    position: absolute;
    left: 0;
    top: 0;
}

/* Fließtext-Inhalte der Erfolgsgeschichten-Karten */
.portfolio-section .card-body p {
    margin-top: 16px;
    margin-bottom: 16px;
    line-height: 1.6;
    color: var(--text-dark);
}

.portfolio-section .card-body p:last-child {
    margin-bottom: 0;
}

.portfolio-section .card-body strong {
    color: var(--primary-blue-dark);
    display: block;
    margin-bottom: 2px;
}

.portfolio-note {
    font-size: var(--fs-small);
    color: var(--text-muted);
    opacity: 0.75;
    text-align: center;
    margin-top: 50px;
    line-height: 1.5;
}

/* --- ERFOLGE: SCROLL-SNAP-KARUSSELL (3 / 2 / 1 pro Ansicht, ohne JS bedienbar) --- */
.stories-carousel {
    --stories-gap: 40px;
    --stories-visible: 3;
    position: relative;
    margin-top: 8px;
}

.stories-track {
    display: flex;
    gap: var(--stories-gap);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 4px 4px 16px 4px;
    margin: -4px -4px 0 -4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;       /* Firefox */
    -ms-overflow-style: none;    /* Alte Edge-Versionen */
}

.stories-track::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

/* Sanftes Ausblenden am Rand als Hinweis, dass in DIESE Richtung noch Karten folgen.
   Wird per JS (.can-scroll-prev / .can-scroll-next) an den echten Scroll-Zustand gekoppelt,
   damit der Fade nicht mehr angezeigt wird, wenn man wirklich am Anfang/Ende ist. */
.stories-carousel.can-scroll-next .stories-track {
    mask-image: linear-gradient(to right, black 0, black calc(100% - 28px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 0, black calc(100% - 28px), transparent 100%);
}

.stories-carousel.can-scroll-prev .stories-track {
    mask-image: linear-gradient(to right, transparent 0, black 28px, black 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0, black 28px, black 100%);
}

.stories-carousel.can-scroll-prev.can-scroll-next .stories-track {
    mask-image: linear-gradient(to right, transparent 0, black 28px, black calc(100% - 28px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0, black 28px, black calc(100% - 28px), transparent 100%);
}

.stories-track:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 4px;
}

.story-slide {
    scroll-snap-align: start;
    flex: 0 0 calc((100% - (var(--stories-visible) - 1) * var(--stories-gap)) / var(--stories-visible));
}

.stories-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 32px;
}

.stories-dots {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stories-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--dot-inactive);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.stories-dot:hover {
    background-color: var(--accent-gold-hover);
    transform: scale(1.2);
}

/* Aktiver Punkt = aktuell sichtbare Karte (wird per JS anhand der Scroll-Position gesetzt) */
.stories-dot.is-active {
    background-color: var(--accent-gold);
    transform: scale(1.3);
}

/* Bei Scroll-Snap sind nur (Karten - sichtbare Karten + 1) Positionen erreichbar –
   bei 6 Karten und 3 sichtbaren also nur 4 Stopps. Überzählige Punkte ausblenden,
   sonst wären die letzten nie anwählbar/aktiv. */
.stories-dot:nth-child(n + 5) {
    display: none;
}

/* Pfeil-Buttons: per Default versteckt, erscheinen erst nach erfolgreichem JS-Laden
   (Progressive Enhancement – ohne JS bleiben Wischgeste/Trackpad und die Punkte voll nutzbar) */
.stories-arrow {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background-color: var(--white);
    color: var(--primary-blue);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.stories-arrow:hover {
    background-color: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--white);
}

/* Anfang/Ende erreicht: Pfeil ist inaktiv statt weiter klickbar zu wirken */
.stories-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.js-carousel-ready .stories-arrow {
    display: flex;
}

/* Dienstleistungsportfolio als Karussell: mechanisch identisch zum Erfolge-Karussell
   (Scroll-Snap, Pfeile, Punkte, Fade-Ränder), aber nur auf Mobile aktiv – am Desktop/Tablet
   bleibt .grid das reguläre CSS-Grid, siehe @media (max-width: 768px) weiter unten.
   Die Formatierung der Karten (.service-card) bleibt komplett unangetastet. */
.portfolio-carousel {
    position: relative;
}

.portfolio-carousel.can-scroll-next .grid {
    mask-image: linear-gradient(to right, black 0, black calc(100% - 28px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 0, black calc(100% - 28px), transparent 100%);
}

.portfolio-carousel.can-scroll-prev .grid {
    mask-image: linear-gradient(to right, transparent 0, black 28px, black 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0, black 28px, black 100%);
}

.portfolio-carousel.can-scroll-prev.can-scroll-next .grid {
    mask-image: linear-gradient(to right, transparent 0, black 28px, black calc(100% - 28px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0, black 28px, black calc(100% - 28px), transparent 100%);
}

.portfolio-nav {
    display: none; /* wird nur innerhalb der Mobile-Media-Query eingeblendet */
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 32px;
}

.portfolio-dots {
    display: flex;
    align-items: center;
    gap: 10px;
}

.portfolio-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--dot-inactive);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.portfolio-dot:hover {
    background-color: var(--accent-gold-hover);
    transform: scale(1.2);
}

.portfolio-dot.is-active {
    background-color: var(--accent-gold);
    transform: scale(1.3);
}

.portfolio-arrow {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background-color: var(--white);
    color: var(--primary-blue);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.portfolio-arrow:hover {
    background-color: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--white);
}

.portfolio-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.js-carousel-ready .portfolio-arrow {
    display: flex;
}

/* --- 8. PHILOSOPHIE & CALL TO ACTION TARGETS --- */
.philosophy {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.philosophy h2 {
    color: var(--accent-gold);
    margin-bottom: 40px;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.philosophy-item h3 {
    margin-bottom: 12px;
    color: var(--white);
}

.philosophy-item p {
    color: #9ca3af;
}

.cta {
    padding: 100px 0;
    text-align: center;
    background-color: var(--white);
    transition: background-color 0.4s ease;
}

.cta h2 {
    margin-bottom: 16px;
    transition: color 0.4s ease;
}

.cta p {
    font-size: var(--fs-body-large);
    color: var(--text-muted);
    margin-bottom: 32px;
    transition: color 0.4s ease;
}

/* Einzugsgebiet: bewusst kleiner/dezenter als der Haupt-Pitch, liefert aber
   Textsignale für regionale Suchanfragen (z. B. "IT Langenthal", "IT Oberaargau") */
.cta .cta-region {
    margin-top: 24px;
    margin-bottom: 0;
    font-size: var(--fs-small);
    color: var(--text-muted);
}

/* Der zeitgesteuerte Target-Flash-Effekt */
.cta:target {
    animation: flashTarget 2.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.cta:target h2 {
    animation: flashTextDark 2.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.cta:target p {
    animation: flashTextLight 2.5s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes flashTarget {
    0%, 35% { background-color: var(--accent-gold); }
    100% { background-color: var(--white); }
}

@keyframes flashTextDark {
    0%, 35% { color: var(--primary-blue); }
    100% { color: var(--primary-blue); }
}

@keyframes flashTextLight {
    0%, 35% { color: #f3f4f6; }
    100% { color: #4b5563; }
}
/* --- 9. LEGAL & FOOTER --- */
.legal-section {
    padding: 160px 24px 120px 24px;
}

.legal-section h1 {
    margin-bottom: 40px;
}

.legal-section h2 {
    margin-top: 32px;
    margin-bottom: 12px;
	text-align: left;
}

.legal-section p {
    margin-bottom: 16px;
    color: var(--text-muted);
}
.legal-section ul {
    list-style-type: square;
    list-style-position: inside;
    padding-left: 0;
    margin-bottom: 16px;
}

.legal-section li {
    margin-bottom: 8px;
    color: var(--text-muted);
}

.legal-section ul li::marker {
    color: var(--accent-gold);
}

/* Kontakt-Links (Mailto/Tel): abgedunkeltes Gold für WCAG-AA-Kontrast (~5:1) auf Weiss */
.legal-section a.contact-link {
    color: var(--accent-gold-text);
    text-decoration: none;
    font-weight: var(--fw-medium);
}

.legal-section a.contact-link:hover,
.legal-section a.contact-link:focus-visible {
    color: var(--primary-blue);
    text-decoration: none;
}

footer {
    background-color: var(--primary-blue-dark);
    color: #9ca3af;
    padding: 40px 0;
    font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links a {
    color: inherit;
    text-decoration: none;
    margin-right: 15px;
}

.footer-links a:last-child {
    margin-right: 0;
}

.footer-links a:hover {
    color: var(--accent-gold);
}

/* ==========================================================================
   10. RESPONSIVE MEDIA QUERIES (MOBILE SKALIERUNG)
   ========================================================================== */

/* --- A. Tablet- und Smartphone-Optimierung (bis 992px) --- */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image-wrapper {
        grid-row: 1;
    }

    .about-section h2 {
        text-align: center;
    }

    .portrait-link {
        width: 240px;
        height: 240px;
    }

    .about-cta-container {
        justify-content: center;
    }

    .linkedin-btn {
        width: 100%;
        justify-content: center;
    }

    /* Erfolge-Karussell: 2 Karten pro Ansicht auf Tablets */
    .stories-carousel {
        --stories-visible: 2;
    }

    /* 6 Karten - 2 sichtbare + 1 = 5 erreichbare Positionen */
    .stories-dot:nth-child(5) {
        display: block;
    }
}

/* --- B. Reine Smartphone-Optimierung (bis 768px) --- */
@media (max-width: 768px) {
    :root {
        /* Proportionale Reduzierung aller Schriftgrössen für Mobile */
        --fs-hero: 26px;
        --fs-h2: 24px;
        --fs-h3: 18px;
        --fs-h4: 16px;
        --fs-body-large: 16px;
        --fs-body: 14px;
        --fs-small: 11px;
    }

    main {
        margin-top: 76px;
    }

    /* Erfolge-Karussell: 1 Karte pro Ansicht auf Smartphones */
    .stories-carousel {
        --stories-visible: 1;
        --stories-gap: 20px;
    }

    /* 6 Karten - 1 sichtbare + 1 = alle 6 Positionen erreichbar */
    .stories-dot:nth-child(5),
    .stories-dot:nth-child(6) {
        display: block;
    }

    header {
        padding: 16px 0;
    }

    .logo-area {
        flex-wrap: nowrap;
        gap: 12px;
    }

    .logo-img {
        height: 24px;
    }

    .header-slogan {
        border-left: 2px solid var(--accent-gold);
        padding-left: 12px;
        font-size: var(--fs-small);
        letter-spacing: 0.5px;
    }

    @keyframes shrinkLogo { to { height: 18px; } }
    @keyframes shrinkSlogan { to { font-size: 9px; padding-left: 10px; } }

    .legal-section {
        padding: 120px 16px 80px 16px;
    }

    .grid,
    .philosophy-grid {
        gap: 20px;
    }

    /* Dienstleistungsportfolio auf Mobile: von 1-spaltigem Grid auf Scroll-Snap-Karussell
       (1 Karte pro Ansicht). Padding/negativer Margin wie beim Erfolge-Karussell, damit der
       Karten-Schatten am Rand nicht vom horizontalen Scroll-Container abgeschnitten wird. */
    .portfolio-carousel .grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        padding: 4px 4px 16px 4px;
        margin: -4px -4px 0 -4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .portfolio-carousel .grid::-webkit-scrollbar {
        display: none;
    }

    .portfolio-carousel .grid:focus-visible {
        outline: 2px solid var(--accent-gold);
        outline-offset: 4px;
    }

    .portfolio-carousel .card.service-card {
        scroll-snap-align: start;
        flex: 0 0 100%;
    }

    .portfolio-nav {
        display: flex;
    }

    /* Mobile Cards Framework */
    .card {
        padding: 24px;
    }

    .card-image {
        margin-top: -24px;
        margin-left: -24px;
        margin-right: -24px;
        margin-bottom: 25px;
        overflow: hidden;
        position: relative;
        display: block;
    }

    #successes.portfolio-section {
        padding: 60px 0;
    }

    .card-image.no-image {
        min-height: 80px;
        display: flex;
    }

    .card-image.no-image h3 {
        position: static !important;
    }

    /* Mobile Hamburger Trigger & Menu (Pure CSS) */
    .header-flex {
        position: relative;
    }

    .nav-toggle-label {
        display: flex;
        align-items: center;
        cursor: pointer;
        padding: 10px;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001;
    }

    .nav-toggle-label span,
    .nav-toggle-label span::before,
    .nav-toggle-label span::after {
        display: block;
        background: var(--primary-blue);
        height: 2px;
        width: 22px;
        position: relative;
        transition: all 0.2s ease-in-out;
    }

    .nav-toggle-label span::before,
    .nav-toggle-label span::after {
        content: '';
        position: absolute;
    }

    .nav-toggle-label span::before {
        top: -7px;
    }

    .nav-toggle-label span::after {
        bottom: -7px;
    }

    .header-nav ul {
        position: absolute;
        top: calc(100% + 13px);
        left: -24px;
        right: -24px;
        background-color: var(--white);
        border-top: 1px solid var(--border-light);
        border-bottom: 1px solid var(--border-light);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
        flex-direction: column;
        gap: 0;
        padding: 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.25s ease-in-out;
        animation: none;
    }

    .header-nav li {
        width: 100%;
        text-align: center;
    }

    .header-nav a {
        display: block;
        padding: 16px 0;
        width: 100%;
        border-bottom: 1px solid #f3f4f6;
        font-size: var(--fs-body);
        animation: none;
    }

    .header-nav .nav-cta {
        background-color: var(--primary-blue);
        color: var(--white);
        padding: 16px 0;
        border-radius: 0;
        animation: none;
    }

    .nav-toggle:checked ~ ul {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-toggle:checked ~ .nav-toggle-label span {
        background: transparent;
    }

    .nav-toggle:checked ~ .nav-toggle-label span::before {
        transform: rotate(45deg);
        top: 0;
    }

    .nav-toggle:checked ~ .nav-toggle-label span::after {
        transform: rotate(-45deg);
        bottom: 0;
    }
}
