/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Brand Palette (from app) */
:root {
    /* Primary Colors */
    --primary-blue: #1957DB; /* Main brand color */
    --secondary-blue: #487BEA; /* Lighter blue */
    --light-blue: #7EA3F1;

    /* Extended Palette */
    --navy-dark: #011A51;
    --blue-medium: #487BEA;
    --blue-light: #7EA3F1;
    --blue-pale: #C8D7E9;
    --teal-dark: #1E6B6B;
    --teal-medium: #4A9B8E;
    --teal-light: #7BC4B5;
    --amber: #F06C00;
    --green-bright: #06C00F;
    --magenta: #AB129F;

    /* Functional */
    --success: var(--green-bright);
    --error: #FF3B30;
    --warning: var(--amber);
    --info: var(--secondary-blue);

    /* Text */
    --text-primary: #1A1A1A;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --text-on-dark: #FFFFFF;
    --text-on-primary: #FFFFFF;

    /* Backgrounds */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-tertiary: #F2F3F5;
    --overlay: rgba(0, 0, 0, 0.5);

    /* Derived */
    --gradient-primary: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Generic Page Wrapper (for simple content pages) */
.page {
    padding-top: 90px; /* offset fixed navbar */
}

/* Reusable content card for text-heavy pages (legal, docs) */
.content-card {
    background: #ffffff;
    color: var(--text-primary);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.content-card h1,
.content-card h2,
.content-card h3,
.content-card h4 {
    color: var(--text-primary);
    text-align: left;
}

.content-card h1 {
    font-size: 2rem;
}

.content-card h2 {
    font-size: 1.5rem;
}

.content-card h3 {
    font-size: 1.2rem;
}

.content-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.content-section {
    margin-bottom: 1.5rem;
}

.tldr-box {
    background: var(--bg-secondary);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0 1.5rem;
}

.tldr-item {
    margin: 0.25rem 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* In-page navigation buttons */
.inpage-nav {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 0 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Buttons */
.cta-button {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.cta-button.primary {
    background: white;
    color: var(--primary-blue);
    border: 2px solid white;
}

.cta-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.9);
}

.cta-button.large {
    padding: 16px 32px;
    font-size: 1.2rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--primary-blue);
    backdrop-filter: blur(10px);
    border-bottom: none;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    height: 30px;
    width: auto;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ffffff;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: rgba(255, 255, 255, 0.9);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: var(--primary-blue);
    color: var(--text-on-primary);
    padding: 120px 0 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    overflow-x: hidden;
}

.hero-content {
    text-align: center;
    margin-bottom: 4rem;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.1;
    margin-top: 1rem;
}

.hero-tagline {
    font-size: 1.4rem;
    font-weight: 300;
    font-style: italic;
    opacity: 0.95;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    margin-bottom: 3rem;
}

.hero-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.download-btn {
    display: inline-block;
    transition: transform 0.3s ease;
}

.download-btn:hover {
    transform: translateY(-2px);
}

.download-btn img {
    height: 60px;
    width: 180px;
    border-radius: 8px;
    object-fit: contain;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 4rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Features Section */
.features {
    padding: 100px 0;
    background: var(--primary-blue);
}

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

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: white;
}

.feature-card h3 {
    color: white;
    margin-bottom: 1rem;
}

.feature-card p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

/* Community Section */
.community {
    padding: 100px 0;
    background: var(--primary-blue);
    color: white;
}

.differentiators .testimonial cite {
    color: white;
}

/* Hero Screenshots */
.hero-screenshots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    padding-top: 2rem;
}

.hero-screenshot-item {
    flex: 0 0 auto;
}

.iphone-mockup-hero {
    filter: drop-shadow(0 15px 35px rgba(255, 255, 255, 0.1));
    transition: transform 0.3s ease;
}

.iphone-mockup-hero:hover {
    transform: scale(1.05) translateY(-8px);
}

.iphone-frame-hero {
    position: relative;
    width: 160px;
    height: 328px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 8px;
    margin: 0 auto;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        inset 0 0 0 1px rgba(255, 255, 255, 0.1),
        0 8px 32px rgba(0, 0, 0, 0.2);
}

.iphone-frame-hero::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.iphone-frame-hero::after {
    content: '';
    position: absolute;
    top: 32px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

.iphone-screen-hero {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 26px;
    overflow: hidden;
    position: relative;
}

.iphone-screen-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

.testimonial {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid white;
    backdrop-filter: blur(10px);
}

.testimonial p {
    font-style: italic;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.testimonial cite {
    font-weight: 600;
    color: white;
}

/* Categories Section */
.categories {
    padding: 100px 0;
    background: var(--primary-blue);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.category-card h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.category-card p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Final CTA Section */
.final-cta {
    padding: 100px 0;
    background: var(--primary-blue);
    color: var(--text-on-primary);
    text-align: center;
}

.final-cta h2 {
    color: var(--text-on-primary);
    margin-bottom: 1rem;
}

.final-cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: var(--navy-dark);
    color: var(--text-on-dark);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

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

.footer-logo {
    height: 40px;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.footer-brand p {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.footer-column a {
    display: block;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--text-on-dark);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.12);
}

.footer-bottom p {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    font-size: 1.2rem;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--primary-blue);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: left 0.3s ease;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

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

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

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

    .hero {
        padding: 100px 0 60px;
        min-height: 90vh;
    }

    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .hero-tagline {
        font-size: 1.2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        padding: 0 10px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 2rem;
    }

    .features, .community, .categories {
        padding: 60px 0;
    }

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

    .feature-card {
        padding: 2rem 1.5rem;
    }

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

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }

    .final-cta {
        padding: 60px 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .container {
        padding: 0 15px;
    }

    .cta-button.large {
        padding: 14px 28px;
        font-size: 1.1rem;
    }

    .download-buttons {
        gap: 0.5rem;
    }

    .download-btn img {
        height: 50px;
    }

    .hero-screenshots {
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .iphone-frame-hero {
        width: 140px;
        height: 286px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.1;
    }

    .hero-tagline {
        font-size: 1.1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        padding: 0 5px;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

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

    .category-card {
        padding: 1.5rem;
    }

    .footer-links {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .testimonial {
        padding: 1.5rem;
    }

    .cta-button {
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    .cta-button.large {
        padding: 12px 24px;
        font-size: 1rem;
    }

    .download-btn img {
        height: 45px;
    }

    .hero-screenshots {
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .iphone-frame-hero {
        width: 120px;
        height: 245px;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.3rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .feature-card:hover,
    .category-card:hover {
        transform: none;
    }

    .cta-button:hover {
        transform: none;
    }

    .feature-card,
    .category-card {
        transition: none;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 70px;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--primary-blue);
    z-index: 1000;
    transition: width 0.3s ease;
}