.glass-panel {
    background: rgba(15, 15, 15, 0.7);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.inner-glow {
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
}

.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.segmented-control-bg {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #333;
}

::-webkit-scrollbar-thumb:hover {
    background: #dc2626;
}

.btn-primary {
    @apply bg-primary-container text-on-primary-container hover:opacity-90 transition-all duration-300;
}

.red-accent-border {
    border-bottom: 2px solid #dc2626;
}

header,
header * {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

/* Personal-brand additions */
.personal-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.7rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    color: rgba(255, 255, 255, 0.78);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}


html {
    scroll-behavior: smooth;
}

/* Waveform portfolio */
.portfolio-tabs {
    display: inline-flex;
    gap: 0.35rem;
    padding: 0.35rem;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 999px;
    background: #171717;
}

.portfolio-tab {
    min-width: 120px;
    padding: .8rem 1.4rem;
    border-radius: 999px;
    color: rgba(255, 255, 255, .5);
    font-family: "JetBrains Mono", monospace;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    transition: background 220ms ease, color 220ms ease, transform 220ms ease;
}

.portfolio-tab:hover {
    color: white;
}

.portfolio-tab.is-active {
    color: white;
    background: #dc2626;
    box-shadow: 0 10px 30px rgba(220, 38, 38, .2);
}

.portfolio-list {
    display: none;
}

.portfolio-list.is-active {
    display: grid;
    gap: 1rem;
}

.audio-project {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    height: 150px;
    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, .075);
    border-radius: 1rem;
    background: rgba(17, 17, 17, .94);

    transition:
        transform .35s ease,
        border-color .35s ease,
        background .35s ease,
        box-shadow .35s ease;
}

.audio-project:hover {
    transform: translateY(-2px);
    border-color: rgba(220,38,38,.55);
    background: #151515;
    box-shadow: 0 12px 28px rgba(220,38,38,.08);
}

.project-cover {
    display: block;
    width: 150px;
    height: 150px;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
}

.project-main {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    min-width: 0;
    height: 150px;
    padding: .65rem .9rem;
}

.project-role{
    color:#dc2626;
    font-family:"JetBrains Mono",monospace;
    font-size:.68rem;
    font-weight:700;
    letter-spacing:.12em;
    text-transform:uppercase;
    white-space:nowrap;
    flex-shrink: 0;
}

.project-role-row {
    display: flex;
    align-items: center;
    gap: 1.2rem;   /* Hier Abstand einstellen */
    margin-bottom: .2rem;
}

.project-note {
    margin: 0;
    color: rgba(255,255,255,.45);
    font-size: .6rem;
    line-height: 1.2;
}

.project-topline,
.project-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-width: 0;
}

.waveform-shell {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    align-self: center;
    gap: .5rem;
    min-height: 0;
    margin: 0;
}

.project-play {
    width: 28px;
    height: 28px;
}

.project-topline h3 {
    font-size: .9rem;
}

.project-duration,
.project-footer > span {
    font-size: .6rem;
}

.comparison-btn {
    padding: .28rem .62rem;
    font-size: .55rem;
}

.comparison-btn.is-active {
    color: white;
    background: #dc2626;
}

.audio-project.is-loading .waveform {
    opacity: .45;
}

.audio-project.has-audio-error .waveform::after {
    content: "Audio file missing — add the MP3 path in index.html";
    display: block;
    padding: 1rem;
    color: rgba(255, 255, 255, .35);
    font-family: "JetBrains Mono", monospace;
    font-size: .65rem;
    text-align: center;
}

