/* Reset and Variables */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: rgba(20, 20, 30, 0.6);
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --accent-primary: #ff4081;
    --accent-secondary: #7c4dff;
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.04);
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

img {
    max-width: 100%;
    height: auto;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background Blobs */
.blob {
    position: absolute;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
    animation: float 20s ease-in-out infinite alternate;
}

.blob-1 {
    top: -5%;
    left: -15%;
    width: min(600px, 90vw);
    height: min(600px, 90vw);
    background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
}

.blob-2 {
    bottom: 20%;
    right: -15%;
    width: min(500px, 80vw);
    height: min(500px, 80vw);
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 30px) scale(1.08); }
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, #ff4081 0%, #c084fc 50%, #7c4dff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #ff4081;
    display: inline-block;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.5px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo img {
    height: 28px;
    width: 28px;
    display: block;
}

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

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

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

.github-btn, .coffee-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 0.45rem 0.9rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
}

.github-btn:hover, .coffee-nav-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.6rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
    min-height: 48px;
    touch-action: manipulation;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 64, 129, 0.3);
}

.btn-primary:hover, .btn-primary:active {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 64, 129, 0.5);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover, .btn-secondary:active {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 6.5rem 1.5rem 3rem;
    gap: 3rem;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    position: relative;
    z-index: 10;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 1.25rem;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 500px;
}

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

.phone-mockup-wrapper {
    flex: 1;
    position: relative;
    height: 540px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 480px;
}

/* iPhone Bezel-less Device Frame */
.device-frame {
    position: relative;
    width: 236px;
    height: 504px;
    border-radius: 44px;
    background: transparent;
    padding: 0;
    box-sizing: border-box;
    border: 2px solid rgba(255, 255, 255, 0.45);
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.15),
        0 25px 65px rgba(0, 0, 0, 0.85),
        0 0 45px rgba(124, 77, 255, 0.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.device-frame.primary-device {
    z-index: 2;
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.device-frame.primary-device:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.35),
        0 35px 85px rgba(0, 0, 0, 0.95),
        0 0 60px rgba(255, 64, 129, 0.38);
}

.device-frame.secondary-device {
    position: absolute;
    width: 218px;
    height: 465px;
    right: 5%;
    top: 50%;
    transform: translateY(-46%) rotate(9deg);
    z-index: 1;
    opacity: 0.55;
    filter: blur(0.5px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 42px;
    padding: 0;
    animation: float-device 6s ease-in-out infinite alternate;
}

@keyframes float-device {
    0% { transform: translateY(-46%) rotate(9deg); }
    100% { transform: translateY(-52%) rotate(12deg); }
}

/* Edge-to-Edge Screen Area */
.device-screen {
    width: 100%;
    height: 100%;
    border-radius: 42px;
    overflow: hidden;
    position: relative;
    background: #000;
}

.device-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Glass Glare Highlight */
.device-glare {
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        105deg,
        rgba(255, 255, 255, 0.09) 0%,
        rgba(255, 255, 255, 0.02) 28%,
        transparent 50%
    );
    pointer-events: none;
    z-index: 5;
}

/* Sections */
section {
    padding: 5rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header h2 {
    font-size: clamp(1.85rem, 5vw, 3rem);
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    max-width: 600px;
    margin: 0 auto;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.bento-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
}

.bento-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 0;
    pointer-events: none;
}

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

.bento-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.bento-card * {
    z-index: 1;
}

@media (min-width: 900px) {
    .bento-wide {
        grid-column: span 2;
    }
}

.card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 64, 129, 0.2), rgba(124, 77, 255, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.bento-card h3 {
    font-size: 1.3rem;
}

.bento-card p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.55;
}

/* Showcase Gallery */
.gallery {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    overflow: hidden;
    padding: 1.5rem 0;
    mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.gallery-track {
    display: flex;
    gap: 1.25rem;
    width: max-content;
}

.gallery-track:hover .gallery-group {
    animation-play-state: paused;
}

.gallery-group {
    display: flex;
    gap: 1.25rem;
    flex-shrink: 0;
    animation: scroll 45s linear infinite;
    will-change: transform;
}

.gallery-group img {
    height: 380px;
    width: auto;
    aspect-ratio: 1080 / 2412;
    object-fit: cover;
    border-radius: 18px;
    border: 2px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    transition: var(--transition-smooth);
    cursor: pointer;
}

.gallery-group img:hover {
    transform: scale(1.04) translateY(-6px);
    border-color: rgba(255, 255, 255, 0.3);
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-100% - 1.25rem)); }
}

/* Support Callout Banner */
.support-banner {
    background: linear-gradient(135deg, rgba(255, 64, 129, 0.12), rgba(124, 77, 255, 0.12));
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    text-align: center;
    margin: 3rem auto 0;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    backdrop-filter: blur(10px);
}

.support-banner h3 {
    font-size: 1.6rem;
}

.support-banner p {
    color: var(--text-secondary);
    max-width: 550px;
}

.coffee-btn {
    background: #ffdd00;
    color: #000000;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 221, 0, 0.3);
}

.coffee-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 221, 0, 0.45);
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 3.5rem 1.5rem;
    margin-top: 4rem;
    background: rgba(0,0,0,0.4);
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-weight: 700;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    max-width: 450px;
}

.footer-links {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.footer-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border-radius: 9999px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(25px);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }

/* 📱 Responsive Mobile Adjustments */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 6.5rem;
        gap: 2.5rem;
        min-height: auto;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-subtitle {
        margin: 0 auto 1.75rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .phone-mockup-wrapper {
        height: auto;
        max-height: 480px;
        margin: 0 auto;
    }
    
    .device-frame.primary-device {
        width: 210px;
        height: 440px;
        border-radius: 36px;
        padding: 0;
    }

    .device-frame.secondary-device {
        display: none;
    }

    .device-screen {
        border-radius: 34px;
    }

    .gallery-group img,
    .gallery-track img {
        height: 280px;
    }
}

@media (max-width: 640px) {
    .nav-content {
        padding: 0.75rem 1rem;
    }

    .nav-links a:not(.github-btn) {
        display: none;
    }

    .hero {
        padding: 5.5rem 1rem 2rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .bento-card {
        padding: 1.5rem 1.25rem;
    }

    .gallery-group img,
    .gallery-track img {
        height: 220px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 1.25rem;
    }

    .footer-links {
        justify-content: center;
    }
}
