/*
 * ==========================================================
 * depITpro.com
 * Custom CSS for Grav Quark 2
 * Version 3.1
 *
 * File:
 * user/themes/quark2/css/custom.css
 * ==========================================================
 */

/* ==========================================================
   01 DESIGN TOKENS
   ========================================================== */

:root {
    --color-bg: #F8F7F3;
    --color-surface: #746F67;
    --color-surface-dark: #625D56;
    --color-accent: #D9CFBF;
    --color-accent-light: #ECE4D8;
    --color-text: #2F2F2F;
    --color-text-soft: #4F4B45;
    --color-text-muted: #6C6963;
    --color-border: #E5DED3;
    --color-white: #FFFFFF;

    --content-width: 1200px;
    --content-padding: 30px;

    --radius-small: 6px;
    --radius-medium: 14px;
    --radius-large: 20px;

    --shadow-soft: 0 12px 30px rgba(0, 0, 0, .09);
    --shadow-large: 0 20px 45px rgba(0, 0, 0, .15);

    --transition: .25s ease;
}


/* ==========================================================
   02 QUARK OVERRIDES
   ========================================================== */

html {
    scroll-behavior: smooth;
}

body {
    color: var(--color-text);
    background: var(--color-bg);
}

#body-wrapper {
    padding-top: 0;
    padding-bottom: 0;
}

#body-wrapper > .container {
    max-width: var(--content-width);
}

.main-content {
    margin: 0;
    padding: 0;
}

/*
 * Quark uses h2::before for decorative lines.
 * Keep the pseudo-element in the layout, but make it invisible.
 */
.intro-container > h2::before,
.education-container > h2::before,
.philosophy-container > h2::before {
    opacity: 0 !important;
}


/* ==========================================================
   03 HERO
   ========================================================== */

.hero-overlay {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.hero-section {
    position: relative;

    width: 100vw;
    height: calc(100vh - 80px);
    min-height: 700px;
    max-height: 920px;

    margin-left: calc(50% - 50vw);

    display: flex;
    align-items: center;

    overflow: visible;
}

.hero-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 1;

    width: 100%;
    height: 100%;
}

.hero-image {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center center;
}

.hero-content {
    position: absolute;
    top: 18%;
    left: 7%;
    z-index: 3;

    max-width: 620px;
    padding: 0;

    text-align: left;
    color: var(--color-text);
}

.hero-content h1 {
    max-width: none;
    margin: 0 0 24px;

    font-size: clamp(3.2rem, 5vw, 4.6rem);
    line-height: 1.02;
    font-weight: 600;
    letter-spacing: -.02em;

    color: var(--color-text);
    text-shadow: none;
}

/*
 * One title, two controlled wrapping modes:
 * desktop = two rows, <=1100px = one word per row.
 */
.hero-title > span {
    white-space: nowrap;
}

/* ==========================================================
   HERO-TITEL: FESTE DARSTELLUNGEN
   ========================================================== */

.hero-title-wide {
    display: block;
}

.hero-title-narrow {
    display: none;
}

@media (max-width: 1100px) {
    .hero-title-wide {
        display: none;
    }

    .hero-title-narrow {
        display: block;
    }
}

.hero-content p {
    margin: 0 0 42px;

    font-size: 1.35rem;
    line-height: 1.5;

    color: var(--color-text-soft);
}

.hero-cta {
    display: inline-block;

    padding: 15px 34px;

    border: 2px solid var(--color-surface);
    border-radius: var(--radius-small);

    color: var(--color-surface);
    background: rgba(255, 255, 255, .28);

    text-decoration: none;
    font-weight: 500;

    backdrop-filter: blur(3px);
    transition:
        color var(--transition),
        background var(--transition),
        border-color var(--transition),
        transform var(--transition);
}

.hero-cta:hover,
.hero-cta:focus-visible {
    color: var(--color-white);
    background: var(--color-surface);
    border-color: var(--color-surface);
    transform: translateY(-1px);
}


/* ==========================================================
   04 CONTACT
   ========================================================== */

