/* ================================
   CSS Variables & Theme
   ================================ */

:root {
    /* Brand Colors */
    --color-primary: #4CAF50;
    --color-primary-light: #66BB6A;
    --color-primary-dark: #388E3C;
    --color-accent: #FF9800;
    --color-warning: #FFC107;
    --color-error: #F44336;

    /* Light Mode */
    --color-bg: #FFFFFF;
    --color-bg-secondary: #F5F5F5;
    --color-bg-tertiary: #FAFAFA;
    --color-text: #1A1A1A;
    --color-text-secondary: #666666;
    --color-text-tertiary: #999999;
    --color-border: #E0E0E0;
    --color-shadow: rgba(0, 0, 0, 0.1);
    --color-shadow-strong: rgba(0, 0, 0, 0.15);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    --gradient-hero: linear-gradient(135deg, #F5F5F5 0%, #FAFAFA 100%);
    --gradient-text: linear-gradient(135deg, #4CAF50 0%, #FF9800 100%);

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

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

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Typography */
    --font-system: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
}

[data-theme="dark"] {
    --color-bg: #1A1A1A;
    --color-bg-secondary: #242424;
    --color-bg-tertiary: #2A2A2A;
    --color-text: #FFFFFF;
    --color-text-secondary: #B0B0B0;
    --color-text-tertiary: #808080;
    --color-border: #3A3A3A;
    --color-shadow: rgba(0, 0, 0, 0.3);
    --color-shadow-strong: rgba(0, 0, 0, 0.5);
    --gradient-hero: linear-gradient(135deg, #1A1A1A 0%, #242424 100%);
}

/* ================================
   Reset & Base Styles
   ================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-system);
    font-weight: var(--font-weight-normal);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: opacity var(--transition-fast);
}

a:hover {
    opacity: 0.8;
}

/* ================================
   Navigation
   ================================ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    transition: all var(--transition-normal);
}

[data-theme="dark"] .nav {
    background: rgba(26, 26, 26, 0.8);
}

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

.nav-logo {
    font-size: 1.25rem;
    font-weight: var(--font-weight-bold);
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    font-size: 0.9375rem;
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--color-text);
    opacity: 1;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: var(--radius-full);
    transition: transform var(--transition-fast);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-icon {
    width: 20px;
    height: 20px;
    display: block;
}

/* Theme Toggle SVG Icons */
.theme-icon svg {
    width: 100%;
    height: 100%;
    fill: var(--color-text-secondary);
    transition: fill var(--transition-fast);
}

.theme-toggle:hover .theme-icon svg {
    fill: var(--color-text);
}

/* ================================
   Hero Section
   ================================ */

.hero {
    padding: calc(80px + var(--space-3xl)) var(--space-lg) var(--space-3xl);
    background: var(--gradient-hero);
    overflow: hidden;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.hero-text {
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: var(--font-weight-bold);
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
    max-width: 500px;
}

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

.hero-requirements {
    font-size: 0.875rem;
    color: var(--color-text-tertiary);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 1s ease-out 0.3s both;
}

.phone-mockup {
    position: relative;
    max-width: 350px;
    filter: drop-shadow(0 20px 60px var(--color-shadow-strong));
    animation: float 6s ease-in-out infinite;
}

.app-screenshot {
    width: 100%;
    border-radius: var(--radius-xl);
}

/* ================================
   Buttons
   ================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(76, 175, 80, 0.4);
    opacity: 1;
}

.btn-large {
    padding: 1.125rem 2.25rem;
    font-size: 1.125rem;
}

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

/* ================================
   Section Styles
   ================================ */

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-3xl);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
}

.section-description {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
}

/* ================================
   Features Section
   ================================ */

.features {
    padding: var(--space-3xl) var(--space-lg);
    background: var(--color-bg);
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-xl);
}

.feature-card {
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    opacity: 0;
    transform: translateY(30px);
    display: flex;
    flex-direction: column;
}

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

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px var(--color-shadow);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    position: relative;
}

/* Custom Icon Designs */
.icon-tap::before {
    content: '';
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
}

.icon-chart {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
}

.icon-chart::before {
    content: '';
    width: 32px;
    height: 32px;
    background:
        linear-gradient(white 0 0) 4px 100%/4px 60%,
        linear-gradient(white 0 0) 12px 100%/4px 80%,
        linear-gradient(white 0 0) 20px 100%/4px 50%,
        linear-gradient(white 0 0) 28px 100%/4px 70%;
    background-repeat: no-repeat;
}

.icon-target {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
}

.icon-target::before {
    content: '';
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.3);
}

.icon-target::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.icon-shield::before {
    content: '';
    width: 28px;
    height: 32px;
    background: white;
    clip-path: polygon(50% 0%, 100% 20%, 100% 70%, 50% 100%, 0% 70%, 0% 20%);
}

.icon-shield::after {
    content: '✓';
    position: absolute;
    color: var(--color-primary);
    font-size: 18px;
    font-weight: bold;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-sm);
}

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

.feature-image {
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-top: auto;
}

.feature-image img {
    width: 100%;
    transition: transform var(--transition-slow);
}

