/*
Theme Name: Mate Portal
Theme URI: https://mate.build/
Author: Mate
Description: Reduziertes schwarzes Projektportal für CouchMate und VoyaMate.
Version: 1.2.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: mate-portal
*/

:root {
    color-scheme: dark;
    --mate-bg: #000;
    --mate-panel: rgba(15, 17, 18, 0.82);
    --mate-panel-solid: #111314;
    --mate-line: rgba(255, 255, 255, 0.12);
    --mate-line-strong: rgba(255, 255, 255, 0.22);
    --mate-text: #f5f7f7;
    --mate-muted: #a8b0b0;
    --mate-accent: #39c2b8;
    --mate-accent-soft: rgba(57, 194, 184, 0.14);
    --mate-danger: #ff8d8d;
    --mate-radius: 24px;
    --mate-max: 920px;
    --mate-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
}

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

html {
    background: var(--mate-bg);
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;
    background: var(--mate-bg);
    color: var(--mate-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 17px;
    line-height: 1.68;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--mate-accent);
    text-underline-offset: 0.2em;
}

a:hover {
    color: #74ddd6;
}

button,
input {
    font: inherit;
}

img {
    max-width: 100%;
}

:focus-visible {
    outline: 2px solid var(--mate-accent);
    outline-offset: 4px;
}

.screen-reader-text,
.skip-link:not(:focus) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link:focus {
    position: fixed;
    z-index: 10000;
    top: 1rem;
    left: 1rem;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: var(--mate-text);
    color: #000;
}

.mate-header {
    position: fixed;
    z-index: 1000;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    justify-content: center;
    padding: max(18px, env(safe-area-inset-top)) 20px 0;
    pointer-events: none;
}

.mate-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px;
    border: 1px solid var(--mate-line);
    border-radius: 999px;
    background: rgba(8, 9, 10, 0.76);
    box-shadow: 0 12px 44px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(22px) saturate(130%);
    -webkit-backdrop-filter: blur(22px) saturate(130%);
    pointer-events: auto;
}

.mate-home-link,
.mate-nav-link,
.mate-project summary {
    min-height: 42px;
    border-radius: 999px;
    color: var(--mate-muted);
    font-size: 0.84rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    line-height: 42px;
    text-decoration: none;
    white-space: nowrap;
}

.mate-home-link,
.mate-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
}

.mate-home-link {
    width: 42px;
    padding: 0;
    color: var(--mate-accent);
    font-size: 1.05rem;
}

.mate-language-link {
    min-width: 40px;
    padding-right: 10px;
    padding-left: 10px;
    color: var(--mate-accent);
}

.mate-home-link svg {
    display: block;
    width: 18px;
    height: 18px;
}

.mate-home-link:hover,
.mate-nav-link:hover,
.mate-project summary:hover,
.mate-project[open] summary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--mate-text);
}

.mate-home-link:hover {
    color: #73ddd5;
}

.mate-project {
    position: relative;
}

.mate-project summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 15px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.mate-project summary::-webkit-details-marker {
    display: none;
}

.mate-project summary::after {
    width: 5px;
    height: 5px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    content: "";
    transform: rotate(45deg) translateY(-2px);
    transition: transform 160ms ease;
}

.mate-project[open] summary::after {
    transform: rotate(225deg) translate(-1px, -1px);
}

.mate-project-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    display: grid;
    width: 218px;
    padding: 8px;
    border: 1px solid var(--mate-line);
    border-radius: 18px;
    background: rgba(15, 17, 18, 0.96);
    box-shadow: var(--mate-shadow);
    transform: translateX(-50%);
}

.mate-project-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    color: var(--mate-muted);
    font-size: 0.88rem;
    text-decoration: none;
}

.mate-project-menu a::after {
    color: rgba(255, 255, 255, 0.34);
    content: "\2197";
}

.mate-project-menu a:hover {
    background: var(--mate-accent-soft);
    color: var(--mate-text);
}

