/* ==========================================================================
   JND Integrated Solutions — brand layer
   ==========================================================================
   Loaded AFTER bootstrap.min.css, so these rules win.

   Contents
     1. Design tokens
     2. Typography
     3. Layout: container and section
     4. Utilities: surface and gradients
     5. Buttons
     6. Cards
     7. Header
     8. Footer
     9. Skip link, focus and reduced motion (accessibility)
    10. Icons
    11. Scroll reveal
    12. Service detail pages

   Source of truth: docs/DESIGN.md. Keep the two in sync when either changes.
   ========================================================================== */

/* 1. Design tokens -------------------------------------------------------- */

:root {
  /* JND palette */
  --jnd-primary:   #1455A0;
  --jnd-secondary: #123B73;
  --jnd-accent:    #50B8E8;
  --jnd-highlight: #62D5E8;
  --jnd-midblue:   #2878B8;  /* darkened from #2E83C5 so white text clears AA on white */
  --jnd-surface:   #F2F5F8;
  --jnd-ink:       #080B10;
  --jnd-border:    #E3E8EE;

  /* Bootstrap overrides.
     Note: Bootstrap compiles component colours (e.g. .btn-primary) to literal
     values, so overriding --bs-primary alone is not enough to restyle buttons
     or cards. Those are handled explicitly in sections 5 and 6. */
  --bs-body-font-family: 'Inter', system-ui, sans-serif;
  --bs-body-font-size: 1rem;
  --bs-body-line-height: 1.6;
  --bs-body-color: var(--jnd-ink);
  --bs-body-bg: #FFFFFF;

  --bs-primary: var(--jnd-primary);
  --bs-primary-rgb: 20, 85, 160;
  --bs-secondary: var(--jnd-secondary);
  --bs-secondary-rgb: 18, 59, 115;

  --bs-link-color: var(--jnd-primary);
  --bs-link-color-rgb: 20, 85, 160;
  --bs-link-hover-color: var(--jnd-midblue);

  --bs-border-color: var(--jnd-border);
  --bs-border-radius: 12px;    /* cards */
  --bs-border-radius-sm: 8px;  /* inputs */

  --bs-heading-color: var(--jnd-secondary);
}

/* 2. Typography ----------------------------------------------------------- */
/* Scale from DESIGN.md, mobile -> desktop. h1 is the 700 "hero" weight. */

h1, .h1 { font-weight: 700; font-size: clamp(2.25rem, 5vw, 3.5rem); }    /* 36 -> 56px */
h2, .h2 { font-weight: 600; font-size: clamp(1.75rem, 3.5vw, 2.5rem); }  /* 28 -> 40px */
h3, .h3 { font-weight: 600; font-size: clamp(1.25rem, 2vw, 1.5rem); }    /* 20 -> 24px */
h4, .h4, h5, .h5, h6, .h6 { font-weight: 600; }

/* Heading colour comes from --bs-heading-color above. A gradient band sets that
   token to white itself (section 4), so headings inside one need no extra class.
   Adding .text-white to the band would NOT work: Bootstrap declares color
   directly on heading elements, and a direct declaration beats an inherited one. */

p { line-height: 1.6; }
.lead { font-size: 1.125rem; font-weight: 400; line-height: 1.6; }

/* Labels use weight 500 per DESIGN.md */
.form-label, label { font-weight: 500; }

small, .small { font-size: 14px; }

/* 3. Layout: container and section ---------------------------------------- */
/* Bootstrap gives containers 12px of side padding. Bump it to 16px and keep
   .row in sync — rows pull back by half the gutter, so the two values must
   match or column edges drift out of line with the padding. */

.container,
.container-fluid {
  --bs-gutter-x: 2rem; /* 16px each side */
}

.row {
  --bs-gutter-x: 2rem; /* half of this becomes the negative margin */
}

/* Max content width: 1200px, centered */
@media (min-width: 1200px) {
  .container { max-width: 1200px; }
}

/* Vertical rhythm for every page band. DESIGN.md specifies 64px / 96px, which
   is 4rem / 6rem — beyond Bootstrap's spacing utilities, which stop at 5 (3rem).
   Sections sit on White by default; add .bg-surface to alternate.
   Put a .container inside the section, never the other way round. */
.section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

