section, footer.site-footer {
  scroll-margin-top: 66px;
}
/* Floating video button (left) */
#video-helper-toggle {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
  color: #111;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  z-index: 100000;
}

/* Video modal styles */
#video-modal {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100001;
}
#video-modal.closed { display: none; }
.video-modal-overlay {
  position: absolute;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.7);
  z-index: 1;
}
.video-modal-content {
  position: relative;
  z-index: 2;
  background: var(--bg-elev);
  border-radius: 18px;
  box-shadow: 0 10px 32px rgba(0,0,0,.65);
  padding: 0;
  width: 90vw;
  max-width: 640px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
#video-modal-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  position: absolute;
  top: 8px;
  right: 16px;
  z-index: 3;
  cursor: pointer;
}
#video-iframe {
  width: 100%;
  height: 360px;
  border: none;
  border-radius: 0 0 18px 18px;
  background: #000;
}
@media (max-width: 700px) {
  .video-modal-content { max-width: 98vw; }
  #video-iframe { height: 40vw; min-height: 180px; }
}
@media (max-width: 480px) {
  #video-helper-toggle { left: 4vw; bottom: 20px; }
  .video-modal-content { max-width: 99vw; }
  #video-iframe { height: 44vw; min-height: 120px; }
}
:root {
  --bg: #0f1113; /* dark charcoal */
  --bg-elev: #14171a;
  --text: #e9edf1;
  --muted: #aab3bd;
  --accent: #ff2ea1; /* magenta */
  --brand: #ffb000; /* amber for accents */
  --brand-2: #ff6a00; /* orange */
  --panel: rgba(255, 255, 255, 0.04);
  --panel-border: rgba(255, 255, 255, 0.08);
  --glass: rgba(255, 255, 255, 0.06);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

/* Screen-reader only utility */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
/* vars moved into :root above */

/* Light theme variables */
/* Light theme variables */
:root.light {
  --bg: #f7f8fa;
  --bg-elev: #fff;
  --text: #181a1b;
  --muted: #4d5761;
  --accent: #0057d8;
  --brand: #ffb000;
  --brand-2: #ff6a00;
  --panel: rgba(0,0,0,0.04);
  --panel-border: rgba(0,0,0,0.10);
  --glass: rgba(0,0,0,0.03);
  --shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* Improve panel and case text visibility in light theme */
:root.light .panel-text,
:root.light .case-desc {
  color: #263040;
}

* { box-sizing: border-box; }
html, body { height: 100%; overflow-x: hidden; }
html { background: var(--bg); }
body {
  margin: 0;
  padding-top: 76px;
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.1em;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  margin-left: 8px;
  transition: background 0.2s, color 0.2s;
}
.theme-toggle:hover {
  background: var(--glass);
}

body {
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;

  /* remove transforms that can break fixed positioning */
  -webkit-transform: none !important;
  transform: none !important;
  -webkit-backface-visibility: visible !important;
  backface-visibility: visible !important;
  -webkit-perspective: none !important;
  perspective: none !important;
}

/* Floating chat button */
#chatbot-toggle{
  position:fixed; bottom:20px; right:20px; width:56px; height:56px;
  background:linear-gradient(135deg, var(--brand), var(--brand-2));
  border-radius:50%;
  display:grid; place-items:center; font-size:24px; color:#111; cursor:pointer;
  box-shadow:0 8px 24px rgba(0,0,0,.45); z-index:100000; /* above header/topbar */
}

/* Floating theme toggle (right, above chat) */
#theme-fab{
  position: fixed;
  bottom: 86px; /* sit above chat button */
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
  color: #111;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border: 1px solid var(--panel-border);
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  cursor: pointer;
  z-index: 100000;
}
#theme-fab:hover { filter: brightness(1.05); }

/* Chat widget panel */
#chatbot-widget{
  position:fixed; bottom:86px; right:20px; width:350px; height:500px;
  background:var(--bg-elev); border:1px solid var(--panel-border); border-radius:16px;
  overflow:hidden; box-shadow:0 10px 32px rgba(0,0,0,.55); z-index:100000;
}
#chatbot-widget.closed{ display:none; }
#chatbot-widget iframe{ width:100%; height:100%; border:0; }

/* Mobile */
@media (max-width:480px){
  #chatbot-widget{ width:92vw; height:70vh; right:4vw; bottom:86px; }
}

@media (max-width: 480px){
  #theme-fab{ right: 4vw; bottom: 86px; }
}

.container {
  width: min(1160px, 92%);
  margin: 0 auto;
  padding: 0 12px;
}

.topbar {
  display: none;
}

@supports (-webkit-backdrop-filter: blur(6px)) or (backdrop-filter: blur(6px)) {
  .site-header {
    -webkit-backdrop-filter: saturate(140%) blur(6px);
    backdrop-filter: saturate(140%) blur(6px);
  }
}

