/*
  ================================================================
  style-improvements.css
  Verbesserungen & Fixes für anis.me
  ================================================================

  Änderungen im Überblick:
  1.  BUGFIX  – .contact-form (toter Code) entfernt
  2.  BUGFIX  – .logo transition: all → transition: transform (verhindert
               Konflikt mit der heartBeat-Animation)
  3.  BUGFIX  – .introduction br-Abstand über margin gelöst
  4.  FEATURE – Music Toggle: Play/Pause Badge am Logo
  5.  FEATURE – Music Hint Tooltip
  6.  FEATURE – Pulsierende Ring-Animation wenn Musik spielt
  7.  VISUAL  – Subtiler Shimmer/Glow auf dem ANIS-Titel
  8.  VISUAL  – Sanfterer Hover-Effekt auf dem "say hello"-Button
  9.  VISUAL  – Verbesserte Scrollbar
  10. VISUAL  – Smooth custom cursor dot
  ================================================================
*/


/* ================================================================
   1. BUGFIX: .contact-form war toter Code (wird nicht im HTML 
   verwendet). Hier explizit neutralisiert, damit keine 
   unerwarteten Stile greifen falls die Klasse versehentlich 
   irgendwo erscheint.
   ================================================================ */
.contact-form,
.contact-form input,
.contact-form textarea,
.contact-form button,
.contact-form button:hover {
    all: revert;
}


/* ================================================================
   2. BUGFIX: Logo bleibt RECHTS — nur transition fix.
   transition: all → nur explizite Props (verhindert Konflikt
   mit der heartBeat-Animation die transform: scale() nutzt).
   ================================================================ */
.logo {
    transition: top 1.5s ease, right 1.5s ease, opacity 1.5s ease !important;
    -webkit-transition: top 1.5s ease, right 1.5s ease, opacity 1.5s ease !important;
    cursor: pointer;
    overflow: visible !important;
}

.logo.logo-position-primary,
.logo.logo-position-secondary {
    transition: top 1.5s ease, right 1.5s ease !important;
    -webkit-transition: top 1.5s ease, right 1.5s ease !important;
}


/* ================================================================
   BUGFIX: Graue Fläche beim Laden — Body und Hero-Container
   bekommen einen dunklen Fallback-Hintergrund, damit vor dem
   vollständigen Laden des Bildes nichts Helles durchscheint.
   ================================================================ */
body {
    background: #0a0a0a !important;
}

.hero-fullscreen,
.hero-bg,
.slick-fullscreen-slideshow,
.slick-fullscreen-item {
    background-color: #0a0a0a;
}

/* ================================================================
   BUGFIX: Querformat — Hero füllt nicht die volle Viewport-Höhe.
   Im Landscape-Modus auf Mobile/Tablet ist 100% zu wenig,
   weil die Viewport-Höhe viel kleiner wird.
   Fix: 100dvh (dynamic viewport height) erzwingt echte Vollbild.
   ================================================================ */
@media (orientation: landscape) {
    html, body {
        height: 100dvh !important;
    }

    .upper-page,
    .center-container-home {
        min-height: 100dvh !important;
        height: 100dvh !important;
    }

    .hero-fullscreen {
        height: 100dvh !important;
        position: fixed !important;
    }

    .hero-bg,
    .slick-fullscreen-slideshow {
        height: 100dvh !important;
    }

    /* Slick generierte Wrapper */
    .slick-fullscreen-slideshow .slick-list,
    .slick-fullscreen-slideshow .slick-track,
    .slick-fullscreen-slideshow .slick-slide,
    .slick-fullscreen-slideshow .slick-slide > div,
    .slick-fullscreen-item,
    .slick-fullscreen-img-fill,
    .slick-fullscreen-img-fill picture,
    .slick-fullscreen-img-fill img {
        height: 100dvh !important;
        min-height: 100dvh !important;
    }

    /* Wave Canvas nur auf Mobile Querformat verbergen,
       auf Tablet (≥768px) bleibt er sichtbar */
    #wave {
        display: none !important;
    }
}

/* Tablet Querformat (≥768px): Wave wieder einblenden */
@media (orientation: landscape) and (min-width: 768px) {
    #wave {
        display: block !important;
    }
}


/* ================================================================
   BUGFIX: iOS zoomt beim Tippen auf Input-Felder ein wenn
   font-size < 16px. Gezielt auf alle Formular-Elemente.
   ================================================================ */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="search"],
input[type="password"],
input[type="number"],
textarea,
select,
.contact-modal input,
.contact-modal textarea,
#name, #email, #subject, #message {
    font-size: 16px !important;
    -webkit-text-size-adjust: 100% !important;
    touch-action: manipulation;
}
   Die weißen border-Elemente scheinen durch das Vollbild-
   Hintergrundbild durch und erzeugen einen sichtbaren Streifen.
   ================================================================ */
@media only screen and (max-width: 640px) {
    .the-borders {
        display: none !important;
    }
}


