/* ===========================================
   Napstar Landing Page - Mental Health App Style
   Calm, soft, accessible design system
   =========================================== */

/* CSS Variables - Calm Color Palette */
:root {
    /* Primary - Soft lavender/purple (calming) */
    --color-primary: #7C6FA0;
    --color-primary-light: #9B8FBF;
    --color-primary-dark: #5D5280;
    --color-primary-subtle: #F0EDF5;

    /* Secondary - Warm sage (grounding) */
    --color-secondary: #8FA897;
    --color-secondary-light: #B5C9BB;
    --color-secondary-dark: #6B8573;

    /* Accent - Soft coral (gentle energy) */
    --color-accent: #D4A59A;
    --color-accent-light: #E8CCC5;

    /* Neutrals - Warm grays */
    --color-bg: #FAFAFA;
    --color-bg-warm: #F7F5F3;
    --color-bg-card: #FFFFFF;
    --color-text: #2D2A33;
    --color-text-secondary: #6B6777;
    --color-text-muted: #9994A6;
    --color-border: #E8E5ED;
    --color-border-light: #F2F0F5;

    /* Feedback colors */
    --color-success: #7CB08C;
    --color-warning: #D4A574;
    --color-error: #C98B8B;

    /* Shadows - Soft and diffused */
    --shadow-sm: 0 2px 8px rgba(124, 111, 160, 0.06);
    --shadow-md: 0 4px 16px rgba(124, 111, 160, 0.08);
    --shadow-lg: 0 8px 32px rgba(124, 111, 160, 0.12);
    --shadow-xl: 0 16px 48px rgba(124, 111, 160, 0.16);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --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;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Border radius - Rounded, friendly */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;

    /* Container */
    --container-max: 1200px;
    --container-narrow: 800px;
}

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

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

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text);
}

h1 {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: var(--font-size-3xl);
    letter-spacing: -0.01em;
}

h3 {
    font-size: var(--font-size-xl);
}

p {
    color: var(--color-text-secondary);
}

/* Section Badge */
.section-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: var(--color-primary-subtle);
    color: var(--color-primary);
    font-size: var(--font-size-sm);
    font-weight: 500;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-md);
}

/* Section Header */
.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--space-3xl);
}

.section-header p {
    margin-top: var(--space-md);
    font-size: var(--font-size-lg);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-size-base);
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--color-primary-dark);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

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

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

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

/* ===========================================
   Navigation
   =========================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 250, 250, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border-light);
}

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

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

.logo-icon {
    color: var(--color-primary);
}

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

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

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

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

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

.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.nav-mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: all var(--transition-fast);
}

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

.hero-background {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        var(--color-primary-subtle) 0%,
        var(--color-bg) 50%,
        rgba(143, 168, 151, 0.1) 100%
    );
}

.hero-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--color-primary-subtle) 0%, transparent 70%);
    top: -200px;
    right: -200px;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(143, 168, 151, 0.2) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--color-accent-light) 0%, transparent 70%);
    top: 50%;
    left: 30%;
    opacity: 0.3;
}

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

.hero-text h1 {
    margin-bottom: var(--space-lg);
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
    max-width: 480px;
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.hero-note {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

/* Phone Mockup */
.phone-mockup {
    display: flex;
    justify-content: center;
}

.phone-frame {
    width: 280px;
    background: #1a1a1a;
    border-radius: 40px;
    padding: 12px;
    box-shadow: var(--shadow-xl);
}

.phone-screen {
    background: #000;
    border-radius: 32px;
    overflow: hidden;
    aspect-ratio: 9/19;
}

.app-preview {
    height: 100%;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
}

.app-header {
    width: 100%;
    text-align: center;
    margin-bottom: var(--space-xl);
}

.app-greeting {
    display: block;
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: var(--space-xs);
}

.app-status {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.8);
}

.app-timer {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.timer-display {
    font-size: 48px;
    font-weight: 200;
    letter-spacing: -0.02em;
}

.timer-label {
    font-size: var(--font-size-xs);
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.app-window-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-lg);
    position: relative;
    overflow: hidden;
}

.window-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(102, 189, 217, 0.3), rgba(102, 189, 217, 0.8));
    border-radius: var(--radius-full);
}

.window-marker {
    position: absolute;
    right: 30%;
    top: -4px;
    bottom: -4px;
    width: 2px;
    background: rgba(102, 189, 217, 0.5);
}

.app-recommendation {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.rec-label {
    display: block;
    font-size: var(--font-size-xs);
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: var(--space-xs);
}

.rec-time {
    font-size: var(--font-size-lg);
    color: rgba(102, 189, 217, 1);
}

.app-button {
    width: 100%;
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 500;
    margin-top: auto;
}

/* ===========================================
   Social Proof
   =========================================== */
.social-proof {
    padding: var(--space-3xl) 0;
    background: var(--color-bg-card);
    border-top: 1px solid var(--color-border-light);
    border-bottom: 1px solid var(--color-border-light);
}

.proof-items {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-3xl);
}

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

.proof-number {
    display: block;
    font-size: var(--font-size-2xl);
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--space-xs);
}

.proof-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.proof-divider {
    width: 1px;
    height: 40px;
    background: var(--color-border);
}

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

.problem-content {
    max-width: var(--container-narrow);
    margin: 0 auto;
    text-align: center;
}

.problem-content h2 {
    margin-bottom: var(--space-lg);
}

.problem-content p {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-md);
}

/* ===========================================
   Solution Section
   =========================================== */
.solution {
    padding: var(--space-4xl) 0;
}

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

