/* =====================================================================
   QUALIA product page — awaio nav/footer from ../style.css, Qualia's
   own look inside: pure black, Inter, indigo-to-violet glow (from
   qualia/src/App.css), Bitcount Ink for the name, a faint CRT scanline.
   ===================================================================== */
.qualia-page {
    --q-bg: #151020;
    --q-ink: #e8e6f0;
    --q-muted: #8d8d99;
    --q-line: rgba(196, 181, 253, 0.12);
    --q-indigo: #6366f1;
    --q-violet: #a855f7;
    --q-indigo-soft: #818cf8;
    --q-violet-soft: #c084fc;
    --q-grad: linear-gradient(90deg, var(--q-indigo), var(--q-violet));
    --q-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --q-mono: 'JetBrains Mono', ui-monospace, monospace;
    background:
        radial-gradient(ellipse 80% 55% at 75% -5%, rgba(168, 85, 247, 0.30), transparent 70%),
        radial-gradient(ellipse 60% 50% at -5% 55%, rgba(99, 102, 241, 0.18), transparent 70%),
        radial-gradient(ellipse 70% 50% at 100% 100%, rgba(192, 132, 252, 0.14), transparent 70%),
        linear-gradient(180deg, #1A1428 0%, var(--q-bg) 100%);
    font-family: var(--q-sans);
}

.qualia-page .nav.aw-nav {
    background: rgba(24, 18, 37, 0.72);
    border-bottom-color: rgba(196, 181, 253, 0.12);
}

/* Faint CRT scanlines over the whole page (Qualia's "CRT" preset, turned way down) */
.qualia-page::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
    background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px);
}

/* the hero glow is allowed past the hero box (clipping it there left a hard purple edge
   beside the phone); the page clips it at the screen edge instead */
.qualia-page .scroll-container {
    overflow-x: hidden;
}

/* ---------- Hero ---------- */
.q-hero {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 3rem 5rem;
}

.q-hero::before {
    content: "";
    position: absolute;
    width: 70vw;
    height: 70vw;
    max-width: 900px;
    max-height: 900px;
    right: -15%;
    top: 5%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.22), rgba(168, 85, 247, 0.08) 45%, transparent 70%);
    filter: blur(40px);
    z-index: -1;
    pointer-events: none;
}

.q-status {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--q-mono);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--q-violet-soft);
    border: 1px solid rgba(168, 85, 247, 0.35);
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    margin-bottom: 2rem;
}

.q-status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--q-violet);
    box-shadow: 0 0 10px var(--q-violet);
    animation: qPulse 2.4s ease-in-out infinite;
}

@keyframes qPulse {
    50% {
        opacity: 0.35;
    }
}

.q-wordmark {
    font-family: 'Bitcount Ink', var(--q-mono);
    font-weight: 400;
    font-size: clamp(4rem, 11vw, 8.5rem);
    line-height: 0.9;
    margin: 0 0 1.5rem;
    color: #fff;
}

.q-tagline {
    font-size: clamp(1.15rem, 2vw, 1.5rem);
    line-height: 1.45;
    color: var(--q-ink);
    max-width: 30ch;
    margin: 0 0 1.25rem;
    font-weight: 400;
}

.q-sub {
    color: var(--q-muted);
    font-size: 1.02rem;
    line-height: 1.7;
    max-width: 52ch;
    margin: 0 0 2.25rem;
}

.q-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.q-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.4rem;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--q-ink);
    border: 1px solid var(--q-line);
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.q-btn:hover {
    border-color: rgba(129, 140, 248, 0.6);
    background: rgba(99, 102, 241, 0.08);
}

.q-btn.primary {
    background: var(--q-grad);
    border-color: transparent;
    color: #fff;
}

.q-btn.primary:hover {
    box-shadow: 0 0 28px rgba(139, 92, 246, 0.45);
}

/* Vertical screen recordings in a phone-ish frame */
.q-phone {
    position: relative;
    aspect-ratio: 9 / 16;
    width: 100%;
    max-width: 340px;
    justify-self: center;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #050508;
    box-shadow:
        0 0 0 6px #241B36,
        0 0 60px rgba(99, 102, 241, 0.25),
        0 30px 80px rgba(10, 6, 20, 0.6);
}

