/* Lemonade Password Manager - Landing Page */
/* Premium Design System - For Developers Who Care */

:root {
    /* Core Palette */
    --primary: #FF6D00;
    --primary-glow: rgba(255, 109, 0, 0.15);
    --golden: #FFD700;
    --golden-soft: rgba(255, 215, 0, 0.1);
    --mint: #82E0AA;

    /* Dark Theme - GitHub-inspired (default) */
    --bg-base: #010409;
    --bg-surface: #0D1117;
    --bg-elevated: #161B22;
    --bg-hover: #1C2128;
    --border: #30363D;
    --border-subtle: #21262D;

    /* Typography */
    --text-primary: #F0F6FC;
    --text-secondary: #8B949E;
    --text-tertiary: #6E7681;

    /* Semantic */
    --success: #3FB950;
    --code-bg: rgba(110, 118, 129, 0.1);

    /* Spacing Scale */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;
    --space-5xl: 128px;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
}

/* ═══════════════════════════════════════════
   LIGHT MODE - Manual toggle + auto-detect fallback
   ═══════════════════════════════════════════ */

/* Light mode variables */
[data-theme="light"],
:root:not([data-theme]) {
    @media (prefers-color-scheme: light) {
        --bg-base: #ffffff;
        --bg-surface: #f6f8fa;
        --bg-elevated: #ffffff;
        --bg-hover: #f3f4f6;
        --border: #d0d7de;
        --border-subtle: #e1e4e8;
        --text-primary: #1f2328;
        --text-secondary: #57606a;
        --text-tertiary: #6e7781;
        --primary-glow: rgba(255, 109, 0, 0.1);
        --golden-soft: rgba(255, 193, 7, 0.12);
        --code-bg: rgba(175, 184, 193, 0.2);
        --success: #1a7f37;
    }
}

/* Manual light mode override */
[data-theme="light"] {
    --bg-base: #ffffff;
    --bg-surface: #f6f8fa;
    --bg-elevated: #ffffff;
    --bg-hover: #f3f4f6;
    --border: #d0d7de;
    --border-subtle: #e1e4e8;
    --text-primary: #1f2328;
    --text-secondary: #57606a;
    --text-tertiary: #6e7781;
    --primary-glow: rgba(255, 109, 0, 0.1);
    --golden-soft: rgba(255, 193, 7, 0.12);
    --code-bg: rgba(175, 184, 193, 0.2);
    --success: #1a7f37;
}

/* Light mode component overrides */
[data-theme="light"] .header,
:root:not([data-theme]) .header {
    @media (prefers-color-scheme: light) {
        background: rgba(255, 255, 255, 0.85);
        border-bottom-color: var(--border-subtle);
    }
}

[data-theme="light"] .header {
    background: rgba(255, 255, 255, 0.85);
    border-bottom-color: var(--border-subtle);
}

[data-theme="light"] .hero {
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(255, 109, 0, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(255, 193, 7, 0.08) 0%, transparent 50%),
        var(--bg-base);
}

[data-theme="light"] .feature-card,
[data-theme="light"] .pricing-card,
[data-theme="light"] .testimonial-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .feature-card:hover,
[data-theme="light"] .pricing-card:hover {
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .hero-mockup {
    box-shadow:
        0 0 0 1px var(--border),
        0 24px 48px -12px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .cta {
    background:
        radial-gradient(ellipse 50% 50% at 50% 50%, rgba(255, 109, 0, 0.06) 0%, transparent 70%),
        var(--bg-surface);
}

[data-theme="light"] .code-preview {
    background: var(--bg-surface);
}

[data-theme="light"] .hero-badge,
[data-theme="light"] .feature-label {
    background: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.25);
    color: #b45309;
}

[data-theme="light"] code,
[data-theme="light"] .mono {
    color: #b45309;
}

[data-theme="light"] .pricing-card.featured {
    background: linear-gradient(180deg, rgba(255, 109, 0, 0.05) 0%, var(--bg-elevated) 100%);
}

/* ═══════════════════════════════════════════
   THEME TOGGLE BUTTON - Subtle
   ═══════════════════════════════════════════ */

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-fast) var(--ease-out);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--border);
    background: var(--bg-hover);
}

