/* ================================================================
   Quick AI Search Hub — responsive.css
   Breakpoints: 991 / 767 / 575 / 480
================================================================ */

/* ----------------------------------------------------------------
   tablet (≤ 991px) — stack hero, collapse nav, stack how-it-works
---------------------------------------------------------------- */
@media (max-width: 991px) {
    .site-header { margin-top: 12px; }
    .header-container { padding: 0 20px; }

    .site-header .site-mobile-logo { display: block; }

    .site-header .toggle-menu {
        display: flex;
        flex-direction: column;
        gap: 5px;
        width: 28px;
        cursor: pointer;
    }

    .site-header .toggle-menu .bar {
        display: block;
        width: 28px;
        height: 3px;
        border-radius: 2px;
        transition: all 0.3s;
    }

    .site-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: var(--surface);
        flex-direction: column;
        align-items: flex-start;
        padding: 40px 28px;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 9999;
        overflow-y: auto;
    }

    .site-nav.nav-open { transform: translateX(0); }

    .site-nav .close-menu {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        width: 100%;
        margin-bottom: 24px;
        font-family: var(--font-display);
        font-weight: 600;
        cursor: pointer;
        color: var(--text-muted);
    }

    .site-nav .site-logo { margin-bottom: 32px; }

    .site-header .site-main-menu {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        margin-bottom: 24px;
    }

    .site-header .site-main-menu li {
        width: 100%;
        padding: 1.2rem 0;
        border-bottom: 1px solid var(--border);
    }

    .site-header .site-main-menu li > a {
        margin: 0;
        font-size: 1.6rem;
    }

    .menu-wrapper {
        flex-direction: column;
        width: 100%;
    }

    .title-big { font-size: 4.4rem; }
    .hero-title { font-size: 4rem; }

    .hero-split {
        flex-direction: column;
        text-align: center;
        gap: 3.2rem;
        padding: 4rem 1.6rem 5rem;
    }

    .hero-text { text-align: left; }

    .hero-cta { justify-content: flex-start; }

    .hero-trust { justify-content: flex-start; }

    .hero-stage { width: 320px; }
    .hero-stage-tether { display: none; }
    .hero-popup-img { max-width: 280px; transform: rotate(0); }

    /* Flow thread — drop the central spine, full-width turns, left-aligned */
    .flow { padding: 7rem 0 7rem; }
    .flow::before { display: none; }
    .flow-thread { gap: 5rem; max-width: 100%; }
    .flow-turn,
    .flow-turn--left,
    .flow-turn--right,
    .flow-turn--center {
        width: 100%;
        max-width: 640px;
        margin-left: 0;
        margin-right: auto;
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        gap: 1.8rem;
    }
    .flow-turn--center { flex-direction: column; align-items: flex-start; text-align: left; }
    .flow-turn--right .flow-figure,
    .flow-turn--center .flow-turn-desc,
    .flow-turn--center .flow-prompt-line { margin-left: 0; margin-right: auto; }
    .flow-turn--right .flow-turn-desc { margin-left: 0; }
    .flow-numeral { font-size: 6rem; margin-top: -0.4rem; }
    .flow-turn-title { font-size: 2.1rem; }

    /* Palette — drop the prefix and count columns on tablet */
    .palette-row {
        grid-template-columns: 56px 1fr;
        gap: 1.8rem;
        padding: 2.2rem 1rem;
    }
    .palette-prefix,
    .palette-count { display: none; }

    .terminal-cta-title { font-size: 3.6rem; }
    .terminal-cta-prompt { font-size: 1.5rem; }
    .marquee { padding: 2.2rem 0 4rem; }
    .marquee-item { font-size: 1.3rem; }

    .footer-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 32px;
    }
}

/* ----------------------------------------------------------------
   mobile landscape (≤ 767px) — single-col features, smaller hero
---------------------------------------------------------------- */
@media (max-width: 767px) {
    .title-big { font-size: 3.6rem; }
    .title { font-size: 3rem; }

    .eyebrow { font-size: 1.15rem; }
    .hero-subtitle { font-size: 1.55rem; }
    .hero-title { font-size: 3.4rem; }

    .hero-split {
        text-align: center;
        align-items: center;
    }

    .hero-text { text-align: center; }
    .hero-cta { justify-content: center; }
    .hero-trust { justify-content: center; }

    .hero-particles { opacity: 0.4; }

    .flow { padding: 5.4rem 0 5.4rem; }
    .flow-header { margin-bottom: 4rem; }
    .flow-headline { font-size: 3rem; }
    .flow-thread { gap: 4.4rem; }
    .flow-numeral { font-size: 5.2rem; }
    .flow-turn-title { font-size: 1.95rem; }
    .flow-turn-desc { font-size: 1.5rem; }
    .flow-prompt-line { font-size: 1.5rem; flex-wrap: wrap; }

    .palette { padding: 5.4rem 0 6rem; }
    .palette-title { font-size: 3rem; }
    .palette-header { margin-bottom: 3.4rem; }
    .palette-title-row { font-size: 1.85rem; }

    .terminal-cta { padding: 5rem 0 0; }
    .terminal-cta-title { font-size: 3rem; }
    .terminal-cta-inner { padding-bottom: 3.4rem; }
    .terminal-cta-prompt { font-size: 1.35rem; }
    .terminal-cta-mark { font-size: clamp(14rem, 36vw, 22rem); }

    .contact-card { height: auto; min-height: 280px; }
    .contact-card__subtitle { font-size: 2.2rem; }
    .contact-section__container.container { padding: 0 20px; }

    .footer-nav-wrapper { gap: 32px; }
}

