:root{
  --tm-bg: #0b1220;
  --tm-surface: rgba(255,255,255,.06);
  --tm-surface2: rgba(255,255,255,.10);
  --tm-border: rgba(255,255,255,.10);
  --tm-text: rgba(255,255,255,.92);
  --tm-muted: rgba(255,255,255,.68);
  --tm-muted2: rgba(255,255,255,.56);
  --tm-brand: #6d8bff;
  --tm-brand2:#35d07f;
  --tm-accent:#22d3ee;
  --tm-shadow: 0 24px 70px rgba(0,0,0,.35);
  --tm-shadow2: 0 14px 38px rgba(0,0,0,.26);
  --tm-radius: 16px;
  --tm-radius-sm: 12px;
  --tm-maxch: 72ch;
  --tm-ease: cubic-bezier(.2,.8,.2,1);
  --tm-fast: 140ms;
  --tm-med: 220ms;
  --tm-slow: 420ms;

  --tm-font-sans: "Inter", "Cairo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --tm-font-rtl: "Cairo", "Tajawal", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

/* Light theme overrides (Bootstrap 5.3 uses data-bs-theme) */
body.tm-marketing[data-bs-theme="light"]{
  --tm-bg: #f6f8ff;
  --tm-surface: rgba(15,23,42,.05);
  --tm-surface2: rgba(15,23,42,.08);
  --tm-border: rgba(15,23,42,.12);
  --tm-text: rgba(15,23,42,.92);
  --tm-muted: rgba(15,23,42,.72);
  --tm-muted2: rgba(15,23,42,.58);
  --tm-shadow: 0 24px 70px rgba(2,6,23,.10);
  --tm-shadow2: 0 14px 38px rgba(2,6,23,.08);
}

/* Light mode component polish (premium) */
body.tm-marketing[data-bs-theme="light"] .tm-skip-link{
  background: rgba(255,255,255,.92);
  color: rgba(15,23,42,.92);
  border-color: var(--tm-border);
  box-shadow: 0 10px 30px rgba(2,6,23,.10);
}

body.tm-marketing[data-bs-theme="light"] .tm-navbar{
  background: rgba(255,255,255,.82);
  border-bottom-color: var(--tm-border);
}
body.tm-marketing[data-bs-theme="light"] .tm-navbar .tm-brand-name{
  color: rgba(15,23,42,.92);
}

body.tm-marketing[data-bs-theme="light"] .tm-btn-ghost{
  background: rgba(15,23,42,.04);
  border-color: var(--tm-border);
  color: rgba(15,23,42,.86);
}
body.tm-marketing[data-bs-theme="light"] .tm-btn-ghost:hover{
  background: rgba(15,23,42,.06);
  border-color: rgba(109,139,255,.30);
}

body.tm-marketing[data-bs-theme="light"] .tm-eyebrow{
  background: rgba(15,23,42,.04);
  border-color: var(--tm-border);
  color: rgba(15,23,42,.76);
}

body.tm-marketing[data-bs-theme="light"] .tm-section-alt{
  background: rgba(109,139,255,.045);
  border-top-color: var(--tm-border);
  border-bottom-color: var(--tm-border);
}

body.tm-marketing[data-bs-theme="light"] .tm-card{
  background: rgba(255,255,255,.85);
  border-color: var(--tm-border);
  box-shadow: var(--tm-shadow2);
}
body.tm-marketing[data-bs-theme="light"] .tm-card-hover:hover{
  background: rgba(255,255,255,.96);
  border-color: rgba(109,139,255,.26);
}
body.tm-marketing[data-bs-theme="light"] .tm-card .tm-icon{
  background: rgba(109,139,255,.12);
  border-color: rgba(109,139,255,.22);
  color: rgba(15,23,42,.92);
}
body.tm-marketing[data-bs-theme="light"] .tm-kpi{
  border-color: var(--tm-border);
  background: rgba(255,255,255,.78);
}

body.tm-marketing[data-bs-theme="light"] .tm-footer-links a{
  color: rgba(15,23,42,.70);
}
body.tm-marketing[data-bs-theme="light"] .tm-footer-links a:hover{
  color: rgba(15,23,42,.92);
}


/* Make Bootstrap "text-bg-dark" badges look premium in light mode (used on Home) */
body.tm-marketing[data-bs-theme="light"] .text-bg-dark{
  background-color: rgba(15,23,42,.06) !important;
  color: rgba(15,23,42,.92) !important;
}
body.tm-marketing[data-bs-theme="light"] .border-light-subtle{
  border-color: var(--tm-border) !important;
}

/* Docs refinements for light mode */
body.tm-marketing[data-bs-theme="light"] .tm-docs-progress{
  background: rgba(15,23,42,.04);
  border-bottom-color: var(--tm-border);
}
body.tm-marketing[data-bs-theme="light"] .tm-docs-link{
  color: rgba(15,23,42,.70);
}
body.tm-marketing[data-bs-theme="light"] .tm-docs-link:hover{
  background: rgba(15,23,42,.04);
  color: rgba(15,23,42,.92);
}
body.tm-marketing[data-bs-theme="light"] .tm-docs-link.active{
  color: rgba(15,23,42,.92);
  background: rgba(109,139,255,.14);
}
body.tm-marketing[data-bs-theme="light"] .tm-docs-section{
  border-bottom-color: var(--tm-border);
}
body.tm-marketing[data-bs-theme="light"] .tm-callout{
  border-color: var(--tm-border);
  background: rgba(15,23,42,.03);
}
body.tm-marketing[data-bs-theme="light"] .tm-codeblock pre{
  border-color: var(--tm-border);
  background: rgba(15,23,42,.04);
}
body.tm-marketing[data-bs-theme="light"] .tm-codeblock code{
  color: rgba(15,23,42,.92);
}

/* Progressive enhancement:
   AOS CSS hides [data-aos] until JS runs. If AOS isn't available (or reduced-motion),
   force content visible so pages never look "empty". */
html:not(.tm-aos) [data-aos]{
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

html{
  scroll-behavior: smooth;
}

/* Never allow horizontal page scrolling (marketing UI) */
html, body{
  overflow-x: hidden;
}
body.tm-marketing, .tm-page{
  overflow-x: hidden;
}

/* Bootstrap ships  body { font-family: var(--bs-body-font-family) }  - a plain element
   selector on BODY, which beats anything declared on HTML. So declaring the font here
   alone was inert: these pages requested Inter, Cairo and Sora from Google and then
   rendered all 205 of their text nodes - 164 of them Arabic - in Bootstrap's default
   system-ui stack, downloading none of the three. Setting the Bootstrap variable is
   what actually reaches the text. Measured, not assumed. */
/* This has to name BODY, and it took four measurements to see why. Bootstrap declares
       :root, [data-bs-theme="light"] {
         --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, ...;
         --bs-body-font-family: var(--bs-font-sans-serif);
       }
   and the BODY element carries data-bs-theme="light" - so that selector matches body
   itself and re-declares BOTH variables there, discarding anything body inherited from
   html. Setting them on html alone reached html and nothing else, which is why these
   pages requested Inter, Cairo and Sora from Google and then rendered all 205 of their
   text nodes - 164 of them Arabic - in Bootstrap's system-ui default, downloading none
   of the three. Naming body outranks [data-bs-theme] and the font finally lands.
   The direct font-family is kept alongside the variables so the result holds even if a
   future Bootstrap stops routing body's font through them. */
html[dir="rtl"],
html[dir="rtl"] body{
  --bs-font-sans-serif: var(--tm-font-rtl);
  --bs-body-font-family: var(--tm-font-rtl);
  font-family: var(--tm-font-rtl);
}
html[dir="ltr"],
html[dir="ltr"] body{
  --bs-font-sans-serif: var(--tm-font-sans);
  --bs-body-font-family: var(--tm-font-sans);
  font-family: var(--tm-font-sans);
}
body.tm-marketing{
  background:
    radial-gradient(900px 520px at 15% 0%, rgba(109,139,255,.20), transparent 55%),
    radial-gradient(980px 520px at 85% 10%, rgba(53,208,127,.14), transparent 55%),
    radial-gradient(720px 420px at 55% 85%, rgba(34,211,238,.12), transparent 55%),
    linear-gradient(180deg, #060812 0%, var(--tm-bg) 40%, #070a14 100%);
  color: var(--tm-text);
}
body.tm-marketing[data-bs-theme="light"]{
  background:
    radial-gradient(900px 520px at 15% 0%, rgba(109,139,255,.16), transparent 55%),
    radial-gradient(980px 520px at 85% 10%, rgba(53,208,127,.12), transparent 55%),
    radial-gradient(720px 420px at 55% 85%, rgba(34,211,238,.10), transparent 55%),
    linear-gradient(180deg, #f3f6ff 0%, var(--tm-bg) 55%, #f7f9ff 100%);
}

/* Slightly larger typography for a more "enterprise" feel */
body.tm-marketing{
  --bs-body-font-size: 1.05rem;
}

/* Accessible focus */
:focus-visible{
  outline: 3px solid rgba(109,139,255,.55);
  outline-offset: 3px;
  border-radius: 12px;
}
.btn:focus-visible,
.nav-link:focus-visible{
  outline-offset: 4px;
}

.tm-skip-link{
  position:absolute;
  inset-inline-start: 12px;
  top: 12px;
  z-index: 2000;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0,0,0,.65);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
}

/* ═══ Navbar ═══ */
.tm-nav{ backdrop-filter: blur(12px); z-index: 1030; }
.tm-nav.tm-scrolled .tm-navbar{ background: rgba(7,10,20,.78); box-shadow: 0 10px 40px rgba(0,0,0,.22); }
body.tm-marketing[data-bs-theme="light"] .tm-nav.tm-scrolled .tm-navbar{ background: rgba(255,255,255,.94); box-shadow: 0 12px 44px rgba(2,6,23,.10); }
.tm-navbar{ background: rgba(7,10,20,.55); border-bottom: 1px solid var(--tm-border); padding: .6rem 0; }
body.tm-marketing[data-bs-theme="light"] .tm-navbar{ background: rgba(255,255,255,.82); }

.tm-navbar-inner{ display: flex; align-items: center; gap: .75rem; }
.tm-navbar-brand{ display: flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; flex-shrink: 0; }
.tm-brand-text{ display: flex; flex-direction: column; line-height: 1; }
.tm-brand-mark{ width: 36px; height: 36px; border-radius: 12px; background: linear-gradient(135deg,var(--tm-brand) 0%,var(--tm-brand2) 60%,var(--tm-accent) 100%); box-shadow: 0 8px 24px rgba(0,0,0,.25); display: inline-block; flex-shrink: 0; }
.tm-brand-name{ font-weight: 900; letter-spacing: -.02em; font-size: 1.15rem; color: var(--tm-text); }
.tm-brand-sub{ color: var(--tm-muted2); font-weight: 700; font-size: 11px; }

/* Desktop nav links */
.tm-navbar-links{ display: none; align-items: center; gap: 2px; margin: 0 auto; }
@media(min-width:992px){ .tm-navbar-links{ display: flex; } }
.tm-nav-link{ color: rgba(255,255,255,.72); font-weight: 700; font-size: .88rem; border-radius: 10px; padding: .45rem .75rem; text-decoration: none; white-space: nowrap; transition: color .15s, background .15s; }
.tm-nav-link:hover{ color: var(--tm-text); background: rgba(255,255,255,.07); }
.tm-nav-link.active{ color: var(--tm-text); background: rgba(109,139,255,.16); border: 1px solid rgba(109,139,255,.22); }
body.tm-marketing[data-bs-theme="light"] .tm-nav-link{ color: rgba(15,23,42,.65); }
body.tm-marketing[data-bs-theme="light"] .tm-nav-link:hover{ color: rgba(15,23,42,.92); background: rgba(15,23,42,.04); }
body.tm-marketing[data-bs-theme="light"] .tm-nav-link.active{ color: rgba(15,23,42,.92); background: rgba(109,139,255,.12); border-color: rgba(109,139,255,.22); }

/* Right actions */
.tm-navbar-actions{ display: flex; align-items: center; gap: 6px; margin-inline-start: auto; flex-shrink: 0; }
.tm-desktop-only{ display: none !important; }
.tm-tablet-up{ display: none !important; }
.tm-mobile-only{ display: flex !important; }
@media(min-width:576px){ .tm-tablet-up{ display: inline-flex !important; } }
@media(min-width:992px){ .tm-desktop-only{ display: inline-flex !important; } .tm-mobile-only{ display: none !important; } }

/* Icon button */
.tm-icon-btn{ display: inline-flex; align-items: center; gap: 4px; padding: .45rem .6rem; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: rgba(255,255,255,.85); font-weight: 700; font-size: .85rem; cursor: pointer; transition: background .15s, border-color .15s, transform .1s; text-decoration: none; }
.tm-icon-btn:hover{ background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.20); transform: translateY(-1px); color: var(--tm-text); }
body.tm-marketing[data-bs-theme="light"] .tm-icon-btn{ background: rgba(15,23,42,.03); border-color: rgba(15,23,42,.10); color: rgba(15,23,42,.75); }
body.tm-marketing[data-bs-theme="light"] .tm-icon-btn:hover{ background: rgba(15,23,42,.06); border-color: rgba(109,139,255,.30); color: rgba(15,23,42,.92); }

/* Language badge */
.tm-lang-badge{ font-size: 10px; font-weight: 900; background: rgba(255,255,255,.14); border-radius: 4px; padding: 1px 5px; line-height: 1.3; }
body.tm-marketing[data-bs-theme="light"] .tm-lang-badge{ background: rgba(0,0,0,.08); }

/* Hamburger button */
.tm-menu-btn{ display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 38px; height: 38px; padding: 0; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; background: rgba(255,255,255,.05); cursor: pointer; transition: background .15s; }
.tm-menu-btn span{ display: block; width: 18px; height: 2px; background: rgba(255,255,255,.85); border-radius: 2px; transition: transform .2s, opacity .2s; }
.tm-menu-btn:hover{ background: rgba(255,255,255,.10); }
body.tm-marketing[data-bs-theme="light"] .tm-menu-btn{ border-color: rgba(15,23,42,.12); background: rgba(15,23,42,.03); }
body.tm-marketing[data-bs-theme="light"] .tm-menu-btn span{ background: rgba(15,23,42,.70); }
body.tm-marketing[data-bs-theme="light"] .tm-menu-btn:hover{ background: rgba(15,23,42,.06); }

/* ═══ Mobile Menu ═══ */
.tm-mobile-menu{ position: fixed; inset: 0; z-index: 9999; pointer-events: none; visibility: hidden; }
.tm-mobile-menu.is-open{ pointer-events: auto; visibility: visible; }
.tm-mobile-menu-backdrop{ position: absolute; inset: 0; background: rgba(0,0,0,.5); opacity: 0; transition: opacity .3s ease; }
.tm-mobile-menu.is-open .tm-mobile-menu-backdrop{ opacity: 1; }
.tm-mobile-menu-panel{ position: absolute; top: 0; bottom: 0; left: 0; width: 300px; max-width: 85vw; background: rgba(10,14,26,.97); color: rgba(255,255,255,.92); backdrop-filter: blur(20px); display: flex; flex-direction: column; overflow-y: auto; transform: translateX(-100%); transition: transform .3s cubic-bezier(.4,0,.2,1); box-shadow: 4px 0 24px rgba(0,0,0,.3); }
html[dir="rtl"] .tm-mobile-menu-panel{ left: auto; right: 0; transform: translateX(100%); box-shadow: -4px 0 24px rgba(0,0,0,.3); }
.tm-mobile-menu.is-open .tm-mobile-menu-panel{ transform: translateX(0); }

body.tm-marketing[data-bs-theme="light"] .tm-mobile-menu-panel{ background: rgba(255,255,255,.98); color: rgba(15,23,42,.92); }
body.tm-marketing[data-bs-theme="light"] .tm-mobile-menu-backdrop{ background: rgba(0,0,0,.3); }

/* Mobile menu header */
.tm-mobile-menu-header{ display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.08); }
body.tm-marketing[data-bs-theme="light"] .tm-mobile-menu-header{ border-bottom-color: rgba(15,23,42,.08); }
body.tm-marketing[data-bs-theme="light"] .tm-mobile-menu-header .tm-brand-name{ color: rgba(15,23,42,.92); }
body.tm-marketing[data-bs-theme="light"] .tm-mobile-menu-header .tm-icon-btn{ background: rgba(15,23,42,.04); border-color: rgba(15,23,42,.10); color: rgba(15,23,42,.70); }

/* Mobile nav links */
.tm-mobile-nav{ padding: .75rem 0; }
.tm-mobile-link{ display: flex; align-items: center; gap: .75rem; padding: .75rem 1.25rem; color: rgba(255,255,255,.78); text-decoration: none; font-weight: 600; font-size: .95rem; transition: background .15s, color .15s; }
.tm-mobile-link i{ font-size: 1.1rem; color: rgba(109,139,255,.65); width: 1.4rem; text-align: center; }
.tm-mobile-link:hover{ background: rgba(255,255,255,.06); color: rgba(255,255,255,.96); }
.tm-mobile-link.active{ background: rgba(109,139,255,.12); color: var(--tm-text); }
.tm-mobile-link.active i{ color: var(--tm-brand); }
body.tm-marketing[data-bs-theme="light"] .tm-mobile-link{ color: rgba(15,23,42,.72); }
body.tm-marketing[data-bs-theme="light"] .tm-mobile-link i{ color: rgba(109,139,255,.60); }
body.tm-marketing[data-bs-theme="light"] .tm-mobile-link:hover{ background: rgba(109,139,255,.06); color: rgba(15,23,42,.92); }
body.tm-marketing[data-bs-theme="light"] .tm-mobile-link.active{ background: rgba(109,139,255,.10); color: rgba(15,23,42,.92); }

/* Mobile section title */
.tm-mobile-section-title{ font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,.35); padding: .75rem 1.25rem .25rem; }
body.tm-marketing[data-bs-theme="light"] .tm-mobile-section-title{ color: rgba(15,23,42,.35); }

