/* ============================================
   BoulderBro Website - CSS Styles
   Clean, snappy, Apple-inspired design
   ============================================ */

/* CSS Custom Properties */
:root {
    /* Colors - matching app theme */
    --primary: #007AFF;
    --primary-dark: #0056CC;
    --primary-light: #4DA3FF;
    --gradient-start: #007AFF;
    --gradient-end: #5856D6;

    /* Neutrals */
    --bg: #000000;
    --bg-elevated: #1C1C1E;
    --bg-card: #2C2C2E;
    --text: #FFFFFF;
    --text-secondary: #8E8E93;
    --text-tertiary: #636366;
    --border: rgba(255, 255, 255, 0.1);

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 5rem;
    --space-3xl: 8rem;

    /* Typography */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --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: 2rem;
    --font-size-4xl: 2.5rem;
    --font-size-5xl: 3.5rem;
    --font-size-6xl: 4.5rem;

    /* Effects */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);

    /* Transitions */
    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 0.15s;
    --duration-normal: 0.3s;
    --duration-slow: 0.5s;
}

/* 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);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

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

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

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

/* Typography */
.section-title {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-lg);
    text-align: center;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--font-size-base);
    font-weight: 600;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    border: none;
    outline: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.4);
}

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

.btn-large {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-size-lg);
    border-radius: var(--radius-xl);
}

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

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-sm) 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: all var(--duration-normal) var(--ease-out);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-weight: 600;
    font-size: var(--font-size-lg);
}

.nav-logo-img {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
}

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

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

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

.nav-cta {
    background: var(--primary);
    color: white !important;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
}

.nav-cta:hover {
    background: var(--primary-dark);
}

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

.hero-content {
    max-width: 600px;
    text-align: center;
    z-index: 2;
}

.hero-title {
    font-size: var(--font-size-5xl);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-md);
    animation: fadeInUp 0.8s var(--ease-out) forwards;
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    animation: fadeInUp 0.8s var(--ease-out) 0.1s forwards;
    opacity: 0;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    animation: fadeInUp 0.8s var(--ease-out) 0.2s forwards;
    opacity: 0;
}

.hero-badge {
    font-size: var(--font-size-sm);
    color: var(--text-tertiary);
}

.hero-visual {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    animation: floatIn 1s var(--ease-out) 0.3s forwards;
    opacity: 0;
}

.phone-mockup {
    width: 280px;
    height: 580px;
    background: var(--bg-elevated);
    border-radius: 40px;
    padding: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 32px;
    object-fit: cover;
    background: var(--bg-card);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(0, 122, 255, 0.15) 0%, transparent 60%);
    z-index: 0;
}

/* Problem Section */
.problem {
    padding: var(--space-3xl) 0;
    background: var(--bg);
}

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

.problem-card {
    text-align: center;
    padding: var(--space-xl);
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    opacity: 0;
    transform: translateY(20px);
}

.problem-card.visible {
    animation: fadeInUp 0.6s var(--ease-out) forwards;
}

.problem-card:nth-child(2).visible {
    animation-delay: 0.1s;
}

.problem-card:nth-child(3).visible {
    animation-delay: 0.2s;
}

.problem-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
}

.problem-card p {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    font-style: italic;
}

.problem-solution {
    text-align: center;
    font-size: var(--font-size-2xl);
    font-weight: 600;
    color: var(--primary);
}

/* Features Section */
.features {
    padding: var(--space-3xl) 0;
    background: var(--bg-elevated);
}

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

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

.feature-card.visible {
    animation: fadeInUp 0.6s var(--ease-out) forwards;
}

.feature-card:nth-child(2).visible { animation-delay: 0.05s; }
.feature-card:nth-child(3).visible { animation-delay: 0.1s; }
.feature-card:nth-child(4).visible { animation-delay: 0.15s; }
.feature-card:nth-child(5).visible { animation-delay: 0.2s; }
.feature-card:nth-child(6).visible { animation-delay: 0.25s; }

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 32px rgba(0, 122, 255, 0.2);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.feature-card h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.6;
}