.feature-card:hover .feature-image img {
    transform: scale(1.05);
}

/* ================================
   Screenshots Section
   ================================ */

.screenshots {
    padding: var(--space-3xl) var(--space-lg);
    background: var(--color-bg-secondary);
}

.screenshots-carousel {
    max-width: 400px;
    margin: 0 auto var(--space-xl);
    position: relative;
    height: 700px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.screenshot-wrapper {
    position: absolute;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
    pointer-events: none;
}

.screenshot-wrapper.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.screenshot-img {
    max-width: 100%;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px var(--color-shadow-strong);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    background: var(--color-border);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dot.active {
    background: var(--color-primary);
    transform: scale(1.2);
}

.dot:hover {
    background: var(--color-primary-light);
}

/* ================================
   Privacy Callout Section
   ================================ */

.privacy-callout {
    padding: var(--space-3xl) var(--space-lg);
    background: var(--gradient-primary);
    color: white;
}

.privacy-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.privacy-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    position: relative;
}

.privacy-icon::before {
    content: '';
    width: 36px;
    height: 42px;
    background: white;
    clip-path: polygon(50% 0%, 100% 20%, 100% 70%, 50% 100%, 0% 70%, 0% 20%);
}

.privacy-icon::after {
    content: '✓';
    position: absolute;
    color: var(--color-primary);
    font-size: 24px;
    font-weight: bold;
}

.privacy-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-md);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.privacy-description {
    font-size: 1.25rem;
    margin-bottom: var(--space-xl);
    color: rgba(255, 255, 255, 1);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.privacy-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.privacy-feature {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-medium);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.check-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.privacy-link {
    display: inline-block;
    color: white;
    font-weight: var(--font-weight-semibold);
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: text-underline-offset var(--transition-fast);
}

.privacy-link:hover {
    text-underline-offset: 6px;
    opacity: 1;
}

/* ================================
   CTA Section
   ================================ */

.cta {
    padding: var(--space-3xl) var(--space-lg);
    background: var(--color-bg);
    text-align: center;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-md);
}

.cta-description {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
}

/* ================================
   Footer
   ================================ */

.footer {
    background: var(--color-bg-secondary);
    padding: var(--space-3xl) var(--space-lg) var(--space-lg);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto var(--space-xl);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
}

.footer-title {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-sm);
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-description {
    color: var(--color-text-secondary);
}

.footer-heading {
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-md);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-primary);
    opacity: 1;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-text-tertiary);
    font-size: 0.875rem;
}

/* ================================
   Privacy Policy Page
   ================================ */

.privacy-page {
    max-width: 800px;
    margin: 0 auto;
    padding: calc(80px + var(--space-xl)) var(--space-lg) var(--space-3xl);
}

.privacy-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.privacy-header h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
}

.privacy-updated {
    color: var(--color-text-tertiary);
    font-size: 0.875rem;
}

.privacy-content {
    text-align: left;
}

.privacy-content h2 {
    font-size: 1.75rem;
    font-weight: var(--font-weight-semibold);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
    color: var(--color-text);
}

.privacy-content h3 {
    font-size: 1.25rem;
    font-weight: var(--font-weight-semibold);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.privacy-content p {
    margin-bottom: var(--space-md);
    line-height: 1.8;
    color: var(--color-text-secondary);
}

.privacy-content strong {
    color: var(--color-text);
    font-weight: var(--font-weight-semibold);
}

.privacy-content ul {
    margin: var(--space-md) 0;
    padding-left: var(--space-xl);
    text-align: left;
}

.privacy-content li {
    margin-bottom: var(--space-sm);
    line-height: 1.8;
    color: var(--color-text-secondary);
}

.privacy-highlight {
    background: var(--color-bg-secondary);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    margin: var(--space-lg) 0;
    border-left: 4px solid var(--color-primary);
    text-align: left;
}

.privacy-highlight p {
    margin: 0;
    font-size: 1.125rem;
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--color-primary);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-xl);
    transition: gap var(--transition-fast);
}

.back-link:hover {
    gap: var(--space-sm);
    opacity: 1;
}

.privacy-footer-note {
    margin-top: var(--space-3xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-text-tertiary);
}

/* ================================
   Animations
   ================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* ================================
   Responsive Design
   ================================ */

@media (max-width: 768px) {
    .nav-container {
        padding: var(--space-md);
    }

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

    .nav-link {
        font-size: 0.875rem;
    }

    .hero {
        padding: calc(60px + var(--space-xl)) var(--space-md) var(--space-xl);
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .hero-image {
        order: -1;
    }

    .phone-mockup {
        max-width: 280px;
    }

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

    .hero-description {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .features,
    .screenshots,
    .privacy-callout,
    .cta {
        padding: var(--space-xl) var(--space-md);
    }

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

    .screenshots-carousel {
        height: 600px;
        max-width: 300px;
    }

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

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
        text-align: center;
    }
}

@media (max-width: 480px) {
    .phone-mockup {
        max-width: 240px;
    }

    .screenshots-carousel {
        height: 500px;
        max-width: 250px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

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