.mate-home-main {
    position: relative;
    width: 100%;
    height: 100svh;
    min-height: 520px;
    overflow: hidden;
    background: #000;
}

.mate-home-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    user-select: none;
    -webkit-user-drag: none;
}

.mate-page-main {
    min-height: 100svh;
    padding: 138px 24px 90px;
}

.mate-content {
    width: min(100%, var(--mate-max));
    margin: 0 auto;
}

.mate-eyebrow {
    margin: 0 0 10px;
    color: var(--mate-accent);
    font-size: 0.76rem;
    font-weight: 750;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.mate-content h1 {
    max-width: 820px;
    margin: 0 0 22px;
    font-size: clamp(2.4rem, 6vw, 5.4rem);
    font-weight: 720;
    letter-spacing: -0.055em;
    line-height: 0.98;
}

.mate-lead {
    max-width: 760px;
    margin: 0 0 54px;
    color: #c5cbcb;
    font-size: clamp(1.12rem, 2.3vw, 1.42rem);
    line-height: 1.55;
}

.mate-section {
    margin: 34px 0;
    padding: clamp(24px, 5vw, 46px);
    border: 1px solid var(--mate-line);
    border-radius: var(--mate-radius);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
}

.mate-section h2,
.mate-section h3 {
    margin-top: 0;
    letter-spacing: -0.025em;
    line-height: 1.18;
}

.mate-section h2 {
    margin-bottom: 20px;
    font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.mate-section h3 {
    margin: 30px 0 9px;
    font-size: 1.12rem;
}

.mate-section p:last-child,
.mate-section ul:last-child,
.mate-section ol:last-child {
    margin-bottom: 0;
}

.mate-section p,
.mate-section li {
    color: #c2c8c8;
}

.mate-section strong {
    color: var(--mate-text);
}

.mate-section ul,
.mate-section ol {
    padding-left: 1.25rem;
}

.mate-callout {
    border-color: rgba(57, 194, 184, 0.35);
    background: linear-gradient(145deg, rgba(57, 194, 184, 0.12), rgba(57, 194, 184, 0.035));
}

.mate-contact-link {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    margin-top: 10px;
    padding: 0 20px;
    border-radius: 999px;
    background: var(--mate-accent);
    color: #001513;
    font-weight: 760;
    text-decoration: none;
}

.mate-contact-link:hover {
    background: #73ddd5;
    color: #001513;
}

.mate-project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 40px;
}

.mate-project-card {
    min-height: 240px;
    padding: 30px;
    border: 1px solid var(--mate-line);
    border-radius: var(--mate-radius);
    background: rgba(255, 255, 255, 0.035);
    color: var(--mate-text);
    text-decoration: none;
    transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.mate-project-card:hover {
    border-color: rgba(57, 194, 184, 0.55);
    background: var(--mate-accent-soft);
    color: var(--mate-text);
    transform: translateY(-3px);
}

.mate-project-card span {
    display: block;
    margin-bottom: 70px;
    color: var(--mate-accent);
    font-size: 0.75rem;
    font-weight: 750;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.mate-project-card strong {
    display: block;
    font-size: 1.6rem;
    letter-spacing: -0.03em;
}

.mate-project-card small {
    color: var(--mate-muted);
}

.mate-pairing-intro {
    scroll-margin-top: 110px;
    border-color: rgba(57, 194, 184, 0.35);
    background: linear-gradient(145deg, rgba(57, 194, 184, 0.11), rgba(255, 255, 255, 0.02));
}

.mate-pairing-title {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 22px;
    align-items: center;
}

.mate-pairing-title img {
    width: 86px;
    height: auto;
    filter: drop-shadow(0 12px 28px rgba(57, 194, 184, 0.25));
}

.mate-pairing-title .mate-eyebrow {
    margin-bottom: 7px;
}

.mate-pairing-title h2 {
    margin-bottom: 10px;
}

.mate-pairing-intro > h3 {
    margin-top: 38px;
}

.mate-pairing-requirements {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.mate-pairing-requirements article {
    padding: 20px;
    border: 1px solid var(--mate-line);
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.2);
}

.mate-pairing-requirements article > span,
.mate-pairing-copy > span {
    color: var(--mate-accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.11em;
}

.mate-pairing-requirements article > strong {
    display: block;
    margin-top: 12px;
    font-size: 1.05rem;
}

.mate-pairing-requirements p {
    margin: 7px 0 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.mate-resource-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 15px;
    font-size: 0.88rem;
    font-weight: 750;
    text-decoration: none;
}

.mate-pairing-steps {
    display: grid;
    gap: 24px;
    margin: 30px 0 0;
    padding: 0 !important;
    list-style: none;
}

.mate-pairing-step {
    display: grid;
    grid-template-columns: minmax(200px, 0.42fr) minmax(0, 1fr);
    gap: 26px;
    align-items: center;
    padding: 22px;
    border: 1px solid var(--mate-line);
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.22);
}

.mate-pairing-copy h3 {
    margin: 11px 0 0;
}

.mate-pairing-copy p {
    margin: 9px 0 0;
    font-size: 0.94rem;
    line-height: 1.55;
}

.mate-pairing-screenshot {
    display: block;
    overflow: hidden;
    border: 1px solid var(--mate-line);
    border-radius: 15px;
    background: #050708;
}

.mate-pairing-screenshot img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 180ms ease;
}

.mate-pairing-screenshot:hover img {
    transform: scale(1.012);
}

.mate-pairing-screenshot.is-portrait {
    width: min(100%, 430px);
    justify-self: center;
}

.mate-pairing-note {
    margin-top: 26px;
    padding: 20px;
    border: 1px solid rgba(57, 194, 184, 0.35);
    border-radius: 16px;
    background: var(--mate-accent-soft);
}

.mate-pairing-note > strong {
    color: var(--mate-accent);
}

.mate-pairing-note p {
    margin: 5px 0 0;
}

.mate-faq {
    border-top: 1px solid var(--mate-line);
}

.mate-faq details {
    border-bottom: 1px solid var(--mate-line);
}

.mate-faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 0;
    color: var(--mate-text);
    font-weight: 680;
    cursor: pointer;
    list-style: none;
}

.mate-faq summary::-webkit-details-marker {
    display: none;
}

.mate-faq summary::after {
    color: var(--mate-accent);
    content: "+";
    font-size: 1.35rem;
    font-weight: 400;
}

.mate-faq details[open] summary::after {
    content: "\2212";
}

.mate-faq details > div {
    padding: 0 0 22px;
    color: #c2c8c8;
}

.mate-placeholder {
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(255, 141, 141, 0.14);
    color: var(--mate-danger);
}

.mate-footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    width: min(calc(100% - 48px), var(--mate-max));
    margin: 0 auto;
    padding: 32px 0 max(42px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--mate-line);
    color: var(--mate-muted);
    font-size: 0.8rem;
}

