/* ── 0. Font Face (local fallback for Inter CDN) ────────────────────────── */

@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  src: url('../fonts/InterVariable.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: italic;
  font-weight: 100 900;
  src: url('../fonts/InterVariable-Italic.woff2') format('woff2');
}


/* ── 1. CSS Variables ───────────────────────────────────────────────────── */

:root {
  /* Bootstrap colour overrides (alphabetical) */
  --bs-body-bg:             #F7F8F6;
  --bs-body-bg-rgb:         247, 248, 246;
  --bs-body-color:          #2F3E3A;
  --bs-body-color-rgb:      47, 62, 58;
  --bs-border-radius:       0.375rem;
  --bs-dark:                #2F3E3A;
  --bs-dark-rgb:            47, 62, 58;
  --bs-info:                #C85A2E;
  --bs-info-rgb:            200, 90, 46;
  --bs-light:               #F7F8F6;
  --bs-light-rgb:           247, 248, 246;
  --bs-link-color:          #C85A2E;
  --bs-link-color-rgb:      200, 90, 46;
  /* Bootstrap 5.3 reads --bs-link-hover-color-RGB for a:hover
     (a:hover{--bs-link-color-rgb:var(--bs-link-hover-color-rgb)}), never
     --bs-link-hover-color. Setting only the latter looks right and does
     nothing, which is how Bootstrap's default blue kept showing through. */
  --bs-link-hover-color:    #2F3E3A;
  --bs-link-hover-color-rgb: 47, 62, 58;
  --bs-primary:             #2F3E3A;
  --bs-primary-rgb:         47, 62, 58;
  --bs-secondary:           #F4B400;
  --bs-secondary-rgb:       244, 180, 0;
  --bs-tertiary-bg:         #F7F8F6;
  --bs-tertiary-bg-rgb:     248, 249, 250;
  /* ONE link orange, and it is the darker one (Michael through konzept-siassist,
     2026-09-23). #C85A2E measured 3.98:1 on the section ground -- below the
     4.5:1 that 16px type needs -- and the sheet already painted `si-tlink` and
     the legal links in #B85028 (4.68:1), so taking the darker one removes a
     second orange rather than adding one. Literals, not var(): the tokens live
     on `.si-page` and the navigation is outside it. */
  --bs-tertiary-color:      #B85028;
  --bs-tertiary-color-rgb:  184, 80, 40;
  --bs-warning:             #F4B400;

  /* The accent laid thinly over the ground -- the tone an expanded accordion
     head carries, and the tone of the comparison table's head row (Michael,
     2026-08-25/26). It lives here, once, because two components read it:
     writing the same rgba() twice is the second truth we keep taking out
     everywhere else.
     There used to be a `-strong` at twice the strength, for a head row sitting
     on a surface that already carried the wash. That surface is gone, the head
     stands on white, and nothing read the token any more -- removed 2026-08-26
     rather than left lying about for someone to revive by accident. */
  --is-accent-wash:         rgba(var(--bs-info-rgb), 0.08);

  /* The stroke width of the expander sign. `bootstrap-icons` ships one cut,
     400; ask it for 600 and the browser thickens that cut itself, which is not
     the no-op it looks like -- measured on canvas at 48 px, the ink of `\f285`
     goes from 39 756 at 400 to 61 254 at 600, and stops there (Chrome thickens
     by one step only). An inherited `font-weight` therefore hands the thickness
     to whatever the sign happens to stand next to. The outline is the one screw
     that treats every reader alike (Michael, 2026-08-28).

     It governs EVERY chevron that stands on its own -- the chapter marker, the
     accordion marker, the connector between two steps, the connector in the
     process band. A chevron *inside* a button or a link is not a sign but part
     of a line of type, and follows its text. */
  --is-sign-ink:            .06em;

  /* The circle that carries a position in a numbered sequence. A token because
     three rules read it and, since 2026-08-28, a fourth thing depends on it: the
     chapter's text column starts behind it. Global rather than on `.is-scan`,
     because `.is-card__num` draws the same circle on card grids that stand
     nowhere near a chapter. */
  --is-num-size:            30px;

  /* Layout */
  --navbar-h:               100px;
  --section-py:             96px;
  --section-py-sm:          56px;
}


