/* ==========================================
   HKIncotech Landing Page - Finpay-Inspired Design
   Clean, modern fintech aesthetic
   ========================================== */

/* ==========================================
   CSS Variables & Theme (Notion-HK Hybrid Palette)
   ========================================== */
:root {
    --primary: #0f6b9e;
    --primary-light: #2f8fc3;
    --primary-dark: #0b4e73;
    --primary-subtle: rgba(15, 107, 158, 0.07);
    --accent: #1a8ec7;
    --accent-light: #ddf0fa;
    /* Notion-inspired: more neutral off-white backgrounds */
    --secondary-bg: #f5f7f9;
    --text-dark: #0f172a;
    --text-gray: #4a5f6e;
    --text-light: #7b8fa0;
    --border: #e4eaee;
    --surface: #ffffff;
    --surface-elevated: #ffffff;
    --shadow-color: rgba(15, 107, 158, 0.07);
    --shadow-hover: rgba(15, 107, 158, 0.13);
    /* Notion-style: larger radius, generous feel */
    --card-radius: 14px;
    --section-radius: 20px;
    --btn-radius: 10px;
}

html[data-theme="dark"] {
    --primary: #47a3d4;
    --primary-light: #73bfe6;
    --primary-dark: #2b84b5;
    --primary-subtle: rgba(71, 163, 212, 0.15);
    --accent: #6ec7f0;
    --accent-light: rgba(110, 199, 240, 0.15);
    --secondary-bg: #0f1a24;
    --text-dark: #e8eef5;
    --text-gray: #b5c4d4;
    --text-light: #8fa3b5;
    --border: #263545;
    --surface: #131f2b;
    --surface-elevated: #1a2d3e;
    --shadow-color: rgba(0, 0, 0, 0.28);
    --shadow-hover: rgba(0, 0, 0, 0.42);
}

/* ==========================================
   Global Styles
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--surface);
    color: var(--text-dark);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html[data-theme="dark"] body {
    background: #0d141d;
    color-scheme: dark;
}

.material-symbols-rounded {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    font-size: inherit;
    vertical-align: middle;
}

/* ==========================================
   Utilities & Layout
   ========================================== */
.container-v5 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    /* Notion-style: generous vertical breathing room */
    padding: 5.5rem 0;
}

/* Section Header — Notion-HK style: bold display title + readable subtitle */
.section-header {
    margin-bottom: 3rem;
    text-align: center;
}

.section-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.85rem;
}

.section-title {
    /* Notion-inspired: larger, bolder display heading */
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.85rem;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-gray);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.75;
}

/* ==========================================
   Header & Navigation (Finpay clean nav)
   ========================================== */
