/* ============================================
   Blanda Landing Page — Light Theme
   Design: docs/plans/2026-02-27-landing-page-design.md
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #F8F3E6;
    --surface: #FFFFFF;
    --text: #1A1A1A;
    --text-secondary: #888888;
    --text-tertiary: #AAAAAA;
    --accent-green: #34C759;
    --accent-orange: #F5A623;
    --border: rgba(0, 0, 0, 0.06);
    --shadow-mixer: 0 40px 120px rgba(0, 0, 0, 0.12), 0 12px 40px rgba(0, 0, 0, 0.08), 0 0 0 0.5px rgba(0, 0, 0, 0.06);
    --shadow-btn: 0 16px 48px rgba(0, 0, 0, 0.25), 0 6px 16px rgba(0, 0, 0, 0.18);
    --max-width: 1100px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 18px;
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    filter: url(#grain);
    opacity: 0.12;
    pointer-events: none;
    z-index: 0;
}

a { color: inherit; text-decoration: none; }
.sep { opacity: 0.35; margin: 0 1px; }
button { font-family: inherit; border: none; cursor: pointer; background: none; }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: transform 0.2s var(--ease), filter 0.2s var(--ease);
    text-decoration: none;
}

.btn-primary {
    background: var(--text);
    color: var(--bg);
    height: 54px;
    padding: 0 36px;
    border-radius: 12px;
    font-size: 16px;
    box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
    transform: scale(1.02);
    filter: brightness(1.15);
}

.btn-large {
    height: 56px;
    padding: 0 36px;
    font-size: 17px;
    border-radius: 14px;
}

/* --- Nav --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0 40px;
    transition: background 0.3s, backdrop-filter 0.3s;
}

.nav.scrolled {
    background: rgba(248, 243, 230, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.nav-cta {
    font-size: 13px;
    font-weight: 500;
    padding: 8px 20px;
    background: var(--text);
    color: var(--bg);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.2s var(--ease);
}

.nav-cta:hover {
    filter: brightness(1.15);
}

/* --- Hero --- */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 140px 40px 80px;
    gap: 32px;
    position: relative;
}

.hero-text h1 {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(40px, 5vw, 64px);
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 1.05;
    max-width: 1060px;
}

.hero-sub {
    font-size: 20px;
    color: var(--text-secondary);
    margin-top: 20px;
}

/* --- Mixer --- */
.mixer {
    -webkit-user-select: none;
    user-select: none;
    background: #FFFFFF;
    border-radius: 16px;
    width: 420px;
    margin-top: 8px;
    margin-bottom: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12), 0 8px 24px rgba(0,0,0,0.08), 0 0 0 0.5px rgba(0,0,0,0.04);
    overflow: hidden;
    transform: perspective(1200px) rotateY(-2.5deg) rotateX(1.5deg);
    transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
    will-change: transform;
}

.mixer-row--master {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 12px 12px;
}

.mixer-row--master + .mixer-row--master {
    padding-top: 4px;
}

.mixer-separator {
    height: 1px;
    background: #E8E8EC;
    opacity: 0.6;
}

.mixer-apps {
    padding: 8px 4px 8px;
}

.mixer-row--app {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 10px;
    transition: background 0.15s ease-out;
    cursor: default;
}

/* VStack: name row + slider, matches Swift VStack(spacing: 2) */
.mixer-row-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-grow: 1;
    min-width: 0;
}

.mixer-row--app:hover {
    background: #F0F0F3;
}

.mixer-row-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mixer-icon--app {
    overflow: hidden;
    border: 0.5px solid rgba(0, 0, 0, 0.08);
}

.mixer-icon--app img,
.mixer-icon--device img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

.mixer-icon--device {
    background: none;
    color: #6B7280;
    border: none;
}

.mixer-row-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    min-width: 0;
}

.mixer-row-name {
    font-size: 12px;
    font-weight: 500;
    color: #6B7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mixer-row-pct {
    font-size: 11px;
    font-weight: 500;
    color: #B0B8C0;
    flex-shrink: 0;
    margin-left: 8px;
    font-variant-numeric: tabular-nums;
    transition: opacity 0.15s ease;
}

.mixer-row--app .mixer-row-pct {
    opacity: 0;
}

.mixer-row--app:hover .mixer-row-pct {
    opacity: 1;
}

.mixer-row--app:not([data-playing]) .mixer-row-name,
.mixer-row--app:not([data-playing]) .mixer-row-icon {
    opacity: 0.5;
}

.mixer-slider-track {
    width: 100%;
    height: 10px;
    background: #EAEBEE;
    border-radius: 5px;
    position: relative;
    transition: transform 0.12s ease;
}

.mixer-slider-fill {
    height: 100%;
    border-radius: 5px;
    position: absolute;
    top: 0;
    left: 0;
    min-width: 10px;
    pointer-events: none;
}

