/* ========================================
   Boneng Tech — AI Healthcare Website
   ======================================== */

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

:root {
    --bg-primary: #09090b;
    --bg-secondary: #0f0f14;
    --bg-card: #13131a;
    --bg-card-hover: #1a1a24;
    --border: #1e1e2a;
    --border-light: #2a2a3a;
    --text-primary: #f0f0f5;
    --text-secondary: #9898ab;
    --text-muted: #5a5a6e;
    --accent-1: #6366f1;
    --accent-2: #06b6d4;
    --accent-3: #8b5cf6;
    --gradient: linear-gradient(135deg, #6366f1, #06b6d4);
    --gradient-subtle: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(6,182,212,0.15));
    --glow-1: rgba(99, 102, 241, 0.3);
    --glow-2: rgba(6, 182, 212, 0.3);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- Text Gradient ---- */
.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
}

.navbar.scrolled .logo-img {
    height: 32px;
    max-height: 32px;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-img {
    height: 38px;
    width: auto;
    max-height: 38px;
    border-radius: 6px;
    object-fit: contain;
    cursor: pointer;
}

.logo-img-sm {
    height: 48px;
}

.hero-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.hero-logo img {
    height: 160px;
    width: auto;
    border-radius: 12px;
    filter: drop-shadow(0 0 30px rgba(99, 102, 241, 0.25));
    animation: logo-glow 4s ease-in-out infinite;
}

@keyframes logo-glow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.2)); }
    50% { filter: drop-shadow(0 0 40px rgba(6, 182, 212, 0.35)); }
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-accent {
    color: var(--accent-2);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

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

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

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav-links a.active {
    color: var(--accent-2);
}

.navbar {
    transition: var(--transition), transform 0.3s ease;
}

.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

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

.btn-primary:hover {
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.btn-ghost:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
    background: rgba(255,255,255,0.03);
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
    border-radius: 12px;
}

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

.btn-nav {
    padding: 8px 20px;
    font-size: 0.85rem;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.5;
}

.glow-1 {
    width: 600px;
    height: 600px;
    background: var(--glow-1);
    top: -200px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.glow-2 {
    width: 500px;
    height: 500px;
    background: var(--glow-2);
    bottom: -150px;
    left: -100px;
    animation: float 10s ease-in-out infinite reverse;
}

.glow-3 {
    width: 300px;
    height: 300px;
    background: rgba(139, 92, 246, 0.2);
    top: 40%;
    left: 50%;
    animation: float 6s ease-in-out infinite 2s;
}

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

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--gradient-subtle);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-2);
    margin-bottom: 32px;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-2);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.2rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 64px;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator {
    width: 24px;
    height: 40px;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--accent-1);
    border-radius: 4px;
    animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
    0%, 100% { top: 6px; opacity: 1; }
    50% { top: 20px; opacity: 0.3; }
}

/* ========================================
   Section Shared Styles
   ======================================== */
.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-2);
    margin-bottom: 16px;
}

.section-header h2,
.about-content h2,
.contact-info h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 16px;
}

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

/* ========================================
   Services Section
   ======================================== */
.services {
    padding: 120px 0;
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    transition: var(--transition);
    overflow: hidden;
}

.service-card:hover {
    border-color: var(--border-light);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
}

.service-card:hover .service-glow {
    opacity: 1;
}

.service-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient);
    opacity: 0;
    transition: var(--transition);
}

.service-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-subtle);
    border-radius: 14px;
    color: var(--accent-1);
    margin-bottom: 24px;
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.service-card > p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.6;
}

.service-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.service-features li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--gradient);
    border-radius: 50%;
    flex-shrink: 0;
}

/* ---- Featured Service Card ---- */
.service-card-featured {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 48px;
}

.service-featured-content {
    flex: 1;
}

.service-featured-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-featured-image img {
    width: 100%;
    max-width: 480px;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    box-shadow: 0 8px 40px rgba(99, 102, 241, 0.15);
    transition: var(--transition);
}

.service-card-featured:hover .service-featured-image img {
    box-shadow: 0 12px 50px rgba(99, 102, 241, 0.25);
    transform: scale(1.02);
}

/* ========================================
   About Section
   ======================================== */
.about {
    padding: 120px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-image {
    width: 100%;
    max-width: 480px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: 0 8px 40px rgba(99, 102, 241, 0.15), 0 0 60px rgba(6, 182, 212, 0.08);
    transition: var(--transition);
}

.about-image:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 50px rgba(99, 102, 241, 0.25), 0 0 80px rgba(6, 182, 212, 0.12);
}

.about-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 32px;
}

.highlight {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.highlight-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-subtle);
    border-radius: 10px;
    color: var(--accent-1);
    flex-shrink: 0;
}

.highlight strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.highlight span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========================================
   How It Works
   ======================================== */
.how-it-works {
    padding: 120px 0;
}

.steps-grid {
    display: flex;
    align-items: flex-start;
    gap: 0;
    justify-content: center;
}

.step {
    text-align: center;
    flex: 1;
    max-width: 300px;
    padding: 0 24px;
}

.step-number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 20px;
}

.step h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.step p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.step-line {
    width: 80px;
    height: 2px;
    background: var(--gradient);
    margin-top: 40px;
    opacity: 0.3;
    flex-shrink: 0;
}

/* ========================================
   Contact Section
   ======================================== */
.contact {
    padding: 120px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.contact-info p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 32px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.contact-item svg {
    color: var(--accent-1);
    flex-shrink: 0;
}

.contact-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group select {
    cursor: pointer;
    color: var(--text-muted);
}

.form-group select option {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

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

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 12px;
    max-width: 300px;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

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

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 968px) {
    .services-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .about-visual {
        order: -1;
    }

    .service-card-featured {
        flex-direction: column;
        gap: 32px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .steps-grid {
        flex-direction: column;
        align-items: center;
    }

    .step-line {
        width: 2px;
        height: 40px;
        margin: 0;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(9, 9, 11, 0.97);
        backdrop-filter: blur(20px);
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.mobile-open {
        display: flex;
    }

    .btn-nav {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .stat-divider {
        width: 40px;
        height: 1px;
    }

    .footer-content {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .footer-brand p {
        margin: 12px auto 0;
    }

    .contact-form-wrapper {
        padding: 24px;
    }
}

/* ========================================
   Animations on scroll
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Logo Lightbox Modal */
.logo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.logo-modal.active {
    display: flex;
    animation: modalFadeIn 0.3s ease;
}

.logo-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    cursor: default;
    animation: modalZoomIn 0.3s ease;
}

.logo-modal-content img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.logo-modal-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.logo-modal-close:hover {
    transform: scale(1.1);
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalZoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