/* ================================================================
   3. BUGFIX: <br/> zwischen h1 und Button entfernt.
   Abstand jetzt per CSS Margin.
   ================================================================ */
.contact-modal-launcher-wrapper.fadeIn-element {
    margin-top: 28px;
}

@media only screen and (max-width: 880px) {
    .contact-modal-launcher-wrapper.fadeIn-element {
        margin-top: 22px;
    }
}

@media only screen and (max-width: 640px) {
    .contact-modal-launcher-wrapper.fadeIn-element {
        margin-top: 18px;
    }
}

/* ================================================================
   3b. BUGFIX: "Say Hello" Button zentrieren auf allen Screens
   + FEATURE: verzögertes Einblenden NACH dem ANIS-Titel

   Timing (aus waye.js):
   - Preloader weg:       ~1000ms
   - .fadeIn-element:     delay(1200) + fadeIn(1200) → sichtbar ab ~3400ms
   - Say Hello Ziel:      ~4200ms (800ms nach ANIS vollständig sichtbar)
   ================================================================ */

/* Initial versteckt — jQuery touchst das nicht mehr (kein fadeIn-element) */
.fadeIn-delayed {
    opacity: 0;
    visibility: hidden;
    width: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 5px !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: center !important;
}

/* Sichtbar-Klasse via JS gesetzt */
.fadeIn-delayed.is-visible {
    visibility: visible;
    animation: sayHelloEnter 1.0s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes sayHelloEnter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ================================================================
   4. FEATURE: Musik-Player Controls — LINKE SEITE
   Symmetrisch zum Logo: gleicher Abstand links wie Logo rechts.

   FARBEN:
   • Mobile Hochformat (portrait ≤640px): WEISS  → Bild als BG
   • Desktop + Tablet + Querformat:       DUNKEL → weißer Rand
   ================================================================ */

.music-player {
    position: fixed;
    top: 40px;
    left: 40px;
    height: 35px;
    display: flex;
    align-items: center;
    gap: 0;
    z-index: 500;
    /* FIXED: kein top-position mehr — eigene initiale Versteck-Logik */
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.music-player.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* ── Buttons ── */
.mp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: transform 0.18s ease, background 0.2s ease, color 0.2s ease,
                opacity 0.2s ease;
}

.mp-btn svg {
    width: 12px;
    height: 12px;
    display: block;
    flex-shrink: 0;
}

.mp-btn:active { transform: scale(0.85); }

/* Play-Button: runder Kreis mit Border */
.mp-btn--play {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    position: relative;
    overflow: hidden;
    margin: 0 4px;
}

.mp-btn--play svg {
    width: 11px;
    height: 11px;
}

/* ── Equalizer Balken im Play-Button ── */
.mp-bars {
    display: none;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    position: absolute;
    inset: 0;
    padding: 7px 8px;
    box-sizing: border-box;
}

.mp-bars.active { display: flex; }

.mp-bars span {
    display: block;
    width: 3px;
    height: 4px;
    border-radius: 2px;
    background: currentColor;
}

.mp-bars.active span { animation: mpBar 1.1s ease-in-out infinite; }
.mp-bars.active span:nth-child(1) { animation-duration: 0.85s; height: 6px;  }
.mp-bars.active span:nth-child(2) { animation-duration: 1.1s;  height: 14px; }
.mp-bars.active span:nth-child(3) { animation-duration: 0.7s;  height: 9px;  }
.mp-bars.active span:nth-child(4) { animation-duration: 1.0s;  height: 12px; }

@keyframes mpBar {
    0%, 100% { transform: scaleY(0.25); }
    50%       { transform: scaleY(1);    }
}

/* ── Responsive ── */
@media only screen and (max-width: 880px) {
    .music-player { top: 30px; left: 15px; height: 30px; }
    .mp-btn        { width: 26px; height: 26px; }
    .mp-btn svg    { width: 10px; height: 10px; }
    .mp-btn--play  { width: 30px; height: 30px; margin: 0 3px; }
    .mp-btn--play svg { width: 10px; height: 10px; }
}

@media only screen and (max-width: 640px) {
    .music-player { top: 28px; left: 15px; }
}

/* ── DESKTOP & QUERFORMAT: DUNKLE Farben (weißer Rand) ── */
@media (min-width: 641px), (orientation: landscape) {
    .mp-btn {
        color: rgba(0, 0, 0, 0.50);
    }
    .mp-btn:hover {
        color: rgba(0, 0, 0, 0.85);
        background: rgba(0, 0, 0, 0.07);
    }
    .mp-btn--play {
        border-color: rgba(0, 0, 0, 0.35);
        color: rgba(0, 0, 0, 0.60);
    }
    .mp-btn--play:hover,
    .mp-btn--play.is-playing {
        color: rgba(0, 0, 0, 0.90);
        border-color: rgba(0, 0, 0, 0.75);
    }
    .logo.is-playing {
        filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.20));
    }
}

