/* =============================================
   COLOR SYSTEM
   Matching UnStationary iOS App (AppColors.swift)
   ============================================= */

:root {
    /* Primary Colors */
    --primary: rgb(115, 102, 217);
    --primary-rgb: 115, 102, 217;
    --accent: rgb(140, 128, 242);
    --accent-rgb: 140, 128, 242;
    --accent-glow: rgba(140, 128, 242, 0.15);
    --accent-dim: rgb(100, 89, 191);

    /* Secondary Colors for Metrics */
    --secondary: rgb(51, 191, 230);
    --secondary-rgb: 51, 191, 230;
    --tertiary: rgb(230, 115, 179);
    --tertiary-rgb: 230, 115, 179;
    --quaternary: rgb(89, 217, 153);
    --quaternary-rgb: 89, 217, 153;
    --speed: rgb(242, 153, 64);
    --speed-rgb: 242, 153, 64;

    /* Surface Colors */
    --background: rgb(15, 15, 26);
    --background-rgb: 15, 15, 26;
    --surface: rgb(26, 26, 38);
    --surface-rgb: 26, 26, 38;
    --surface-variant: rgb(38, 38, 51);
    --surface-variant-rgb: 38, 38, 51;

    /* Text Colors */
    --text: #FFFFFF;
    --text-secondary: rgb(179, 179, 191);
    --text-tertiary: rgb(128, 128, 140);
    --text-dim: rgb(179, 179, 191);

    /* Semantic Colors */
    --success: rgb(51, 217, 128);
    --success-rgb: 51, 217, 128;
    --error: rgb(242, 89, 89);
    --error-rgb: 242, 89, 89;
    --warning: rgb(242, 191, 64);
    --warning-rgb: 242, 191, 64;

    /* Border and Outline */
    --outline: rgb(51, 51, 64);
    --outline-rgb: 51, 51, 64;

    /* Gradients */
    --gradient-1: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--tertiary) 100%);
    --gradient-2: linear-gradient(180deg, var(--background) 0%, var(--surface) 100%);
    --gradient-accent: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);

    /* Transparency Values */
    --white-03: rgba(255, 255, 255, 0.03);
    --white-05: rgba(255, 255, 255, 0.05);
    --white-08: rgba(255, 255, 255, 0.08);
    --white-10: rgba(255, 255, 255, 0.1);
    --white-20: rgba(255, 255, 255, 0.2);
    --black-50: rgba(0, 0, 0, 0.5);
    --black-80: rgba(15, 15, 26, 0.8);

    /* Legacy aliases for compatibility */
    --black: #000000;
    --purple: var(--primary);
    --purple-rgb: 115, 102, 217;
    --purple-glow: rgba(115, 102, 217, 0.1);

    /* Phone Mockup Colors */
    --phone-outer-light: var(--surface-variant);
    --phone-outer-dark: var(--surface);
    --phone-screen-top: var(--background);
    --phone-screen-bottom: var(--surface);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--background);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Animated Background */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, var(--accent-glow) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, var(--purple-glow) 0%, transparent 50%);
}

.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--black-80);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--white-05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Space Mono', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
    margin-right: auto;
    margin-left: 3rem;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-cta {
    background: var(--accent);
    color: var(--text);
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(var(--accent-rgb), 0.3);
}

/* Hero Section */
.hero {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 7rem 4rem 3rem;
    position: relative;
    z-index: 2;
}

.hero-content {
    width: 100%;
    display: grid;
    grid-template-columns: 0.5fr 0.5fr;
    gap: 3em;
    align-items: center;
}

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

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

.hero-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(var(--quaternary-rgb), 0.1);
    border: 1px solid rgba(var(--quaternary-rgb), 0.2);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--quaternary);
}

.hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--quaternary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.hero-badge.badge-android {
    background: rgba(var(--purple-rgb), 0.1);
    border-color: rgba(var(--purple-rgb), 0.2);
    color: var(--purple);
}

.hero-badge.badge-android::before {
    background: var(--purple);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

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

.hero-title {
    max-width: 700px;
    width: 100%;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-dim);
    max-width: 700px;
    width: 100%;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Store Badges */
.store-badge {
    display: inline-block;
    transition: all 0.3s ease;
}

.store-badge:hover {
    transform: translateY(-3px);
}

.store-badge img {
    height: 54px;
    width: auto;
}

.store-badge-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.cta-badges {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--text);
    color: var(--primary);
    padding: 1rem 2rem;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 60px var(--white-20);
}

.btn-primary svg {
    width: 24px;
    height: 24px;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--text);
    padding: 1rem 2rem;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    border: 1px solid var(--white-20);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Phone Mockup */
