/* ============================================================================
   Dedicated Software Solutions Ltd — brand layer over Bootstrap 6.0.0-alpha.1
   ==========================================================================
   Bootstrap 6 alpha API notes (verified against the vendored copy in
   bootstrap/dist/ and bootstrap/site/src/content/docs/, task 1.3):
   - Responsive variants are now prefixes: `navbar-expand-lg` is RENAMED to
     `lg:navbar-expand`; `row-cols-md-4` is RENAMED to `md:row-cols-4`.
   - `.navbar-collapse` + `data-bs-toggle="collapse"` are GONE from the navbar
     pattern: navbars now use the Drawer component — a <dialog class="drawer
     drawer-end"> with `data-bs-toggle="drawer"`. At the `lg:navbar-expand`
     breakpoint the drawer renders inline automatically.
   - Navbar toggler markup is `btn-icon navbar-toggler` + `.navbar-toggler-icon`.
   - Scrollspy keeps `data-bs-spy="scroll"` + `data-bs-target` on the scroll
     container (<body> is valid) and adds `data-bs-top-margin`/`data-bs-smooth-scroll`.
   - Foreground colour utilities are RENAMED from `text-*` to `fg-*`
     (e.g. `fg-white`); colour schemes go through `data-bs-theme` + tokens.
   - The `.lead` class no longer exists; use size utilities (`fs-lg` etc.).
   ========================================================================== */

:root {
  /* Brand palette from website-brief.md */
  --brand-blue: #2563EB;
  --brand-purple: #7C3AED;
  --brand-navy: #1E1B4B;
  --brand-slate: #64748B;
  --brand-light-purple: #C4B5FD;
  --brand-light-purple-2: #A5B4FC;
  --brand-footer-violet: #2E1065; /* deep violet base of the footer mock */

  /* Map the brand onto Bootstrap 6's primary theme tokens */
  --bs-primary-base: var(--brand-purple);
  --bs-primary-bg: var(--brand-purple);
  --bs-primary-fg: var(--brand-purple);
  --bs-primary-fg-emphasis: #5B21B6;
  --bs-primary-border: var(--brand-light-purple);

  --bs-body-color: var(--brand-slate);
  --bs-link-color: var(--brand-purple);
  --bs-link-hover-color: #5B21B6;

  /* Height of the fixed navbar, used for anchor offsets */
  --brand-navbar-height: 4.25rem;
}

/* Anchor links must land below the fixed navbar; scrollspy uses the same
   offset via data-bs-top-margin. */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--brand-navbar-height) + 1rem);
}

body {
  padding-top: var(--brand-navbar-height);
}

/* Gradient helper: the brief's blue -> purple sweep */
.brand-gradient {
  background-image: linear-gradient(120deg, var(--brand-blue) 0%, var(--brand-purple) 100%);
}

/* ---- Navbar (gradient per assets/mock-final-deepviolet-brand-lighttile.png) */
.brand-navbar {
  background-image: linear-gradient(120deg, var(--brand-blue) 0%, var(--brand-purple) 100%);
  min-height: var(--brand-navbar-height);
  --bs-navbar-color: rgba(255, 255, 255, 0.85);
  --bs-navbar-hover-color: #FFFFFF;
  --bs-navbar-active-color: #FFFFFF;
  --bs-navbar-brand-color: #FFFFFF;
  --bs-navbar-brand-hover-color: #FFFFFF;
}

/* In drawer mode (below the v6 lg breakpoint = 1024px) the drawer slides in as
   a white sheet, so its links need dark text; at lg+ it renders inline on the
   gradient and the white navbar variables apply again. */
@media (max-width: 1023.98px) {
  .brand-navbar .drawer {
    --bs-navbar-color: var(--brand-navy);
    --bs-navbar-hover-color: var(--brand-purple);
    --bs-navbar-active-color: var(--brand-purple);
  }

  /* Left-align the stacked links inside the drawer (ms-auto only fits inline). */
  .brand-navbar .drawer .navbar-nav {
    margin-left: 0;
    width: 100%;
  }
}

.brand-navbar .navbar-brand-wordmark {
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.05;
  color: #FFFFFF;
}

.brand-navbar .navbar-brand-sub {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: #E9D5FF; /* mock uses this lightest purple on the gradient for contrast; #C4B5FD would be 3:1 */
}

.brand-navbar .nav-link {
  font-weight: 600;
}

/* The inline nav is tightest just above the lg breakpoint (1024px) with the
   longer "Traditional Software Design"/"AI Experience" labels; tighten link
   padding in that band so the row keeps fitting to the viewport edge. */
@media (max-width: 1099.98px) {
  .brand-navbar {
    --bs-navbar-nav-link-padding-x: 0.5rem;
  }
}

.brand-navbar .nav-link.active {
  text-decoration: underline;
  text-underline-offset: 0.4em;
  text-decoration-thickness: 2px;
}

/* ---- Section typography & rhythm ----------------------------------------- */
.hero-title {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
}

/* Bootstrap 6 alpha has no display-* utilities; the hero uses .hero-title. */
.section-alt {
  background-color: #93A4FC; /* bold periwinkle between the dark violet bands */
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
}

/* The brief's slate (#64748B) is illegible on a band this strong, so body
   text sitting directly on the band uses the brand navy (6.8:1).
   Text inside the white cards stays the standard slate on white. */
.section-alt .brand-subheading {
  color: var(--brand-navy);
}

.section-alt .service-card .brand-subheading {
  color: var(--brand-slate);
}

/* White cards get a navy-tinted edge that reads against the periwinkle. */
.section-alt .tech-badge,
.section-alt .service-card {
  border-color: rgb(30 27 75 / 18%);
}