.contact-section {
    position: relative;
    z-index: 10;
}

.contact-wrapper {
    display: flex;
    justify-content: flex-start;
    padding-left: 4%;
}

.contact-box {
    position: relative;
    z-index: 30;

    width: 100%;
    max-width: 560px;

    margin: -165px 0 0;
    padding: 50px 55px;

    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 36px;

    border-radius: var(--radius-large);

    color: var(--color-white);
    background: var(--color-surface);
    box-shadow: var(--shadow-large);
}

.contact-left {
    flex: 1;
}

.contact-right {
    min-width: 240px;

    display: flex;
    flex-direction: column;
    gap: 22px;
}

.contact-person strong {
    display: block;
    margin-bottom: .35rem;

    font-size: 2.05rem;
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -.02em;

    color: var(--color-white);
}

.contact-person span {
    display: block;

    font-size: 1rem;
    letter-spacing: .03em;

    color: var(--color-accent);
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 12px;

    color: var(--color-white);
    text-decoration: none;

    font-size: 1.08rem;
    line-height: 1.4;

    transition: opacity var(--transition);
}

.contact-btn i {
    width: 38px;
    height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    border-radius: 50%;

    color: var(--color-surface);
    background: var(--color-accent);

    font-size: .95rem;

    transition:
        background var(--transition),
        transform var(--transition);
}

.contact-btn:hover,
.contact-btn:focus-visible {
    opacity: .78;
}

.contact-btn:hover i,
.contact-btn:focus-visible i {
    background: var(--color-accent-light);
    transform: scale(1.05);
}


/* ==========================================================
   05 INTRO
   ========================================================== */

.intro-section {
    max-width: 900px;
    margin: 90px auto;
    padding: 0 var(--content-padding);

    text-align: center;
}

.intro-container {
    max-width: 820px;
    margin: 0 auto;
}

