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

:root {
    --color-primary: #007aff;
    --color-primary-hover: #0051d5;
    --color-secondary: #5856d6;
    --color-text: #1d1d1f;
    --color-text-secondary: #86868b;
    --color-background: #ffffff;
    --color-surface: #f5f5f7;
    --color-border: #e5e5e7;
    --color-shadow: rgba(0, 0, 0, 0.04);
    --color-shadow-hover: rgba(0, 0, 0, 0.08);

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --container-width: 1200px;
    --spacing-unit: 8px;

    --transition-fast: 150ms ease-in-out;
    --transition-medium: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 calc(var(--spacing-unit) * 3);
}

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

h1 {
    font-size: 48px;
}
h2 {
    font-size: 36px;
}
h3 {
    font-size: 24px;
}
h4 {
    font-size: 20px;
}

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

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

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    transition: all var(--transition-medium);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 1.5);
}

.nav-logo {
    width: 32px;
    height: 32px;
}

.nav-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: calc(var(--spacing-unit) * 4);
}

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

.nav-links a:hover {
    opacity: 0.7;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 1);
    padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 3);
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 16px var(--color-shadow-hover);
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
}

.btn-secondary:hover {
    background: var(--color-border);
    transform: translateY(-1px);
}

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

/* Hero Section */
.hero {
    padding: calc(var(--spacing-unit) * 20) 0 calc(var(--spacing-unit) * 10);
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: calc(var(--spacing-unit) * 6);
    align-items: center;
}

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

.hero-title {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: calc(var(--spacing-unit) * 3);
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    line-height: 1.6;
    margin-bottom: calc(var(--spacing-unit) * 4);
}

.hero-actions {
    display: flex;
    gap: calc(var(--spacing-unit) * 2);
    flex-wrap: wrap;
}

.hero-visual {
    position: relative;
}

