/* ==========================================
   LIBRI APP - Complete Standalone Styles
   ========================================== */

/* CSS Custom Properties */
:root {
    /* Colors - Black & White Foundation */
    --color-black: #0a0a0a;
    --color-white: #fafafa;
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;

    /* Accent Colors */
    --color-blue: #3b82f6;
    --color-blue-light: #dbeafe;
    --color-blue-dark: #1d4ed8;

    --color-purple: #8b5cf6;
    --color-purple-light: #ede9fe;
    --color-purple-dark: #6d28d9;

    --color-teal: #14b8a6;
    --color-teal-light: #ccfbf1;
    --color-teal-dark: #0d9488;

    --color-amber: #f59e0b;
    --color-amber-light: #fef3c7;
    --color-amber-dark: #d97706;

    /* Rose (Libri Brand Color) */
    --color-rose: #a85751;
    --color-rose-light: #fdf2f1;
    --color-rose-dark: #8b453f;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    --font-size-6xl: 3.75rem;
    --font-size-7xl: 4.5rem;
    --font-size-8xl: 6rem;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-black);
    background-color: var(--color-white);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

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

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-4) 0;
    background: transparent;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.logo-text {
    font-size: var(--font-size-xl);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-black);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav-links a {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-gray-600);
    transition: color var(--transition-fast);
}

.nav-links a:hover {
    color: var(--color-black);
}

.nav-cta {
    background: var(--color-black);
    color: var(--color-white) !important;
    padding: var(--space-2) var(--space-5);
    border-radius: var(--radius-full);
}

.nav-cta:hover {
    background: var(--color-gray-800);
    color: var(--color-white) !important;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-black);
    transition: all var(--transition-fast);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-8);
    font-size: var(--font-size-base);
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-black);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-gray-800);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--color-black);
    border: 2px solid var(--color-gray-200);
}

.btn-secondary:hover {
    border-color: var(--color-black);
    background: var(--color-gray-50);
}

.btn-white {
    background: var(--color-white);
    color: var(--color-black);
}

.btn-white:hover {
    background: var(--color-gray-100);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-rose {
    background: var(--color-rose);
    color: var(--color-white);
}

.btn-rose:hover {
    background: var(--color-rose-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-arrow {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-fast);
}

.btn:hover .btn-arrow {
    transform: translateX(4px);
}

/* Section Styles */
.section-header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.section-tag {
    display: inline-block;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: var(--space-4);
}

.section-title {
    font-size: clamp(var(--font-size-3xl), 5vw, var(--font-size-5xl));
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: var(--space-4);
    color: var(--color-black);
}

.title-accent-rose {
    color: var(--color-rose);
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-gray-500);
    max-width: 600px;
    margin: 0 auto;
}

/* Feature Icons */
.feature-icon-blue {
    background: var(--color-blue-light);
    color: var(--color-blue);
}

.feature-icon-purple {
    background: var(--color-purple-light);
    color: var(--color-purple);
}

.feature-icon-teal {
    background: var(--color-teal-light);
    color: var(--color-teal);
}

.feature-icon-amber {
    background: var(--color-amber-light);
    color: var(--color-amber);
}

/* Footer Base */
.footer {
    background: var(--color-gray-900);
    color: var(--color-white);
    padding: var(--space-20) 0 var(--space-8);
}

.footer-logo {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    margin-bottom: var(--space-2);
}

.footer-tagline {
    font-size: var(--font-size-sm);
    color: var(--color-gray-400);
    margin-bottom: var(--space-6);
}

.footer-bottom {
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-gray-800);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: var(--font-size-sm);
    color: var(--color-gray-500);
}

.footer-tagline-small {
    font-style: italic;
    opacity: 0.7;
}

/* Animations */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Responsive Mobile Menu */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--color-white);
        flex-direction: column;
        padding: var(--space-8);
        gap: var(--space-4);
        box-shadow: var(--shadow-lg);
        transform: translateY(-150%);
        opacity: 0;
        transition: all var(--transition-base);
    }

    .nav-links.mobile-open {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==========================================
   LIBRI-SPECIFIC STYLES
   ========================================== */

/* Rose accent color override for Libri page */
.libri-page {
    --primary-accent: var(--color-rose);
    --primary-accent-light: var(--color-rose-light);
    --primary-accent-dark: var(--color-rose-dark);
}

/* ==========================================
   NAVBAR OVERRIDE
   ========================================== */
.navbar-libri.scrolled {
    background: rgba(255, 255, 255, 0.95);
}

.nav-cta-rose {
    background: var(--color-rose) !important;
    color: var(--color-white) !important;
}

.nav-cta-rose:hover {
    background: var(--color-rose-dark) !important;
}

/* ==========================================
   HERO SECTION
   ========================================== */
.libri-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: var(--space-32) var(--space-6);
    overflow: hidden;
    background: linear-gradient(180deg, var(--color-rose-light) 0%, var(--color-white) 100%);
}

.libri-hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(168, 87, 81, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(168, 87, 81, 0.08) 0%, transparent 40%);
    pointer-events: none;
}

.libri-hero-content {
    text-align: center;
    max-width: 800px;
    position: relative;
    z-index: 10;
}

.libri-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--color-white);
    border: 1px solid var(--color-rose-light);
    color: var(--color-rose);
    font-size: var(--font-size-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-8);
}

.badge-dot-rose {
    width: 8px;
    height: 8px;
    background: var(--color-rose);
    border-radius: var(--radius-full);
    animation: pulse 2s infinite;
}

