/* =========================================
   HANS Global — Professional Site Design System

   Colors:
     Primary Dark:    #0a0118
     Section Dark:    #0f0122
     Purple Accent:   #7B3AFF
     Orange Accent:   #FF6B35
     Orange Light:    #FF8C5A
     Teal Accent:     #00D4AA
     Surface Dark:    #1a1033
     Surface Card:    #150d2a
     Card Border:     rgba(123, 58, 255, 0.15)
     Text White:      #FFFFFF
     Text Light:      rgba(255,255,255,0.8)
     Text Muted:      rgba(255,255,255,0.55)
     Light BG:        #f7f8fc
     Light Text:      #1a1a2e
     Light Body:      #4a4a6a

   Fonts: Inter (all)
   ========================================= */

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

:root {
    --primary-dark: #0a0118;
    --section-dark: #0f0122;
    --purple: #7B3AFF;
    --purple-light: #9B6AFF;
    --purple-glow: rgba(123, 58, 255, 0.3);
    --orange: #FF6B35;
    --orange-light: #FF8C5A;
    --teal: #00D4AA;
    --surface-dark: #1a1033;
    --surface-card: #150d2a;
    --card-border: rgba(123, 58, 255, 0.15);
    --text-white: #FFFFFF;
    --text-light: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.55);
    --light-bg: #f7f8fc;
    --light-text: #1a1a2e;
    --light-body: #4a4a6a;
    --max-width: 1200px;
    --header-height: 72px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-light);
    background-color: var(--primary-dark);
    line-height: 1.7;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 32px;
}

img { max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul { list-style: none; }

/* =========================================
   Typography
   ========================================= */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--text-white);
    line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

.gradient-text {
    background: linear-gradient(135deg, var(--purple-light), var(--orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--orange);
    margin-bottom: 12px;
}

.section-intro {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 640px;
    line-height: 1.8;
}

/* =========================================
   Header
   ========================================= */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    background: rgba(10, 1, 24, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(123, 58, 255, 0.1);
    transition: all 0.3s ease;
}

.site-header.scrolled {
    background: rgba(10, 1, 24, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

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

.logo img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: -0.01em;
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.06);
}

.nav-cta {
    background: var(--purple) !important;
    color: var(--text-white) !important;
    font-weight: 600 !important;
}

.nav-cta:hover {
    background: var(--purple-light) !important;
    transform: translateY(-1px);
}

/* Mobile Menu */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 8px;
    border: none;
    background: none;
}

.mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-white);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* =========================================
   Buttons
   ========================================= */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 14px 28px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--purple);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(123, 58, 255, 0.3);
}

