/* ==========================================================================
   VisViva - Main Stylesheet
   ==========================================================================
   Contains:
   1. @font-face declarations (local Poppins woff2)
   2. Accessibility styles
   3. All custom styles (extracted from page.html inline <style>)
   ========================================================================== */


/* ==========================================================================
   1. @FONT-FACE DECLARATIONS — Local Poppins (woff2)
   ========================================================================== */

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/poppins/poppins-latin-400-normal.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/poppins/poppins-latin-500-normal.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/poppins/poppins-latin-600-normal.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/poppins/poppins-latin-700-normal.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/poppins/poppins-latin-800-normal.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}


/* ==========================================================================
   2. ACCESSIBILITY
   ========================================================================== */

/* Focus-visible outline for keyboard navigation */
*:focus-visible {
    outline: 2px solid #ffe400;
    outline-offset: 2px;
}

/* Skip-link for keyboard users */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: #ffe400;
    color: #000;
    padding: 8px 16px;
    z-index: 9999;
    font-weight: 700;
}
.skip-link:focus {
    top: 0;
}

/* Visually hidden — accessible to screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


/* ==========================================================================
   3. CUSTOM STYLES (from page.html inline <style>)
   ========================================================================== */

/* --- Base / Root --------------------------------------------------------- */

/* SCALING UPDATE:
   Set root font size to 126% (approx 20.2px instead of 16px).
   Since Tailwind uses 'rem', this scales all margins, paddings, fonts,
   and container max-widths up accordingly.
*/
html {
    /* R60 Niko 2026-06-05: gesamte Website 20 % kleiner (126 % × 0.8 = 100.8 %).
       R64 Niko 2026-06-05: Auf großen Desktops (≥ 1920 px, typisch 27"-Monitor) zurück
       auf 126 % — kleines Display kompakt, großer Schirm „voll". */
    font-size: 100.8%;
    scroll-behavior: smooth;
}
@media screen and (min-width: 1920px) {
    html {
        font-size: 126%;
    }
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #000;
    color: #fff;
}


/* --- Brand Colors -------------------------------------------------------- */

.text-custom-yellow {
    color: #ffe400;
}
.bg-custom-yellow {
    background-color: #ffe400;
}
.bg-custom-yellow:hover {
    background-color: #e6cb00;
}
.border-custom-yellow {
    border-color: #ffe400;
}

/* Gradient style for yellow text */
.strong-yellow {
    background: #ffe400;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}
/* Animated characters inside strong tag are solid yellow */
.strong-yellow .hero-char {
    -webkit-text-fill-color: #ffe400;
}

/* Niko 2026-06-04: Rotator-Text in Hero darf auf Desktop NICHT umbrechen
   („wirkungsvolle Kommunikation" soll in einer Zeile stehen). Auf Mobile bleibt
   das Standard-Wrap-Verhalten, sonst läuft der Text aus dem Container. */
@media screen and (min-width: 768px) {
    #changing-text {
        white-space: nowrap;
    }
}


/* --- Navigation ---------------------------------------------------------- */

.nav-link {
    transition: color 0.3s;
}
.nav-link:hover {
    color: #ffe400;
}


/* --- Niko 2026-06-04: ALLE Buttons (und auch Form-Inputs) eckig — keine runden Ecken.
   Globaler Override aller Tailwind-rounded-Klassen + nativer Button/Input-Defaults. -- */
button,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="submit"],
input[type="button"],
textarea,
select,
.contact-button,
.mobile-nav-link,
.form-input,
.form-textarea,
.rounded,
.rounded-sm,
.rounded-md,
.rounded-lg,
.rounded-xl,
.rounded-2xl,
.rounded-3xl,
.rounded-full,
[class*="rounded-"] {
    border-radius: 0 !important;
}


/* --- Niko 2026-06-05 (R38): Alle Section-Overlines einheitlich 0.94rem.
   Pattern: <strong|p class="font-semibold text-sm ... mb-4 text-gray-...">OVERLINE</strong>. -- */