header {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0.65rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

html[data-theme="dark"] header {
    background: rgba(13, 24, 35, 0.94);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
}

.logo {
    display: flex;
    align-items: center;
    /* gap: 0.4rem; */
    font-weight: 800;
    font-size: 1rem;
    color: var(--primary);
    text-decoration: none;
    flex-shrink: 0;
    letter-spacing: -0.02em;
}

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

.logo span {
    display: inline-block;
    transform: translateY(5px);
}

.logo:hover {
    opacity: 0.85;
}

nav {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    flex: 1;
    justify-content: center;
    flex-wrap: nowrap;
    min-width: 0;
    padding: 0 0.6rem;
    overflow: visible;
}

nav a.nav-link-v5 {
    color: var(--text-gray);
    text-decoration: none !important;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0;
    transition: color 0.22s ease;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0.32rem 0.65rem;
    border-radius: 0;
    white-space: nowrap !important;
    flex-shrink: 0;
    word-break: keep-all;
}

nav a.nav-link-v5:hover {
    color: var(--text-dark);
}

nav a.nav-link-v5--active {
    color: var(--text-dark);
    font-weight: 600;
}

nav a.nav-link-v5--active::after {
    content: "";
    position: absolute;
    left: 25%;
    right: 25%;
    bottom: 2px;
    height: 2px;
    border-radius: 999px;
    background: var(--primary);
}

/* ==========================================
   Nav Dropdown Groups
   ========================================== */
.nav-group {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-group--services { --nav-mega-accent: #f59e0b; --nav-mega-accent-2: #fbbf24; }
.nav-group--expertise { --nav-mega-accent: #f59e0b; --nav-mega-accent-2: #fbbf24; }
.nav-group--company { --nav-mega-accent: #f59e0b; --nav-mega-accent-2: #fbbf24; }

.nav-group__trigger {
    color: var(--text-gray);
    font-size: 0.82rem;
    font-weight: 500;
    font-family: inherit;
    letter-spacing: 0;
    padding: 0.32rem 0.65rem;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    cursor: pointer;
    border: none;
    background: none;
    transition: color 0.22s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-group__trigger:hover,
.nav-group:hover .nav-group__trigger,
.nav-group--active .nav-group__trigger {
    color: var(--text-dark);
}

.nav-group--active .nav-group__trigger {
    font-weight: 600;
}

.nav-chevron {
    font-size: 15px !important;
    line-height: 1;
    transition: transform 0.2s ease;
    opacity: 0.6;
}

.nav-group:hover .nav-chevron {
    transform: rotate(180deg);
    opacity: 1;
}

.nav-group__panel {
    position: absolute;
    /* Reduce the "hover gap" so moving mouse into panel doesn't close dropdown */
    top: calc(100% + 0px);
    left: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 0.35rem;
    min-width: 210px;
    box-shadow: 0 8px 32px var(--shadow-color), 0 2px 6px rgba(0,0,0,0.06);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    transform: translateY(-2px);
    z-index: 1002;
}

.nav-group__panel--mega {
    padding: 0.55rem;
    min-width: 640px;
}

.nav-group:hover .nav-group__panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.nav-group__panel a {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.7rem;
    color: var(--text-gray);
    text-decoration: none !important;
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
    letter-spacing: 0;
}

.nav-group__panel a .material-symbols-rounded {
    font-size: 15px;
    opacity: 0.65;
    flex-shrink: 0;
}

.nav-group__panel a:hover {
    background: var(--secondary-bg);
    color: var(--primary);
}

.nav-group__panel a:hover .material-symbols-rounded {
    opacity: 1;
}

.nav-group__panel a.nav-item--active {
    background: var(--primary-subtle);
    color: var(--primary);
    font-weight: 600;
}

.nav-group__panel a.nav-item--active .material-symbols-rounded {
    opacity: 1;
}

html[data-theme="dark"] .nav-group__panel {
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.25);
}

/* ==========================================
   Mega Dropdown (Image-inspired)
   ========================================== */
.nav-mega {
    display: grid;
    grid-template-columns: 0.95fr 1.25fr;
    gap: 0.75rem;
    align-items: stretch;
}

.nav-mega__aside {
    position: relative;
    border-radius: 14px;
    padding: 1rem 1rem 0.9rem;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--nav-mega-accent, #f59e0b) 85%, white) 0%,
        color-mix(in srgb, var(--nav-mega-accent-2, #fbbf24) 85%, white) 100%);
    border: 1px solid color-mix(in srgb, var(--nav-mega-accent, #f59e0b) 35%, white);
    overflow: hidden;
}

/* Fallback if color-mix unsupported */
@supports not (background: color-mix(in srgb, red 50%, white)) {
    .nav-mega__aside {
        background: linear-gradient(135deg, rgba(245, 158, 11, 0.95) 0%, rgba(251, 191, 36, 0.95) 100%);
        border-color: rgba(245, 158, 11, 0.35);
    }
    .nav-group--expertise .nav-mega__aside {
        background: linear-gradient(135deg, rgba(245, 158, 11, 0.95) 0%, rgba(251, 191, 36, 0.95) 100%);
        border-color: rgba(245, 158, 11, 0.35);
    }
    .nav-group--company .nav-mega__aside {
        background: linear-gradient(135deg, rgba(245, 158, 11, 0.95) 0%, rgba(251, 191, 36, 0.95) 100%);
        border-color: rgba(245, 158, 11, 0.35);
    }
}

.nav-mega__aside::after {
    content: "";
    position: absolute;
    top: -60px;
    right: -60px;
    width: 160px;
    height: 160px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    filter: blur(1px);
    pointer-events: none;
}

.nav-mega__aside-top {
    position: relative;
    z-index: 1;
    margin-bottom: 0.85rem;
}

.nav-mega__aside-title {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.96);
    margin-bottom: 0.35rem;
}

.nav-mega__aside-desc {
    font-size: 0.78rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.86);
    max-width: 22ch;
}

.nav-mega__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    position: relative;
    z-index: 1;
}

.nav-mega__tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, 0.94);
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.26);
    white-space: nowrap;
}

.nav-mega__main {
    padding: 0.3rem 0.2rem;
    min-width: 0;
}

.nav-mega__label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-light);
    padding: 0.25rem 0.55rem 0.4rem;
}

/* Override base dropdown link styles for mega items */
.nav-group__panel--mega a.nav-mega__item {
    display: grid;
    grid-template-columns: 22px 1fr;
    align-items: start;
    gap: 0.65rem;
    padding: 0.55rem 0.65rem;
    white-space: normal;
}

.nav-mega__icon {
    font-size: 18px !important;
    margin-top: 0.05rem;
    opacity: 0.75;
}

.nav-mega__text {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    min-width: 0;
}

.nav-mega__title {
    font-size: 0.88rem;
    font-weight: 750;
    color: var(--text-dark);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.nav-mega__desc {
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--text-gray);
}

.nav-group__panel--mega a.nav-mega__item:hover .nav-mega__icon {
    opacity: 1;
}

.nav-group__panel--mega a.nav-mega__item:hover .nav-mega__title {
    color: var(--primary);
}

html[data-theme="dark"] .nav-mega__aside {
    border-color: color-mix(in srgb, var(--nav-mega-accent, #f59e0b) 35%, rgba(255,255,255,0.1));
}

@media (max-width: 1024px) {
    /* On mobile, keep accordion behavior and simple list appearance */
    .nav-group__panel--mega {
        min-width: unset;
        padding: 0;
    }

    .nav-mega {
        display: block;
    }

    .nav-mega__aside,
    .nav-mega__label,
    .nav-mega__desc {
        display: none;
    }

    .nav-group__panel--mega a.nav-mega__item {
        display: flex;
        align-items: center;
        gap: 0.55rem;
        padding: 0.75rem 1.5rem 0.75rem 2.25rem;
    }
}

.btn-header {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1.15rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    white-space: nowrap;
}

.btn-header:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px var(--shadow-hover);
}

.header-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
    margin-left: 0.6rem;
}

.theme-toggle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-gray);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-hover);
}

