/* ShareLit Design System - Apple-like Aesthetic */

:root {
    /* Color Palette */
    --color-bg: #FFFFFF;
    --color-text: #1D1D1F;
    --color-text-secondary: #86868B;
    --color-surface: #F5F5F7;
    /* iOS System Gray 6 */
    --color-surface-alt: #EFECE3;
    /* User Accent 1 */

    --color-primary: #000000;
    --color-primary-text: #FFFFFF;

    --color-accent-blue-light: #8FABD4;
    /* User Accent 2 */
    --color-accent-blue-dark: #4A70A9;
    /* User Accent 3 */

    --color-border: rgba(0, 0, 0, 0.1);
    --color-glass: rgba(255, 255, 255, 0.7);
    --color-glass-border: rgba(255, 255, 255, 0.5);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px rgba(143, 171, 212, 0.3);

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

    /* Typography */
    --font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-family-text: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --header-height: 80px;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-8: 48px;
    --space-10: 64px;
    --space-12: 80px;
    --space-20: 120px;

    --spacing-sm: var(--space-2);
    --spacing-md: var(--space-4);
    --spacing-lg: var(--space-6);
    --spacing-xl: var(--space-10);

    /* Mappings for Auth/Legacy compatibility */
    --bg-primary: var(--color-bg);
    --bg-secondary: var(--color-surface);
    --text-primary: var(--color-text);
    --border-primary: var(--color-border);
    --shadow-xl: var(--shadow-lg);
    --font-sans: var(--font-family-text);
    --transition-base: 0.2s ease;
    --text-tertiary: #9ca3af;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-text);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-family);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul {
    list-style: none;
}

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

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

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

.text-gradient {
    background: linear-gradient(135deg, var(--color-text) 0%, #434343 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glassmorphism */
.glass {
    background: var(--color-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-glass-border);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    /* Increased height */
    padding-top: 20px;
    /* Added gap from top */
    z-index: 1000;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    height: 60px;
    /* Shrink on scroll */
    padding-top: 0;
    /* Remove gap on scroll */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.03em;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 14px;
    color: var(--color-text);
    opacity: 0.8;
    transition: opacity 0.2s;
}

.nav-links a:hover {
    opacity: 1;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    border: none;
    outline: none;
}

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

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background-color: var(--color-surface-alt);
    color: var(--color-text);
}

.btn-secondary:hover {
    background-color: #E5E2D9;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 17px;
}

/* Hero Section */
.hero {
    padding-top: 140px;
    padding-bottom: 100px;
    text-align: center;
    overflow: hidden;
}

.hero h1 {
    font-size: 64px;
    line-height: 1.05;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease-out;
}

.hero p {
    font-size: 24px;
    color: var(--color-text-secondary);
    max-width: 700px;
    margin: 0 auto 40px;
    font-weight: 400;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

/* Features (Bento Grid) */
.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 48px;
    margin-bottom: 16px;
}

.section-title p {
    font-size: 20px;
    color: var(--color-text-secondary);
}

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

.bento-card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: 40px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
}

.bento-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background: white;
}

.bento-card h3 {
    font-size: 24px;
    margin-bottom: 12px;
}

.bento-card p {
    color: var(--color-text-secondary);
    font-size: 16px;
    line-height: 1.6;
}

.bento-icon {
    font-size: 40px;
    margin-bottom: 24px;
    display: inline-block;
}

.bento-card.large {
    grid-column: span 2;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
}

.service-item {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.service-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.service-item img {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    border-radius: 12px;
    object-fit: cover;
}

.service-item span {
    font-size: 14px;
    font-weight: 500;
}

/* Pricing */
.pricing-container {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.pricing-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 350px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
    position: relative;
}

.pricing-card.featured {
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
    transform: scale(1.05);
    z-index: 2;
}

.pricing-card h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.price {
    font-size: 48px;
    font-weight: 700;
    margin: 24px 0;
    letter-spacing: -0.03em;
}

.price span {
    font-size: 18px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.pricing-features {
    margin: 32px 0;
}

.pricing-features li {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 15px;
    color: var(--color-text-secondary);
}

.pricing-features li::before {
    content: "✓";
    color: var(--color-primary);
    font-weight: bold;
    margin-right: 10px;
}

/* Footer */
footer {
    background: var(--color-surface);
    padding: 80px 0 40px;
    margin-top: 100px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand h4 {
    font-size: 20px;
    margin-bottom: 16px;
}

.footer-brand p {
    color: var(--color-text-secondary);
    max-width: 300px;
}

.footer-col h5 {
    font-size: 14px;
    margin-bottom: 20px;
    color: var(--color-text);
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--color-text-secondary);
    font-size: 14px;
}

.footer-col ul li a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding-top: 40px;
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 13px;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 40px;
    }

    .hero p {
        font-size: 18px;
    }

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

    .bento-card.large {
        grid-column: auto;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .pricing-card.featured {
        transform: none;
    }

    .nav-links {
        display: none;
    }

    /* Simplified for now, would need mobile menu JS */
    .nav-links {
        display: none;
    }

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

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px;
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 16px;
    opacity: 0;
    pointer-events: none;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.mobile-menu a {
    font-size: 18px;
    font-weight: 500;
    color: var(--color-text);
    padding: 12px;
    border-radius: 12px;
    transition: background 0.2s;
}

.mobile-menu a:hover {
    background: var(--color-surface);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-text);
}

/* FAQ Section */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--color-surface);
    padding: 32px;
    border-radius: var(--radius-lg);
}

.faq-item h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.faq-item p {
    color: var(--color-text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

/* Pricing Toggle */
.pricing-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
}

.toggle-label {
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
}

.toggle-label.active {
    color: var(--color-primary);
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 28px;
    background: var(--color-surface-alt);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.toggle-switch.active {
    background: var(--color-primary);
}

.toggle-switch.active::after {
    transform: translateX(22px);
}

/* Pricing Controls (New) */
.pricing-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin-bottom: 40px;
}

.pricing-toggle-container {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--color-surface);
    padding: 8px 16px;
    border-radius: 99px;
    border: 1px solid var(--color-border);
}

.toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: color 0.2s;
    cursor: pointer;
}

.toggle-label.active {
    color: var(--color-text);
    font-weight: 600;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
    background-color: var(--color-primary);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--color-primary);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

/* Duration Tabs */
.duration-tabs {
    display: flex;
    background: var(--color-surface);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

.duration-tab {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.duration-tab.active {
    background: white;
    color: var(--color-text);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

.duration-tab:hover:not(.active) {
    color: var(--color-text);
}

/* Updated Pricing Card Styles */
.original-price {
    text-decoration: line-through;
    color: var(--color-text-secondary);
    font-size: 16px;
    margin-right: 8px;
    display: block;
    margin-bottom: 4px;
}

.discount-badge {
    display: inline-block;
    background: #E8F5E9;
    color: #2E7D32;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 8px;
}

.pricing-card.selected {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary), var(--shadow-lg);
    transform: scale(1.02);
}