/* =========================================
   CSS Variable & Design Tokens
   ========================================= */
:root {
    /* Colors */
    --bg-dark: #050814;
    --bg-card: rgba(18, 24, 43, 0.4);
    --bg-card-hover: rgba(26, 35, 60, 0.6);
    --primary: #1c64f2;
    --primary-hover: #3f83f8;
    --primary-glow: rgba(28, 100, 242, 0.4);
    --text-main: #ffffff;
    --text-muted: #9ca3af;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.15);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Outfit', var(--font-sans);

    /* Effects */
    --transition-fast: 0.2s ease-out;
    --transition-normal: 0.3s ease-in-out;
    --glass-blur: blur(12px);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

/* =========================================
   Reset & Base Styles
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================================
   Typography
   ========================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    font-weight: 600;
}

.text-gradient {
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =========================================
   Components (Buttons, Badges)
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 15px;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-outline {
    background-color: transparent;
    color: white;
    border: 1px solid var(--border-highlight);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(28, 100, 242, 0.1);
    border: 1px solid rgba(28, 100, 242, 0.3);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: #93c5fd;
    margin-bottom: 24px;
}

/* =========================================
   Navbar
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 72px;
    background: rgba(5, 8, 20, 0.7);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.5px;
}

.logo-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary) 0%, #60a5fa 100%);
    border-radius: 6px;
    box-shadow: 0 0 12px var(--primary-glow);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.nav-links a:hover {
    color: white;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.login-link {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.login-link:hover {
    color: white;
}

.mobile-menu-btn {
    display: none;
    color: white;
    font-size: 24px;
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    position: relative;
    padding: 160px 0 80px;
    text-align: center;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(circle, rgba(28, 100, 242, 0.15) 0%, rgba(5, 8, 20, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 40px;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* OS Support */
.os-support {
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.01);
    text-align: center;
}

.os-text {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.os-icons {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.os-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.os-item:hover {
    color: white;
}

.os-item i {
    font-size: 20px;
}

/* =========================================
   Animations
   ========================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Responsive */
@media (max-width: 768px) {

    .nav-links,
    .nav-actions {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-title {
        font-size: 40px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .os-icons {
        gap: 20px;
    }
}

/* =========================================
   Sections General
   ========================================= */
.section {
    padding: 100px 0;
}

.bg-darker {
    background-color: var(--bg-dark);
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary);
}

.section-header {
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 36px;
    margin-bottom: 20px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 400;
}

/* =========================================
   Features Grid (Giái pháp cốt lõi)
   ========================================= */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    transition: all var(--transition-normal);
}

.feature-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(28, 100, 242, 0.3);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 24px;
}

.icon-blue {
    background: rgba(28, 100, 242, 0.1);
    color: #60a5fa;
    box-shadow: 0 0 20px rgba(28, 100, 242, 0.2);
}

.icon-purple {
    background: rgba(139, 92, 246, 0.1);
    color: #c084fc;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.feature-title {
    font-size: 24px;
    margin-bottom: 16px;
}

.feature-desc {
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 15px;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    color: #d1d5db;
    font-size: 14px;
}

.feature-list li i {
    font-size: 18px;
    margin-top: 2px;
}

/* =========================================
   Split Layout & Dashboard Mockup (Affiliate & Integration)
   ========================================= */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.dashboard-mockup {
    background: #0f1523;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.mockup-header {
    background: #1a202c;
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
}

.mockup-header .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background-color: #ef4444;
}

.dot.yellow {
    background-color: #f59e0b;
}

.dot.green {
    background-color: #10b981;
}

.mockup-body {
    padding: 30px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    font-family: var(--font-heading);
}