/* Language Menu */
.lang-menu {
    position: relative;
    flex-shrink: 0;
    display: block;
    z-index: 1100;
    margin-left: 0;
}

.lang-trigger {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lang-trigger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-hover);
}

.lang-current-flag {
    font-size: 1rem;
    line-height: 1;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 90px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 30px var(--shadow-hover);
    padding: 0.35rem;
    display: none;
    z-index: 1200;
}

.lang-menu.open .lang-dropdown {
    display: block;
}

.lang-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 8px;
    padding: 0.45rem 0.55rem;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
}

.lang-dropdown a:hover {
    background: var(--primary-subtle);
    color: var(--primary);
}

.lang-dropdown a.lang-option--active {
    background: var(--primary-subtle);
    color: var(--primary);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

nav.mobile-open {
    display: flex !important;
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    display: flex;
    align-items: center;
    padding: 3.5rem 2rem 2rem;
    background: linear-gradient(180deg, var(--surface) 0%, var(--secondary-bg) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -120px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(15, 107, 158, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(15, 107, 158, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-main-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 2rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-centered {
    text-align: left;
    max-width: 560px;
    margin: 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-subtle);
    color: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 1.75rem;
    border: 1px solid rgba(15, 107, 158, 0.12);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.035em;
    margin-bottom: 1.25rem;
    color: var(--text-dark);
}

.hero h1 span {
    color: var(--primary);
    position: relative;
}

.hero h1 span::after {
    content: '';
    position: absolute;
    left: -4px;
    right: -4px;
    bottom: 2px;
    height: 12px;
    background: rgba(15, 107, 158, 0.12);
    border-radius: 4px;
    z-index: -1;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin: 0 auto 2rem;
    line-height: 1.8;
    max-width: 560px;
}

.hero-buttons {
    display: flex;
    gap: 0.85rem;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-bottom: 0;
}

/* Social proof avatars */
.hero-social-proof {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.hero-avatars {
    display: flex;
    align-items: center;
}

.hero-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2.5px solid var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: white;
    margin-left: -10px;
    flex-shrink: 0;
}

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

.hero-avatar-more {
    background: var(--secondary-bg) !important;
    color: var(--text-gray);
    border-color: var(--border);
    font-size: 0.65rem;
}

.hero-social-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
    flex-shrink: 0;
}

.hero-social-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.hero-social-rating {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.hero-stars {
    color: #f59e0b;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.hero-rating-score {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-dark);
}

.hero-social-label {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
}

.hero-dashboard {
    position: relative;
    z-index: 1;
    max-width: 860px;
    margin: 0;
}

.hero-dashboard-inner {
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(15, 107, 158, 0.1), 0 4px 12px rgba(0,0,0,0.04);
    overflow: hidden;
}

.hero-dashboard-inner--illustration {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none !important;
    padding: 0;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-dashboard-illustration__img {
    width: min(860px, 100%);
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.hero-dashboard-topbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    background: var(--secondary-bg);
    border-bottom: 1px solid var(--border);
}

.hero-dashboard-topbar .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.hero-dashboard-svg {
    padding: 1.25rem;
}

.hero-dashboard-svg svg {
    width: 100%;
    display: block;
}

.hero-stats-row {
    display: flex;
    justify-content: center;
    gap: 3.5rem;
    flex-wrap: wrap;
    padding: 2rem 0 0;
    max-width: 740px;
    margin: 0 auto;
}

.hero-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.hero-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-subtle);
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 0.35rem;
}

.hero-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.hero-stat-label {
    font-size: 0.82rem;
    color: var(--text-gray);
    line-height: 1.3;
}

.hero-float-card {
    position: absolute;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    box-shadow: 0 8px 24px rgba(15, 107, 158, 0.08);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
}

.hero-float-card .float-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.float-left  { left: -30px; top: 40%; animation: floatY 4s ease-in-out infinite; }
.float-right { right: -30px; top: 30%; animation: floatY 4s ease-in-out infinite 1.5s; }
.float-bottom { right: 60px; bottom: -18px; animation: floatY 4s ease-in-out infinite 0.8s; }

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

@media (max-width: 991px) {
    .hero-main-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .hero-centered { max-width: 900px; text-align: center; margin: 0 auto; }
    .hero-buttons { justify-content: center; }
    .hero-social-proof { justify-content: center; }
    .hero h1 { font-size: 2.8rem; }
    .hero-dashboard { max-width: 680px; }
    .hero-stats-row { gap: 2.5rem; }
    .hero-float-card { display: none; }
}

@media (max-width: 767px) {
    .hero { padding: 3rem 0 2rem; }
    .hero h1 { font-size: 2rem; line-height: 1.15; }
    .hero-desc { font-size: 0.95rem; margin-bottom: 1.75rem; }
    .hero-buttons { flex-direction: column; align-items: center; gap: 0.65rem; margin-bottom: 2rem; }
    .hero-stats-row { gap: 1.5rem; flex-direction: column; align-items: center; }
    .hero-stat-item { flex-direction: row; gap: 0.75rem; }
    .hero-float-card { display: none; }
    .hero-dashboard-inner { border-radius: 12px; }
}

/* ==========================================
   Buttons (Finpay style)
   ========================================== */
.btn-primary-v5 {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.75rem;
    border-radius: var(--btn-radius);
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.92rem;
    transition: all 0.22s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    letter-spacing: -0.01em;
}

.btn-primary-v5:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--shadow-hover);
}

.btn-secondary-v5 {
    background: var(--surface);
    color: var(--primary);
    padding: 0.75rem 1.75rem;
    border-radius: var(--btn-radius);
    border: 1.5px solid var(--border);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.92rem;
    transition: all 0.22s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    letter-spacing: -0.01em;
}

.btn-secondary-v5:hover {
    border-color: var(--primary);
    background: var(--primary-subtle);
    transform: translateY(-1px);
}

/* ==========================================
   Cards (Finpay style — larger radius, cleaner)
   ========================================== */
.fp-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 2.25rem 2rem;
    transition: all 0.25s ease;
}

