/* ==============================================================
   RESPONSIVE MASTER — HiBart
   Covers: 27" (≥2560px), Desktop (1200-2559px),
           13-14" Laptop (1024-1199px), 11" iPad (768-1023px),
           Mobile (<768px), Small phones (<480px)
   ============================================================== */

/* ===============================================================
   0. GLOBAL RESPONSIVE FOUNDATIONS
   =============================================================== */
html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    max-width: 100vw;
}

.main-content {
    max-width: 100vw;
    overflow-x: clip;
}

#chaos-container {
    overflow: hidden;
    max-width: 100vw;
}

/* Hide custom cursor on touch devices */
@media (hover: none),
(max-width: 1023px) {
    .custom-cursor {
        display: none !important;
    }

    body {
        cursor: auto !important;
    }

    .fake-cursor {
        display: none !important;
    }
}


/* ===============================================================
   1. 27" MONITORS & 4K  (2560px +)
   =============================================================== */
@media (min-width: 2560px) {
    body {
        font-size: 18px;
    }

    /* --- NAV --- */
    .liquid-nav {
        max-width: 1600px !important;
    }

    /* --- HERO --- */
    .hero-section {
        max-width: 2200px;
        padding-top: 200px;
        gap: 160px;
        background-size: 320vh;
    }

    .hero-content h1 {
        font-size: 6.5rem;
    }

    .hero-subtext {
        font-size: 1.6rem;
        max-width: 600px;
    }

    .hero-btn-large img {
        width: 260px;
    }

    .waitlist-form-container {
        max-width: 700px;
    }

    /* --- FEATURES --- */
    .features-section {
        max-width: 1800px;
    }

    .bento-grid {
        max-width: 1700px;
        gap: 32px;
    }

    .glass-panel {
        padding: 48px;
        border-radius: 40px;
    }

    .section-header h2 {
        font-size: 4rem;
    }

    /* --- SHOWCASE --- */
    .showcase-section {
        max-width: 1600px;
    }

    .showcase-text h2 {
        font-size: 4rem;
    }

    .showcase-text p {
        font-size: 1.3rem;
    }

    .showcase-text-center h2 {
        font-size: 5rem;
    }

    .showcase-split {
        gap: 120px;
    }

    /* --- MASCOT --- */
    .mascot-section {
        max-width: 1400px;
        gap: 120px;
    }

    .big-bart,
    .live-bart {
        width: 400px;
        height: 400px;
    }

    .mascot-text h2 {
        font-size: 4.5rem;
    }

    /* --- WIDGETS --- */
    .widgets-container {
        max-width: 1600px;
    }

    /* --- SPOTLIGHT --- */
    .spotlight-section {
        max-width: 1500px;
    }

    .spotlight-text h3 {
        font-size: 3rem;
    }

    .spotlight-text p {
        font-size: 1.2rem;
    }

    /* --- COMPARISON / SCREENSHOTS --- */
    .comparison-container,
    .screenshots-container {
        max-width: 1600px;
    }

    /* --- FOOTER --- */
    footer {
        max-width: 1600px;
    }
}


/* ===============================================================
   2. 2K (1920 – 2559px)
   =============================================================== */
@media (min-width: 1920px) and (max-width: 2559px) {
    .hero-section {
        max-width: 1800px;
        gap: 120px;
    }

    .hero-content h1 {
        font-size: clamp(4.5rem, 5vw, 6rem);
    }

    .hero-subtext {
        font-size: 1.4rem;
        max-width: 520px;
    }

    .section-header h2 {
        font-size: 3.5rem;
    }

    .spotlight-section {
        max-width: 1500px;
    }

    .showcase-section {
        max-width: 1400px;
    }

    .bento-grid {
        max-width: 1400px;
        margin: 0 auto;
    }
}


/* ===============================================================
   3. DESKTOP (1200 – 1919px)  — Default target, mostly covered by base styles
   =============================================================== */
@media (min-width: 1200px) and (max-width: 1919px) {
    .hero-section {
        max-width: 1400px;
    }

    .showcase-section {
        max-width: 1200px;
    }
}


/* ===============================================================
   4. 13-14" LAPTOP (1024 – 1199px)
   =============================================================== */
