/* ============================================
   LinguaRead Landing Page Styles
   A warm, bookish aesthetic with modern touches
   ============================================ */

/* CSS Variables */
:root {
    /* Color Palette - Warm, bookish tones */
    --color-ink: #1a1612;
    --color-ink-light: #3d3530;
    --color-paper: #faf6f1;
    --color-paper-warm: #f5efe8;
    --color-cream: #f0e6d8;
    --color-amber: #c4956a;
    --color-amber-dark: #a67c52;
    --color-rust: #b85c38;
    --color-forest: #2d5a47;
    --color-forest-light: #3d7a5f;
    
    /* Accent colors */
    --color-highlight: #fff3c4;
    --color-highlight-border: #f5d67a;
    
    /* Typography */
    --font-serif: 'Crimson Pro', Georgia, 'Times New Roman', serif;
    --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    
    /* Borders */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(26, 22, 18, 0.05);
    --shadow-md: 0 4px 12px rgba(26, 22, 18, 0.08);
    --shadow-lg: 0 8px 30px rgba(26, 22, 18, 0.12);
    --shadow-xl: 0 20px 60px rgba(26, 22, 18, 0.15);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
}

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

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

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-ink);
    background: var(--color-paper);
    overflow-x: hidden;
}

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
    font-size: 1.125rem;
    line-height: 1.7;
}

em {
    font-family: var(--font-serif);
    font-style: italic;
}

strong {
    font-weight: 600;
}

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

/* ============================================
   Navigation
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-md) 0;
    background: rgba(250, 246, 241, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(26, 22, 18, 0.05);
    transition: var(--transition-base);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-ink);
}

.logo-icon {
    font-size: 1.75rem;
}

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

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-ink-light);
    transition: color var(--transition-fast);
}

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

.nav-cta {
    padding: var(--space-sm) var(--space-md);
    background: var(--color-ink);
    color: var(--color-paper) !important;
    border-radius: var(--radius-full);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(80px + var(--space-xl)) 0 var(--space-xl);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(196, 149, 106, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(184, 92, 56, 0.08), transparent),
        radial-gradient(ellipse 50% 50% at 0% 80%, rgba(45, 90, 71, 0.06), transparent);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231a1612' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-highlight);
    border: 1px solid var(--color-highlight-border);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-amber-dark);
    margin-bottom: var(--space-lg);
}

.badge-icon {
    font-size: 1rem;
}

.hero-title {
    color: var(--color-ink);
    margin-bottom: var(--space-lg);
    letter-spacing: -0.02em;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-ink-light);
    max-width: 500px;
    margin-bottom: var(--space-xl);
}

.hero-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
}

.hero-free {
    font-size: 0.9rem;
    color: var(--color-ink-light);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--color-ink);
    color: var(--color-paper);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-large {
    padding: var(--space-md) var(--space-xl);
    font-size: 1.125rem;
}

.apple-icon {
    width: 20px;
    height: 20px;
}

/* Phone Mockup */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.phone-mockup {
    position: relative;
}

.phone-frame {
    position: relative;
    width: 280px;
    height: 580px;
    background: linear-gradient(145deg, #1a1a1a, #000000);
    border-radius: 44px;
    padding: 8px;
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 30px 60px -12px rgba(0, 0, 0, 0.5),
        0 18px 36px -18px rgba(0, 0, 0, 0.4);
}

/* Power button */
.phone-frame::before {
    content: '';
    position: absolute;
    right: -3px;
    top: 85px;
    width: 3px;
    height: 70px;
    background: linear-gradient(90deg, #0a0a0a, #1a1a1a);
    border-radius: 0 2px 2px 0;
    box-shadow: inset -1px 0 1px rgba(0, 0, 0, 0.5);
}

/* Volume buttons */
.phone-frame::after {
    content: '';
    position: absolute;
    left: -3px;
    top: 100px;
    width: 3px;
    height: 50px;
    background: linear-gradient(90deg, #1a1a1a, #0a0a0a);
    border-radius: 2px 0 0 2px;
    box-shadow: 
        inset 1px 0 1px rgba(0, 0, 0, 0.5),
        0 28px 0 0 #0a0a0a;
}

.phone-screen {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--color-paper);
    border-radius: 38px;
    overflow: hidden;
}

/* Dynamic Island */
.phone-screen::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 28px;
    background: #000;
    border-radius: 18px;
    z-index: 10;
}

.phone-screen .screenshot-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.phone-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(ellipse at center, rgba(196, 149, 106, 0.3), transparent 60%);
    z-index: -1;
    filter: blur(30px);
}