/* Screenshots Section */
.screenshots {
    padding: var(--space-3xl) 0;
    background: var(--bg);
    overflow: hidden;
}

.screenshots-carousel {
    display: flex;
    gap: var(--space-lg);
    justify-content: center;
    margin-top: var(--space-xl);
    flex-wrap: wrap;
}

.screenshot-item {
    flex: 0 0 auto;
    width: 220px;
    opacity: 0;
    transform: translateY(30px);
}

.screenshot-item.visible {
    animation: fadeInUp 0.6s var(--ease-out) forwards;
}

.screenshot-item:nth-child(2).visible { animation-delay: 0.1s; }
.screenshot-item:nth-child(3).visible { animation-delay: 0.2s; }
.screenshot-item:nth-child(4).visible { animation-delay: 0.3s; }

.screenshot-item img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform var(--duration-normal) var(--ease-out);
}

.screenshot-item:hover img {
    transform: scale(1.02);
}

.screenshot-label {
    display: block;
    text-align: center;
    margin-top: var(--space-sm);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* Privacy Section */
.privacy {
    padding: var(--space-3xl) 0;
    background: var(--bg-elevated);
}

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

.privacy-text .section-title {
    text-align: left;
}

.privacy-text p {
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-lg);
}

.privacy-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.privacy-list li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-lg);
}

.check-icon {
    width: 24px;
    height: 24px;
    color: #30D158;
    flex-shrink: 0;
}

.privacy-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.privacy-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-2xl);
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.1), rgba(88, 86, 214, 0.1));
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
}

.shield-icon {
    width: 80px;
    height: 80px;
    color: var(--primary);
}

.privacy-badge span {
    font-size: var(--font-size-xl);
    font-weight: 600;
}

/* Social Proof Section */
.social-proof {
    padding: var(--space-2xl) 0;
    background: var(--bg);
}

.proof-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-2xl);
    flex-wrap: wrap;
}

.stat {
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
}

.stat.visible {
    animation: fadeInUp 0.6s var(--ease-out) forwards;
}

.stat:nth-child(2).visible { animation-delay: 0.1s; }
.stat:nth-child(3).visible { animation-delay: 0.2s; }
.stat:nth-child(4).visible { animation-delay: 0.3s; }

.stat-number {
    display: block;
    font-size: var(--font-size-5xl);
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* CTA Section */
.cta {
    padding: var(--space-3xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-title {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.cta-subtitle {
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-xl);
}

.cta-note {
    margin-top: var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--text-tertiary);
}

.cta-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 100%, rgba(0, 122, 255, 0.2) 0%, transparent 60%);
    z-index: -1;
}

/* Footer */
.footer {
    padding: var(--space-xl) 0;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.footer-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

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

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

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

.footer-bottom {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
}

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

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

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-visual {
        display: none;
    }

    .hero {
        text-align: center;
    }

    .privacy-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .privacy-text .section-title {
        text-align: center;
    }

    .privacy-list {
        align-items: center;
    }
}

@media (max-width: 768px) {
    :root {
        --font-size-5xl: 2.5rem;
        --font-size-4xl: 2rem;
        --font-size-3xl: 1.5rem;
    }

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

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

    .screenshots-carousel {
        gap: var(--space-md);
    }

    .screenshot-item {
        width: 160px;
    }

    .proof-stats {
        gap: var(--space-lg);
    }

    .stat-number {
        font-size: var(--font-size-4xl);
    }

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

    .nav-links {
        gap: var(--space-sm);
    }

    .nav-links a:not(.nav-cta) {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: var(--font-size-3xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-base);
    }

    .section-title {
        font-size: var(--font-size-2xl);
    }

    .screenshots-carousel {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0 var(--space-md);
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

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

/* 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;
    }
}
