/* ============================================
   VibeReads Landing Page Styles
   Cozy, bookish, mystical aesthetic
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    /* Core palette - warm purples with cream */
    --vr-bg: #faf8f5;
    --vr-bg-warm: #f5f0eb;
    --vr-bg-accent: #f0e6f6;
    --vr-accent: #7c5ce0;
    --vr-accent-light: #a78bfa;
    --vr-accent-dark: #5b3cc4;
    --vr-accent-glow: rgba(124, 92, 224, 0.25);
    --vr-secondary: #e879a9;
    --vr-ink: #1a1625;
    --vr-ink-light: #3d3654;
    --vr-sub: rgba(26, 22, 37, 0.65);
    --vr-muted: rgba(26, 22, 37, 0.45);
    --vr-border: rgba(124, 92, 224, 0.12);
    --vr-border-light: rgba(26, 22, 37, 0.08);

    /* Typography */
    --font-display: 'Crimson Pro', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing & sizing */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-pill: 999px;
    --shell-width: 1100px;
    --shell-narrow: 720px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(26, 22, 37, 0.06);
    --shadow-md: 0 8px 30px rgba(26, 22, 37, 0.08);
    --shadow-lg: 0 20px 60px rgba(26, 22, 37, 0.12);
    --shadow-glow: 0 8px 40px var(--vr-accent-glow);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--vr-ink);
    background: var(--vr-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

/* ---------- Typography ---------- */
h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    color: var(--vr-ink);
}

h1 {
    font-size: clamp(32px, 5vw, 48px);
    letter-spacing: -0.02em;
}

h1 em {
    font-style: italic;
    color: var(--vr-accent);
}

h2 {
    font-size: clamp(26px, 4vw, 36px);
    letter-spacing: -0.01em;
}

h3 {
    font-size: 18px;
    font-weight: 500;
}

p {
    color: var(--vr-sub);
}

/* ---------- Layout ---------- */
.shell {
    max-width: var(--shell-width);
    margin: 0 auto;
    padding: 0 24px;
}

.shell-narrow {
    max-width: var(--shell-narrow);
}

/* ---------- Components: Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-pill);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--vr-accent) 0%, var(--vr-accent-dark) 100%);
    color: white;
    box-shadow: var(--shadow-glow), var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 50px var(--vr-accent-glow), var(--shadow-md);
}

.btn-ghost {
    background: transparent;
    color: var(--vr-ink);
    border: 1.5px solid var(--vr-border);
}

.btn-ghost:hover {
    border-color: var(--vr-accent);
    color: var(--vr-accent);
    background: var(--vr-bg-accent);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 15px;
}

.btn-icon {
    width: 18px;
    height: 18px;
}

/* ---------- Components: Chip ---------- */
.chip {
    display: inline-block;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--vr-accent);
    background: var(--vr-bg-accent);
    border-radius: var(--radius-pill);
}

.chip-alt {
    background: linear-gradient(135deg, var(--vr-accent-glow) 0%, rgba(232, 121, 169, 0.15) 100%);
}

/* ---------- Header ---------- */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 72px;
    background: rgba(250, 248, 245, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--vr-border-light);
}

.topbar-shell {
    max-width: var(--shell-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--vr-ink);
}

.nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--vr-sub);
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--vr-accent);
}

.topbar-cta {
    padding: 10px 20px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
}

.nav-toggle-bar {
    width: 20px;
    height: 2px;
    background: var(--vr-ink);
    border-radius: 2px;
    transition: all 0.2s;
}

/* Mobile nav */
@media (max-width: 768px) {
    .topbar {
        height: 64px;
    }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: rgba(250, 248, 245, 0.98);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--vr-border-light);
        padding: 16px 24px;
    }

    .nav.is-open {
        display: flex;
    }

    .nav-link {
        padding: 12px 0;
        width: 100%;
    }

    .topbar-cta {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.is-open .nav-toggle-bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.is-open .nav-toggle-bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.is-open .nav-toggle-bar:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}

/* ---------- Hero Section ---------- */
.hero {
    position: relative;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-shell {
    max-width: var(--shell-width);
    margin: 0 auto;
    padding: 0 24px;
}

.hero-card {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 60px;
    align-items: center;
    background: white;
    border-radius: var(--radius-xl);
    padding: 48px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.hero-media {
    position: relative;
    display: flex;
    justify-content: center;
}

/* Phone frame */
.phone-frame {
    position: relative;
    width: 260px;
    aspect-ratio: 9 / 19.5;
    background: #1a1625;
    border-radius: 40px;
    padding: 12px;
    box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255,255,255,0.1);
}

.phone-notch {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 28px;
    background: #1a1625;
    border-radius: 20px;
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--vr-bg);
    border-radius: 32px;
    overflow: hidden;
    position: relative;
}

.phone-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.phone-slide.active {
    opacity: 1;
}

.phone-dots {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.phone-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--vr-border);
    transition: all 0.2s;
}

.phone-dot.active {
    background: var(--vr-accent);
    width: 24px;
    border-radius: 4px;
}

/* Floating cards */
.float-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    font-size: 13px;
    font-weight: 500;
    animation: float 4s ease-in-out infinite;
}

.float-emoji {
    font-size: 16px;
}

.float-vibe {
    top: 20%;
    right: -20px;
    animation-delay: 0s;
}

.float-book {
    bottom: 25%;
    left: -30px;
    animation-delay: 2s;
}

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

/* Hero content */
.hero-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-body {
    font-size: 16px;
    line-height: 1.7;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--vr-ink-light);
    background: var(--vr-bg-warm);
    border-radius: var(--radius-pill);
}

.tag-emoji {
    font-size: 14px;
}