.intro-kicker {
    display: inline-block;
    margin-bottom: 18px;

    color: var(--color-surface);

    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.philosophy-kicker {
    display: inline-block;
    margin-bottom: 26px;

    color: var(--color-text-soft);

    font-size: .92rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: none;
}

.intro-section h2 {
    margin: 0 0 30px;

    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -.015em;

    color: var(--color-text);
}

.intro-lead {
    margin: 0 0 24px;

    font-size: 1.35rem;
    line-height: 1.7;

    color: var(--color-text-soft);
}

.intro-section p:last-child {
    max-width: 760px;
    margin: 0 auto;

    line-height: 1.8;
    color: var(--color-text-muted);
}


/* ==========================================================
   06 SERVICES
   ========================================================== */

.services-section {
    max-width: var(--content-width);
    margin: 0 auto 100px;
    padding: 0 var(--content-padding);
}

.services-heading {
    max-width: 760px;
    margin: 0 auto 48px;
    text-align: center;
}

.services-heading h2 {
    margin: 0 0 18px;

    font-size: clamp(2rem, 3.5vw, 2.8rem);
    line-height: 1.18;
    font-weight: 600;
    letter-spacing: -.015em;
}

.services-heading p {
    margin: 0;

    font-size: 1.15rem;
    line-height: 1.7;

    color: var(--color-text-soft);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
}

.service-card {
    padding: 42px;

    border: 1px solid var(--color-border);
    border-radius: var(--radius-large);

    background: var(--color-white);
    box-shadow: var(--shadow-soft);
}

.service-card h3 {
    margin: 0 0 16px;

    font-size: 1.9rem;
    line-height: 1.2;
    font-weight: 600;

    color: var(--color-text);
}

.service-lead {
    margin: 0 0 24px;

    font-size: 1.2rem;
    line-height: 1.55;
    font-weight: 500;

    color: var(--color-surface);
}

.service-card > p:not(.service-lead) {
    margin: 0 0 24px;
    line-height: 1.75;
    color: var(--color-text-muted);
}

.service-card ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.service-card li {
    position: relative;
    padding: 9px 0 9px 28px;

    line-height: 1.5;
    color: var(--color-text-soft);
}

.service-card li::before {
    content: "✓";

    position: absolute;
    top: 9px;
    left: 0;

    color: var(--color-surface);
    font-weight: 700;
}

.service-products {
    display: grid;
    gap: 16px;
    margin-top: 28px;
}

.service-products > div,
.service-product {
    display: block;
    padding: 20px 22px;

    border-radius: var(--radius-medium);
    background: var(--color-bg);

    color: inherit;
    text-decoration: none;
}

.service-products strong {
    display: block;
    margin-bottom: 6px;

    font-size: 1.08rem;
    color: var(--color-text);
}

.service-products span {
    display: block;
    line-height: 1.6;
    color: var(--color-text-muted);
}

.service-product {
    transition:
        transform var(--transition),
        box-shadow var(--transition);
}

.service-product:hover,
.service-product:focus-visible {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.service-product-link {
    margin-top: 12px;

    font-size: .92rem;
    font-weight: 600;

    color: var(--color-surface);
}


/* ==========================================================
   07 EDUCATION
   ========================================================== */

.education-section {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 90px var(--content-padding);

    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.education-container {
    max-width: 980px;
    margin: 0 auto;
    text-align: center;
}

.education-container h2 {
    margin: 0 0 26px;

    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -.015em;

    color: var(--color-text);
}

.education-lead {
    max-width: 760px;
    margin: 0 auto 48px;

    font-size: 1.12rem;
    line-height: 1.8;

    color: var(--color-text-soft);
}

.education-audiences {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;

    margin-bottom: 42px;
}

.education-card {
    padding: 34px;

    text-align: left;

    background: var(--color-white);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-soft);
}

.education-card h3 {
    margin: 0 0 18px;

    font-size: 1.35rem;
    color: var(--color-surface);
}

.education-card ul {
    margin: 0;
    padding: 0;

    list-style: none;
}

.education-card li {
    position: relative;
    padding: 8px 0 8px 26px;

    line-height: 1.6;
    color: var(--color-text-soft);
}

.education-card li::before {
    content: "✓";

    position: absolute;
    left: 0;

    color: var(--color-surface);
    font-weight: 700;
}

.education-container .hero-cta {
    margin-top: 12px;
}


/* ==========================================================
   08 PHILOSOPHY
   ========================================================== */

.philosophy-section {
    max-width: 1200px;
    margin: 110px auto;
    padding: 0 30px;
}

.philosophy-container {
    max-width: 900px;
    margin: auto;
    text-align: center;
}

.philosophy-section h2 {
    margin-bottom: 28px;

    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
}

.philosophy-lead {
    margin-bottom: 24px;

    font-size: 1.25rem;
    line-height: 1.7;

    color: var(--color-text-soft);
}

.philosophy-container p {
    line-height: 1.8;
    color: var(--color-text-muted);
}

.philosophy-values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;

    margin-top: 70px;
}

.value-card {
    padding: 34px;

    border-radius: var(--radius-large);

    background: var(--color-white);
    box-shadow: var(--shadow-soft);
}

.value-card h3 {
    margin-bottom: 14px;

    font-size: 1.25rem;

    color: var(--color-surface);
}

.value-card p {
    margin: 0;

    font-size: .98rem;
    line-height: 1.8;
}


/* ==========================================================
   09 FOOTER
   ========================================================== */

.footer {
    margin-top: 30px;

    border-top: 1px solid var(--color-border);
    background: var(--color-bg);
}

.footer-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 36px 20px;

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

.footer-copy {
    margin: 0;

    color: var(--color-surface);
    font-size: .95rem;
}

.footer-nav {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-nav a {
    color: var(--color-surface);
    text-decoration: none;

    transition: color var(--transition);
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
    color: var(--color-text);
}

.footer-nav span {
    color: #C7BBAA;
}


/* ==========================================================
   10 EXPANDABLE PAGE CONTENT
   ========================================================== */

/*
 * The landing page initially behaves like a compact business card.
 * One container controls all additional content.
 */
.more-content {
    display: grid;
    grid-template-rows: 0fr;

    opacity: 0;
    visibility: hidden;

    transition:
        grid-template-rows .7s ease,
        opacity .4s ease,
        visibility .4s ease;
}

.more-content-inner {
    min-height: 0;
    overflow: hidden;
}

body.content-visible .more-content {
    grid-template-rows: 1fr;

    opacity: 1;
    visibility: visible;
}


/* ==========================================================
   11 TABLET AND NARROW DESKTOP
   ========================================================== */

@media (max-width: 1100px) {
    .hero-content h1 {
        max-width: none;
        line-height: .94;
    }

    .hero-space-desktop {
        display: none;
    }

    .hero-break-mobile {
        display: block;
    }
}

@media (max-width: 1024px) {
    .hero-section {
        min-height: 650px;
    }

    .hero-content {
        top: 16%;
        left: 5%;
        max-width: 470px;
    }

    .hero-content h1 {
        font-size: clamp(2.8rem, 6vw, 4rem);
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    .services-grid {
        gap: 24px;
    }

    .service-card {
        padding: 34px;
    }

    .contact-wrapper {
        padding-left: 3%;
    }

    .contact-box {
        max-width: 540px;
        padding: 44px 46px;
    }
}


/* ==========================================================
   12 SMARTPHONE
   ========================================================== */

@media (max-width: 768px) {
    :root {
        --content-padding: 20px;
    }

    .hero-section {
        width: 100vw;
        height: 720px;
        min-height: 720px;
        max-height: none;

        margin-left: calc(50% - 50vw);
    }

    .hero-image {
        object-position: 68% center;
    }

    .hero-content {
        top: 48px;
        left: 24px;
        right: 24px;

        max-width: 520px;
    }

    .hero-content h1 {
        max-width: none;
        margin-bottom: 22px;

        font-size: clamp(2.45rem, 10.5vw, 3.25rem);
        line-height: .94;
        letter-spacing: -.025em;
    }

    .hero-content p {
        max-width: 310px;
        margin-bottom: 28px;

        font-size: 1.05rem;
        line-height: 1.45;
    }

    .hero-cta {
        padding: 13px 24px;

        background: rgba(248, 247, 243, .58);
        backdrop-filter: blur(5px);
    }

    .intro-section {
        margin: 58px auto 70px;
        padding: 0 24px;

        text-align: left;
    }

    .intro-kicker,
    .philosophy-kicker {
        display: block;
        margin-bottom: 18px;

        font-size: .78rem;
        letter-spacing: .14em;
    }

    .intro-section h2 {
        margin-bottom: 22px;

        font-size: clamp(2rem, 8vw, 2.55rem);
        line-height: 1.08;
    }

    .intro-lead {
        font-size: 1.08rem;
        line-height: 1.6;
    }

    .services-section {
        margin-top: 95px;
        bottom: auto;
        padding: 0 var(--content-padding);
    }

    .services-heading {
        margin-bottom: 32px;
        text-align: left;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-card {
        padding: 28px 24px;
    }

    .service-card h3 {
        font-size: 1.65rem;
    }

    .education-section {
        padding: 64px var(--content-padding);
    }

    .education-container {
        text-align: left;
    }

    .education-container h2 {
        font-size: 2rem;
    }

    .education-lead {
        margin-bottom: 32px;
    }

    .education-audiences {
        grid-template-columns: 1fr;
        gap: 18px;

        margin-bottom: 32px;
    }

    .education-card {
        padding: 28px 24px;
    }

    .philosophy-section {
        margin: 64px auto;
        padding: 0 20px;
    }

    .philosophy-container {
        text-align: left;
    }

    .philosophy-section h2 {
        font-size: 2.1rem;
        line-height: 1.06;
    }

    .philosophy-values {
        grid-template-columns: 1fr;
        gap: 16px;

        margin-top: 34px;
    }

    .value-card {
        padding: 28px 24px;
    }

    .footer {
        margin-top: 24px;
    }

    .footer-content {
        padding: 30px 20px;

        flex-direction: column;
        align-items: flex-start;

        text-align: left;
    }

    .footer-nav {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}


/* ==========================================================
   13 SMALL SMARTPHONES
   ========================================================== */

@media (max-width: 420px) {
    .hero-section {
        height: 680px;
        min-height: 680px;
    }

    .hero-content {
        top: 38px;
        left: 18px;
        right: 18px;
    }

    .hero-content h1 {
        font-size: 2.3rem;
    }

    .hero-content p {
        max-width: 280px;
        font-size: .98rem;
    }

    .contact-box {
        margin-top: -52px;
        padding: 28px 24px;
    }

    .intro-section {
        padding: 0 20px;
    }

    .contact-btn {
        gap: 10px;
        font-size: .95rem;
    }

    .contact-btn i {
        width: 36px;
        height: 36px;
    }
}

/* ==========================================================
   KONTAKTBOX – SCHMALE SMARTPHONES
   ========================================================== */

@media (max-width: 600px) {

    .contact-wrapper {
        padding: 0 18px;
    }

    .contact-box {
        width: 100%;
        max-width: 540px;

        margin: -58px auto 0;
        padding: 30px 28px;

        flex-direction: column;
        gap: 26px;

        border-radius: 18px;
    }

    .contact-person strong {
        font-size: 1.65rem;
    }

    .contact-person span {
        font-size: .95rem;
    }

    .contact-right {
        width: 100%;
        min-width: 0;
        gap: 18px;
    }

    .contact-btn {
        gap: 12px;
        font-size: 1rem;
    }

    .contact-btn i {
        width: 38px;
        height: 38px;
    }
}

/* ==========================================================
   LEGAL PAGES
   ========================================================== */

.legal-section {
    padding: 110px var(--content-padding) 90px;
}

.legal-section h2::before {
    display: none;
    content: none;
}

.legal-container {
    max-width: 900px;
    margin: 0 auto;
}

.legal-header {
    margin-bottom: 52px;
}

.legal-header h1 {
    margin: 0;

    font-size: clamp(2.8rem, 6vw, 4.8rem);
    line-height: 1.02;
    font-weight: 600;
    letter-spacing: -.025em;

    color: var(--color-text);
}

.legal-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text-soft);
}

.legal-content h2 {
    margin: 46px 0 16px;

    font-size: 1.55rem;
    line-height: 1.25;

    color: var(--color-text);
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content p {
    margin: 0 0 18px;
}

.legal-content strong {
    color: var(--color-text);
}

.legal-content a {
    color: var(--color-surface);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.legal-content a:hover,
.legal-content a:focus-visible {
    color: var(--color-text);
}

@media (max-width: 768px) {
    .legal-section {
        padding: 72px 20px 60px;
    }

    .legal-header {
        margin-bottom: 36px;
    }

    .legal-content {
        font-size: 1rem;
        line-height: 1.7;
    }

    .legal-content h2 {
        margin-top: 36px;
        font-size: 1.35rem;
    }
}

/* ==========================================================
   14 SMARTPHONE PORTRAIT – HERO FOCUS
   ========================================================== */

@media (max-width: 600px) and (orientation: portrait) {
    /*
     * Move the portrait farther to the right so the heading remains
     * on the light background instead of covering the face.
     */
    .hero-image {
        object-position: 78% center;
    }

    .hero-content {
        top: 38px;
        left: 16px;
        right: 16px;
    }

    .hero-content h1 {
        max-width: 290px;
        font-size: clamp(2.25rem, 10vw, 2.9rem);
    }

    .hero-content p {
        max-width: 300px;
        font-size: 1rem;
    }

    .hero-cta {
        padding: 12px 22px;
        font-size: 1rem;
    }
}


/* ==========================================================
   15 DARK MODE – CHROME ONLY
   ========================================================== */

/*
 * Quark may expose its dark mode through different selectors,
 * depending on the installed theme version. These selectors keep
 * the website content in the depITpro light palette while allowing
 * navigation, header and footer chrome to remain dark.
 */

:is(
    html.dark,
    body.dark,
    html.dark-mode,
    body.dark-mode,
    html[data-theme="dark"],
    body[data-theme="dark"]
) body,
:is(
    html.dark,
    body.dark,
    html.dark-mode,
    body.dark-mode,
    html[data-theme="dark"],
    body[data-theme="dark"]
) #body-wrapper {
    color: var(--color-text);
    background: var(--color-bg);
}

:is(
    html.dark,
    body.dark,
    html.dark-mode,
    body.dark-mode,
    html[data-theme="dark"],
    body[data-theme="dark"]
) :is(
    .main-content,
    .hero-section,
    .contact-section,
    .more-content,
    .more-content-inner,
    .intro-section,
    .services-section,
    .education-section,
    .philosophy-section
) {
    color: var(--color-text);
    background-color: var(--color-bg);
}

:is(
    html.dark,
    body.dark,
    html.dark-mode,
    body.dark-mode,
    html[data-theme="dark"],
    body[data-theme="dark"]
) :is(
    .hero-content h1,
    .intro-section h2,
    .services-heading h2,
    .service-card h3,
    .education-container h2,
    .education-card h3,
    .philosophy-section h2,
    .value-card h3
) {
    color: var(--color-text);
}

:is(
    html.dark,
    body.dark,
    html.dark-mode,
    body.dark-mode,
    html[data-theme="dark"],
    body[data-theme="dark"]
) :is(
    .hero-content p,
    .intro-lead,
    .service-card > p,
    .education-lead,
    .education-card li,
    .philosophy-lead,
    .philosophy-container p,
    .value-card p
) {
    color: var(--color-text-soft);
}

:is(
    html.dark,
    body.dark,
    html.dark-mode,
    body.dark-mode,
    html[data-theme="dark"],
    body[data-theme="dark"]
) :is(
    .service-card,
    .education-card,
    .value-card
) {
    color: var(--color-text);
    background: var(--color-white);
}

:is(
    html.dark,
    body.dark,
    html.dark-mode,
    body.dark-mode,
    html[data-theme="dark"],
    body[data-theme="dark"]
) .service-products > div,
:is(
    html.dark,
    body.dark,
    html.dark-mode,
    body.dark-mode,
    html[data-theme="dark"],
    body[data-theme="dark"]
) .service-product {
    color: var(--color-text);
    background: var(--color-bg);
}

/* Footer intentionally remains part of the dark interface chrome. */
:is(
    html.dark,
    body.dark,
    html.dark-mode,
    body.dark-mode,
    html[data-theme="dark"],
    body[data-theme="dark"]
) .footer {
    color: var(--color-white);
    background: #3f3e3b;
    border-top-color: rgba(255, 255, 255, .14);
}

:is(
    html.dark,
    body.dark,
    html.dark-mode,
    body.dark-mode,
    html[data-theme="dark"],
    body[data-theme="dark"]
) :is(
    .footer-brand,
    .footer-copy,
    .footer-nav a
) {
    color: rgba(255, 255, 255, .84);
}

:is(
    html.dark,
    body.dark,
    html.dark-mode,
    body.dark-mode,
    html[data-theme="dark"],
    body[data-theme="dark"]
) .footer-nav a:hover,
:is(
    html.dark,
    body.dark,
    html.dark-mode,
    body.dark-mode,
    html[data-theme="dark"],
    body[data-theme="dark"]
) .footer-nav a:focus-visible {
    color: var(--color-white);
}



/* ==========================================================
   16 DARK MODE – LEGAL PAGES
   ========================================================== */

:is(
    html.dark,
    body.dark,
    html.dark-mode,
    body.dark-mode,
    html[data-theme="dark"],
    body[data-theme="dark"]
) .legal-section {
    background: var(--color-bg);
    color: var(--color-text);
}

:is(
    html.dark,
    body.dark,
    html.dark-mode,
    body.dark-mode,
    html[data-theme="dark"],
    body[data-theme="dark"]
) .legal-content {
    color: var(--color-text-soft);
}

:is(
    html.dark,
    body.dark,
    html.dark-mode,
    body.dark-mode,
    html[data-theme="dark"],
    body[data-theme="dark"]
) .legal-content :is(h1,h2,h3,h4,strong) {
    color: var(--color-text);
}

:is(
    html.dark,
    body.dark,
    html.dark-mode,
    body.dark-mode,
    html[data-theme="dark"],
    body[data-theme="dark"]
) .legal-content :is(p,li) {
    color: var(--color-text-soft);
}

:is(
    html.dark,
    body.dark,
    html.dark-mode,
    body.dark-mode,
    html[data-theme="dark"],
    body[data-theme="dark"]
) .legal-content a {
    color: var(--color-surface-dark);
}

/* ==========================================================
   17 PORTRAIT – COMPACT HERO
   ========================================================== */

/* Smartphones */
@media (max-width: 600px) and (orientation: portrait) {
    .hero-section {
        height: 78vh;
        min-height: 620px;
        max-height: 760px;
    }

    /* Person stärker in Richtung Bildmitte verschieben */
    .hero-image {
        /* Person weiter nach LINKS, damit der Kopf vollständig sichtbar ist */
        object-position: 54% center;
    }

    /* Zur ursprünglichen Höhe zurück */
    .hero-content {
        top: 95px;
        bottom: auto;
        left: 14px;
        right: auto;
        max-width: 255px;
    }

    .hero-content h1 {
        margin-bottom: 18px;
        font-size: clamp(1.90rem, 8.2vw, 2.35rem);
        line-height: .96;
    }

    .hero-content p {
        max-width: 255px;
        margin-bottom: 22px;
        font-size: .98rem;
        line-height: 1.42;
    }

    .hero-cta {
        width: auto;
        max-width: 100%;
        padding: 12px 22px;
        font-size: 1rem;
    }
}

/* Breite Smartphones und Tablets im Hochformat */
@media (min-width: 601px) and (max-width: 900px) and (orientation: portrait) {
    .hero-section {
        height: 78vh;
        min-height: 680px;
        max-height: 820px;
    }

    .hero-image {
        object-position: 60% center;
    }

    .hero-content {
        top: auto;
        top: 95px;
        bottom: auto;
        left: 24px;
        right: auto;
        max-width: 330px;
    }

    .hero-content h1 {
        margin-bottom: 20px;
        font-size: clamp(2.2rem, 5.8vw, 3rem);
        line-height: .96;
    }

    .hero-content p {
        margin-bottom: 24px;
        font-size: 1.08rem;
        line-height: 1.45;
    }

    .hero-cta {
        width: auto;
        max-width: 100%;
    }
}

/* ==========================================================
   18 PORTRAIT – SUBTITLE AND CONTACT POSITION
   ========================================================== */

/*
 * Bis einschließlich 900 px bleibt der Inhalt im Grav-Editor unverändert,
 * wird aber optisch nach „Ihr Partner für“ umgebrochen.
 */
@media (max-width: 900px) and (orientation: portrait) {
    .hero-content p {
        width: 15.5ch;
        max-width: 15.5ch;
    }
}

/* Ab dieser Breite darf der Untertitel wieder einzeilig erscheinen. */
@media (min-width: 901px) {
    .hero-content p {
        width: auto;
        max-width: none;
        white-space: nowrap;
    }
}

/* Auf schmalen Smartphones die Kontaktbox etwas höher in den Hero ziehen. */
@media (max-width: 600px) and (orientation: portrait) {
    .contact-box {
        margin-top: -96px;
    }
}

/* ==========================================================
   19 PORTRAIT – HERO FINAL TUNING
   ========================================================== */

/* Bis 900px den Untertitel gezielt nach "für" umbrechen */
@media (max-width:900px) and (orientation:portrait) {
    .hero-content p{
        display:block;
        max-width:13.5ch;
        width:13.5ch;
        white-space:normal;
        overflow-wrap:normal;
        word-break:keep-all;
        hyphens:none;
    }
}

/* Kontaktkarte höher platzieren, damit sie vollständig sichtbar bleibt */
@media (max-width:900px) and (orientation:portrait){
    .contact-card,
    .contact-box{
        margin-top:-150px !important;
    }
}

