/* =============================================
   CARTHOGEN - Styles Responsive (Enhanced)
   ============================================= */

/* Hide mobile language switcher by default */
.lang-switcher-mobile {
    display: none !important;
}

/* Hide mobile CTA link by default (shown only in mobile menu) */
.mobile-cta-link {
    display: none;
}

/* =============================================
   Large Desktop (max 1400px)
   ============================================= */

@media (max-width: 1400px) {
    .hero-container {
        gap: 3rem;
    }

    .ai-container {
        gap: 4rem;
    }

    .screenshots-grid {
        gap: 2rem;
    }
}

/* =============================================
   Desktop (max 1200px)
   ============================================= */

@media (max-width: 1200px) {
    :root {
        --section-padding: clamp(3rem, 6vw, 6rem);
    }

    .hero-container {
        gap: 2.5rem;
    }

    .hero-visual {
        height: 450px;
    }

    .footer-main {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
        gap: 3rem;
    }
}

/* =============================================
   Tablettes (max 1024px)
   ============================================= */

@media (max-width: 1024px) {
    /* Hero */
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero h1 {
        font-size: clamp(2.25rem, 6vw, 3rem);
    }

    .hero-subtitle {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }

    /* Orbs adjustment */
    .orb-1 {
        width: 400px;
        height: 400px;
        top: -100px;
        right: -100px;
    }

    .orb-2 {
        width: 300px;
        height: 300px;
        bottom: -50px;
        left: -50px;
    }

    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card.large {
        grid-column: span 1;
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Text content first, then mockup preview on mobile */
    .feature-card.large .mockup-preview {
        order: 1;
    }

    .feature-card.large > div:first-child {
        order: 0;
    }

    /* AI Section */
    .ai-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .ai-content {
        max-width: 100%;
        text-align: center;
    }

    .ai-features {
        max-width: 500px;
        margin: 0 auto;
    }

    .ai-feature {
        text-align: left;
    }

    .ai-visual {
        order: -1;
        height: 350px;
        max-width: 450px;
        margin: 0 auto;
    }

    /* Grilles */
    .problems-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .steps-container,
    .roadmap-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .steps-container::before {
        display: none;
    }

    .step {
        padding: 0;
    }

    /* Footer */
    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }

    .footer-brand {
        grid-column: span 2;
        max-width: 100%;
        text-align: center;
    }

    .footer-brand .logo {
        justify-content: center;
    }

    /* Screenshots */
    .screenshots-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .screenshot-card.featured {
        grid-column: span 1;
    }

    .screenshot-card.featured .screenshot-content {
        min-height: 350px;
    }

    /* Editor Mockup */
    .mockup-sidebar,
    .mockup-properties {
        display: none;
    }

    .mockup-canvas,
    .mockup-toolbar {
        left: 0;
        right: 0;
    }

    /* Section headers */
    .section-header {
        margin-bottom: 3rem;
    }
}

/* =============================================
   Mobile Large (max 768px)
   ============================================= */