.font-semibold.text-sm.mb-4 {
    font-size: 0.94rem !important;
}

/* --- Niko 2026-06-05 (R44): ® überall unfett (nur das Registered-Zeichen,
   umgebender Text bleibt fett). app.js wrappt jedes ® zur Laufzeit in <span class="reg">. -- */
.reg {
    font-weight: 400 !important;
}


/* --- Contact Button ------------------------------------------------------ */

.contact-button {
    background-color: #000;
    color: #ffe400;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s;
}
.contact-button.scrolled-state {
    background-color: #ffe400;
    color: #000;
    text-transform: uppercase;
    font-size: 0.85em;
}
.contact-button.scrolled-state:hover {
    background-color: #fff !important;
    color: #000 !important;
}
.contact-button:hover {
    background-color: #ffe400 !important;
    color: #000 !important;
}


/* --- Grayscale Filter ---------------------------------------------------- */

.grayscale {
    filter: grayscale(100%);
}


/* --- Form Styles --------------------------------------------------------- */

.form-input,
.form-textarea {
    background-color: #fff;
    border: 2px solid transparent;  /* R51 Niko 2026-06-05: kein grauer Rand */
    color: #000;
    padding: 1rem;
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 0;
    transition: border-color 0.3s;
}
.form-input:focus,
.form-textarea:focus {
    border-color: #ffe400;
}


/* --- Section Spacing Override -------------------------------------------- */

@media screen and (min-width: 992px) {
    .py-24 {
        padding-top: 12rem !important;
        padding-bottom: 12rem !important;
    }
}


/* --- Hero Section -------------------------------------------------------- */

.hero-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Portrait Mode: Full Screen Rotation */
@media (orientation: portrait) {
    .hero-wrapper {
        width: 100vh;
        height: 100vw;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(90deg);
        transform-origin: center center;
    }

    .hero-image-layer,
    .hero-overlay-layer {
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        top: 0 !important;
        left: 0 !important;
    }

    /* R26 (Niko 2026-06-04): Hero-Overlay-Logo auf Mobile um 180° gedreht — korrigiert Lese-Richtung */
    .hero-overlay-layer {
        transform: rotate(180deg);
        transform-origin: center center;
    }
}


/* --- iPhone Mockup ------------------------------------------------------- */

.iphone-frame {
    position: relative;
    max-width: 448px;
    height: 896px;
    background: #000;
    border: 11px solid #111;
    border-radius: 56px;
    padding: 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4), inset 0 0 0 2px #444;
    margin-left: auto;
    margin-right: auto;
}
.iphone-screen {
    background: #343541;
    height: 100%;
    width: 100%;
    border-radius: 45px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}
.iphone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 168px;
    height: 35px;
    background: #111;
    border-bottom-left-radius: 21px;
    border-bottom-right-radius: 21px;
    z-index: 30;
}
.iphone-status-bar {
    position: absolute;
    top: 11px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-size: 18px;
    z-index: 20;
    padding: 0 5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}


/* --- Miscellaneous Overrides --------------------------------------------- */

p.font-bold.text-sm.mb-2 {
    max-width: 520px;
    margin-bottom: 24px;
    font-weight: 100;
    text-transform: uppercase;
    color: #a4a4a4;
}

.bg-black {
    --tw-bg-opacity: 1;
    background-color: rgb(4 20 36) !important;
}

.bg-gray-100 {
    --tw-bg-opacity: 1;
    background-color: rgb(241 246 248) !important;
}


/* --- Starfield ----------------------------------------------------------- */

section,
footer {
    position: relative;
}
.starfield-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
section > *,
footer > * {
    position: relative;
    z-index: 1;
}


/* --- Floating Icon Animation --------------------------------------------- */