@media (min-width: 1024px) and (max-width: 1199px) {

    /* --- NAV --- */
    .liquid-nav {
        width: calc(100% - 40px) !important;
        max-width: 1100px !important;
    }

    /* --- HERO --- */
    .hero-section {
        padding: 140px 32px 60px;
        gap: 60px;
        max-width: 1100px;
        background-size: 260vh;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }

    .hero-subtext {
        font-size: 1.05rem;
        max-width: 380px;
    }

    .hero-btn-large img {
        width: 170px;
    }

    .waitlist-form-container {
        margin-top: 40px;
    }

    /* --- FEATURES --- */
    .features-section {
        padding: 100px 24px;
    }

    .section-header h2 {
        font-size: 2.5rem;
    }

    .glass-panel {
        padding: 28px;
    }

    .card-content h3 {
        font-size: 1.3rem;
    }

    .card-content p {
        font-size: 0.95rem;
    }

    /* --- SHOWCASE --- */
    .showcase-section {
        max-width: 1000px;
        padding: 100px 24px;
    }

    .showcase-split {
        gap: 60px;
    }

    .showcase-text h2 {
        font-size: clamp(2rem, 4vw, 3rem);
    }

    .showcase-text-center h2 {
        font-size: clamp(2.2rem, 4.5vw, 3.5rem);
    }

    .clay-mockup {
        width: 110%;
    }

    /* --- SPOTLIGHT --- */
    .spotlight-section {
        padding: 100px 24px;
        gap: 60px;
        max-width: 1000px;
    }

    .spotlight-text h3 {
        font-size: 2.2rem;
    }

    /* --- MASCOT --- */
    .mascot-section {
        gap: 60px;
        padding: 100px 24px 60px;
    }

    .mascot-text h2 {
        font-size: 3rem;
    }

    .big-bart,
    .live-bart {
        width: 260px;
        height: 260px;
    }

    /* --- SCREENSHOTS --- */
    .screenshots-container {
        padding: 0 24px;
    }

    .screenshot-phone {
        width: 260px;
        height: 540px;
    }

    /* --- COMPARISON --- */
    .comparison-container {
        max-width: 1000px;
    }

    /* --- WIDGETS --- */
    .widgets-container {
        max-width: 1000px;
    }
}


/* ===============================================================
   5. 11" iPAD (768 – 1023px)
   =============================================================== */
