/* Additions layered on top of the compiled Tailwind build (loaded after it). */

/* The navigation now has 10 links, so the full desktop bar starts at 1280px (hamburger below). */
@media (min-width: 1280px) {
  .xl\:flex { display: flex; }
  .xl\:hidden { display: none; }
}

/* Smooth theme change without animating layout */
body { transition: background-color .25s ease, color .25s ease; }
@media (prefers-reduced-motion: reduce) { body { transition: none; } * { scroll-behavior: auto !important; } }

/* Keep the theme button reachable and visible for keyboard users */
[data-theme-toggle]:focus-visible { outline: 2px solid var(--node); outline-offset: 2px; }

/* Ghost button used under the contact map (sits on a light-section background in day mode) */
.map-link { color: #1d4ed8; border-color: #1d4ed8; }
body.site-dark .map-link { color: #fff; border-color: #ffffff55; }
body.site-dark .map-link:hover { background: #ffffff1a; }

/* ------------------------------------------------------------------
   DAY THEME for the home page's content sections.
   Inner pages already have a light design (the dark look is switched on with body.site-dark).
   The home page sections are hard-coded dark, so in day mode they are re-coloured here.
   The hero, the top bar, the final call-to-action band and the footer stay dark on purpose (brand look).
   ------------------------------------------------------------------ */
html[data-theme="light"] {
  --day-bg: #f4f7fd; --day-bg2: #ffffff; --day-ink: #0b1220; --day-text: #475569; --day-mute: #64748b; --day-line: #dbe3f0;
}
html[data-theme="light"] :is(
  section[aria-labelledby="services-heading"], section[aria-labelledby="products-heading"], section[aria-labelledby="how-heading"],
  section[aria-labelledby="faq-heading"], section[aria-labelledby="founders-heading"], section[aria-label="Technologies we work with"]
) { background-color: var(--day-bg); color: var(--day-text); border-color: var(--day-line); }
html[data-theme="light"] section[aria-labelledby="products-heading"],
html[data-theme="light"] section[aria-labelledby="founders-heading"],
html[data-theme="light"] section[aria-label="Technologies we work with"] { background-color: var(--day-bg2); }

html[data-theme="light"] :is(
  section[aria-labelledby="services-heading"], section[aria-labelledby="products-heading"], section[aria-labelledby="how-heading"],
  section[aria-labelledby="faq-heading"], section[aria-labelledby="founders-heading"], section[aria-label="Technologies we work with"]
) {
  & .text-white, & h1, & h2, & h3, & h4, & summary { color: var(--day-ink); }
  & .text-slate-300, & .text-slate-400, & p { color: var(--day-text); }
  & .text-slate-500 { color: var(--day-mute); }
  & .text-node, & .eyebrow { color: #0e7490; }
  & .border-white\/10, & [class*="border-white"] { border-color: var(--day-line); }
  & .bg-white\/\[0\.04\], & .bg-white\/\[0\.06\], & .bg-white\/10, & .bg-white\/15 { background-color: #eaf0fb; }
  & .card, & article, & details { background: #fff; border-color: var(--day-line); color: var(--day-text); box-shadow: 0 10px 30px -18px rgba(15, 23, 42, .25); }
  & .btn-ghost { color: #1d4ed8; border-color: #1d4ed8; }
  & .btn-ghost:hover { background-color: #1d4ed814; }
  & .icon-tile { color: #1d4ed8; border-color: #2f5bea40; }
  & .aurora { opacity: .25; }
  & .blueprint { opacity: .25; }
  & li.text-slate-300, & .font-mono { color: var(--day-text); }
  & a:not(.btn-primary):not(.btn-ghost) { color: inherit; }
}
html[data-theme="light"] section[aria-label="Technologies we work with"] li { background: var(--day-bg); border-color: var(--day-line); }
html[data-theme="light"] .map-link { color: #1d4ed8; }
html[data-theme="light"] section[aria-labelledby="products-heading"],
html[data-theme="light"] section[aria-labelledby="founders-heading"] { --card-day: #f4f7fd; }
html[data-theme="light"] :is(section[aria-labelledby="services-heading"], section[aria-labelledby="products-heading"], section[aria-labelledby="how-heading"], section[aria-labelledby="faq-heading"], section[aria-labelledby="founders-heading"]) {
  & [class*="rounded-2xl"], & [class*="rounded-xl"], & [class*="rounded-lg"]:not(button):not(a.btn-primary):not(.btn-ghost) {
    background-color: var(--card-day, #fff); border: 1px solid var(--day-line); box-shadow: 0 10px 28px -20px rgba(15, 23, 42, .3);
  }
}
html[data-theme="light"] :is(section[aria-labelledby="services-heading"], section[aria-labelledby="products-heading"], section[aria-labelledby="how-heading"], section[aria-labelledby="faq-heading"], section[aria-labelledby="founders-heading"]) {
  & .spot { background-color: var(--card-day, #fff); border-color: var(--day-line); box-shadow: 0 12px 30px -20px rgba(15, 23, 42, .35); }
  & .spot:hover { border-color: #2f5bea; }
  & .bg-ink { background-color: #fff; }
  & .bg-surface { background-color: var(--day-bg2); }
  & .text-node { color: #0e7490; }
}

/* ------------------------------------------------------------------
   Contrast fixes found by the automated WCAG check (tests/e2e.test.js).
   ------------------------------------------------------------------ */
.bg-blue-500 { background-color: #2563eb; }                       /* white text on #3b82f6 was 3.7:1, now 5.2:1 */
.hover\:bg-blue-600:hover { background-color: #1d4ed8; }
body.site-dark .chip[class*="text-beam"] { color: #9db8ff !important; }   /* technology chips: #2f5bea on near-black was 3.4:1 */

/* Day mode for the pages that were written dark-only (pricing, blog posts): anything outside a dark hero/band/footer. */
html[data-theme="light"] body:not(.site-dark) {
  & .text-white:not(.on-dark):not(.on-dark *):not([class*="bg-"]):not([style*="background"]):not(.btn-primary):not(.btn-primary *):not(footer):not(footer *):not(nav):not(nav *) { color: #0b1220; }
  & :is(.text-slate-200, .text-slate-300, .text-slate-400):not(.on-dark):not(.on-dark *):not(footer):not(footer *):not(nav):not(nav *) { color: #475569; }
  & .text-node:not(.on-dark):not(.on-dark *):not(footer):not(footer *):not(nav):not(nav *) { color: #0e7490; }
  & :is(.border-white\/10, .border-white\/15):not(.on-dark):not(.on-dark *):not(footer):not(footer *) { border-color: #dbe3f0; }
  & .chip:not(.on-dark *) { color: #334155; background-color: #eef2fb; border-color: #d5def0; }
  & .text-gray-400 { color: #6b7280; }
}

/* Small-text contrast (AA) */
.on-dark .text-slate-500 { color: #94a3b8; }
html[data-theme="light"] body:not(.site-dark) :is(.text-gray-500, [class*="text-gray-500"]):not(.on-dark *) { color: #4b5563; }
html[data-theme="light"] body:not(.site-dark) .text-blue-600:not(.on-dark *) { color: #1d4ed8; }
html[data-theme="light"] body:not(.site-dark) [class*="text-[#1F5DFF]"] { color: #1741c4; }
/* careers form: inline-styled colours that failed AA */
[style*="background-color: rgb(91, 127, 232)"], [style*="#5B7FE8"] { background-color: #3f67e0 !important; }
body.site-dark [style*="rgb(59, 91, 219)"], body.site-dark [style*="#3B5BDB"] { color: #9db8ff !important; }

/* Floating Instagram button */
#insta-float { position: fixed; left: 18px; bottom: 18px; z-index: 60; width: 52px; height: 52px; border-radius: 9999px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); box-shadow: 0 6px 18px rgba(0,0,0,.35); transition: transform .2s ease, box-shadow .2s ease; }
#insta-float:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 10px 24px rgba(0,0,0,.4); }
#insta-float:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 6px #1d4ed8; }
@media (max-width: 640px) { #insta-float { left: 12px; bottom: 12px; width: 46px; height: 46px; } }
@media print { #insta-float { display: none; } }
@media (prefers-reduced-motion: reduce) { #insta-float { transition: none; } }

/* Floating WhatsApp button (bottom-right) */
#wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 56px; height: 56px; border-radius: 9999px; display: flex; align-items: center; justify-content: center;
  background: #25d366; box-shadow: 0 6px 18px rgba(0,0,0,.35); transition: transform .2s ease, box-shadow .2s ease; }
#wa-float:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 10px 24px rgba(0,0,0,.4); }
#wa-float:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 6px #1d4ed8; }
@media (max-width: 640px) { #wa-float { right: 12px; bottom: 12px; width: 50px; height: 50px; } }
@media print { #wa-float { display: none; } }
@media (prefers-reduced-motion: reduce) { #wa-float { transition: none; } }