.chart-mockup {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 150px;
    padding-top: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-mockup .bar {
    flex: 1;
    background: linear-gradient(180deg, var(--primary) 0%, rgba(28, 100, 242, 0.2) 100%);
    border-radius: 6px 6px 0 0;
    transition: height 1s ease-out;
}

/* Key Points List */
.key-points {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.point {
    display: flex;
    gap: 16px;
    background: rgba(28, 100, 242, 0.05);
    border: 1px solid rgba(28, 100, 242, 0.1);
    padding: 20px;
    border-radius: var(--radius-md);
    transition: transform var(--transition-fast);
}

.point:hover {
    transform: translateX(5px);
    background: rgba(28, 100, 242, 0.1);
}

.point-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.point-text h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.point-text p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Responsive add-ons */
@media (max-width: 992px) {
    .split-layout {
        grid-template-columns: 1fr;
    }

    .stats-row {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
}

/* Hide elements for scroll animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   Code Mockup (Tích hợp section)
   ========================================= */
.code-mockup {
    background: #0d1117;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
}

.code-header {
    background: #161b22;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.code-dots {
    display: flex;
    gap: 8px;
    margin-right: 20px;
}

.code-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-filename {
    color: var(--text-muted);
    font-size: 13px;
    margin-left: auto;
    margin-right: auto;
    padding-right: 44px;
    /* offset dots to center text strictly */
}

.code-body {
    padding: 24px;
    overflow-x: auto;
    color: #c9d1d9;
    line-height: 1.6;
}

.code-body pre {
    margin: 0;
}

/* Syntax Highlighting Colors */
.token-keyword {
    color: #ff7b72;
}

.token-string {
    color: #a5d6ff;
}

.token-function {
    color: #d2a8ff;
}

.token-class {
    color: #79c0ff;
}

.token-comment {
    color: #8b949e;
    font-style: italic;
}

/* =========================================
   Comparison Table
   ========================================= */
.comparison-table-wrapper {
    overflow-x: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-top: 40px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.comparison-table th,
.comparison-table td {
    padding: 24px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th:first-child,
.comparison-table td:first-child {
    text-align: left;
    padding-left: 40px;
    position: sticky;
    left: 0;
    background: var(--bg-card);
    z-index: 10;
}

.comparison-table th {
    background: rgba(255, 255, 255, 0.02);
}

.col-header .col-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
}

.col-header .col-subtitle {
    font-size: 12px;
    margin-top: 4px;
}

.comparison-table td {
    font-size: 15px;
    color: var(--text-muted);
}

.comparison-table td:nth-child(2) {
    background: rgba(28, 100, 242, 0.03);
    /* Highlight Yotta column slightly */
}

/* Text Colors defined in Table */
.text-green {
    color: #10b981;
}

.text-red {
    color: #ef4444;
}

.fw-bold {
    font-weight: 600;
}

.comparison-table td i {
    font-size: 20px;
}


/* =========================================
   CTA Section
   ========================================= */
.cta-box {
    position: relative;
    padding: 80px 40px;
    background: rgba(26, 35, 60, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    text-align: center;
    overflow: hidden;
}

.cta-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(circle, rgba(28, 100, 242, 0.2) 0%, rgba(5, 8, 20, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: 36px;
    margin-bottom: 20px;
    font-weight: 700;
}

.cta-desc {
    color: var(--text-muted);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}


/* =========================================
   Footer
   ========================================= */
.footer {
    border-top: 1px solid var(--border-color);
    background: #02040a;
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
    max-width: 300px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.footer-links h4 {
    font-size: 16px;
    margin-bottom: 24px;
    color: white;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 14px;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 13px;
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

.footer-bottom-links a:hover {
    color: white;
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* =========================================
   Architecture Flow Diagram Animations
   ========================================= */
.flow-box {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.flow-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: skewX(-20deg);
    transition: all 0.5s ease;
}

.flow-box:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.flow-box:hover::before {
    left: 150%;
}

.flow-line {
    stroke-dasharray: 8 6;
    animation: flowDash 1.5s linear infinite;
}

@keyframes flowDash {
    to {
        stroke-dashoffset: -14;
    }
}

.pulse-circle {
    box-shadow: 0 0 0 rgba(255, 255, 255, 0.4);
    animation: pulseCircle 2s infinite;
}

@keyframes pulseCircle {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.flow-particle {
    width: 6px;
    height: 6px;
    background: #fbbf24;
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 0 10px #fbbf24;
}

@keyframes flowDownCenter {
    0% {
        top: 70px;
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        top: 120px;
        opacity: 0;
    }
}

@keyframes flowSplitLeft {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }

    20% {
        opacity: 1;
        transform: translateY(0) translateX(0);
    }

    50% {
        transform: translateY(15px) translateX(0);
    }

    100% {
        transform: translateY(15px) translateX(-70px);
        opacity: 0;
    }
}

@keyframes flowSplitRight {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }

    20% {
        opacity: 1;
        transform: translateY(0) translateX(0);
    }

    50% {
        transform: translateY(15px) translateX(0);
    }

    100% {
        transform: translateY(15px) translateX(70px);
        opacity: 0;
    }
}


/* =========================================
   Modals
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-dark);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    position: relative;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    padding: 30px;
    max-width: 90vw;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(255,255,255,0.2);
}

.video-modal {
    width: 800px;
    padding: 0;
    overflow: hidden;
    background: #000;
}

.video-container {
    width: 100%;
    aspect-ratio: 16/9;
    display: none;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-modal input, .contact-modal textarea {
    outline: none;
    transition: border-color 0.2s;
}

.contact-modal input:focus, .contact-modal textarea:focus {
    border-color: var(--primary);
}