/* ----------------------------------------------------------------
   mobile portrait (≤ 575px) — reduced padding, tighter type
---------------------------------------------------------------- */
@media (max-width: 575px) {
    html { font-size: 9px; }

    .site-header { margin-top: 8px; }

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

    .title-big { font-size: 3.2rem; }
    .title { font-size: 2.6rem; }

    .fullscreen.hero { padding: 3rem 0 0; }
    .hero-bg { left: 16px; right: 16px; border-radius: 22px; }
    .hero-split { padding: 3.2rem 0.8rem 4rem; }
    .hero-title { font-size: 3rem; }

    .hero-stage { width: 260px; }
    .hero-popup-img { max-width: 240px; }

    .flow { padding: 4.4rem 0 4.4rem; }
    .flow-thread { gap: 3.6rem; }
    .flow-numeral { font-size: 4.6rem; }
    .flow-turn { gap: 1.4rem; }
    .flow-turn-title { font-size: 1.8rem; }
    .flow-turn-desc { font-size: 1.4rem; }
    .flow-prompt-line { font-size: 1.35rem; }
    .flow-prompt-prefix { font-size: 1.55rem; }
    .flow-prompt-caret { height: 18px; }

    .palette { padding: 4.4rem 0 5rem; }
    .palette-row {
        grid-template-columns: 48px 1fr;
        gap: 1.4rem;
        padding: 2rem 0.6rem;
    }
    .palette-icon { width: 48px; height: 48px; }
    .palette-title-row { font-size: 1.7rem; }
    .palette-desc { font-size: 1.35rem; }

    .terminal-cta { padding: 4rem 0 0; }
    .terminal-cta-title { font-size: 2.6rem; }
    .terminal-cta-sub { font-size: 1.5rem; margin-bottom: 2.4rem; }
    .terminal-cta-prompt { font-size: 1.25rem; margin-bottom: 2rem; }
    .terminal-cta-mark { font-size: clamp(12rem, 42vw, 18rem); }
    .marquee { padding: 1.8rem 0 3.4rem; }
    .marquee-track { gap: 3rem; animation-duration: 36s; }
    .marquee-item { font-size: 1.2rem; }

    .footer-content { padding: 3.6rem 0; }
    .footer-nav-wrapper { gap: 24px; flex-wrap: wrap; }

    .terms-section { padding: 4rem 0; }
    .main-bg { left: 16px; right: 16px; border-radius: 22px; }
}

/* ----------------------------------------------------------------
   small mobile (≤ 480px) — final tightening
---------------------------------------------------------------- */
@media (max-width: 480px) {
    .title-big { font-size: 2.6rem; }
    .title { font-size: 2.2rem; }

    .hero-title { font-size: 2.6rem; }
    .hero-subtitle { font-size: 1.4rem; }

    .hero-cta { gap: 10px; }
    .hero-cta .btn,
    .hero-cta .btn_main,
    .hero-cta .btn_ghost {
        width: 100%;
        justify-content: center;
    }

    .hero-trust { gap: 12px 16px; font-size: 1.3rem; }

    .hero-stage { width: 100%; max-width: 280px; }
    .hero-popup-img { max-width: 220px; }

    .flow-headline { font-size: 2.4rem; }
    .palette-title { font-size: 2.4rem; }

    .flow-numeral { font-size: 4rem; }
    .flow-prompt-line { font-size: 1.2rem; }

    .terminal-cta-title { font-size: 2.2rem; }
    .terminal-cta-prompt { font-size: 1.1rem; }
    .terminal-cta-mark { -webkit-text-stroke-width: 1.5px; }

    .contact-card { padding: 2.2rem 1.8rem; }
    .contact-card__subtitle { font-size: 2rem; }

    .footer-nav-wrapper {
        gap: 14px;
        flex-direction: column;
    }
}
