/* ==========================================================================
   Base Styles - Reset, Typography, Global Elements
   ========================================================================== */

/* Modern CSS Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    font-weight: var(--fw-regular);
    line-height: var(--lh-normal);
    color: var(--color-gray-600);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

ul,
ol {
    list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
    color: var(--color-navy);
    letter-spacing: -0.02em;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p {
    margin-bottom: var(--space-md);
}

p:last-child {
    margin-bottom: 0;
}

strong, b {
    font-weight: var(--fw-semibold);
}

/* Selection */
::selection {
    background-color: rgba(var(--color-primary-rgb), 0.15);
    color: var(--color-navy);
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-px);
    padding-right: var(--container-px);
}

.container--wide {
    max-width: var(--container-wide);
}

.container--narrow {
    max-width: var(--container-narrow);
}

/* Section */
.section {
    padding-top: var(--section-py);
    padding-bottom: var(--section-py);
    position: relative;
}

.section--sm {
    padding-top: var(--section-py-sm);
    padding-bottom: var(--section-py-sm);
}

.section--gray {
    background-color: var(--color-off-white);
}

.section--navy {
    background-color: var(--color-navy);
    color: var(--color-gray-300);
}

.section--navy h1,
.section--navy h2,
.section--navy h3,
.section--navy h4 {
    color: var(--color-white);
}

.section--gradient {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 50%, var(--color-navy) 100%);
    color: #fff;
}

.section--gradient h1,
.section--gradient h2,
.section--gradient h3,
.section--gradient h4 {
    color: #fff;
    -webkit-text-fill-color: #fff;
}

