@import 'theme.css';

/* Navbar Animation (Homepage Only) */
.home-page .navbar.nav-animating {
    opacity: 0;
    transform: translateY(-20px);
}

.home-page .navbar.nav-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Hero Section */

/* Hero Section */
.hero {
    padding: 90px 0 60px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.hero-container {
    max-width: 1100px;
    margin: 0 auto;
    width: 90%;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.2rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -2px;
    text-align: center;
    color: white;
    /* Fallback */
    display: block;
}

.hero-title .highlight {
    color: #818cf8;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(99, 102, 241, 0.6);
}

@keyframes premiumShimmer {
    0% {
        left: -100%;
    }

    20% {
        left: 150%;
    }

    100% {
        left: 150%;
    }
}

@keyframes sparkle {

    0%,
    100% {
        transform: scale(1);
        filter: brightness(1);
    }

    50% {
        transform: scale(1.2);
        filter: brightness(1.5) drop-shadow(0 0 5px #fff);
    }
}

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

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

/* Hero Decoration */
.decoration-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
    opacity: 0.15;
}

.circle-1 {
    width: 500px;
    height: 500px;
    background: #6366f1;
    top: -100px;
    right: -100px;
}

.circle-2 {
    width: 400px;
    height: 400px;
    background: #14b8a6;
    bottom: -50px;
    left: -100px;
}

/* Choose Path Section */
.choose-path {
    padding: 120px 0;
    background: var(--dark-bg);
    position: relative;
    overflow: hidden;
}

.choose-path::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.section-container {
    max-width: 1100px;
    margin: 0 auto;
    width: 90%;
    position: relative;
    z-index: 2;
}

.section-title {
    text-align: center;
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 60px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -1px;
    color: var(--white);
}

.path-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 40px;
    perspective: 1000px;
}

.path-card {
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 60px 45px;
    border-radius: 32px;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow:
        0 10px 30px -10px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.path-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 40%);
    pointer-events: none;
}

.path-card:hover {
    transform: translateY(-12px);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(17, 24, 39, 0.7);
    box-shadow:
        0 30px 60px -15px rgba(0, 0, 0, 0.6),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.path-card-highlight {
    border-color: rgba(99, 102, 241, 0.25);
    background: rgba(17, 24, 39, 0.65);
}

.path-card-highlight:hover {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow:
        0 30px 70px -15px rgba(99, 102, 241, 0.25),
        0 15px 40px -10px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.card-icon {
    width: 90px;
    height: 90px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 35px;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.card-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.1), transparent 70%);
    opacity: 0.5;
}

.card-icon i {
    width: 42px;
    height: 42px;
    stroke-width: 1.5;
    position: relative;
    z-index: 2;
    transition: all 0.5s ease;
}

#icon-ai-builder {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.15);
}

#icon-ai-builder i {
    color: #a78bfa;
    filter: drop-shadow(0 0 12px rgba(167, 139, 250, 0.5));
}

#icon-templates {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.15) 0%, rgba(45, 212, 191, 0.05) 100%);
    border-color: rgba(20, 184, 166, 0.3);
    box-shadow: 0 15px 35px rgba(20, 184, 166, 0.15);
}

#icon-templates i {
    color: #2dd4bf;
    filter: drop-shadow(0 0 12px rgba(45, 212, 191, 0.5));
}

.path-card:hover .card-icon {
    transform: translateY(-5px) scale(1.05) rotate(5deg);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.path-card:hover #icon-ai-builder {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.path-card:hover #icon-templates {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

.path-card:hover .card-icon i {
    color: white;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.6));
    transform: scale(1.1);
}

.card-title {
    font-size: 1.85rem;
    font-weight: 800;
    margin-bottom: 18px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--white);
    letter-spacing: -0.5px;
}

.card-features {
    list-style: none;
    margin-bottom: 40px;
    color: #94a3b8;
    text-align: left;
    width: 100%;
    padding: 0 20px;
}