@keyframes float {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.icon-float {
    animation: float 6s ease-in-out infinite;
}


/* --- Highlight on Scroll (Textmarker Effect) ----------------------------- */

.highlight-on-scroll {
    background-image: linear-gradient(#ffe400, #ffe400);
    background-repeat: no-repeat;
    background-position: 0% 90%;
    background-size: 0% 45%;
}


/* --- Project Tiles: logo white → black on hover ------------------------- */

.project-tile:hover .project-tile-logo {
    filter: brightness(0);
}

/* --- No Bottom Padding (Projects) ---------------------------------------- */

.no-bottom-padding {
    padding-bottom: 0 !important;
}


/* --- Bounce Arrow Animation ---------------------------------------------- */

@keyframes bounce-slow {
    0%, 100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}
.animate-bounce {
    animation: bounce-slow 1.5s infinite;
}

span.text-6xl.font-serif.leading-none.mt-4 {
    margin-bottom: -45px;
}


/* --- Legal Pages (Impressum / Datenschutz) ------------------------------- */
/* R30 (Niko 2026-06-04): „impressum fehlen absätze" — sauberes Spacing zwischen Sektionen. */
.privacy-content h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 2.5rem;
    line-height: 1.15;
}
.privacy-content h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    line-height: 1.2;
}
.privacy-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    color: var(--vv-accent, #ffe400);
    letter-spacing: 0.01em;
}
.privacy-content p {
    margin-bottom: 1rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.85);
}
.privacy-content p:last-child {
    margin-bottom: 0;
}
.privacy-content ul {
    margin: 0.75rem 0 1.25rem 1.25rem;
    padding: 0;
    list-style: disc;
    line-height: 1.65;
}
.privacy-content ul li {
    margin-bottom: 0.4rem;
}
.privacy-content a {
    color: var(--vv-accent, #ffe400);
    text-decoration: underline;
    text-underline-offset: 3px;
}


/* --- Hero Overlay -------------------------------------------------------- */

@media (min-width: 1024px) {
    #hero-overlay-layer {
        background-size: 150% !important;
    }
}


/* --- Projekte Section — Large Screen Overrides --------------------------- */

@media (min-width: 2200px) {
    #projekte .text-xs {
        font-size: 1rem !important;
    }
    #projekte .w-52 {
        width: 18rem !important;
    }
    #projekte .w-32 {
        width: 12rem !important;
    }
    #projekte .text-base {
        font-size: 1.5rem !important;
        line-height: 1.6 !important;
    }
    #projekte .text-sm {
        font-size: 1.1rem !important;
    }
    #projekte .text-6xl {
        font-size: 6rem !important;
    }
}


/* --- Logo Marquee Ticker ------------------------------------------------- */

.logo-marquee-wrapper {
    overflow: hidden;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
.logo-marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 35s linear infinite;
}
.logo-marquee-track:hover {
    animation-play-state: paused;
}
.logo-marquee-inner {
    display: flex;
    align-items: center;
    gap: 4rem;
    padding: 0 2rem;
}
.logo-marquee-inner img {
    height: 70px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 1;
    transition: opacity 0.3s;
    flex-shrink: 0;
}
/* Einzel-Override: Burghauser-Touristik-PNG hat wenig Whitespace → optisch kleiner zeichnen */
.logo-marquee-inner img[src*="burghauser"] {
    transform: scale(0.75);
}
/* Pfaffenhofen-Logos optisch größer zeichnen (Niko 2026-06-02) */
.logo-marquee-inner img[src*="stadtpfaffenhofen"],
.logo-marquee-inner img[src*="stadtwerkepfaffenhofen"] {
    transform: scale(1.25);
}
@media (min-width: 768px) {
    .logo-marquee-inner img {
        height: 80px;
        max-width: 200px;
    }
}
.logo-marquee-inner img:hover {
    opacity: 1;
}

@keyframes marquee-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}