@media (min-width: 992px) {
  .section {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
}

/* 4. Utilities: surface and gradients ------------------------------------- */

.bg-surface { background-color: var(--jnd-surface) !important; }

.bg-grad-primary   { background-image: linear-gradient(135deg, var(--jnd-secondary), var(--jnd-primary)); }
.bg-grad-accent    { background-image: linear-gradient(135deg, var(--jnd-primary),   var(--jnd-midblue)); }
.bg-grad-highlight { background-image: linear-gradient(135deg, var(--jnd-midblue),   var(--jnd-highlight)); }

/* Modern is the band behind the hero and the CTA banner, both of which carry
   white text, so it ends at Mid Blue rather than Highlight. White on Highlight
   (#62D5E8) measures only 1.72:1 against AA's 4.5:1 floor; this sweep holds
   5.67:1 or better across the whole area text can occupy. See DESIGN.md. */
.bg-grad-modern    { background-image: linear-gradient(135deg, var(--jnd-secondary) 0%, var(--jnd-primary) 65%, var(--jnd-midblue) 100%); }

/* Bands that carry text whiten their headings through the inherited token.
   Highlight is deliberately absent — it is far too light to carry white text. */
.bg-grad-primary,
.bg-grad-accent,
.bg-grad-modern {
  --bs-heading-color: #fff;
}

/* Accent (#50B8E8) deliberately has NO text utility: it reaches only 2.24:1 on
   white, so an accent-coloured text class would be a trap. Accent is for icon
   tiles, borders and decoration. Mid Blue is the safe blue for text. */
.text-midblue { color: var(--jnd-midblue) !important; }

/* 5. Buttons -------------------------------------------------------------- */
/* All variants: 8px radius, 12/24 padding, 600 weight, 44px min height.
   --bs-btn-border-width is lifted to 2px site-wide so the bordered and
   borderless variants render at an identical height. */

.btn {
  --bs-btn-border-width: 2px;
  --bs-btn-disabled-opacity: .5;

  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 600;
  min-height: 44px;
  transition:
    color .2s ease-out,
    background-color .2s ease-out,
    background-image .2s ease-out,
    border-color .2s ease-out,
    box-shadow .2s ease-out,
    transform .2s ease-out;
}

/* Primary — accent gradient, white text; hover goes solid Primary with a lift */
.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--jnd-primary);
  --bs-btn-border-color: transparent;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--jnd-primary);
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--jnd-secondary);
  --bs-btn-active-border-color: transparent;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: var(--jnd-primary);
  --bs-btn-disabled-border-color: transparent;
  --bs-btn-focus-shadow-rgb: 80, 184, 232;

  /* Ends at Mid Blue, not Accent. White on Accent (#50B8E8) is only 2.24:1,
     and the far end of a button label sits over exactly that area. Capping the
     gradient at #2878B8 lifts the worst case inside the label to 4.94:1. */
  background-image: linear-gradient(135deg, var(--jnd-primary), var(--jnd-midblue));
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-image: none; /* reveal the solid background-color */
}
.btn-primary:hover { transform: translateY(-1px); }

/* On a band that is itself a brand gradient, the primary button needs a visible
   edge. Its fill is linear-gradient(135deg, #1455A0, #2878B8) — the same two
   colours as the outer 35% of .bg-grad-modern, running the same way — and its
   border is transparent, so where the two line up the button measures as
   little as 1.59:1 against the band behind it. The label stays readable
   (5.88:1); it is the shape that disappears.

   WCAG 1.4.11 asks 3:1 of a UI component's boundary. White is 7.98:1 against
   the band and 7.40:1 against the button, so the edge reads wherever it lands.
   Scoped to the gradient bands, the only place the button's own colours can
   coincide with its background. */
.bg-grad-primary .btn-primary,
.bg-grad-accent .btn-primary,
.bg-grad-modern .btn-primary {
  --bs-btn-border-color: #fff;
  --bs-btn-hover-border-color: #fff;
  --bs-btn-active-border-color: #fff;
  --bs-btn-disabled-border-color: #fff;
}

/* Secondary — white fill, 2px Primary border, Primary text; hover fills Surface.
   Bootstrap's .btn-outline-primary normally fills with Primary on hover, so the
   hover/active colours are overridden to match DESIGN.md instead. */
.btn-outline-primary {
  --bs-btn-color: var(--jnd-primary);
  --bs-btn-border-color: var(--jnd-primary);
  --bs-btn-hover-color: var(--jnd-primary);
  --bs-btn-hover-bg: var(--jnd-surface);
  --bs-btn-hover-border-color: var(--jnd-primary);
  --bs-btn-active-color: var(--jnd-primary);
  --bs-btn-active-bg: var(--jnd-border);
  --bs-btn-active-border-color: var(--jnd-secondary);
  --bs-btn-disabled-color: var(--jnd-primary);
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: var(--jnd-primary);
  --bs-btn-focus-shadow-rgb: 80, 184, 232;
}

