/* TutorTracer light theme + dot-removal overrides
 * Layered AFTER the Webflow stylesheets so these rules win.
 * - Remove dot-grid + noise grain from hero
 * - When html[data-theme="light"]: swap interface tokens to a light palette
 */

/* ============ Remove dot-grid from EVERY gradient section (keep noise grain) ============ */
.grid-bg {
  display: none !important;
}

/* ============ Floating chatbar (sticky pill + expandable panel) ============ */
.tt-chatbar {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(420px, calc(100vw - 32px));
  transition: width 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;  /* let underlying clicks through outside children */
}
.tt-chatbar[data-open="true"] {
  width: min(640px, calc(100vw - 32px));
}
.tt-chatbar > * { pointer-events: auto; }

/* ---- Input pill ---- */
.tt-chatbar-input-wrap {
  position: relative;
  border-radius: 999px;
}
.tt-chatbar-glow {
  position: absolute;
  inset: -28px -36px;
  background:
    radial-gradient(60% 90% at 18% 60%, rgba(18, 160, 106, 0.55) 0%, transparent 70%),
    radial-gradient(50% 80% at 78% 50%, rgba(196, 224, 106, 0.45) 0%, transparent 70%),
    radial-gradient(45% 80% at 50% 110%, rgba(70, 190, 170, 0.55) 0%, transparent 70%);
  filter: blur(28px);
  opacity: 0.85;
  pointer-events: none;
  border-radius: 999px;
  z-index: 0;
  animation: tt-glow-drift 14s ease-in-out infinite alternate;
}
@keyframes tt-glow-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(0, -4px, 0) scale(1.04); }
}
.tt-chatbar-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 12px 36px rgba(50, 30, 80, 0.18),
    0 2px 6px rgba(50, 30, 80, 0.08);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  z-index: 1;
}
.tt-chatbar-field {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 15px;
  line-height: 1.4;
  padding: 12px 0;
  color: #1e1e1e;
  font-family: inherit;
}
.tt-chatbar-field::placeholder { color: rgba(30, 30, 30, 0.5); }
.tt-chatbar-send {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: rgba(30, 30, 30, 0.85);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, transform 0.2s, opacity 0.2s;
}
.tt-chatbar-send:hover:not(:disabled) { background: #1e1e1e; transform: translateY(-1px); }
.tt-chatbar-send:disabled { opacity: 0.35; cursor: not-allowed; }

/* ---- Expandable chat panel ---- */
.tt-chatbar-panel {
  position: relative;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 24px 60px rgba(50, 30, 80, 0.22),
    0 4px 12px rgba(50, 30, 80, 0.08);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
  display: flex;
  flex-direction: column;
  max-height: min(560px, 70vh);
  overflow: hidden;
  opacity: 0;
  transform: translateY(24px) scale(0.88);
  transform-origin: bottom center;
  pointer-events: none;
  transition:
    opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    max-height 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: 0;
}
.tt-chatbar[data-open="true"] .tt-chatbar-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  max-height: min(560px, 70vh);
}
.tt-chatbar-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(30, 30, 30, 0.06);
}
.tt-chatbar-panel-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #1e1e1e;
}
.tt-chatbar-panel-minimize {
  background: transparent;
  border: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(30, 30, 30, 0.6);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.tt-chatbar-panel-minimize:hover {
  background-color: rgba(30, 30, 30, 0.06);
  color: #1e1e1e;
}
.tt-chatbar-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tt-chat-msg {
  font-size: 14px;
  line-height: 1.55;
  max-width: 92%;
  color: #1e1e1e;
}
.tt-chat-msg a { color: #4a4ad0; text-decoration: underline; }
.tt-chat-msg-user {
  align-self: flex-end;
  background: rgba(30, 30, 30, 0.08);
  padding: 9px 14px;
  border-radius: 16px 16px 4px 16px;
  max-width: 78%;
}
.tt-chat-msg-bot {
  align-self: flex-start;
  background: transparent;
  padding: 2px 0;
}
.tt-chat-msg-pending { opacity: 0.55; font-style: italic; }
.tt-chat-msg-bot p { margin: 0 0 8px; }
.tt-chat-msg-bot p:last-child { margin-bottom: 0; }

@media (max-width: 480px) {
  .tt-chatbar { bottom: 14px; width: calc(100vw - 16px); }
  .tt-chatbar-panel { max-height: 60vh; }
}

/* ============ Generic page hero (used by feature + about + resources pages) ============ */
.tt-page {
  padding: 96px 0 64px;
}
.tt-page-inner {
  max-width: var(--containers--main-container-with-gutters, 1248px);
  margin: 0 auto;
  padding: 0 var(--globals--gutter, 24px);
  width: 100%;
}
.tt-page-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 20px;
}
.tt-page-inner h1 { margin-bottom: 20px; max-width: 820px; }
.tt-page-lede {
  font-size: 20px;
  line-height: 1.5;
  opacity: 0.75;
  max-width: 720px;
  margin-bottom: 48px;
}
.tt-page-section { margin-top: 56px; }
.tt-page-section h2 { margin-bottom: 16px; font-size: 28px; line-height: 1.2; }
.tt-page-section p,
.tt-page-section li {
  font-size: 16px;
  line-height: 1.7;
  opacity: 0.8;
  margin-bottom: 12px;
}
.tt-page-section ul { padding-left: 22px; margin-bottom: 24px; }

/* Three-column feature/value list inside a page */
.tt-page-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-top: 32px;
}
.tt-page-grid > div {
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  padding: 24px;
}
.tt-page-grid h3 { font-size: 17px; margin-bottom: 10px; }
.tt-page-grid p { font-size: 14px; line-height: 1.55; opacity: 0.7; margin: 0; }
@media (max-width: 800px) {
  .tt-page-grid { grid-template-columns: 1fr; }
}