.mixer-slider-fill--app {
    background-image:
        linear-gradient(to bottom, rgba(255,255,255,0.18), rgba(255,255,255,0.05) 40%, transparent 60%, rgba(0,0,0,0.06)),
        linear-gradient(to right, #34B86A, #42CC7C);
    background-size: 100% 100%;
    box-shadow: 0 0 8px rgba(52, 199, 89, 0.35);
}

.mixer-slider-fill--device {
    background-image:
        linear-gradient(to bottom, rgba(255,255,255,0.18), rgba(255,255,255,0.05) 40%, transparent 60%, rgba(0,0,0,0.06));
    background-color: #F5A623;
    box-shadow: 0 0 6px rgba(245, 166, 35, 0.3);
}

.mixer-slider-fill--muted {
    background: #D0D2D8 !important;
    background-image: none !important;
    box-shadow: none !important;
}

.mixer-slider-input {
    position: absolute;
    top: -4px;
    left: 0;
    width: 100%;
    height: calc(100% + 8px);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    background: transparent;
}

.mixer-slider-input::-webkit-slider-runnable-track {
    height: 10px;
    background: transparent;
    border-radius: 5px;
}

.mixer-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 0;
    height: 0;
    background: transparent;
    border: none;
}

.mixer-slider-track::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 5px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.04), transparent 35%);
    pointer-events: none;
    z-index: 1;
}

/* --- Audio Challenge Button --- */
.audio-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 36px 12px 28px;
    border-radius: 28px;
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.04);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s var(--ease);
    position: relative;
}

.audio-btn::before,
.audio-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    animation: ripple-out 3s ease-out infinite;
    pointer-events: none;
}

.audio-btn::after {
    animation-delay: 1.5s;
}

.audio-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

.audio-btn.active {
    background: rgba(0, 0, 0, 0.06);
}

.audio-btn.active::before,
.audio-btn.active::after {
    animation: none;
    opacity: 0;
}

.audio-btn-icon {
    flex-shrink: 0;
}

.audio-btn-hint {
    color: var(--text-secondary);
    font-style: italic;
}

@keyframes ripple-out {
    0% { inset: 0; opacity: 0.5; }
    100% { inset: -14px; opacity: 0; }
}

/* --- Scroll Hint --- */
.scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    opacity: 0.5;
    margin-top: 24px;
    animation: float 2.5s ease-in-out infinite;
}

.scroll-hint-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, currentColor);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* --- Feature Showcase --- */
.features {
    padding: 40px 40px 80px;
}

.features-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    gap: 56px;
    align-items: flex-start;
}

.feature-selector {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 420px;
    flex-shrink: 0;
    padding-top: 20px;
}

.feature-item {
    text-align: left;
    padding: 0 0 0 18px;
    font-size: 20px;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.4;
    border-left: 3px solid transparent;
    transition: color 0.3s var(--ease), border-left-color 0.3s var(--ease);
}

.feature-item--active {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    color: var(--text);
    border-left-color: var(--text);
}

.feature-stage {
    flex-grow: 1;
    height: 380px;
    border-radius: 16px;
    background: #E8E4D9;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.10), 0 8px 24px rgba(0,0,0,0.06);
}

.feature-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.feature-video.loaded {
    display: block;
}

.feature-stage-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 14px;
}

/* --- Final CTA --- */
.final-cta {
    padding: 80px 40px 120px;
    text-align: center;
}

.final-cta h2 {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 32px;
}

.final-cta h2 em {
    font-style: italic;
}

/* --- Footer --- */
.footer {
    padding: 40px;
    position: relative;
}

.footer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, var(--bg) 100%);
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.footer:hover::after {
    opacity: 0;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.footer-credit {
    font-size: 14px;
    color: var(--text-secondary);
    opacity: 0.55;
    text-shadow: 0 0 0px transparent;
    transition: opacity 0.5s ease, text-shadow 0.5s ease;
}

.footer:hover .footer-credit {
    opacity: 1;
    text-shadow: 0 0 12px rgba(0, 0, 0, 0.15);
}

.footer-credit a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-credit a:hover {
    color: var(--text);
}

/* --- Playing Icon Aura --- */
.mixer-icon--breathing {
    --aura: 0.5;
    animation: aura-pulse 2s ease-in-out infinite;
}

.mixer-icon--muted {
    opacity: 0.3 !important;
    transform: scale(0.92);
    filter: none !important;
}

@keyframes aura-pulse {
    0%, 100% {
        opacity: 0.85;
        filter: drop-shadow(0 2px calc(5px + 6px * var(--aura)) rgba(0,0,0, calc(0.15 + 0.2 * var(--aura))));
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 2px calc(8px + 10px * var(--aura)) rgba(0,0,0, calc(0.2 + 0.3 * var(--aura))));
    }
}

/* --- Scroll Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav { padding: 0 20px; }
    .nav-inner { justify-content: center; }
    .nav-cta { display: none; }

    .hero { padding: 100px 20px 40px; gap: 24px; }
    .mixer { width: 100%; max-width: 380px; }

    .features { padding: 40px 20px 60px; }
    .features-inner {
        flex-direction: column;
        gap: 28px;
        align-items: center;
    }
    .feature-selector {
        width: 100%;
        gap: 16px;
    }
    .feature-item {
        font-size: 17px;
        padding: 10px 0 10px 16px;
        border-radius: 0 8px 8px 0;
    }
    .feature-item:not(.feature-item--active):active {
        background: rgba(0, 0, 0, 0.03);
    }
    .feature-stage {
        width: 100%;
        height: 280px;
    }

    .scroll-hint { margin-top: 12px; }

    .final-cta { padding: 60px 20px 80px; }
}
