/* ========================================
   CSS Variables for Light & Dark Mode
   ======================================== */
:root {
    /* Light mode colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --border-color: #d2d2d7;
    --nav-bg: rgba(255, 255, 255, 0.8);

    /* Gradients */
    --gradient-purple: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-blue: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --gradient-purple-light: linear-gradient(180deg, #667eea20 0%, #764ba220 100%);
    --gradient-blue-light: linear-gradient(180deg, #4facfe20 0%, #00f2fe20 100%);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #000000;
        --bg-secondary: #1d1d1f;
        --text-primary: #f5f5f7;
        --text-secondary: #a1a1a6;
        --border-color: #424245;
        --nav-bg: rgba(0, 0, 0, 0.8);
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.7;
}

/* ========================================
   Layout Utilities
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (min-width: 768px) {
    .container {
        padding: 0 48px;
    }
}

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

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 32px;
    font-size: 14px;
}

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

@media (max-width: 768px) {
    .nav-links {
        gap: 20px;
        font-size: 13px;
    }
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 60px;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 0;
}

.hero-title {
    font-size: clamp(48px, 8vw, 80px);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(18px, 3vw, 24px);
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.5;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-gradient {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1000px;
    height: 1000px;
    background: var(--gradient-hero);
    opacity: 0.15;
    filter: blur(100px);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
}

@media (prefers-color-scheme: dark) {
    .hero-gradient {
        opacity: 0.25;
    }
}

/* ========================================
   Buttons
   ======================================== */
.btn-primary {
    display: inline-block;
    padding: 16px 40px;
    background: var(--gradient-purple);
    color: #ffffff;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 500;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

/* ========================================
   Apps Section
   ======================================== */
.apps-section {
    padding: 60px 0;
    background: var(--bg-secondary);
}

@media (min-width: 768px) {
    .apps-section {
        padding: 120px 0;
    }
}

.section-title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .section-title {
        margin-bottom: 80px;
    }
}

.apps-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

@media (min-width: 768px) {
    .apps-grid {
        gap: 80px;
    }
}

.app-card {
    display: flex;
    flex-direction: column;
    gap: 32px;
    background: var(--bg-primary);
    border-radius: 24px;
    padding: 24px;
    border: 1px solid var(--border-color);
}

@media (min-width: 768px) {
    .app-card {
        padding: 40px;
        gap: 40px;
    }
}

@media (min-width: 1024px) {
    .app-card {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: center;
        padding: 48px;
    }

    .app-card:nth-child(even) .app-screenshots {
        order: -1;
    }
}

.app-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.app-icon-img {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .app-icon-img {
        width: 80px;
        height: 80px;
        border-radius: 18px;
    }

    .app-header {
        gap: 16px;
        margin-bottom: 20px;
    }
}

.app-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 2px 0;
    font-weight: 400;
}

@media (min-width: 768px) {
    .app-subtitle {
        font-size: 15px;
        margin: 4px 0;
    }
}

.app-category {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

@media (min-width: 768px) {
    .app-category {
        font-size: 13px;
    }
}

.app-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 2px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .app-name {
        font-size: 28px;
        margin-bottom: 4px;
    }
}

.app-description {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .app-description {
        font-size: 18px;
        margin-bottom: 24px;
    }
}

/* App Store Style GET Button */
.get-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 32px;
    background: #007AFF;
    color: #ffffff;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.1s ease;
    margin-top: 16px;
    min-width: 80px;
}

.get-button:hover {
    opacity: 1;
    background: #0051D5;
    transform: scale(1.02);
}

.get-button:active {
    transform: scale(0.98);
}

@media (min-width: 768px) {
    .get-button {
        margin-top: 24px;
        padding: 10px 40px;
        font-size: 16px;
    }
}

/* Screenshots */
.app-screenshots {
    width: 100%;
    overflow: hidden;
    margin: 0;
}

@media (min-width: 768px) {
    .app-screenshots {
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

.screenshots-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

@media (min-width: 768px) {
    .screenshots-container {
        gap: 16px;
        padding: 8px;
        justify-content: center;
    }
}

.screenshots-container::-webkit-scrollbar {
    height: 6px;
}

@media (min-width: 768px) {
    .screenshots-container::-webkit-scrollbar {
        height: 8px;
    }
}

.screenshots-container::-webkit-scrollbar-track {
    background: transparent;
}

.screenshots-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.screenshot {
    width: 140px;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    scroll-snap-align: start;
}

@media (min-width: 480px) {
    .screenshot {
        width: 160px;
        border-radius: 18px;
    }
}

@media (min-width: 768px) {
    .screenshot {
        width: 200px;
        border-radius: 20px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    }
}

.screenshot:hover {
    transform: scale(1.05);
}

@media (max-width: 767px) {
    .screenshot:hover {
        transform: none;
    }
}

/* ========================================
   About Section
   ======================================== */
.about-section {
    padding: 120px 0;
}

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

.about-text {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 80px;
    line-height: 1.7;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

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

.value-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.value-item h3 {
    font-size: 24px;
    margin-bottom: 12px;
    font-weight: 600;
}

.value-item p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--bg-secondary);
    padding: 80px 0 40px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    margin-bottom: 60px;
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: 2fr 3fr;
    }
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 14px;
}

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

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-column h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.footer-column a {
    color: var(--text-secondary);
    font-size: 14px;
}

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

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 767px) {
    .values-grid {
        grid-template-columns: 1fr;
    }

    /* Ensure app info text doesn't overflow on mobile */
    .app-info {
        overflow: hidden;
    }
}