/* Ghost / on dark — transparent, white border and text; hover inverts */
.btn-outline-light {
  --bs-btn-color: #fff;
  --bs-btn-border-color: #fff;
  --bs-btn-hover-color: var(--jnd-secondary);
  --bs-btn-hover-bg: #fff;
  --bs-btn-hover-border-color: #fff;
  --bs-btn-active-color: var(--jnd-secondary);
  --bs-btn-active-bg: #fff;
  --bs-btn-active-border-color: #fff;
  --bs-btn-focus-shadow-rgb: 255, 255, 255;
}

/* Destructive — forms only. Hover/active are darker shades of #C62828 so the
   button does not fall back to Bootstrap's stock red on interaction. */
.btn-danger {
  --bs-btn-bg: #C62828;
  --bs-btn-border-color: #C62828;
  --bs-btn-hover-bg: #A82222;
  --bs-btn-hover-border-color: #9E1F1F;
  --bs-btn-active-bg: #9E1F1F;
  --bs-btn-active-border-color: #941D1D;
  --bs-btn-focus-shadow-rgb: 198, 40, 40;
  --bs-btn-disabled-bg: #C62828;
  --bs-btn-disabled-border-color: #C62828;
}

/* 6. Cards ---------------------------------------------------------------- */

.card {
  --bs-card-border-color: var(--jnd-border);
  --bs-card-border-radius: 12px;
  --bs-card-cap-bg: transparent;

  border: 1px solid var(--jnd-border);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(18, 59, 115, .08);
  transition: box-shadow .2s ease-out, transform .2s ease-out;
}

.card:hover {
  box-shadow: 0 8px 24px rgba(18, 59, 115, .14);
  transform: translateY(-2px);
}

.card-body { padding: 24px; }

/* Service-card icon tile: 48px, accent gradient, white glyph.
   Capped at Mid Blue, not Accent: the glyph reaches the light end, and white on
   Accent measures 2.93:1 against the 3:1 needed for a meaningful graphic.
   Capped, the worst point the glyph can reach is 5.27:1. */
.card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-image: linear-gradient(135deg, var(--jnd-primary), var(--jnd-midblue));
  color: #fff;
  flex: 0 0 auto;
}

/* "Learn more ->" link on service cards */
.card-link {
  font-weight: 600;
  text-decoration: none;
}
.card-link:hover { text-decoration: underline; }

/* 7. Header --------------------------------------------------------------- */

/* Sticky white bar with a brand-tinted bottom shadow (DESIGN.md: "subtle").
   Shadow colour matches the card shadows rather than Bootstrap's grey .shadow-sm. */
.site-header {
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(18, 59, 115, .08);
}

/* Navbar is themed entirely through Bootstrap's --bs-navbar-* variables, so no
   rule here fights Bootstrap's own specificity. */
.navbar {
  --bs-navbar-padding-y: .75rem;
  --bs-navbar-nav-link-padding-x: .875rem;
  --bs-navbar-color: var(--jnd-ink);
  --bs-navbar-hover-color: var(--jnd-primary);
  --bs-navbar-active-color: var(--jnd-primary);
  --bs-navbar-brand-color: var(--jnd-secondary);
  --bs-navbar-brand-hover-color: var(--jnd-primary);
  --bs-navbar-toggler-border-color: var(--jnd-border);
  --bs-navbar-toggler-focus-width: 2px;
}

/* 500 weight for nav links, 600 for the current page (DESIGN.md weights) */
.navbar .nav-link { font-weight: 500; }
.navbar .nav-link.active { font-weight: 600; }

/* Wordmark. Sizes stay on the documented scale: 1.25rem is H3, .875rem is Small. */
.site-brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--jnd-secondary);
}
.site-brand-tagline {
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.1;
  color: var(--jnd-midblue);
}

/* Services dropdown: wide enough for the longest service name, brand-tinted
   shadow, Surface hover instead of Bootstrap's default light grey. */