/* Mobile auth buttons (Login / Admin Login) */
.tm-mobile-auth{ padding: .25rem 1.25rem .5rem; display: flex; flex-direction: column; gap: 8px; }
.tm-mobile-auth-btn{ display: flex; align-items: center; gap: .75rem; padding: .75rem; border-radius: 12px; text-decoration: none; border: 1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.04); transition: background .15s, border-color .15s, transform .1s; }
.tm-mobile-auth-btn:hover{ background: rgba(255,255,255,.08); border-color: rgba(109,139,255,.25); transform: translateX(3px); }
html[dir="rtl"] .tm-mobile-auth-btn:hover{ transform: translateX(-3px); }
.tm-mobile-auth-icon{ display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: rgba(109,139,255,.15); color: var(--tm-brand); font-size: 1.1rem; flex-shrink: 0; }
.tm-mobile-auth-icon-admin{ background: rgba(53,208,127,.15); color: var(--tm-brand2); }
.tm-mobile-auth-text{ display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tm-mobile-auth-text strong{ font-size: .9rem; font-weight: 700; color: rgba(255,255,255,.92); }
.tm-mobile-auth-text small{ font-size: .75rem; color: rgba(255,255,255,.45); font-weight: 500; }
.tm-mobile-auth-arrow{ margin-inline-start: auto; color: rgba(255,255,255,.25); font-size: .75rem; flex-shrink: 0; }
body.tm-marketing[data-bs-theme="light"] .tm-mobile-auth-btn{ border-color: rgba(15,23,42,.08); background: rgba(15,23,42,.02); }
body.tm-marketing[data-bs-theme="light"] .tm-mobile-auth-btn:hover{ background: rgba(109,139,255,.06); border-color: rgba(109,139,255,.20); }
body.tm-marketing[data-bs-theme="light"] .tm-mobile-auth-icon{ background: rgba(109,139,255,.10); color: #3b5bdb; }
body.tm-marketing[data-bs-theme="light"] .tm-mobile-auth-icon-admin{ background: rgba(53,208,127,.10); color: #0ca678; }
body.tm-marketing[data-bs-theme="light"] .tm-mobile-auth-text strong{ color: rgba(15,23,42,.92); }
body.tm-marketing[data-bs-theme="light"] .tm-mobile-auth-text small{ color: rgba(15,23,42,.45); }
body.tm-marketing[data-bs-theme="light"] .tm-mobile-auth-arrow{ color: rgba(15,23,42,.20); }

/* Mobile language buttons */
.tm-mobile-lang{ display: flex; gap: 8px; padding: .25rem 1.25rem .5rem; }
.tm-lang-btn{ flex: 1; text-align: center; padding: .5rem; border-radius: 8px; text-decoration: none; font-weight: 700; font-size: .85rem; border: 1px solid rgba(255,255,255,.10); background: transparent; color: rgba(255,255,255,.65); transition: background .15s, border-color .15s, color .15s; }
.tm-lang-btn:hover{ background: rgba(255,255,255,.06); color: rgba(255,255,255,.85); }
.tm-lang-btn.active{ background: rgba(109,139,255,.15); border-color: rgba(109,139,255,.30); color: var(--tm-brand); }
body.tm-marketing[data-bs-theme="light"] .tm-lang-btn{ border-color: rgba(15,23,42,.10); color: rgba(15,23,42,.55); }
body.tm-marketing[data-bs-theme="light"] .tm-lang-btn:hover{ background: rgba(15,23,42,.04); color: rgba(15,23,42,.80); }
body.tm-marketing[data-bs-theme="light"] .tm-lang-btn.active{ background: rgba(109,139,255,.10); border-color: rgba(109,139,255,.25); color: #3b5bdb; }

/* Mobile CTA */
.tm-mobile-actions{ padding: .75rem 1.25rem; margin-top: auto; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid rgba(255,255,255,.06); }
body.tm-marketing[data-bs-theme="light"] .tm-mobile-actions{ border-top-color: rgba(15,23,42,.06); }

/* Buttons */
.tm-btn-primary{
  border: 0;
  background: linear-gradient(135deg, var(--tm-brand) 0%, var(--tm-brand2) 55%, var(--tm-accent) 100%);
  color: #071022;
  font-weight: 900;
  border-radius: 999px;
  padding: .6rem .95rem;
  box-shadow: var(--tm-shadow2);
}
.tm-btn-primary:hover{
  filter: brightness(1.02);
  transform: translateY(-1px);
}
.tm-btn-ghost{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.90);
  font-weight: 900;
  border-radius: 999px;
  padding: .6rem .9rem;
}
.tm-btn-ghost:hover{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.20);
  transform: translateY(-1px);
}
.tm-btn-primary, .tm-btn-ghost{
  position: relative;
  overflow: hidden;
  transition: transform var(--tm-fast) var(--tm-ease), filter var(--tm-fast) var(--tm-ease), background var(--tm-fast) var(--tm-ease), border-color var(--tm-fast) var(--tm-ease);
}
.tm-btn-primary:active,
.tm-btn-ghost:active{
  transform: translateY(0px) scale(.98);
}
.tm-btn-primary::after,
.tm-btn-ghost::after{
  content:"";
  position:absolute;
  inset:-40%;
  background: radial-gradient(40% 40% at 30% 30%, rgba(255,255,255,.55), transparent 60%);
  transform: translateX(-60%) rotate(12deg);
  opacity: 0;
  transition: opacity var(--tm-med) var(--tm-ease), transform var(--tm-slow) var(--tm-ease);
  pointer-events:none;
}
.tm-btn-primary:hover::after,
.tm-btn-ghost:hover::after{
  opacity: .55;
  transform: translateX(25%) rotate(12deg);
}

/* Page */
.tm-page{
  animation: tmFadeIn .25s ease both;
}
@keyframes tmFadeIn{
  from{opacity:0; transform: translateY(6px);}
  to{opacity:1; transform:none;}
}

/* Hero */
.tm-hero{
  position: relative;
  padding: 88px 0 56px;
  overflow: hidden;
}
.tm-hero::before{
  content:"";
  position:absolute;
  inset: -35% -25%;
  background:
    radial-gradient(45% 45% at 25% 35%, rgba(109,139,255,.28), transparent 60%),
    radial-gradient(45% 45% at 70% 40%, rgba(53,208,127,.22), transparent 60%),
    radial-gradient(45% 45% at 55% 75%, rgba(34,211,238,.16), transparent 60%);
  filter: blur(22px);
  animation: tmBlob 14s ease-in-out infinite alternate;
  pointer-events:none;
}
.tm-hero{
  --tm-mx: 0;
  --tm-my: 0;
}
.tm-hero::before{
  transform: translate(calc(var(--tm-mx) * 1.2%), calc(var(--tm-my) * 1.2%));
}
@keyframes tmBlob{
  0%{ transform: translate(-2%, -2%) scale(1); }
  50%{ transform: translate(2%, 0%) scale(1.05); }
  100%{ transform: translate(0%, 2%) scale(1.03); }
}
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  .tm-hero::before{ animation:none !important; }
  .tm-page{ animation:none !important; }
}

/* Performance: reduce heavy effects on smaller screens */
@media (max-width: 991.98px){
  .tm-hero::before{ filter: blur(14px); animation: none; }
  .tm-card-hover::before,
  .tm-card-hover::after,
  .tm-btn-primary::after,
  .tm-btn-ghost::after{ display:none !important; }
}

.tm-eyebrow{
  display:inline-flex;
  gap: .5rem;
  align-items:center;
  padding: .35rem .6rem;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.82);
  font-weight: 900;
  font-size: 12px;
}
.tm-hero h1{
  font-weight: 1000;
  letter-spacing: -.03em;
  line-height: 1.08;
}
.tm-lead{
  color: var(--tm-muted);
  max-width: var(--tm-maxch);
  font-weight: 700;
}