.solution-content h2 {
    margin-bottom: var(--space-3xl);
}

.solution-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
    text-align: left;
}

.solution-item {
    padding: var(--space-xl);
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    transition: all var(--transition-normal);
    opacity: 0;
    transform: translateY(20px);
}

.solution-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.solution-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary-light);
}

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

.solution-item h3 {
    margin-bottom: var(--space-sm);
}

.solution-item p {
    font-size: var(--font-size-sm);
}

/* ===========================================
   Features Section
   =========================================== */
.features {
    padding: var(--space-4xl) 0;
    background: var(--color-bg-warm);
}

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

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

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.feature-main {
    grid-column: span 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
    padding: var(--space-2xl);
}

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

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

.feature-card p {
    font-size: var(--font-size-sm);
}

/* Timeline Preview */
.timeline-preview {
    background: #1a1a1a;
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.timeline-bar {
    position: relative;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
}

.timeline-block {
    position: absolute;
    top: 4px;
    bottom: 4px;
    border-radius: 4px;
}

.timeline-block.sleep {
    background: linear-gradient(90deg, #5D5280, #7C6FA0);
}

.timeline-block.awake {
    background: rgba(255, 255, 255, 0.1);
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    font-size: var(--font-size-xs);
    color: rgba(255, 255, 255, 0.4);
}

/* ===========================================
   How It Works
   =========================================== */
.how-it-works {
    padding: var(--space-4xl) 0;
}

.steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-3xl);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 240px;
    opacity: 0;
    transform: translateY(20px);
}

.step.visible {
    opacity: 1;
    transform: translateY(0);
}

.step-number {
    width: 56px;
    height: 56px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--space-lg);
}

.step-content h3 {
    margin-bottom: var(--space-sm);
}

.step-content p {
    font-size: var(--font-size-sm);
}

.step-connector {
    width: 80px;
    height: 2px;
    background: var(--color-border);
    margin-top: 28px;
}

.how-note {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    padding: var(--space-xl);
    background: var(--color-primary-subtle);
    border-radius: var(--radius-lg);
}

.how-note p {
    color: var(--color-primary-dark);
    font-size: var(--font-size-lg);
}

/* ===========================================
   Privacy Section
   =========================================== */
.privacy {
    padding: var(--space-4xl) 0;
    background: var(--color-bg-warm);
}

.privacy-content {
    max-width: var(--container-narrow);
    margin: 0 auto;
}

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

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

.privacy-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.privacy-option {
    padding: var(--space-xl);
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    opacity: 0;
    transform: translateY(20px);
}

.privacy-option.visible {
    opacity: 1;
    transform: translateY(0);
}

.option-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
}

.option-icon.local {
    background: var(--color-secondary-light);
    color: var(--color-secondary-dark);
}

.option-icon.cloud {
    background: var(--color-primary-subtle);
    color: var(--color-primary);
}

.privacy-option h4 {
    margin-bottom: var(--space-sm);
}

.privacy-option p {
    font-size: var(--font-size-sm);
}

.privacy-note {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    text-align: center;
    font-style: italic;
}

/* ===========================================
   Quote Section
   =========================================== */
.quote-section {
    padding: var(--space-4xl) 0;
    background: var(--color-primary);
    color: white;
}

.main-quote {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.main-quote p {
    font-size: var(--font-size-3xl);
    font-weight: 600;
    margin-bottom: var(--space-lg);
    color: white;
}

.main-quote cite {
    font-size: var(--font-size-base);
    font-style: normal;
    opacity: 0.8;
}

/* ===========================================
   CTA Section
   =========================================== */
.cta-section {
    padding: var(--space-4xl) 0;
    text-align: center;
}

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

.cta-content > p {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-xl);
}

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

/* ===========================================
   Footer
   =========================================== */
.footer {
    padding: var(--space-3xl) 0 var(--space-xl);
    background: var(--color-text);
    color: white;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-2xl);
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .nav-logo {
    margin-bottom: var(--space-md);
    color: white;
}

.footer-brand .logo-icon {
    color: var(--color-primary-light);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--font-size-sm);
}

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

.footer-column h4 {
    color: white;
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-column a {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-sm);
    transition: color var(--transition-fast);
}

.footer-column a:hover {
    color: white;
}

.footer-bottom {
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.4);
}

/* ===========================================
   Responsive Design
   =========================================== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-subtitle {
        margin: 0 auto var(--space-xl);
    }

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

    .hero-visual {
        order: -1;
    }

    .phone-frame {
        width: 240px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .feature-main {
        grid-column: span 2;
    }

    .solution-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-bg-card);
        flex-direction: column;
        padding: var(--space-lg);
        gap: var(--space-md);
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-lg);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-mobile-toggle {
        display: flex;
    }

    .nav-mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero {
        min-height: auto;
        padding-top: calc(80px + var(--space-2xl));
    }

    .proof-items {
        flex-direction: column;
        gap: var(--space-xl);
    }

    .proof-divider {
        width: 40px;
        height: 1px;
    }

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

    .feature-main {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }

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

    .steps {
        flex-direction: column;
        gap: var(--space-lg);
    }

    .step-connector {
        width: 2px;
        height: 40px;
        margin: 0;
    }

    .privacy-options {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: var(--space-2xl);
    }

    .footer-links {
        flex-direction: column;
        gap: var(--space-xl);
    }

    .main-quote p {
        font-size: var(--font-size-2xl);
    }
}

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

.feature-card,
.solution-item,
.step,
.privacy-option {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* Focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .nav,
    .hero-visual,
    .cta-section,
    .footer {
        display: none;
    }
}