/* Job listings */
.tt-jobs { display: flex; flex-direction: column; gap: 16px; margin-top: 32px; }
.tt-job {
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 16px;
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.tt-job-meta { display: flex; flex-direction: column; gap: 4px; }
.tt-job-title { font-size: 20px; font-weight: 600; }
.tt-job-sub { font-size: 14px; opacity: 0.65; }
.tt-job a {
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.25);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.2s;
}
.tt-job a:hover { background-color: rgba(0,0,0,0.06); }
@media (max-width: 640px) {
  .tt-job { flex-direction: column; align-items: flex-start; }
}

/* ============ Right-align everything in the navbar except the logo, with consistent spacing ============ */
.navbar-row {
  justify-content: flex-start !important;
  gap: 36px;
}
.navbar-row .nav-logo-link { margin-right: auto !important; }
/* Tighten the link/CTA group so Login sits naturally next to Request a Demo */
.navbar-row > .hide-mobile,
.navbar-row > .button.small.hide-mobile {
  margin-left: 0;
}

/* ============ CSS-only dropdown hover (Webflow JS doesn't bind new nav-dropdowns) ============ */
.navbar .w-dropdown { position: relative; }
.navbar .nav-dropdown.w-dropdown:hover > .dropdown-element.w-dropdown-list,
.navbar .nav-dropdown.w-dropdown:focus-within > .dropdown-element.w-dropdown-list {
  display: block !important;
}
.navbar .dropdown-element.w-dropdown-list {
  position: absolute;
  top: 100%;
  right: 0;        /* anchor to right edge of trigger so dropdown extends LEFT, never overflows viewport */
  left: auto;
  min-width: 640px;
  max-width: min(820px, 92vw);
  z-index: 1000;
}
.navbar .dropdown-wrapper {
  background-color: var(--colors-interface--dark);
  border: 1px solid var(--colors-interface--white-border);
  border-radius: 14px;
  padding: 28px;
  margin-top: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12);
}
.navbar .dropdown-menus._3-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding-bottom: 0;
}
.navbar .dropdown-menu {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ============ Custom navbar dropdown items ============ */
.tt-nav-link {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 12px 14px;
  margin: -12px -14px;
  border-radius: 10px;
  transition: background-color 0.2s;
}
.tt-nav-link:hover { background-color: var(--colors-interface--white-faded-hover); }
.tt-nav-link-title {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  margin-bottom: 6px;
}
.tt-nav-link-desc {
  font-size: 13px;
  line-height: 1.45;
  opacity: 0.6;
}

/* ============ Hero: left-align content (matches Configured-to-integrate line) ============ */
.wide-section-content.hero-1 .hero-1-content-wrap {
  text-align: left !important;
  align-items: flex-start !important;
  justify-content: center !important;
}
.wide-section-content.hero-1 .hero-2-content {
  text-align: left !important;
  align-items: flex-start !important;
  margin-left: 0 !important;
  margin-right: auto !important;
  max-width: var(--containers--content-l);
}
.wide-section-content.hero-1 .display-heading {
  text-align: left !important;
}

/* ============ Light theme token overrides ============
   Webflow redeclares these vars on `body` inside @media (max-width:767px) and
   (max-width:479px). Those rules outrank a plain `html[data-theme="light"]`
   override on mobile, so we must also override at the `body` level with higher
   specificity than the plain `body` selector. */
html[data-theme="light"],
html[data-theme="light"] body {
  --colors-interface--dark:           #ffffff;
  --colors-interface--dark-2:         #f4f4f6;
  --colors-interface--white:          #1e1e1e;
  --colors-interface--body-text:      #1e1e1ecc;        /* ~80% black */
  --colors-interface--faded-heading:  #1e1e1e80;
  --colors-interface--white-border:   #0000001f;        /* dark hairline on light */
  --colors-interface--white-faded:    #00000008;
  --colors-interface--white-faded-hover: #00000014;
  --colors-interface--glass-bg-dark:  #ffffff80;        /* light glass */
  --colors-interface--glass-bg-white: #00000010;
  /* Sopal brand gradient palette (was TT blue-grey/lavender/purple/coral) */
  --colors-brand--brand-1: #5fa07e;
  --colors-brand--brand-2: #86d8c6;
  --colors-brand--brand-3: #12a06a;
  --colors-brand--brand-4: #c4e06a;
}

/* Body baseline */
html[data-theme="light"] body {
  background-color: var(--colors-interface--dark);
  color: var(--colors-interface--white);
}

/* Anything Webflow hardcoded against pure white needs darkening on light bg */
html[data-theme="light"] .heading-h1,
html[data-theme="light"] .heading-h2,
html[data-theme="light"] .heading-h3,
html[data-theme="light"] .heading-h4,
html[data-theme="light"] .heading-h5,
html[data-theme="light"] .heading-h6,
html[data-theme="light"] .display-heading {
  color: var(--colors-interface--white);
}

/* Swap navbar logo from white to black variant */
html[data-theme="light"] .navbar-logo {
  content: url("../images/sopal-logo.png");
}

/* Toggle button is currently force-hidden — site is locked to light mode.
   To re-enable, remove the next rule AND flip FORCE_LIGHT_ONLY in tt-theme-toggle.js. */
.tt-theme-toggle { display: none !important; }

/* Theme toggle button (lives in the navbar) */
.tt-theme-toggle {
  appearance: none;
  background: transparent;
  border: 1px solid var(--colors-interface--white-border);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  margin: 0 12px;
  cursor: pointer;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color .2s, border-color .2s;
}
.tt-theme-toggle:hover {
  background-color: var(--colors-interface--white-faded-hover);
}
.tt-theme-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
}
/* Show moon in dark mode, sun in light mode */
.tt-theme-toggle .tt-icon-sun  { display: none; }
.tt-theme-toggle .tt-icon-moon { display: block; }
html[data-theme="light"] .tt-theme-toggle .tt-icon-sun  { display: block; }
html[data-theme="light"] .tt-theme-toggle .tt-icon-moon { display: none; }

