/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Epilogue:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    --primary: #5B4DFF;
    --primary-dark: #4336c9;
    --bg-color: #F8FAFC;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --accent-gradient: linear-gradient(135deg, #5B4DFF 0%, #A855F7 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-family: 'Epilogue', sans-serif;
    font-weight: 800;
}

/* Navbar */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: transparent;
    position: absolute;
    width: 100%;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
    /* Optional: in case it's a square icon without rounding */
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 120px 20px 60px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(91, 77, 255, 0.1) 0%, rgba(248, 250, 252, 0) 70%);
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    z-index: -1;
}

.badge {
    background: rgba(91, 77, 255, 0.1);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
    display: inline-block;
    background: radial-gradient(circle, rgba(91, 77, 255, 0.15) 0%, rgba(168, 85, 247, 0.05) 40%, rgba(248, 250, 252, 0) 70%);
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    z-index: -1;
    animation: float 8s ease-in-out infinite alternate;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #5B4DFF 0%, #A855F7 50%, #FF5B4D 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    max-width: 800px;
    animation: gradient-pulse 5s ease infinite, fadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.2s;
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

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

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.hero h1,
.hero p,
.download-btn,
.app-preview,
.badge {
    opacity: 0;
    /* Start hidden */
    animation: fadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.badge {
    animation-delay: 0.1s;
}

.hero h1 {
    animation-delay: 0.2s;
}

.hero p {
    animation-delay: 0.3s;
}

.download-btn {
    animation-delay: 0.4s;
}

/* Caption Pinned to Bottom */
.visual-caption {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(91, 77, 255, 0.08);
    /* Subtle background */
    padding: 10px 20px;
    border-radius: 30px;
    white-space: nowrap;
    animation: fadeUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.8s;
    opacity: 0;
    z-index: 20;
    backdrop-filter: blur(10px);
}

.app-preview {
    animation-delay: 0.6s;
}

/* Enhanced Hover Effects */
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #000;
    color: #fff;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.download-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(91, 77, 255, 0.4);
    background: #1a1a1a;
}

.download-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* Floating Animation for Visual Interest */
.app-preview {
    animation: fadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards, float 6s ease-in-out infinite;
    animation-delay: 0.6s, 1.4s;
    /* Wait for fade up, then start floating */
}

.download-btn svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

.btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.btn-text span:first-child {
    font-size: 0.75rem;
    opacity: 0.8;
}

.btn-text span:last-child {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Notification Stack Section */
.notification-stack {
    margin-top: 60px;
    width: 100%;
    height: 350px;
    display: flex;
    /* Centered for the stack */
    justify-content: center;
    position: relative;
    padding-top: 40px;
    /* Space for stacking */
}

/* iOS Style Notification */
.ios-alert {
    width: 380px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-radius: 18px;
    padding: 14px 16px;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.1),
        0 0 0 0.5px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: absolute;
    /* Absolute to stack them */
    top: 50px;
    z-index: 10;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    transform-origin: top center;
    cursor: default;
    user-select: none;
}

/* Header Row */
.ios-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #4b4b4b;
    opacity: 0.8;
}

.ios-icon {
    width: 20px;
    height: 20px;
    border-radius: 5px;
}

.ios-app-name {
    font-weight: 500;
    flex: 1;
    /* Push time to right */
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.2px;
}

.ios-time {
    font-size: 11px;
    color: #4b4b4b;
}

/* Content */
.ios-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ios-title {
    font-weight: 600;
    font-size: 15px;
    color: #000;
}

.ios-body {
    font-size: 15px;
    line-height: 1.3;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ios-body strong {
    color: #000;
    font-weight: 600;
}

/* Animation States handled by JS */
.ios-alert.slide-in {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
}

.ios-alert.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    z-index: 10;
}

.ios-alert.stacked {
    transform: translateY(14px) scale(0.94);
    z-index: 9;
    opacity: 0.6;
    background: rgba(255, 255, 255, 0.6);
}

.ios-alert.stacked-back {
    transform: translateY(26px) scale(0.88);
    z-index: 8;
    opacity: 0.4;
    background: rgba(255, 255, 255, 0.4);
}

/* Background Glow */
.mega-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(91, 77, 255, 0.3) 0%, rgba(248, 250, 252, 0) 70%);
    z-index: 1;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulseGlow 5s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.4;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.7;
    }
}

/* Background Glow */
.mega-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(91, 77, 255, 0.4) 0%, rgba(248, 250, 252, 0) 70%);
    z-index: 1;
    border-radius: 50%;
    animation: pulseGlow 4s ease-in-out infinite alternate, float 6s ease-in-out infinite;
}

@keyframes pulseGlow {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .mega-card {
        padding: 24px;
        gap: 16px;
        max-width: 90%;
    }

    .mega-icon {
        width: 56px;
        height: 56px;
        font-size: 1.8rem;
    }

    .mega-title {
        font-size: 1.25rem;
    }

    .mega-subtitle {
        font-size: 0.9rem;
    }
}


/* Footer */
footer {
    margin-top: 100px;
    padding: 40px;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero {
        padding-top: 140px;
    }
}

/* Grade Rain Effect */
.rain-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -2;
    /* Behind everything */
    pointer-events: none;
}

.grade-drop {
    position: absolute;
    top: -50px;
    font-weight: 700;
    font-family: 'Epilogue', sans-serif;
    user-select: none;
    animation: rainFall linear forwards;
    white-space: nowrap;
}

@keyframes rainFall {
    0% {
        transform: translateY(-50px) rotate(0deg);
    }

    100% {
        transform: translateY(110vh) rotate(10deg);
    }
}