/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0b0b0b;
    --gold: #b1953e;
    --text-light: #efefef;
    --text-muted: #999;
    --glass-bg: rgba(11, 11, 11, 0.82);
    --glass-border: rgba(177, 149, 62, 0.2);
}

html {
    scroll-behavior: smooth;
    /* iOS Safari: momentum scrolling */
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    /* Prevent overscroll bounce on iOS */
    overscroll-behavior-y: none;
}

h1, h2, h3, h4 {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ===== SVG NOISE FILTER (used by grain overlay) ===== */
.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ===== FIXED VIDEO BACKGROUND ===== */
.video-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    overflow: hidden;
    /* NO transform here — breaks position:fixed on iOS Safari */
}

/* Scanline overlay — opacity driven by JS, spacing set as background-size */
.video-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(
        0deg,
        rgba(177, 149, 62, 0.12) 0px,
        rgba(177, 149, 62, 0.12) 1px,
        transparent 1px
    );
    background-size: 100% var(--scanline-spacing-px, 4px);
    z-index: 2;
    pointer-events: none;
    opacity: var(--scanline-opacity-f, 0.6);
}

#bg-video,
#bg-banner {
    position: absolute;
    top: 40%; left: 50%;
    min-width: 100%; min-height: 100%;
    width: auto; height: auto;
    transform: translate(-50%, -50%) scale(var(--vscale, 1));
    object-fit: cover;
    filter: contrast(1.2) saturate(0.85) brightness(var(--video-brightness-f, 0.6));
    will-change: transform;
}

#bg-banner { display: none; }
#bg-banner.active {
    display: block;
    animation: ken-burns 25s ease-in-out infinite alternate;
}

@keyframes ken-burns {
    0%   { transform: translate(-50%, -50%) scale(1);   }
    50%  { transform: translate(-48%, -52%) scale(1.08); }
    100% { transform: translate(-52%, -48%) scale(1.05); }
}

@keyframes gradient-drift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* CSS-only grain overlay — static texture, no animation for perf */
.grain-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: var(--grain-opacity-f, 0.25);
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

.video-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle at center,
        rgba(11, 11, 11, 0.2) 0%,
        rgba(11, 11, 11, 0.7) 100%);
    pointer-events: none;
    z-index: 3;
}

/* ===== UNMUTE BUTTON ===== */
.unmute-btn {
    position: fixed;
    bottom: 6rem;
    right: 1.5rem;
    z-index: 200;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    background: rgba(11, 11, 11, 0.95);
    color: var(--gold);
    font-size: 1.3rem;
    cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 0 8px rgba(177, 149, 62, 0.3);
    animation: unmute-pulse 2.5s ease-in-out infinite;
}

@keyframes unmute-pulse {
    0%, 100% { box-shadow: 0 0 8px rgba(177, 149, 62, 0.3); }
    50% { box-shadow: 0 0 14px rgba(177, 149, 62, 0.45); }
}

.unmute-btn:hover {
    color: var(--text-light);
    animation: none;
    box-shadow: 0 0 12px rgba(177, 149, 62, 0.5);
}

.unmute-btn.is-playing {
    animation: none;
    box-shadow: 0 0 6px rgba(177, 149, 62, 0.25);
}

.unmute-btn.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    animation: none;
}

/* ===== SCROLL TO TOP ===== */
.scroll-top-btn {
    position: fixed;
    bottom: 6rem;
    right: 1.5rem;
    z-index: 200;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    background: rgba(11, 11, 11, 0.95);
    color: var(--gold);
    font-size: 1.3rem;
    cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
}

.scroll-top-btn.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    color: var(--text-light);
    border-color: var(--gold);
    box-shadow: 0 0 12px rgba(177, 149, 62, 0.3);
}

/* ===== CONTENT LAYER ===== */
.content {
    position: relative;
    z-index: 10;
}

/* ===== NAVIGATION ===== */
.nav {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(11,11,11,0.85) 0%, transparent 100%);
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav.nav-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.nav-left, .nav-right {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color 0.3s ease;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
}

.nav-link:hover { color: var(--gold); }
.nav-link.mobile-only { display: none; }

.nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.artist-name {
    font-size: 1.8rem;
    letter-spacing: 0.08em;
    color: var(--text-light);
}

.nav-right a {
    font-size: 1.1rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

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

/* ===== HERO ===== */
.hero {
    position: relative;
    height: 85vh;
    height: 85dvh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    padding: 0 2rem;
}

.scroll-hint {
    position: absolute;
    bottom: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--gold);
    font-size: 1rem;
    opacity: 0.6;
    animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
    50% { transform: translateX(-50%) translateY(8px); opacity: 0.3; }
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    opacity: 0.9;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

/* ===== SECTIONS ===== */
.section {
    padding: 4rem 1.5rem;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    background: var(--glass-bg);
    /* backdrop-filter only on non-iOS or when not scrolling — removed for perf */
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 3rem 2.5rem;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

/* Enable backdrop blur only on devices that handle it well */
@supports (backdrop-filter: blur(20px)) {
    @media (hover: hover) {
        /* Desktop with hover = likely not mobile Safari */
        .container {
            backdrop-filter: blur(20px) saturate(180%);
            -webkit-backdrop-filter: blur(20px) saturate(180%);
        }
    }
}

.section-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--gold);
}