/* Keep the hero gradient blobs visible in light mode too —
   they're the brand identity. Just soften the brand-1 base slightly so the
   page feels lighter when scrolling out of the hero. */
html[data-theme="light"] .wide-section-content {
  background-color: var(--colors-brand--brand-1);  /* keep gradient base */
}

/* The noise grain PNG is dark-on-transparent, designed for a dark page.
   On a light page it darkens whatever sits below. Invert it in light mode
   so it becomes a light grain (still visible, no darkening). */
html[data-theme="light"] .noise-bg {
  filter: invert(1);
}

/* Globe dot color is now switched in the index.html globe script directly
   (CSS invert produced gray edges). See window.__ttGlobeApplyTheme(). */

/* Brighten + lightly saturate every gradient section on a white page. */
html[data-theme="light"] .wide-section-content {
  filter: brightness(1.3) saturate(1.1);
}

/* ---------- Footer text — force visible-on-white ---------- */
html[data-theme="light"] .footer,
html[data-theme="light"] .footer * {
  color: var(--colors-interface--white);
}
html[data-theme="light"] .footer-link,
html[data-theme="light"] .footer-copyright-text,
html[data-theme="light"] .footer-fine-print {
  opacity: 0.75;
}
html[data-theme="light"] .footer-link:hover {
  opacity: 1;
}
html[data-theme="light"] .footer-bottom {
  border-top-color: rgba(0, 0, 0, 0.12);
}

/* ---------- Comparison table — inline white borders are invisible on white ---------- */
html[data-theme="light"] table th,
html[data-theme="light"] table td {
  border-color: rgba(0, 0, 0, 0.10) !important;
}
/* The wrapper div uses inline border:1px solid rgba(255,255,255,0.08) */
html[data-theme="light"] div[style*="rgba(255,255,255,0.08)"] {
  border-color: rgba(0, 0, 0, 0.12) !important;
}
/* The "With TutorTracer" highlighted column background works on light too,
   but boost contrast slightly so it reads. */
html[data-theme="light"] th[style*="rgba(34,197,94,0.08)"],
html[data-theme="light"] td[style*="rgba(34,197,94,0.08)"] {
  background-color: rgba(34, 197, 94, 0.12) !important;
}