.mate-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
}

.mate-footer a,
.mate-cookie-link {
    color: var(--mate-muted);
    text-decoration: none;
}

.mate-footer a:hover,
.mate-cookie-link:hover {
    color: var(--mate-text);
}

.mate-cookie-link {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.mate-cookie-reopen {
    position: fixed;
    z-index: 880;
    right: max(18px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--mate-line);
    border-radius: 50%;
    background: rgba(12, 14, 15, 0.74);
    color: var(--mate-muted);
    cursor: pointer;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.mate-cookie-reopen:hover {
    border-color: var(--mate-line-strong);
    color: var(--mate-text);
}

.mate-cookie-banner[hidden],
.mate-consent-modal[hidden] {
    display: none;
}

.mate-cookie-banner {
    position: fixed;
    z-index: 1200;
    right: 20px;
    bottom: max(20px, env(safe-area-inset-bottom));
    left: 20px;
    width: min(calc(100% - 40px), 700px);
    margin: 0 auto;
    padding: 22px;
    border: 1px solid var(--mate-line-strong);
    border-radius: 22px;
    background: rgba(17, 19, 20, 0.96);
    box-shadow: var(--mate-shadow);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.mate-cookie-banner h2,
.mate-consent-card h2 {
    margin: 0 0 7px;
    font-size: 1.18rem;
    letter-spacing: -0.02em;
}

.mate-cookie-banner p,
.mate-consent-card p {
    margin: 0;
    color: var(--mate-muted);
    font-size: 0.86rem;
    line-height: 1.55;
}

.mate-cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.mate-button {
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid var(--mate-line-strong);
    border-radius: 999px;
    background: transparent;
    color: var(--mate-text);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.mate-button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.mate-button-primary {
    border-color: var(--mate-accent);
    background: var(--mate-accent);
    color: #001513;
}

.mate-button-primary:hover {
    background: #73ddd5;
}

.mate-consent-modal {
    position: fixed;
    z-index: 1300;
    inset: 0;
    display: grid;
    padding: 20px;
    place-items: center;
    background: rgba(0, 0, 0, 0.76);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.mate-consent-card {
    width: min(100%, 560px);
    padding: 28px;
    border: 1px solid var(--mate-line-strong);
    border-radius: 24px;
    background: var(--mate-panel-solid);
    box-shadow: var(--mate-shadow);
}

.mate-consent-option {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--mate-line);
}

.mate-consent-option strong,
.mate-consent-option small {
    display: block;
}

.mate-consent-option small {
    margin-top: 3px;
    color: var(--mate-muted);
    font-size: 0.78rem;
    line-height: 1.4;
}

.mate-switch {
    width: 46px;
    height: 26px;
    flex: 0 0 auto;
    accent-color: var(--mate-accent);
}

@media (max-width: 720px) {
    .mate-header {
        padding-right: 4px;
        padding-left: 4px;
    }

    .mate-nav {
        max-width: calc(100vw - 8px);
        gap: 1px;
        padding: 3px;
    }

    .mate-home-link,
    .mate-project summary,
    .mate-nav-link {
        padding-right: 11px;
        padding-left: 11px;
        font-size: 0.77rem;
    }

    .mate-home-link {
        width: 40px;
        padding: 0;
    }

    .mate-nav-link {
        display: inline-flex;
    }

    .mate-project-menu {
        position: fixed;
        top: 78px;
        right: 12px;
        left: 12px;
        width: auto;
        transform: none;
    }

    .mate-home-link,
    .mate-project summary,
    .mate-nav-link {
        min-height: 40px;
        padding-right: 6px;
        padding-left: 6px;
        font-size: 0.65rem;
        line-height: 40px;
    }

    .mate-home-link {
        width: 32px;
        padding: 0;
    }

    .mate-language-link {
        width: 28px;
        min-width: 28px;
        padding: 0;
    }

    .mate-home-main {
        min-height: 480px;
    }

    .mate-page-main {
        padding: 118px 18px 68px;
    }

    .mate-content h1 {
        font-size: clamp(2.45rem, 14vw, 4rem);
    }

    .mate-section {
        margin: 20px 0;
        border-radius: 20px;
    }

    .mate-project-grid {
        grid-template-columns: 1fr;
    }

    .mate-pairing-title,
    .mate-pairing-step {
        grid-template-columns: 1fr;
    }

    .mate-pairing-title img {
        width: 70px;
    }

    .mate-pairing-requirements {
        grid-template-columns: 1fr;
    }

    .mate-footer {
        display: grid;
        width: calc(100% - 36px);
    }

    .mate-cookie-banner {
        right: 10px;
        bottom: max(10px, env(safe-area-inset-bottom));
        left: 10px;
        width: auto;
    }

    .mate-cookie-actions,
    .mate-cookie-actions .mate-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