/* During rapid scroll bursts, disable blur to prevent Safari artifacts */
body.scrolling-fast .site-header {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background: linear-gradient(to bottom, rgba(15,17,19,0.98), rgba(15,17,19,0.95)) !important;
}
body {
  margin: 0;
  padding-top: 66px; /* keeps content below header */
}
.site-header {
  position: fixed;
  top: 0;   /* placed at very top since topbar is hidden */
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--panel-border);
  height: 66px;

  /* kill transforms that cause movement */
  transform: none !important;
  -webkit-transform: none !important;
  backface-visibility: visible !important;
  -webkit-backface-visibility: visible !important;
  transition: background 0.3s ease;
  will-change: auto;
  contain: initial;
  isolation: auto;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}
.logo-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-weight: 800;
  font-size: 16px;
  font-family: Arial, sans-serif;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow:
    0 0 0 2px var(--bg),
    0 0 12px 2px rgba(255, 106, 0, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  z-index: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.logo-mark::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  z-index: -1;
  opacity: 0.6;
  filter: blur(4px);
  pointer-events: none;
}



.logo-text { font-weight: 700; letter-spacing: 0.2px; }

.menu-toggle {
  display: none;
  font-size: 25px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 8px 10px;
}

.nav { display: flex; align-items: center; gap: 8px; }
.nav ul { list-style: none; display: flex; gap: 18px; padding: 0; margin: 0; }
.nav a, .nav .theme-toggle {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: inline-block;
}
.nav a:hover { background: var(--glass); color: var(--text); }
.nav .theme-toggle:hover { background: var(--glass); color: var(--text); }
.nav a.active { color: var(--text); background: rgba(255,255,255,0.12); }
.nav .theme-toggle.active { color: var(--text); background: rgba(255,255,255,0.12); }
.nav-link.selected {
  background: var(--accent);
  color: #fff;
}

.hero {
  position: relative;
  width: 100%;
  display: grid;
  align-items: center;
  overflow: hidden; /* Prevent canvas overflow */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-perspective: 1000;
  perspective: 1000;
  will-change: transform;
  contain: paint;
  isolation: isolate;
  z-index: 0; /* keep below header/nav overlays */
}
.hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-perspective: 1000;
  perspective: 1000;
  will-change: transform;
  contain: paint;
  pointer-events: none; /* do not block menu interactions */
}
#waveCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-overlay { 
  position: absolute; inset: 0; 
  background: radial-gradient(1200px 400px at 50% 30%, rgba(255,106,0,0.25), transparent 60%); 
  pointer-events: none; 
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: opacity, transform;
  contain: paint;
}
.hero-inner { position: relative; padding-top: 48px; padding-bottom: 48px; }
.headline { font-size: clamp(24px, 4vw, 44px); line-height: 1.2; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; text-shadow: 0 6px 30px rgba(255,106,0,0.25); }
.subhead { color: var(--muted); margin-top: 12px; max-width: 760px; }

.panels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding-top: 28px; padding-bottom: 28px; }
.panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.panel h2 { margin-top: 4px; margin-bottom: 8px; font-size: 22px; }
.panel-text { color: #d0d6dd; }
.panel-cta { text-align: center; margin-top: 14px; }

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
}
.btn-primary {
  color: #1b1b1b;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 20px rgba(255, 106, 0, 0.26);
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.05); }

.section-divider { border-top: 1px solid var(--panel-border); margin-top: 0px; padding-top: 4px; }
.why h2 { margin-bottom: 10px; }
.why-copy { display: grid; gap: 10px; color: var(--text); }

.metrics { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 20px; }
.metric { background: var(--panel); border: 1px solid var(--panel-border); border-radius: 12px; padding: 16px; text-align: center; }
.metric-value { font-size: 28px; font-weight: 800; background: linear-gradient(135deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.metric-label { color: var(--muted); font-size: 14px; }

.services-list { 
  display: grid; 
  gap: 24px; 
  padding-top: 32px; 
  padding-bottom: 32px; 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
  grid-auto-flow: row dense;
}
.service-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 22px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,.28);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-height: 200px;
}
/* subtle gradient border glow */
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  padding: 1px; /* border thickness */
  background: linear-gradient(135deg, rgba(255,176,0,.18), rgba(255,106,0,.12));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
.service-card::after { display: none; }
.service-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,.34);
  border-color: rgba(255,255,255,0.16);
}
.service-title { 
  display: block; 
  font-weight: 800; 
  margin: 2px 0 6px; 
  text-transform: uppercase; 
  letter-spacing: .6px; 
  line-height: 1.15;
  font-size: clamp(16px, 2vw, 22px);
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  text-shadow: 0 6px 30px rgba(255,106,0,0.2);
  overflow: visible;
}

