/* ================================
   PeerStudy Landing Page Styles
   Dark Mode | Modern | Startup Vibe
   ================================ */

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

:root {
    /* Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #121218;
    --bg-card: #1a1a24;
    --bg-card-hover: #22222e;
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b7b;
    
    --accent-blue: #3b82f6;
    --accent-blue-light: #60a5fa;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
    --accent-gradient-hover: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
    
    --bubble-color: rgba(59, 130, 246, 0.08);
    
    /* Spacing */
    --section-padding: 100px 0;
    --container-width: 1200px;
    --container-padding: 0 24px;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Effects */
    --border-radius: 16px;
    --border-radius-sm: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-glow: 0 0 60px rgba(59, 130, 246, 0.15);
}

html {
    scroll-behavior: smooth;
}

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

/* Floating Bubbles Background */
.bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: var(--bubble-color);
    animation: float 20s infinite ease-in-out;
}

.bubble:nth-child(1) {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.bubble:nth-child(2) {
    width: 300px;
    height: 300px;
    bottom: 20%;
    left: -80px;
    animation-delay: -5s;
}

.bubble:nth-child(3) {
    width: 200px;
    height: 200px;
    top: 40%;
    right: 10%;
    animation-delay: -10s;
}

.bubble:nth-child(4) {
    width: 150px;
    height: 150px;
    bottom: 10%;
    right: 20%;
    animation-delay: -15s;
}

.bubble:nth-child(5) {
    width: 250px;
    height: 250px;
    top: 60%;
    left: 15%;
    animation-delay: -7s;
}

.bubble:nth-child(6) {
    width: 180px;
    height: 180px;
    top: 10%;
    left: 30%;
    animation-delay: -12s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -30px) scale(1.05);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }
    75% {
        transform: translate(20px, 10px) scale(1.02);
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

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

.logo-img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
}

.nav-cta {
    padding: 12px 24px;
    background: var(--accent-gradient);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.nav-cta:hover {
    background: var(--accent-gradient-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    position: relative;
    z-index: 1;
}

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

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #a0a0b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background: var(--accent-gradient);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--accent-gradient-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.btn-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.btn-label {
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-store {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
}

.btn-large {
    padding: 18px 32px;
}

/* Hero Visual - Phone Mockup */
.hero-visual {
    display: none;
}

@media (min-width: 1024px) {
    .hero {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 60px;
        max-width: var(--container-width);
        margin: 0 auto;
    }
    
    .hero-content {
        text-align: left;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .hero-buttons {
        justify-content: flex-start;
    }
    
    .hero-visual {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.phone-mockup {
    width: 320px;
    height: 640px;
    background: #1a1a24;
    border-radius: 40px;
    padding: 12px;
    box-shadow: 
        0 0 0 2px rgba(255, 255, 255, 0.1),
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        var(--shadow-glow);
    position: relative;
}

.phone-mockup::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 24px;
    background: #0a0a0f;
    border-radius: 20px;
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #e8f4fc 0%, #f5f8fc 50%, #edf3f9 100%);
    border-radius: 32px;
    overflow: hidden;
    position: relative;
}

/* App background bubbles */
.phone-screen::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -80px;
    width: 200px;
    height: 200px;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 50%;
}

.phone-screen::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -60px;
    width: 150px;
    height: 150px;
    background: rgba(59, 130, 246, 0.06);
    border-radius: 50%;
}

.app-preview {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px 30px;
    position: relative;
    z-index: 1;
}

/* Small decorative dots like in the app */
.app-preview::before {
    content: '';
    position: absolute;
    top: 80px;
    left: 20px;
    width: 8px;
    height: 8px;
    background: rgba(59, 130, 246, 0.3);
    border-radius: 50%;
}

.app-preview::after {
    content: '';
    position: absolute;
    top: 180px;
    right: 30px;
    width: 6px;
    height: 6px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 50%;
}

.preview-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.preview-logo svg {
    width: 50px;
    height: 25px;
    margin-bottom: 6px;
}

.preview-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #3b82f6;
    margin-bottom: 4px;
}

.preview-tagline {
    font-size: 0.9rem;
    color: #64748b;
}

.preview-card {
    background: white;
    border-radius: 20px;
    padding: 28px 20px;
    width: 100%;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.preview-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
    margin-bottom: 8px;
}

.preview-card-subtitle {
    font-size: 0.8rem;
    color: #64748b;
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.5;
}

.preview-input {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 16px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-input-icon {
    width: 18px;
    height: 18px;
    color: #94a3b8;
}

.preview-input span {
    color: #94a3b8;
    font-size: 0.9rem;
}

.preview-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    text-align: center;
    padding: 18px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Features Section */
.features {
    padding: var(--section-padding);
    position: relative;
    z-index: 1;
}

.features-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: var(--container-padding);
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.feature-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 40px 32px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
    border-color: rgba(59, 130, 246, 0.2);
}

.feature-number {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 4rem;
    font-weight: 800;
    color: rgba(59, 130, 246, 0.1);
    line-height: 1;
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--accent-gradient);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

.feature-description strong {
    color: var(--accent-blue-light);
}

/* CTA Section */
.cta {
    padding: var(--section-padding);
    position: relative;
    z-index: 1;
}

.cta-container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--container-padding);
}

.cta-content {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 60px 40px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.cta-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
}

.cta-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    margin-bottom: 16px;
}

.cta-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 1;
}

.footer-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: var(--container-padding);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

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

.footer-logo .logo-icon {
    width: 40px;
    height: 20px;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --section-padding: 80px 0;
    }
    
    .hero {
        padding-top: 100px;
        min-height: auto;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-card {
        padding: 32px 24px;
    }
    
    .cta-content {
        padding: 40px 24px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Animations */
@media (prefers-reduced-motion: no-preference) {
    .feature-card {
        opacity: 0;
        transform: translateY(30px);
        animation: fadeInUp 0.6s ease forwards;
    }
    
    .feature-card:nth-child(1) { animation-delay: 0.1s; }
    .feature-card:nth-child(2) { animation-delay: 0.2s; }
    .feature-card:nth-child(3) { animation-delay: 0.3s; }
}

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

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