/* ── 2. Global Base ─────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--navbar-h) + 16px);
}

.cms-toolbar-expanded {
  scroll-padding-top: calc(var(--navbar-h) + 46px + 16px);
}

body {
  -webkit-font-smoothing: antialiased;
  background-color: var(--bs-light);
  color: var(--bs-body-color);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.7;
}

/* The heading LADDER moved out on 2026-09-01. It used to sit here -- five fixed
   sizes plus weight 700 -- and it is a good ladder; it just applied to every
   page of the instance, which made Bootstrap's own scale unreachable for the new
   SIAssist pages (ADR-0010). It now lives in is-components.css, bound to
   `.is-page`, the way si-components.css binds its own to `.si-page`.

   What stays here is what is not a ladder: the colour, which is the brand's, and
   the line height, which is a reading property rather than a size. */
h1, h2, h3, h4, h5, h6 {
  color: var(--bs-dark);
  line-height: 1.2;
}

a {
  color: var(--bs-tertiary-color);
  text-decoration: none;
  transition: color 0.2s ease;

  /* The resting colour is #B85028 now, and #a84924 sits 1.16:1 from it -- the
     same colour to the eye. Hover goes to the ink instead, which is what
     `.si-crumb a:hover`, `.si-person__ways a:hover` and `.si-e-pways a:hover`
     already do. */
  &:hover {
    color: #2F3E3A;
  }
}


/* ── 3. Bootstrap Overrides ─────────────────────────────────────────────── */

.btn {
  border-radius: var(--bs-border-radius);
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 0.22s ease;
}

.btn-info {
  --bs-btn-active-bg:             #a84924;        /* darker orange, matches a:hover */
  --bs-btn-active-border-color:   #a84924;
  --bs-btn-active-color:          #fff;
  --bs-btn-active-shadow:         inset 0 3px 5px rgba(0, 0, 0, 0.125);
  --bs-btn-bg:                    var(--bs-info);
  --bs-btn-border-color:          var(--bs-info);
  --bs-btn-color:                 #fff;
  --bs-btn-disabled-bg:           var(--bs-info);
  --bs-btn-disabled-border-color: var(--bs-info);
  --bs-btn-disabled-color:        #fff;
  --bs-btn-focus-shadow-rgb:      var(--bs-info-rgb);
  --bs-btn-hover-bg:              #a84924;
  --bs-btn-hover-border-color:    #a84924;
  --bs-btn-hover-color:           #fff;
}

/* Hover, focus and active all lead to the two brand colours: gold as the
   surface, dark green as the type. White on gold measures 1.9:1 and is
   unreadable; dark green on gold measures 6.2:1. */
.btn-primary {
  --bs-btn-active-bg:             var(--bs-secondary);
  --bs-btn-active-border-color:   var(--bs-secondary);
  --bs-btn-active-color:          var(--bs-dark);
  --bs-btn-active-shadow:         inset 0 3px 5px rgba(0, 0, 0, 0.125);
  --bs-btn-bg:                    var(--bs-dark);
  --bs-btn-border-color:          var(--bs-dark);
  --bs-btn-disabled-bg:           var(--bs-dark);
  --bs-btn-disabled-border-color: var(--bs-dark);
  --bs-btn-disabled-color:        #fff;
  --bs-btn-focus-shadow-rgb:      var(--bs-tertiary-color-rgb);
  --bs-btn-hover-bg:              var(--bs-secondary);
  --bs-btn-hover-border-color:    var(--bs-secondary);
  --bs-btn-hover-color:           var(--bs-dark);
}

.btn-secondary {
  --bs-btn-active-bg:             #d49c00;        /* secondary hover — no Bootstrap var */
  --bs-btn-active-border-color:   #d49c00;
  --bs-btn-active-color:          #fff;
  --bs-btn-active-shadow:         inset 0 3px 5px rgba(0, 0, 0, 0.125);
  --bs-btn-bg:                    var(--bs-secondary);
  --bs-btn-border-color:          var(--bs-secondary);
  --bs-btn-disabled-bg:           var(--bs-secondary);
  --bs-btn-disabled-border-color: var(--bs-secondary);
  --bs-btn-disabled-color:        #fff;
  --bs-btn-focus-shadow-rgb:      var(--bs-tertiary-color-rgb);
  --bs-btn-hover-bg:              var(--bs-dark);
  --bs-btn-hover-border-color:    var(--bs-secondary);
  --bs-btn-hover-color:           #fff;
}

/* Outline buttons: Bootstrap compiles these with the stock blue $primary, so the
   :root --bs-primary override does not reach them. Re-theme to the dark brand. */
