:root {
    --primary: #4f46e5;       /* Indigo 600 - Koaly Brand Color */
    --primary-dark: #3730a3;  /* Indigo 800 */
    --primary-light: #818cf8; /* Indigo 400 */
    --secondary: #10b981;     /* Emerald 500 - Accents */
    --bg-light: #f8fafc;      /* Slate 50 */
    --bg-white: #ffffff;
    --text-main: #0f172a;     /* Slate 900 */
    --text-muted: #64748b;    /* Slate 500 */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --border-radius: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Glassmorphism Utilities */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.3s ease;
}

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

.logo-img {
    height: 40px;
    transition: all 0.3s ease;
}

/* Nav links default to white on the vibrant hero */
.nav-links a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    margin: 0 15px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #dcfce7;
}

/* When at top, put logo in a white pill to ensure visibility without breaking image */
header:not(.header-scrolled) .logo-img {
    background: white;
    padding: 4px 12px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.header-scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

/* When scrolled, links become dark and logo becomes normal (blue) */
.header-scrolled .nav-links a {
    color: #334155;
}
.header-scrolled .nav-links a:hover {
    color: #4f46e5;
}
.header-scrolled .logo-img {
    filter: none;
}

.btn-download {
    background: var(--primary);
    color: white !important;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
    transition: var(--transition);
}

.btn-download:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

/* Hero Section */
.hero {
    padding: 160px 20px 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 0% 0%, #4f46e5, transparent 50%),
                radial-gradient(circle at 100% 100%, #10b981, transparent 50%),
                #1e1b4b;
    position: relative;
    overflow: hidden;
}

/* Vibrant Premium Glowing Blobs (Adjusted for dark background) */
.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: #60a5fa;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.4;
    top: -100px;
    right: -100px;
    z-index: 0;
}
.hero::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: #34d399;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.4;
    bottom: -100px;
    left: -50px;
    z-index: 0;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 60px;
    z-index: 1;
    position: relative;
    padding-top: 40px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
}

.badge-tag {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: #ffffff;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 auto 40px;
    max-width: 750px;
    line-height: 1.6;
}

.store-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.store-btn {
    height: 50px;
    border-radius: 12px;
    transition: var(--transition);
}

.store-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

/* 3D Tablet Mockup */
.tablet-mockup {
    width: 600px;
    height: 400px;
    background: #0f172a;
    border-radius: 30px;
    border: 16px solid #1e293b;
    box-shadow: -20px 40px 80px rgba(0, 0, 0, 0.2), inset 0 0 0 6px #000000;
    position: relative;
    transform: perspective(1200px) rotateY(-12deg) rotateX(4deg);
    z-index: 2;
    overflow: hidden;
    animation: float-tablet 8s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tablet Camera Notch */
.tablet-mockup::before {
    content: '';
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: #334155;
    border-radius: 50%;
    z-index: 10;
}

.tablet-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, #4f46e5, #10b981, #3b82f6);
    background-size: 400% 400%;
    animation: gradient-flow 10s ease infinite;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.simulated-ui {
    text-align: center;
    color: white;
    z-index: 3;
    padding: 30px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

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

@keyframes float-tablet {
    0% { transform: perspective(1200px) rotateY(-12deg) rotateX(4deg) translateY(0px); }
    50% { transform: perspective(1200px) rotateY(-10deg) rotateX(2deg) translateY(-20px); }
    100% { transform: perspective(1200px) rotateY(-12deg) rotateX(4deg) translateY(0px); }
}

.floating-card {
    position: absolute;
    background: white;
    padding: 15px 20px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 3;
    animation: float 6s ease-in-out infinite;
}

.card-1 {
    top: 100px;
    left: -80px;
    animation-delay: 0s;
}

.card-2 {
    bottom: 150px;
    right: -60px;
    animation-delay: 3s;
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

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

/* Features Section (Bento Grid) */
.features {
    padding: 100px 20px;
    background: var(--bg-white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

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

.bento-card {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 35px;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}

.bento-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.06);
    border-color: rgba(79, 70, 229, 0.1);
}

.bento-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.bento-card h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.bento-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Grid specifics */
.bento-large {
    grid-column: span 2;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}
.bento-large h3, .bento-large p {
    color: white;
}
.bento-large i {
    color: rgba(255,255,255,0.8);
}

/* Download Section */
.download-section {
    padding: 100px 20px;
    background: var(--bg-white);
    text-align: center;
}

.download-box {
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(135deg, #4f46e5 0%, #10b981 100%);
    padding: 70px 40px;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(79, 70, 229, 0.2);
    color: white;
}

.download-box h2 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: white;
}

/* Footer */
footer {
    background: #0f172a;
    padding: 80px 20px 30px;
    color: #e2e8f0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

.footer-logo-img {
    height: 45px;
    margin-bottom: 15px;
    background: white;
    padding: 8px 16px;
    border-radius: 12px;
    display: inline-block;
}

.footer-links-group h4, .footer-social h4 {
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 25px;
}

.footer-links-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-links-group a {
    color: #94a3b8;
    font-weight: 500;
    transition: var(--transition);
}

.footer-links-group a:hover {
    color: #10b981;
    transform: translateX(5px);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
}

.social-icons a:hover {
    background: #4f46e5;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    color: #64748b;
    font-size: 0.95rem;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Responsive */
@media (max-width: 992px) {
    .hero-container {
        padding-top: 40px;
    }
    .hero p {
        margin: 0 auto 30px;
    }
    .bento-grid {
        grid-template-columns: 1fr 1fr;
    }
    .bento-large {
        grid-column: span 2;
    }
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero {
        padding-top: 120px;
    }
    .hero h1 { 
        font-size: 2.5rem; 
        word-wrap: break-word;
    }
    .tablet-mockup {
        width: 90vw;
        height: 55vw; /* maintain roughly 16:9 */
        border-width: 10px;
        border-radius: 20px;
        transform: perspective(800px) rotateY(-5deg) rotateX(2deg);
    }
    .simulated-ui h2 {
        font-size: 1.5rem;
    }
    .simulated-ui p {
        font-size: 0.9rem;
    }
    .nav-links { display: none; } /* Mobile menu simplified for now */
    .bento-grid { grid-template-columns: 1fr; }
    .bento-large { grid-column: span 1; }
    .footer-content { 
        grid-template-columns: 1fr; 
        gap: 40px; 
        text-align: center; 
    }
    .footer-links-group {
        align-items: center;
    }
    .social-icons {
        justify-content: center;
    }
    .floating-card { display: none; } /* Hide floating cards on small mobile */
}

@media (max-width: 480px) {
    .hero h1 { 
        font-size: 2.2rem; 
    }
    .hero p {
        font-size: 1.05rem;
    }
    .store-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    .store-btn {
        height: 45px;
    }
    .tablet-mockup {
        width: 95vw;
        height: 60vw;
        border-width: 8px;
        border-radius: 15px;
    }
}