/* ========================================================================== */
/* --- R61 (Niko 2026-06-05): Mobile-Optimization-Welle (max-width: 767px) -- */
/* greift für alle Viewports unterhalb Tailwind md (768) — also Phones + */
/* schmale Tablet-Portraits. Mini-Phone-Bracket darunter zusätzlich.       */
/* ========================================================================== */
@media screen and (max-width: 767px) {
    /* SEO -> AIO Buchstaben-Animation: kompakter (sonst Overflow auf <400px) */
    #aio-animation-container {
        gap: 0.5rem !important;
    }
    #aio-animation-container > div {
        width: 5.5rem !important;
        height: 5.5rem !important;
    }

    /* iPhone-Frame (auf aio-analyse / whitepaper Page) — R76 Niko 2026-06-05:
       Mobile-Layout war zerschossen (Inline height:1300px + border 24px + radius 160px
       + Wrapper margin-bottom:-500px = unleserliche Box, hat Folge-Sections überlappt).
       Auf Mobile rendern wir keinen iPhone-Look mehr, sondern eine schlichte gelbe
       CTA-Karte. */
    #kpi-section > div.flex.justify-center {
        margin-top: 2rem !important;
        margin-bottom: 0 !important;
    }
    .iphone-frame {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        border: 0 !important;
        /* R87 Niko 2026-06-05: deutlichere runde Ecken (16 war optisch kaum erkennbar). */
        border-radius: 28px !important;
        background: #ffe400 !important;
        padding: 3rem 1.5rem !important;
        box-shadow: 0 6px 32px rgba(0,0,0,0.18) !important;
        overflow: hidden !important;
    }
    .iphone-frame .iphone-notch {
        display: none !important;
    }
    .iphone-frame .iphone-screen {
        border-radius: 8px !important;
        padding: 0 !important;
        background: transparent !important;
        height: auto !important;
        min-height: auto !important;
    }
    .iphone-frame .iphone-screen > div.absolute {
        display: none !important;
    }

    /* Section-Padding kompakter */
    section.py-24,
    section.py-28,
    section.py-32 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    /* H1/H2 zu groß auf Mobile-Phones */
    h1.text-5xl,
    h1.sm\:text-7xl {
        font-size: 2.25rem !important;
        line-height: 1.15 !important;
    }
    h2.text-5xl,
    h2.sm\:text-5xl {
        font-size: 1.9rem !important;
        line-height: 1.2 !important;
    }
    h2.text-3xl {
        font-size: 1.6rem !important;
    }

    /* Body-Text-Größen auf Mobile etwas verkleinert */
    p.text-2xl,
    p.sm\:text-2xl {
        font-size: 1.05rem !important;
        line-height: 1.5 !important;
    }
    p.text-lg,
    p.sm\:text-lg {
        font-size: 0.98rem !important;
    }

    /* Container-Padding auf Phones reduzieren */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Buttons nicht über Card-Breite ragen */
    a.inline-block,
    button.inline-block {
        max-width: 100%;
        word-break: break-word;
    }

    /* Marquee-Logos auf Phones kleiner für ruhigere Optik */
    .logo-marquee-inner {
        gap: 2.5rem !important;
        padding: 0 1rem !important;
    }
    .logo-marquee-inner img {
        height: 50px !important;
        max-width: 140px !important;
    }

    /* Card-3 (Kraft) Scale auf Mobile zurückfahren — sonst sprengt 1.4355× die Card-Breite */
    #animation03-container > div.relative {
        transform: scale(1.15) !important;
    }

    /* Niko-Zitat auf aio-analyse: Schrift kleiner */
    #niko-zitat p.font-semibold {
        font-size: 1.25rem !important;
        line-height: 1.35 !important;
    }

    /* R65 (Niko 2026-06-05): Rotator-Text in Hero immer 2 Zeilen reservieren —
       „starke Marken" ist 1-zeilig, „relevante Kommunikation" + „Sichtbarkeit in
       KI-Systemen" wrappen auf 2 Zeilen → ohne Reservierung Layout-Sprung beim
       Wechsel. min-height + vertical-align hält das Layout konstant. */
    #changing-text {
        display: inline-block;
        min-height: 2em;
        line-height: 1;
        vertical-align: top;
    }

    /* R67 (Niko 2026-06-05): Intro-Headline + SEO->AIO-Animation auf Mobile
       vertikal mittig in der Section, mit etwas mehr Padding oben als unten,
       damit der Content optisch zentriert wirkt (nicht oben klebt). */
    #intro,
    #ki-whitepaper {
        min-height: 100svh;
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        padding-top: 4.5rem !important;
        padding-bottom: 2rem !important;
    }
    /* Innere Section-Container nicht zwingen, ihre eigene Höhe zu shrinken */
    #intro > .container,
    #ki-whitepaper > .container {
        flex: 0 0 auto;
    }
    /* Logo-Marquee + Definition unter Headline sollen näher dran sein (mb-32 ist zu viel) */
    #intro h2.mb-32 {
        margin-bottom: 2.5rem !important;
    }
    #intro .mb-32 {
        margin-bottom: 2.5rem !important;
    }
    /* AIO-Animation-Container Bottom-Margin auf Mobile entspannter */
    #aio-animation-container.mb-36 {
        margin-bottom: 2.5rem !important;
    }

    /* R82 (Niko 2026-06-05): Whitepaper-Lightbox auf Mobile bedienbar machen —
       vorher: Inline-Style fix-width 380px Bild-Panel + flex-row + 3rem Form-Padding,
       Form-Inputs nicht erreichbar / abgeschnitten. */
    #whitepaper-overlay {
        padding: 0.75rem !important;
        align-items: stretch !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    /* Modal-Container (das weiße Card) */
    #whitepaper-overlay > div {
        max-width: 100% !important;
        margin: auto !important;
        max-height: 96vh;
        overflow-y: auto;
    }
    /* Inner-Flex Row -> Column auf Mobile */
    #whitepaper-overlay > div > div[style*="flex-direction:row"],
    #whitepaper-overlay > div > div[style*="flex-direction: row"] {
        flex-direction: column !important;
    }
    /* Bild-Panel deutlich kleiner + Höhe begrenzt */
    #whitepaper-overlay > div > div > div[style*="flex:0 0 380px"],
    #whitepaper-overlay > div > div > div[style*="flex: 0 0 380px"] {
        flex: 0 0 auto !important;
        width: 100% !important;
        max-height: 180px !important;
        overflow: hidden;
    }
    #whitepaper-overlay > div > div > div img[alt="Whitepaper Cover"] {
        width: 100% !important;
        height: 180px !important;
        object-fit: cover !important;
        object-position: top center;
    }
    /* Form-Panel: kompakteres Padding + Vollbreite */
    #whitepaper-overlay > div > div > div[style*="flex:1"],
    #whitepaper-overlay > div > div > div[style*="flex: 1"] {
        flex: 1 1 auto !important;
        padding: 1.5rem 1.25rem !important;
        min-width: 0 !important;
    }
    /* Headlines im Lightbox kompakter */
    #whitepaper-overlay h2 {
        font-size: 1.4rem !important;
        margin-bottom: 0.3rem !important;
    }
    /* Close-Button gut erreichbar */
    #whitepaper-overlay > div > button[aria-label] {
        top: 0.6rem !important;
        right: 0.6rem !important;
        width: 32px !important;
        height: 32px !important;
        z-index: 20 !important;
    }
}

/* R98 Niko 2026-06-05: Impressum 3-Spalten-Grid auf Tablet → 1 Spalte auf Mobile */
@media screen and (max-width: 900px) {
    .impressum-persons-grid {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
    }
}

/* Mini-Phones (<=400px): nochmal kompakter */
@media screen and (max-width: 400px) {
    #aio-animation-container > div {
        width: 4.5rem !important;
        height: 4.5rem !important;
    }
    .iphone-screen {
        padding: 1.5rem 0.75rem !important;
        padding-top: 3rem !important;
    }
}