.fp-card:hover {
    border-color: rgba(15, 107, 158, 0.25);
    box-shadow: 0 6px 24px var(--shadow-color);
    transform: translateY(-2px);
}

/* Why-choose-us cards: accent border color on hover */
.why-card:hover {
    /* Fallback for browsers without color-mix() support */
    border-color: rgba(15, 107, 158, 0.25) !important;
    /* Modern: per-card accent color via CSS custom property */
    border-color: color-mix(in srgb, var(--card-accent, var(--primary)) 25%, transparent) !important;
    box-shadow: 0 8px 28px var(--shadow-color);
}

/* Focus-visible state for all interactive cards */
.fp-card:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.fp-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.35rem;
    background: var(--primary-subtle);
    color: var(--primary);
}

.fp-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.65rem;
    letter-spacing: -0.01em;
}

.fp-card p {
    color: var(--text-gray);
    font-size: 0.93rem;
    line-height: 1.7;
}

/* Bento Grid (Notion-HK style) */
.bento-grid {
    display: grid;
    gap: 1.25rem;
}

.bento-grid-2x2 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
}

.bento-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 2.25rem 2rem;
    transition: all 0.25s ease;
}

.bento-card:hover {
    box-shadow: 0 4px 20px var(--shadow-color);
    transform: translateY(-1px);
}

.bento-card-lg {
    grid-column: span 2;
}

/* Stat number — large display numbers */
.fp-stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.fp-stat-label {
    font-size: 0.88rem;
    color: var(--text-gray);
}

/* ==========================================
   Steps Section (Finpay numbered steps)
   ========================================== */
.fp-step-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    opacity: 0.12;
    line-height: 1;
    margin-bottom: 1rem;
    letter-spacing: -0.04em;
}

.fp-step-card {
    background: var(--secondary-bg);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 2rem 1.75rem;
    text-align: center;
    transition: all 0.3s ease;
}

.fp-step-card:hover {
    background: var(--surface);
    box-shadow: 0 8px 24px var(--shadow-color);
}

/* ==========================================
   Pricing Cards (Finpay style)
   ========================================== */
.fp-pricing-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 2.5rem 2rem;
    transition: all 0.3s ease;
}

