/* ==========================================================================
   Light / dark theme
   js/theme.js sets <html data-theme="light|dark"> (device setting first, then the
   visitor's choice from the sun/moon button). Everything dark lives under
   html[data-theme="dark"], so the light theme is exactly the original design.
   The navigation, banner, product suite and footer are already dark and keep their look.
   ========================================================================== */

/* ---- Theme button (both themes), styled like the LinkedIn circle next to it ---- */
.jt-nav-links > li.jt-nav-theme { display: flex; align-items: center; }
.jt-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: 4px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.3s ease;
}
.jt-theme-toggle:hover,
.jt-theme-toggle:focus { border-color: #fff; color: #fff; }
.jt-theme-toggle:active { transform: rotate(20deg); }
.jt-theme-sun { display: none; }
html[data-theme="dark"] .jt-theme-sun { display: inline-block; }
html[data-theme="dark"] .jt-theme-moon { display: none; }
/* Small screens: the menu is folded behind the ☰ button, so a second theme button
   sits next to it in the bar and the one inside the menu is hidden. */
.jt-theme-toggle-mobile { display: none; }
@media (max-width: 991px) {
  .jt-nav-links > li.jt-nav-theme { display: none; }
  .jt-theme-toggle.jt-theme-toggle-mobile {
    display: inline-flex;
    width: 44px;
    height: 44px;
    margin: 0 10px 0 auto;
    border-color: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    font-size: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .jt-theme-toggle { transition: none; }
  .jt-theme-toggle:active { transform: none; }
}

/* ---- Dark palette ---- */
html[data-theme="dark"] {
  --jt-bg: #0b0c18;          /* page */
  --jt-bg-alt: #10121f;      /* alternate section band */
  --jt-surface: #161a2e;     /* cards */
  --jt-surface-2: #1d2240;   /* inputs, chips, hover */
  --jt-border: rgba(255, 255, 255, 0.10);
  --jt-heading: #f3f5f9;
  --jt-text: #d3d8e2;
  --jt-muted: #a2aaba;
  --jt-link: #7cc0ea;
  --jt-accent-blue: #6cb6e6;
  --jt-red-soft: #ff6b6a;
  color-scheme: dark;
}

html[data-theme="dark"] body,
html[data-theme="dark"] body.jt-subpage { background: var(--jt-bg); color: var(--jt-text); }

/* Section backgrounds (white / pale grey bands become dark bands) */
html[data-theme="dark"] .jt-about,
html[data-theme="dark"] #aboutus.jt-about,
html[data-theme="dark"] #living-software,
html[data-theme="dark"] .jt-living,
html[data-theme="dark"] #news.jt-news,
html[data-theme="dark"] .jt-expertise,
html[data-theme="dark"] .jt-contact { background-color: var(--jt-bg); }
html[data-theme="dark"] #joinus.jt-join,
html[data-theme="dark"] .jt-agile,
html[data-theme="dark"] .jt-news-index { background-color: var(--jt-bg-alt); }

/* These three paint their light band as a gradient image, so the whole background is replaced
   (same soft corner glow as the light design, on a dark base) */
html[data-theme="dark"] #toolsandexpertise.jt-expertise {
  background:
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(33, 142, 205, 0.14), transparent 70%),
    linear-gradient(180deg, var(--jt-bg-alt) 0%, var(--jt-bg) 100%);
}
html[data-theme="dark"] #toolsandexpertise.jt-expertise::before {
  background-image: radial-gradient(rgba(124, 192, 234, 0.22) 1px, transparent 1.2px);
}
html[data-theme="dark"] #agile-process.jt-agile {
  background:
    radial-gradient(ellipse 55% 45% at 0% 0%, rgba(33, 142, 205, 0.14), transparent 70%),
    linear-gradient(180deg, var(--jt-bg) 0%, var(--jt-bg-alt) 100%);
}
html[data-theme="dark"] #contact.jt-contact {
  background:
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(237, 37, 36, 0.10), transparent 70%),
    linear-gradient(180deg, var(--jt-bg) 0%, var(--jt-bg-alt) 100%);
}

/* Text inside the (formerly light) sections */
html[data-theme="dark"] :is(.jt-about, .jt-living, .jt-join, .jt-news, .jt-expertise, .jt-agile, .jt-contact, .jt-subpage main)
  :is(h1, h2, h3, h4, h5, .jt-news-title, .jt-exp-title, .jt-story-title) { color: var(--jt-heading); }
