/*
Copyright (C) 2021-2026 djoluc.

This library is free software; you can redistribute it and/or
modify it under the terms of the TECKPLANET General Public
License as published by the Free Software Foundation; either
version 1.0 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the TECKPLANET
General Public License for more details.

You should have received a copy of the TECKPLANET General Public
License along with this library; if not, write to TeckPlanet teams: contact@teckplanet.com
*/
/* 
    Created on : Jan 8, 2021
    Modernised : 2026
    Author     : djoluc
    Theme      : Dark (Calm Enterprise Cloud / AI)
*/

:root, html[htx-dark-mode] {
    --bs-bg-body: #07090e;
    --bs-bg-surface: #0f141f;
    --bs-bg-surface-elevated: #161d2d;
    --bs-bg-subtle: #121824;
    --bs-bg-hover: #1e2638;
    --bs-bg-glass: rgba(15, 20, 31, 0.85);
    
    --bs-text-primary: #f8fafc;
    --bs-text-secondary: #94a3b8;
    --bs-text-muted: #64748b;
    --bs-text-inverse: #07090e;
    
    --bs-primary: #38bdf8;
    --bs-primary-hover: #7dd3fc;
    --bs-primary-light: rgba(56, 189, 248, 0.12);
    --bs-primary-glow: rgba(56, 189, 248, 0.25);
    
    --bs-secondary: #60a5fa;
    --bs-accent-purple: #c084fc;
    --bs-accent-green: #34d399;
    --bs-accent-cyan: #38bdf8;
    --bs-accent-amber: #fbbf24;
    
    --bs-border-color: rgba(255, 255, 255, 0.09);
    --bs-border-color-subtle: rgba(255, 255, 255, 0.05);
    --bs-border-hover: rgba(56, 189, 248, 0.45);
    
    --bs-card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    --bs-card-shadow-hover: 0 20px 35px -5px rgba(0, 0, 0, 0.7), 0 0 25px rgba(56, 189, 248, 0.15);
    --bs-hero-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    
    --bs-hero-bg: linear-gradient(135deg, #080c14 0%, #0d1527 50%, #151e36 100%);
    --bs-badge-bg: rgba(56, 189, 248, 0.12);
    --bs-badge-border: rgba(56, 189, 248, 0.28);
    --bs-badge-text: #38bdf8;
    
    --bs-code-bg: #07090e;
    --bs-code-text: #f8fafc;
    
    --bs-transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base resets & layout for Dark Theme */
body, htx-page-content {
    background-color: var(--bs-bg-body) !important;
    color: var(--bs-text-primary);
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    transition: var(--bs-transition);
}

htx-page-content {
    width: 100%;
    max-width: 100%;
    margin-top: 50px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ==========================================================
   Header Bar & Floating Services Menu (Dark)
   ========================================================== */
htx-page-header {
    background: rgba(11, 15, 25, 0.96) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--bs-transition);
}

htx-page-header.scrolled {
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6) !important;
}

htx-page-header > htx-header-right-field {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 50px;
    float: right;
    margin-right: 18px;
    gap: 12px;
}

.light_dark_theme_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 17px;
    background: #161d2d;
    color: #facc15;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: var(--bs-transition);
    user-select: none;
}

.light_dark_theme_btn:hover {
    background: #1e2638;
    color: #fde047;
    transform: scale(1.08);
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.3);
}

#binspot_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    top: auto;
    right: auto;
    width: 30px;
    height: 30px;
    padding: 2px;
    border-radius: 50%;
    border: 2px solid #38bdf8;
    background: #0f141f;
    transition: var(--bs-transition);
    user-select: none;
    box-sizing: border-box;
}

#binspot_button > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #38bdf8;
    color: #07090e;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    line-height: 1;
}

#binspot_button > a.close {
    display: none;
    background: #f43f5e;
    color: #ffffff;
    font-size: 13px;
}

#binspot_button:hover {
    transform: scale(1.08);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.45);
}

/* Floating Services View */
#binspot_menu, .binspot-floating-services-menu {
    display: none;
    position: fixed !important;
    top: 58px !important;
    right: 16px !important;
    width: 340px !important;
    max-width: calc(100vw - 32px) !important;
    height: auto !important;
    max-height: calc(100vh - 75px) !important;
    overflow-y: auto !important;
    border-radius: 20px !important;
    padding: 18px !important;
    box-sizing: border-box !important;
    z-index: 1005 !important;
    margin: 0 !important;
    background: rgba(15, 20, 31, 0.98) !important;
    border: 1px solid rgba(56, 189, 248, 0.25) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 25px rgba(56, 189, 248, 0.12) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