.fp-pricing-featured {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.fp-pricing-featured .fp-stat-value,
.fp-pricing-featured h3,
.fp-pricing-featured p,
.fp-pricing-featured .fp-stat-label {
    color: white;
}

/* ==========================================
   CTA Banner (Finpay dark teal banner)
   ========================================== */
.fp-cta-banner {
    background: var(--primary);
    border-radius: var(--section-radius);
    padding: 3.5rem 3rem;
    color: white;
    margin: 0 2rem;
}

.fp-cta-banner h2 {
    font-size: 1.9rem;
    font-weight: 800;
    margin-bottom: 0.85rem;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.fp-cta-banner p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
    max-width: 480px;
    line-height: 1.7;
}

.fp-cta-banner .btn-primary-v5 {
    background: white;
    color: var(--primary);
}

.fp-cta-banner .btn-primary-v5:hover {
    background: var(--secondary-bg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.fp-cta-banner .btn-secondary-v5 {
    background: transparent;
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.fp-cta-banner .btn-secondary-v5:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
}

/* ==========================================
   Footer (Finpay clean dark footer)
   ========================================== */
footer {
    background: #0b1a24;
    color: white;
    padding: 4rem 0 1.5rem;
    margin-top: 0;
}

/* Dark mode component overrides */
html[data-theme="dark"] nav a.nav-link-v5:hover,
html[data-theme="dark"] nav a.nav-link-v5--active {
    color: var(--text-dark);
}

/* Dark mode: override inline background: white on cards/divs */
html[data-theme="dark"] div[style*="background: white"],
html[data-theme="dark"] div[style*="background:white"],
html[data-theme="dark"] div[style*="background: #ffffff"],
html[data-theme="dark"] div[style*="background:#ffffff"],
html[data-theme="dark"] div[style*="background: #fff;"],
html[data-theme="dark"] div[style*="background: #fff "],
html[data-theme="dark"] div[style*="background:#fff;"],
html[data-theme="dark"] article[style*="background: #fff"],
html[data-theme="dark"] article[style*="background:#fff"],
html[data-theme="dark"] section[style*="background: white"],
html[data-theme="dark"] section[style*="background:white"],
html[data-theme="dark"] section[style*="background: #ffffff"],
html[data-theme="dark"] section[style*="background:#ffffff"],
html[data-theme="dark"] section[style*="background: #fff;"],
html[data-theme="dark"] section[style*="background: #fff "] {
    background: var(--surface) !important;
}

/* Dark mode: light green/blue gradient sections */
html[data-theme="dark"] section[style*="linear-gradient(135deg, #f8fafc 0%, #ecfdf5"] {
    background: var(--secondary-bg) !important;
}

/* Dark mode: hkspace gradient sidebar */
html[data-theme="dark"] div[style*="linear-gradient(135deg, #f0f9ff 0%, #ecfdf5"] {
    background: var(--secondary-bg) !important;
    border-color: var(--border) !important;
}

/* Dark mode: AI platform amber gradient sidebar */
html[data-theme="dark"] div[style*="linear-gradient(135deg, #fef3c7 0%, #fde68a"] {
    background: rgba(217, 119, 6, 0.1) !important;
    border-color: rgba(217, 119, 6, 0.25) !important;
}

/* Dark mode: amber blockquotes in ai article */
html[data-theme="dark"] div[style*="background: #fef3c7"][style*="border-left: 4px solid #d97706"] {
    background: rgba(217, 119, 6, 0.1) !important;
}

/* Dark mode: amber badge text (#92400e is too dark) */
html[data-theme="dark"] [style*="color: #92400e"] {
    color: #fcd34d !important;
}

html[data-theme="dark"] [style*="color: #d97706"] {
    color: #fbbf24 !important;
}

/* Dark mode: hkspace blockquotes (#f8fafc) */
html[data-theme="dark"] div[style*="background: #f8fafc"][style*="border-left: 4px solid var(--primary)"] {
    background: var(--surface-elevated) !important;
}

/* Dark mode: override inline var(--secondary-bg) sections */
html[data-theme="dark"] section[style*="background: var(--secondary-bg)"] {
    background: var(--secondary-bg) !important;
}

/* Dark mode: override inline light backgrounds */
html[data-theme="dark"] div[style*="background: #f8fafc"],
html[data-theme="dark"] div[style*="background: #f9fafb"],
html[data-theme="dark"] div[style*="background: #f0f9ff"],
html[data-theme="dark"] section[style*="background: #f0f9ff"] {
    background: var(--secondary-bg) !important;
}

/* Dark mode: override accent pill backgrounds */
html[data-theme="dark"] div[style*="background: #e0f2fe"] {
    background: rgba(71, 163, 212, 0.15) !important;
}

html[data-theme="dark"] div[style*="background: #fef3c7"],
html[data-theme="dark"] div[style*="background: #fde68a"] {
    background: rgba(217, 169, 56, 0.15) !important;
}

html[data-theme="dark"] div[style*="background: #ecfdf5"],
html[data-theme="dark"] div[style*="background: #d1fae5"] {
    background: rgba(16, 185, 129, 0.12) !important;
}

html[data-theme="dark"] div[style*="background: #dbeafe"],
html[data-theme="dark"] div[style*="background: #e0e7ff"] {
    background: rgba(96, 165, 250, 0.12) !important;
}

/* Dark mode: override inline border colors */
html[data-theme="dark"] [style*="border: 1px solid #e2e8f0"],
html[data-theme="dark"] [style*="border: 1px solid #e0ebe9"],
html[data-theme="dark"] [style*="border: 1px solid var(--border)"] {
    border-color: var(--border) !important;
}

html[data-theme="dark"] [style*="border-top: 1px solid #e2e8f0"],
html[data-theme="dark"] [style*="border-bottom: 1px solid #e2e8f0"],
html[data-theme="dark"] [style*="border-top: 1px solid var(--border)"],
html[data-theme="dark"] [style*="border-bottom: 1px solid var(--border)"] {
    border-color: var(--border) !important;
}

/* Dark mode: override hardcoded text colors */
html[data-theme="dark"] [style*="color: #0f172a"] {
    color: var(--text-dark) !important;
}

html[data-theme="dark"] [style*="color: #475569"],
html[data-theme="dark"] [style*="color: #556a7b"] {
    color: var(--text-gray) !important;
}

/* Dark mode: SVG text in inline SVGs */
html[data-theme="dark"] svg text[fill="#1a4d5e"] {
    fill: var(--primary);
}

html[data-theme="dark"] svg circle[fill="#1a4d5e"],
html[data-theme="dark"] svg line[stroke="#1a4d5e"] {
    fill: var(--primary);
    stroke: var(--primary);
}

html[data-theme="dark"] svg circle[fill="#0d9488"],
html[data-theme="dark"] svg line[stroke="#0d9488"],
html[data-theme="dark"] svg text[fill="#0d9488"] {
    fill: var(--accent);
    stroke: var(--accent);
}

footer a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.88rem;
}

footer a:hover {
    color: white;
}

.footer-section h3 {
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: white;
    letter-spacing: 0.01em;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.65rem;
}

.footer-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 2.5rem 0 1rem;
    padding-top: 1.25rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.82rem;
}

/* ==========================================
   Partner Logos Row
   ========================================== */
.fp-partners {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    padding: 2.5rem 0;
    opacity: 0.5;
    filter: grayscale(100%);
}

.fp-partners img {
    height: 28px;
    width: auto;
}

/* ==========================================
   Inline style overrides for blade templates
   (make existing inline-styled cards match Notion-HK aesthetic)
   ========================================== */
section[style*="background: var(--secondary-bg)"] {
    background: var(--secondary-bg) !important;
}

/* Notion-style: smooth transitions on all inline-styled cards */
div[style*="border-radius: var(--card-radius)"],
div[style*="border-radius: 12px"],
div[style*="border-radius: 14px"],
div[style*="border-radius: 16px"] {
    transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

/* Slightly larger inline headings — Notion display weight feel */
[style*="font-size: 2.75rem"] {
    font-size: 3rem !important;
    letter-spacing: -0.03em;
}

[style*="font-size: 2rem; font-weight: 800"] {
    font-size: 2.2rem !important;
    letter-spacing: -0.025em;
}

[style*="font-size: 1.75rem; font-weight: 800"] {
    font-size: 1.9rem !important;
    letter-spacing: -0.02em;
}

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

/* Hamburger menu breakpoint — 6 top-level items (3 dropdowns + 3 links) */
@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: block;
    }

    .btn-header {
        padding: 0.45rem 0.9rem;
        font-size: 0.78rem;
    }

    .logo {
        font-size: 0.92rem;
    }

    nav {
        display: none;
        position: fixed;
        top: 54px;
        left: 0;
        right: 0;
        background: var(--surface);
        flex-direction: column;
        gap: 0;
        width: 100%;
        text-align: left;
        border-top: 1px solid var(--border);
        padding: 0;
        z-index: 999;
        max-height: calc(100vh - 54px);
        overflow-x: hidden;
        overflow-y: auto;
        box-shadow: 0 12px 32px var(--shadow-color);
        justify-content: flex-start;
    }

    .header-actions {
        margin-left: 0;
    }

    nav a.nav-link-v5 {
        padding: 0.85rem 1.5rem;
        display: block;
        font-size: 0.9rem;
        border-bottom: 1px solid var(--border);
        white-space: normal;
        max-width: none;
        border-radius: 0;
    }

    nav a.nav-link-v5::after {
        display: none !important;
    }

    nav a.nav-link-v5--active {
        background: var(--secondary-bg);
        color: var(--primary);
    }

    /* Mobile dropdown group overrides */
    .nav-group {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .nav-group__trigger {
        padding: 0.85rem 1.5rem;
        font-size: 0.9rem;
        border-bottom: 1px solid var(--border);
        width: 100%;
        justify-content: space-between;
        border-radius: 0;
    }

    /* On mobile: disable CSS hover, rely on JS .open class */
    .nav-group:hover .nav-group__panel {
        opacity: 0;
        pointer-events: none;
        transform: translateY(-6px);
    }

    .nav-group:hover .nav-chevron {
        transform: none;
    }

    .nav-group.open .nav-group__trigger {
        color: var(--primary);
        font-weight: 600;
    }

    .nav-group.open .nav-chevron {
        transform: rotate(180deg);
        opacity: 1;
    }

    .nav-group__panel {
        position: static;
        transform: none !important;
        opacity: 0;
        pointer-events: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0;
        min-width: unset;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.28s ease, opacity 0.18s ease;
    }

    .nav-group.open .nav-group__panel {
        opacity: 1;
        pointer-events: auto;
        max-height: 500px;
    }

    .nav-group__panel a {
        padding: 0.75rem 1.5rem 0.75rem 2.25rem;
        border-radius: 0;
        border-bottom: 1px solid var(--border);
        font-size: 0.88rem;
        background: var(--secondary-bg);
    }

    .nav-group__panel a:hover,
    .nav-group__panel a.nav-item--active {
        background: var(--primary-subtle);
        color: var(--primary);
    }
}

/* Tablet (991px and down) */
@media (max-width: 991px) {
    .section-title {
        font-size: 2rem;
    }

    section {
        padding: 4rem 0;
    }

    .fp-cta-banner {
        margin: 0 1rem;
        padding: 2.5rem 1.75rem;
    }

    .case-study-grid {
        grid-template-columns: 1fr !important;
    }

    .bento-grid-2x2 {
        grid-template-columns: 1fr;
    }

    .bento-card-lg {
        grid-column: span 1;
    }
}

/* Footer responsive grid */
@media (max-width: 991px) {
    footer .footer-grid-5col {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 767px) {
    footer .footer-grid-5col {
        grid-template-columns: 1fr !important;
    }
}

/* Mobile (768px and down) */
@media (max-width: 767px) {
    header {
        padding: 0.65rem 0;
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: var(--surface);
    }

    .header-container {
        gap: 0.5rem;
        padding: 0 1rem;
    }

    .logo {
        font-size: 1rem;
        gap: 0.5rem;
    }

    .logo img {
        height: 32px;
    }

    .logo span {
        display: none;
    }

    .mobile-menu-toggle {
        order: 2;
    }

    .btn-header {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        order: 3;
    }

    nav {
        top: 58px;
        max-height: calc(100vh - 58px);
    }

    nav a.nav-link-v5 {
        padding: 1rem 1.5rem;
        font-size: 0.92rem;
        border-radius: 0;
    }

    body {
        padding-top: 58px;
    }

    section {
        padding: 3.5rem 0;
    }

    .section-title {
        font-size: 1.65rem;
    }

    .container-v5 {
        padding: 0 1.25rem;
    }

    .fp-cta-banner {
        margin: 0;
        border-radius: 0;
        padding: 2rem 1.25rem;
    }

    .fp-cta-banner h2 {
        font-size: 1.3rem;
    }
}

/* Carousel: hide side arrows on mobile, use swipe/dots instead */
@media (max-width: 767px) {
    #prevBtn, #nextBtn {
        display: none !important;
    }
}

/* Small Phone (480px and down) */
@media (max-width: 480px) {
    .section-title {
        font-size: 1.45rem;
    }

    .section-subtitle {
        font-size: 0.82rem;
    }

    .btn-primary-v5 {
        padding: 0.6rem 1.2rem;
        font-size: 0.82rem;
    }

    section {
        padding: 2rem 0 !important;
    }

    .container-v5 {
        padding: 0 1rem !important;
    }

    [style*="grid-template-columns: repeat(auto-fit"] {
        grid-template-columns: 1fr !important;
    }

    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    [style*="gap: 2rem"] {
        gap: 1rem !important;
    }

    [style*="gap: 3rem"] {
        gap: 1.5rem !important;
    }

    [style*="padding: 2.5rem"] {
        padding: 1.5rem !important;
    }

    [style*="padding: 2rem"] {
        padding: 1rem !important;
    }
}


/* ==========================================
   Dark mode: additional inline style overrides
   ========================================== */
html[data-theme="dark"] [style*="border: 1px solid #d1e7f5"],
html[data-theme="dark"] [style*="border: 1px solid #bfdbfe"],
html[data-theme="dark"] [style*="border: 1px solid #fcd34d"],
html[data-theme="dark"] [style*="border: 1px solid #fde68a"],
html[data-theme="dark"] [style*="border-bottom: 1px solid #e5f1ff"],
html[data-theme="dark"] [style*="border-bottom: 1px solid #fef3c7"] {
    border-color: var(--border) !important;
}

/* Services page: improve dark contrast for Tech Stack block */
html[data-theme="dark"] .services-tech-stack-block {
    background: #132131 !important;
    border-color: #2b3f55 !important;
}

html[data-theme="dark"] .services-tech-stack-block [style*="background: var(--secondary-bg)"] {
    background: #0f1b29 !important;
    border: 1px solid #24364a;
}

html[data-theme="dark"] .services-tech-stack-block [style*="background: white"][style*="padding: 0.4rem 0.75rem"] {
    background: #1a2a3c !important;
    border-color: #3a536d !important;
    color: #d9e6f5 !important;
}

html[data-theme="dark"] .services-tech-stack-block [style*="font-weight: 700; color: var(--text-dark)"] {
    color: #eef5ff !important;
}

html[data-theme="dark"] .services-tech-stack-block [style*="color: var(--text-gray)"] {
    color: #b8c8dc !important;
}

html[data-theme="dark"] .services-tech-stack-block a[style*="background: var(--primary)"] {
    background: #2d8bc0 !important;
    color: #f7fbff !important;
}

/* Scrum page: keep sprint cycle readable in dark mode */
html[data-theme="dark"] .scrum-sprint-cycle-section li[style*="background: white"] {
    background: #132131 !important;
    border: 1px solid #2b3f55 !important;
    border-left: 4px solid var(--primary) !important;
}

html[data-theme="dark"] .scrum-sprint-cycle-section li strong {
    color: #eef5ff !important;
}

html[data-theme="dark"] .scrum-sprint-cycle-section li span {
    color: #bfd0e4 !important;
}

html[data-theme="dark"] .scrum-sprint-cycle-section .position-relative[style*="background: white"] {
    background: #132131 !important;
    border-color: #2b3f55 !important;
}

html[data-theme="dark"] .scrum-sprint-cycle-section svg text[fill="#1a4d5e"] {
    fill: #79bce1 !important;
}

html[data-theme="dark"] .scrum-sprint-cycle-section svg path[stroke="#1a4d5e"],
html[data-theme="dark"] .scrum-sprint-cycle-section svg line[stroke="#1a4d5e"] {
    stroke: #3d7597 !important;
}

html[data-theme="dark"] .scrum-sprint-cycle-section svg polygon[fill="#1a4d5e"] {
    fill: #3d7597 !important;
}

/* Dark mode: additional inline text colors not covered above */
html[data-theme="dark"] [style*="color: #1a4d5e"],
html[data-theme="dark"] [style*="color:#1a4d5e"] {
    color: var(--text-dark) !important;
}

html[data-theme="dark"] [style*="color: #334155"],
html[data-theme="dark"] [style*="color:#334155"],
html[data-theme="dark"] [style*="color: #1e293b"],
html[data-theme="dark"] [style*="color:#1e293b"] {
    color: var(--text-dark) !important;
}

html[data-theme="dark"] [style*="color: #64748b"],
html[data-theme="dark"] [style*="color:#64748b"] {
    color: var(--text-gray) !important;
}

/* Dark mode: fix gradient sections with hardcoded white */
html[data-theme="dark"] section[style*="linear-gradient(135deg, #ffffff"],
html[data-theme="dark"] section[style*="linear-gradient(135deg, white"] {
    background: linear-gradient(135deg, var(--surface) 0%, var(--secondary-bg) 100%) !important;
}

html[data-theme="dark"] section[style*="var(--secondary-bg) 0%, white"],
html[data-theme="dark"] div[style*="var(--secondary-bg) 0%, white"] {
    background: linear-gradient(135deg, var(--secondary-bg) 0%, var(--surface) 100%) !important;
}

/* Dark mode: fix hover box-shadow on interactive cards */
html[data-theme="dark"] [onmouseover*="boxShadow"]:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35) !important;
    border-color: var(--primary) !important;
}