.navbar .dropdown-menu {
  --bs-dropdown-min-width: 21rem;
  --bs-dropdown-border-color: var(--jnd-border);
  --bs-dropdown-border-radius: 12px;
  --bs-dropdown-link-hover-bg: var(--jnd-surface);
  --bs-dropdown-link-hover-color: var(--jnd-primary);
  --bs-dropdown-link-active-bg: var(--jnd-primary);
  --bs-dropdown-link-active-color: #fff;
  --bs-dropdown-item-padding-y: .5rem;

  box-shadow: 0 8px 24px rgba(18, 59, 115, .14);
}

/* Bootstrap sets white-space: nowrap on dropdown items, which would push
   "IT Consultancy & Project Implementation" past the menu edge. */
.navbar .dropdown-menu .dropdown-item { white-space: normal; }

/* "Get a Quote" CTA sits beside the nav links on desktop only — stacked on
   mobile it should not be indented. */
@media (min-width: 992px) {
  .navbar .nav-cta { margin-left: 1rem; }
}

/* 8. Footer --------------------------------------------------------------- */
/* Sits on the Primary gradient (.bg-grad-primary) with white text. Vertical
   rhythm comes from the shared .section component, which the footer element
   carries alongside this class. No padding is declared here. */

/* Links must be inverted: Bootstrap's --bs-link-color (#1455A0) is almost
   invisible on this gradient. 85% white measures 5.86:1 against the lighter
   end of the gradient, so it clears AA. */
.site-footer a {
  color: rgba(255, 255, 255, .85);
  text-decoration: none;
}
.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

/* Column headings are real <h2> elements so screen readers can navigate by
   heading. They are NOT Highlight coloured: #62D5E8 only reaches 4.31:1 on the
   lighter end of the gradient, under the AA floor of 4.5:1 at this text size.
   White measures 7.4:1, so hierarchy comes from size, weight and uppercase. */
.site-footer-title {
  font-size: .875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #fff;
}

/* Bootstrap's .text-white-50 only reaches 3.1:1 here and would fail AA. */
.site-footer-meta {
  color: rgba(255, 255, 255, .85);
}

/* The wordmark is Secondary navy in the header; it has to invert down here. */
.site-footer .site-brand-name { color: #fff; }
.site-footer .site-brand-tagline { color: rgba(255, 255, 255, .85); }

/* Accent hairline across the top edge: a small brand gesture that separates
   the footer from whatever band sits above it. Decorative only — no text ever
   sits over it — so Accent/Highlight are safe here. Accent is deliberately
   never a text colour (see the note on .text-midblue). */
.site-footer {
  position: relative;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: .25rem;
  background-image: linear-gradient(90deg, var(--jnd-accent), var(--jnd-highlight));
}

/* Contact rows: icon badge + label + value, so phone/email/address scan at a
   glance instead of reading as three identical lines. The badge is decoration
   (the wrapper carries aria-hidden); the label and value carry the meaning and
   stay at 85% white — 5.86:1 on the lighter end of the gradient, so AA holds.
   The badge is sized in rem, not px, to stay inside the fluid-width rule that
   check-responsive.js enforces on the stylesheet. */
.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
}
.footer-contact li + li { margin-top: .875rem; }
.footer-contact-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, .12);
  color: #fff;
}
.footer-contact-label {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .85);
}

/* Back-to-top affordance in the bottom bar. */
.footer-top {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  font-weight: 600;
}

/* 9. Skip link, focus and reduced motion ---------------------------------- */

/* Skip link: off-screen until focused, then pinned to the top-left. Uses
   :focus rather than :focus-visible so it can never be focused but invisible. */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1080;
  padding: 12px 24px;
  background-color: var(--jnd-secondary);
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 8px 0;
  transform: translateY(-100%);
  transition: transform .2s ease-out;
}
.skip-link:focus {
  transform: translateY(0);
  color: #fff;
}

/* Visible focus ring per DESIGN.md. Bootstrap already handles form controls,
   so this covers links and buttons only to avoid doubling the indicator.

   Two-tone on purpose. A single Accent ring measures 2.24:1 on white and
   2.05:1 on Surface — both below the 3:1 WCAG 1.4.11 asks of a focus
   indicator. The navy outline carries light backgrounds (7.4:1 on white);
   the white shadow fills the 2px offset gap so the indicator stays visible on
   the dark hero and footer bands (7.4:1 there). Whichever band it lands on,
   one of the two rings contrasts. */
a:focus-visible,
.btn:focus-visible,
.faq-question:focus-visible {
  outline: 2px solid var(--jnd-secondary);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #fff;
}