#binspot_menu:before {
    display: inline-block;
    position: absolute;
    width: 14px;
    height: 14px;
    content: "";
    background: #0f141f !important;
    border-top: 1px solid rgba(56, 189, 248, 0.25);
    border-left: 1px solid rgba(56, 189, 248, 0.25);
    right: 22px !important;
    transform: rotate(45deg);
    top: -8px !important;
    border-radius: 2px;
}

.binspot-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--bs-border-color);
}

.binspot-menu-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--bs-text-primary);
}

.binspot-menu-header-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.binspot-menu-header-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 9999px;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.25);
}

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

.binspot-service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 4px;
    border-radius: 14px;
    text-decoration: none;
    transition: var(--bs-transition);
    background: transparent;
    border: 1px solid transparent;
    box-sizing: border-box;
}

.binspot-service-card:hover {
    background: var(--bs-bg-subtle);
    border-color: rgba(56, 189, 248, 0.35);
    transform: translateY(-2px);
}

.service-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bs-bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--bs-border-color-subtle);
    transition: var(--bs-transition);
}

.binspot-service-card:hover .service-icon-box {
    background: #161d2d;
    border-color: #38bdf8;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.2);
}

.service-icon-box img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.service-name {
    margin-top: 6px;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--bs-text-secondary);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 84px;
    transition: var(--bs-transition);
}

.binspot-service-card:hover .service-name {
    color: var(--bs-text-primary);
    font-weight: 600;
}

.binspot-menu-footer {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--bs-border-color);
    text-align: center;
}

.binspot-menu-footer a {
    font-size: 12px;
    font-weight: 600;
    color: #38bdf8;
    text-decoration: none;
    transition: var(--bs-transition);
}

.binspot-menu-footer a:hover {
    text-decoration: underline;
}

/* ==========================================================
   Hero Section (#sub_header / .main-hero)
   ========================================================== */
#sub_header, .main-hero {
    display: flex;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    min-height: 520px;
    background: var(--bs-hero-bg);
    background-image: radial-gradient(circle at 85% 25%, rgba(56, 189, 248, 0.18) 0%, transparent 55%),
                      radial-gradient(circle at 15% 75%, rgba(192, 132, 252, 0.15) 0%, transparent 60%);
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.18);
    padding: 70px 80px 80px 80px;
    color: #ffffff;
    box-shadow: var(--bs-hero-shadow);
    overflow: hidden;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 660px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 9999px;
    background: var(--bs-badge-bg);
    border: 1px solid var(--bs-badge-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 13px;
    font-weight: 500;
    color: var(--bs-badge-text);
    margin-bottom: 22px;
    letter-spacing: 0.02em;
}

.hero-badge .badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #34d399;
    box-shadow: 0 0 10px #34d399;
    animation: pulse-glow-dark 2s infinite;
}

@keyframes pulse-glow-dark {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 12px #34d399; }
    50% { opacity: 0.4; transform: scale(0.85); box-shadow: 0 0 4px #34d399; }
}

#sub_header > h1, .hero-title {
    color: #ffffff;
    font-size: clamp(34px, 4.4vw, 56px);
    font-weight: 800;
    line-height: 1.12;
    margin: 0 0 18px 0;
    padding: 0;
    letter-spacing: -0.03em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.hero-gradient-text {
    display: block;
    background: linear-gradient(90deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#sub_header > h2, .hero-description {
    color: rgba(226, 232, 240, 0.88);
    font-size: clamp(16px, 1.8vw, 19px);
    font-weight: 400;
    line-height: 1.6;
    margin: 0 0 32px 0;
    padding: 0;
    max-width: 580px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Hero Action Buttons */
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 26px;
    border-radius: 9999px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--bs-transition);
    border: none;
    outline: none;
    box-sizing: border-box;
}

.btn-primary {
    background-color: #38bdf8;
    color: #07090e !important;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
}

.btn-primary:hover {
    background-color: #7dd3fc;
    color: #07090e !important;
    transform: translateY(-2px);
    box-shadow: 0 0 28px rgba(56, 189, 248, 0.55);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.07);
    color: #e2e8f0 !important;
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(56, 189, 248, 0.4);
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* Hero Theme Switcher Button */
.btn-theme-toggle {
    background: rgba(15, 20, 31, 0.6);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 11px 20px;
    font-size: 14px;
}

.btn-theme-toggle:hover {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(56, 189, 248, 0.5);
    color: #38bdf8;
    transform: translateY(-2px);
}

.btn-theme-toggle .theme-icon {
    display: inline-flex;
    align-items: center;
    font-size: 16px;
    color: #facc15;
}

/* Hero Trust Stats Bar */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 22px;
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

.stat-divider {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.12);
}