/* ---- What we do section -----------------------------------------------------
   The brief's slate as a full-width band in its own section. Navy headings
   meet AA large-text contrast (3.4:1) and keep the established treatment. */
.band-slate {
  background-color: var(--brand-slate);
  padding-top: 2.5rem;
  padding-bottom: 4.5rem;
}

/* Match the What we do band's tighter top gap. */
#ai-journey {
  padding-top: 2.5rem;
}

/* Heading 30% larger than the .h4 base (1.5rem -> 1.95rem). */
#what-we-do .brand-heading {
  font-size: 1.95rem;
}

.band-slate .service-card {
  border-color: rgb(30 27 75 / 18%);
}

/* ---- Alternating horizontal bands ------------------------------------------
   Dark bands reuse the header/footer deep violet; light bands use the faint
   purple tint above. Text inside dark bands follows the brand rule:
   light purple on dark. */
.section-dark {
  background-image: linear-gradient(160deg, #2E1065 0%, #1E1B4B 100%);
  color: var(--brand-light-purple-2);
  /* Generous air above and below the section content, like the footer. */
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
}

/* Light purple band for the closing "How can we help?" section: the
   deep-violet footer sits directly below it, and .section-dark is the exact
   footer gradient, so a light band keeps the two from merging into one dark
   blob and completes the page rhythm (dark -> slate -> periwinkle -> light
   -> dark footer). Uses the palette's #E9D5FF (same purple as the navbar
   sub-wordmark) so the tint reads clearly. Slate body text would fall below
   AA on a tint this strong, so body text on the band uses brand navy
   (11.7:1), mirroring the .section-alt treatment. */
.section-light {
  background-color: #E9D5FF;
  /* Tighter gap above/below, matching the What we do band's 2.5rem rhythm
     rather than the generous spacing of the dark bands. */
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.section-light .brand-subheading {
  color: var(--brand-navy);
}

.section-dark .brand-heading {
  color: #E9D5FF; /* light purple heading on dark */
}

.section-dark .brand-subheading {
  color: var(--brand-light-purple-2);
}

.section-dark .service-card {
  background-color: rgb(255 255 255 / 6%);
  border-color: rgb(196 181 253 / 30%);
  box-shadow: none;
}

.section-dark .service-card h3 {
  color: #FFFFFF;
}

.section-dark .service-card p {
  color: var(--brand-light-purple-2);
}

.brand-heading {
  color: var(--brand-navy);
  font-weight: 800;
}

.brand-subheading {
  color: var(--brand-slate);
}

/* Invisible block for the Introduction copy: 80% of the section width,
   centred, justified. Hyphenation keeps the justified edges tidy. */
.intro-text {
  width: 80%;
  margin-inline: auto;
  text-align: justify;
  hyphens: auto;
  font-size: 1.125rem; /* 18px */
}

.brand-accent-bar {
  width: 50%;
  height: 0.3rem;
  border-radius: 1rem;
  margin-inline: auto;
  background-image: linear-gradient(90deg, var(--brand-blue) 0%, var(--brand-purple) 100%);
}

/* ---- Technology badge card -------------------------------------------------
   Uniform card for logo + name; simple border, minimal shadow per brief. */
.tech-badge {
  border: 1px solid #E2E8F0;
  border-radius: 0.75rem;
  background-color: #FFFFFF;
  box-shadow: 0 1px 2px rgb(30 27 75 / 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.25rem 1rem;
  height: 100%;
  text-align: center;
}

.tech-badge img {
  height: 3rem;
  width: auto;
  max-width: 6rem;
  object-fit: contain;
}

.tech-badge .tech-name {
  color: var(--brand-navy);
  font-weight: 600;
  margin: 0;
}

/* ---- Service cards ---------------------------------------------------------- */
.service-card {
  border: 1px solid #E2E8F0;
  border-radius: 0.75rem;
  background-color: #FFFFFF;
  box-shadow: 0 1px 2px rgb(30 27 75 / 0.04);
  padding: 1.5rem;
  height: 100%;
}

.service-card h3 {
  color: var(--brand-navy);
  font-size: 1.05rem;
  font-weight: 700;
}

/* ---- Footer (per assets/mock-footer-deepviolet.png, real content only) ---- */
.brand-footer {
  background-color: var(--brand-footer-violet);
  background-image: linear-gradient(160deg, #2E1065 0%, #1E1B4B 100%);
  color: var(--brand-light-purple-2);
  /* Generous air above and below the footer content. */
  padding-top: 5.5rem;
  padding-bottom: 4.5rem;
}

@media (max-width: 767.98px) {
  .brand-footer,
  .section-dark,
  .section-light,
  .section-alt,
  .band-slate {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .band-slate,
  #ai-journey,
  #how-can-we-help {
    padding-top: 1.5rem;
  }

  .brand-footer {
    padding-top: 3.5rem;
    padding-bottom: 3rem;
  }
}

.brand-footer a {
  color: var(--brand-light-purple);
  text-decoration: none;
}

/* The email address is one long unbroken token; let it wrap on phones. */
.brand-footer .footer-email {
  overflow-wrap: anywhere;
}

.brand-footer a:hover,
.brand-footer a:focus-visible {
  color: #FFFFFF;
  text-decoration: underline;
}

.brand-footer .footer-heading {
  color: #FFFFFF;
  font-size: 0.95rem;
  font-weight: 700;
}

.brand-footer .footer-brand-name {
  color: #FFFFFF;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-footer .footer-brand-sub {
  color: var(--brand-light-purple);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.25em;
}

.brand-footer .footer-divider {
  border-top: 1px solid rgb(139 92 246 / 0.35);
  /* Even air above and below the rule (18px each side). */
  margin-top: 1.125rem;
  padding-top: 1.125rem;
}