/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-ink-light);
    font-size: 0.85rem;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid var(--color-ink-light);
    border-bottom: 2px solid var(--color-ink-light);
    transform: rotate(45deg);
}

/* ============================================
   Features Section
   ============================================ */
.features {
    padding: var(--space-2xl) 0;
    background: var(--color-paper-warm);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-title {
    color: var(--color-ink);
    margin-bottom: var(--space-md);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--color-ink-light);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.feature-card {
    background: var(--color-paper);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: 1px solid rgba(26, 22, 18, 0.06);
    transition: all var(--transition-base);
}

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

.feature-card.featured {
    background: linear-gradient(135deg, var(--color-ink), var(--color-ink-light));
    color: var(--color-paper);
    border: none;
}

.feature-card.featured h3 {
    color: var(--color-paper);
}

.feature-card.featured p {
    color: rgba(250, 246, 241, 0.85);
}

.feature-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-paper-warm);
    border-radius: var(--radius-md);
    font-size: 1.75rem;
    margin-bottom: var(--space-md);
}

.feature-card.featured .feature-icon {
    background: rgba(250, 246, 241, 0.15);
}

.feature-card h3 {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    margin-bottom: var(--space-sm);
    color: var(--color-ink);
}

.feature-card p {
    font-size: 1rem;
    color: var(--color-ink-light);
    line-height: 1.6;
}

/* ============================================
   Screenshots Gallery
   ============================================ */
.screenshots {
    padding: var(--space-2xl) 0;
    background: linear-gradient(180deg, var(--color-paper-warm) 0%, var(--color-paper) 100%);
    overflow: hidden;
}

.screenshots-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-xl);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.screenshot-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.screenshot-wrapper {
    position: relative;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-paper-warm);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 1px solid rgba(26, 22, 18, 0.06);
}

.screenshot-wrapper:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.screenshot-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.screenshot-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-ink-light);
    text-align: center;
}

/* Responsive screenshots */
@media (max-width: 900px) {
    .screenshots-gallery {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: var(--space-lg);
    }
}

@media (max-width: 600px) {
    .screenshots-gallery {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .screenshot-label {
        font-size: 0.9rem;
    }
}

/* ============================================
   How It Works Section
   ============================================ */
.how-it-works {
    padding: var(--space-2xl) 0;
}

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    max-width: 900px;
    margin: 0 auto;
}

.step {
    flex: 1;
    text-align: center;
    padding: var(--space-lg);
}

.step-number {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-amber);
    color: white;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 50%;
    margin: 0 auto var(--space-md);
}

.step-content h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
    color: var(--color-ink);
}

.step-content p {
    font-size: 0.95rem;
    color: var(--color-ink-light);
}

.step-connector {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-amber), var(--color-cream));
    flex-shrink: 0;
}

/* ============================================
   Quote Section
   ============================================ */
.quote-section {
    padding: var(--space-2xl) 0;
    background: var(--color-ink);
    color: var(--color-paper);
}

.main-quote {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.main-quote p {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-style: italic;
    line-height: 1.5;
    margin-bottom: var(--space-md);
}

.main-quote cite {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-style: normal;
    color: var(--color-amber);
}

/* ============================================
   Blog Section
   ============================================ */
.blog-section {
    padding: var(--space-2xl) 0;
    background: var(--color-paper);
}

.blog-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--color-paper-warm);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(26, 22, 18, 0.06);
    transition: all var(--transition-base);
    text-decoration: none;
}

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