/* Sections */
.tm-section{
  padding: 64px 0;
}
.tm-section-alt{
  background: rgba(255,255,255,.03);
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.tm-maxch{ max-width: var(--tm-maxch); }

.tm-card{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--tm-radius);
  box-shadow: var(--tm-shadow2);
  position: relative;
  overflow: hidden;
}
.tm-card-hover{
  transition: transform var(--tm-med) var(--tm-ease), box-shadow var(--tm-med) var(--tm-ease), border-color var(--tm-med) var(--tm-ease), background var(--tm-med) var(--tm-ease);
}
.tm-card-hover::before{
  content:"";
  position:absolute;
  inset:-1px;
  border-radius: calc(var(--tm-radius) + 1px);
  background: linear-gradient(135deg, rgba(109,139,255,.55), rgba(53,208,127,.45), rgba(34,211,238,.40));
  opacity: 0;
  transition: opacity var(--tm-med) var(--tm-ease);
  pointer-events:none;
}
.tm-card-hover::after{
  content:"";
  position:absolute;
  inset: 1px;
  border-radius: var(--tm-radius);
  background: radial-gradient(40% 40% at 20% 10%, rgba(255,255,255,.10), transparent 60%);
  opacity: 0;
  transition: opacity var(--tm-med) var(--tm-ease);
  pointer-events:none;
}
.tm-card-hover:hover{
  transform: translateY(-3px);
  box-shadow: var(--tm-shadow);
  border-color: rgba(109,139,255,.20);
  background: rgba(255,255,255,.08);
}
.tm-card-hover:hover::before{ opacity: .55; }
.tm-card-hover:hover::after{ opacity: 1; }
.tm-card .tm-icon{
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display:grid;
  place-items:center;
  background: rgba(109,139,255,.16);
  border: 1px solid rgba(109,139,255,.22);
  color: rgba(238,242,255,.92);
}
.tm-kpi{
  border-radius: var(--tm-radius-sm);
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.20);
}

