/* ArtxDev Premium White Theme — shared across every page */
:root {
  --premium-bg: #ffffff;
  --premium-bg-soft: #f7f8fc;
  --premium-surface: rgba(255,255,255,.92);
  --premium-surface-strong: #ffffff;
  --premium-border: rgba(15,23,42,.10);
  --premium-text: #0f172a;
  --premium-muted: #64748b;
  --premium-navy: #111827;
  --premium-indigo: #4f46e5;
  --premium-blue: #2563eb;
  --premium-cyan: #0891b2;
  --premium-gold: #b8862b;
  --premium-shadow: 0 20px 60px rgba(15,23,42,.08);
  --premium-shadow-lg: 0 28px 80px rgba(15,23,42,.12);
}

html { background: var(--premium-bg); }

body {
  background:
    radial-gradient(circle at 8% 0%, rgba(79,70,229,.055), transparent 30rem),
    radial-gradient(circle at 92% 7%, rgba(8,145,178,.045), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, #fbfcff 48%, #ffffff 100%) !important;
  color: var(--premium-text) !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .46;
  background-image:
    linear-gradient(rgba(15,23,42,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.018) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Premium glass header */
.header {
  background: rgba(255,255,255,.84) !important;
  border-bottom: 1px solid rgba(15,23,42,.08) !important;
  backdrop-filter: blur(22px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(150%) !important;
  box-shadow: 0 8px 30px rgba(15,23,42,.055) !important;
}
.header.scrolled {
  background: rgba(255,255,255,.96) !important;
  box-shadow: 0 12px 36px rgba(15,23,42,.075) !important;
}
.nav { max-width: 1240px !important; }

/* Brand */
.logo,
.premium-footer-brand,
.footer-logo-block {
  display: inline-flex !important;
  flex-direction: column;
  align-items: flex-start !important;
  justify-content: center;
  gap: 3px;
  text-decoration: none !important;
  text-align: left !important;
}

.logo-main,
.footer-logo-title,
.premium-footer-brand .logo-main {
  display: block;
  font-size: clamp(1.3rem, 2vw, 1.62rem) !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: -.55px !important;
  background: linear-gradient(100deg, #0f172a 0%, #334155 28%, #4f46e5 64%, #0891b2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}

.logo-sub,
.premium-footer-brand .logo-sub {
  display: block !important;
  margin-top: 3px;
  font-size: .58rem !important;
  line-height: 1.15 !important;
  font-weight: 700 !important;
  letter-spacing: .32px !important;
  text-transform: none;
  color: var(--premium-gold) !important;
  opacity: .95 !important;
  white-space: nowrap;
}
html[data-region="nepal"] .logo-sub {
  color: #0f766e !important;
}

/* Navigation */
.nav-links a {
  color: #334155 !important;
  border: 1px solid transparent !important;
  font-weight: 600 !important;
}
.nav-links a:hover,
.nav-links a.active {
  color: #111827 !important;
  background: #f5f7fb !important;
  border-color: rgba(15,23,42,.08) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.8) !important;
  text-shadow: none !important;
}
.nav-links a::before,
.nav-links a::after { opacity: 0 !important; box-shadow: none !important; }

/* Buttons */
.cta-button,
.btn-primary,
a.btn-primary,
button.btn-primary {
  background: linear-gradient(135deg, #111827 0%, #334155 54%, #4f46e5 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(15,23,42,.06) !important;
  box-shadow: 0 12px 28px rgba(15,23,42,.16) !important;
}
.cta-button:hover,
.btn-primary:hover,
a.btn-primary:hover,
button.btn-primary:hover {
  transform: translateY(-2px) !important;
  filter: brightness(1.06);
  box-shadow: 0 18px 38px rgba(15,23,42,.20) !important;
}
.btn-secondary,
a.btn-secondary,
button.btn-secondary {
  color: #1e293b !important;
  background: rgba(255,255,255,.86) !important;
  border: 1px solid rgba(15,23,42,.13) !important;
  box-shadow: 0 8px 22px rgba(15,23,42,.055) !important;
}

/* Hero areas */
.hero,
.page-hero {
  background:
    radial-gradient(circle at 16% 18%, rgba(79,70,229,.075), transparent 27rem),
    radial-gradient(circle at 84% 12%, rgba(8,145,178,.06), transparent 27rem),
    linear-gradient(145deg, #ffffff 0%, #f7f8fc 55%, #fbfbff 100%) !important;
  border-bottom: 1px solid rgba(15,23,42,.06);
}
.hero h1,
.page-hero h1,
.section-title {
  color: #0f172a !important;
}
.hero p,
.page-hero p,
.section-subtitle {
  color: #64748b !important;
}

/* Sections */
.section {
  border-color: rgba(15,23,42,.06) !important;
}
.section:nth-child(odd),
.section:nth-child(even) {
  color: var(--premium-text) !important;
}
.section:nth-child(odd) {
  background: rgba(255,255,255,.94) !important;
}
.section:nth-child(even) {
  background: #f8fafc !important;
}
.section h1, .section h2, .section h3, .section h4,
.section:nth-child(even) h1, .section:nth-child(even) h2,
.section:nth-child(even) h3, .section:nth-child(even) h4 {
  color: #0f172a !important;
}
.section p, .section li,
.section:nth-child(even) p, .section:nth-child(even) li {
  color: #64748b !important;
}

/* Premium white cards */
.service-card,
.value-card,
.team-card,
.stat-card,
.contact-card,
.additional-item,
.process-step,
.project-card,
.profile-card,
.story-visual,
.stats-section,
[class*="pricing-card"],
.card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.99), rgba(251,252,255,.97)) !important;
  border: 1px solid rgba(15,23,42,.085) !important;
  box-shadow: var(--premium-shadow) !important;
  color: #0f172a !important;
}
.service-card:hover,
.value-card:hover,
.team-card:hover,
.contact-card:hover,
.additional-item:hover,
.process-step:hover,
.project-card:hover {
  border-color: rgba(79,70,229,.22) !important;
  box-shadow: var(--premium-shadow-lg) !important;
}
.service-card.featured,
.service-card.new-badge {
  background:
    linear-gradient(150deg, rgba(255,255,255,1), rgba(246,247,255,.98)) !important;
  border-color: rgba(79,70,229,.25) !important;
}
.service-card::before,
.value-card::before,
[class*="pricing-card"]::before {
  background: linear-gradient(90deg, #111827, #4f46e5, #0891b2) !important;
}
.service-price,
.stat-number,
.highlight-text {
  color: #4f46e5 !important;
}
.service-features li,
.team-bio,
.story-text,
.stat-label,
.stat-description {
  color: #64748b !important;
}
.value-icon,
.service-icon {
  background: #f4f6fb !important;
  color: #334155 !important;
  border-color: rgba(15,23,42,.07) !important;
}

/* Forms */
input, select, textarea {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(15,23,42,.13) !important;
  box-shadow: 0 6px 18px rgba(15,23,42,.035) !important;
}
input::placeholder,
textarea::placeholder { color: #94a3b8 !important; }
input:focus, select:focus, textarea:focus {
  border-color: rgba(79,70,229,.48) !important;
  box-shadow: 0 0 0 4px rgba(79,70,229,.08) !important;
}
label { color: #334155 !important; }

/* Tables, policy pages, utility content */
table {
  background: #fff !important;
  color: #334155 !important;
  border-color: rgba(15,23,42,.09) !important;
}
th {
  background: #f8fafc !important;
  color: #0f172a !important;
}
td, th { border-color: rgba(15,23,42,.08) !important; }
blockquote,
.notice,
.info-box,
.policy-section {
  background: #ffffff !important;
  color: #475569 !important;
  border-color: rgba(15,23,42,.09) !important;
}

/* Footer stays light and elegant */
.footer {
  background:
    radial-gradient(circle at 8% 0%, rgba(79,70,229,.04), transparent 22rem),
    linear-gradient(180deg, #f8fafc 0%, #f4f6fa 100%) !important;
  color: #334155 !important;
  border-top: 1px solid rgba(15,23,42,.085) !important;
}
.footer-section h3 { color: #0f172a !important; }
.footer-section p,
.footer-section li,
.footer-section a,
.footer-bottom {
  color: #64748b !important;
}
.footer-section a:hover { color: #4f46e5 !important; }
.footer-bottom { border-top-color: rgba(15,23,42,.08) !important; }

/* Region selector */
.artx-region-switcher {
  position: fixed;
  top: 88px;
  right: 18px;
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 14px 38px rgba(15,23,42,.10);
}
.artx-region-switcher button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 7px 11px;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: .76rem;
  font-weight: 750;
  cursor: pointer;
  transition: .22s ease;
}
.artx-region-switcher button:hover {
  color: #0f172a;
  background: #f6f7fb;
}
.artx-region-switcher button.active {
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #4f46e5);
  box-shadow: 0 6px 16px rgba(79,70,229,.16);
}
.artx-region-switcher .region-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
  background: currentColor;
}

/* Reduce dark leftovers from page-level CSS */
body,
main,
.page-content,
.content-wrapper {
  color: #0f172a !important;
}
a { text-decoration-color: rgba(79,70,229,.35); }
::selection {
  background: rgba(79,70,229,.16);
  color: #0f172a;
}

@media (max-width: 900px) {
  .artx-region-switcher { top: 76px; right: 10px; }
  .logo-sub { font-size: .50rem !important; letter-spacing: .18px !important; }
  .nav { padding-left: 16px !important; padding-right: 16px !important; }
  .nav-links {
    background: rgba(255,255,255,.98) !important;
    border-top: 1px solid rgba(15,23,42,.07) !important;
    box-shadow: 0 18px 34px rgba(15,23,42,.10) !important;
  }
  .nav-links a { color: #334155 !important; }
  .mobile-toggle {
    color: #0f172a !important;
    border-color: rgba(15,23,42,.12) !important;
  }
}

@media (max-width: 520px) {
  .artx-region-switcher {
    top: 72px;
    right: 8px;
    transform: scale(.94);
    transform-origin: top right;
  }
  .logo-main { font-size: 1.28rem !important; }
  .logo-sub {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}


/* =========================================================
   ArtxDev Functional Light / Dark Theme
   ========================================================= */

html {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

/* Small top theme toggle */
.artx-theme-switcher {
  position: fixed;
  top: 88px;
  right: 160px;
  z-index: 1201;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 12px 34px rgba(15,23,42,.09);
}

.artx-theme-switcher button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  width: 32px;
  height: 30px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  background: transparent;
  color: #64748b;
  transition: background .2s ease, color .2s ease, transform .2s ease;
  font-size: .88rem;
  line-height: 1;
}

.artx-theme-switcher button:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.artx-theme-switcher button.active {
  color: #fff;
  background: linear-gradient(135deg, #111827, #4f46e5);
  box-shadow: 0 5px 14px rgba(79,70,229,.18);
}

.artx-theme-switcher button:active {
  transform: scale(.95);
}

/* ---------- LIGHT THEME: stronger readable contrast ---------- */
html:not([data-theme="dark"]) body,
html[data-theme="light"] body {
  background:
    radial-gradient(circle at 8% 0%, rgba(79,70,229,.055), transparent 30rem),
    radial-gradient(circle at 92% 7%, rgba(8,145,178,.045), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, #fbfcff 48%, #ffffff 100%) !important;
  color: #0f172a !important;
}

html:not([data-theme="dark"]) body *,
html[data-theme="light"] body * {
  text-shadow: none;
}

html:not([data-theme="dark"]) .header,
html[data-theme="light"] .header {
  background: rgba(255,255,255,.90) !important;
  border-bottom-color: rgba(15,23,42,.09) !important;
}

html:not([data-theme="dark"]) .hero,
html:not([data-theme="dark"]) .page-hero,
html[data-theme="light"] .hero,
html[data-theme="light"] .page-hero {
  background:
    radial-gradient(circle at 16% 18%, rgba(79,70,229,.075), transparent 27rem),
    radial-gradient(circle at 84% 12%, rgba(8,145,178,.06), transparent 27rem),
    linear-gradient(145deg, #ffffff 0%, #f7f8fc 55%, #fbfbff 100%) !important;
}

/* Explicit readable text hierarchy */
html:not([data-theme="dark"]) h1,
html:not([data-theme="dark"]) h2,
html:not([data-theme="dark"]) h3,
html:not([data-theme="dark"]) h4,
html:not([data-theme="dark"]) h5,
html:not([data-theme="dark"]) h6,
html:not([data-theme="dark"]) .page-hero h1,
html:not([data-theme="dark"]) .hero h1,
html:not([data-theme="dark"]) .section-title,
html:not([data-theme="dark"]) .team-name,
html:not([data-theme="dark"]) .service-card h3,
html:not([data-theme="dark"]) .value-card h3,
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] h5,
html[data-theme="light"] h6 {
  color: #0f172a !important;
}

html:not([data-theme="dark"]) p,
html:not([data-theme="dark"]) li,
html:not([data-theme="dark"]) .hero p,
html:not([data-theme="dark"]) .page-hero p,
html:not([data-theme="dark"]) .section-subtitle,
html:not([data-theme="dark"]) .team-bio,
html:not([data-theme="dark"]) .story-text,
html:not([data-theme="dark"]) .service-features li,
html:not([data-theme="dark"]) .stat-label,
html:not([data-theme="dark"]) .stat-description,
html:not([data-theme="dark"]) .footer-section p,
html:not([data-theme="dark"]) .footer-section li,
html[data-theme="light"] p,
html[data-theme="light"] li {
  color: #475569 !important;
}

html:not([data-theme="dark"]) strong,
html:not([data-theme="dark"]) b,
html[data-theme="light"] strong,
html[data-theme="light"] b {
  color: #1e293b !important;
}

html:not([data-theme="dark"]) .nav-links a,
html[data-theme="light"] .nav-links a {
  color: #334155 !important;
}

html:not([data-theme="dark"]) .footer-section a,
html[data-theme="light"] .footer-section a {
  color: #526175 !important;
}

html:not([data-theme="dark"]) .service-card,
html:not([data-theme="dark"]) .value-card,
html:not([data-theme="dark"]) .team-card,
html:not([data-theme="dark"]) .stat-card,
html:not([data-theme="dark"]) .contact-card,
html:not([data-theme="dark"]) .additional-item,
html:not([data-theme="dark"]) .process-step,
html:not([data-theme="dark"]) .project-card,
html:not([data-theme="dark"]) .profile-card,
html:not([data-theme="dark"]) .story-visual,
html:not([data-theme="dark"]) .stats-section,
html:not([data-theme="dark"]) [class*="pricing-card"],
html:not([data-theme="dark"]) .card,
html[data-theme="light"] .service-card,
html[data-theme="light"] .value-card,
html[data-theme="light"] .team-card,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .contact-card,
html[data-theme="light"] .additional-item,
html[data-theme="light"] .process-step,
html[data-theme="light"] .project-card,
html[data-theme="light"] .profile-card,
html[data-theme="light"] .story-visual,
html[data-theme="light"] .stats-section,
html[data-theme="light"] [class*="pricing-card"],
html[data-theme="light"] .card {
  background: linear-gradient(180deg, #ffffff, #fbfcff) !important;
  color: #0f172a !important;
}

/* ---------- DARK THEME ---------- */
html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 10% 0%, rgba(79,70,229,.16), transparent 32rem),
    radial-gradient(circle at 92% 8%, rgba(8,145,178,.10), transparent 30rem),
    linear-gradient(180deg, #070b14 0%, #0b1020 48%, #070b14 100%) !important;
  color: #e5edf8 !important;
}

html[data-theme="dark"] body::before {
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  opacity: .45;
}

html[data-theme="dark"] .header {
  background: rgba(7,11,20,.82) !important;
  border-bottom-color: rgba(255,255,255,.08) !important;
  box-shadow: 0 10px 34px rgba(0,0,0,.26) !important;
}

html[data-theme="dark"] .header.scrolled {
  background: rgba(7,11,20,.95) !important;
}

html[data-theme="dark"] .logo-main,
html[data-theme="dark"] .footer-logo-title,
html[data-theme="dark"] .premium-footer-brand .logo-main {
  background: linear-gradient(100deg, #ffffff 0%, #cbd5e1 28%, #a5b4fc 64%, #67e8f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}

html[data-theme="dark"] .logo-sub {
  color: #f6c85f !important;
}

html[data-theme="dark"][data-region="nepal"] .logo-sub {
  color: #5eead4 !important;
}

html[data-theme="dark"] .nav-links a {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .nav-links a:hover,
html[data-theme="dark"] .nav-links a.active {
  color: #ffffff !important;
  background: rgba(255,255,255,.07) !important;
  border-color: rgba(255,255,255,.09) !important;
}

html[data-theme="dark"] .hero,
html[data-theme="dark"] .page-hero {
  background:
    radial-gradient(circle at 16% 18%, rgba(99,102,241,.20), transparent 28rem),
    radial-gradient(circle at 84% 12%, rgba(6,182,212,.11), transparent 27rem),
    linear-gradient(145deg, #080d18 0%, #0c1325 56%, #0a0f1d 100%) !important;
  border-bottom-color: rgba(255,255,255,.07) !important;
}

html[data-theme="dark"] .section:nth-child(odd) {
  background: #080d18 !important;
}
html[data-theme="dark"] .section:nth-child(even) {
  background: #0b1120 !important;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] .page-hero h1,
html[data-theme="dark"] .hero h1,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .team-name,
html[data-theme="dark"] .service-card h3,
html[data-theme="dark"] .value-card h3 {
  color: #f8fafc !important;
}

html[data-theme="dark"] p,
html[data-theme="dark"] li,
html[data-theme="dark"] .hero p,
html[data-theme="dark"] .page-hero p,
html[data-theme="dark"] .section-subtitle,
html[data-theme="dark"] .team-bio,
html[data-theme="dark"] .story-text,
html[data-theme="dark"] .service-features li,
html[data-theme="dark"] .stat-label,
html[data-theme="dark"] .stat-description,
html[data-theme="dark"] .footer-section p,
html[data-theme="dark"] .footer-section li {
  color: #aebbd0 !important;
}

html[data-theme="dark"] strong,
html[data-theme="dark"] b {
  color: #e8eef8 !important;
}

html[data-theme="dark"] .service-card,
html[data-theme="dark"] .value-card,
html[data-theme="dark"] .team-card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .contact-card,
html[data-theme="dark"] .additional-item,
html[data-theme="dark"] .process-step,
html[data-theme="dark"] .project-card,
html[data-theme="dark"] .profile-card,
html[data-theme="dark"] .story-visual,
html[data-theme="dark"] .stats-section,
html[data-theme="dark"] [class*="pricing-card"],
html[data-theme="dark"] .card {
  background:
    linear-gradient(180deg, rgba(17,24,39,.94), rgba(12,18,32,.96)) !important;
  color: #e5edf8 !important;
  border-color: rgba(255,255,255,.085) !important;
  box-shadow: 0 24px 64px rgba(0,0,0,.22) !important;
}

html[data-theme="dark"] .service-card:hover,
html[data-theme="dark"] .value-card:hover,
html[data-theme="dark"] .team-card:hover,
html[data-theme="dark"] .contact-card:hover,
html[data-theme="dark"] .additional-item:hover,
html[data-theme="dark"] .process-step:hover,
html[data-theme="dark"] .project-card:hover {
  border-color: rgba(129,140,248,.30) !important;
  box-shadow: 0 30px 80px rgba(0,0,0,.32) !important;
}

html[data-theme="dark"] .value-icon,
html[data-theme="dark"] .service-icon {
  background: rgba(255,255,255,.06) !important;
  color: #dbeafe !important;
  border-color: rgba(255,255,255,.08) !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: rgba(15,23,42,.88) !important;
  color: #eef4ff !important;
  border-color: rgba(255,255,255,.12) !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #7f8da3 !important;
}

html[data-theme="dark"] label {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] table {
  background: #0c1322 !important;
  color: #d8e1ee !important;
  border-color: rgba(255,255,255,.09) !important;
}

html[data-theme="dark"] th {
  background: #111827 !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] td,
html[data-theme="dark"] th {
  border-color: rgba(255,255,255,.08) !important;
}

html[data-theme="dark"] blockquote,
html[data-theme="dark"] .notice,
html[data-theme="dark"] .info-box,
html[data-theme="dark"] .policy-section {
  background: #0f172a !important;
  color: #b7c4d6 !important;
  border-color: rgba(255,255,255,.09) !important;
}

html[data-theme="dark"] .footer {
  background:
    radial-gradient(circle at 8% 0%, rgba(79,70,229,.10), transparent 22rem),
    linear-gradient(180deg, #090f1b 0%, #070b14 100%) !important;
  color: #cbd5e1 !important;
  border-top-color: rgba(255,255,255,.08) !important;
}

html[data-theme="dark"] .footer-section h3 {
  color: #f8fafc !important;
}

html[data-theme="dark"] .footer-section a,
html[data-theme="dark"] .footer-bottom {
  color: #9eacc0 !important;
}

html[data-theme="dark"] .footer-section a:hover {
  color: #c7d2fe !important;
}

html[data-theme="dark"] .artx-region-switcher,
html[data-theme="dark"] .artx-theme-switcher {
  background: rgba(10,15,27,.92);
  border-color: rgba(255,255,255,.09);
  box-shadow: 0 14px 38px rgba(0,0,0,.28);
}

html[data-theme="dark"] .artx-region-switcher button,
html[data-theme="dark"] .artx-theme-switcher button {
  color: #94a3b8;
}

html[data-theme="dark"] .artx-region-switcher button:hover,
html[data-theme="dark"] .artx-theme-switcher button:hover {
  color: #ffffff;
  background: rgba(255,255,255,.06);
}

html[data-theme="dark"] .artx-region-switcher button.active,
html[data-theme="dark"] .artx-theme-switcher button.active {
  color: #ffffff;
  background: linear-gradient(135deg, #334155, #4f46e5);
}

/* Preserve white text inside dark CTA buttons in either theme */
html:not([data-theme="dark"]) .cta-button,
html:not([data-theme="dark"]) .btn-primary,
html:not([data-theme="dark"]) a.btn-primary,
html:not([data-theme="dark"]) button.btn-primary,
html[data-theme="light"] .cta-button,
html[data-theme="light"] .btn-primary,
html[data-theme="light"] a.btn-primary,
html[data-theme="light"] button.btn-primary,
html[data-theme="dark"] .cta-button,
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] a.btn-primary,
html[data-theme="dark"] button.btn-primary {
  color: #ffffff !important;
}

/* Mobile positioning: keep both controls small */
@media (max-width: 900px) {
  .artx-theme-switcher {
    top: 76px;
    right: 145px;
  }

  html[data-theme="dark"] .nav-links {
    background: rgba(7,11,20,.98) !important;
    border-top-color: rgba(255,255,255,.07) !important;
    box-shadow: 0 18px 34px rgba(0,0,0,.28) !important;
  }

  html[data-theme="dark"] .mobile-toggle {
    color: #f8fafc !important;
    border-color: rgba(255,255,255,.14) !important;
  }
}

@media (max-width: 520px) {
  .artx-theme-switcher {
    top: 72px;
    right: 132px;
    transform: scale(.90);
    transform-origin: top right;
  }
}

/* On very narrow phones, stack the small controls without covering the nav */
@media (max-width: 390px) {
  .artx-theme-switcher {
    right: 112px;
  }
  .artx-region-switcher {
    transform: scale(.86);
  }
}


/* =========================================================
   LIGHT MODE — HIGH CONTRAST TEXT FIX
   ========================================================= */
html[data-theme="light"] body {
  color: #111827 !important;
}

/* Main headings */
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] h5,
html[data-theme="light"] h6,
html[data-theme="light"] .section-title,
html[data-theme="light"] .team-name,
html[data-theme="light"] .service-card h3,
html[data-theme="light"] .value-card h3,
html[data-theme="light"] .contact-card h3,
html[data-theme="light"] .project-card h3,
html[data-theme="light"] .footer-section h3 {
  color: #0b1220 !important;
}

/* Standard readable text */
html[data-theme="light"] p,
html[data-theme="light"] li,
html[data-theme="light"] label,
html[data-theme="light"] .section-subtitle,
html[data-theme="light"] .team-bio,
html[data-theme="light"] .story-text,
html[data-theme="light"] .service-features li,
html[data-theme="light"] .stat-label,
html[data-theme="light"] .stat-description,
html[data-theme="light"] .footer-section p,
html[data-theme="light"] .footer-section li,
html[data-theme="light"] .footer-bottom,
html[data-theme="light"] .timeline-event,
html[data-theme="light"] .team-role,
html[data-theme="light"] .team-contact,
html[data-theme="light"] .service-card p,
html[data-theme="light"] .value-card p,
html[data-theme="light"] .contact-card p,
html[data-theme="light"] .project-card p,
html[data-theme="light"] .additional-item p,
html[data-theme="light"] .process-step p,
html[data-theme="light"] .policy-section p,
html[data-theme="light"] .info-box p,
html[data-theme="light"] .notice p {
  color: #334155 !important;
}

/* Very small / muted copy should still remain readable */
html[data-theme="light"] small,
html[data-theme="light"] .muted,
html[data-theme="light"] .text-muted,
html[data-theme="light"] .caption,
html[data-theme="light"] .helper-text,
html[data-theme="light"] .service-description,
html[data-theme="light"] .stat-description {
  color: #475569 !important;
}

/* Strong emphasis */
html[data-theme="light"] strong,
html[data-theme="light"] b {
  color: #111827 !important;
}

/* Normal links */
html[data-theme="light"] main a:not(.btn-primary):not(.btn-secondary):not(.cta-button),
html[data-theme="light"] .section a:not(.btn-primary):not(.btn-secondary):not(.cta-button),
html[data-theme="light"] .footer a {
  color: #3730a3 !important;
}

html[data-theme="light"] main a:not(.btn-primary):not(.btn-secondary):not(.cta-button):hover,
html[data-theme="light"] .section a:not(.btn-primary):not(.btn-secondary):not(.cta-button):hover,
html[data-theme="light"] .footer a:hover {
  color: #312e81 !important;
}

/* Navigation stays dark and crisp */
html[data-theme="light"] .nav-links a {
  color: #1e293b !important;
}
html[data-theme="light"] .nav-links a:hover,
html[data-theme="light"] .nav-links a.active {
  color: #0f172a !important;
}

/* Hero text */
html[data-theme="light"] .hero p,
html[data-theme="light"] .page-hero p {
  color: #334155 !important;
}

/* Cards */
html[data-theme="light"] .service-card,
html[data-theme="light"] .value-card,
html[data-theme="light"] .team-card,
html[data-theme="light"] .contact-card,
html[data-theme="light"] .project-card,
html[data-theme="light"] .additional-item,
html[data-theme="light"] .process-step,
html[data-theme="light"] .story-visual,
html[data-theme="light"] .stats-section,
html[data-theme="light"] .card {
  color: #111827 !important;
}

/* Forms */
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  color: #111827 !important;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
  color: #64748b !important;
  opacity: 1 !important;
}

/* Footer contrast */
html[data-theme="light"] .footer-section h3 {
  color: #0f172a !important;
}
html[data-theme="light"] .footer-section p,
html[data-theme="light"] .footer-section li,
html[data-theme="light"] .footer-bottom {
  color: #475569 !important;
}

/* Keep primary buttons white-text */
html[data-theme="light"] .cta-button,
html[data-theme="light"] .btn-primary,
html[data-theme="light"] a.btn-primary,
html[data-theme="light"] button.btn-primary,
html[data-theme="light"] .mobile-cta {
  color: #ffffff !important;
}

/* Secondary buttons remain dark-text */
html[data-theme="light"] .btn-secondary,
html[data-theme="light"] a.btn-secondary,
html[data-theme="light"] button.btn-secondary {
  color: #1e293b !important;
}

/* Pricing and highlighted figures */
html[data-theme="light"] .service-price,
html[data-theme="light"] .stat-number,
html[data-theme="light"] .highlight-text {
  color: #4338ca !important;
}

/* Prevent old inline/page styles from making body copy white */
html[data-theme="light"] .section span:not(.logo-main):not(.logo-sub):not(.stat-number):not(.service-price):not(.skill-tag),
html[data-theme="light"] main span:not(.logo-main):not(.logo-sub):not(.stat-number):not(.service-price):not(.skill-tag) {
  color: inherit;
}


/* =========================================================
   FINAL THEME TEXT CONTRAST
   White mode = dark/black text
   Dark mode  = white/light text
   ========================================================= */

/* ---------- WHITE / LIGHT MODE ---------- */
html[data-theme="light"] body,
html[data-theme="light"] main,
html[data-theme="light"] section,
html[data-theme="light"] article,
html[data-theme="light"] .section,
html[data-theme="light"] .page-content,
html[data-theme="light"] .content-wrapper {
  color: #111111 !important;
}

html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] h5,
html[data-theme="light"] h6,
html[data-theme="light"] p,
html[data-theme="light"] li,
html[data-theme="light"] label,
html[data-theme="light"] strong,
html[data-theme="light"] b,
html[data-theme="light"] .section-title,
html[data-theme="light"] .section-subtitle,
html[data-theme="light"] .team-name,
html[data-theme="light"] .team-role,
html[data-theme="light"] .team-bio,
html[data-theme="light"] .story-text,
html[data-theme="light"] .timeline-event,
html[data-theme="light"] .service-card h3,
html[data-theme="light"] .service-card p,
html[data-theme="light"] .service-features li,
html[data-theme="light"] .value-card h3,
html[data-theme="light"] .value-card p,
html[data-theme="light"] .contact-card h3,
html[data-theme="light"] .contact-card p,
html[data-theme="light"] .project-card h3,
html[data-theme="light"] .project-card p,
html[data-theme="light"] .additional-item p,
html[data-theme="light"] .process-step p,
html[data-theme="light"] .stat-label,
html[data-theme="light"] .stat-description,
html[data-theme="light"] .footer-section h3,
html[data-theme="light"] .footer-section p,
html[data-theme="light"] .footer-section li,
html[data-theme="light"] .footer-bottom {
  color: #111111 !important;
}

/* Slightly softer secondary copy, still very readable */
html[data-theme="light"] small,
html[data-theme="light"] .muted,
html[data-theme="light"] .text-muted,
html[data-theme="light"] .caption,
html[data-theme="light"] .helper-text,
html[data-theme="light"] .service-description {
  color: #303030 !important;
}

/* Light mode links */
html[data-theme="light"] a:not(.btn-primary):not(.cta-button):not(.mobile-cta) {
  color: #1f2937 !important;
}
html[data-theme="light"] a:not(.btn-primary):not(.cta-button):not(.mobile-cta):hover {
  color: #4338ca !important;
}

/* ---------- DARK MODE ---------- */
html[data-theme="dark"] body,
html[data-theme="dark"] main,
html[data-theme="dark"] section,
html[data-theme="dark"] article,
html[data-theme="dark"] .section,
html[data-theme="dark"] .page-content,
html[data-theme="dark"] .content-wrapper {
  color: #ffffff !important;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] p,
html[data-theme="dark"] li,
html[data-theme="dark"] label,
html[data-theme="dark"] strong,
html[data-theme="dark"] b,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .section-subtitle,
html[data-theme="dark"] .team-name,
html[data-theme="dark"] .team-role,
html[data-theme="dark"] .team-bio,
html[data-theme="dark"] .story-text,
html[data-theme="dark"] .timeline-event,
html[data-theme="dark"] .service-card h3,
html[data-theme="dark"] .service-card p,
html[data-theme="dark"] .service-features li,
html[data-theme="dark"] .value-card h3,
html[data-theme="dark"] .value-card p,
html[data-theme="dark"] .contact-card h3,
html[data-theme="dark"] .contact-card p,
html[data-theme="dark"] .project-card h3,
html[data-theme="dark"] .project-card p,
html[data-theme="dark"] .additional-item p,
html[data-theme="dark"] .process-step p,
html[data-theme="dark"] .stat-label,
html[data-theme="dark"] .stat-description,
html[data-theme="dark"] .footer-section h3,
html[data-theme="dark"] .footer-section p,
html[data-theme="dark"] .footer-section li,
html[data-theme="dark"] .footer-bottom {
  color: #ffffff !important;
}

/* Slight hierarchy for secondary text in dark mode */
html[data-theme="dark"] small,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .caption,
html[data-theme="dark"] .helper-text,
html[data-theme="dark"] .service-description {
  color: #d1d5db !important;
}

/* Dark mode links */
html[data-theme="dark"] a:not(.btn-primary):not(.cta-button):not(.mobile-cta) {
  color: #f1f5f9 !important;
}
html[data-theme="dark"] a:not(.btn-primary):not(.cta-button):not(.mobile-cta):hover {
  color: #a5b4fc !important;
}

/* Buttons always retain proper contrast */
html[data-theme="light"] .btn-primary,
html[data-theme="light"] .cta-button,
html[data-theme="light"] .mobile-cta,
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .cta-button,
html[data-theme="dark"] .mobile-cta {
  color: #ffffff !important;
}

/* Form fields */
html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select {
  color: #111111 !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  color: #ffffff !important;
}

/* Keep logo gradients and highlighted numeric accents intact */
html[data-theme="light"] .logo-main,
html[data-theme="dark"] .logo-main,
html[data-theme="light"] .stat-number,
html[data-theme="dark"] .stat-number,
html[data-theme="light"] .service-price,
html[data-theme="dark"] .service-price,
html[data-theme="light"] .highlight-text,
html[data-theme="dark"] .highlight-text {
  /* existing premium styling wins */
}


/* =========================================================
   VISIBILITY + MOBILE CONTROL DOCK FIX
   ========================================================= */

/* In light mode, these components intentionally keep dark surfaces.
   Their content must therefore stay white instead of inheriting the
   site-wide dark text color. */
html[data-theme="light"] .page-header,
html[data-theme="light"] .page-header-content,
html[data-theme="light"] .page-header h1,
html[data-theme="light"] .page-header h2,
html[data-theme="light"] .page-header h3,
html[data-theme="light"] .page-header p,
html[data-theme="light"] .page-header span,
html[data-theme="light"] .contact-form-container,
html[data-theme="light"] .contact-form-container h1,
html[data-theme="light"] .contact-form-container h2,
html[data-theme="light"] .contact-form-container h3,
html[data-theme="light"] .contact-form-container p,
html[data-theme="light"] .contact-form-container label,
html[data-theme="light"] .office-hours,
html[data-theme="light"] .office-hours h1,
html[data-theme="light"] .office-hours h2,
html[data-theme="light"] .office-hours h3,
html[data-theme="light"] .office-hours p,
html[data-theme="light"] .office-hours li,
html[data-theme="light"] .section:nth-child(odd) .about-content,
html[data-theme="light"] .section:nth-child(odd) .about-content h1,
html[data-theme="light"] .section:nth-child(odd) .about-content h2,
html[data-theme="light"] .section:nth-child(odd) .about-content h3,
html[data-theme="light"] .section:nth-child(odd) .about-content p,
html[data-theme="light"] .section:nth-child(odd) .project-showcase,
html[data-theme="light"] .section:nth-child(odd) .project-showcase h1,
html[data-theme="light"] .section:nth-child(odd) .project-showcase h2,
html[data-theme="light"] .section:nth-child(odd) .project-showcase h3,
html[data-theme="light"] .section:nth-child(odd) .project-showcase p,
html[data-theme="light"] .project-preview,
html[data-theme="light"] .project-preview h1,
html[data-theme="light"] .project-preview h2,
html[data-theme="light"] .project-preview h3,
html[data-theme="light"] .project-preview h4,
html[data-theme="light"] .project-preview p,
html[data-theme="light"] .project-preview span {
  color: #ffffff !important;
}

/* Dark form surface in light mode: readable labels and controls. */
html[data-theme="light"] .contact-form-container .form-label,
html[data-theme="light"] .contact-form-container label {
  color: #f8fafc !important;
}
html[data-theme="light"] .contact-form-container .form-header p {
  color: #cbd5e1 !important;
}
html[data-theme="light"] .contact-form-container input,
html[data-theme="light"] .contact-form-container textarea,
html[data-theme="light"] .contact-form-container select {
  background: #ffffff !important;
  color: #111827 !important;
  border-color: rgba(255,255,255,.32) !important;
}
html[data-theme="light"] .contact-form-container input::placeholder,
html[data-theme="light"] .contact-form-container textarea::placeholder {
  color: #64748b !important;
}
html[data-theme="light"] .contact-form-container option {
  background: #ffffff !important;
  color: #111827 !important;
}

/* Keep white cards genuinely readable even when they sit inside a dark section. */
html[data-theme="light"] .contact-card,
html[data-theme="light"] .contact-card h1,
html[data-theme="light"] .contact-card h2,
html[data-theme="light"] .contact-card h3,
html[data-theme="light"] .contact-card p,
html[data-theme="light"] .contact-card li,
html[data-theme="light"] .contact-card a,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .stat-card p,
html[data-theme="light"] .stat-card .stat-label,
html[data-theme="light"] .team-card:not(.join-us),
html[data-theme="light"] .team-card:not(.join-us) h1,
html[data-theme="light"] .team-card:not(.join-us) h2,
html[data-theme="light"] .team-card:not(.join-us) h3,
html[data-theme="light"] .team-card:not(.join-us) p {
  color: #111827 !important;
}

/* More polished small buttons used on the team cards. */
html[data-theme="light"] .btn-small,
html[data-theme="dark"] .btn-small {
  background: linear-gradient(135deg, #111827, #4338ca) !important;
  color: #ffffff !important;
  border: 1px solid transparent !important;
}

/* The combined control dock owns positioning; individual switches no longer float. */
.artx-control-dock {
  position: fixed;
  top: 88px;
  right: 18px;
  z-index: 1300;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.95);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 14px 38px rgba(15,23,42,.10);
}

.artx-control-dock::after {
  content: "";
  width: 1px;
  height: 22px;
  background: rgba(15,23,42,.10);
  position: absolute;
  left: 76px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.artx-control-dock .artx-theme-switcher,
.artx-control-dock .artx-region-switcher {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.artx-control-dock .artx-theme-switcher {
  display: flex;
  gap: 2px;
  padding-right: 8px !important;
}

.artx-control-dock .artx-region-switcher {
  display: flex;
  gap: 2px;
  padding-left: 4px !important;
}

.artx-control-dock .artx-theme-switcher button {
  width: 31px;
  height: 30px;
}

.artx-control-dock .artx-region-switcher button {
  padding: 7px 10px;
  min-height: 30px;
  white-space: nowrap;
}

html[data-theme="dark"] .artx-control-dock {
  background: rgba(10,15,27,.94);
  border-color: rgba(255,255,255,.10);
  box-shadow: 0 14px 38px rgba(0,0,0,.30);
}
html[data-theme="dark"] .artx-control-dock::after {
  background: rgba(255,255,255,.12);
}

/* Mobile: one neat centered row beneath the navbar. */
@media (max-width: 900px) {
  .artx-control-dock {
    top: 78px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100vw - 20px);
    gap: 5px;
    padding: 5px 6px;
    box-shadow: 0 10px 28px rgba(15,23,42,.12);
  }

  .artx-control-dock::after {
    left: 75px;
  }

  .artx-control-dock .artx-theme-switcher,
  .artx-control-dock .artx-region-switcher {
    top: auto !important;
    right: auto !important;
    left: auto !important;
  }

  .artx-control-dock .artx-region-switcher button {
    font-size: .74rem;
    padding: 7px 9px;
  }

  /* Give hero/header content enough breathing room below the control row. */
  .page-header,
  .page-hero {
    padding-top: 10rem !important;
  }
}

@media (max-width: 520px) {
  .artx-control-dock {
    top: 76px;
    padding: 4px 5px;
    gap: 4px;
    max-width: calc(100vw - 16px);
  }

  .artx-control-dock .artx-theme-switcher button {
    width: 29px;
    height: 28px;
    font-size: .80rem;
  }

  .artx-control-dock .artx-theme-switcher {
    padding-right: 7px !important;
  }

  .artx-control-dock .artx-region-switcher {
    padding-left: 3px !important;
  }

  .artx-control-dock .artx-region-switcher button {
    min-height: 28px;
    padding: 6px 8px;
    font-size: .70rem;
  }

  .artx-control-dock::after {
    left: 70px;
    height: 20px;
  }
}

@media (max-width: 360px) {
  .artx-control-dock .region-dot {
    display: none;
  }
  .artx-control-dock .artx-region-switcher button {
    padding-inline: 7px;
  }
}

/* =========================================================
   CONTENT VISIBILITY SAFETY
   Prevent legacy parallax/reveal scripts from leaving content faint,
   translated, or effectively invisible after the new theme system.
   ========================================================= */
html[data-theme] .fade-in,
html[data-theme] .fade-in.visible,
html[data-theme] .dramatic-reveal,
html[data-theme] .smooth-parallax,
html[data-theme] .parallax-fade,
html[data-theme] .parallax-scale,
html[data-theme] .bouncy-text,
html[data-theme] .page-header-content,
html[data-theme] .page-header h1,
html[data-theme] .page-header p,
html[data-theme] .page-hero-content,
html[data-theme] .page-hero h1,
html[data-theme] .page-hero p,
html[data-theme] .section-title,
html[data-theme] .section-subtitle,
html[data-theme] .about-content,
html[data-theme] .stat-card,
html[data-theme] .team-card,
html[data-theme] .service-card,
html[data-theme] .project-showcase,
html[data-theme] .project-card,
html[data-theme] .contact-form-container,
html[data-theme] .contact-card,
html[data-theme] .office-hours,
html[data-theme] .faq-container,
html[data-theme] .faq-item,
html[data-theme] .additional-item,
html[data-theme] .process-step {
  opacity: 1 !important;
  filter: none !important;
}

/* Neutralize only the reveal/parallax movement on content blocks.
   Interactive hover effects still work because hover rules can style
   their own descendants/buttons. */
html[data-theme] .fade-in,
html[data-theme] .dramatic-reveal,
html[data-theme] .smooth-parallax,
html[data-theme] .parallax-fade,
html[data-theme] .parallax-scale,
html[data-theme] .bouncy-text,
html[data-theme] .page-header-content,
html[data-theme] .page-header h1,
html[data-theme] .page-header p,
html[data-theme] .page-hero-content,
html[data-theme] .page-hero h1,
html[data-theme] .page-hero p,
html[data-theme] .section-title,
html[data-theme] .section-subtitle {
  transform: none !important;
}

/* Keep the combined mobile control row clear of home-page hero copy. */
@media (max-width: 900px) {
  .hero {
    padding-top: 10rem !important;
  }
}

@media (max-width: 520px) {
  .hero {
    padding-top: 9.6rem !important;
  }
}


/* =========================================================
   FINAL DARK-SURFACE + MOBILE HEADER CONTROL FIX
   ========================================================= */

/* Contact FAQ container is intentionally dark even in Light Mode.
   Make ALL of its text and controls readable. */
html[data-theme="light"] .faq-section,
html[data-theme="light"] .faq-container {
  color: #ffffff !important;
}

html[data-theme="light"] .faq-header h1,
html[data-theme="light"] .faq-header h2,
html[data-theme="light"] .faq-header h3,
html[data-theme="light"] .faq-header p,
html[data-theme="light"] .faq-question,
html[data-theme="light"] .faq-question *,
html[data-theme="light"] .faq-answer,
html[data-theme="light"] .faq-answer *,
html[data-theme="light"] .faq-toggle {
  color: #ffffff !important;
}

html[data-theme="light"] .faq-answer {
  color: #e5e7eb !important;
}

html[data-theme="light"] .faq-item {
  border-color: rgba(255,255,255,.14) !important;
}

/* Any dark CTA block in Light Mode must use white text. */
html[data-theme="light"] .cta-section,
html[data-theme="light"] .cta-section *,
html[data-theme="light"] [class*="cta-section"],
html[data-theme="light"] [class*="cta-section"] * {
  color: #ffffff !important;
}

html[data-theme="light"] .cta-section p,
html[data-theme="light"] [class*="cta-section"] p {
  color: #e5e7eb !important;
}

/* Common final-call sections that use black backgrounds on some pages. */
html[data-theme="light"] .final-cta,
html[data-theme="light"] .final-cta *,
html[data-theme="light"] .project-cta,
html[data-theme="light"] .project-cta *,
html[data-theme="light"] .contact-cta,
html[data-theme="light"] .contact-cta *,
html[data-theme="light"] .ready-section,
html[data-theme="light"] .ready-section * {
  color: #ffffff !important;
}

/* Keep CTA button text correct. */
html[data-theme="light"] .cta-section .btn-primary,
html[data-theme="light"] .cta-section .cta-button,
html[data-theme="light"] .final-cta .btn-primary,
html[data-theme="light"] .project-cta .btn-primary,
html[data-theme="light"] .contact-cta .btn-primary {
  color: #ffffff !important;
}

/* ---------------- Mobile header controls ---------------- */
.artx-mobile-controls {
  display: none;
}

/* Desktop keeps the floating controls. */
@media (min-width: 901px) {
  .artx-theme-switcher,
  .artx-region-switcher {
    display: flex !important;
  }
}

/* Phone / tablet: controls live INSIDE the navbar beside the logo. */
@media (max-width: 900px) {
  .nav {
    display: grid !important;
    grid-template-columns: minmax(0, auto) 1fr auto !important;
    align-items: center !important;
    column-gap: 10px !important;
    padding: 12px 14px !important;
  }

  .nav > .logo {
    min-width: 0 !important;
    max-width: none !important;
    flex-shrink: 0 !important;
    justify-self: start !important;
    align-self: center !important;
  }

  .nav > .mobile-toggle {
    grid-column: 3 !important;
    justify-self: end !important;
    align-self: center !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    margin: 0 !important;
  }

  .artx-mobile-controls {
    grid-column: 2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 5px !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  /* Reset the old floating positioning completely. */
  .artx-mobile-controls .artx-theme-switcher,
  .artx-mobile-controls .artx-region-switcher {
    position: static !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    margin: 0 !important;
    z-index: auto !important;
    box-shadow: none !important;
    flex: 0 0 auto !important;
  }

  .artx-mobile-controls .artx-theme-switcher {
    padding: 3px !important;
    gap: 1px !important;
    border-radius: 999px !important;
  }

  .artx-mobile-controls .artx-theme-switcher button {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    padding: 0 !important;
    font-size: .76rem !important;
  }

  .artx-mobile-controls .artx-region-switcher {
    padding: 3px !important;
    gap: 1px !important;
    border-radius: 999px !important;
  }

  .artx-mobile-controls .artx-region-switcher button {
    padding: 6px 7px !important;
    min-width: auto !important;
    font-size: .67rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .artx-mobile-controls .region-dot {
    width: 5px !important;
    height: 5px !important;
    margin-right: 3px !important;
  }

  /* Logo remains prominent and subtitle stays readable. */
  .logo-main {
    font-size: 1.28rem !important;
    line-height: 1 !important;
  }

  .logo-sub {
    display: block !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    font-size: .49rem !important;
    line-height: 1.15 !important;
    letter-spacing: .12px !important;
    margin-top: 4px !important;
  }

  /* Mobile dropdown begins below the complete header. */
  .nav-links {
    grid-column: 1 / -1 !important;
  }

  /* No extra page spacing is needed anymore because controls are not floating. */
  .hero,
  .page-hero,
  .page-header {
    padding-top: revert-layer;
  }
}

/* Very narrow phones: preserve branding first, then compact controls further. */
@media (max-width: 430px) {
  .nav {
    grid-template-columns: minmax(122px, auto) 1fr 40px !important;
    column-gap: 5px !important;
    padding: 10px 9px !important;
  }

  .logo-main {
    font-size: 1.16rem !important;
  }

  .logo-sub {
    font-size: .42rem !important;
    letter-spacing: 0 !important;
  }

  .artx-mobile-controls {
    gap: 3px !important;
  }

  .artx-mobile-controls .artx-theme-switcher button {
    width: 23px !important;
    height: 23px !important;
    min-width: 23px !important;
    font-size: .68rem !important;
  }

  .artx-mobile-controls .artx-region-switcher button {
    padding: 5px 5px !important;
    font-size: .59rem !important;
  }

  .nav > .mobile-toggle {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
  }
}

@media (max-width: 360px) {
  .nav {
    grid-template-columns: minmax(112px, auto) 1fr 38px !important;
    padding-left: 7px !important;
    padding-right: 7px !important;
  }

  .logo-main {
    font-size: 1.08rem !important;
  }

  .logo-sub {
    font-size: .38rem !important;
  }

  .artx-mobile-controls .artx-region-switcher button {
    padding-left: 4px !important;
    padding-right: 4px !important;
    font-size: .55rem !important;
  }
}


/* =========================================================
   PREMIUM MOTION SYSTEM — LIGHT + DARK
   Restores reveal animations safely in both themes.
   ========================================================= */

/* Reveal animation is activated only when JS adds .artx-motion-ready,
   so content remains visible if JavaScript is unavailable. */
html.artx-motion-ready .fade-in.artx-reveal:not(.artx-inview) {
  opacity: 0 !important;
  transform: translateY(26px) scale(.985) !important;
  filter: blur(3px) !important;
}

html.artx-motion-ready .fade-in.artx-reveal.artx-inview {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
  filter: blur(0) !important;
  transition:
    opacity .72s cubic-bezier(.22,1,.36,1),
    transform .82s cubic-bezier(.22,1,.36,1),
    filter .65s ease !important;
  transition-delay: var(--artx-reveal-delay, 0ms) !important;
}

/* Make the main Team buttons consistent and readable in BOTH themes. */
html[data-theme] .team-card .btn-small,
html[data-theme] .team-card a.btn-small,
html[data-theme] .team-card .btn-small.white,
html[data-theme] .team-card a.btn-small.white {
  position: relative !important;
  overflow: hidden !important;
  isolation: isolate;
  min-width: 132px;
  padding: .72rem 1.35rem !important;
  border: 1px solid rgba(79,70,229,.22) !important;
  border-radius: 9px !important;
  background: linear-gradient(135deg, #172033 0%, #312e81 45%, #4f46e5 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  letter-spacing: .01em;
  box-shadow: 0 10px 24px rgba(49,46,129,.18) !important;
  transition:
    transform .28s cubic-bezier(.22,1,.36,1),
    box-shadow .28s ease,
    filter .28s ease !important;
}

html[data-theme="dark"] .team-card .btn-small,
html[data-theme="dark"] .team-card a.btn-small,
html[data-theme="dark"] .team-card .btn-small.white,
html[data-theme="dark"] .team-card a.btn-small.white {
  background: linear-gradient(135deg, #273449 0%, #4338ca 55%, #6366f1 100%) !important;
  border-color: rgba(165,180,252,.22) !important;
  color: #ffffff !important;
}

/* Shine passes across Learn More / Apply Now on hover. */
html[data-theme] .team-card .btn-small::after {
  content: '';
  position: absolute;
  z-index: -1;
  top: -35%;
  left: -45%;
  width: 34%;
  height: 170%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.34), transparent);
  transform: skewX(-20deg) translateX(-220%);
  transition: transform .65s cubic-bezier(.22,1,.36,1);
}

/* Join card gets a subtle premium distinction without breaking light mode. */
html[data-theme="light"] .team-card.join-us {
  background:
    radial-gradient(circle at 85% 12%, rgba(79,70,229,.07), transparent 12rem),
    linear-gradient(180deg, #ffffff 0%, #fafaff 100%) !important;
  color: #111827 !important;
  border-color: rgba(79,70,229,.14) !important;
}

html[data-theme="light"] .team-card.join-us .team-name,
html[data-theme="light"] .team-card.join-us .team-role,
html[data-theme="light"] .team-card.join-us .team-description {
  color: #111827 !important;
}

html[data-theme="light"] .team-card.join-us .team-description {
  color: #475569 !important;
}

html[data-theme="light"] .team-card.join-us .team-avatar {
  background: linear-gradient(145deg, #eef2ff, #f8fafc) !important;
  color: #4338ca !important;
  border: 1px solid rgba(79,70,229,.10) !important;
}

/* Smooth premium card and icon motion in both themes. */
.team-card,
.service-card,
.project-card,
.stat-card,
.contact-card,
.value-card,
.process-step,
.additional-item {
  will-change: transform;
}

.team-avatar,
.service-icon,
.value-icon {
  transition:
    transform .4s cubic-bezier(.22,1,.36,1),
    box-shadow .35s ease,
    background .35s ease,
    color .35s ease !important;
}

@media (hover: hover) and (pointer: fine) {
  html[data-theme] .team-card:hover {
    transform: translateY(-10px) scale(1.012) !important;
    box-shadow: 0 28px 65px rgba(15,23,42,.14) !important;
  }

  html[data-theme="dark"] .team-card:hover {
    box-shadow: 0 30px 72px rgba(0,0,0,.34) !important;
  }

  html[data-theme] .team-card:hover .team-avatar {
    transform: translateY(-5px) scale(1.07) rotate(1.5deg) !important;
  }

  html[data-theme] .team-card .btn-small:hover {
    color: #ffffff !important;
    transform: translateY(-3px) scale(1.025) !important;
    filter: brightness(1.08);
    box-shadow: 0 16px 32px rgba(49,46,129,.28) !important;
  }

  html[data-theme] .team-card .btn-small:hover::after {
    transform: skewX(-20deg) translateX(520%);
  }

  html[data-theme] .service-card:hover,
  html[data-theme] .project-card:hover,
  html[data-theme] .contact-card:hover,
  html[data-theme] .value-card:hover,
  html[data-theme] .process-step:hover,
  html[data-theme] .additional-item:hover {
    transform: translateY(-8px) scale(1.008) !important;
  }

  html[data-theme] .stat-card:hover .stat-number,
  html[data-theme] .stats-section:hover .stat-number {
    transform: translateY(-2px) scale(1.04);
  }
}

.stat-number {
  transition: transform .35s cubic-bezier(.22,1,.36,1), color .3s ease !important;
}

/* A little life in decorative shapes, without being distracting. */
.hero-shape,
.cta-shape {
  animation-play-state: running !important;
}

/* Keep motion tasteful and accessible. */
@media (prefers-reduced-motion: reduce) {
  html.artx-motion-ready .fade-in.artx-reveal,
  html.artx-motion-ready .fade-in.artx-reveal.artx-inview {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }

  .team-card,
  .service-card,
  .project-card,
  .stat-card,
  .contact-card,
  .value-card,
  .process-step,
  .additional-item,
  .team-avatar,
  .service-icon,
  .value-icon,
  .btn-small,
  .btn-small::after,
  .hero-shape,
  .cta-shape {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}


/* =========================================================
   REAL LOGO FAVICON + HEADER CONTROLS BESIDE LOGO
   ========================================================= */

/* Header layout: logo -> controls -> navigation -> CTA */
.nav {
  justify-content: flex-start !important;
  gap: 14px !important;
}

.nav > .logo {
  flex: 0 0 auto !important;
}

.artx-header-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 0;
}

.artx-header-controls .artx-theme-switcher,
.artx-header-controls .artx-region-switcher {
  position: static !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  margin: 0 !important;
  z-index: auto !important;
}

.artx-header-controls .artx-theme-switcher {
  display: inline-flex !important;
  padding: 4px !important;
  gap: 2px !important;
  border-radius: 999px !important;
  box-shadow: 0 7px 18px rgba(15,23,42,.07) !important;
}

.artx-header-controls .artx-theme-switcher button {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  font-size: .78rem !important;
}

.artx-header-controls .artx-region-switcher {
  display: inline-flex !important;
  padding: 4px !important;
  gap: 2px !important;
  border-radius: 999px !important;
  box-shadow: 0 7px 18px rgba(15,23,42,.07) !important;
}

.artx-header-controls .artx-region-switcher button {
  padding: 6px 9px !important;
  font-size: .70rem !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.artx-header-controls .region-dot {
  width: 5px !important;
  height: 5px !important;
  margin-right: 4px !important;
}

.nav-links {
  margin-left: auto !important;
}

/* Dark header controls stay premium and readable. */
html[data-theme="dark"] .artx-header-controls .artx-theme-switcher,
html[data-theme="dark"] .artx-header-controls .artx-region-switcher {
  box-shadow: 0 7px 18px rgba(0,0,0,.22) !important;
}

/* ---------------- PHONE / TABLET ---------------- */
@media (max-width: 900px) {
  .nav {
    display: grid !important;
    grid-template-columns: minmax(118px, auto) minmax(0, 1fr) 42px !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 10px 11px !important;
  }

  .nav > .logo {
    grid-column: 1 !important;
    min-width: 0 !important;
    max-width: none !important;
    justify-self: start !important;
    align-self: center !important;
    margin: 0 !important;
  }

  .artx-header-controls {
    grid-column: 2 !important;
    justify-self: end !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 3px !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .nav > .mobile-toggle {
    grid-column: 3 !important;
    justify-self: end !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: grid !important;
    place-items: center !important;
  }

  /* Keep the ArtxDev brand and Alatex line intact. */
  .logo-main {
    font-size: 1.18rem !important;
    line-height: 1 !important;
  }

  .logo-sub {
    display: block !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    font-size: .42rem !important;
    line-height: 1.1 !important;
    letter-spacing: 0 !important;
    margin-top: 4px !important;
  }

  /* Smaller controls, but still fully functional. */
  .artx-header-controls .artx-theme-switcher {
    padding: 2px !important;
    gap: 0 !important;
    box-shadow: none !important;
  }

  .artx-header-controls .artx-theme-switcher button {
    width: 23px !important;
    height: 23px !important;
    min-width: 23px !important;
    font-size: .66rem !important;
  }

  .artx-header-controls .artx-region-switcher {
    padding: 2px !important;
    gap: 0 !important;
    box-shadow: none !important;
  }

  .artx-header-controls .artx-region-switcher button {
    padding: 5px 5px !important;
    font-size: .57rem !important;
  }

  .artx-header-controls .region-dot {
    width: 4px !important;
    height: 4px !important;
    margin-right: 2px !important;
  }

  .nav-links {
    grid-column: 1 / -1 !important;
    margin-left: 0 !important;
  }
}

/* Smaller phones: shrink controls before touching the brand. */
@media (max-width: 430px) {
  .nav {
    grid-template-columns: minmax(112px, auto) minmax(0, 1fr) 38px !important;
    padding: 9px 8px !important;
    gap: 4px !important;
  }

  .logo-main {
    font-size: 1.08rem !important;
  }

  .logo-sub {
    font-size: .37rem !important;
  }

  .artx-header-controls {
    gap: 2px !important;
  }

  .artx-header-controls .artx-theme-switcher button {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    font-size: .58rem !important;
  }

  .artx-header-controls .artx-region-switcher button {
    padding: 4px 4px !important;
    font-size: .50rem !important;
  }

  .nav > .mobile-toggle {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
  }
}

@media (max-width: 360px) {
  .nav {
    grid-template-columns: minmax(103px, auto) minmax(0, 1fr) 34px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  .logo-main {
    font-size: 1rem !important;
  }

  .logo-sub {
    font-size: .34rem !important;
  }

  .artx-header-controls .artx-theme-switcher button {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    font-size: .52rem !important;
  }

  .artx-header-controls .artx-region-switcher button {
    padding: 3px 3px !important;
    font-size: .46rem !important;
  }

  .nav > .mobile-toggle {
    width: 33px !important;
    height: 33px !important;
    min-width: 33px !important;
  }
}


/* =========================================================
   MOBILE SCROLL STABILITY + CONTACT ORPHAN DOT FIX
   ========================================================= */
@media (max-width: 900px) {
  /* The only valid controls on mobile are the pair inside the navbar group.
     This prevents any stale/duplicate switcher from appearing as a lone dot. */
  body > .artx-theme-switcher,
  body > .artx-region-switcher,
  body > .artx-mobile-controls {
    display: none !important;
  }

  .header {
    transform: translateY(0) !important;
    will-change: auto !important;
  }

  .nav {
    transform: none !important;
  }

  .artx-header-controls {
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
  }

  /* Avoid GPU/parallax state getting stuck when scrolling back to the top. */
  body,
  .page-hero,
  .page-header,
  .contact-main,
  .section {
    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;
  }

  /* No decorative pseudo element should appear as an isolated dot
     in the Contact page header. */
  .page-header::before,
  .page-header::after {
    display: none !important;
    content: none !important;
  }
}

/* Make the SMS checkbox unmistakably a checkbox, never a circular dot. */
.contact-form input[type="checkbox"] {
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  border-radius: 3px !important;
}
