/* ========================================
   CandyAI Landing Page - Styles
   ======================================== */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #020204;
    --bg-secondary: #0d0d10;
    --bg-card: rgba(24, 24, 27, 0.4);
    --text-primary: #fafafa;
    --text-secondary: rgba(250, 250, 250, 0.6);
    --text-muted: rgba(250, 250, 250, 0.4);
    --pink-500: #ec4899;
    --pink-600: #db2777;
    --purple-500: #8b5cf6;
    --purple-600: #7c3aed;
    --green-400: #4ade80;
    --yellow-400: #facc15;
    --border-color: rgba(255, 255, 255, 0.05);
    --border-hover: rgba(236, 72, 153, 0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Syne', sans-serif;
    line-height: 1.2;
}

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

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--pink-500);
    border-radius: 4px;
}

::selection {
    background: rgba(236, 72, 153, 0.3);
    color: #fff;
}

/* Utility Classes */
.gradient-text {
    background: linear-gradient(90deg, var(--pink-500), var(--purple-500), var(--pink-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section-container.narrow {
    max-width: 768px;
}

@media (min-width: 768px) {
    .section-container {
        padding: 0 2rem;
    }
}

/* ========================================
   Navbar
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(2, 2, 4, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

@media (min-width: 768px) {
    .nav-container {
        padding: 0 2rem;
    }
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--pink-500), var(--purple-600));
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-heart {
    width: 20px;
    height: 20px;
    color: white;
    fill: white;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.nav-links {
    display: none;
    gap: 2rem;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-links a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

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

.nav-cta {
    display: none;
    padding: 0.625rem 1.5rem;
    background: linear-gradient(90deg, var(--pink-600), var(--purple-600));
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    box-shadow: 0 10px 25px -5px rgba(236, 72, 153, 0.25);
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .nav-cta {
        display: inline-flex;
    }
}

.nav-cta:hover {
    transform: scale(1.05);
    background: linear-gradient(90deg, var(--pink-500), var(--purple-500));
}

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    padding: 1.5rem 1rem;
    background: rgba(2, 2, 4, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu a {
    padding: 0.75rem 0;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.mobile-menu a:hover {
    color: var(--text-primary);
}

.mobile-cta {
    margin-top: 1rem;
    padding: 0.875rem;
    background: linear-gradient(90deg, var(--pink-600), var(--purple-600));
    border-radius: 9999px;
    text-align: center;
    font-weight: 600;
    color: white !important;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-primary) 5%, rgba(2, 2, 4, 0.7) 50%, rgba(2, 2, 4, 0.3) 100%);
}

.hero-overlay-side {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(2, 2, 4, 0.8), transparent);
}

.chat-bubble {
    position: absolute;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    animation: float 6s ease-in-out infinite;
    display: none;
}

@media (min-width: 1024px) {
    .chat-bubble {
        display: block;
    }
}

.bubble-1 {
    top: 25%;
    right: 15%;
}

.bubble-1 p {
    color: var(--pink-500);
    font-size: 0.875rem;
}

.bubble-2 {
    top: 33%;
    right: 10%;
    animation-delay: 1s;
}

.bubble-2 p {
    color: var(--purple-500);
    font-size: 0.875rem;
}

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

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 8rem 1rem 5rem;
}

@media (min-width: 768px) {
    .hero-content {
        padding: 8rem 2rem 5rem;
    }
}

.hero-text {
    max-width: 768px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    background: rgba(236, 72, 153, 0.1);
    border: 1px solid rgba(236, 72, 153, 0.2);
    border-radius: 9999px;
    font-size: 0.875rem;
    color: var(--pink-500);
    margin-bottom: 1.5rem;
}

.hero-badge svg {
    width: 12px;
    height: 12px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 4.5rem;
    }
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 576px;
    line-height: 1.7;
}

@media (min-width: 768px) {
    .hero-description {
        font-size: 1.25rem;
    }
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
    }
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 2rem;
    height: 3.5rem;
    background: linear-gradient(90deg, var(--pink-600), var(--purple-600));
    border-radius: 9999px;
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 10px 25px -5px rgba(236, 72, 153, 0.25);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: scale(1.05);
    background: linear-gradient(90deg, var(--pink-500), var(--purple-500));
}

.btn-primary svg {
    width: 20px;
    height: 20px;
}

.btn-primary.large {
    height: 4rem;
    padding: 0 2.5rem;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    height: 3.5rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.social-proof {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
}

.avatars {
    display: flex;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pink-500), var(--purple-600));
    border: 2px solid var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    margin-left: -12px;
}

.avatar:first-child {
    margin-left: 0;
}

.proof-text p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.proof-text strong {
    color: var(--text-primary);
}

.stars {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.25rem;
}

.star-filled {
    width: 16px;
    height: 16px;
    color: var(--yellow-400);
    fill: var(--yellow-400);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    animation: bounce-small 2s ease-in-out infinite;
}

.scroll-indicator span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.scroll-indicator svg {
    width: 20px;
    height: 20px;
}

@keyframes bounce-small {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ========================================
   Sections Common
   ======================================== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.section-badge svg {
    width: 12px;
    height: 12px;
}

.section-badge.pink {
    background: rgba(236, 72, 153, 0.1);
    border: 1px solid rgba(236, 72, 153, 0.2);
    color: var(--pink-500);
}

.section-badge.purple {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: var(--purple-500);
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .section-header h2 {
        font-size: 3rem;
    }
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto;
}

/* ========================================
   Features Section
   ======================================== */
.features {
    padding: 6rem 0;
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.15), transparent 50%);
    opacity: 0.5;
    pointer-events: none;
}

.features-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    padding: 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: rgba(39, 39, 42, 0.4);
    border-color: var(--border-hover);
    transform: translateY(-8px);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-icon svg {
    width: 32px;
    height: 32px;
    color: white;
}

.feature-icon.pink {
    background: linear-gradient(135deg, var(--pink-500), #f43f5e);
}

.feature-icon.purple {
    background: linear-gradient(135deg, var(--purple-500), #6366f1);
}

.feature-icon.gradient {
    background: linear-gradient(135deg, var(--pink-500), var(--purple-500));
}

.feature-icon.violet {
    background: linear-gradient(135deg, #8b5cf6, var(--pink-500));
}

.feature-icon.rose {
    background: linear-gradient(135deg, #f43f5e, var(--pink-500));
}

.feature-icon.purple-pink {
    background: linear-gradient(135deg, var(--purple-500), var(--pink-500));
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   Gallery Section
   ======================================== */
.gallery {
    padding: 6rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

.character-card {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    display: block;
}

@media (min-width: 768px) {
    .character-card {
        border-radius: 1.5rem;
    }
}

.character-card.tall {
    grid-row: span 2;
}

.character-card.wide {
    grid-column: span 2;
}

.character-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.5s ease;
}

.character-card:not(.tall):not(.wide) img {
    height: 12rem;
}

@media (min-width: 768px) {
    .character-card:not(.tall):not(.wide) img {
        height: 18rem;
    }
}

.character-card.tall img {
    min-height: 25rem;
}

@media (min-width: 768px) {
    .character-card.tall img {
        min-height: 38rem;
    }
}

.character-card.wide img {
    height: 12rem;
}

@media (min-width: 768px) {
    .character-card.wide img {
        height: 16rem;
    }
}

.character-card:hover img {
    transform: scale(1.1);
}

.character-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 2, 4, 0.95) 0%, transparent 60%);
    pointer-events: none;
}

.character-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    z-index: 10;
}

@media (min-width: 768px) {
    .character-info {
        padding: 1.5rem;
    }
}

.character-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.character-info h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

@media (min-width: 768px) {
    .character-info h3 {
        font-size: 1.25rem;
    }
}

.character-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.online-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--green-400);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.online-status span {
    font-size: 0.75rem;
    color: var(--green-400);
}

.character-chat-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--pink-500), var(--purple-500));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    z-index: 20;
}