.hero-visual {
    max-width: 500px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.phone-mockup {
    position: relative;
}

.phone-screenshot {
    max-height: 500px;
    width: auto;
    border-radius: 32px;
    box-shadow: 0 40px 80px var(--black-50);
}

/* Floating elements around phone */
.float-element {
    position: absolute;
    background: var(--white-05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--white-10);
    border-radius: 20px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: float 6s ease-in-out infinite;
}

.float-element.el-1 {
    top: 5%;
    left: -30px;
    animation-delay: 0s;
}

.float-element.el-2 {
    top: 20%;
    right: -70px;
    animation-delay: 1s;
}

.float-element.el-3 {
    bottom: 30%;
    left: -60px;
    animation-delay: 2s;
}

.float-element.el-4 {
    bottom: 10%;
    right: -40px;
    animation-delay: 4s;
}

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

.float-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-glow);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.float-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--accent);
}

.float-text .ft-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.float-text .ft-value {
    font-size: 1rem;
    font-weight: 600;
}

/* Features Section */
.features {
    padding: 8rem 4rem;
    position: relative;
    z-index: 2;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 5rem;
}

.section-tag {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.section-desc {
    font-size: 1.15rem;
    color: var(--text-dim);
    line-height: 1.7;
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--white-05);
    border-radius: 24px;
    padding: 2.5rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(var(--accent-rgb), 0.2);
    background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-glow);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--accent);
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Products Section */
.products {
    padding: 4rem 4rem;
    position: relative;
    z-index: 2;
    background: linear-gradient(180deg, transparent 0%, rgba(var(--accent-rgb), 0.02) 50%, transparent 100%);
}

.products-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.product-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--white-08);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: rgba(var(--accent-rgb), 0.3);
    box-shadow: 0 30px 80px rgba(var(--accent-rgb), 0.1);
}

.product-image {
    width: 100%;
    height: 240px;
    background: linear-gradient(145deg, var(--secondary) 0%, var(--phone-outer-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

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

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
    background: var(--accent);
    color: #ffffff;
    padding: 0.4rem 0.8rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-info {
    padding: 1.5rem;
}

.product-brand {
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-desc {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.product-price .current {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Space Mono', monospace;
}

.product-price .original {
    font-size: 1rem;
    color: var(--text-dim);
    text-decoration: line-through;
}

.product-cta {
    display: block;
    width: 100%;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.875rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    transition: all 0.3s ease;
}

.product-cta:hover {
    background: var(--accent);
    color: var(--primary);
}

.product-buttons {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

.product-cta-secondary {
    background: transparent;
    border: 1px solid var(--text-dim);
    color: var(--text-dim);
}

.product-cta-secondary:hover {
    background: var(--text-dim);
    color: var(--primary);
    border-color: var(--text-dim);
}

/* CTA Section */
.cta-section {
    padding: 4rem 4rem;
    position: relative;
    z-index: 2;
}

.cta-box {
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.1) 0%, var(--purple-glow) 100%);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    border-radius: 32px;
    padding: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.1) 0%, transparent 40%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-box h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.cta-box p {
    font-size: 1.15rem;
    color: var(--text-dim);
    max-width: 500px;
    margin: 0 auto 2rem;
}

.app-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--text);
    color: var(--primary);
    padding: 1rem 2rem;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.app-store-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 60px var(--white-20);
}

.app-store-btn svg {
    width: 28px;
    height: 28px;
}

.app-store-btn .btn-text {
    text-align: left;
}

.app-store-btn .btn-text span {
    display: block;
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.7;
}

.app-store-btn .btn-text strong {
    display: block;
    font-size: 1.1rem;
}

/* Footer */
footer {
    padding: 4rem;
    border-top: 1px solid var(--white-05);
    position: relative;
    z-index: 2;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-logo {
    font-family: 'Space Mono', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
}

.footer-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin-right: auto;
    margin-left: 2rem;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-copy {
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        margin: 0 auto 1.5rem;
    }

    .hero-description {
        margin: 0 auto 2.5rem;
    }

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

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

    .hero-visual {
        order: -1;
        margin: 0 auto;
    }

    .float-element {
        display: none;
    }

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

@media (max-width: 768px) {
    nav {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        display: none;
    }

    .hero, .features, .products, .cta-section {
        padding: 4rem 1.5rem;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .store-badge img {
        height: 44px;
    }

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

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

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

    .cta-box {
        padding: 2.5rem 1.5rem;
    }

    .cta-badges {
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        margin: 0;
        flex-wrap: wrap;
        justify-content: center;
    }
}