.device-frame {
    position: relative;
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Section Styles */
.section-title {
    text-align: center;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.section-subtitle {
    text-align: center;
    font-size: 18px;
    margin-bottom: calc(var(--spacing-unit) * 6);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Features Section */
.features {
    padding: calc(var(--spacing-unit) * 10) 0;
    background: var(--color-surface);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: calc(var(--spacing-unit) * 4);
}

.feature-card {
    background: var(--color-background);
    padding: calc(var(--spacing-unit) * 4);
    border-radius: 16px;
    text-align: center;
    transition: all var(--transition-medium);
    cursor: default;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px var(--color-shadow-hover);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto calc(var(--spacing-unit) * 3);
    background: var(--color-surface);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-medium);
}

.feature-card:hover .feature-icon {
    background: var(--color-primary);
    color: white;
}

.feature-icon svg {
    stroke: var(--color-primary);
    transition: stroke var(--transition-medium);
}

.feature-card:hover .feature-icon svg {
    stroke: white;
}

.feature-card h3 {
    margin-bottom: calc(var(--spacing-unit) * 1.5);
}

/* Demo Section */
.demo {
    padding: calc(var(--spacing-unit) * 10) 0;
}

.demo-container {
    background: var(--color-surface);
    border-radius: 20px;
    overflow: visible;
    box-shadow: 0 20px 60px var(--color-shadow);
    max-width: 90%;
    margin: 0 auto;
}

.demo-tabs {
    display: flex;
    background: var(--color-background);
    border-bottom: 1px solid var(--color-border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.demo-tab {
    flex: 1;
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 3);
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.demo-tab:hover {
    color: var(--color-text);
}

.demo-tab.active {
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
}

.demo-content {
    position: relative;
    min-height: 500px;
    padding: calc(var(--spacing-unit) * 4) 0;
}

.demo-panel {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: calc(var(--spacing-unit) * 2);
    width: 100%;
}

.demo-panel.active {
    display: flex;
}


/* Demo Layout Styles */
.demo-layout {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: calc(var(--spacing-unit) * 5);
    align-items: start;
    padding: calc(var(--spacing-unit) * 4);
}

.demo-image {
    position: relative;
}

.demo-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px var(--color-shadow);
}

/* Special handling for mobile screenshot - show full image */
#demo-mobile .demo-image img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
}

/* Number overlay */
.number-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.number-point {
    position: absolute;
    width: 32px;
    height: 32px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.demo-features {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 3);
}

.demo-feature {
    display: flex;
    gap: calc(var(--spacing-unit) * 2);
    align-items: flex-start;
}

.demo-feature-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.demo-feature-content h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: calc(var(--spacing-unit) * 0.5);
    color: var(--color-text);
}

.demo-feature-content p {
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    color: var(--color-text-secondary);
}

/* Installation Section */
.installation {
    padding: calc(var(--spacing-unit) * 10) 0;
    background: var(--color-surface);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: calc(var(--spacing-unit) * 4);
    margin-bottom: calc(var(--spacing-unit) * 6);
}

.step {
    text-align: center;
}

.step-number {
    width: 64px;
    height: 64px;
    margin: 0 auto calc(var(--spacing-unit) * 3);
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
}

.step h3 {
    margin-bottom: calc(var(--spacing-unit) * 1.5);
}

.installation-actions {
    display: flex;
    gap: calc(var(--spacing-unit) * 2);
    justify-content: center;
    flex-wrap: wrap;
}

/* Support Section */
.support {
    padding: calc(var(--spacing-unit) * 10) 0;
    background: linear-gradient(135deg, #f5f5f7 0%, #e5e5e7 100%);
}

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

.support-actions {
    display: flex;
    gap: calc(var(--spacing-unit) * 2);
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    padding: calc(var(--spacing-unit) * 6) 0 calc(var(--spacing-unit) * 3);
    background: var(--color-text);
    color: white;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: calc(var(--spacing-unit) * 6);
    margin-bottom: calc(var(--spacing-unit) * 6);
}

.footer-brand p {
    margin-top: calc(var(--spacing-unit) * 1);
    opacity: 0.7;
}

.footer-logo {
    width: 40px;
    height: 40px;
    margin-bottom: calc(var(--spacing-unit) * 2);
    filter: invert(1);
}

.footer-links h4 {
    margin-bottom: calc(var(--spacing-unit) * 2);
    font-size: 16px;
}

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

.footer-links li {
    margin-bottom: calc(var(--spacing-unit) * 1);
}

.footer-links a {
    color: white;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.footer-links a:hover {
    opacity: 1;
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: calc(var(--spacing-unit) * 3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
}

/* Mobile image specific styling */
#demo-mobile .image-wrapper {
    max-width: 300px;
}

#demo-mobile .image-wrapper img {
    max-width: 300px;
    width: auto;
    height: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 calc(var(--spacing-unit) * 2);
    }

    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 40px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

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

    .device-frame {
        transform: none;
        margin-top: calc(var(--spacing-unit) * 4);
    }

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

    .demo-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        position: relative;
    }
    
    .demo-tabs::-webkit-scrollbar {
        display: none;
    }
    
    /* Add shadow indicators for scrollable tabs */
    .demo-container {
        position: relative;
    }
    
    .demo-container::before,
    .demo-container::after {
        content: '';
        position: absolute;
        top: 0;
        width: 20px;
        height: 48px;
        pointer-events: none;
        z-index: 10;
        display: none;
    }
    
    .demo-container::before {
        left: 0;
        background: linear-gradient(90deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
    }
    
    .demo-container::after {
        right: 0;
        background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
    }

    .demo-tab {
        flex: 0 0 auto;
        font-size: 14px;
        padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 2);
        min-width: max-content;
    }

    .demo-content {
        min-height: auto;
        padding: calc(var(--spacing-unit) * 2) 0;
    }

    .image-wrapper img {
        max-width: 100%;
    }

    /* Mobile demo adjustments */
    .demo-layout {
        grid-template-columns: 1fr;
        gap: calc(var(--spacing-unit) * 3);
        padding: calc(var(--spacing-unit) * 2);
    }
    
    .demo-image {
        order: 1;
    }
    
    .demo-features {
        order: 2;
        gap: calc(var(--spacing-unit) * 2);
    }
    
    .number-point {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .demo-feature-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .demo-feature-content h4 {
        font-size: 16px;
    }
    
    .demo-feature-content p {
        font-size: 14px;
    }

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

    .footer-logo {
        margin-left: auto;
        margin-right: auto;
    }
}

/* Animations - removed fade-in effects */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus Styles */
:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

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