/**
 * Company & Landing Page V8 RC1.2 — theme-aware contrast integration.
 * Scoped to these four owned pages. The site owns the theme state;
 * Lead Forms owns its data, validators, HTML and submission behavior.
 * No layout, typographic scale, or global plugin styles are overridden.
 */

/* Counteract inherited/visited purple link colors from the current theme.
   Explicit states are critical: the global theme can style a:visited after
   the plugin's unqualified .btn and .lp-nav rules. */
html .stlcv8 a.btn.btn-primary:link,
html .stlcv8 a.btn.btn-primary:visited,
html .stlcv8 a.btn.btn-primary:hover,
html .stlcv8 a.btn.btn-primary:focus-visible,
html .stlcv8 a.btn.btn-primary:active,
html .stlcv8 a.btn.btn-primary span,
html.sl-theme-dark .stlcv8 a.btn.btn-primary:link,
html.sl-theme-dark .stlcv8 a.btn.btn-primary:visited,
html.sl-theme-dark .stlcv8 a.btn.btn-primary:hover,
html.sl-theme-dark .stlcv8 a.btn.btn-primary:focus-visible,
html.sl-theme-dark .stlcv8 a.btn.btn-primary:active,
html.sl-theme-dark .stlcv8 a.btn.btn-primary span {
  color:#fff;
  text-decoration:none;
}
html .stlcv8 a.btn.btn-primary,
html.sl-theme-dark .stlcv8 a.btn.btn-primary {background:#255cf4;border-color:#255cf4}
html .stlcv8 a.btn.btn-primary:hover,
html .stlcv8 a.btn.btn-primary:focus-visible,
html.sl-theme-dark .stlcv8 a.btn.btn-primary:hover,
html.sl-theme-dark .stlcv8 a.btn.btn-primary:focus-visible {background:#1647cf;border-color:#1647cf}
html .stlcv8 a.btn.btn-primary:focus-visible,
html .stlcv8 a.btn.btn-secondary:focus-visible {outline:3px solid #8baeff;outline-offset:3px}

html.sl-theme-dark .stlcv8 a.btn.btn-secondary:link,
html.sl-theme-dark .stlcv8 a.btn.btn-secondary:visited,
html.sl-theme-dark .stlcv8 a.btn.btn-secondary:hover,
html.sl-theme-dark .stlcv8 a.btn.btn-secondary:focus-visible,
html.sl-theme-dark .stlcv8 a.btn.btn-secondary:active,
html.sl-theme-dark .stlcv8 a.btn.btn-secondary span,
html.sl-theme-dark .stlcv8 a.btn.btn-dark-outline:link,
html.sl-theme-dark .stlcv8 a.btn.btn-dark-outline:visited,
html.sl-theme-dark .stlcv8 a.btn.btn-dark-outline:hover,
html.sl-theme-dark .stlcv8 a.btn.btn-dark-outline span {
  color:#f0f5ff;
  text-decoration:none;
}
html.sl-theme-dark .stlcv8 a.btn.btn-secondary,
html.sl-theme-dark .stlcv8 a.btn.btn-dark-outline,
html.sl-theme-dark .stlcv8 .team-hero a.btn.btn-dark-outline {
  background:#14233b;
  border-color:#526788;
}
html.sl-theme-dark .stlcv8 a.btn.btn-secondary:hover,
html.sl-theme-dark .stlcv8 a.btn.btn-dark-outline:hover,
html.sl-theme-dark .stlcv8 a.btn.btn-secondary:focus-visible {
  background:#1b3050;
  border-color:#839dca;
}
/* Team primary CTA uses .btn-dark instead of .btn-primary in R07. */
html.sl-theme-dark .stlcv8 .team-hero a.btn.btn-dark:link,
html.sl-theme-dark .stlcv8 .team-hero a.btn.btn-dark:visited,
html.sl-theme-dark .stlcv8 .team-hero a.btn.btn-dark:hover,
html.sl-theme-dark .stlcv8 .team-hero a.btn.btn-dark:focus-visible,
html.sl-theme-dark .stlcv8 .team-hero a.btn.btn-dark span {color:#fff;text-decoration:none}
html.sl-theme-dark .stlcv8 .team-hero a.btn.btn-dark {background:#255cf4;border-color:#255cf4}
html.sl-theme-dark .stlcv8 .team-hero a.btn.btn-dark:hover {background:#1647cf}

/* Light mode is intentionally the approved R07 palette; visited links still
   inherit the correct component rather than browser purple. */
html:not(.sl-theme-dark) .stlcv8 a.btn.btn-secondary:visited,
html:not(.sl-theme-dark) .stlcv8 a.btn.btn-secondary span {color:#151c2d}
/* This is a blue primary CTA in the light Team hero, not a white button.
   Match the existing blue primary CTA contract in every interactive state. */
html:not(.sl-theme-dark) .stlcv8 .team-hero a.btn.btn-dark:link,
html:not(.sl-theme-dark) .stlcv8 .team-hero a.btn.btn-dark:visited,
html:not(.sl-theme-dark) .stlcv8 .team-hero a.btn.btn-dark:hover,
html:not(.sl-theme-dark) .stlcv8 .team-hero a.btn.btn-dark:focus-visible,
html:not(.sl-theme-dark) .stlcv8 .team-hero a.btn.btn-dark:active,
html:not(.sl-theme-dark) .stlcv8 .team-hero a.btn.btn-dark span {color:#fff;text-decoration:none}
html:not(.sl-theme-dark) .stlcv8 .team-hero a.btn.btn-dark-outline:visited {color:#151c2d}

html.sl-theme-dark .stlcv8 :is(.lp-nav,.lp-mobile-nav,.lp-footer-top nav) a:link,
html.sl-theme-dark .stlcv8 :is(.lp-nav,.lp-mobile-nav,.lp-footer-top nav) a:visited,
html.sl-theme-dark .stlcv8 :is(.site-nav,.profile-links,.role-meta) a:link,
html.sl-theme-dark .stlcv8 :is(.site-nav,.profile-links,.role-meta) a:visited {color:#e3edff}
html.sl-theme-dark .stlcv8 :is(.lp-nav,.lp-mobile-nav,.lp-footer-top nav,.site-nav,.profile-links) a:hover,
html.sl-theme-dark .stlcv8 :is(.lp-nav,.lp-mobile-nav,.lp-footer-top nav,.site-nav,.profile-links) a:focus-visible {color:#aec4ff}
html:not(.sl-theme-dark) .stlcv8 :is(.lp-nav,.lp-mobile-nav,.lp-footer-top nav) a:visited {color:#414d60}

/* Contrast-preserving labels, badges, and content on the V8 surfaces only. */
html.sl-theme-dark .stlcv8 .story-quote {background:linear-gradient(130deg,#1a2e4d,#131f33);border-color:#7b9dff}
html.sl-theme-dark .stlcv8 .story-quote p {color:#f0f5ff}
html.sl-theme-dark .stlcv8 .story-quote span {color:#9bb6ff}
html.sl-theme-dark .stlcv8 :is(.eyebrow,.section-number,.lp-kicker,.lp-overline,.lp-contact-form-head span:not(.lp-contact-icon)) {color:#a9beff}
html.sl-theme-dark .stlcv8 :is(.lp-contact-right,.lp-contact-form-head,.lp-faq-grid details,.lp-foundation-card,.lp-deliver-card,.lp-highlight-card,.lp-quality-panel) {color:#eaf1ff}
html.sl-theme-dark .stlcv8 :is(.lp-faq-grid details,.lp-foundation-card,.lp-deliver-card,.lp-highlight-card) {border-color:#314563}
html.sl-theme-dark .stlcv8 .lp-footer-bottom a:link,
html.sl-theme-dark .stlcv8 .lp-footer-bottom a:visited {color:#b4caff}

/* RC1.3: use the exact V8 Header/Footer theme-toggle markup and visual rules.
 * This duplicates only its 44px control styling, not its header or its theme
 * engine. The site-wide [data-slc-theme-toggle] handler remains the only
 * click handler and keeps the global theme preference synchronized. */
.stlcv8 .lp-mini-header .stlv8-theme-toggle {
  appearance:none;
  box-sizing:border-box;
  display:grid;
  place-items:center;
  flex:0 0 44px;
  width:44px;
  min-width:44px;
  height:44px;
  padding:0;
  border:1px solid #e2e7ef;
  border-radius:12px;
  background:#fff;
  color:#101724;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  font-size:16px;
  font-weight:400;
  line-height:1;
  cursor:pointer;
}
.stlcv8 .lp-mini-header .stlv8-theme-toggle:hover {
  border-color:var(--stlv8-blue,#2358ef);
}
.stlcv8 .lp-mini-header .stlv8-theme-toggle:focus-visible {
  outline:2px solid var(--stlv8-blue,#2358ef);
  outline-offset:3px;
}
.stlcv8 .lp-mini-header .stlv8-theme-toggle .stlv8-theme-icon-sun,
.stlcv8 .lp-mini-header .stlv8-theme-toggle .stlv8-theme-icon-moon {
  line-height:1;
  font-size:19px;
  font-weight:400;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
}
.stlcv8 .lp-mini-header .stlv8-theme-toggle .stlv8-theme-icon-sun {display:none}
.stlcv8 .lp-mini-header .stlv8-theme-toggle .stlv8-theme-icon-moon {display:flex}
html.sl-theme-dark .stlcv8 .lp-mini-header .stlv8-theme-toggle {
  background:#101727;
  color:#f6f8fd;
  border-color:#273347;
}
html.sl-theme-dark .stlcv8 .lp-mini-header .stlv8-theme-toggle:hover {
  border-color:var(--stlv8-blue,#2358ef);
}
html.sl-theme-dark .stlcv8 .lp-mini-header .stlv8-theme-toggle .stlv8-theme-icon-sun {display:flex}
html.sl-theme-dark .stlcv8 .lp-mini-header .stlv8-theme-toggle .stlv8-theme-icon-moon {display:none}
@media(max-width:700px) {
  .stlcv8 .lp-mini-header .stlv8-theme-toggle {width:42px;min-width:42px;height:42px;flex-basis:42px}
}

/* Lead Forms' default inline CSS hard-codes a white form and black text.
   Scope the bridge to forms embedded by this plugin, never the global floating
   Lead Forms CTA or any form on another page. */
html.sl-theme-dark .stlcv8 .slf-inline-embed .slf-inline-shell {
  background:#15243a;
  color:#f0f5ff;
  border-color:#4c6281;
  box-shadow:0 18px 44px rgba(0,0,0,.28);
}
html.sl-theme-dark .stlcv8 .slf-inline-embed :is(.slf-inline-title,.slf-progress__text,.slf-step__title,.slf-note,.slf-choice,.slf-file__name,.slf-success,.slf-success__title,.slf-success__msg,.slf-form label) {color:#f0f5ff}
html.sl-theme-dark .stlcv8 .slf-inline-embed .slf-form :is(input[type='text'],input[type='email'],input[type='tel'],input[type='url'],input[type='password'],input[type='number'],input[type='date'],input[type='search'],select,textarea),
html.sl-theme-dark .stlcv8 .slf-inline-embed .slf-file {
  color:#f0f5ff;
  background:#0d192a;
  border-color:#536b8b;
  color-scheme:dark;
}
html.sl-theme-dark .stlcv8 .slf-inline-embed .slf-form :is(input,textarea)::placeholder {color:#b9c9df;opacity:1}
html.sl-theme-dark .stlcv8 .slf-inline-embed .slf-form :is(input,select,textarea):focus-visible {outline:3px solid #96b4ff;outline-offset:2px;border-color:#96b4ff}
html.sl-theme-dark .stlcv8 .slf-inline-embed .slf-progress__bar {background:#344967}
html.sl-theme-dark .stlcv8 .slf-inline-embed .slf-progress__fill {background:#86a9ff}
html.sl-theme-dark .stlcv8 .slf-inline-embed .slf-req {color:#ff9eae}
html.sl-theme-dark .stlcv8 .slf-inline-embed .slf-privacy:link,
html.sl-theme-dark .stlcv8 .slf-inline-embed .slf-privacy:visited {color:#c0d0ff}
html.sl-theme-dark .stlcv8 .slf-inline-embed :is(.slf-nav__next,.slf-submit) {
  color:#fff;
  background:#255cf4;
  border-color:#255cf4;
  opacity:1;
}
html.sl-theme-dark .stlcv8 .slf-inline-embed :is(.slf-nav__next,.slf-submit):not([disabled]):hover {background:#1647cf;border-color:#1647cf;color:#fff}
html.sl-theme-dark .stlcv8 .slf-inline-embed :is(.slf-nav__next,.slf-submit)[disabled] {
  color:#dde7f8;
  background:#2a3d5c;
  border-color:#526785;
  opacity:1;
  cursor:not-allowed;
}
html.sl-theme-dark .stlcv8 .slf-inline-embed :is(.slf-nav__back,.slf-file__btn) {
  color:#f0f5ff;
  background:#213650;
  border-color:#637b9b;
}
html.sl-theme-dark .stlcv8 .slf-inline-embed .slf-note.is-bad {color:#ffd4db;background:#51263b;border-color:#ad5367}
html.sl-theme-dark .stlcv8 .slf-inline-embed .slf-file__btn:hover {background:#2f4b6b}
/* Make sure theme light-mode visited and disabled controls remain legible. */
html:not(.sl-theme-dark) .stlcv8 .slf-inline-embed .slf-submit[disabled] {color:#36435a;opacity:1;background:#e9edf5;border-color:#cbd4e3}

@media (prefers-reduced-motion:reduce) {
  .stlcv8 :is(.btn,.stlv8-theme-toggle) {transition:none;transform:none}
}

/* Remaining editorial links have no .btn class. The legacy Core's generic
   dark a:not(...) selector gives them purple regardless of V8 design. */
html.sl-theme-dark .stlcv8 a:not(.btn):link,
html.sl-theme-dark .stlcv8 a:not(.btn):visited {color:#b9caff}
html.sl-theme-dark .stlcv8 a:not(.btn):hover,
html.sl-theme-dark .stlcv8 a:not(.btn):focus-visible {color:#e2eaff}
/* Navigation remains neutral, not blue; editorial links remain accented. */
html.sl-theme-dark .stlcv8 :is(.lp-nav,.lp-mobile-nav,.lp-footer-top nav,.site-nav) a:not(.btn):link,
html.sl-theme-dark .stlcv8 :is(.lp-nav,.lp-mobile-nav,.lp-footer-top nav,.site-nav) a:not(.btn):visited {color:#e3edff}
html.sl-theme-dark .stlcv8 :is(.lp-nav,.lp-mobile-nav,.lp-footer-top nav,.site-nav) a:not(.btn):hover {color:#aec4ff}
/* Any .btn-dark elsewhere on the four pages must remain legible as well. */
html.sl-theme-dark .stlcv8 a.btn.btn-dark:link,
html.sl-theme-dark .stlcv8 a.btn.btn-dark:visited,
html.sl-theme-dark .stlcv8 a.btn.btn-dark:hover,
html.sl-theme-dark .stlcv8 a.btn.btn-dark:focus-visible,
html.sl-theme-dark .stlcv8 a.btn.btn-dark span {color:#fff;text-decoration:none}
html.sl-theme-dark .stlcv8 a.btn.btn-dark {background:#255cf4;border-color:#255cf4}
html.sl-theme-dark .stlcv8 a.btn.btn-dark:hover {background:#1647cf;border-color:#1647cf}
/* Keep Lead Forms internal text scales owned by Lead Forms, not global H3/H4. */
body.stlgc-global-type .stlcv8 .slf-inline-embed .slf-inline-title,
.stlcv8 .slf-inline-embed .slf-inline-title {font-size:22px;font-weight:700}
body.stlgc-global-type .stlcv8 .slf-inline-embed .slf-step__title,
.stlcv8 .slf-inline-embed .slf-step__title {font-size:14px;font-weight:600}


/* RC1.3: tablet and mobile fixes, scoped to the Company V8 illustrations.
 * At 768..1024px the four genuine team portraits occupy one even row;
 * the About Us code illustration and Landing hero visual fill their grid
 * column rather than being capped at their desktop widths. */
@media (min-width:768px) and (max-width:1024px) {
  .stlcv8 .team-hero-rich .team-head {grid-template-columns:minmax(0,1fr)}
  .stlcv8 .team-hero-rich .hero-portrait-stack {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    width:100%;
    min-width:0;
    justify-self:stretch;
    gap:12px;
  }
  .stlcv8 .team-hero-rich .team-real-portraits .mini-portrait,
  .stlcv8 .team-hero-rich .team-real-portraits .mini-portrait:nth-child(n) {
    width:100%;
    min-width:0;
    margin:0;
    height:clamp(154px,20vw,206px);
  }
  .stlcv8 .stlcv8-about .studio-art {
    max-width:none;
    width:100%;
    min-width:0;
    height:auto;
    min-height:0;
  }
  .stlcv8 .stlcv8-about .studio-flair {
    position:relative;
    inset:auto;
    display:table;
    width:max-content;
    max-width:calc(100% - 36px);
    margin:0 18px 20px auto;
  }
  .stlcv8 .lp-hero-grid {grid-template-columns:minmax(0,1fr);gap:40px}
  .stlcv8 .lp-hero-copy {max-width:100%}
  .stlcv8 .lp-hero .lp-visual {max-width:none;width:100%;min-width:0;margin-inline:0}
}
/* A floating decorative badge was covering the sample code on narrow
 * screens. Let the illustration grow with content, stack its two panels,
 * and flow its badge beneath them rather than absolutely over code. */
@media (max-width:767px) {
  .stlcv8 .stlcv8-about .studio-art {height:auto;min-height:0;max-width:none}
  .stlcv8 .stlcv8-about .studio-body {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:16px;
    padding:20px 18px 10px;
  }
  .stlcv8 .stlcv8-about .studio-code {min-height:0;overflow-wrap:anywhere}
  .stlcv8 .stlcv8-about .studio-card {
    transform:none;
    min-height:0;
    width:100%;
    margin:0;
  }
  .stlcv8 .stlcv8-about .studio-flair {
    position:relative;
    inset:auto;
    display:table;
    width:max-content;
    max-width:calc(100% - 36px);
    margin:10px 18px 20px auto;
  }
}


/* RC1.4: Genuine team portraits are photos, not blank avatar placeholders.
 * The legacy decorative silhouette pseudo-elements produced opaque circles
 * across real faces. Disable these only for real hero portraits. */
.stlcv8 .team-hero-rich .team-real-portraits .mini-portrait::before,
.stlcv8 .team-hero-rich .team-real-portraits .mini-portrait::after {
  content:none;
  display:none;
}

/* Tablet presentation: one full-width row of four portraits ABOVE the
 * editorial content. Includes 768px exactly and stops at 1024px exactly. */
@media (min-width:768px) and (max-width:1024px) {
  .stlcv8 .team-hero-rich .team-head {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    row-gap:32px;
    align-items:start;
  }
  .stlcv8 .team-hero-rich .team-head > .hero-portrait-stack {
    grid-row:1;
    grid-column:1;
    align-self:stretch;
    justify-self:stretch;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
    padding:0;
    margin:0;
    width:100%;
    min-width:0;
  }
  .stlcv8 .team-hero-rich .team-head > .team-hero-copy {
    grid-row:2;
    grid-column:1;
    min-width:0;
    max-width:100%;
  }
  .stlcv8 .team-hero-rich .team-real-portraits > .mini-portrait,
  .stlcv8 .team-hero-rich .team-real-portraits > .mini-portrait:nth-child(n) {
    width:100%;
    min-width:0;
    height:clamp(168px,22vw,218px);
    margin:0;
    border-radius:14px;
  }
  .stlcv8 .team-hero-rich .team-real-portraits .mini-portrait span {
    font-size:12px;
    line-height:1.4;
    padding:14px 6px 8px;
  }
}

/* Mobile below 768px: preserve headline/copy first and display the four
 * photos in a balanced 2 × 2 grid; never force a cramped four-column row. */
@media (max-width:767px) {
  .stlcv8 .team-hero-rich .team-head {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:26px;
  }
  .stlcv8 .team-hero-rich .team-head > .hero-portrait-stack {
    grid-row:auto;
    grid-column:auto;
    align-self:stretch;
    justify-self:stretch;
    width:100%;
    min-width:0;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
    padding:0;
    margin:0;
  }
  .stlcv8 .team-hero-rich .team-real-portraits > .mini-portrait,
  .stlcv8 .team-hero-rich .team-real-portraits > .mini-portrait:nth-child(n) {
    width:100%;
    min-width:0;
    margin:0;
    height:clamp(154px,48vw,235px);
    border-radius:14px;
  }
  .stlcv8 .team-hero-rich .team-real-portraits .mini-portrait span {
    font-size:12px;
    line-height:1.4;
    padding:16px 6px 8px;
  }
}