/* Footer */
.tm-footer{
  border-top: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.20);
}
body.tm-marketing[data-bs-theme="light"] .tm-footer{
  border-top-color: var(--tm-border);
  background: rgba(255,255,255,.62);
}
.tm-footer-title{
  font-weight: 900;
  margin-bottom: .65rem;
}
.tm-footer-links a{
  color: rgba(255,255,255,.70);
  text-decoration:none;
  display:inline-block;
  padding: .25rem 0;
}
.tm-footer-links a:hover{
  color: rgba(255,255,255,.92);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Offcanvas */
.tm-offcanvas{
  background: rgba(10,14,26,.96);
  color: rgba(255,255,255,.92);
  border-inline-start: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(20px);
}
.tm-offcanvas .offcanvas-header{
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding-bottom: 1rem;
}
.tm-offcanvas .list-group-item{
  background: transparent;
  color: rgba(255,255,255,.82);
  border-color: rgba(255,255,255,.06);
  padding: .85rem 1rem;
  font-weight: 600;
  transition: background .15s ease, color .15s ease;
}
.tm-offcanvas .list-group-item:hover{
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.96);
}
.tm-offcanvas .list-group-item i{
  color: rgba(109,139,255,.70);
  font-size: 1.1rem;
}

/* Global scroll progress + back to top */
.tm-scroll-progress{
  position: fixed;
  top: 0;
  inset-inline: 0;
  height: 3px;
  z-index: 1400;
  background: transparent;
  pointer-events:none;
}
.tm-scroll-progress-bar{
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--tm-brand) 0%, var(--tm-brand2) 55%, var(--tm-accent) 100%);
  opacity: .9;
}
.tm-backtotop{
  position: fixed;
  inset-inline-end: 16px;
  bottom: 18px;
  z-index: 1400;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.35);
  color: rgba(255,255,255,.92);
  display: grid;
  place-items: center;
  box-shadow: 0 16px 44px rgba(0,0,0,.30);
  transform: translateY(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--tm-med) var(--tm-ease), transform var(--tm-med) var(--tm-ease), background var(--tm-med) var(--tm-ease), border-color var(--tm-med) var(--tm-ease);
}
.tm-backtotop.is-visible{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.tm-backtotop:hover{
  background: rgba(255,255,255,.08);
  border-color: rgba(109,139,255,.28);
  transform: translateY(-2px);
}
body.tm-marketing[data-bs-theme="light"] .tm-backtotop{
  background: rgba(255,255,255,.90);
  color: rgba(15,23,42,.92);
  border-color: var(--tm-border);
  box-shadow: 0 16px 44px rgba(2,6,23,.10);
}
body.tm-marketing[data-bs-theme="light"] .tm-backtotop:hover{
  background: rgba(255,255,255,.98);
  border-color: rgba(109,139,255,.28);
}

/* Docs */
.tm-docs-progress{
  position: sticky;
  top: 0;
  z-index: 1200;
  height: 4px;
  background: rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.tm-docs-progress-bar{
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--tm-brand) 0%, var(--tm-brand2) 55%, var(--tm-accent) 100%);
  transition: width .12s ease-out;
}
.tm-docs-sidebar{
  padding: 14px;
  border-radius: var(--tm-radius);
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.20);
}
body.tm-marketing[data-bs-theme="light"] .tm-docs-sidebar{
  border-color: var(--tm-border);
  background: rgba(255,255,255,.72);
}
.tm-docs-link{
  border-radius: 12px;
  font-weight: 900;
  color: rgba(255,255,255,.70);
}
.tm-docs-link:hover{
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
}
.tm-docs-link.active{
  background: rgba(109,139,255,.16);
  border: 1px solid rgba(109,139,255,.22);
  color: rgba(255,255,255,.92);
}
.tm-docs-content{
  padding: 18px;
  border-radius: var(--tm-radius);
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.20);
}
body.tm-marketing[data-bs-theme="light"] .tm-docs-content{
  border-color: var(--tm-border);
  background: rgba(255,255,255,.72);
}
.tm-docs-section{
  padding: 22px 0;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.tm-docs-section:last-child{
  border-bottom: 0;
}
.tm-docs-section h2,
.tm-docs-section h3{
  scroll-margin-top: 110px;
}
.tm-callout{
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: var(--tm-radius);
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
}
.tm-codeblock{
  margin-top: 12px;
}
.tm-codeblock pre{
  margin: 0;
  padding: 14px 14px;
  border-radius: var(--tm-radius);
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.35);
  overflow: auto;
}
.tm-codeblock code{
  color: rgba(238,242,255,.92);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  font-size: 13px;
  line-height: 1.6;
}
.tm-codecopy{
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  border-radius: 999px;
  padding: .3rem .55rem;
  font-weight: 900;
}