@media (max-width: 720px) {
    .portfolio-tabs {
        width: 100%;
    }

    .portfolio-tab {
        min-width: 0;
        flex: 1;
        padding-inline: .6rem;
    }

    .audio-project {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .project-main {
        padding: .9rem;
    }

    .project-topline {
        align-items: flex-start;
    }

    .project-duration {
        display: none;
    }

    .project-topline h3 {
        font-size: .95rem;
    }

    .project-footer>span {
        display: none;
    }

    .project-footer {
        justify-content: flex-end;
    }

    .waveform-shell {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: .55rem;
    }

    .project-play {
        width: 34px;
        height: 34px;
    }
}

.service-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.service-bg {
    opacity: .50;
    filter: brightness(.45) saturate(.8);
    transition: opacity .45s ease, filter .45s ease, transform .45s ease;
}

.service-overlay {
    z-index: 1;
    background: linear-gradient(145deg, rgba(0, 0, 0, .74), rgba(0, 0, 0, .58) 45%, rgba(0, 0, 0, .82));
    transition: background .45s ease;
}

.service-card>.relative {
    z-index: 2;
}

.service-card:hover .service-bg {
    opacity: .70;
    filter: brightness(.9) saturate(1);
    transform: scale(1.05);
}

.service-card:hover .service-overlay {
    background: linear-gradient(145deg, rgba(0, 0, 0, .46), rgba(0, 0, 0, .30) 45%, rgba(0, 0, 0, .60));
}

/* Clickable service cards */
.service-card:focus-visible {
    outline: 2px solid #dc2626;
    outline-offset: 4px;
}

.service-icon {
    display: block;
    width: 3rem;
    height: 3rem;
    margin-bottom: 2rem;

    background-color: #e3e3e3;

    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;

    -webkit-mask-position: center;
    mask-position: center;

    -webkit-mask-size: contain;
    mask-size: contain;

    transition:
        background-color .3s ease,
        transform .3s ease;
}

.service-card:hover .service-icon {
    background-color: #d42424;
    transform: scale(1.1);
}

.icon-mixing {
    -webkit-mask-image: url("../icons/graphic_eq.svg");
    mask-image: url("../icons/graphic_eq.svg");
}

.icon-mastering {
    -webkit-mask-image: url("../icons/equalizer.svg");
    mask-image: url("../icons/equalizer.svg");
}

.icon-production {
    -webkit-mask-image: url("../icons/grid_view.svg");
    mask-image: url("../icons/grid_view.svg");
}

.icon-guitar {
    -webkit-mask-image: url("../icons/electric_bolt.svg");
    mask-image: url("../icons/electric_bolt.svg");
}

.contact-icon{
    width:3.5rem;
    height:3.5rem;

    display:flex;
    justify-content:center;
    align-items:center;

    border-radius:1rem;

    background:rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.1);

    transition:
        background-color .3s ease,
        border-color .3s ease;
}

.contact-icon span{
    width:1.6rem;
    height:1.6rem;

    display:block;

    background:#dc2626;

    -webkit-mask-repeat:no-repeat;
    mask-repeat:no-repeat;

    -webkit-mask-position:center;
    mask-position:center;

    -webkit-mask-size:contain;
    mask-size:contain;

    transition:
        background-color .3s ease,
        transform .3s ease;
}

.contact-icon:hover{
    background:#dc2626;
    border-color:#dc2626;
}

.contact-icon:hover span{
    background:white;
    transform:scale(1.1);
}

.icon-mail{
    -webkit-mask-image:url("../icons/mail.svg");
    mask-image:url("../icons/mail.svg");
}

.icon-location{
    -webkit-mask-image:url("../icons/location.svg");
    mask-image:url("../icons/location.svg");
}

#serviceSelect {
    font-family: "Geist", sans-serif;
}

#serviceSelect option {
    font-family: "Geist", sans-serif;
}

.select-wrapper{
    position:relative;
}

.select-arrow{
    position:absolute;
    right:20px;
    top:50%;
    transform:translateY(-50%);
    color:#fff;
    pointer-events:none;
    transition:transform .25s ease;
}

img {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}
/* Legal pages */
.legal-page {
    min-height: calc(100vh - 160px);
    padding: 11rem 1rem 7rem;
    background:
        radial-gradient(circle at 85% 8%, rgba(220, 38, 38, .10), transparent 28rem),
        #0e0e0e;
}

.legal-container {
    width: min(100%, 960px);
    margin: 0 auto;
}