.q-phone video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---------- Sections ---------- */
.q-section {
    padding: 7rem 3rem;
    border-top: 1px solid var(--q-line);
}

.q-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.q-label {
    display: block;
    font-family: var(--q-mono);
    font-size: 0.72rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    background: var(--q-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    width: fit-content;
}

.q-h2 {
    font-weight: 600;
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: #fff;
    margin: 0 0 1.5rem;
    max-width: 22ch;
}

.q-body {
    font-size: 1.08rem;
    line-height: 1.75;
    color: #b9b7c6;
    max-width: 62ch;
    margin: 0 0 1.25rem;
}

.q-body em {
    color: #fff;
    font-style: normal;
}

.q-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.q-pillars {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 3rem;
}

.q-pillar {
    padding: 1.75rem;
    border: 1px solid var(--q-line);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.06), transparent 60%);
}

.q-pillar h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 0.6rem;
}

.q-pillar p {
    font-size: 0.97rem;
    line-height: 1.6;
    color: var(--q-muted);
    margin: 0;
}

/* Clips row */
.q-clips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.q-clip figcaption {
    margin-top: 1.25rem;
    text-align: center;
    font-family: var(--q-mono);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--q-muted);
}

/* Preset + mapping chips */
.q-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.25rem 0 2.5rem;
}

.q-chip {
    font-family: var(--q-mono);
    font-size: 0.8rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--q-line);
    color: var(--q-ink);
    background: rgba(255, 255, 255, 0.02);
}

.q-chip.alt {
    border-color: rgba(168, 85, 247, 0.3);
    color: var(--q-violet-soft);
}

.q-figure {
    margin: 0;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--q-line);
}

.q-figure img {
    width: 100%;
    display: block;
}

.qualia-page .footer.aw-footer {
    background: rgba(18, 13, 28, 0.85);
    border-top-color: rgba(196, 181, 253, 0.12);
}

@media (max-width: 900px) {
    .q-hero,
    .q-split {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .q-hero {
        padding-top: 8rem;
    }

    .q-pillars,
    .q-clips {
        grid-template-columns: 1fr;
    }

    .q-phone {
        max-width: 300px;
    }
}

@media (max-width: 600px) {
    .q-hero {
        padding: 7rem 1.5rem 4rem;
    }

    .q-section {
        padding: 4.5rem 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .q-status::before {
        animation: none;
    }
}

/* ---------- Clip viewer (click a phone to watch with sound) ---------- */
.q-phone[data-full] {
    cursor: pointer;
}

.q-open {
    position: absolute;
    left: 50%;
    bottom: 1.1rem;
    transform: translateX(-50%);
    padding: 0.55rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(196, 181, 253, 0.35);
    background: rgba(24, 18, 37, 0.78);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #fff;
    font-family: var(--q-sans);
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.q-phone:hover .q-open,
.q-open:focus-visible {
    opacity: 1;
    background: linear-gradient(90deg, var(--q-indigo), var(--q-violet));
    box-shadow: 0 0 24px rgba(139, 92, 246, 0.5);
}

.q-viewer {
    padding: 0;
    margin: auto;
    border: 0;
    background: transparent;
    max-width: none;
    max-height: none;
    overflow: visible;
}

.q-viewer::backdrop {
    background: rgba(16, 11, 26, 0.82);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.q-viewer video {
    display: block;
    height: min(86vh, 900px);
    max-width: 92vw;
    aspect-ratio: 9 / 16;
    border-radius: 22px;
    background: #0b0812;
    box-shadow: 0 0 0 1px rgba(196, 181, 253, 0.18), 0 0 80px rgba(139, 92, 246, 0.35);
}

.q-viewer-title {
    margin: 0.9rem 0 0;
    text-align: center;
    font-family: var(--q-mono);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #c4b5fd;
}

.q-viewer-close {
    position: absolute;
    top: -0.5rem;
    right: -3.25rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1px solid rgba(196, 181, 253, 0.3);
    background: rgba(24, 18, 37, 0.8);
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 600px) {
    .q-viewer-close {
        top: -3.25rem;
        right: 0;
    }
}