/* Hero background */
.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.hero-orb-1 {
    width: 500px;
    height: 500px;
    background: var(--vr-accent-light);
    top: -200px;
    right: -100px;
    opacity: 0.3;
}

.hero-orb-2 {
    width: 400px;
    height: 400px;
    background: var(--vr-secondary);
    bottom: -150px;
    left: -100px;
    opacity: 0.2;
}

.hero-orb-3 {
    width: 300px;
    height: 300px;
    background: var(--vr-accent);
    top: 50%;
    left: 30%;
    opacity: 0.15;
}

/* Hero responsive */
@media (max-width: 900px) {
    .hero-card {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 32px;
    }

    .hero-media {
        order: -1;
    }

    .phone-frame {
        width: 220px;
    }

    .float-card {
        display: none;
    }
}

/* ---------- Features Section ---------- */
.features {
    padding: 100px 0;
    background: var(--vr-bg-warm);
}

.section-header {
    text-align: center;
    max-width: 580px;
    margin: 0 auto 60px;
}

.section-header .chip {
    margin-bottom: 16px;
}

.section-header h2 {
    margin-bottom: 12px;
}

.section-header p {
    font-size: 17px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-card-large {
    grid-column: span 3;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    align-items: start;
    padding: 36px;
    background: linear-gradient(135deg, var(--vr-bg-accent) 0%, white 100%);
}

.feature-card-large .feature-icon {
    font-size: 48px;
}

.feature-card-vibe {
    background: linear-gradient(135deg, #f5f0ff 0%, #fdf2f8 50%, #faf8f5 100%);
}

.feature-card-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-card-highlight {
    position: relative;
    border: 2px solid var(--vr-accent);
    background: linear-gradient(135deg, rgba(124, 92, 224, 0.05) 0%, white 100%);
}

.feature-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: white;
    background: var(--vr-accent);
    border-radius: var(--radius-pill);
}

.vibe-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.vibe-pill {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--vr-accent);
    background: white;
    border: 1px solid var(--vr-border);
    border-radius: var(--radius-pill);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.feature-card h3 {
    margin-bottom: 8px;
    color: var(--vr-ink);
}

.feature-card p {
    font-size: 14px;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-card-large {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }
}

/* ---------- How It Works ---------- */
.how-it-works {
    padding: 100px 0;
}

.steps {
    display: flex;
    gap: 40px;
    margin-top: 20px;
}

.step {
    flex: 1;
    display: flex;
    gap: 20px;
    padding: 24px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.step-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    color: var(--vr-accent);
    background: var(--vr-bg-accent);
    border-radius: 50%;
}

.step-content h3 {
    margin-bottom: 8px;
}

.step-content p {
    font-size: 14px;
}

@media (max-width: 900px) {
    .steps {
        flex-direction: column;
        gap: 20px;
    }
}

/* ---------- Social Proof ---------- */
.social-proof {
    padding: 60px 0;
    background: linear-gradient(180deg, var(--vr-bg) 0%, var(--vr-bg-warm) 100%);
}

.testimonials {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonial {
    padding: 24px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border-left: 3px solid var(--vr-accent);
}

.testimonial-text {
    font-family: var(--font-display);
    font-size: 17px;
    font-style: italic;
    line-height: 1.6;
    color: var(--vr-ink);
    margin-bottom: 12px;
}

.testimonial-author {
    font-size: 13px;
    font-weight: 500;
    color: var(--vr-muted);
}

@media (max-width: 900px) {
    .testimonials {
        grid-template-columns: 1fr;
    }
}

/* ---------- FAQ Section ---------- */
.faq {
    padding: 100px 0;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--vr-border-light);
    overflow: hidden;
    transition: all 0.2s;
}

.faq-item:hover {
    border-color: var(--vr-border);
}

.faq-item[open] {
    border-color: var(--vr-accent);
    box-shadow: var(--shadow-sm);
}

.faq-question {
    padding: 20px 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    font-size: 20px;
    font-weight: 400;
    color: var(--vr-accent);
    transition: transform 0.2s;
}

.faq-item[open] .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 24px 20px;
}

.faq-answer p {
    font-size: 15px;
    line-height: 1.7;
}

/* ---------- Download CTA ---------- */
.download-cta {
    padding: 100px 0;
}

.cta-card {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, var(--vr-bg-accent) 0%, #fce7f3 50%, var(--vr-bg-warm) 100%);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, var(--vr-accent-glow) 0%, transparent 50%);
    pointer-events: none;
}

.cta-emoji {
    font-size: 48px;
    display: block;
    margin-bottom: 20px;
}

.cta-card h2 {
    margin-bottom: 12px;
    position: relative;
}

.cta-card > p {
    font-size: 17px;
    margin-bottom: 28px;
    position: relative;
}

.cta-actions {
    position: relative;
}

.cta-note {
    margin-top: 16px;
    font-size: 13px;
    color: var(--vr-muted);
    position: relative;
}

/* ---------- Footer ---------- */
.footer {
    padding: 24px 0;
    background: rgba(250, 248, 245, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--vr-border-light);
}

.footer-shell {
    max-width: var(--shell-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-copy {
    font-size: 13px;
    color: var(--vr-muted);
}

.footer-tagline {
    font-size: 13px;
    color: var(--vr-muted);
}

.footer-right {
    display: flex;
    gap: 24px;
}

.footer-link {
    font-size: 13px;
    color: var(--vr-sub);
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--vr-accent);
}

@media (max-width: 600px) {
    .footer-shell {
        flex-direction: column;
        text-align: center;
    }

    .footer-left {
        flex-direction: column;
        gap: 8px;
    }
}

/* ---------- Utilities ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