.legal-eyebrow {
    margin-bottom: 1.25rem;
    color: #dc2626;
    font-family: "JetBrains Mono", monospace;
    font-size: .75rem;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.legal-title {
    margin-bottom: 1.5rem;
    color: #fff;
    font-family: "Geist", sans-serif;
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 700;
    letter-spacing: -.045em;
    line-height: .98;
}

.legal-intro {
    max-width: 720px;
    margin-bottom: 4rem;
    color: rgba(255, 255, 255, .58);
    font-size: 1.1rem;
    line-height: 1.75;
}

.legal-content {
    display: grid;
    gap: 1rem;
}

.legal-section {
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border: 1px solid rgba(255, 255, 255, .075);
    border-radius: 1rem;
    background: rgba(20, 20, 20, .82);
}

.legal-section h2 {
    margin-bottom: 1rem;
    color: #fff;
    font-family: "Geist", sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
}

.legal-section h3 {
    margin: 1.5rem 0 .5rem;
    color: rgba(255, 255, 255, .9);
    font-size: 1rem;
    font-weight: 600;
}

.legal-section p,
.legal-section li,
.legal-section address {
    color: rgba(255, 255, 255, .62);
    font-style: normal;
    line-height: 1.75;
}

.legal-section ul {
    margin: .75rem 0 0 1.25rem;
    list-style: disc;
}

.legal-section a {
    color: #fff;
    text-decoration-color: #dc2626;
    text-underline-offset: .2em;
}

.legal-placeholder {
    display: inline-block;
    padding: .08rem .35rem;
    border: 1px solid rgba(220, 38, 38, .5);
    border-radius: .25rem;
    color: #ff8c8c;
    background: rgba(220, 38, 38, .08);
}

.legal-back-link {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin-top: 2.5rem;
    color: rgba(255, 255, 255, .7);
    font-family: "JetBrains Mono", monospace;
    font-size: .72rem;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.legal-back-link:hover {
    color: #fff;
}

.legal-language[hidden] {
    display: none;
}

.legal-back-icon{
    width:1.1rem;
    height:1.1rem;
    display:block;

    background:rgba(255,255,255,.7);

    -webkit-mask-image:url("../icons/arrow_back.svg");
    mask-image:url("../icons/arrow_back.svg");

    -webkit-mask-repeat:no-repeat;
    mask-repeat:no-repeat;

    -webkit-mask-position:center;
    mask-position:center;

    -webkit-mask-size:contain;
    mask-size:contain;

    transition:
        background-color .2s ease,
}

.legal-back-link:hover .legal-back-icon{
    background:#fff;
}




/* =========================================
   MOBILE FIXES
   ========================================= */

@media (max-width: 720px) {

    /* Portfolio-Überschrift */
    .portfolio-section h2 {
        max-width: 100%;
        padding-inline: 0;
        font-size: clamp(2.7rem, 13vw, 4.2rem);
        line-height: .95;
        letter-spacing: -.045em;
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
    }

    .portfolio-section > div {
        width: 100%;
        max-width: 100%;
    }

    .portfolio-section {
        overflow-x: hidden;
    }


    /* Portfolio-Tabs bleiben innerhalb des Bildschirms */
    .portfolio-tabs {
        width: 100%;
        max-width: 100%;
    }

    .portfolio-tab {
        min-width: 0;
        flex: 1 1 0;
        padding: .8rem .35rem;
        font-size: .68rem;
        letter-spacing: .12em;
        white-space: nowrap;
    }


    /* Portfolio-Cards dürfen auf Mobile höher werden */
    .audio-project {
        grid-template-columns: 138px minmax(0, 1fr);
        height: auto;
        min-height: 210px;
        align-items: stretch;
    }

    .project-cover {
        width: 138px;
        height: 100%;
        min-height: 210px;
        object-fit: cover;
    }

    .project-main {
        width: 100%;
        min-width: 0;
        height: auto;
        min-height: 210px;
        padding: 1rem .85rem;

        display: grid;
        grid-template-rows: auto 1fr auto;
        gap: .45rem;
    }


    /* Titel darf umbrechen, statt rechts herauszulaufen */
    .project-topline {
        min-width: 0;
        align-items: flex-start;
    }

    .project-topline > div {
        min-width: 0;
        width: 100%;
    }

    .project-topline h3 {
        max-width: 100%;
        font-size: 1rem;
        line-height: 1.3;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .project-topline h3 span {
        display: inline;
    }

    .project-duration {
        display: none;
    }


    /* Wellenform passt sich der verbleibenden Breite an */
    .waveform-shell {
        width: 100%;
        min-width: 0;
        grid-template-columns: 28px minmax(0, 1fr);
        gap: .5rem;
        margin: 0;
    }

    .waveform {
        width: 100%;
        min-width: 0;
        overflow: hidden;
    }


    /* Untere Zeile bleibt innerhalb der Card */
    .project-footer {
        min-width: 0;
        gap: .5rem;
    }

    .project-footer > span {
        display: none;
    }

    .comparison-switch {
        margin-left: auto;
        flex-shrink: 0;
    }

    .comparison-btn {
        padding: .45rem .72rem;
        font-size: .6rem;
        border-radius: .45rem;
    }


    /* Footer darf umbrechen und clippt nicht mehr */
    footer {
        overflow-x: hidden;
    }

    footer .max-w-container-max {
        width: 100%;
        max-width: 100%;
        padding-left: .75rem;
        padding-right: .75rem;
    }

    footer nav,
    footer ul {
        display: flex;
        justify-content: center;   /* statt space-between */
        gap: 1rem;                 /* Abstand zwischen den Links */
        flex-wrap: nowrap;
    }

    footer a {
        white-space: nowrap;
    }
    footer ul a {
        min-width: 0;

        font-size: .4rem;
        letter-spacing: .04em;
        line-height: 1;
        text-align: center;
        white-space: nowrap;
    }
}
/* Custom service dropdown; the native select still supplies Formspree's value. */
#serviceDropdown.is-enhanced #serviceSelect {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    pointer-events: none;
}
#serviceDropdown .service-trigger {
    font-family: "Geist", sans-serif;
    text-align: left;
    padding-right: 3.25rem;
    min-height: 58px;
}
#serviceDropdown .service-trigger:focus-visible,
#serviceDropdown .service-trigger[aria-invalid="true"],
#serviceDropdown.is-open .service-trigger {
    border-color: #dc2626;
    outline: 2px solid rgba(220, 38, 38, .35);
    outline-offset: 2px;
}
#serviceDropdown .select-arrow {
    transform: translateY(-50%) rotate(90deg);
}
#serviceDropdown.is-open .select-arrow {
    transform: translateY(-50%) rotate(0deg);
}
#serviceDropdown .service-options {
    position: absolute;
    z-index: 30;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 8px;
    background: #111;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
    font-family: "Geist", sans-serif;
}
#serviceDropdown .service-options[hidden] { display: none; }
#serviceDropdown .service-option {
    padding: 10px 14px;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    overflow-wrap: anywhere;
}
#serviceDropdown .service-option[aria-selected="true"] { color: #f87171; }
#serviceDropdown .service-option:hover,
#serviceDropdown .service-option.is-active {
    background: rgba(220, 38, 38, .2);
    color: #fff;
    box-shadow: inset 2px 0 #dc2626;
}
@media (prefers-reduced-motion: reduce) {
    #serviceDropdown .select-arrow { transition: none; }
}

/* Contact fields: red hover and focus accents. */
#contact-form input:not([type="hidden"]):hover,
#contact-form textarea:hover,
#contact-form select:hover,
#contact-form .service-trigger:hover {
    border-color: #dc2626;
}
#contact-form input:not([type="hidden"]):focus,
#contact-form textarea:focus,
#contact-form select:focus,
#contact-form .service-trigger:focus {
    border-color: #dc2626;
    outline: 2px solid rgba(220, 38, 38, .35);
    outline-offset: 2px;
    box-shadow: none;
}