/* subtle accent dot before titles */
.service-title::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 2px 6px rgba(0,0,0,0.25);
  transform: translateY(1px);
}
.service-desc { 
  color: var(--muted); 
  font-size: 14px;
  max-width: 100%; 
  white-space: normal;
  overflow: visible; 
  border-top: 1px solid var(--panel-border);
  padding-top: 10px;
}
.service-accent { 
  position: absolute; inset: 0; pointer-events: none; 
  background: radial-gradient(900px 260px at 20% 0, rgba(255,106,0,.10), transparent 60%);
  opacity: .35; 
}
.service-card:hover .service-accent { opacity: .45; }

.more-solutions { border-top: 1px solid var(--panel-border); padding-top: 28px; padding-bottom: 32px; }
.more-solutions h2 { margin-top: 0; }
.more-solutions .tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 8px; }
.tag { font-size: 14px; color: var(--text); background: var(--glass); border: 1px solid var(--panel-border); padding: 6px 10px; border-radius: 999px; }

.site-footer {
  margin-top: 40px;
  background: var(--bg-elev);
  border-top: 1px solid var(--panel-border);
}
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 16px; padding-top: 24px; padding-bottom: 16px; }
.footer-brand .muted { color: var(--muted); }
/* Day theme: make footer text and muted text darker for clarity */
:root.light .site-footer {
  background: #f3f5f8;
}
:root.light .footer-brand .muted,
:root.light .footer-bottom .muted,
:root.light .footer-social .icon,
:root.light .muted {
  color: #263040;
}
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-social .social-icons { display: flex; gap: 10px; }
.footer-social .icon { color: var(--muted); display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; background: var(--glass); border: 1px solid var(--panel-border); border-radius: 50%; text-decoration: none; transition: background .2s ease, color .2s ease; }
.footer-social .icon:hover { color: var(--text); background: rgba(255,255,255,0.12); }
.footer-bottom { grid-column: 1 / -1; border-top: 1px solid var(--panel-border); margin-top: 6px; padding-top: 12px; display: flex; justify-content: space-between; align-items: center; }
.muted { color: var(--muted); }

@media (max-width: 980px) {
  .panels { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .services-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  /* Reset body transforms that can break position: fixed stacking on iOS */
  body {
    -webkit-transform: none;
    transform: none;
    -webkit-backface-visibility: visible;
    backface-visibility: visible;
    -webkit-perspective: none;
    perspective: none;
  }
  /* Avoid creating a containing block for fixed children (mobile) */
  .site-header {
    -webkit-transform: none;
    transform: none;
    -webkit-backface-visibility: visible;
    backface-visibility: visible;
    will-change: auto;
    contain: initial;
    isolation: auto;
  }
  .nav { 
    display: none; 
    position: fixed; 
    top: 56px; 
    right: 12px; 
    left: 12px;
    background: var(--bg-elev); 
    border: 1px solid var(--panel-border); 
    border-radius: 12px; 
    box-shadow: var(--shadow); 
    z-index: 10000; 
    max-height: calc(100vh - 72px); 
    overflow: auto; 
  }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 6px; padding: 10px; }
.nav .theme-toggle { width: 100%; text-align: left; }
  .menu-toggle { display: inline-block; }

  /* Remove transforms on hero to avoid stacking context issues */
  .hero {
    -webkit-transform: none;
    transform: none;
    will-change: auto;
    contain: initial;
    isolation: auto;
  }
}

/* Prevent background scroll when mobile menu is open */
body.menu-open { overflow: hidden; }


/* Case studies */
.case-grid-wrap { padding-top: 26px; padding-bottom: 26px; }
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.case-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  align-items: center;
  background: linear-gradient(180deg, rgba(179,189,204,0.07), rgba(142,151,163,0.04));
  border: 1px solid rgba(185,195,210,0.18);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.case-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.22); }
.case-logo { width: 88px; height: 88px; border-radius: 12px; display: grid; place-items: center; background: #1c222b; border: 1px solid rgba(255,255,255,0.08); overflow: hidden; }
.case-logo img, .case-logo svg { width: 100%; height: 100%; object-fit: cover; }
.case-title { margin: 0; font-weight: 800; letter-spacing: .3px; }
.case-desc { margin: 6px 0 10px; color: #c8d0d9; }
.case-actions { display: flex; gap: 10px; }
.btn-secondary { color: var(--text); background: var(--glass); border: 1px solid var(--panel-border); }
.btn-secondary:hover { background: rgba(255,255,255,0.12); }

@media (max-width: 980px) {
  .case-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .case-grid { grid-template-columns: 1fr; }
  .case-card { grid-template-columns: 72px 1fr; }
  .case-logo { width: 72px; height: 72px; }
  .services-list { grid-template-columns: 1fr; }
}

/* wider screens: 4 columns for denser layout */
@media (min-width: 1400px) {
  .services-list { grid-template-columns: repeat(4, minmax(260px, 1fr)); }
}

/* Reduce motion preferences */
@media (prefers-reduced-motion: reduce) {
  .service-card,
  .service-card::after,
  .service-accent {
    transition: none !important;
  }
}