.libri-hero-title {
    font-size: clamp(var(--font-size-5xl), 12vw, var(--font-size-8xl));
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: var(--space-4);
    color: var(--color-black);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
}

.libri-icon {
    font-size: 0.8em;
}

.libri-hero-tagline {
    font-size: clamp(var(--font-size-lg), 3vw, var(--font-size-2xl));
    font-weight: 300;
    color: var(--color-rose);
    margin-bottom: var(--space-6);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.libri-hero-description {
    font-size: var(--font-size-lg);
    color: var(--color-gray-600);
    max-width: 600px;
    margin: 0 auto var(--space-10);
    line-height: 1.8;
}

.libri-hero-description strong {
    color: var(--color-rose);
    font-weight: 600;
}

.libri-hero-cta {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

.btn-large {
    padding: var(--space-5) var(--space-10);
    font-size: var(--font-size-lg);
}

/* ==========================================
   FEATURES SECTION
   ========================================== */
.libri-features-section {
    padding: var(--space-32) 0;
    background: var(--color-white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-6);
}

.feature-card {
    padding: var(--space-8);
    background: var(--color-white);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--color-gray-100);
    transition: all var(--transition-base);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.feature-card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-6);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-card-icon svg {
    width: 32px;
    height: 32px;
}

.feature-icon-rose {
    background: var(--color-rose-light);
    color: var(--color-rose);
}

.feature-card h3 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: var(--space-3);
}

.feature-card p {
    font-size: var(--font-size-base);
    color: var(--color-gray-600);
    line-height: 1.7;
}

/* ==========================================
   SCREENSHOTS SECTION
   ========================================== */
.libri-screenshots-section {
    padding: var(--space-32) 0;
    background: linear-gradient(180deg, var(--color-gray-50) 0%, var(--color-white) 100%);
}

.screenshots-gallery {
    display: flex;
    gap: var(--space-6);
    overflow-x: auto;
    padding: var(--space-6) 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.screenshots-gallery::-webkit-scrollbar {
    height: 8px;
}

.screenshots-gallery::-webkit-scrollbar-track {
    background: var(--color-gray-100);
    border-radius: 4px;
}

.screenshots-gallery::-webkit-scrollbar-thumb {
    background: var(--color-rose-light);
    border-radius: 4px;
}

.screenshots-gallery::-webkit-scrollbar-thumb:hover {
    background: var(--color-rose);
}

.screenshot-item {
    flex: 0 0 auto;
    scroll-snap-align: center;
    text-align: center;
}

.screenshot-phone {
    position: relative;
    width: 220px;
    height: 460px;
    background: linear-gradient(145deg, #1a1a1a, #0a0a0a);
    border-radius: 32px;
    padding: 10px;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.3);
    margin-bottom: var(--space-4);
}

.phone-notch-mini {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 22px;
    background: #0a0a0a;
    border-radius: 16px;
    z-index: 10;
}

.screenshot-phone img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
}

.screenshot-info h4 {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: var(--space-1);
}

.screenshot-info p {
    font-size: var(--font-size-sm);
    color: var(--color-gray-500);
}

/* ==========================================
   DOWNLOAD SECTION
   ========================================== */
.libri-download-section {
    padding: var(--space-32) 0;
    background: linear-gradient(135deg, var(--color-rose-dark) 0%, var(--color-rose) 100%);
    color: var(--color-white);
}

.download-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.download-title {
    font-size: clamp(var(--font-size-2xl), 4vw, var(--font-size-4xl));
    font-weight: 800;
    margin-bottom: var(--space-4);
}

.download-subtitle {
    font-size: var(--font-size-lg);
    opacity: 0.9;
    margin-bottom: var(--space-10);
}

.download-buttons {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-12);
}

.download-btn-disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.download-btn-disabled:hover {
    transform: none;
    box-shadow: none;
}

.download-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-12);
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: var(--font-size-4xl);
    font-weight: 800;
    line-height: 1;
    margin-bottom: var(--space-2);
}

.stat-label {
    font-size: var(--font-size-sm);
    opacity: 0.8;
}

/* ==========================================
   FOOTER OVERRIDE
   ========================================== */
.libri-footer {
    background: var(--color-gray-900);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-12);
    margin-bottom: var(--space-12);
}

.footer-by {
    font-size: var(--font-size-sm);
    color: var(--color-gray-500);
    margin-top: var(--space-4);
}

.footer-by a {
    color: var(--color-rose);
    font-weight: 500;
}

.footer-by a:hover {
    text-decoration: underline;
}

.footer-links-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
}

.footer-link-group h4 {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: var(--space-4);
}

.footer-link-group ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.footer-link-group a {
    font-size: var(--font-size-sm);
    color: var(--color-gray-400);
    transition: color var(--transition-fast);
}

.footer-link-group a:hover {
    color: var(--color-rose);
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links-row {
        justify-items: center;
    }
}

@media (max-width: 768px) {
    .libri-hero {
        padding-top: var(--space-24);
    }

    .libri-hero-title {
        flex-direction: column;
        gap: var(--space-2);
    }

    .libri-hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn-large {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .screenshot-phone {
        width: 180px;
        height: 380px;
    }

    .download-stats {
        gap: var(--space-6);
    }

    .footer-links-row {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
}

@media (max-width: 480px) {
    .libri-hero-badge {
        font-size: var(--font-size-xs);
    }

    .stat-value {
        font-size: var(--font-size-3xl);
    }
}