/* ═══════════════════════════════════════════════════════════════════
   AI-ZY MOBILE OPTIMIZATION
   Premium Mobile Experience — Professional Look on Smartphones
   ═══════════════════════════════════════════════════════════════════ */

/* --- Mobile Base Adjustments --- */
@media (max-width: 1024px) {
    :root {
        --section-padding: clamp(3rem, 8vw, 6rem);
    }

    html {
        font-size: 16px;
    }

    body {
        background-size: 24px 24px;
    }
}

/* --- Tablet & Below (768px) --- */
@media (max-width: 768px) {
    :root {
        --section-padding: clamp(2.5rem, 6vw, 4rem);
    }

    html {
        font-size: 15px;
    }

    /* --- Enhanced Header for Mobile --- */
    .site-header {
        padding: 0;
        z-index: 999;
        position: sticky;
        top: 0;
        background: rgba(5, 5, 5, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-subtle);
    }

    .nav-container {
        padding: 1rem 1.25rem;
        gap: 1rem;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        max-width: 100%;
    }

    .brand {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        text-decoration: none;
        color: var(--text-primary);
        flex-shrink: 0;
    }

    .brand-logo {
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--brand-primary);
    }

    .brand-text {
        font-size: 1.1rem;
        font-weight: 700;
        letter-spacing: -0.02em;
    }

    .nav-menu {
        display: none;
    }

    .nav-actions {
        display: none;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        border-radius: 8px;
    }

    /* --- Mobile Menu Toggle Button (Hamburger) --- */
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: transparent;
        border: none;
        width: 40px;
        height: 40px;
        cursor: pointer;
        padding: 0;
        margin-left: auto;
        z-index: 100;
        transition: transform 0.3s ease;
        border-radius: 8px;
    }

    .mobile-menu-toggle:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    .mobile-menu-toggle.active {
        transform: rotate(180deg);
    }

    .mobile-menu-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        background: var(--text-primary);
        margin: 5px 0;
        border-radius: 2px;
        transition: all 0.35s cubic-bezier(0.65, 0, 0.35, 1);
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(11px) rotate(45deg);
        opacity: 1;
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(-10px);
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-11px) rotate(-45deg);
        opacity: 1;
    }

    /* --- Mobile Navigation Menu --- */
    .mobile-nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(180deg, rgba(8, 8, 8, 0.99) 0%, rgba(5, 5, 5, 0.99) 100%);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-subtle);
        padding: 1.5rem 1.25rem;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.4s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.4s ease;
        pointer-events: none;
        z-index: 99;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    }

    .mobile-nav-menu.active {
        max-height: 500px;
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-nav-list {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .mobile-nav-list li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding-bottom: 1rem;
    }

    .mobile-nav-list li:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .mobile-nav-list a {
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 1rem;
        font-weight: 500;
        padding: 0.5rem 0;
        transition: var(--transition-fast);
        display: block;
    }

    .mobile-nav-list a:hover {
        color: var(--brand-primary);
        padding-left: 0.5rem;
    }

    .mobile-nav-menu .btn {
        width: 100%;
        margin-top: 0.5rem;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }



    /* --- Hero Section Mobile --- */
    .hero {
        padding-top: 7rem;
        padding-bottom: 3rem;
        padding-inline: 1.25rem;
    }

    .hero-inner {
        max-width: 100%;
    }

    .hero-title {
        font-size: clamp(2rem, 7vw, 3.5rem);
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: clamp(1rem, 2vw, 1.2rem);
        margin-bottom: 2rem;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 0.35rem 0.75rem;
        margin-bottom: 1.5rem;
    }

    .hero-cta-group {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 3rem;
        width: 100%;
    }

    .hero-cta-group .btn {
        width: 100%;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .hero-app-showcase {
        max-width: 100%;
        display: none;
    }

    /* --- So Funktioniert's Section - Larger Images on Mobile --- */
    .bento-section {
        padding: var(--section-padding) 1.25rem;
        /* Überschrift wird nicht vom Header überlagert */
        padding-top: 5.5rem !important;
    }

    .how-it-works-steps {
        margin-top: 2rem !important;
        gap: 3rem !important;
    }

    .step-row {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        align-items: stretch !important;
    }

    .step-text h3 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .step-visual {
        min-height: 300px;
        border-radius: 14px !important;
        overflow: hidden !important;
    }

    .step-visual img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
        object-fit: cover;
    }

    .step-number {
        font-size: 2.5rem !important;
        margin-bottom: 0.75rem !important;
    }

    /* --- So Funktioniert's Section - Larger Images on Mobile --- */
    .how-it-works-steps {
        margin-top: 2rem !important;
        gap: 3rem !important;
    }

    .step-row {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        align-items: stretch !important;
    }

    .step-text h3 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .step-visual {
        min-height: 300px;
        border-radius: 14px !important;
        overflow: hidden !important;
    }

    .step-visual img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
        object-fit: cover;
    }

    .step-number {
        font-size: 2.5rem !important;
        margin-bottom: 0.75rem !important;
    }

    /* --- Social Proof Mobile --- */
    .social-proof {
        padding: 2.5rem 1.25rem;
        border-bottom: 1px solid var(--border-subtle);
    }

    .proof-label {
        font-size: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .logo-track {
        gap: 2rem;
        justify-content: space-around;
    }

    .logo-item {
        font-size: 1rem;
    }

    /* --- Bento Grid Mobile --- */
    .bento-section {
        padding: var(--section-padding) 1.25rem;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    .section-header h2 {
        font-size: clamp(1.75rem, 5vw, 2.25rem);
        margin-bottom: 0.75rem;
    }

    .section-header p {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        grid-auto-rows: auto;
    }

    .bento-card {
        padding: 1.5rem;
        border-radius: 16px;
        min-height: auto;
    }

    .bento-card h3 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .bento-card p {
        font-size: 0.95rem;
    }

    .span-2 {
        grid-column: auto;
    }

    .icon-wrapper {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    /* --- Three Column Grid → Mobile --- */
    .three-column-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding-inline: 1.25rem;
    }

    .column-card {
        padding: 1.25rem;
        min-height: auto;
        height: auto;
    }

    .column-card h3 {
        font-size: 1.05rem;
    }

    .column-card p {
        font-size: 0.9rem;
        flex-grow: 0;
    }

    /* --- Playground Mobile --- */
    .playground-section {
        padding: var(--section-padding) 1.25rem;
    }

    .playground-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0;
    }

    .parameter-controls {
        margin-top: 1.5rem;
    }

    .control-group {
        margin-bottom: 1.5rem;
    }

    .control-group label {
        font-size: 0.85rem;
    }

    .chat-interface {
        height: 400px;
        border-radius: 16px;
        overflow: hidden;
    }

    .chat-header {
        padding: 1rem;
    }

    .chat-history {
        padding: 1rem;
        gap: 0.75rem;
    }

    .message {
        max-width: 95%;
    }

    .msg-content {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    /* --- Value Prop Mobile --- */
    .value-prop {
        padding: var(--section-padding) 1.25rem;
    }

    .value-prop h2 {
        font-size: clamp(1.75rem, 5vw, 2.25rem);
        margin-bottom: 2.5rem;
    }

    .value-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .value-number {
        font-size: 2rem;
    }

    /* --- Testimonials Mobile --- */
    .testimonials-section {
        padding: var(--section-padding) 1.25rem;
    }

    .testimonial-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .testimonial-card {
        padding: 1.5rem;
        gap: 1rem;
    }

    .testimonial-text {
        font-size: 1rem;
    }

    .testimonial-author {
        padding-top: 1rem;
    }

    /* --- Pricing Mobile --- */
    .pricing-section {
        padding: var(--section-padding) 1.25rem;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .pricing-card {
        padding: 1.5rem;
    }

    .pricing-header h3 {
        font-size: 1.2rem;
    }

    .price-main {
        font-size: 2.5rem;
    }

    .price-sub {
        font-size: 0.85rem;
    }

    .pricing-description {
        font-size: 0.9rem;
        min-height: auto;
    }

    .feature-list li {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }

    .pricing-btn {
        padding: 0.875rem;
        font-size: 0.95rem;
        border-radius: 10px;
    }

    /* --- FAQ Mobile --- */
    .faq-section {
        padding: var(--section-padding) 1.25rem;
        max-width: 100%;
    }

    .faq-question {
        padding: 1.25rem;
        font-size: 1rem;
    }

    .faq-answer-inner {
        padding: 0 1.25rem;
        font-size: 0.9rem;
    }

    /* --- Contact Mobile --- */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-method {
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .form-input {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        border-radius: 10px;
    }

    textarea.form-input {
        min-height: 100px;
    }

    /* --- CTA Mobile --- */
    .bottom-cta {
        padding: var(--section-padding) 1.25rem;
    }

    .cta-panel {
        padding: 2rem 1.5rem;
    }

    .cta-panel p {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }

    .cta-actions {
        gap: 1rem;
    }

    .cta-actions .btn {
        width: 100%;
    }

    /* --- Footer Mobile --- */
    .site-footer {
        padding: 3rem 1.25rem 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 2rem;
    }

    .footer-desc {
        max-width: 100%;
    }

    .footer-links h4 {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .footer-links a {
        font-size: 0.85rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
        text-align: left;
    }

    .social-links {
        gap: 1rem;
    }

    /* --- Blog Mobile --- */
    .blog-article {
        max-width: 100%;
        padding: 0 1.25rem;
    }

    .blog-hero {
        padding: 2rem 1.25rem;
        margin-bottom: 2rem;
        border-radius: 16px;
    }

    .blog-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
        margin-bottom: 0.5rem;
    }

    .blog-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .blog-meta {
        gap: 1rem;
        font-size: 0.85rem;
    }

    .blog-body-wrapper {
        gap: 1.5rem;
        flex-direction: column;
    }

    .blog-prose {
        font-size: 1rem;
    }

    .blog-prose h2 {
        font-size: 1.4rem;
        margin-top: 1.5rem;
    }

    .blog-prose h3 {
        font-size: 1.1rem;
    }

    .blog-share-bar {
        position: relative;
        top: auto;
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        margin-bottom: 1.5rem;
        gap: 0.5rem;
    }

    .blog-share-label {
        display: none;
    }

    .blog-footer {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }

    .blog-prose blockquote {
        padding-left: 1rem;
        font-size: 0.95rem;
    }

    .blog-prose ul,
    .blog-prose ol {
        margin-left: 1.5rem;
        font-size: 0.95rem;
    }
}

/* --- Small Phones (480px and below) --- */
@media (max-width: 480px) {
    :root {
        --section-padding: clamp(2rem, 5vw, 3rem);
    }

    html {
        font-size: 14px;
    }

    body {
        background-size: 20px 20px;
    }

    /* --- Header Compact --- */
    .nav-container {
        padding: 0.875rem 1rem;
    }

    .brand-text {
        font-size: 1rem;
    }

    .btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
    }

    /* --- Hero Compact --- */
    .hero {
        padding-top: 5.5rem;
        padding-bottom: 2rem;
        padding-inline: 1rem;
    }

    .hero-title {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
        margin-bottom: 0.75rem;
    }

    .hero-subtitle {
        font-size: clamp(0.9rem, 1.5vw, 1.05rem);
        margin-bottom: 1.5rem;
    }

    .hero-cta-group {
        margin-bottom: 2rem;
    }

    .hero-cta-group .btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.9375rem;
    }

    /* --- So Funktioniert's Compact --- */
    .how-it-works-steps {
        gap: 2.5rem !important;
    }

    .step-number {
        font-size: 2rem !important;
    }

    .step-visual {
        min-height: 250px;
    }

    .step-text h3 {
        font-size: 1.15rem;
    }

    .bento-section,
    .playground-section,
    .value-prop,
    .testimonials-section,
    .pricing-section,
    .faq-section,
    .bottom-cta {
        padding: var(--section-padding) 1rem;
        padding-top: 5rem !important;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .section-header h2 {
        font-size: clamp(1.5rem, 4vw, 2rem);
        margin-bottom: 0.5rem;
    }

    /* --- Bento Grid Compact --- */
    .bento-card {
        padding: 1.25rem;
    }

    .bento-card h3 {
        font-size: 1.1rem;
    }

    .icon-wrapper {
        width: 36px;
        height: 36px;
    }

    /* --- Column Grid Compact --- */
    .three-column-grid {
        padding-inline: 1rem;
    }

    .column-card {
        padding: 1rem;
    }

    .column-card h3 {
        font-size: 1rem;
    }

    .column-card p {
        font-size: 0.875rem;
    }

    /* --- Chat Interface Compact --- */
    .chat-interface {
        height: 350px;
    }

    .chat-header {
        padding: 0.875rem;
    }

    .chat-history {
        padding: 0.875rem;
    }

    .msg-content {
        padding: 0.65rem 0.875rem;
        font-size: 0.85rem;
    }

    /* --- Pricing Compact --- */
    .pricing-card {
        padding: 1.25rem;
    }

    .pricing-header h3 {
        font-size: 1.1rem;
    }

    .price-main {
        font-size: 2rem;
    }

    .price-sub {
        font-size: 0.8rem;
    }

    .feature-list li {
        font-size: 0.8rem;
        margin-bottom: 0.65rem;
    }

    .pricing-btn {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    /* --- FAQ Compact --- */
    .faq-question {
        padding: 1rem;
        font-size: 0.95rem;
    }

    .faq-answer-inner {
        padding: 0 1rem;
        font-size: 0.85rem;
    }

    /* --- Contact Form Compact --- */
    .contact-grid {
        gap: 1.5rem;
    }

    .form-input {
        padding: 0.65rem 0.875rem;
        font-size: 0.9rem;
        border-radius: 8px;
    }

    textarea.form-input {
        min-height: 90px;
    }

    /* --- CTA Compact --- */
    .cta-panel {
        padding: 1.5rem 1.25rem;
    }

    .cta-panel p {
        font-size: 1rem;
        margin-bottom: 1.25rem;
    }

    /* --- Footer Compact --- */
    .site-footer {
        padding: 2.5rem 1rem 1.5rem;
    }

    .footer-grid {
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .footer-links h4 {
        font-size: 0.85rem;
    }

    .footer-links a {
        font-size: 0.8rem;
    }

    .social-links {
        gap: 0.75rem;
    }

    /* --- Blog Compact --- */
    .blog-hero {
        padding: 1.5rem 1rem;
        margin-bottom: 1.5rem;
    }

    .blog-title {
        font-size: clamp(1.3rem, 4vw, 1.7rem);
    }

    .blog-subtitle {
        font-size: 0.95rem;
    }

    .blog-meta {
        gap: 0.75rem;
        font-size: 0.8rem;
    }

    .blog-prose {
        font-size: 0.95rem;
    }

    .blog-prose h2 {
        font-size: 1.25rem;
        margin-top: 1.25rem;
    }

    .blog-prose h3 {
        font-size: 1rem;
    }

    .blog-share-bar {
        margin-bottom: 1rem;
        gap: 0.35rem;
    }

    .blog-share-btn {
        padding: 0.55rem;
        border-radius: 8px;
    }

    .blog-prose ul,
    .blog-prose ol {
        margin-left: 1.25rem;
        font-size: 0.9rem;
    }

    .blog-prose blockquote {
        padding-left: 0.875rem;
        font-size: 0.9rem;
    }
}

/* --- Extra Small Phones (360px and below) --- */
@media (max-width: 360px) {
    html {
        font-size: 13px;
    }

    .hero {
        padding-top: 5rem;
        padding-inline: 0.875rem;
    }

    .hero-title {
        font-size: clamp(1.5rem, 5.5vw, 2.2rem);
    }

    .hero-cta-group .btn {
        padding: 0.6rem 1.1rem;
        font-size: 0.875rem;
    }

    .nav-container {
        padding: 0.8rem 0.875rem;
    }

    /* --- So Funktioniert's Extra Small --- */
    .how-it-works-steps {
        gap: 2rem !important;
    }

    .step-number {
        font-size: 1.75rem !important;
    }

    .step-visual {
        min-height: 220px;
    }

    .step-text h3 {
        font-size: 1.05rem;
    }

    .bento-section,
    .playground-section,
    .value-prop,
    .testimonials-section,
    .pricing-section,
    .faq-section,
    .bottom-cta {
        padding-top: 4.5rem !important;
    }

    .section-header h2 {
        font-size: clamp(1.3rem, 3.5vw, 1.8rem);
    }

    .bento-card h3 {
        font-size: 1rem;
    }

    .column-card h3 {
        font-size: 0.95rem;
    }

    .column-card p {
        font-size: 0.8rem;
    }

    .pricing-header h3 {
        font-size: 1rem;
    }

    .price-main {
        font-size: 1.75rem;
    }

    .faq-question {
        font-size: 0.9rem;
        padding: 0.9rem;
    }

    .blog-title {
        font-size: clamp(1.2rem, 3.5vw, 1.5rem);
    }

    .blog-prose {
        font-size: 0.9rem;
    }

    .blog-prose h2 {
        font-size: 1.15rem;
    }

    .cta-panel p {
        font-size: 0.95rem;
    }
}

/* --- Touch-Friendly Adjustments --- */
@media (hover: none) and (pointer: coarse) {
    /* Größere Touch-Ziele */
    .btn {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .faq-question {
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    .pricing-btn {
        min-height: 48px;
    }

    .form-input {
        min-height: 48px;
        font-size: 16px;
    }

    /* Keine Hover-Effekte auf Touch-Geräten */
    .bento-card:hover,
    .btn:hover,
    .pricing-btn:hover {
        transform: none;
    }

    /* Sanftere Übergänge */
    button, a, input, select, textarea {
        -webkit-tap-highlight-color: transparent;
    }
}

/* --- Performance Optimizations --- */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* --- Safe Area Support (Notch & Home Indicator) --- */
@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        .site-header {
            padding-top: max(0rem, env(safe-area-inset-top));
        }

        .site-footer {
            padding-bottom: max(2rem, env(safe-area-inset-bottom));
        }
    }
}