.theme-icon-light,
.theme-icon-dark {
    font-size: 1rem;
    position: absolute;
    transition: all var(--duration-normal) var(--ease-out);
}

/* Dark mode: show moon, hide sun */
[data-theme="dark"] .theme-icon-light,
:root:not([data-theme]) .theme-icon-light {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

[data-theme="dark"] .theme-icon-dark,
:root:not([data-theme]) .theme-icon-dark {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* Light mode: show sun, hide moon */
[data-theme="light"] .theme-icon-light {
    opacity: 1;
    transform: rotate(0) scale(1);
}

[data-theme="light"] .theme-icon-dark {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

/* Auto-detect for initial state */
@media (prefers-color-scheme: light) {
    :root:not([data-theme]) .theme-icon-light {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
    :root:not([data-theme]) .theme-icon-dark {
        opacity: 0;
        transform: rotate(90deg) scale(0);
    }
}

/* Reset */
*, *::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: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    letter-spacing: -0.011em;
    overflow-x: hidden;
}

/* Typography - Refined */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2.5rem, 6vw, 3.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
}

h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

p {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    line-height: 1.7;
}

/* Code/Nerd elements */
code, .mono {
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', Consolas, monospace;
    font-size: 0.875em;
    background: var(--code-bg);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    color: var(--golden);
}

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

/* Links */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
    color: var(--golden);
}

/* ═══════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-md) 0;
    background: rgba(1, 4, 9, 0.85);
    backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid var(--border-subtle);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color var(--duration-fast) var(--ease-out);
}

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

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

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.9375rem;
    cursor: pointer;
    border: none;
    transition: all var(--duration-normal) var(--ease-out);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    background: #FF8534;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 109, 0, 0.25);
    color: white;
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--text-tertiary);
    color: var(--text-primary);
}

.btn-large {
    padding: 14px 28px;
    font-size: 1rem;
    border-radius: var(--radius-lg);
}

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--space-5xl) 0 var(--space-4xl);
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, var(--primary-glow) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, var(--golden-soft) 0%, transparent 50%),
        var(--bg-base);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
}

.hero-text {
    max-width: 540px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--golden);
    margin-bottom: var(--space-lg);
}

.hero h1 {
    margin-bottom: var(--space-lg);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--golden) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.1875rem;
    margin-bottom: var(--space-xl);
    line-height: 1.65;
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg) var(--space-xl);
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.hero-feature-icon {
    color: var(--success);
    font-weight: 600;
}

.hero-image {
    display: flex;
    justify-content: center;
}

.hero-mockup {
    width: 100%;
    max-width: 480px;
    border-radius: var(--radius-xl);
    box-shadow:
        0 0 0 1px var(--border),
        0 24px 48px -12px rgba(0, 0, 0, 0.5);
    animation: float 8s ease-in-out infinite;
}

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

/* ═══════════════════════════════════════════
   ENV VAULT - Feature Highlight
   ═══════════════════════════════════════════ */

.feature-highlight {
    padding: var(--space-5xl) 0;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.feature-highlight-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
}

.feature-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--golden-soft);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--golden);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-md);
}

.feature-highlight h2 {
    margin-bottom: var(--space-md);
}

.feature-highlight p {
    margin-bottom: var(--space-lg);
}

.feature-list {
    list-style: none;
    margin-bottom: var(--space-xl);
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.feature-list-icon {
    color: var(--success);
    font-weight: 600;
    margin-top: 1px;
}

/* Terminal-style code block for nerds */
.code-preview {
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    overflow: hidden;
}

.code-preview .prompt {
    color: var(--success);
}

.code-preview .cmd {
    color: var(--text-primary);
}

.code-preview .flag {
    color: var(--golden);
}

/* ═══════════════════════════════════════════
   FEATURES GRID
   ═══════════════════════════════════════════ */

.features {
    padding: var(--space-5xl) 0;
}

.section-header {
    text-align: center;
    max-width: 560px;
    margin: 0 auto var(--space-3xl);
}

.section-header h2 {
    margin-bottom: var(--space-md);
}

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

.feature-card {
    padding: var(--space-xl);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    transition: all var(--duration-normal) var(--ease-out);
}

.feature-card:hover {
    border-color: var(--border);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--golden-soft);
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: var(--radius-md);
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
}