/* ==========================================================
   Hero Visual / Telemetry Deck (#circle_canvas_container)
   ========================================================== */
#circle_canvas_container, .hero-visual-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 380px;
    height: auto;
    background: radial-gradient(circle, rgba(15, 20, 31, 0.85) 0%, rgba(9, 13, 22, 0.95) 100%);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 28px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), inset 0 0 25px rgba(56, 189, 248, 0.08);
    box-sizing: border-box;
    transition: var(--bs-transition);
    overflow: hidden;
}

#circle_canvas_container:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.9), inset 0 0 35px rgba(56, 189, 248, 0.16);
}

.telemetry-deck-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(11, 15, 25, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-sizing: border-box;
}

.deck-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #e2e8f0;
    letter-spacing: 0.02em;
}

.deck-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #34d399;
    box-shadow: 0 0 8px #34d399;
}

.deck-ping {
    font-size: 11px;
    font-family: monospace;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    padding: 2px 8px;
    border-radius: 9999px;
    font-weight: 700;
}

.canvas-glass-wrapper {
    position: relative;
    width: 100%;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
}

#circle_canvas_container > div {
    width: 100%;
    height: auto;
}

#circle_canvas {
    display: block;
    width: 100%;
    height: 220px;
    border-radius: 18px;
    background: rgba(7, 9, 14, 0.6);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    cursor: crosshair;
}

.canvas-center-badge {
    position: absolute;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #0f141f;
    border: 1px solid rgba(56, 189, 248, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(56, 189, 248, 0.2);
    pointer-events: none;
}

.center-badge-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #38bdf8;
    opacity: 0;
    pointer-events: none;
}

.pulse-ring.ring-1 {
    animation: ring-pulse-dark 3s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.pulse-ring.ring-2 {
    animation: ring-pulse-dark 3s cubic-bezier(0.2, 0.8, 0.2, 1) infinite 1.5s;
}

@keyframes ring-pulse-dark {
    0% { transform: scale(1); opacity: 0.9; }
    100% { transform: scale(2.3); opacity: 0; }
}

.telemetry-ticker-bar {
    width: 100%;
    padding: 12px 16px;
    background: rgba(9, 13, 22, 0.85);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ticker-icon {
    color: #38bdf8;
    font-size: 14px;
}

.ticker-text {
    font-family: monospace;
    font-size: 12px;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.3s ease;
}

/* ==========================================================
   Page Section Commons
   ========================================================== */
.page-section {
    width: 100%;
    max-width: 1200px;
    box-sizing: border-box;
    padding: 80px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-header {
    text-align: center;
    max-width: 680px;
    margin-bottom: 50px;
}

.section-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    padding: 6px 14px;
    border-radius: 9999px;
    margin-bottom: 12px;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.section-title {
    font-size: clamp(28px, 3.4vw, 40px);
    font-weight: 800;
    color: var(--bs-text-primary);
    line-height: 1.2;
    margin: 0 0 14px 0;
    letter-spacing: -0.025em;
}

.section-subtitle {
    font-size: 16px;
    color: var(--bs-text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ==========================================================
   Bento Grid Section (Modern 2026 Layout)
   ========================================================== */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    width: 100%;
    box-sizing: border-box;
}

.bento-card {
    background: var(--bs-bg-surface);
    border: 1px solid var(--bs-border-color);
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--bs-card-shadow);
    transition: var(--bs-transition);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bento-card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: var(--bs-card-shadow-hover);
}

.bento-span-8 {
    grid-column: span 8;
}

.bento-span-4 {
    grid-column: span 4;
}

.bento-span-6 {
    grid-column: span 6;
}

.bento-span-12 {
    grid-column: span 12;
}

.bento-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.bento-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.icon-cloud { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.icon-ai { background: rgba(192, 132, 252, 0.15); color: #c084fc; }
.icon-security { background: rgba(52, 211, 153, 0.15); color: #34d399; }
.icon-speed { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }

.bento-title-wrap h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--bs-text-primary);
}

.bento-title-wrap span {
    font-size: 12px;
    font-weight: 600;
    color: #38bdf8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bento-card p {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--bs-text-secondary);
    margin: 0 0 24px 0;
}

/* Bento Visual Elements */
.bento-visual-row {
    display: flex;
    gap: 12px;
    margin-top: auto;
    flex-wrap: wrap;
}

.bento-metric-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 12px;
    background: var(--bs-bg-subtle);
    border: 1px solid var(--bs-border-color-subtle);
    font-size: 13px;
    font-weight: 600;
    color: var(--bs-text-primary);
}

.bento-metric-pill i {
    color: #38bdf8;
}

/* Interactive Developer Code Box */
.interactive-code-box {
    width: 100%;
    border-radius: 18px;
    background: var(--bs-code-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    margin-top: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.code-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-tabs {
    display: flex;
    gap: 8px;
}

.code-tab-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--bs-transition);
}

.code-tab-btn.active, .code-tab-btn:hover {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
}

.btn-copy-code {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: var(--bs-transition);
}

.btn-copy-code:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.btn-copy-code.copied {
    background: rgba(52, 211, 153, 0.2);
    border-color: #34d399;
    color: #34d399;
}

.interactive-code-box pre {
    margin: 0;
    padding: 18px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Roboto Mono', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: var(--bs-code-text);
    overflow-x: auto;
}

.token-kw { color: #f43f5e; font-weight: 600; }
.token-fn { color: #38bdf8; }
.token-str { color: #34d399; }
.token-comment { color: #64748b; font-style: italic; }

/* ==========================================================
   Core Ecosystem Showcase (#main_products_items)
   ========================================================== */
#main_products_items, .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    width: 100%;
    height: auto;
    overflow: visible;
    box-sizing: border-box;
}

.product-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--bs-bg-surface);
    border: 1px solid var(--bs-border-color);
    border-radius: 22px;
    padding: 28px;
    text-decoration: none;
    box-shadow: var(--bs-card-shadow);
    transition: var(--bs-transition);
    position: relative;
    overflow: hidden;
    min-height: 250px;
    box-sizing: border-box;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: var(--bs-card-shadow-hover);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #38bdf8, #c084fc);
    opacity: 0;
    transition: var(--bs-transition);
}

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

.product-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.product-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--bs-bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--bs-border-color-subtle);
    transition: var(--bs-transition);
}

.product-card:hover .product-icon-wrap {
    background: #161d2d;
    box-shadow: 0 6px 16px rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.35);
}

.product-icon-wrap img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.product-badge-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-category-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 9999px;
}

