:root {
    --bg-color: #0F111A;
    --card-bg: rgba(28, 31, 46, 0.6);
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --accent-blue: #00C9FF;
    --accent-green: #00FF9D;
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Background Glow */
body::before {
    content: "";
    position: fixed;
    top: -20%;
    left: -20%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(0, 201, 255, 0.15), transparent 70%);
    z-index: -1;
    pointer-events: none;
    animation: pulse 10s infinite alternate;
}

body::after {
    content: "";
    position: fixed;
    bottom: -20%;
    right: -20%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(0, 255, 157, 0.1), transparent 70%);
    z-index: -1;
    pointer-events: none;
    animation: pulse 10s infinite alternate-reverse;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.1); opacity: 1; }
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 0;
    animation: fadeInDown 0.8s ease-out;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px; /* Space between logo and text */
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    text-decoration: none;
}

.logo-img {
    height: 40px; /* Adjust size */
    width: auto;
    border-radius: 10px; /* Apple-style rounded corners */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* Subtle shadow depth */
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 80px 0 40px 0; /* Reduced bottom padding */
    position: relative; /* Context for graph */
    z-index: 1; /* New stacking context */
}

/* Hero Graph */
.hero-graph-container {
    position: absolute;
    top: 50%; 
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    max-width: 1400px;
    height: 400px;
    z-index: -1; /* Behind content */
    overflow: visible;
    pointer-events: none;
    opacity: 0.25; /* Even more subtle for maximum readability */
}

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

.hero-graph path {
    /* Color set in HTML for Safari safety */
    stroke-linecap: round;
    /* Neon Glow + Blur for softer look */
    filter: blur(1px) drop-shadow(0 0 10px rgba(0, 255, 157, 0.4)); 
    -webkit-filter: blur(1px) drop-shadow(0 0 10px rgba(0, 255, 157, 0.4));
    
    /* Animation setup */
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: drawGraph 2.5s ease-out forwards;
    -webkit-animation: drawGraph 2.5s ease-out forwards;
    animation-delay: 0.2s;
}

@keyframes drawGraph {
    to { stroke-dashoffset: 0; }
}

h1 {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 20px;
    line-height: 1.1;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: 0.2s;
    position: relative;
    z-index: 2; /* Explicitly above graph */
}

.subtitle {
    font-size: 24px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px auto;
    font-weight: 400;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: 0.4s;
    position: relative;
    z-index: 2; /* Explicitly above graph */
}

.hero .btn {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: 0.6s;
    position: relative;
    z-index: 2; /* Explicitly above graph */
}

.hero p:last-child {
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
    animation-delay: 1s;
}

/* Showcase (Screenshots) */
.showcase {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-top: 40px;
    margin-bottom: 100px;
    perspective: 1000px; /* For 3D effect if needed */
}

.iphone-mockup {
    width: 260px; /* Fixed width for screenshots */
    border-radius: 36px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 8px solid #2b2b2b; /* Fake iPhone bezel */
    position: relative;
    opacity: 0;
    animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.iphone-mockup img {
    width: 100%;
    display: block;
    height: auto;
}

/* Staggered animation and positioning */
.iphone-mockup.side {
    transform: scale(0.9) translateY(20px);
    z-index: 1;
    opacity: 0.6; /* Slight fade for side phones */
    animation-delay: 0.8s;
}

.iphone-mockup.center {
    z-index: 2;
    transform: scale(1.05);
    box-shadow: 0 30px 60px rgba(0, 201, 255, 0.15); /* Blue glow */
    border-color: #333;
    animation-delay: 1s;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* To override the transform reset in animation for special mockup scaling, 
   we need specific keyframes or a wrapper. 
   Simplification: Let's adjust opacity only in animation for showcase 
   or accept that 'fadeInUp' resets transform. 
   BETTER: Specific animation for showcase to keep the scale.
*/

.iphone-mockup.side {
    animation: sidePhoneAppear 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.8s;
    opacity: 0;
}

.iphone-mockup.center {
    animation: centerPhoneAppear 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.6s; /* Center first */
    opacity: 0;
}

@keyframes sidePhoneAppear {
    from { opacity: 0; transform: translateY(100px) scale(0.9); }
    to { opacity: 1; transform: translateY(20px) scale(0.9); }
}

@keyframes centerPhoneAppear {
    from { opacity: 0; transform: translateY(100px) scale(1); }
    to { opacity: 1; transform: translateY(0) scale(1.05); }
}


@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 0.6; }
}

/* Glass Cards */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 16px 32px;
    background: var(--accent-green);
    color: var(--bg-color);
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 18px;
}

.btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 255, 157, 0.4);
}

/* Features Grid */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 60px 0;
}

.feature-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.feature-item:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    display: inline-block; /* Ensure transform origin relates to the icon size, not full width */
    font-size: 32px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
    transform-origin: center center; /* Zoom from the middle of the icon */
}

.feature-item:hover .feature-icon {
    transform: scale(1.15); /* Just scale up, no rotation */
}

h3 {
    margin-top: 0;
    color: var(--accent-blue);
}

/* Footer */
footer {
    text-align: center;
    color: var(--text-secondary);
    padding: 60px 0;
    border-top: 1px solid var(--glass-border);
    margin-top: 60px;
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 10px;
    font-size: 14px;
    transition: color 0.2s;
    position: relative;
}

footer a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--accent-green);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

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

footer a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Mobile */
@media (max-width: 768px) {
    h1 { font-size: 40px; }
    .subtitle { font-size: 18px; }
    .glass-card { padding: 20px; }
    
    .showcase {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 60px;
    }
    
    .iphone-mockup.side {
        display: none; /* Hide side screenshots on mobile to save space */
    }
    
    .iphone-mockup.center {
        transform: none; /* Reset scale for mobile */
        width: 80%; /* Adapt width */
        max-width: 300px;
        animation: centerPhoneAppearMobile 1s ease-out forwards;
    }
    
    @keyframes centerPhoneAppearMobile {
        from { opacity: 0; transform: translateY(50px); }
        to { opacity: 1; transform: translateY(0); }
    }
}