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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #eef2ff;
    --text: #1e1b4b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --bg: #fafafa;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.06);
    --transition: 150ms ease;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-large { padding: 12px 28px; font-size: 1rem; border-radius: var(--radius-lg); }

/* ── Landing Page ── */
.landing { background: linear-gradient(180deg, #f8f7ff 0%, #fafafa 100%); }

.landing-header {
    position: sticky;
    top: 0;
    background: rgba(248, 247, 255, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.landing-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}
.logo:hover { text-decoration: none; }

/* ── Hero ── */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    line-height: 1.7;
}

.hero-actions { display: flex; gap: 12px; }

/* ── App Preview Mock ── */
.app-preview {
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15);
    overflow: hidden;
    border: 1px solid var(--border);
}

.preview-header {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    background: #f1f5f9;
    border-bottom: 1px solid var(--border);
}

.preview-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.preview-dot.red { background: #ef4444; }
.preview-dot.yellow { background: #f59e0b; }
.preview-dot.green { background: #10b981; }

.preview-body {
    padding: 40px 32px 32px;
    text-align: center;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #f8f7ff 0%, #faf5ff 100%);
}

.preview-quote-mark {
    font-size: 4rem;
    font-family: Georgia, serif;
    color: var(--primary);
    opacity: 0.12;
    line-height: 1;
    position: absolute;
    top: 12px;
    left: 24px;
}

.preview-quote {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 12px;
    font-style: italic;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.preview-author {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 20px;
}

.preview-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 500;
}

/* ── Features ── */
.features {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px;
    text-align: center;
}

.features h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 48px;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all var(--transition);
}
.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 16px;
}

.feature-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }

/* ── Generator Section ── */
.generator {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 24px;
    text-align: center;
}

.generator h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 32px;
}

.quote-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 52px 48px 44px;
    box-shadow: 0 20px 40px -12px rgba(99,102,241,0.12), 0 8px 16px -8px rgba(0,0,0,0.06);
    text-align: center;
    position: relative;
    border: 1px solid var(--border);
    transition: opacity 300ms ease, transform 300ms ease;
}

.quote-card.fade-out {
    opacity: 0;
    transform: translateY(10px);
}

.quote-card.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

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

.quote-mark {
    font-size: 5rem;
    font-family: Georgia, serif;
    color: var(--primary);
    opacity: 0.12;
    line-height: 1;
    position: absolute;
    top: 16px;
    left: 32px;
    user-select: none;
}

.quote-text {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text);
    margin-bottom: 24px;
    font-style: normal;
    position: relative;
    z-index: 1;
}

.quote-author {
    display: block;
    font-size: 1.05rem;
    font-style: normal;
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.btn-generate {
    margin-top: 32px;
    box-shadow: 0 4px 14px rgba(99,102,241,0.3);
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99,102,241,0.4);
}

.btn-generate:active {
    transform: translateY(0);
}

.btn-generate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-generate svg {
    transition: transform 0.4s ease;
}

.btn-generate:hover svg {
    transform: rotate(180deg);
}

/* ── CTA ── */
.cta {
    text-align: center;
    padding: 80px 24px;
    background: linear-gradient(135deg, #eef2ff, #f5f3ff);
    border-top: 1px solid var(--border);
}
.cta h2 { font-size: 2rem; font-weight: 700; margin-bottom: 12px; }
.cta p { color: var(--text-secondary); margin-bottom: 28px; font-size: 1.1rem; }

/* ── Footer ── */
.landing-footer {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
}
.landing-footer a { color: var(--text-muted); }
.landing-footer a:hover { color: var(--primary); }

/* ── Responsive ── */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 48px 24px;
        gap: 40px;
        text-align: center;
    }
    .hero-actions { justify-content: center; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .hero h1 { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .features-grid { grid-template-columns: 1fr; }
    .features h2, .generator h2, .cta h2 { font-size: 1.5rem; }

    .quote-card {
        padding: 40px 24px 32px;
    }
    .quote-text { font-size: 1.2rem; }
    .quote-mark { font-size: 3.5rem; top: 8px; left: 16px; }

    .preview-body { padding: 28px 20px 24px; min-height: 200px; }
    .preview-quote { font-size: 0.95rem; }
}