.btn-outline-primary {
  --bs-btn-color:                 var(--bs-dark);
  --bs-btn-border-color:          var(--bs-dark);
  --bs-btn-bg:                    transparent;
  --bs-btn-hover-bg:              var(--bs-secondary);
  --bs-btn-hover-border-color:    var(--bs-secondary);
  --bs-btn-hover-color:           var(--bs-dark);
  --bs-btn-active-bg:             var(--bs-secondary);
  --bs-btn-active-border-color:   var(--bs-secondary);
  --bs-btn-active-color:          var(--bs-dark);
  --bs-btn-focus-shadow-rgb:      var(--bs-secondary-rgb);
}

/* Accordion: stock Bootstrap ships a blue active state and chevron. Re-theme to
   the site palette (orange active text/chevron, gold focus ring, white bg). */
.accordion {
  --bs-accordion-color:                  var(--bs-body-color);
  --bs-accordion-bg:                     #fff;
  --bs-accordion-btn-color:              var(--bs-body-color);
  --bs-accordion-btn-bg:                 #fff;
  /* Expanding changes the ground, not the writing (Michael, 2026-08-26). The
     type stays put; so does the chevron below -- with the type dark green and
     the sign beside it flipping to orange, the head would not be calmer, only
     differently restless. The rotation is the state indicator; the colour does
     not have to carry it as well. */
  --bs-accordion-active-color:           var(--bs-body-color);
  --bs-accordion-active-bg:              var(--is-accent-wash);
  --bs-accordion-border-color:           rgba(0, 0, 0, 0.08);
  --bs-accordion-btn-focus-border-color: var(--bs-accordion-border-color);
  --bs-accordion-btn-focus-box-shadow:   none;
  --bs-accordion-btn-icon:               url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%232F3E3A'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  --bs-accordion-btn-active-icon:        url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%232F3E3A'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgba(var(--bs-secondary-rgb), 0.1) inset;
  box-shadow: 0 0 0 1000px rgba(var(--bs-secondary-rgb), 0.1) inset;
}


.form-control:focus {
  border-color: var(--bs-secondary);
  box-shadow: 0 0 0 .25rem rgba(var(--bs-secondary-rgb), .25);
}

/* form-floating is designed for 1rem — reset font size so the label floats correctly */
.form-floating > .form-control,
.form-floating > .form-select,
.form-floating > label {
  font-size: 1rem;
}

.card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: var(--bs-border-radius);
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  padding: 2rem 1.75rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;

  &:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,.11);
    transform: translateY(-6px);
  }

  & .card-header {
    border-bottom: 0;
  }

  & .card-footer {
    border-top: 0;
  }
}

.card-highlight {
  box-shadow:
    0 0 10px rgba(var(--bs-tertiary-color-rgb), 0.6),
    0 0 20px rgba(var(--bs-tertiary-color-rgb), 0.4),
    0 0 40px rgba(var(--bs-tertiary-color-rgb), 0.2) !important;
}


/* ── 4. Layout Helpers ──────────────────────────────────────────────────── */

.no-margin-text p {
  margin: 0;
}
.text-hyphens p {
  hyphens: auto;
}
.text-justify p {
  hyphens: auto;
  text-align: justify;
  text-align-last: left;
}


/* ── 5. Navbar ──────────────────────────────────────────────────────────── */

.navbar {
  background-color: var(--bs-light);
  height: var(--navbar-h);
  padding-block: 0;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;

  &.scrolled {
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    background-color: rgba(var(--bs-dark-rgb), 0.97);
    box-shadow: 0 2px 20px rgba(0,0,0,0.25);
  }

  & .nav-link {
    background: transparent;
    color: var(--bs-dark);
    font-size: 1.25rem;
    font-weight: 700;
    margin-left: 1rem;
    padding: 0.4rem 0.75rem;

    &:hover,
    &.active {
      color: var(--bs-tertiary-color);
    }

    &.nav-link-btn {
      background-color: var(--bs-secondary);
      border: 2px solid var(--bs-secondary);
      border-radius: var(--bs-border-radius);
      color: #fff !important;
      padding: 0.4rem 0.75rem;
      transition: background 0.2s, border-color 0.2s;

      &:hover {
        background-color: var(--bs-dark);
        border-color: var(--bs-secondary);
      }

      &.active {
        background-color: var(--bs-tertiary-color);
        border-color: transparent;
        color: #fff !important;
      }
    }
  }

  & .dropdown-menu {
    --bs-dropdown-link-active-bg: var(--bs-tertiary-color);
    background-color: var(--bs-dark);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0,0,0,.11);
    margin-top: .5rem;
    min-width: 200px;
    padding: 0.5rem;
  }

  & .dropdown-item {
    border-radius: var(--bs-border-radius);
    color: rgba(255,255,255,0.85);
    font-size: 0.88rem;
    padding: 0.45rem 1rem;
    transition: background 0.18s, color 0.18s;

    &:hover,
    &:focus {
      background-color: var(--bs-light);
      color: var(--bs-tertiary-color);
    }
  }

  & .navbar-toggler-icon {
    filter: invert(1);
  }

  /* Highlighted nav item (e.g. "New" badge) */
  & .nav-item.iih-highlight > .nav-link {
    position: relative;
    z-index: 1;

    &::before {
      background: rgba(var(--bs-secondary-rgb), 0.4);
      border-radius: 999px;
      content: "";
      filter: blur(8px);
      inset: -4px;
      position: absolute;
      z-index: -1;
    }

    &::after {
      background: var(--bs-tertiary-color);
      border-radius: 999px;
      color: #fff;
      content: "New";
      font-size: 10px;
      padding: 2px 6px;
      position: absolute;
      right: -10px;
      top: -12px;
      white-space: nowrap;
    }
  }
}