@media (min-width: 768px) and (max-width: 1023px) {

    /* --- NAV --- */
    .liquid-nav {
        width: calc(100% - 32px) !important;
        max-width: 700px !important;
        min-width: auto !important;
        padding: 8px 16px !important;
        top: 20px;
    }

    .nav-brand span {
        font-size: 0.95rem;
    }

    .nav-feedback-btn {
        font-size: 0.85rem;
        padding: 6px 16px;
    }

    /* --- HERO --- */
    .hero-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 110px 32px 60px;
        gap: 40px;
        min-height: auto;
        background-size: 200vh;
        background-position: center 45%;
    }

    .hero-content {
        max-width: 600px;
    }

    .hero-content h1 {
        font-size: clamp(3rem, 7vw, 4rem);
        line-height: 1.05;
    }

    .hero-subtext {
        font-size: 1.1rem;
        max-width: 500px;
        margin: 0 auto var(--u-4);
    }

    .hero-btn-large img {
        width: 180px;
    }

    .hero-actions {
        align-items: center;
    }

    .waitlist-form-container {
        margin-top: 40px;
        max-width: 500px;
    }

    /* Hide chaos bubbles on iPad */
    #chaos-container {
        display: none !important;
    }

    /* --- FEATURES --- */
    .features-section {
        padding: 80px 24px;
    }

    .section-header h2 {
        font-size: 2.4rem;
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .large-card {
        grid-column: span 2;
    }

    .glass-panel {
        padding: 24px;
        border-radius: 24px;
    }

    /* --- SHOWCASE --- */
    .showcase-section {
        padding: 80px 24px;
    }

    .showcase-split {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }

    .showcase-split.reverse {
        flex-direction: column;
    }

    .showcase-text {
        max-width: 100%;
        min-width: unset;
    }

    .showcase-text h2 {
        font-size: 2.5rem;
    }

    .showcase-text-center h2 {
        font-size: 2.8rem;
    }

    .clay-mockup {
        width: 100%;
        max-width: 100%;
        transform: none;
    }

    .showcase-split.reverse .clay-mockup {
        transform: none;
    }

    .clay-mockup.zoomed {
        max-width: 90%;
        transform: scale(1);
    }

    /* --- SPOTLIGHT --- */
    .spotlight-section {
        flex-direction: column;
        text-align: center;
        padding: 80px 24px;
        gap: 40px;
    }

    .spotlight-section.image-left {
        flex-direction: column;
    }

    .spotlight-text {
        max-width: 100%;
    }

    .spotlight-text h3 {
        font-size: 2.2rem;
    }

    .spotlight-visual {
        width: 100%;
    }

    .spotlight-phone {
        width: 280px;
        height: 560px;
        transform: none !important;
    }

    /* --- MASCOT --- */
    .mascot-section {
        flex-direction: column;
        text-align: center;
        gap: 40px;
        padding: 80px 24px 60px;
    }

    .mascot-text {
        max-width: 600px;
        margin: 0 auto;
    }

    .mascot-text h2 {
        font-size: 2.8rem;
    }

    .big-bart,
    .live-bart {
        width: 240px;
        height: 240px;
    }

    /* --- DECAY --- */
    .decay-demo-section .section-header h2 {
        font-size: 2rem;
    }

    /* --- COMPARISON --- */
    .comparison-container {
        padding: 0 20px;
    }

    .comparison-row {
        grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
    }

    .comparison-cell {
        padding: 14px 10px;
        font-size: 0.8rem;
    }

    /* --- SCREENSHOTS --- */
    .screenshots-gallery {
        gap: 20px;
        padding-left: 24px;
        padding-right: 24px;
    }

    .screenshot-phone {
        width: 240px;
        height: 500px;
    }

    /* --- WIDGETS --- */
    .widgets-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .widgets-section {
        padding: 80px 0;
    }

    /* --- FOOTER --- */
    footer {
        padding: 60px 24px;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 32px;
    }

    .footer-right {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-top-row {
        flex-direction: column;
        align-items: center;
        gap: 32px;
    }

    .footer-right-col {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    /* --- STATS --- */
    .stat-row {
        gap: 40px;
    }

    /* --- Reduce animations --- */
    .glass-panel:hover {
        transform: none;
    }

    .showcase-section:hover .clay-mockup {
        transform: none;
    }
}


/* ===============================================================
   6. MOBILE (< 768px)
   =============================================================== */
@media (max-width: 767px) {

    /* --- NAV --- */
    .liquid-nav {
        width: calc(100% - 24px) !important;
        max-width: 400px !important;
        min-width: auto !important;
        padding: 6px 14px !important;
        top: 12px;
        height: 52px;
    }

    .nav-brand span {
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .nav-feedback-btn {
        font-size: 0.8rem;
        padding: 6px 14px;
    }

    .nav-links {
        display: none;
    }

    .nav-cta {
        display: none;
    }

    /* --- HERO --- */
    .hero-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 90px 16px 20px;
        gap: 12px;
        min-height: 140vw;
        background-size: 115% auto;
        background-position: top center;
        background-repeat: no-repeat;
    }

    .hero-content {
        max-width: 84%;
        margin: 0 auto;
    }

    .hero-content h1 {
        font-size: clamp(2.2rem, 10vw, 3.2rem);
        line-height: 1.05;
        margin-bottom: 12px;
        /* Reduce glow on mobile for performance */
        text-shadow:
            0 0 20px rgba(255, 255, 255, 0.15),
            0 0 40px rgba(255, 255, 255, 0.05);
    }

    /* Disable pseudo-element glow on mobile */
    .hero-content h1::after {
        display: none;
    }

    .hero-subtext {
        font-size: 1rem;
        max-width: 90%;
        margin: 0 auto 20px;
    }

    .hero-btn-large img {
        width: 160px;
    }

    .hero-actions {
        align-items: center;
    }

    /* Hide chaos bubbles */
    #chaos-container {
        display: none !important;
    }

    /* Waitlist */
    .waitlist-form-container {
        margin-top: -60px;
        /* Pull closer to App Store button */
        padding: 0 16px 24px;
        position: relative;
        z-index: 5;
    }

    .waitlist-form {
        flex-direction: column;
        max-width: 300px;
        /* Constrain width */
        margin: 0 auto;
        gap: 8px;
        /* Tighter gap */
    }

    .waitlist-input {
        width: 100%;
        text-align: center;
        padding: 10px 16px;
        /* Smaller padding */
        font-size: 0.9rem;
        height: 44px;
        /* Fixed smaller height */
    }

    .waitlist-submit-btn {
        width: 100%;
        padding: 10px 16px;
        /* Smaller padding */
        font-size: 0.9rem;
        height: 44px;
        /* Fixed smaller height */
    }

    .waitlist-label {
        flex-wrap: wrap;
        font-size: 0.95rem !important;
    }

    /* --- FEATURES --- */
    .features-section {
        padding: 60px 16px;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .large-card {
        grid-column: span 1;
    }

    .glass-panel {
        padding: 20px;
        border-radius: 22px;
        /* Reduce blur on mobile for perf */
        backdrop-filter: blur(12px) saturate(180%);
        -webkit-backdrop-filter: blur(12px) saturate(180%);
    }

    .glass-panel:hover {
        transform: none;
    }

    .icon-box {
        width: 52px;
        height: 52px;
        border-radius: 14px;
        margin-bottom: 16px;
    }

    .icon-box img {
        width: 32px;
        height: 32px;
    }

    .card-content h3 {
        font-size: 1.25rem;
    }

    .card-content p {
        font-size: 0.95rem;
    }

    .personality-toggles {
        justify-content: center;
    }

    .chat-bubble {
        font-size: 0.85rem;
        padding: 8px 12px;
    }

    /* --- SHOWCASE --- */
    .showcase-section {
        padding: 60px 16px;
    }

    .showcase-split {
        flex-direction: column;
        gap: 32px;
        text-align: center;
    }

    #task-breakdown {
        flex-direction: column-reverse;
    }

    .showcase-split.reverse {
        flex-direction: column;
    }

    .showcase-text {
        max-width: 100%;
        min-width: unset;
    }

    .showcase-text h2 {
        font-size: 2rem;
    }

    .showcase-text p {
        font-size: 1rem;
    }

    .showcase-text-center h2 {
        font-size: 2.2rem;
    }

    .showcase-text-center p {
        font-size: 1rem;
    }

    .clay-mockup {
        width: 100%;
        max-width: 100%;
        transform: none;
    }

    .showcase-split.reverse .clay-mockup {
        transform: none;
    }

    .clay-mockup.zoomed {
        max-width: 100%;
        transform: scale(1);
    }

    .showcase-section:hover .clay-mockup {
        transform: none;
    }

    .showcase-centered:hover .clay-mockup.zoomed {
        transform: none;
    }

    .showcase-eq {
        padding: 80px 16px 100px;
        min-height: auto;
    }

    .eq-badge span {
        padding: 12px 24px;
        font-size: 1rem;
    }

    /* --- SPOTLIGHT --- */
    .spotlight-section {
        flex-direction: column;
        text-align: center;
        padding: 60px 16px;
        gap: 32px;
    }

    .spotlight-section.image-left {
        flex-direction: column;
    }

    .spotlight-text {
        max-width: 100%;
    }

    .spotlight-text h3 {
        font-size: 1.8rem;
    }

    .spotlight-text p {
        font-size: 1rem;
    }

    .spotlight-visual {
        width: 100%;
    }

    .spotlight-phone {
        width: 240px;
        height: 500px;
        transform: none !important;
    }

    .spotlight-section:hover .spotlight-phone {
        transform: none !important;
    }

    /* --- MASCOT --- */
    .mascot-section {
        flex-direction: column;
        text-align: center;
        gap: 32px;
        padding: 60px 16px;
    }

    .mascot-text {
        max-width: 100%;
    }

    .mascot-text h2 {
        font-size: 2.2rem;
    }

    .mascot-text p {
        font-size: 1rem;
    }

    .big-bart,
    .live-bart {
        width: 200px;
        height: 200px;
    }

    /* --- DECAY --- */
    .decay-demo-section {
        padding: 60px 0;
    }

    .decay-demo-section .section-header {
        text-align: center;
        padding: 0 24px;
        margin-bottom: 40px;
    }

    .decay-demo-section .section-header h2 {
        font-size: 1.8rem;
        padding: 0;
        margin-bottom: 16px;
    }

    .decay-demo-section .section-header p {
        font-size: 1rem;
        max-width: 100%;
        margin: 0 auto;
        padding: 0;
    }

    .decay-demo {
        width: 100%;
        max-width: 100%;
        padding: 0 16px;
    }

    /* Fix controls exceeding width */
    .decay-controls {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .decay-btn {
        width: 100%;
        justify-content: center;
    }

    .decay-task-card {
        padding: 16px;
    }

    /* --- COMPARISON --- */
    .comparison-section {
        padding: 60px 0;
    }

    .comparison-container {
        padding: 0 16px;
    }

    .comparison-table {
        overflow-x: auto;
        display: block;
    }

    .comparison-row {
        min-width: 500px;
    }

    /* --- SCREENSHOTS --- */
    .screenshots-section {
        padding: 60px 0;
    }

    .screenshots-gallery {
        gap: 16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .screenshot-phone {
        width: 220px;
        height: 460px;
    }

    .screenshot-phone:hover {
        transform: none;
    }

    /* --- WIDGETS --- */
    .widgets-section {
        padding: 60px 0;
    }

    .widgets-container {
        padding: 0 16px;
    }

    .widgets-header {
        margin-bottom: 32px;
    }

    .widgets-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .widget-card {
        padding: 20px;
    }

    .widget-preview {
        height: 100px;
    }

    .widgets-features {
        gap: 16px;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* --- FEATURE SHOWCASE --- */
    .feature-showcase-section {
        padding: 60px 0;
    }

    .showcase-header h2 {
        font-size: 1.8rem;
    }

    .showcase-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0 16px 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .showcase-tabs::-webkit-scrollbar {
        display: none;
    }

    .showcase-tab {
        min-width: 80px;
        flex-shrink: 0;
        padding: 10px 16px;
    }

    .showcase-content {
        padding: 0 16px;
        min-height: auto;
    }

    /* --- STATS --- */
    .stat-row {
        flex-direction: column;
        gap: 24px;
        align-items: center;
    }

    .stat-separator {
        display: none;
    }

    .social-proof {
        padding: 40px 16px;
    }

    /* --- FOOTER --- */
    footer {
        padding: 48px 16px;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 32px;
    }

    .footer-right {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-top-row {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }

    .footer-right-col {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .footer-nav-primary,
    .footer-nav-legal {
        display: flex;
        gap: 16px;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* --- Value Props --- */
    .value-props {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .value-prop {
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }

    /* --- Feedback Page --- */
    .feedback-page {
        padding: 100px 16px 60px;
    }

    .feedback-header h1 {
        font-size: 2rem;
    }

    .user-inputs {
        grid-template-columns: 1fr;
    }

    /* --- Performance: reduce/disable heavy animations on mobile --- */
    .noise-overlay {
        animation: none;
        opacity: 0.03;
    }

    .floating-orb {
        display: none;
    }

    .ambient-glow {
        opacity: 0.2;
        filter: blur(100px);
    }

    .grid-overlay {
        opacity: 0.15;
    }
}


/* ===============================================================
   7. SMALL PHONES (< 480px)
   =============================================================== */
@media (max-width: 479px) {
    .liquid-nav {
        width: 95% !important;
        min-width: unset !important;
        padding: 4px 12px !important;
    }

    .nav-brand span {
        font-size: 0.85rem;
    }

    .hero-section {
        padding: 110px 12px 32px;
        background-size: 100% auto;
    }

    .hero-content h1 {
        font-size: 1.85rem;
    }

    .hero-subtext {
        font-size: 0.95rem;
    }

    .hero-btn-large img {
        width: 140px;
    }

    .section-header h2 {
        font-size: 1.7rem;
    }

    .glass-panel {
        padding: 16px;
        border-radius: 20px;
    }

    .bento-grid {
        gap: 12px;
    }

    .showcase-text h2 {
        font-size: 1.8rem;
    }

    .showcase-text-center h2 {
        font-size: 1.8rem;
    }

    .mascot-text h2 {
        font-size: 1.8rem;
    }

    .big-bart,
    .live-bart {
        width: 160px;
        height: 160px;
    }

    .spotlight-text h3 {
        font-size: 1.5rem;
    }

    .spotlight-phone {
        width: 200px;
        height: 420px;
    }

    .screenshot-phone {
        width: 200px;
        height: 420px;
    }

    .decay-demo-section .section-header h2 {
        font-size: 1.5rem;
    }

    .eq-badge span {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .feedback-header h1 {
        font-size: 1.8rem;
    }
}


/* ===============================================================
   8. LANDSCAPE iPAD (1024x768 landscape)
   =============================================================== */
@media (min-width: 1024px) and (max-width: 1199px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding-top: 160px;
    }
}

/* ===============================================================
   9. PORTRAIT iPAD handling  
   =============================================================== */
@media (min-width: 768px) and (max-width: 1023px) and (orientation: portrait) {
    .hero-section {
        background-size: 180vh;
        padding-top: 150px;
    }

    .hero-content h1 {
        font-size: 3.2rem;
    }
}


/* ===============================================================
   10. PRINT SAFETY (hide decorative elements)
   =============================================================== */
@media print {

    .noise-overlay,
    .custom-cursor,
    .ambient-glow,
    .grid-overlay,
    .floating-orb,
    #chaos-container {
        display: none !important;
    }
}