@media (max-width: 768px) {
    /* Navigation */
    nav {
        padding: 0.875rem 1.5rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(6, 6, 9, 0.98);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
    }

    [data-theme="light"] .nav-links {
        background: rgba(248, 250, 252, 0.98);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-cta .btn-ghost {
        display: none;
    }

    /* Hide CTA button on mobile - accessible via menu */
    .nav-cta .btn-primary {
        display: none;
    }

    /* Show CTA in mobile menu */
    .mobile-cta-link {
        display: block;
    }

    .mobile-cta-link a {
        display: block;
        text-align: center;
        margin: 0.5rem 0;
        border-bottom: none !important;
    }

    /* Theme toggle and language switcher on mobile */
    .theme-toggle {
        width: 36px;
        height: 36px;
    }

    .theme-toggle svg {
        width: 18px;
        height: 18px;
    }

    /* Keep language switcher visible on mobile - compact version */
    .lang-switcher {
        display: flex;
    }

    .lang-switcher .lang-btn {
        padding: 0.4rem 0.5rem;
        font-size: 0.7rem;
    }

    /* Hide mobile language switcher in menu (we show it in nav-cta instead) */
    .lang-switcher-mobile {
        display: none !important;
    }

    /* Hero */
    .hero {
        padding: 7rem 1.5rem 4rem;
    }

    .hero h1 {
        font-size: 2.25rem;
        letter-spacing: -0.03em;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
        padding-top: 1.5rem;
    }

    .stat {
        text-align: center;
    }

    .stat::after {
        display: none;
    }

    .stat-value {
        font-size: 2rem;
        justify-content: center;
    }

    /* Vendors */
    .vendors {
        padding: 3rem 1.5rem;
    }

    .vendors-logos {
        gap: 2rem;
    }

    .vendor-logo {
        padding: 0.5rem 1rem;
    }

    /* Problems grid - 1 column on mobile */
    .problems-grid {
        grid-template-columns: 1fr;
    }

    /* Cards */
    .problem-card,
    .feature-card,
    .roadmap-card {
        padding: 1.75rem;
    }

    .feature-icon,
    .problem-icon,
    .roadmap-icon {
        width: 52px;
        height: 52px;
    }

    .feature-card h3,
    .problem-card h3,
    .roadmap-card h3 {
        font-size: 1.25rem;
    }

    /* Steps */
    .step-number {
        width: 70px;
        height: 70px;
        font-size: 1.35rem;
    }

    /* AI Section */
    .ai-content h2 {
        font-size: clamp(1.75rem, 5vw, 2.25rem);
    }

    .ai-feature {
        padding: 1rem;
    }

    .ai-feature-icon {
        width: 42px;
        height: 42px;
    }

    /* Chat Mockup */
    .chat-mockup {
        padding: 1.25rem;
        max-width: 100%;
    }

    .chat-avatar {
        width: 42px;
        height: 42px;
    }

    /* Footer */
    .footer-main {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-brand {
        grid-column: span 1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.25rem;
        text-align: center;
    }

    /* CTA */
    .cta-content h2 {
        font-size: clamp(1.75rem, 5vw, 2.25rem);
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    /* Section padding */
    .problem,
    .features,
    .how-it-works,
    .ai-section,
    .roadmap,
    .app-screenshots,
    .cta-section {
        padding: 4rem 1.5rem;
    }
}

/* =============================================
   Mobile (max 640px)
   ============================================= */

@media (max-width: 640px) {
    /* Typography */
    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .section-label {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }

    /* Hero badge */
    .hero-badge {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }

    /* Buttons */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .btn-large {
        padding: 0.875rem 1.75rem;
        font-size: 0.95rem;
    }

    /* Screenshot cards */
    .screenshot-browser {
        padding: 0.625rem 1rem;
    }

    .browser-dots span {
        width: 10px;
        height: 10px;
    }

    .browser-url {
        font-size: 0.7rem;
        padding: 0.375rem 0.75rem;
    }

    .screenshot-info {
        padding: 1.25rem;
    }

    .screenshot-info h4 {
        font-size: 1rem;
    }

    /* Feature tags */
    .feature-tags {
        gap: 0.375rem;
    }

    .feature-tag {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* =============================================
   Small Mobile (max 480px)
   ============================================= */

@media (max-width: 480px) {
    /* Navigation */
    nav {
        padding: 0.75rem 1rem;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    /* Hero */
    .hero {
        padding: 6rem 1rem 3rem;
        min-height: auto;
    }

    .hero h1 {
        font-size: 1.875rem;
        line-height: 1.15;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.875rem;
        margin-bottom: 1.25rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 0.875rem;
        margin-bottom: 2.5rem;
    }

    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        gap: 1.25rem;
    }

    .stat-value {
        font-size: 1.75rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    /* Sections */
    .problem,
    .features,
    .how-it-works,
    .ai-section,
    .roadmap,
    .app-screenshots,
    .cta-section {
        padding: 3.5rem 1rem;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    /* Cards */
    .problem-card,
    .feature-card,
    .roadmap-card {
        padding: 1.5rem;
    }

    .feature-icon,
    .problem-icon,
    .roadmap-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 1.25rem;
    }

    .feature-card h3,
    .problem-card h3,
    .roadmap-card h3 {
        font-size: 1.15rem;
        margin-bottom: 0.75rem;
    }

    .feature-card p,
    .problem-card p,
    .roadmap-card p {
        font-size: 0.9rem;
    }

    /* Steps */
    .step-number {
        width: 64px;
        height: 64px;
        font-size: 1.25rem;
        margin-bottom: 1.25rem;
    }

    .step h3 {
        font-size: 1.15rem;
    }

    /* AI Section */
    .ai-content h2 {
        font-size: 1.5rem;
    }

    .ai-content p {
        font-size: 1rem;
    }

    .ai-feature {
        padding: 0.875rem;
        gap: 1rem;
    }

    .ai-feature-icon {
        width: 38px;
        height: 38px;
    }

    .ai-feature h4 {
        font-size: 0.95rem;
    }

    .ai-feature p {
        font-size: 0.85rem;
    }

    .ai-visual {
        height: 280px;
    }

    /* Chat Mockup */
    .chat-mockup {
        padding: 1rem;
        border-radius: var(--radius-lg);
    }

    .chat-header {
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    .chat-avatar {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .chat-info h4 {
        font-size: 0.9rem;
    }

    .chat-message {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .chat-input {
        gap: 0.5rem;
        margin-top: 1rem;
        padding-top: 1rem;
    }

    .chat-input input {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .chat-input button {
        width: 40px;
        height: 40px;
    }

    /* CTA */
    .cta-content h2 {
        font-size: 1.5rem;
    }

    .cta-content p {
        font-size: 1rem;
    }

    /* Vendors */
    .vendors {
        padding: 2.5rem 1rem;
    }

    .vendors-title {
        font-size: 0.75rem;
    }

    .vendors-title::before,
    .vendors-title::after {
        width: 20px;
    }

    .vendors-logos {
        flex-direction: column;
        gap: 1rem;
    }

    .vendor-logo {
        font-size: 1rem;
    }

    /* Footer */
    footer {
        padding: 3rem 1rem 1.5rem;
    }

    .footer-main {
        gap: 1.5rem;
    }

    .footer-brand p {
        font-size: 0.9rem;
    }

    .footer-links h4 {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }

    .footer-links a {
        font-size: 0.85rem;
    }

    .footer-bottom {
        padding-top: 1.5rem;
    }

    .footer-bottom p {
        font-size: 0.8rem;
    }

    .footer-social a {
        width: 36px;
        height: 36px;
    }
}

/* =============================================
   Extra Small (max 360px)
   ============================================= */

@media (max-width: 360px) {
    .hero h1 {
        font-size: 1.625rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.375rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .problem-card,
    .feature-card,
    .roadmap-card {
        padding: 1.25rem;
    }
}

/* =============================================
   Height-based Queries
   ============================================= */

@media (max-height: 700px) and (min-width: 769px) {
    .hero {
        min-height: auto;
        padding-top: 6rem;
        padding-bottom: 3rem;
    }

    .hero-visual {
        height: 400px;
    }
}

/* =============================================
   High Resolution Displays
   ============================================= */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .mockup-dot,
    .browser-dots span {
        border: 0.5px solid rgba(0, 0, 0, 0.1);
    }
}

/* =============================================
   Landscape Mobile
   ============================================= */

@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 5rem 2rem 2rem;
    }

    .hero-stats {
        flex-direction: row;
        gap: 2rem;
    }

    .stat {
        text-align: left;
    }
}

/* =============================================
   Print Styles
   ============================================= */

@media print {
    .orb,
    .grid-bg,
    .hero-visual,
    .ai-visual,
    nav,
    .mobile-menu-btn,
    .hero-badge::before,
    .scroll-indicator {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .hero,
    .problem,
    .features,
    .how-it-works,
    .ai-section,
    .roadmap,
    .cta-section,
    footer {
        padding: 2rem 0 !important;
    }

    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }
}