/* Dark mode: fix static box-shadows with hardcoded rgba(26, 77, 94) */
html[data-theme="dark"] [style*="box-shadow: 0 12px 32px rgba(26, 77, 94"],
html[data-theme="dark"] [style*="box-shadow: 0 12px 48px rgba(26, 77, 94"],
html[data-theme="dark"] [style*="box-shadow: 0 8px 32px rgba(26, 77, 94"],
html[data-theme="dark"] [style*="box-shadow: 0 4px 15px rgba(26, 77, 94"],
html[data-theme="dark"] [style*="box-shadow: 0 2px 8px rgba(26, 77, 94"] {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
}

/* Dark mode: fix timeline gradient lines */
html[data-theme="dark"] [style*="linear-gradient(180deg, var(--primary) 0%, rgba(26, 77, 94"] {
    background: linear-gradient(180deg, var(--primary) 0%, rgba(71, 163, 212, 0.2) 100%) !important;
}

/* Dark mode: fix hardcoded dark-primary gradient banners */
html[data-theme="dark"] div[style*="linear-gradient(135deg, var(--primary) 0%, #0a4a78"] {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #0a3558 100%) !important;
}

/* ==========================================
   Dark mode: Hero dashboard illustration
   ========================================== */
html[data-theme="dark"] .hero-dashboard-inner {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0,0,0,0.15);
}