.card-features li {
    margin-bottom: 14px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-features li::before {
    content: '→';
    color: var(--primary-color);
    font-weight: bold;
    opacity: 0.6;
}

.path-card:not(.path-card-highlight) .card-features li::before {
    color: #14b8a6;
}

.btn-card {
    width: 100%;
    justify-content: center;
    padding: 16px 20px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.card-badge {
    position: absolute;
    top: 25px;
    right: -45px;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    color: white;
    padding: 8px 50px;
    transform: rotate(45deg);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.btn-card-primary {
    background: var(--primary-gradient);
    color: var(--white);
}

/* Templates Section */
.templates {
    padding: 100px 0;
}

.section-subtitle {
    text-align: center;
    color: #94a3b8;
    margin-top: -40px;
    margin-bottom: 60px;
    font-size: 1.15rem;
    letter-spacing: 0.2px;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    max-width: 1400px;
    margin: 0 auto;
}

.template-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.template-card:hover {
    transform: translateY(-10px);
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.template-preview {
    height: 250px;
    position: relative;
    overflow: hidden;
    background: #0f172a;
    transform: translateZ(0);
}

.template-preview img {
    width: 102%;
    /* Increased overlap */
    height: 102%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    backface-visibility: hidden;
    will-change: transform;
    margin: -1%;
    /* Center the larger image */
}

.template-card:hover .template-preview img {
    transform: scale(1.08);
}

/* Overlay on Hover */
.template-preview::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.template-card:hover .template-preview::after {
    opacity: 1;
}

.template-info {
    padding: 16px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.template-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0;
}

.template-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.7rem;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag-ats {
    background: rgba(20, 184, 166, 0.1) !important;
    border-color: rgba(20, 184, 166, 0.2) !important;
    color: #2dd4bf !important;
}

.tag-minimal {
    background: rgba(99, 102, 241, 0.1) !important;
    border-color: rgba(99, 102, 241, 0.2) !important;
    color: #a5b4fc !important;
}

.tag-academic {
    background: rgba(244, 63, 94, 0.1) !important;
    border-color: rgba(244, 63, 94, 0.2) !important;
    color: #fca5a5 !important;
}

.tag-developer {
    background: rgba(245, 158, 11, 0.1) !important;
    border-color: rgba(245, 158, 11, 0.2) !important;
    color: #fdba74 !important;
}

.tag-student {
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
    color: #6ee7b7 !important;
}

.btn-template {
    width: 100%;
    margin-top: auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-template i {
    width: 18px;
    height: 18px;
}

.template-card:hover .btn-template {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

.btn-template:active {
    transform: translateY(0);
}

.templates-footer {
    text-align: center;
    margin-top: 60px;
}

.btn-outline {
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.03);
    padding: 14px 32px;
    font-weight: 600;
}

.btn-outline:hover {
    border-color: #6366f1;
    color: white;
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

/* How It Works Section */
.how-it-works {
    padding: 100px 0;
    background: var(--dark-bg);
}

.steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 50px auto 0;
}

.step {
    flex: 1;
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto 20px;
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.4);
}

.step-title {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.step-description {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.step-arrow {
    font-size: 2rem;
    color: var(--glass-border);
    margin: 0 20px;
}

/* Why Use Section */
.why-use {
    padding: 100px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
}

.feature {
    text-align: left;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.1) 0%, rgba(20, 184, 166, 0.05) 100%);
    color: #2dd4bf;
    border: 1px solid rgba(20, 184, 166, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feature-icon i {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 0 8px rgba(45, 212, 191, 0.3));
}

.feature:hover .feature-icon {
    transform: rotate(12deg) scale(1.1);
    background: var(--secondary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(20, 184, 166, 0.3);
}

.feature:hover .feature-icon i {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.4));
}

.feature-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.feature-description {
    color: var(--text-muted);
    font-size: 0.9rem;
}



/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-title {
        font-size: 2.2rem;
        line-height: 1.2;
        padding: 0 10px;
    }

    .hero-title br {
        display: block;
        /* Keep the break for structure */
    }

    .hero-subtitle {
        font-size: 1rem;
        padding: 0 16px;
    }

    .hero-cta {
        flex-direction: column;
        padding: 0 20px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .steps {
        flex-direction: column;
        gap: 40px;
    }

    .step-arrow {
        transform: rotate(90deg);
        margin: 0;
        font-size: 1.5rem;
    }

    .path-cards {
        grid-template-columns: 1fr;
    }

    .template-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }

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

    .feature {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .feature-icon {
        margin-left: auto;
        margin-right: auto;
    }


}

/* Modal Styling */


.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(8px);
}

.modal-content {
    background: #1e293b;
    margin: 10% auto;
    padding: 40px;
    border: 1px solid var(--glass-border);
    width: 400px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.close {
    color: var(--text-muted);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.auth-form input {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 15px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-family: inherit;
}

#submitBtn {
    width: 100%;
    background: var(--primary-gradient);
    border: none;
    padding: 14px;
    color: white;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
}

.auth-toggle {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-toggle span {
    color: #6366f1;
    cursor: pointer;
    font-weight: 600;
}

@media (max-width: 900px) {
    .template-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* ========================================
   HYPER-PREMIUM BUTTONS
   ======================================== */

.btn-premium-ai,
.btn-premium-teal {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1) !important;
    background-size: 200% auto !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-premium-ai::after,
.btn-premium-teal::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 100px;
    height: 200%;
    background: linear-gradient(to right,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    transform: rotate(25deg);
    animation: premiumShimmer 3s infinite;
}

/* Indigo Variation (AI Builder) */
.btn-premium-ai {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #6366f1 100%) !important;
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.5),
        0 0 0 1px rgba(99, 102, 241, 0.1);
    color: white !important;
}

.btn-premium-ai:hover {
    transform: translateY(-5px) scale(1.05);
    background-position: right center;
    box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.7),
        0 0 30px rgba(168, 85, 247, 0.4);
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Teal Variation (Templates) */
.btn-premium-teal {
    background: linear-gradient(135deg, #14b8a6 0%, #2dd4bf 50%, #14b8a6 100%) !important;
    box-shadow: 0 10px 25px -5px rgba(20, 184, 166, 0.4),
        0 0 0 1px rgba(20, 184, 166, 0.1);
    color: white !important;
}

.btn-premium-teal:hover {
    transform: translateY(-5px) scale(1.02);
    background-position: right center;
    box-shadow: 0 20px 40px -10px rgba(20, 184, 166, 0.6),
        0 0 25px rgba(45, 212, 191, 0.4);
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.btn-premium-ai .btn-icon {
    animation: sparkle 2s ease-in-out infinite;
}

/* ========================================
   SCROLL ANIMATIONS (Premium & Subtle)
   ======================================== */

@media (prefers-reduced-motion: no-preference) {

    /* General Scroll Animation */
    .scroll-init {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
        will-change: opacity, transform;
    }

    .scroll-animate {
        opacity: 1;
        transform: translateY(0);
    }

    /* Hero Specific (Ultra-Subtle Constraints) */
    .hero-scroll-init {
        opacity: 0.9;
        /* Constraint: min 0.9 */
        transform: translateY(12px);
        /* Constraint: max 12px */
        transition: opacity 0.8s ease-out, transform 0.8s ease-out;
        /* Reduced from 1.2s */
        will-change: opacity, transform;
        /* Ensure distinct stacking context during animation */
        backface-visibility: hidden;
    }

    .hero-scroll-animate {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   WORD REVEAL ANIMATION (Hero)
   ======================================== */
.word {
    display: inline-block;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

/* Only apply these to the gradient heading words */
.hero-title .word {
    display: inline-block;
    background: linear-gradient(135deg, #ffffff 20%, #a5b4fc 70%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 100%;
    /* Spreads the gradient out more */
}

.word.visible {
    opacity: 1;
    transform: translateY(0);
}

.word:last-child {
    margin-right: 0;
}