html[data-theme="dark"] :is(.jt-about, .jt-living, .jt-join, .jt-news, .jt-expertise, .jt-agile, .jt-contact, .jt-subpage main)
  :is(p, li, address, label, dd, figcaption, .wow) { color: var(--jt-text); }
html[data-theme="dark"] :is(.jt-about-lead, .jt-section-lead, .jt-news-text, .jt-expertise-lead, .jt-exp-intro, .jt-agile-lead,
  .jt-contact-lead, .jt-contact-form-intro, .jt-contact-reset, .jt-news-date, .jt-contact-label, .jt-benefit p, .jt-job p,
  .jt-story-text, .jt-story-kicker, .jt-facts dt, .jt-gallery-head p, .jt-empty, .jt-pmodal-sub, .jt-job-facts, .jt-apply-intro, .jt-agile-facts span, .jt-sprint-scale > span) { color: var(--jt-muted); }
html[data-theme="dark"] :is(.jt-job-more, .jt-news-more, .jt-news-all a, .jt-techniques-label, .jt-sprint-scale-mid,
  .jt-story-more, .jt-back, .jt-modal-link, .jt-file-text strong) { color: var(--jt-link); }
html[data-theme="dark"] :is(.jt-contact-tiles a, .jt-about a:not([class]), .jt-agile strong, .jt-expertise strong) { color: var(--jt-link); }
html[data-theme="dark"] :is(.jt-job-tag, .jt-sprint-phase) { color: var(--jt-accent-blue); }
html[data-theme="dark"] :is(.jt-eyebrow, .jt-exp-num, .jt-agile-time, .jt-story-kicker strong) { color: var(--jt-red-soft); }
html[data-theme="dark"] .jt-page-hero .jt-back { color: #fff; }

/* Cards and panels */
html[data-theme="dark"] :is(.jt-benefit, .jt-job, .jt-news-card, .jt-platform, .jt-techniques, .jt-vertical,
  .jt-agile-facts, .jt-sprint-card, .jt-contact-ico, .jt-contact-form, .jt-story-card, .jt-facts) {
  background-color: var(--jt-surface);
  border-color: var(--jt-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
html[data-theme="dark"] .jt-job { border-top-color: var(--jt-accent-blue); }
html[data-theme="dark"] .jt-sprint-card { border-color: rgba(108, 182, 230, 0.45); }
html[data-theme="dark"] .jt-contact-form { border-top-color: #ED2524; }
html[data-theme="dark"] :is(.jt-techniques, .jt-platform, .jt-vertical) .wow { background-color: var(--jt-surface); border-color: var(--jt-border); }
html[data-theme="dark"] .jt-expertise li,
html[data-theme="dark"] .jt-contact-tiles li { background-color: var(--jt-surface-2); border-color: var(--jt-border); }
html[data-theme="dark"] .jt-expertise .fa { background-color: rgba(108, 182, 230, 0.12); }
html[data-theme="dark"] .jt-agile-facts li { border-color: var(--jt-border); }
html[data-theme="dark"] .jt-sprint-events { border-color: rgba(255, 255, 255, 0.15); }
html[data-theme="dark"] .jt-agile-time { background-color: rgba(255, 107, 106, 0.14); }
html[data-theme="dark"] :is(.jt-story-media, .jt-gallery a) { background-color: var(--jt-surface-2); }

/* The agile diagram is a drawing on a white background with dark text: it stays white so it is
   readable, but sits in a dark card with rounded corners and is dimmed a little so it doesn't glare */
html[data-theme="dark"] .jt-agile-diagram { background-color: var(--jt-surface); border-color: var(--jt-border); }
html[data-theme="dark"] .jt-agile-diagram img { border-radius: 4px; filter: brightness(0.88); }

/* Sprint timeline: the ring around each numbered circle matched the light background */
html[data-theme="dark"] .jt-sprint-node { box-shadow: 0 0 0 6px var(--jt-bg); }

/* ---- Product Suite cards: dark cards on the (already dark) section ---- */
html[data-theme="dark"] .jt-product-card {
  background: var(--jt-surface);
  color: var(--jt-text);
  box-shadow: 0 0 0 1px var(--jt-border), 0 12px 32px rgba(0, 0, 0, 0.4);
}
/* The product photos have light screens: keep a soft light panel behind them, a little dimmer */
html[data-theme="dark"] .jt-product-media { background: linear-gradient(160deg, #d9e2ec 0%, #c3d0de 100%); }
html[data-theme="dark"] .jt-product-body h3 { color: var(--jt-heading); }
html[data-theme="dark"] .jt-product-body p { color: var(--jt-muted); }
html[data-theme="dark"] .jt-product-tag { background: rgba(108, 182, 230, 0.14); color: var(--jt-link); }
html[data-theme="dark"] .jt-product-link:not(:hover):not(:focus) { border-color: var(--jt-link); color: var(--jt-link); }
/* "Get directions" floats on the map as a white pill: keep its original light look */
html[data-theme="dark"] .jt-contact-directions:not(:hover):not(:focus) { background: #fff; color: #013f5b; }

/* Map: slightly dimmed so it doesn't glare */
html[data-theme="dark"] .jt-contact-mapwrap { background-color: var(--jt-surface); border-color: var(--jt-border); }
html[data-theme="dark"] .jt-contact-map iframe { filter: brightness(0.85) contrast(1.05); }

/* Forms */
html[data-theme="dark"] .form-control {
  background-color: var(--jt-surface-2);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--jt-heading);
}
html[data-theme="dark"] .form-control::placeholder { color: #8a93a5; }
html[data-theme="dark"] .jt-contact-form .form-control:focus,
html[data-theme="dark"] .form-control:focus { background-color: #232850; border-color: var(--jt-accent-blue); box-shadow: 0 0 0 3px rgba(108, 182, 230, 0.2); }
html[data-theme="dark"] .contact-status { background: rgba(46, 160, 90, 0.16); color: #8fe0ae; }
html[data-theme="dark"] .jt-contact-form .contact-status-error { background: rgba(237, 37, 36, 0.16); color: #ffb0af; }

/* Modals (product details, job details, CV form) */
html[data-theme="dark"] .jt-modal .modal-content { background: var(--jt-surface); color: var(--jt-text); }
html[data-theme="dark"] .jt-modal .modal-body { color: var(--jt-text); }
html[data-theme="dark"] .jt-modal :is(h2, h3, h4) { color: var(--jt-heading); }
html[data-theme="dark"] .jt-modal .modal-body :is(p, li, dd, label) { color: var(--jt-text); }
html[data-theme="dark"] .jt-modal .jt-pmodal-aside :is(p, li) { color: inherit; }
html[data-theme="dark"] .jt-modal :is(.jt-pmodal-lead, .jetechlabel) { color: var(--jt-heading); }
html[data-theme="dark"] .jt-modal :is(.jt-pmodal-main p, .jt-checks li) { color: var(--jt-text); }
html[data-theme="dark"] .jt-modal :is(.jt-optional, .jt-help) { color: var(--jt-muted); }
html[data-theme="dark"] .jt-modal :is(.jt-req, .jt-modal-eyebrow) { color: var(--jt-red-soft); }
html[data-theme="dark"] :is(.jt-modal-head, .jt-modal-foot) { border-color: var(--jt-border); }
html[data-theme="dark"] .jt-modal-foot { background: var(--jt-bg-alt); }
html[data-theme="dark"] .jt-modal-btn-ghost { background: transparent; color: var(--jt-heading); border-color: rgba(255, 255, 255, 0.3); }
html[data-theme="dark"] .jt-apply-for { background: var(--jt-surface-2); color: var(--jt-text); }
html[data-theme="dark"] .jt-file { background: var(--jt-surface-2); border-color: rgba(255, 255, 255, 0.2); }
html[data-theme="dark"] :is(.jt-file:hover, .jt-file.is-drag) { background: #232850; }
html[data-theme="dark"] .jt-file.has-file { background: rgba(46, 160, 90, 0.16); }
html[data-theme="dark"] .modal-backdrop.in { opacity: 0.7; }

/* News and story pages */
html[data-theme="dark"] .jt-draft-bar { background: #3a3110; border-bottom-color: #6b5a1c; color: #f5e3a3; }
html[data-theme="dark"] .jt-subpage main :is(.jt-crumbs a, .jt-crumbs [aria-current]) { color: #fff; }

/* Body text links in general */
html[data-theme="dark"] main a:not([class]):not(:is(.jt-products a, .jt-page-hero a)) { color: var(--jt-link); }

/* Keyboard focus ring visible on dark backgrounds */
html[data-theme="dark"] :is(.jt-about, .jt-join, .jt-news, .jt-expertise, .jt-agile, .jt-contact, .jt-subpage main) :focus-visible {
  outline-color: var(--jt-accent-blue);
}