.btn-primary:hover {
    background: var(--purple-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(123, 58, 255, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-orange {
    background: var(--orange);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-orange:hover {
    background: var(--orange-light);
    transform: translateY(-2px);
}

.btn-sm {
    font-size: 0.8125rem;
    padding: 10px 20px;
    border-radius: 6px;
}

.btn-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* =========================================
   Hero Section
   ========================================= */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 70% 20%, rgba(123, 58, 255, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 30% 80%, rgba(255, 107, 53, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 212, 170, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('../images/grid-bg-1.png') repeat center top;
    opacity: 0.15;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 720px;
    padding: 80px 0;
}

.hero h1 {
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 40px;
    max-width: 580px;
}

/* =========================================
   Stats Bar
   ========================================= */

.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--card-border);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    margin: 80px 0;
}

.stat-item {
    background: var(--surface-card);
    padding: 40px 32px;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--purple-light), var(--teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================
   Module Grid (Homepage)
   ========================================= */

.modules-section {
    padding: 120px 0;
    background: var(--section-dark);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header h2 {
    margin-bottom: 16px;
}

.section-header .section-intro {
    margin: 0 auto;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.module-card {
    background: var(--surface-card);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 32px 28px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--purple), var(--orange));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.module-card:hover {
    border-color: rgba(123, 58, 255, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(123, 58, 255, 0.12);
}

.module-card:hover::before {
    opacity: 1;
}

.module-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(123, 58, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.module-card h3 {
    font-size: 1.0625rem;
    margin-bottom: 10px;
    line-height: 1.3;
}

.module-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

.module-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--purple-light);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.module-link:hover {
    color: var(--orange);
    gap: 10px;
}

/* =========================================
   Features Section (Light)
   ========================================= */

.section-light {
    background: var(--light-bg);
    padding: 120px 0;
}

.section-light h2,
.section-light h3,
.section-light h4 {
    color: var(--light-text);
}

.section-light p,
.section-light li {
    color: var(--light-body);
}

.section-light .label {
    color: var(--purple);
}

/* =========================================
   Section Dark
   ========================================= */

.section-dark {
    background: var(--section-dark);
    padding: 120px 0;
    position: relative;
}

.section-dark + .section-dark {
    padding-top: 0;
}

/* =========================================
   AI Showcase
   ========================================= */

.ai-showcase {
    padding: 120px 0;
    background: linear-gradient(180deg, var(--section-dark) 0%, var(--primary-dark) 100%);
    position: relative;
}

.ai-showcase::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at center, rgba(123, 58, 255, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

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

.ai-card {
    background: rgba(123, 58, 255, 0.06);
    border: 1px solid rgba(123, 58, 255, 0.15);
    border-radius: 12px;
    padding: 36px 32px;
    transition: all 0.3s ease;
}

.ai-card:hover {
    border-color: rgba(123, 58, 255, 0.3);
    background: rgba(123, 58, 255, 0.1);
}

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

.ai-card p {
    color: var(--text-light);
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* =========================================
   Integration Logos
   ========================================= */

.integrations-bar {
    padding: 80px 0;
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
}

.integrations-bar .section-header {
    margin-bottom: 40px;
}

.integration-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.integration-tag {
    padding: 10px 20px;
    background: var(--surface-card);
    border: 1px solid var(--card-border);
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.integration-tag:hover {
    border-color: var(--purple);
    color: var(--text-white);
}

/* =========================================
   CTA Section
   ========================================= */

.cta-section {
    padding: 120px 0;
    text-align: center;
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--section-dark) 100%);
    position: relative;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(123, 58, 255, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.cta-section h2 {
    margin-bottom: 20px;
    position: relative;
}

.cta-section p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.cta-section .btn-group {
    justify-content: center;
    position: relative;
}

/* =========================================
   Contact Form (Contact Page & Footer)
   ========================================= */

.contact-section {
    padding: 120px 0;
}

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

.contact-info h2 {
    margin-bottom: 20px;
}

.contact-info p {
    margin-bottom: 32px;
    font-size: 1.0625rem;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--card-border);
    font-size: 0.9375rem;
}

.contact-detail:last-child {
    border-bottom: none;
}

.contact-detail-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(123, 58, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

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

.contact-form h3 {
    margin-bottom: 24px;
    font-size: 1.375rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

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

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(123, 58, 255, 0.15);
}

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

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-group select option {
    background: var(--surface-dark);
}

.form-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
}

.form-message.success { background: rgba(0, 212, 170, 0.12); color: var(--teal); }
.form-message.error { background: rgba(255, 107, 53, 0.12); color: var(--orange); }
.form-message:empty { display: none; }

/* =========================================
   Footer
   ========================================= */

.site-footer {
    background: var(--primary-dark);
    border-top: 1px solid var(--card-border);
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 64px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 16px;
    max-width: 300px;
    line-height: 1.7;
}

.footer-col h4 {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.footer-col a {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    padding: 6px 0;
}

.footer-col a:hover {
    color: var(--text-white);
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* =========================================
   Module Detail Pages
   ========================================= */

.module-hero {
    padding: 160px 0 80px;
    position: relative;
    background: var(--section-dark);
}

.module-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 30% 0%, rgba(123, 58, 255, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

.module-hero .container {
    position: relative;
    z-index: 1;
}

.module-hero .label {
    margin-bottom: 16px;
}

.module-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 20px;
    max-width: 700px;
}

.module-hero p {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 640px;
    line-height: 1.8;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--purple-light);
}

.breadcrumb .sep {
    opacity: 0.4;
}

/* Sub-module sections */
.submodule {
    padding: 80px 0;
    border-bottom: 1px solid var(--card-border);
}

.submodule:last-child {
    border-bottom: none;
}

.submodule-header {
    margin-bottom: 40px;
}

.submodule-header h2 {
    font-size: 1.75rem;
    margin-bottom: 12px;
}

.submodule-header p {
    color: var(--text-muted);
    max-width: 600px;
}

/* Feature lists */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 32px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    font-size: 0.9375rem;
    color: var(--text-light);
    line-height: 1.5;
}

.feature-check {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 212, 170, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.feature-check svg {
    width: 12px;
    height: 12px;
}

/* Module Navigation */
.module-nav {
    position: sticky;
    top: var(--header-height);
    background: rgba(10, 1, 24, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border);
    z-index: 100;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.module-nav ul {
    display: flex;
    gap: 4px;
    padding: 12px 0;
    white-space: nowrap;
}

.module-nav a {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 6px;
}

.module-nav a:hover,
.module-nav a.active {
    color: var(--text-white);
    background: rgba(123, 58, 255, 0.12);
}

/* Related modules */
.related-modules {
    padding: 80px 0;
    background: var(--primary-dark);
}

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

/* =========================================
   Platform Page
   ========================================= */

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

.platform-card {
    background: var(--surface-card);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 36px 28px;
}

.platform-card h3 {
    margin-bottom: 12px;
}

.platform-card p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* =========================================
   Responsive
   ========================================= */

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

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

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

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .platform-features {
        grid-template-columns: repeat(2, 1fr);
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }

    .container {
        padding: 0 20px;
    }

    .mobile-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0; right: 0;
        background: rgba(10, 1, 24, 0.98);
        border-top: 1px solid var(--card-border);
        padding: 20px;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
    }

    .main-nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 4px;
    }

    .main-nav a {
        display: block;
        padding: 12px 16px;
    }

    .hero-content {
        padding: 40px 0 60px;
    }

    .stats-bar {
        grid-template-columns: 1fr 1fr;
    }

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

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

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

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

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

    .btn-group {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-group .btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .stats-bar {
        grid-template-columns: 1fr;
    }

    .stat-item {
        padding: 24px 20px;
    }

    .stat-number {
        font-size: 2rem;
    }
}
