/* --- CSS Reset & Variables --- */
:root {
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #ec4899;
    --accent: #0ea5e9;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --radius-lg: 24px;
    --radius-md: 16px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* --- Base Components --- */
.gradient-text {
    background: linear-gradient(135deg, var(--accent), var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: gradientShift 5s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 0.75rem 1.75rem;
    border-radius: 99px;
    font-weight: 600;
    display: inline-block;
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
}

.btn-secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1.75rem;
    border-radius: 99px;
    font-weight: 600;
    display: inline-block;
    color: var(--text-light);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.hover-scale:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
}

.btn-secondary.hover-scale:hover {
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

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

.nav-links a:not(.btn-primary) {
    color: var(--text-muted);
    font-weight: 500;
}

.nav-links a:not(.btn-primary):hover {
    color: var(--text-light);
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    gap: 4rem;
}

.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(15, 23, 42, 0) 70%);
    top: 10%;
    left: -10%;
    z-index: -1;
    filter: blur(40px);
}

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

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* --- CSS Device Mockup --- */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.css-device-mockup {
    width: 320px;
    height: 640px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border: 12px solid #334155;
    border-radius: 48px;
    position: relative;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.7), 
                inset 0 0 0 2px #475569;
    overflow: hidden;
}

.app-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0;
    background: #0f172a;
}

.app-header {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 1.5rem 0 1rem;
    color: var(--text-light);
    position: relative;
    background: rgba(30, 41, 59, 0.9);
    border-bottom: 1px solid var(--glass-border);
}

.notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 24px;
    background: #334155;
    border-radius: 0 0 16px 16px;
}

.app-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.5rem;
}

/* CSS Glasses Representation */
.css-glasses-gen {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    height: 220px;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 20px rgba(255,255,255,0.02);
}

.gen-box {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 2;
}

.lens {
    width: 60px;
    height: 45px;
    border: 3px solid var(--primary);
    border-radius: 12px 12px 30px 30px;
    background: rgba(99, 102, 241, 0.1);
    backdrop-filter: blur(2px);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.bridge {
    width: 16px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    margin-top: -15px;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.gen-scan-line {
    position: absolute;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    box-shadow: 0 0 20px var(--accent), 0 0 5px var(--accent);
    top: 0;
    left: 0;
    z-index: 3;
    animation: scan 2.5s infinite ease-in-out;
}

@keyframes scan {
    0% { top: -10%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 110%; opacity: 0; }
}

/* CSS Controls */
.css-controls {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ctrl-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ctrl-label {
    width: 40px;
    height: 6px;
    background: #334155;
    border-radius: 4px;
}
.ctrl-label.short { width: 30px; }

.ctrl-bar {
    height: 8px;
    background: #1e293b;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.ctrl-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 75%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
}

.ctrl-bar.short::after {
    width: 45%;
    background: linear-gradient(90deg, var(--accent), var(--primary));
}

.css-btn {
    background: var(--primary);
    color: #fff;
    text-align: center;
    padding: 0.8rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: auto;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

/* --- Features Section --- */
.features {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    font-weight: 700;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    transform: translateY(-8px);
    background: rgba(43, 56, 78, 0.8);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

/* Feature Icons with pure CSS */
.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 5px rgba(255,255,255,0.2);
}

.bg-gradient-1 { background: linear-gradient(135deg, #6366f1, #a855f7); }
.bg-gradient-2 { background: linear-gradient(135deg, #0ea5e9, #10b981); }
.bg-gradient-3 { background: linear-gradient(135deg, #f43f5e, #f59e0b); }

/* CSS Icon logic */
.css-icon-ai {
    width: 28px;
    height: 28px;
    border: 3px solid #fff;
    border-radius: 8px;
    position: relative;
    transform: rotate(45deg);
}
.css-icon-ai::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.css-icon-tryon {
    width: 24px;
    height: 24px;
    border: 3px solid #fff;
    border-radius: 50%;
    position: relative;
    margin-top: -8px;
}
.css-icon-tryon::after {
    content: '';
    position: absolute;
    top: 26px;
    left: -8px;
    width: 34px;
    height: 14px;
    border: 3px solid #fff;
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
}

.css-icon-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    width: 28px;
    height: 28px;
}
.css-icon-gallery .box {
    background: #fff;
    border-radius: 4px;
}
.css-icon-gallery .box:nth-child(1) { opacity: 0.8; }
.css-icon-gallery .box:nth-child(2) { opacity: 0.5; }
.css-icon-gallery .box:nth-child(3) { opacity: 0.6; }
.css-icon-gallery .box:nth-child(4) { opacity: 1; }

/* --- Footer --- */
.footer {
    border-top: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.95);
    padding: 4rem 2rem 2rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #f8fafc, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.icp-info a {
    color: var(--text-muted);
}
.icp-info a:hover {
    color: var(--primary);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 8rem;
        gap: 3rem;
    }
    .hero-content h1 {
        font-size: 2.8rem;
    }
    .hero-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .section-title {
        font-size: 2rem;
    }
}