/* ===== SCROLL REVEAL ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===== MUSIC ===== */
.spotify-player {
    margin-bottom: 2.5rem;
    text-align: center;
}

.spotify-player iframe {
    max-width: 100%;
    border-radius: 12px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.video-item {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
}

.video-item iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

.video-title {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    text-align: center;
    color: var(--text-muted);
}

/* ===== BIO ===== */
.bio-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: start;
}

.bio-image img {
    width: 100%;
    border-radius: 8px;
    filter: grayscale(20%);
    border: 1px solid rgba(177, 149, 62, 0.25);
}

.bio-text {
    font-size: 1.05rem;
    line-height: 1.8;
}

.bio-text p {
    margin-bottom: 1.2rem;
}

/* ===== GIGS ===== */
.gigs-list {
    max-width: 700px;
    margin: 0 auto;
}

.gig-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--glass-border);
    transition: padding-left 0.3s ease;
}

.gig-item:hover {
    padding-left: 8px;
}

.gig-date {
    font-size: 0.85rem;
    color: var(--gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.2rem;
}

.gig-venue {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.gig-location {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.gig-ticket {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: var(--gold);
    color: var(--bg-dark);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.gig-ticket:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(177, 149, 62, 0.5);
}

.past-gigs-wrapper {
    margin-top: 2rem;
    text-align: center;
}

.toggle-past-btn {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s ease, color 0.3s ease;
    margin-bottom: 1.5rem;
    -webkit-tap-highlight-color: transparent;
}

.toggle-past-btn:hover {
    background: var(--gold);
    color: var(--bg-dark);
}

.past-gigs-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.past-gigs-list.expanded { max-height: 2000px; }

.no-gigs {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 1.5rem 0;
}

/* ===== CONTACT ===== */
.contact-wrapper {
    max-width: 500px;
    margin: 0 auto;
}

.contact-intro {
    text-align: center;
    font-size: 1rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: var(--text-light);
    font-size: 16px; /* >= 16px prevents iOS zoom on focus */
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    /* iOS input styling */
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 8px rgba(177, 149, 62, 0.2);
}

.form-group textarea { resize: vertical; }

.submit-btn {
    padding: 0.9rem 2rem;
    background: var(--gold);
    color: var(--bg-dark);
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
}

.submit-btn:hover {
    box-shadow: 0 0 20px rgba(177, 149, 62, 0.5);
    transform: translateY(-1px);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-message {
    text-align: center;
    padding: 0.75rem;
    border-radius: 6px;
    display: none;
    font-size: 0.9rem;
}

.form-message.success {
    display: block;
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.form-message.error {
    display: block;
    background: rgba(244, 67, 54, 0.15);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

/* ===== FOOTER ===== */
.footer {
    padding: 2rem 1.5rem 3rem;
    text-align: center;
}

.footer .container {
    background: rgba(11, 11, 11, 0.88);
    padding: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.social-links a {
    font-size: 1.3rem;
    transition: color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

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

.copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.impressum-link {
    background: transparent;
    border: none;
    color: var(--gold);
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: underline;
    -webkit-tap-highlight-color: transparent;
}

.impressum-link:hover { color: var(--text-light); }

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
}

.modal.active { display: flex; }

.modal-content {
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid rgba(177, 149, 62, 0.3);
    padding: 2.5rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 0.75rem; right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.modal-close:hover { color: var(--gold); }

.modal-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--gold);
}

.modal-content p {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

/* ===== LARGE SCREENS — bigger buttons ===== */
@media (min-width: 769px) {
    .unmute-btn,
    .scroll-top-btn {
        width: 56px;
        height: 56px;
        font-size: 1.4rem;
        bottom: 2.5rem;
        right: 2.5rem;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-link.mobile-only { display: inline; }
    .nav {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .nav-left {
        order: 2;
        width: 100%;
        justify-content: center;
        gap: 1rem;
    }

    .nav-center {
        position: static;
        transform: none;
        order: 1;
        width: 100%;
        text-align: center;
    }

    .nav-right {
        display: none;
    }

    .artist-name { font-size: 1.4rem; }

    .unmute-btn { right: 1rem; }

    .scroll-hint { display: none; }

    .hero {
        height: 85vh;
        height: 85dvh;
    }

    .section { padding: 2rem 1rem; }

    .container { padding: 2rem 1.5rem; }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .bio-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .bio-image img {
        max-height: 350px;
        object-fit: cover;
    }

    .bio-text { font-size: 0.95rem; }

    .video-grid { grid-template-columns: 1fr; }

    .gig-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .nav-link { font-size: 0.7rem; }
    .nav-left { gap: 0.8rem; }
    .hero-subtitle { font-size: 1rem; }
    .container { padding: 1.5rem 1rem; }
    .section-title { font-size: 1.5rem; }
}

/* ===== iOS safe area (notch / home indicator) ===== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .footer {
        padding-bottom: calc(3rem + env(safe-area-inset-bottom));
    }

    .scroll-top-btn,
    .unmute-btn {
        bottom: calc(6rem + env(safe-area-inset-bottom));
    }
}