/* ── 6. CMS-specific ────────────────────────────────────────────────────── */

.cms-overlay img {
  display: block;
  height: auto;
  width: 100%;
}

/* Push navbar down when CMS toolbar is visible */
.cms-toolbar-expanded .navbar {
  top: 46px;
}


/* ── 7. Components ──────────────────────────────────────────────────────── */

.back-to-top {
  align-items: center;
  background-color: var(--bs-tertiary-color);
  border-radius: 50%;
  bottom: 84px;
  box-shadow: 0 6px 24px rgba(0,0,0,.11);
  color: #fff;
  display: flex;
  font-size: 1.1rem;
  height: 44px;
  justify-content: center;
  opacity: 0;
  position: fixed;
  right: 28px;
  transform: translateY(12px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.2s;
  visibility: hidden;
  width: 44px;
  z-index: 1040;

  &.visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }

  &:hover {
    background-color: var(--bs-warning);
    color: #fff;
  }
}


/* ── Hero ──────────────────────────────────────────────────────── */

.hero-wrapper {
  min-height: 40vh;
  overflow: hidden !important;
  position: relative;
}
.hero-background {
  position: absolute;
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right bottom;
  z-index: 0;
}
.hero-content-wrapper {
  position: relative;
  z-index: 1;
}
.hero-content {
  min-height: 40vh;
  display: flex;
  align-items: center;
  padding: 1rem;
}
.hero-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: right bottom;
}

.highlight-text, .highlight-text-p p {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(2px);
  display: inline;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;

}
.text-padding p {
  line-height: 2.0;
  padding: 6px 12px;
}

/* Solutions grid */
.solutions-grid {
  display: grid;
  gap: 40px 30px;
  grid-template-columns: repeat(2, 1fr);
  margin: auto;
  max-width: 900px;
  position: relative;

  & .card {
    border: none;
    border-left: 4px solid var(--bs-secondary);
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(var(--bs-primary-rgb), 0.5);
    position: relative;
    transition: all 0.25s ease;

    &:hover {
      transform: translateY(-6px);
    }
  }

  & h4 {
    color: var(--bs-primary);
    font-size: 18px;
    line-height: 1.4;
    margin: 0;
  }

  & .card-1     { transform: translateY(20px); }
  & .card-2     { transform: translateY(50px); }
  & .card-4     { transform: translateY(-50px); }
  & .card-5     { transform: translateY(-20px); }

  & .card-center {
    grid-column: 1 / span 2;
    margin: 0 auto;
    max-width: 420px;
    transform: translateY(-30px);
    z-index: 3;
  }
}


/* ── 8. Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 991.98px) {
  :root {
    --section-py:    64px;
    --section-py-sm: 40px;
  }

  .navbar .navbar-collapse {
    background-color: var(--bs-light);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 6px 24px rgba(0,0,0,.11);
    margin-top: .5rem;
    padding: 1rem 1.25rem 1.5rem;
  }

  .navbar .nav-link {
    padding: 0.55rem 0.5rem !important;
  }
}

@media (max-width: 768px) {
  .solutions-grid {
    gap: 20px;
    grid-template-columns: 1fr;

    & .card {
      max-width: 100%;
      transform: translateY(-20px);
    }

    & .card-center {
      grid-column: span 1;
      margin: 0;
      z-index: 1;
    }
  }
}

@media (max-width: 575.98px) {
  :root {
    --section-py:    48px;
    --section-py-sm: 32px;
  }

  .back-to-top {
    bottom: 80px;
    right: 20px;
  }
}


/* ── 9. Accessibility ───────────────────────────────────────────────────── */

:focus-visible {
  outline: 3px solid var(--bs-secondary);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