.feature-card h3 {
    margin-bottom: var(--space-sm);
}

.feature-card p {
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════
   PRICING - 3 columns horizontal
   ═══════════════════════════════════════════ */

.pricing {
    padding: var(--space-5xl) 0;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    max-width: 1000px;
    margin: 0 auto;
    align-items: start;
}

.pricing-card {
    padding: var(--space-xl) var(--space-lg);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    position: relative;
    transition: all var(--duration-normal) var(--ease-out);
}

.pricing-card:hover {
    border-color: var(--border);
}

.pricing-card.featured {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(255, 109, 0, 0.03) 0%, var(--bg-elevated) 100%);
}

.pricing-card.featured::before {
    content: 'Most Popular';
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 12px;
    background: var(--primary);
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pricing-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.pricing-price {
    display: flex;
    align-items: baseline;
    gap: 2px;
    margin-bottom: var(--space-xs);
}

.pricing-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.pricing-period {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.pricing-description {
    color: var(--text-tertiary);
    font-size: 0.8125rem;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-subtle);
}

.pricing-features {
    list-style: none;
    margin-bottom: var(--space-lg);
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.pricing-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: 600;
    font-size: 0.75rem;
}

.pricing-card .btn {
    width: 100%;
    padding: 12px 16px;
}

/* ═══════════════════════════════════════════
   TESTIMONIALS
   ═══════════════════════════════════════════ */

.testimonials {
    padding: var(--space-5xl) 0;
    border-top: 1px solid var(--border-subtle);
}

.testimonial-card {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
    padding: var(--space-2xl);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.testimonial-quote {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    line-height: 1.7;
    letter-spacing: -0.01em;
}

/* Terminal-style quote for nerds */
.testimonial-quote::before {
    content: '> ';
    color: var(--success);
    font-family: 'SF Mono', monospace;
    font-style: normal;
}

.testimonial-author {
    color: var(--text-tertiary);
    font-size: 0.9375rem;
}

.testimonial-author strong {
    color: var(--primary);
    font-weight: 500;
}

/* ═══════════════════════════════════════════
   CTA
   ═══════════════════════════════════════════ */

.cta {
    padding: var(--space-5xl) 0;
    text-align: center;
    background:
        radial-gradient(ellipse 50% 50% at 50% 50%, var(--primary-glow) 0%, transparent 70%),
        var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
}

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

.cta p {
    max-width: 420px;
    margin: 0 auto var(--space-xl);
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */

.footer {
    padding: var(--space-2xl) 0;
    background: var(--bg-base);
    border-top: 1px solid var(--border-subtle);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.footer-links a {
    color: var(--text-tertiary);
    font-size: 0.8125rem;
    transition: color var(--duration-fast) var(--ease-out);
}

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

.footer-copy {
    color: var(--text-tertiary);
    font-size: 0.8125rem;
}

/* Mobile nav button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: var(--space-sm);
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-md);
    }

    .pricing-card {
        padding: var(--space-lg);
    }

    .pricing-amount {
        font-size: 2rem;
    }
}

@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-3xl);
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-features {
        justify-content: center;
    }

    .hero-image {
        order: -1;
    }

    .hero-mockup {
        max-width: 360px;
    }

    .feature-highlight-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-2xl);
    }

    .feature-list {
        text-align: left;
        max-width: 320px;
        margin: 0 auto var(--space-xl);
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .pricing-card.featured {
        order: -1;
    }
}

@media (max-width: 768px) {
    :root {
        --space-5xl: 80px;
    }

    .nav-links,
    .nav-cta {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

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

    .hero-features {
        flex-direction: column;
        gap: var(--space-sm);
    }

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

    .footer-content {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */

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

.animate-on-scroll {
    opacity: 0;
    animation: fadeInUp 0.5s var(--ease-out) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.15s; }
.delay-3 { animation-delay: 0.2s; }
.delay-4 { animation-delay: 0.25s; }

/* ═══════════════════════════════════════════
   NERD TOUCHES
   ═══════════════════════════════════════════ */

/* Subtle cursor blink for hero */
.hero h1::after {
    content: '_';
    animation: blink 1s step-end infinite;
    color: var(--primary);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Selection color */
::selection {
    background: var(--primary);
    color: white;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}