/* Prevent overflow from media/content blocks */
img, svg, video, canvas{
  max-width: 100%;
  height: auto;
}
pre{
  max-width: 100%;
  overflow-x: auto;
}



/* ──────────────────────────────────────────────────────────────────────────────
   SCROLL REVEAL — replaces the AOS library, which blanked the whole public site
   ──────────────────────────────────────────────────────────────────────────────
   `_LayoutMarketing` loaded aos.css + aos.js but NEVER called AOS.init(). AOS's
   stylesheet sets `[data-aos] { opacity: 0 }` and only reveals an element once it
   adds `aos-animate`, which only init() wires up. Result: 57 of 59 blocks on the
   home page — and every block on Architecture, Docs, Investors, Module and
   Platform — rendered at opacity 0. The pages were not "ugly"; they were EMPTY.
   Calling init() by hand did not fix it either (56 -> 56 invisible), so the
   bundled copy is broken rather than merely unstarted; it is gone now.

   The rule below inverts the dependency: markup is READABLE WITH NO JAVASCRIPT
   AT ALL, and the animation is added only after a script has declared itself
   able to run it. A public front page must never need JS to show its words. */
[data-aos] { opacity: 1; transform: none; }

html.tm-reveal [data-aos] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s ease, transform .55s ease;
  will-change: opacity, transform;
}
html.tm-reveal [data-aos].tm-in { opacity: 1; transform: none; }

/* honour the OS setting: no motion, but never hide anything */
@media (prefers-reduced-motion: reduce) {
  html.tm-reveal [data-aos] { opacity: 1; transform: none; transition: none; }
}