.badge-ai { background: rgba(192, 132, 252, 0.15); color: #c084fc; border: 1px solid rgba(192, 132, 252, 0.25); }
.badge-cloud { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.25); }
.badge-app { background: rgba(52, 211, 153, 0.15); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.25); }
.badge-dev { background: rgba(96, 165, 250, 0.15); color: #60a5fa; border: 1px solid rgba(96, 165, 250, 0.25); }

.product-status-pill {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
}

.product-info {
    margin-bottom: 20px;
}

.product-name {
    font-size: 21px;
    font-weight: 700;
    color: var(--bs-text-primary);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.product-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--bs-text-secondary);
    margin: 0 0 14px 0;
}

.product-features-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.product-tag-chip {
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
    background: var(--bs-bg-subtle);
    padding: 3px 8px;
    border-radius: 6px;
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--bs-border-color-subtle);
}

.product-link-text {
    font-size: 14px;
    font-weight: 600;
    color: #38bdf8;
}

.product-arrow {
    font-size: 16px;
    font-weight: 600;
    color: #38bdf8;
    transition: transform 0.2s ease;
}

.product-card:hover .product-arrow {
    transform: translateX(4px);
}

/* ==========================================================
   Accordion / Innovations (htx-openable-list-view)
   ========================================================== */
.innovations-section {
    width: 100%;
}

htx-openable-list-view {
    display: block;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

htx-openable-list-view > ul {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    border-radius: 22px;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-bg-surface);
    box-shadow: var(--bs-card-shadow);
    overflow: hidden;
}

htx-openable-list-view > ul > li {
    display: block;
    width: 100%;
    height: 74px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    border-bottom: 1px solid var(--bs-border-color);
    transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

htx-openable-list-view > ul > li:last-child {
    border-bottom: none;
}

htx-openable-list-view > ul > li.opened {
    height: 440px;
}

htx-openable-list-view > ul > li > htx-header {
    display: flex;
    align-items: center;
    width: 100%;
    height: 74px;
    padding: 0 24px;
    box-sizing: border-box;
    cursor: pointer;
    background: transparent;
    transition: var(--bs-transition);
}

htx-openable-list-view > ul > li > htx-header:hover {
    background: var(--bs-bg-hover);
}

htx-openable-list-view > ul > li.opened > htx-header {
    background: var(--bs-bg-hover);
    border-bottom: 1px solid var(--bs-border-color);
}

htx-openable-list-view > ul > li > htx-header > htx-left-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bs-bg-subtle);
    margin-right: 16px;
    flex-shrink: 0;
    border: 1px solid var(--bs-border-color-subtle);
}