.character-card:hover .character-chat-btn {
    opacity: 1;
    transform: scale(1);
}

.character-chat-btn svg {
    width: 20px;
    height: 20px;
    color: white;
}

.gallery-cta {
    text-align: center;
    margin-top: 3rem;
}

/* ========================================
   Testimonials Section
   ======================================== */
.testimonials {
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.testimonials::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.1), transparent 50%);
    pointer-events: none;
}

.testimonials-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.testimonial-card {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(24, 24, 27, 0.8), rgba(24, 24, 27, 0.4));
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-8px);
}

.testimonial-text {
    font-size: 1.125rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    margin: 1rem 0 1.5rem;
    line-height: 1.7;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--pink-500), var(--purple-600));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.testimonial-author span {
    font-weight: 600;
}

/* ========================================
   FAQ Section
   ======================================== */
.faq {
    padding: 6rem 0;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.05);
}

.faq-question svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-item.open .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ========================================
   Final CTA Section
   ======================================== */
.final-cta {
    padding: 6rem 0;
    position: relative;
    text-align: center;
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(236, 72, 153, 0.1), rgba(139, 92, 246, 0.1));
}

.cta-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.15), transparent 50%);
}

.final-cta .section-container {
    position: relative;
    z-index: 10;
}

.final-cta h2 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .final-cta h2 {
        font-size: 3.75rem;
    }
}

.final-cta p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

@media (min-width: 768px) {
    .final-cta p {
        font-size: 1.25rem;
    }
}

.cta-note {
    display: block;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.filled {
    fill: currentColor;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .footer-container {
        flex-direction: row;
        justify-content: space-between;
        padding: 0 2rem;
    }
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-logo span {
    font-size: 1.25rem;
    font-weight: 700;
}

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

.footer-links a {
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

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

.copyright {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ========================================
   Mobile Sticky CTA
   ======================================== */
.mobile-sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, var(--bg-primary), rgba(2, 2, 4, 0.95));
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 50;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: block;
}

@media (min-width: 768px) {
    .mobile-sticky-cta {
        display: none;
    }
}

.mobile-sticky-cta.visible {
    transform: translateY(0);
}

.mobile-sticky-cta a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    height: 3.5rem;
    background: linear-gradient(90deg, var(--pink-600), var(--purple-600));
    border-radius: 9999px;
    font-weight: 700;
    color: white;
    box-shadow: 0 10px 25px -5px rgba(236, 72, 153, 0.25);
}

.mobile-sticky-cta svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ========================================
   Animations
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