.blog-card-image {
    padding: var(--space-xl);
    background: linear-gradient(135deg, var(--color-cream), var(--color-paper-warm));
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-emoji {
    font-size: 4rem;
}

.featured-post .blog-card-image {
    background: linear-gradient(135deg, var(--color-amber), var(--color-rust));
}

.featured-post .blog-emoji {
    font-size: 5rem;
    filter: grayscale(1) brightness(10);
}

.blog-card-content {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    flex: 1;
}

.blog-tag {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-amber-dark);
}

.blog-card h3 {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    color: var(--color-ink);
    line-height: 1.3;
}

.featured-post h3 {
    font-size: 1.5rem;
}

.blog-card p {
    font-size: 0.95rem;
    color: var(--color-ink-light);
    line-height: 1.6;
    flex: 1;
}

.read-more {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-rust);
    margin-top: var(--space-sm);
}

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

@media (max-width: 480px) {
    .blog-emoji {
        font-size: 3rem;
    }
    
    .featured-post .blog-emoji {
        font-size: 3.5rem;
    }
    
    .blog-card h3 {
        font-size: 1.15rem;
    }
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
    padding: var(--space-2xl) 0;
    background: 
        radial-gradient(ellipse 80% 60% at 50% 100%, rgba(196, 149, 106, 0.2), transparent),
        var(--color-paper);
}

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

.cta-content h2 {
    margin-bottom: var(--space-md);
}

.cta-content p {
    font-size: 1.25rem;
    color: var(--color-ink-light);
    margin-bottom: var(--space-xl);
}

.cta-details {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin-top: var(--space-lg);
    font-size: 0.95rem;
    color: var(--color-ink-light);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    padding: var(--space-xl) 0;
    background: var(--color-paper-warm);
    border-top: 1px solid rgba(26, 22, 18, 0.08);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
}

.footer-links a {
    font-size: 0.95rem;
    color: var(--color-ink-light);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-ink);
}

.footer-copyright {
    font-size: 0.85rem;
    color: var(--color-ink-light);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Scroll-triggered animations - transform only for full accessibility */
.animate-on-scroll {
    transform: translateY(20px);
    transition: transform 0.6s ease;
}

.animate-on-scroll.visible {
    transform: translateY(0);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-xl);
    }
    
    .hero-content {
        order: 1;
    }
    
    .hero-visual {
        order: 2;
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-cta {
        align-items: center;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .phone-frame {
        width: 240px;
        height: 500px;
        border-radius: 40px;
    }
    
    .phone-frame::before {
        height: 60px;
        top: 75px;
    }
    
    .phone-frame::after {
        height: 45px;
        top: 90px;
    }
    
    .phone-screen {
        border-radius: 34px;
    }
    
    .phone-screen::before {
        width: 90px;
        height: 26px;
    }
}

@media (max-width: 768px) {
    .nav-links a:not(.nav-cta) {
        display: none;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .steps {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .step-connector {
        width: 2px;
        height: 40px;
        background: linear-gradient(180deg, var(--color-amber), var(--color-cream));
    }
    
    .cta-details {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: var(--space-md);
    }
}

@media (max-width: 480px) {
    :root {
        --space-lg: 1.5rem;
        --space-xl: 3rem;
        --space-2xl: 4rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .phone-frame {
        width: 200px;
        height: 420px;
        border-radius: 36px;
        padding: 7px;
    }
    
    .phone-frame::before {
        height: 50px;
        top: 65px;
        right: -2.5px;
    }
    
    .phone-frame::after {
        height: 40px;
        top: 75px;
        left: -2.5px;
    }
    
    .phone-screen {
        border-radius: 30px;
    }
    
    .phone-screen::before {
        width: 75px;
        height: 22px;
        top: 7px;
    }
    
    .demo-content {
        padding: 12px;
    }
    
    .demo-text {
        font-size: 0.9rem;
    }
    
    .demo-translation {
        padding: 12px;
    }
    
    .translation-word {
        font-size: 1.1rem;
    }
    
    .btn {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.95rem;
    }
    
    .scroll-indicator {
        display: none;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