htx-openable-list-view > ul > li > htx-header > htx-left-icon > img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

htx-openable-list-view > ul > li > htx-header > htx-title {
    font-size: 17.5px;
    font-weight: 700;
    color: var(--bs-text-primary);
    flex-grow: 1;
    margin: 0;
}

htx-openable-list-view > ul > li > htx-header > htx-right-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--bs-text-muted);
    transition: transform 0.3s ease;
}

htx-openable-list-view > ul > li.opened > htx-header > htx-right-icon {
    transform: rotate(180deg);
    color: #38bdf8;
}

htx-openable-list-view > ul > li > htx-content {
    display: block;
    width: 100%;
    height: 365px;
    box-sizing: border-box;
    padding: 24px;
    overflow-y: auto;
    font-size: 15px;
    line-height: 1.65;
    color: var(--bs-text-secondary);
}

.content-block {
    margin-bottom: 16px;
}

.content-subcard {
    background: var(--bs-bg-subtle);
    border: 1px solid var(--bs-border-color);
    border-radius: 14px;
    padding: 16px 20px;
    margin-top: 12px;
}

.content-subcard h4 {
    margin: 0 0 6px 0;
    color: var(--bs-text-primary);
    font-size: 15px;
    font-weight: 700;
}

.content-subcard p {
    margin: 0;
    font-size: 13.5px;
    color: var(--bs-text-secondary);
}

/* ==========================================================
   Pre-Footer CTA Banner (.cta-banner-section)
   ========================================================== */
.cta-banner-section {
    padding: 60px 24px 100px 24px;
}

.cta-banner {
    width: 100%;
    background: linear-gradient(135deg, #0d1527 0%, #151e36 100%);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 32px;
    padding: 70px 40px;
    box-sizing: border-box;
    text-align: center;
    color: #ffffff;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.15);
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 550px;
    height: 550px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
    margin: 0 auto;
}

.cta-title {
    font-size: clamp(26px, 3.4vw, 40px);
    font-weight: 800;
    margin: 0 0 16px 0;
    color: #ffffff;
    line-height: 1.22;
}

.cta-subtitle {
    font-size: 16.5px;
    color: #94a3b8;
    margin: 0 0 36px 0;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

/* ==========================================================
   Footer Overrides
   ========================================================== */
htx-page-footer {
    position: relative;
    background: #07090e;
    color: rgba(255, 255, 255, 0.75) !important;
    height: auto;
    min-height: 200px;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================================
   Responsive Adaptations
   ========================================================== */
@media all and (max-width: 1100px) {
    #sub_header, .main-hero {
        padding: 60px 40px;
        gap: 30px;
    }
    
    .bento-span-8, .bento-span-4, .bento-span-6 {
        grid-column: span 12;
    }
}

@media all and (max-width: 900px) {
    #sub_header, .main-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 48px 24px;
        border-bottom-left-radius: 28px;
        border-bottom-right-radius: 28px;
    }
    
    .hero-content {
        align-items: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    #circle_canvas_container, .hero-visual-card {
        width: 100%;
        max-width: 380px;
        margin-top: 10px;
    }
}

@media all and (max-width: 600px) {
    #sub_header, .main-hero {
        padding: 36px 16px;
    }
    
    .hero-title {
        font-size: 30px;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
    
    .hero-stats {
        gap: 14px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .cta-banner {
        padding: 44px 20px;
    }
}

/* ==========================================================
   Scroll Appearance / Reveal Animations
   ========================================================== */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delay variants */
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.40s; }
.reveal-delay-6 { transition-delay: 0.48s; }

/* Scale & fade variant (for hero visual card, banners, etc.) */
.reveal-scale {
    opacity: 0;
    transform: scale(0.96) translateY(20px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-scale.is-visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Ensure hover interactions on revealed cards remain immediate and unimpeded */
.bento-card.is-visible:hover,
.product-card.is-visible:hover {
    transition-delay: 0s !important;
    transition-duration: 0.3s !important;
}

.bento-card.is-visible:hover {
    transform: translateY(-4px) !important;
}

.product-card.is-visible:hover {
    transform: translateY(-5px) !important;
}

@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll,
    .reveal-scale {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