/* ── MOBILE HOCHFORMAT: WEISSE Farben (dunkles Bild als BG) ── */
@media (orientation: portrait) and (max-width: 640px) {
    .mp-btn {
        color: rgba(255, 255, 255, 0.65);
    }
    .mp-btn:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.12);
    }
    .mp-btn--play {
        border-color: rgba(255, 255, 255, 0.55);
        color: rgba(255, 255, 255, 0.80);
    }
    .mp-btn--play:hover,
    .mp-btn--play.is-playing {
        color: #fff;
        border-color: rgba(255, 255, 255, 0.95);
    }
    .logo.is-playing {
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.40));
    }
}


/* ================================================================
   5. TOOLTIP + ALTER INDIKATOR — komplett deaktiviert
   ================================================================ */
.music-hint,
.music-indicator { display: none !important; }


/* ================================================================
   6. VISUAL: Subtiler Glow-Shimmer auf dem ANIS-Titel
   ================================================================ */
h1.home-page-title.fadeIn-element {
    text-shadow:
        0 0 40px rgba(255, 255, 255, 0.25),
        0 0 80px rgba(255, 255, 255, 0.10),
        0 2px 4px rgba(0, 0, 0, 0.3);
    animation: titleShimmer 6s ease-in-out infinite;
}

@keyframes titleShimmer {
    0%, 100% {
        text-shadow:
            0 0 40px rgba(255, 255, 255, 0.20),
            0 0 80px rgba(255, 255, 255, 0.08),
            0 2px 4px rgba(0, 0, 0, 0.3);
    }
    50% {
        text-shadow:
            0 0 60px rgba(255, 255, 255, 0.35),
            0 0 120px rgba(255, 255, 255, 0.15),
            0 2px 4px rgba(0, 0, 0, 0.3);
    }
}


/* ================================================================
   8. VISUAL: Verbesserter "say hello" Button
   Sanftere Transformation + subtiles Glow-Effekt beim Hover
   ================================================================ */
.button-link.contact-modal-launcher {
    transition:
        letter-spacing 0.4s ease,
        opacity 0.4s ease,
        transform 0.4s ease !important;
}

.button-link.contact-modal-launcher:hover {
    transform: translateX(4px);
    opacity: 0.85;
}

/* Ion-Arrow sanftere Animation */
.button-link.contact-modal-launcher .ion-android-arrow-dropright {
    display: inline-block;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.button-link.contact-modal-launcher:hover .ion-android-arrow-dropright {
    transform: translateX(5px);
}


/* ================================================================
   9. VISUAL: Scrollbar — auf Mobile komplett verstecken,
   auf Desktop nur beim tatsächlichen Scrollen sichtbar.
   Das graue Aufblitzen beim Laden wird damit verhindert.
   ================================================================ */

/* Mobile: Scrollbar komplett unsichtbar */
@media only screen and (max-width: 880px) {
    ::-webkit-scrollbar {
        width: 0 !important;
        display: none !important;
    }
    html, body {
        scrollbar-width: none !important; /* Firefox */
        -ms-overflow-style: none !important; /* IE/Edge */
    }
}

/* Desktop: sehr schmal, nur beim Hover sichtbar */
@media only screen and (min-width: 881px) {
    ::-webkit-scrollbar {
        width: 3px;
    }
    ::-webkit-scrollbar-track {
        background: transparent;
    }
    ::-webkit-scrollbar-thumb {
        background: transparent; /* initial unsichtbar */
        border-radius: 2px;
        transition: background 0.3s ease;
    }
    body:hover ::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.20);
    }
    ::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.40) !important;
    }
}


/* ================================================================
   10. VISUAL: Custom Cursor Dot
   Subtiler kleiner Cursor-Punkt für eine verfeinerte Optik
   ================================================================ */
@media (pointer: fine) {
    body {
        cursor: none;
    }

    .cursor-dot {
        position: fixed;
        top: 0;
        left: 0;
        width: 8px;
        height: 8px;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 50%;
        pointer-events: none;
        z-index: 99999;
        transform: translate(-50%, -50%);
        transition: transform 0.1s ease, opacity 0.3s ease, width 0.2s ease, height 0.2s ease;
        mix-blend-mode: difference;
    }

    .cursor-dot.hovering {
        width: 20px;
        height: 20px;
        opacity: 0.6;
    }

    /* Fallback: normale Links und Buttons behalten pointer-Cursor */
    a, button, .logo, [role="button"], input, textarea, select {
        cursor: none;
    }
}


/* ================================================================
   BONUS: Sanftere Einblend-Animation für .fadeIn-element
   Die originale Animation wirkt manchmal abrupt — 
   diese Version nutzt eine cubic-bezier für einen edleren Einzug.
   ================================================================ */
.fadeIn-element {
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1) !important;
}


/* ================================================================
   BONUS: Preloader — Text dezent animieren
   ================================================================ */
.preloader-position.loader span {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4) !important;
}