html[data-theme="dark"] .hero-float-card {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .hero h1 span::after {
    background: rgba(71, 163, 212, 0.15);
}

/* ==========================================
   Dark mode: Form elements
   ========================================== */
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
    background: var(--surface-elevated) !important;
    color: var(--text-dark) !important;
    border-color: var(--border) !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: var(--text-light) !important;
    opacity: 1;
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus {
    outline: 2px solid var(--primary) !important;
    outline-offset: 0;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-subtle) !important;
}

html[data-theme="dark"] select option {
    background: var(--surface-elevated);
    color: var(--text-dark);
}

/* Dark mode: alert/notification boxes */
html[data-theme="dark"] [style*="background: #eaf8f2"] {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    color: #6ee7b7 !important;
}

html[data-theme="dark"] [style*="background: #fff1f2"] {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #fca5a5 !important;
}

/* Dark mode: R&D pill badge */
html[data-theme="dark"] [style*="background: #e0f2fe"][style*="color: #0369a1"] {
    background: rgba(71, 163, 212, 0.18) !important;
    color: var(--primary-light) !important;
}

/* Dark mode: testimonial cards */
html[data-theme="dark"] .opacity-75 {
    opacity: 1 !important;
}

/* Dark mode: index blog preview cards */
html[data-theme="dark"] a[style*="background: linear-gradient(135deg, #f0f9ff"] {
    background: var(--surface-elevated) !important;
    border-color: var(--border) !important;
}

html[data-theme="dark"] a[style*="background: linear-gradient(135deg, #fef3c7"] {
    background: var(--surface-elevated) !important;
    border-color: var(--border) !important;
}
