/* LeoMind theme system — 2026-07-29
   Loaded last to normalize legacy hard-coded colors and preserve contrast. */
:root{
  color-scheme:light;
  --bg:#fff;
  --surface:#fff;
  --panel:#fff;
  --panel2:#f7f3f9;
  --panel3:#efe8f3;
  --text:#100d14;
  --text-soft:#29232d;
  --muted:#665f6c;
  --line:#e7dfea;
  --line-strong:#d6c8dd;
  --brand:#591473;
  --brand2:#1b0723;
  --brand-soft:#7a2a96;
  --accent:#641782;
  --accent-hover:#3f0d53;
  --on-accent:#fff;
  --glow:rgba(95,25,122,.14);
  --shadow:0 24px 72px rgba(39,10,51,.09);
  --shadow-soft:0 12px 38px rgba(39,10,51,.055);
  background:#fff;
}
html[data-theme="dark"]{
  color-scheme:dark;
  --bg:#09070d;
  --surface:#100c14;
  --panel:#121016;
  --panel2:#1b1420;
  --panel3:#24182b;
  --text:#fff;
  --text-soft:#f4edf6;
  --muted:#c3bac7;
  --line:#342a39;
  --line-strong:#4c3a54;
  --brand:#e7c9f1;
  --brand2:#fff;
  --brand-soft:#c895dc;
  --accent:#9e54ba;
  --accent-hover:#b86ed0;
  --on-accent:#fff;
  --glow:rgba(181,104,210,.18);
  --shadow:0 30px 90px rgba(0,0,0,.48);
  --shadow-soft:0 16px 46px rgba(0,0,0,.28);
  background:#09070d;
}
html,body{max-width:100%;overflow-x:clip}
body{
  min-width:320px;
  background:
    radial-gradient(circle at 88% 3%,rgba(105,25,136,.09),transparent 28%),
    radial-gradient(circle at 5% 30%,rgba(28,8,36,.045),transparent 22%),
    var(--bg)!important;
  color:var(--text);
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
}
html[data-theme="dark"] body{
  background:
    radial-gradient(circle at 82% 4%,rgba(158,84,186,.12),transparent 28%),
    radial-gradient(circle at 4% 36%,rgba(80,27,99,.08),transparent 24%),
    var(--bg)!important;
}
::selection{background:color-mix(in srgb,var(--accent) 32%,transparent);color:var(--text)}
:focus-visible{outline:3px solid color-mix(in srgb,var(--accent) 70%,#fff);outline-offset:3px}

/* True transparent 4K logo: dedicated assets for each theme, no filter degradation. */
.lm-brand-art{
  position:relative!important;
  display:inline-grid!important;
  place-items:center!important;
  flex:none;
  aspect-ratio:4096/1230;
  overflow:visible!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  filter:none!important;
}
.lm-brand-art .lm-logo-image{
  grid-area:1/1;
  display:block;
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  object-fit:contain;
  object-position:center;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  filter:none!important;
  transition:opacity .22s ease;
}
.lm-logo-on-light{opacity:1}
.lm-logo-on-dark{opacity:0}
html[data-theme="dark"] .lm-logo-on-light{opacity:0}
html[data-theme="dark"] .lm-logo-on-dark{opacity:1}
.brand,.site-header>.brand,.mobile-menu-head .brand,.full-menu .brand,.site-footer .footer-brand{
  padding:0!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important
}
.site-header>.brand .brand-lion{width:210px!important;height:auto!important;max-height:none!important}
.site-footer .footer-brand .brand-lion{width:225px!important;height:auto!important}
.menu-panel .menu-lion{width:245px!important;height:auto!important;max-height:none!important}
.transition-lion{width:170px!important;height:auto!important}
.big-lion{width:min(100%,620px)!important;height:auto!important;max-height:none!important;margin:auto!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;filter:none!important}
.case-mark .brand-lion{width:150px!important;height:auto!important}

/* Header and controls */
.site-header{
  background:color-mix(in srgb,var(--bg) 90%,transparent)!important;
  border-bottom:1px solid var(--line)!important;
  box-shadow:0 12px 38px color-mix(in srgb,var(--text) 5%,transparent)!important;
  backdrop-filter:blur(24px) saturate(135%);
}
.header-search-combined,.account-pill,.currency-switch,.language-switch,.menu-btn,.theme-toggle{
  color:var(--text)!important;
  background:color-mix(in srgb,var(--panel) 91%,transparent)!important;
  border-color:var(--line)!important;
  box-shadow:none!important;
}
.header-search-combined:hover,.account-pill:hover,.currency-switch:hover,.language-switch:hover,.menu-btn:hover{
  border-color:var(--line-strong)!important;background:var(--panel2)!important
}
.header-search-divider{background:var(--line)!important}
.header-search-popover,.language-menu,.currency-menu{background:var(--panel)!important;border-color:var(--line)!important;color:var(--text)!important;box-shadow:var(--shadow)!important}
.theme-toggle span{background:linear-gradient(135deg,#5d1677,#16071d)!important;box-shadow:0 5px 14px rgba(61,10,79,.28)}
html[data-theme="dark"] .theme-toggle span{background:linear-gradient(135deg,#fff2bb,#ffc657)!important;box-shadow:0 5px 16px rgba(255,198,87,.23)}
.menu-lines i,.menu-close span{background:var(--text)!important}

/* Typography and accents */
h1,h2,h3,h4,h5,h6,strong,b{color:var(--text)}
p,li,small,label{color:inherit}
.lead,.muted,.card p,.price-card p,.seo-card p,.case-card p,.section-head p{color:var(--muted)!important}
.eyebrow,.text-link,.breadcrumbs a,.solution-kicker,.direction-card strong,.cluster-count,.cluster-card>span:last-child,.solution-group-title b,.solution-topic-links a:after,.card .meta a{color:var(--brand)!important}
.eyebrow:before{background:linear-gradient(90deg,var(--accent),color-mix(in srgb,var(--accent) 35%,transparent))!important}
.gradient-text,.stat b,.price{
  background:linear-gradient(118deg,#681885 0%,#371044 54%,#09060b 100%)!important;
  -webkit-background-clip:text!important;background-clip:text!important;color:transparent!important
}
html[data-theme="dark"] .gradient-text,
html[data-theme="dark"] .stat b,
html[data-theme="dark"] .price{
  background:linear-gradient(118deg,#fff 0%,#f5e9f9 48%,#cba6d9 100%)!important;
  -webkit-background-clip:text!important;background-clip:text!important;color:transparent!important
}
html[data-theme="dark"] .typed{border-right-color:#e9cdf2}
.breadcrumbs{color:var(--muted)!important}.breadcrumbs span:last-child{color:var(--muted)!important}

/* Buttons: guaranteed readable text in both themes. */
.btn:not(.outline),a.btn:not(.outline),button.btn:not(.outline),.header-order{
  color:#fff!important;-webkit-text-fill-color:#fff!important;
  background:linear-gradient(135deg,#6b1b88 0%,#351044 56%,#09060b 100%)!important;
  border:1px solid color-mix(in srgb,#9e54ba 38%,transparent)!important;
  text-shadow:0 1px 2px rgba(0,0,0,.34)!important;
  box-shadow:0 15px 34px rgba(57,13,72,.22)!important
}
.btn:not(.outline):hover,a.btn:not(.outline):hover,button.btn:not(.outline):hover{
  background:linear-gradient(135deg,#7c269a 0%,#461357 58%,#100714 100%)!important;
  box-shadow:0 20px 46px rgba(57,13,72,.28)!important
}
.btn.outline,a.btn.outline,button.btn.outline{
  color:var(--text)!important;-webkit-text-fill-color:var(--text)!important;
  background:transparent!important;border:1px solid var(--line-strong)!important;box-shadow:none!important;text-shadow:none!important
}
.btn.outline:hover{background:var(--panel2)!important;border-color:var(--brand)!important}
html[data-theme="dark"] .btn:not(.outline),html[data-theme="dark"] .header-order{
  border-color:rgba(230,195,242,.2)!important;box-shadow:0 18px 45px rgba(0,0,0,.38)!important
}

/* Surfaces. Legacy hard-coded white cards are normalized here. */
.card,.price-card,.seo-card,.case-card,.auth-card,.support-card,.panel,.stat,.direction-card,.cluster-card,.home-case-copy,.article,.semantic-summary,.editorial-locale-card{
  background:linear-gradient(145deg,var(--panel),color-mix(in srgb,var(--panel2) 34%,var(--panel)))!important;
  color:var(--text)!important;border-color:var(--line)!important;box-shadow:var(--shadow-soft)!important
}
.hero-card{
  background:linear-gradient(145deg,var(--panel),color-mix(in srgb,var(--panel2) 66%,var(--panel)))!important;
  border-color:var(--line)!important;box-shadow:var(--shadow)!important
}
.hero-card:before{background:radial-gradient(circle,var(--glow),transparent 68%)!important}
.icon-box,.badge{background:color-mix(in srgb,var(--accent) 11%,var(--panel))!important;color:var(--brand)!important}
.order-section,.home-cluster-preview,.semantic-hero,.portfolio-hero{
  background:linear-gradient(180deg,color-mix(in srgb,var(--accent) 5%,var(--bg)),var(--bg))!important;
  border-color:var(--line)!important
}
.site-footer{background:linear-gradient(180deg,color-mix(in srgb,var(--panel2) 54%,var(--bg)),var(--bg))!important;border-color:var(--line)!important;color:var(--text)!important}
html[data-theme="dark"] .site-footer{background:linear-gradient(180deg,#100c14,#09070d)!important}
.home-solution-grid .cluster-card,.solution-preview-card{
  background:linear-gradient(145deg,var(--panel),color-mix(in srgb,var(--panel2) 58%,var(--panel)))!important;
  border:1px solid var(--line)!important;box-shadow:var(--shadow-soft)!important
}
.solution-group-section:nth-of-type(even){background:linear-gradient(180deg,color-mix(in srgb,var(--accent) 4%,transparent),transparent)!important}
.solution-group-card{border-top-color:var(--line)!important}
.solution-topic-links a{color:var(--text)!important;border-bottom-color:var(--line)!important}
.solution-topic-links a:hover{color:var(--brand)!important}
.case-facts span,.case-status.inline{background:var(--panel2)!important;border-color:var(--line)!important;color:var(--text)!important}
.case-study-media,.case-logo-panel{background:linear-gradient(145deg,#09060b,#1b0c22)!important}
.full-menu{
  background:
    radial-gradient(circle at 85% 10%,color-mix(in srgb,var(--accent) 10%,transparent),transparent 30%),
    color-mix(in srgb,var(--bg) 97%,transparent)!important;
  color:var(--text)!important
}
.full-menu-nav a,.full-menu-mini a{color:var(--text)!important}
.full-menu-nav a small{color:var(--muted)!important}
.full-menu-nav a:after{background:linear-gradient(90deg,color-mix(in srgb,var(--brand) 45%,transparent),var(--line),transparent)!important}
.full-menu-nav a:hover,.full-menu-mini a:hover{color:var(--brand)!important}
.menu-panel{color:var(--text)!important}.menu-panel p{color:var(--muted)!important}
.footer-social-card,.footer-seo-wide{background:transparent!important;border:0!important;box-shadow:none!important}
.social-grid-icons a,.footer-bottom-links a,.site-footer a{color:var(--muted)!important}
.social-grid-icons a:hover,.footer-bottom-links a:hover,.site-footer a:hover{color:var(--brand)!important}
.footer-brand-block p{color:var(--muted)!important}

/* Forms and tables */
input,textarea,select,.solution-search input,.solution-search select{
  background:var(--panel)!important;color:var(--text)!important;border-color:var(--line)!important;caret-color:var(--brand)
}
input::placeholder,textarea::placeholder{color:color-mix(in srgb,var(--muted) 75%,transparent);opacity:1}
input:focus,textarea:focus,select:focus{border-color:var(--brand)!important;box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 17%,transparent)!important}
select option{background:var(--panel);color:var(--text)}
.empty-state{background:var(--panel)!important;border-color:var(--line)!important;color:var(--text)!important}

/* Semantic commercial pages */
.semantic-page{background:transparent!important;color:var(--text)}
.semantic-page .content{max-width:1480px;margin:0 auto}
.semantic-section{border-bottom-color:var(--line)!important}
.semantic-section h2{color:var(--text)!important;text-wrap:balance}
.semantic-section p,.semantic-section li{color:var(--muted)!important}
.semantic-section li::marker{color:var(--brand)}
.faq-item,details{background:var(--panel)!important;color:var(--text)!important;border-color:var(--line)!important}
.direction-chip{background:transparent!important;border:0!important;border-top:1px solid var(--line)!important;border-radius:0!important;box-shadow:none!important}
.direction-chip strong{color:var(--text)!important}.direction-chip span{color:var(--muted)!important}

/* Page transition */
.page-transition{background:color-mix(in srgb,var(--bg) 96%,transparent)!important;color:var(--text)!important}
.transition-logo{background:transparent!important;border:0!important;box-shadow:none!important}

/* Responsive stability */
.page-hero h1,.hero h1,.section-head h2,.semantic-section h2,.solution-group-title span,.direction-card h3{
  overflow-wrap:anywhere;word-break:normal;text-wrap:balance
}
img,video,iframe,canvas,svg{max-width:100%;height:auto}
main,section,article,aside,form,.grid,.cards,.cluster-grid,.directions-grid,.solution-group-grid{min-width:0}

@media(max-width:1180px){
  .site-header{padding-inline:24px!important}
  .header-actions{gap:7px!important}
  .site-header>.brand .brand-lion{width:184px!important}
}
@media(max-width:1024px){
  .site-header{min-height:72px!important;padding:10px 18px!important}
  .site-header>.brand .brand-lion{width:165px!important}
  .header-actions .language-switch,.header-actions .currency-switch,.header-actions .header-order{display:none!important}
  .header-actions .header-search-combined{display:flex!important;min-width:48px!important;width:48px!important;height:48px!important;padding:0!important;justify-content:center!important}
  .header-search-combined span,.header-search-divider,.header-search-combined .lm-icon:last-child{display:none!important}
  .desktop-hamburger{display:flex!important}
  .hero{grid-template-columns:1fr!important;min-height:auto!important;padding-top:58px!important}
  .hero-copy{max-width:900px}
  .hero-visual{max-width:760px;width:100%;margin-inline:auto}
  .solution-group-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:760px){
  body{font-size:15px}
  .site-header{min-height:66px!important;padding:9px 14px!important;gap:8px!important}
  .site-header>.brand .brand-lion{width:136px!important}
  .header-actions{gap:5px!important}
  .header-actions .account-pill,.header-actions .header-search-combined{display:none!important}
  .theme-toggle{width:47px!important;height:29px!important;padding:4px!important}
  .theme-toggle span{width:19px!important;height:19px!important}
  html[data-theme="dark"] .theme-toggle span{transform:translateX(18px)!important}
  .desktop-hamburger{width:44px!important;height:44px!important;min-width:44px!important;border-radius:13px!important}
  .desktop-hamburger .menu-word{display:none!important}

  .full-menu{padding:13px 16px calc(28px + env(safe-area-inset-bottom))!important;overflow-y:auto!important;overflow-x:hidden!important}
  .mobile-menu-head{min-height:56px!important;padding-right:54px!important}
  .mobile-menu-head .brand .brand-lion,.full-menu .brand .brand-lion{width:158px!important}
  .menu-close{top:12px!important;right:12px!important;width:44px!important;height:44px!important}
  .full-menu-grid{grid-template-columns:1fr!important;gap:28px!important;margin-top:28px!important}
  .full-menu-nav{grid-template-columns:1fr!important}
  .full-menu-nav a{padding:16px 0!important}
  .full-menu-nav a b{font-size:clamp(25px,8.5vw,34px)!important}
  .menu-panel .menu-lion{width:180px!important;margin-bottom:20px!important}
  .menu-panel h3{font-size:clamp(28px,8vw,38px)!important}
  .menu-panel .btn{width:100%!important;min-width:0!important}
  .full-menu-mini{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:3px 16px!important}

  .hero{padding:40px 16px 48px!important;gap:30px!important}
  .hero h1{font-size:clamp(39px,12vw,58px)!important;line-height:.98!important;letter-spacing:-.055em!important}
  .hero .lead{font-size:16px!important;line-height:1.65!important}
  .hero-actions{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}
  .hero-actions .btn{width:100%!important;min-height:52px!important}
  .hero-card{padding:22px!important;border-radius:27px!important}
  .big-lion{width:100%!important}

  .page-hero{padding:40px 16px 24px!important}
  .page-hero h1,.refined-directions-page .directions-hero h1{font-size:clamp(38px,11.8vw,56px)!important;line-height:.98!important;letter-spacing:-.05em!important}
  .page-hero .lead{font-size:16px!important;line-height:1.65!important}
  .section{padding:48px 16px!important}
  .section-head{display:grid!important;grid-template-columns:1fr!important;gap:13px!important;align-items:start!important;margin-bottom:27px!important}
  .section-head h2{font-size:clamp(30px,9vw,43px)!important;line-height:1.04!important}
  .section-head>p{max-width:none!important}

  .directions-filter,.solution-search,.order-wrap,.split{grid-template-columns:1fr!important}
  .solution-group-grid,.cluster-grid,.directions-grid,.cards,.seo-grid,.pricing-grid,.case-grid{grid-template-columns:1fr!important}
  .solution-group-card>p{min-height:0!important}
  .solution-group-title span{font-size:28px!important}
  .direction-card,.cluster-card{min-height:0!important;padding:22px!important}
  .direction-card>div{flex-wrap:wrap!important}

  .semantic-page .content{padding-left:16px!important;padding-right:16px!important}
  .semantic-summary{position:static!important}
  .semantic-section h2{font-size:28px!important;line-height:1.08!important}
  .semantic-section{padding-bottom:16px!important}
  .article,.panel{min-width:0!important;padding:21px!important}

  .site-footer{padding-left:16px!important;padding-right:16px!important}
  .footer-top,.footer-rich{grid-template-columns:1fr!important;gap:28px!important}
  .site-footer .footer-brand .brand-lion{width:190px!important}
  .social-grid-icons{grid-template-columns:1fr 1fr!important}
  .footer-bottom{display:grid!important;grid-template-columns:1fr!important;gap:16px!important}
  .footer-bottom-links{justify-content:flex-start!important;flex-direction:column!important;align-items:flex-start!important}

  .cookie-banner{left:12px!important;right:12px!important;bottom:12px!important;width:auto!important;display:grid!important;grid-template-columns:1fr!important}
  .cookie-actions{width:100%!important}.cookie-actions .btn{flex:1!important}
}
@media(max-width:480px){
  .site-header>.brand .brand-lion{width:122px!important}
  .full-menu{padding-inline:14px!important}.mobile-menu-head .brand .brand-lion{width:150px!important}
  .full-menu-mini{grid-template-columns:1fr!important}
  .hero,.page-hero,.section{padding-left:14px!important;padding-right:14px!important}
  .hero h1{font-size:clamp(37px,12.4vw,52px)!important}
  .page-hero h1,.refined-directions-page .directions-hero h1{font-size:clamp(36px,12vw,50px)!important}
  .stats{grid-template-columns:1fr 1fr!important}.stat{padding:15px!important}.stat b{font-size:27px!important}
  .social-grid-icons{grid-template-columns:1fr!important}
  .solution-group-title span{font-size:26px!important}
  .breadcrumbs{font-size:12px!important}.breadcrumbs span:last-child{white-space:normal!important}
}
@media(prefers-reduced-motion:reduce){
  *,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}
}