/* Light mode: use a lighter, more vibrant CTA gradient */
html:not([data-theme="dark"]) .section--gradient {
    background: linear-gradient(135deg, #4A7AB5 0%, #6B9BD2 40%, #8FB5E0 100%);
}

/* Dark mode: make CTA distinct from footer */
[data-theme="dark"] .section--gradient {
    background: linear-gradient(135deg, #1a2a50 0%, #253a6a 50%, #1e3050 100%);
    border-top: 1px solid rgba(255,255,255,0.06);
}

/* CTA Section - boxed contained look (global) */
.cta-section {
    overflow: hidden;
    position: relative;
    margin-top: var(--space-3xl);
    margin-bottom: var(--space-3xl);
    max-width: var(--container-wide);
    margin-left: auto;
    margin-right: auto;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px -15px rgba(var(--color-primary-rgb), 0.25);
}

[data-theme="dark"] .cta-section {
    box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.cta-section__shapes { position: absolute; inset: 0; pointer-events: none; }
.cta-shape-1 { width: 250px; height: 250px; top: -80px; left: -80px; background: rgba(255,255,255,0.05); border-radius: 50%; }
.cta-shape-2 { width: 150px; height: 150px; bottom: -40px; right: 10%; background: rgba(255,255,255,0.05); border-radius: 50%; }

/* Section Header */
.section-header {
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--space-3xl);
}

.section-header__label {
    display: inline-block;
    font-size: var(--fs-small);
    font-weight: var(--fw-semibold);
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
}

.section-header__title {
    margin-bottom: var(--space-lg);
}

.section-header__desc {
    font-size: var(--fs-body-lg);
    color: var(--color-gray-500);
    line-height: var(--lh-relaxed);
}

/* Visually Hidden (accessibility) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Wave Section Divider */
.wave-divider {
    position: absolute;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-divider--top {
    top: -1px;
}

.wave-divider--bottom {
    bottom: -1px;
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

.wave-divider--flip svg {
    transform: rotateY(180deg);
}

/* ==========================================================================
   Dark Mode Global Overrides
   ========================================================================== */

/* Smooth color transition on theme switch */
html[data-theme="dark"] {
    color-scheme: dark;
}

html[data-theme] body,
html[data-theme] .site-header,
html[data-theme] .card,
html[data-theme] .section,
html[data-theme] .site-footer,
html[data-theme] .btn {
    transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

/* Body */
[data-theme="dark"] body {
    background-color: var(--theme-bg);
    color: var(--theme-text);
}

/* Headings */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: var(--theme-text-heading);
}

/* Links */
[data-theme="dark"] a {
    color: var(--color-primary-light);
}

/* Header */
[data-theme="dark"] .site-header {
    background: var(--theme-header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 var(--theme-header-border);
}

[data-theme="dark"] .site-header--transparent {
    background: transparent;
    box-shadow: none;
}

[data-theme="dark"] .site-header--transparent .site-nav__list > .menu-item > a {
    color: rgba(255,255,255,0.8);
}

[data-theme="dark"] .site-header--transparent .site-nav__list > .menu-item > a:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

[data-theme="dark"] .site-header--transparent .hamburger__line {
    background: #fff;
}

[data-theme="dark"] .site-header--transparent .site-header__cta {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

[data-theme="dark"] .site-header--transparent .theme-toggle {
    background: rgba(255,255,255,0.08);
    color: #FCD34D;
}

[data-theme="dark"] .site-header--scrolled,
[data-theme="dark"] .site-header--scrolled.site-header--transparent {
    background: var(--theme-header-bg) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .site-header--scrolled .site-header__logo-img {
    filter: brightness(0) invert(1);
}

[data-theme="dark"] .site-header--scrolled .site-nav__list > .menu-item > a {
    color: rgba(255, 255, 255, 0.75);
}

[data-theme="dark"] .site-header--scrolled .site-nav__list > .menu-item > a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .site-header--scrolled .hamburger__line {
    background: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .site-header--scrolled .site-header__cta {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

[data-theme="dark"] .site-header--scrolled .theme-toggle {
    background: rgba(255, 255, 255, 0.08);
    color: #FCD34D;
}

[data-theme="dark"] .site-header--scrolled .mega-menu__desc {
    color: rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .site-nav__list > .menu-item > a {
    color: var(--theme-text);
}

[data-theme="dark"] .site-nav__list > .menu-item > a:hover {
    color: var(--color-primary-light);
    background: rgba(var(--color-primary-rgb), 0.1);
}

[data-theme="dark"] .site-header__logo-img {
    filter: brightness(0) invert(1);
}

[data-theme="dark"] .hamburger__line {
    background: var(--theme-text);
}

/* Mega Menu */
[data-theme="dark"] .mega-menu {
    background: var(--theme-bg-elevated);
    border-color: var(--theme-border);
}

[data-theme="dark"] .mega-menu .menu-item a {
    color: var(--theme-text);
}

[data-theme="dark"] .mega-menu .menu-item a:hover {
    background: rgba(255,255,255,0.05);
}

/* Mobile Menu */
[data-theme="dark"] .mobile-menu {
    background: var(--theme-bg);
}

[data-theme="dark"] .mobile-menu__list > li {
    border-color: var(--theme-border);
}

[data-theme="dark"] .mobile-menu__list > li > a {
    color: var(--theme-text-heading);
}

/* Sections */
[data-theme="dark"] .section {
    background-color: var(--theme-bg);
}

[data-theme="dark"] .section--gray {
    background-color: var(--theme-bg-alt);
}

/* Cards */
[data-theme="dark"] .card {
    background: var(--theme-bg-card);
    border-color: var(--theme-border);
    box-shadow: var(--theme-card-shadow);
}

[data-theme="dark"] .card:hover {
    box-shadow: var(--theme-card-hover-shadow);
    border-color: rgba(var(--color-primary-rgb), 0.2);
}

[data-theme="dark"] .card__title {
    color: var(--theme-text-heading);
}

[data-theme="dark"] .card__desc {
    color: var(--theme-text-muted);
}

[data-theme="dark"] .card__icon {
    background: var(--theme-icon-bg);
}

/* Section Headers */
[data-theme="dark"] .section-header__title {
    color: var(--theme-text-heading);
}

[data-theme="dark"] .section-header__desc {
    color: var(--theme-text-muted);
}

/* Buttons - all variants */
[data-theme="dark"] .btn--primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

[data-theme="dark"] .btn--secondary {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.15);
    color: #fff;
}

[data-theme="dark"] .btn--outline {
    color: var(--color-primary-light);
    border-color: var(--color-primary-light);
}

[data-theme="dark"] .btn--white {
    background: #fff;
    color: var(--color-navy);
    border-color: #fff;
}

[data-theme="dark"] .btn--ghost {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.8);
    border-color: rgba(255,255,255,0.15);
}

[data-theme="dark"] .btn--ghost:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

/* Hero dark mode - text visibility */
[data-theme="dark"] .hero__center {
    color: #fff;
}

[data-theme="dark"] .hero__badge {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
}

[data-theme="dark"] .hero__subtitle {
    color: rgba(255,255,255,0.55);
}

[data-theme="dark"] .hero__btn-primary {
    background: #fff;
    border-color: #fff;
    color: var(--color-navy);
    box-shadow: 0 0 30px rgba(255,255,255,0.12);
}

[data-theme="dark"] .hero__btn-primary:hover {
    background: var(--color-off-white);
    color: var(--color-navy);
}

[data-theme="dark"] .hero .btn--ghost {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.8);
    border-color: rgba(255,255,255,0.15);
}

[data-theme="dark"] .hero .btn--ghost:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

/* Eco cards in dark hero handled in home.css [data-theme="dark"] .hero__eco-card rules */

[data-theme="dark"] .hero__stats {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.07);
}

[data-theme="dark"] .hero__stat-num {
    color: #fff;
}

[data-theme="dark"] .hero__stat-lbl {
    color: rgba(255,255,255,0.35);
}

[data-theme="dark"] .hero__stat-sep {
    background: rgba(255,255,255,0.08);
}

/* Section label */
[data-theme="dark"] .section-header__label {
    color: var(--color-accent) !important;
}

/* Check list */
[data-theme="dark"] .check-list__item {
    color: var(--theme-text);
}

/* Card link */
[data-theme="dark"] .card__link {
    color: var(--color-primary-light);
}

/* Product page hero text in dark mode */
[data-theme="dark"] .page-hero__title {
    color: #fff;
}

[data-theme="dark"] .page-hero__desc {
    color: rgba(255,255,255,0.7);
}

[data-theme="dark"] .page-hero .badge--filled {
    background: rgba(255,255,255,0.1) !important;
    color: rgba(255,255,255,0.8) !important;
    border-color: rgba(255,255,255,0.15) !important;
}

[data-theme="dark"] .product-hero .hero__actions .btn--white {
    background: #fff;
    border-color: #fff;
    color: var(--color-navy);
}

[data-theme="dark"] .product-hero .hero__actions .btn--ghost {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.8);
    border-color: rgba(255,255,255,0.15);
}

[data-theme="dark"] .product-hero__logo {
    filter: none;
        background-color: white;
    padding: 10px;
    border-radius: 10px;
}

/* Device mockups in dark */
[data-theme="dark"] .device-mockup--browser {
    border-color: var(--theme-border);
}

[data-theme="dark"] .device-mockup--browser .device-mockup__bar {
    background: var(--theme-bg-elevated);
    border-color: var(--theme-border);
}

[data-theme="dark"] .device-mockup__screen {
    background: var(--theme-bg-card);
}

/* Trust section uses --theme-* tokens, handled in components.css */

/* Process steps */
[data-theme="dark"] .process-step__line {
    background: linear-gradient(90deg, rgba(var(--color-primary-rgb), 0.3), transparent);
}

/* Split section text */
[data-theme="dark"] .split h2 {
    color: var(--theme-text-heading);
}

[data-theme="dark"] .split p {
    color: var(--theme-text-muted);
}

/* Icon box */
[data-theme="dark"] .icon-box {
    background: rgba(var(--color-primary-rgb), 0.12);
}

/* Footer wave on dark */
[data-theme="dark"] .site-footer .wave-divider svg path {
    fill: var(--theme-footer-bg);
}

/* Contact info text */
[data-theme="dark"] .contact-info__item h4 {
    color: var(--theme-text-heading);
}

[data-theme="dark"] .contact-info__item a,
[data-theme="dark"] .contact-info__item p {
    color: var(--theme-text-muted);
}

/* Map card info */
[data-theme="dark"] .map-card__info h4 {
    color: var(--theme-text-heading);
}

[data-theme="dark"] .map-card__info p {
    color: var(--theme-text-muted);
}

/* Career no-positions */
[data-theme="dark"] .no-positions__card h3 {
    color: var(--theme-text-heading);
}

[data-theme="dark"] .no-positions__card p {
    color: var(--theme-text-muted);
}

/* About stat labels */
[data-theme="dark"] .about-stat-card span {
    color: var(--theme-text-faint);
}

/* Products page */
[data-theme="dark"] .product-row__name {
    color: var(--theme-text-heading);
}

[data-theme="dark"] .product-row__desc {
    color: var(--theme-text-muted);
}

/* Infrastructure */
[data-theme="dark"] .office-gallery__featured {
    border: 1px solid var(--theme-border);
    border-radius: var(--radius-xl);
}

[data-theme="dark"] .stat__label {
    color: var(--theme-text-muted);
}

/* Forms */
[data-theme="dark"] .form-input,
[data-theme="dark"] .form-textarea,
[data-theme="dark"] .form-select,
[data-theme="dark"] .kw-form__field input,
[data-theme="dark"] .kw-form__field select,
[data-theme="dark"] .kw-form__field textarea {
    background: var(--theme-input-bg);
    border-color: var(--theme-input-border);
    color: var(--theme-text-heading);
}

[data-theme="dark"] .form-label,
[data-theme="dark"] .kw-form__field label {
    color: var(--theme-text);
}

/* Footer */
[data-theme="dark"] .site-footer__main {
    background: var(--theme-footer-bg);
}

[data-theme="dark"] .site-footer__bottom {
    background: rgba(0,0,0,0.3);
}

/* Wave dividers */
[data-theme="dark"] .wave-divider svg path {
    fill: var(--theme-bg);
}

/* Page Hero - Light mode overrides */
[data-theme="light"] .page-hero,
html:not([data-theme="dark"]) .page-hero {
    background: linear-gradient(160deg, #eef4ff 0%, #e0ecff 40%, #f0f5ff 100%);
}

[data-theme="light"] .page-hero__bg,
html:not([data-theme="dark"]) .page-hero__bg {
    background-image:
        radial-gradient(circle at 20% 50%, rgba(var(--color-primary-rgb), 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(var(--color-accent-rgb), 0.06) 0%, transparent 40%);
}

[data-theme="light"] .page-hero__title,
html:not([data-theme="dark"]) .page-hero__title {
    color: var(--color-navy);
}

[data-theme="light"] .page-hero__desc,
html:not([data-theme="dark"]) .page-hero__desc {
    color: var(--color-gray-500);
}

[data-theme="light"] .page-hero .badge--filled,
html:not([data-theme="dark"]) .page-hero .badge--filled {
    background: rgba(var(--color-primary-rgb), 0.1);
    color: var(--color-primary-dark);
}

/* Product hero light mode */
[data-theme="light"] .product-hero--authyo,
html:not([data-theme="dark"]) .product-hero--authyo {
    background: linear-gradient(160deg, #eef0ff 0%, #e8ecff 40%, #f0f2ff 100%);
}

[data-theme="light"] .product-hero--jalpi,
html:not([data-theme="dark"]) .product-hero--jalpi {
    background: linear-gradient(160deg, #eef0f8 0%, #e8ecf5 40%, #f0f2ff 100%);
}

[data-theme="light"] .product-hero--emailidea,
html:not([data-theme="dark"]) .product-hero--emailidea {
    background: linear-gradient(160deg, #fff5f3 0%, #ffeee8 40%, #fff8f5 100%);
}

[data-theme="light"] .product-hero--smsidea,
html:not([data-theme="dark"]) .product-hero--smsidea {
    background: linear-gradient(160deg, #f5f0ff 0%, #ede8ff 40%, #f8f5ff 100%);
}

[data-theme="light"] .product-hero__logo,
html:not([data-theme="dark"]) .product-hero__logo {
    filter: none;
}

[data-theme="light"] .product-hero .hero__actions .btn--white,
html:not([data-theme="dark"]) .product-hero .hero__actions .btn--white {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

[data-theme="light"] .product-hero .hero__actions .btn--ghost,
html:not([data-theme="dark"]) .product-hero .hero__actions .btn--ghost {
    background: transparent;
    color: var(--color-navy);
    border-color: var(--color-gray-300);
}

[data-theme="light"] .product-hero .badge--filled,
html:not([data-theme="dark"]) .product-hero .badge--filled {
    background: rgba(var(--color-primary-rgb), 0.1) !important;
    color: var(--color-primary-dark) !important;
    border-color: rgba(var(--color-primary-rgb), 0.2) !important;
}

/* Stats / Badges */
[data-theme="dark"] .badge {
    background: rgba(var(--color-primary-rgb), 0.2);
    color: var(--color-primary-light);
    border: 1px solid rgba(var(--color-primary-rgb), 0.3);
}

[data-theme="dark"] .badge--filled {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* Product page use-case badges in dark mode */
[data-theme="dark"] .product-page .badge {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .product-page .badge:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Scroll to top */
[data-theme="dark"] .scroll-top__icon {
    background: var(--theme-bg-elevated);
    color: var(--color-primary-light);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

[data-theme="dark"] .scroll-top__track {
    stroke: rgba(255,255,255,0.08);
}

/* Contact form wrapper */
[data-theme="dark"] .contact-form-cf7,
[data-theme="dark"] .career-form-wrap {
    background: var(--theme-bg-card);
    border-color: var(--theme-border);
}

/* Contact info card */
[data-theme="dark"] .contact-info__card,
[data-theme="dark"] .contact-info__help {
    background: var(--theme-bg-card);
    border-color: var(--theme-border);
}

/* Map card */
[data-theme="dark"] .map-card {
    background: var(--theme-bg-card);
    border-color: var(--theme-border);
}

/* Trust section logos handled in components.css */

/* No positions card */
[data-theme="dark"] .no-positions__card {
    background: var(--theme-bg-card);
    border-color: var(--theme-border);
}

/* Industry chips */
[data-theme="dark"] .ind-chip {
    background: var(--theme-bg-card);
    border-color: var(--theme-border);
    color: var(--theme-text);
}

/* Product showcase cards - comprehensive dark mode */
[data-theme="dark"] .pcard {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .pcard:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.14);
}

[data-theme="dark"] .pcard__icon,
[data-theme="dark"] .pcard:hover .pcard__icon {
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-md);
    padding: 8px;
}

[data-theme="dark"] .pcard__logo {
    filter: none;
    opacity: 1;
}

[data-theme="dark"] .pcard__tag {
    color: rgba(255,255,255,0.5);
}

[data-theme="dark"] .pcard__name {
    color: #fff;
}

[data-theme="dark"] .pcard__desc {
    color: rgba(255,255,255,0.5);
}

[data-theme="dark"] .pcard__footer {
    border-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .pcard__stat-value {
    opacity: 0.9;
}

[data-theme="dark"] .pcard__stat-label {
    color: rgba(255,255,255,0.35);
}

[data-theme="dark"] .pcard__features span {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}

[data-theme="dark"] .pcard:hover .pcard__features span {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.8);
}

[data-theme="dark"] .pcard__arrow {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.4);
}

[data-theme="dark"] .pcard:hover .pcard__arrow {
    color: #fff;
}

/* Service cards */
[data-theme="dark"] .svc-card {
    background: var(--theme-bg-card);
    border-color: var(--theme-border);
}

[data-theme="dark"] .svc-card h4 {
    color: var(--theme-text-heading);
}

[data-theme="dark"] .svc-card p {
    color: var(--theme-text-muted);
}

/* Process steps */
[data-theme="dark"] .process-step h3 {
    color: var(--theme-text-heading);
}

[data-theme="dark"] .process-step p {
    color: var(--theme-text-muted);
}

/* About page */
[data-theme="dark"] .about-stat-card {
    background: var(--theme-bg-card);
    border-color: var(--theme-border);
}

[data-theme="dark"] .about-stat-card span {
    color: var(--theme-text-muted);
}

[data-theme="dark"] .mission-card {
    background: rgba(var(--color-primary-rgb), 0.06);
    border-color: rgba(var(--color-primary-rgb), 0.12);
}

/* Products page rows */
[data-theme="dark"] .product-row__tagline {
    color: var(--color-primary-light);
}

[data-theme="dark"] .product-row__desc {
    color: var(--theme-text-muted);
}

/* Infrastructure gallery */
[data-theme="dark"] .office-gallery__item {
    border: 1px solid var(--theme-border);
}

[data-theme="dark"] .infra-stats {
    background: var(--theme-bg-card);
    border-color: var(--theme-border);
}

/* Position card (career) */
[data-theme="dark"] .position-card {
    background: var(--theme-bg-card);
    border-color: var(--theme-border);
}

/* Hero stats bar */
[data-theme="dark"] .hero__stats {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.07);
}

/* Why section already dark - keep as is */
/* Hero section already dark - keep as is */
/* CTA gradient section - keep as is */
/* Journey/road section already dark - keep as is */

/* ===== DARK MODE - CRITICAL FIXES ===== */

/* 1. Glass card */
[data-theme="dark"] .card--glass {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

/* 2. Text selection */
[data-theme="dark"] ::selection {
    color: #fff;
    background-color: rgba(var(--color-primary-rgb), 0.3);
}

/* 3. Hamburger X icon when menu open */
[data-theme="dark"] body.menu-open .hamburger__line:nth-child(1),
[data-theme="dark"] body.menu-open .hamburger__line:nth-child(3) {
    background: var(--theme-text-heading) !important;
}

/* 4. CF7 form inputs (contact page fallback selectors) */
[data-theme="dark"] .contact-form-cf7 .wpcf7-form input[type="text"],
[data-theme="dark"] .contact-form-cf7 .wpcf7-form input[type="email"],
[data-theme="dark"] .contact-form-cf7 .wpcf7-form input[type="tel"],
[data-theme="dark"] .contact-form-cf7 .wpcf7-form input[type="url"],
[data-theme="dark"] .contact-form-cf7 .wpcf7-form select,
[data-theme="dark"] .contact-form-cf7 .wpcf7-form textarea {
    color: var(--theme-text-heading);
    background: var(--theme-input-bg);
    border-color: var(--theme-input-border);
}

/* 5. CF7 form inputs (career page fallback selectors) */
[data-theme="dark"] .cf7-shortcode-placeholder .wpcf7-form input[type="text"],
[data-theme="dark"] .cf7-shortcode-placeholder .wpcf7-form input[type="email"],
[data-theme="dark"] .cf7-shortcode-placeholder .wpcf7-form input[type="tel"],
[data-theme="dark"] .cf7-shortcode-placeholder .wpcf7-form input[type="url"],
[data-theme="dark"] .cf7-shortcode-placeholder .wpcf7-form input[type="file"],
[data-theme="dark"] .cf7-shortcode-placeholder .wpcf7-form select,
[data-theme="dark"] .cf7-shortcode-placeholder .wpcf7-form textarea {
    color: var(--theme-text-heading);
    background: var(--theme-input-bg);
    border-color: var(--theme-input-border);
}

/* 6. CF7 submit buttons in dark */
[data-theme="dark"] .contact-form-cf7 .wpcf7-form input[type="submit"],
[data-theme="dark"] .cf7-shortcode-placeholder .wpcf7-form input[type="submit"],
[data-theme="dark"] .contact-form-cf7 .wpcf7-form button,
[data-theme="dark"] .cf7-shortcode-placeholder .wpcf7-form button {
    background: var(--color-primary);
    color: #fff;
}

/* 7. Select dropdown arrow SVG in dark */
[data-theme="dark"] .form-select,
[data-theme="dark"] .kw-form__field select,
[data-theme="dark"] .contact-form-cf7 .wpcf7-form select,
[data-theme="dark"] .cf7-shortcode-placeholder .wpcf7-form select {
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23CBD5E1' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* 8. Device mockup URL bar */
[data-theme="dark"] .device-mockup--browser .device-mockup__url {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--theme-text-muted);
}

/* 9. Phone mockup bezel */
[data-theme="dark"] .device-mockup--phone {
    border-color: #2A3555;
    background: #2A3555;
}

[data-theme="dark"] .device-mockup--phone .device-mockup__notch {
    background: #2A3555;
}

/* 10. Card hover shadows on dark */
[data-theme="dark"] .pcard:hover {
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.5), 0 0 20px -5px color-mix(in srgb, var(--pcard-color) 15%, transparent);
}

[data-theme="dark"] .step__card:hover {
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 0 20px -5px color-mix(in srgb, var(--step-color) 15%, transparent);
}

[data-theme="dark"] .svc-card:hover {
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.5), 0 0 20px -5px color-mix(in srgb, var(--svc-color) 15%, transparent);
}

[data-theme="dark"] .why-light-card:hover {
    box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.4), 0 0 15px -5px color-mix(in srgb, var(--wc) 12%, transparent);
}

[data-theme="dark"] .about-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 11. Contact/career form wrapper shadows */
[data-theme="dark"] .contact-form-cf7,
[data-theme="dark"] .career-form-wrap,
[data-theme="dark"] .no-positions__card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 12. Mobile menu expand button */
[data-theme="dark"] .mobile-menu__expand {
    color: var(--theme-text-muted);
}

[data-theme="dark"] .mobile-menu__expand:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-primary-light);
}

/* 13. Mobile menu sub links */
[data-theme="dark"] .mobile-menu__sub li a {
    color: var(--theme-text-muted);
}

[data-theme="dark"] .mobile-menu__sub li a:hover {
    color: var(--color-primary-light);
}