/* Disable all non-essential motion. Transforms are switched off too, not just
   the transitions — otherwise the hover lift still snaps into place. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

  .card:hover,
  .btn-primary:hover,
  .service-pager-link:hover {
    transform: none;
  }
}

/* 10. Icons --------------------------------------------------------------- */
/* Lucide (https://lucide.dev, ISC licence) inlined into the markup rather than
   pulled from a CDN script. Inlining costs about 3KB of HTML for the whole
   home page and buys three things: no third-party script, nothing that can
   fail at runtime, and no empty tiles while an icon font or sprite loads.

   Only viewBox and the path data stay in the HTML. The presentation lives
   here, at DESIGN.md's 1.5px stroke, so each icon is one line of markup. */

.icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 11. Scroll reveal ------------------------------------------------------- */
/* Elements marked [data-reveal] fade up 16px the first time they enter the
   viewport, once each. assets/js/reveal.js does the observing.

   The hidden state is gated on .js-reveal, which a small inline script in
   <head> puts on <html> before the first paint. Two things follow from that:
   with JavaScript unavailable the class is never set, so nothing is ever
   hidden; and because it is set in <head> rather than at the end of the body,
   the page never paints normally and then hides itself.

   Only the revealing content is transformed, never a .card. A card already
   uses transform for its hover lift, and a transform here would race with it.
   That is why [data-reveal] goes on the .col wrapper instead. */

.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 300ms ease-out, transform 300ms ease-out;
}

.js-reveal [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Belt and braces. reveal.js already declines to run under reduced motion, and
   the <head> script drops the class if reveal.js never arrives — but a page of
   invisible content is a bad enough failure to guard twice. */
@media (prefers-reduced-motion: reduce) {
  .js-reveal [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* 12. Service detail pages ------------------------------------------------- */
/* The FAQ accordion, the numbered process list and the previous/next pager.
   The "what's included" list needs nothing here: .list-unstyled, the Bootstrap
   grid, .icon and .text-primary already carry it. See DESIGN.md, "Service
   detail page". */

/* FAQ accordion — native <details> / <summary>.

   Deliberately NOT Bootstrap's .accordion. Bootstrap's collapse hides an
   unopened panel with .collapse:not(.show) { display: none }, so if the CDN
   bundle ever failed to load the answers would not merely stop animating —
   they would be unreachable. <details> is the same widget with no JavaScript
   and nothing to fail, and the browser announces the question, the answer and
   the open/closed state itself.

   The trade-off is real and accepted: a <summary> is not a heading, so the
   questions cannot be reached with heading navigation. Losing that is better
   than losing the answers. */

.faq-item {
  border: 1px solid var(--jnd-border);
  border-radius: 12px;
  background-color: #fff;
}

.faq-item + .faq-item { margin-top: .75rem; }

/* The open item takes the Primary border, so which one is expanded still reads
   without relying on the chevron's rotation. */
.faq-item[open] { border-color: var(--jnd-primary); }

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--jnd-secondary);   /* 11.06:1 on white */

  /* Hides the browser's own disclosure triangle, in every engine. */
  list-style: none;
}
.faq-question::-webkit-details-marker { display: none; }

/* Rotates the inlined chevron rather than swapping two images. */
.faq-chevron {
  flex: 0 0 auto;
  transition: transform .2s ease-out;
}
.faq-item[open] .faq-chevron { transform: rotate(180deg); }

.faq-answer {
  margin: 0;
  padding: 0 1.25rem 1.25rem;
}

/* Numbered process steps. The <ol> carries the sequence for assistive
   technology, so the visible numerals are decoration and are aria-hidden. */

.process-step + .process-step { margin-top: 1.5rem; }

.process-number {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--jnd-primary);   /* white numeral: 7.40:1 */
  color: #fff;
  font-weight: 600;
}

/* Previous / next service. Same chrome as a card, because that is what it is:
   a link that behaves like one. */
.service-pager-link {
  display: block;
  padding: 1rem 1.25rem;
  border: 1px solid var(--jnd-border);
  border-radius: 12px;
  background-color: #fff;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(18, 59, 115, .08);
  transition: box-shadow .2s ease-out, transform .2s ease-out;
}
.service-pager-link:hover {
  box-shadow: 0 8px 24px rgba(18, 59, 115, .14);
  transform: translateY(-2px);
}
.service-pager-label {
  display: block;
  font-size: .875rem;
  color: var(--bs-secondary-color);   /* 6.73:1 on white */
}
.service-pager-name {
  display: block;
  font-weight: 600;
}
