/* ==========================================================================
   Theme toggle + hand-written dark-mode tweaks.
   Colour overrides generated from style.css live in css/dark-auto.css.
   ========================================================================== */

/* ---------- Header toggle button ---------- */
#navs > nav{margin-left:auto;}
.theme-toggle{
    display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;
    width:40px;height:40px;margin-left:18px;padding:0;border-radius:50%;
    background:rgba(255,255,255,0.08);border:1px solid rgba(255,255,255,0.28);color:#fff;
    transition:background 0.3s ease,border-color 0.3s ease,color 0.3s ease;
}
.theme-toggle:hover{background:rgba(255,255,255,0.18);}
.theme-toggle:focus-visible{outline:2px solid var(--lblue);outline-offset:2px;}
.theme-toggle svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.theme-toggle .tt-moon{fill:currentColor;stroke:none;}
/* show the icon for the theme you will switch TO */
.theme-toggle .tt-moon,html[data-theme="dark"] .theme-toggle .tt-sun{display:block;}
.theme-toggle .tt-sun,html[data-theme="dark"] .theme-toggle .tt-moon{display:none;}
/* light sticky header has a white bar */
.sp-sticky.sp-active .theme-toggle{background:#f1f5fb;border-color:#dbe4f0;color:#194B80;}
html[data-theme="dark"] .sp-sticky.sp-active .theme-toggle{background:rgba(255,255,255,0.08);border-color:rgba(255,255,255,0.18);color:#fff;}
/* dark mode: keep the sun icon solid white in every header state */
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .theme-toggle:hover{color:#fff;}
html[data-theme="dark"] .theme-toggle svg,
html[data-theme="dark"] .theme-toggle .tt-sun circle{stroke:#fff;stroke-width:2;opacity:1;}
/* dark mode: hamburger / close lines stay white too */
html[data-theme="dark"] .side-menu-close span{background:#fff;}
/* dark mode: mobile-menu submenu arrows (JS injects them with fill="#000") */
html[data-theme="dark"] .side-menu-nav li.has-child > i svg path{fill:#fff;}
@media (max-width:1099px){
    .theme-toggle{margin-left:auto;margin-right:10px;width:38px;height:38px;}
    #navs > .side-menu-close{margin-left:0 !important;}
}

/* ---------- Dark base ---------- */
html[data-theme="dark"]{color-scheme:dark;background:#050608;}
html[data-theme="dark"] body{background:#050608;}
html[data-theme="dark"] ::selection{background:#194B80;color:#fff;}

/* Sticky header: dark glass bar instead of white */
/* no backdrop-filter here: it would make the header the containing block of the fixed mega menu */
html[data-theme="dark"] .sp-sticky.sp-active{background:#08090d !important;box-shadow:0 1px 0 rgba(255,255,255,0.06);}
html[data-theme="dark"] header.sp-active .st0{fill:#fff;}
html[data-theme="dark"] .sp-active .side-menu-close span{background:#fff;}

/* Footer + enquiry band: black instead of navy */
html[data-theme="dark"] footer{background:#050608;border-top-color:rgba(255,255,255,0.08);}

/* Gradient-text pills (case studies): light overlay + multiply would go black, so use a dark overlay + screen */
html[data-theme="dark"] .gtext::after{background:linear-gradient(90deg,#0d2347 0%,#0a3540 100%);mix-blend-mode:screen;}

/* "Why FortRise" tabs: connector shapes are light-blue SVGs blended with multiply */
/* lighten = dark-mode counterpart of the original multiply: overlapping shapes don't hide each other's lines */
html[data-theme="dark"] .flink button{mix-blend-mode:lighten;}
/* light-blue shapes -> dark navy (darken, then tint blue) */
html[data-theme="dark"] .flink button::after{filter:brightness(0.14) sepia(1) hue-rotate(180deg) saturate(3);}
/* white connector lines -> softer */
html[data-theme="dark"] .flink button::before{opacity:0.35;}
html[data-theme="dark"] .flink button,
html[data-theme="dark"] .flink button span{color:#c9d3e0;}
/* label sits on a patch of the shape colour so the connector line doesn't run through the text */
html[data-theme="dark"] .flink button span{background:#1c2b46;padding-right:14px;}
html[data-theme="dark"] .c-vertical-tabs__tablist button[aria-selected=true],
html[data-theme="dark"] .c-vertical-tabs__tablist button[aria-selected=true] span,
html[data-theme="dark"] .c-vertical-tabs__tablist button:hover span{color:#509FE0;}
html[data-theme="dark"] .frlogo .fr-ring{stroke:#0e1b2e;}
html[data-theme="dark"] .frlogo .fr-ring + .fr-ring{stroke:rgba(120,160,230,0.25);}

/* Logo strips: keep white tiles with the original logo colours */
html[data-theme="dark"] .client-slider .swiper-slide,
html[data-theme="dark"] .techslider .owl-item,
html[data-theme="dark"] .clbx{background-color:#fff;border-color:#e5e7eb;}
html[data-theme="dark"] .logo-strip .logo-name,html[data-theme="dark"] .oem-slider .logo-name{color:#0A1F44;}

/* Form fields */
html[data-theme="dark"] input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] textarea,
html[data-theme="dark"] select{background-color:#0f1217;color:#e8ecf2;border-color:rgba(255,255,255,0.14);}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#7d8695;}

/* Slider dots: visible on dark backgrounds (active dot stays brand blue) */
html[data-theme="dark"] .owl-carousel .owl-dot,
html[data-theme="dark"] .client-slider .swiper-pagination-bullet{background-color:rgba(255,255,255,0.28) !important;opacity:1;}
html[data-theme="dark"] .owl-carousel .owl-dot.active,
html[data-theme="dark"] .swiper .swiper-pagination-bullet-active{background-color:#509FE0 !important;}

/* Milestone list bullets: black outline is invisible on the dark card */
html[data-theme="dark"] .miul li::after{border-color:#9fb4cc;}

/* Owl loop clones are copied while GSAP's clip-path reveal still has the original hidden,
   and the reveal only ever animates the originals - so looping onto a clone showed a blank card */
.owl-item.cloned [style*="clip-path"]{clip-path:none !important;}

/* Footer CTA band follows the footer's dark background */
html[data-theme="dark"] .fctaband{background:#050608;border-top:1px solid rgba(255,255,255,0.08);}

/* Home enquiry section: same black as the footer below it (light mode already shares the footer's navy) */
html[data-theme="dark"] .hfenq{background:#050608;border-top:1px solid rgba(255,255,255,0.08);}

/* Case study detail page: dark mode */
html[data-theme="dark"] .csd .indtext p,html[data-theme="dark"] .csd-card p,html[data-theme="dark"] .csd-steps p{color:rgba(255,255,255,0.72);}
html[data-theme="dark"] .csd-meta div,html[data-theme="dark"] .csd-table td,html[data-theme="dark"] .csd-note{color:rgba(255,255,255,0.88);}
html[data-theme="dark"] .csd-card h3,html[data-theme="dark"] .csd-steps h3{color:#fff;}
html[data-theme="dark"] .csd-card{border-color:rgba(255,255,255,0.1);background:rgba(255,255,255,0.03);}
html[data-theme="dark"] .csd-card:hover{border-color:rgba(80,159,224,0.6);}
html[data-theme="dark"] .csd-table{border-color:rgba(255,255,255,0.1);}
html[data-theme="dark"] .csd-table th,html[data-theme="dark"] .csd-table td{border-bottom-color:rgba(255,255,255,0.08);}

/* News card date/location: lighter grey in dark mode for readable contrast (4.5:1+) */
html[data-theme="dark"] .ncard-meta{color:#9AA1AD;}

/* Small grey labels on dark backgrounds: lighter grey in dark mode for readable contrast (4.5:1+) */
html[data-theme="dark"] .oem-row-title,
html[data-theme="dark"] .pnav .pnav-text small{color:#9AA1AD;}
