/* Section polish layer — Services, Alt-services, Features, Stats, Callback. Loaded after enhance.css. */

/*==============================================================
  0. Shared tokens for this layer
  Solid colours only — no gradients anywhere in this file.
==============================================================*/
:root {
  --sx-card-radius: 4px;
  --sx-badge-radius: 8px;
  --sx-gap: 24px;
  --sx-pad-y: 92px;
  --sx-title-gap: 46px;
  --sx-lift: -4px;
  --sx-dur: 220ms;
  --sx-border: #e4eaf2;
  --sx-border-hover: #cfdbea;
}

/*==============================================================
  1. Vertical rhythm — one cadence for all four sections
==============================================================*/
#services,
#alt-services,
#features,
#stats {
  padding-top: var(--sx-pad-y);
  padding-bottom: var(--sx-pad-y);
  overflow-x: clip;
}

/* hairlines give the white-on-white sections real structure */
#services {
  border-top: 1px solid var(--sx-border);
}

#services .section-title,
#features .section-title {
  padding-bottom: var(--sx-title-gap);
}

#services .section-title p,
#features .section-title p {
  margin-bottom: 0;
  max-width: 60ch;
  margin-inline: auto;
}

/*==============================================================
  2. Uniform grid rails — replaces Bootstrap's per-row stretch so
     every card in a section is exactly the same height.
==============================================================*/
#services > .container > .row,
#alt-services > .container > .row,
#features > .container > .row,
#stats .col-lg-7 > .row {
  display: grid;
  gap: var(--sx-gap);
  margin: 0;
  --bs-gutter-x: 0;
  --bs-gutter-y: 0;
  /* single-column stacks size to their own content; multi-column
     rails switch to 1fr below so rows never look ragged */
  grid-auto-rows: auto;
  grid-template-columns: minmax(0, 1fr);
}

#services > .container > .row > [class*="col-"],
#alt-services > .container > .row > [class*="col-"],
#features > .container > .row > [class*="col-"],
#stats .col-lg-7 > .row > [class*="col-"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex: none;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
  display: flex;
}

#services > .container > .row > [class*="col-"] > *,
#alt-services > .container > .row > [class*="col-"] > *,
#features > .container > .row > [class*="col-"] > *,
#stats .col-lg-7 > .row > [class*="col-"] > * {
  width: 100%;
}

/* column counts */
@media (min-width: 576px) {
  #services > .container > .row,
  #features > .container > .row,
  #stats .col-lg-7 > .row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
  }
}

@media (min-width: 768px) {
  #features > .container > .row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  #alt-services > .container > .row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
  }

  #features > .container > .row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  #services > .container > .row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/*==============================================================
  3. #services — 4-up capability cards
==============================================================*/
.services .service-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
  width: 100%;
  padding: clamp(24px, 2.3vw, 32px) clamp(20px, 2vw, 28px) clamp(26px, 2.5vw, 34px);
  background: #fff;
  border: 1px solid var(--sx-border);
  border-radius: var(--sx-card-radius);
  box-shadow: none;
  overflow: hidden;
  z-index: 0;
  transition: transform var(--sx-dur) var(--ease),
    box-shadow var(--sx-dur) var(--ease),
    border-color var(--sx-dur) var(--ease);
}

/* kill the template's decorative corner blobs */
.services .service-item::after,
.services .service-item:hover::after {
  content: none;
  display: none;
}

/* ::before becomes a 2px gold reveal rule along the top edge */
.services .service-item::before,
.services .service-item:hover::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: auto;
  bottom: auto;
  width: 100%;
  height: 2px;
  background: var(--brand-gold);
  border-radius: 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 320ms var(--ease);
  z-index: 1;
}

.services .service-item:hover::before {
  transform: scaleX(1);
}

.services .service-item:hover {
  transform: translateY(var(--sx-lift));
  box-shadow: var(--shadow-md);
  border-color: var(--sx-border-hover);
}

.services .service-item i,
.services .service-item:hover i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  margin: 0 0 22px;
  padding: 0;
  font-size: 23px;
  line-height: 1;
  border-radius: var(--sx-badge-radius);
  background: var(--brand-navy-soft);
  color: var(--brand-navy);
  transition: background var(--sx-dur) var(--ease), color var(--sx-dur) var(--ease);
}

.services .service-item i::before {
  display: block;
  line-height: 1;
}

.services .service-item:hover i {
  background: var(--brand-navy);
  color: #fff;
}

.services .service-item h4,
.services .service-item:hover h4,
.services .service-item h4 a,
.services .service-item:hover h4 a {
  margin: 0 0 10px;
  font-family: var(--heading-font);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.2px;
  color: var(--ink);
}

.services .service-item p,
.services .service-item:hover p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.68;
  color: var(--ink-muted);
}

/*==============================================================
  4. #alt-services — 6 editorial image cards
==============================================================*/
.alt-services {
  background: var(--brand-navy-soft);
}

.alt-services .service-item {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background: #fff;
  border: 1px solid var(--sx-border);
  border-radius: var(--sx-card-radius);
  overflow: hidden;
  box-shadow: none;
  transition: transform var(--sx-dur) var(--ease), box-shadow var(--sx-dur) var(--ease);
}

.alt-services .service-item:hover {
  transform: translateY(var(--sx-lift));
  box-shadow: var(--shadow-md);
}

.alt-services .service-item .img,
.alt-services .img {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0;
  overflow: hidden;
  background: var(--brand-navy-soft);
}

.alt-services .service-item .img img,
.alt-services .img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  transition: transform 520ms var(--ease);
}

.alt-services .service-item:hover .img img {
  transform: scale(1.04);
}

.alt-services .service-item .details,
.alt-services .details {
  position: static;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  inset: auto;
  width: auto;
  margin: 0;
  padding: 24px 26px 28px;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  text-align: left;
  border-top: 1px solid var(--sx-border);
}

.alt-services .service-item .details h3,
.alt-services .details h3,
.alt-services .service-item:hover .details h3 {
  margin: 0 0 10px;
  font-family: var(--heading-font);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.2px;
  color: var(--ink);
}

.alt-services .service-item .details p,
.alt-services .details p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.68;
  color: var(--ink-muted);
}

/*==============================================================
  5. #features — 12 capability chips
==============================================================*/
.features .features-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  height: 100%;
  min-height: 78px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--sx-border);
  border-radius: var(--sx-card-radius);
  box-shadow: none;
  transition: transform var(--sx-dur) var(--ease),
    box-shadow var(--sx-dur) var(--ease),
    border-color var(--sx-dur) var(--ease);
}

.features .features-item:hover {
  transform: translateY(var(--sx-lift));
  box-shadow: var(--shadow-md);
  border-color: var(--sx-border-hover);
}

.features .features-item i,
.features .features-item i[class*="bi-"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  font-size: 19px;
  line-height: 1;
  border-radius: var(--sx-badge-radius);
  background: var(--brand-navy-soft);
  color: var(--brand-navy) !important;
  transition: background var(--sx-dur) var(--ease), color var(--sx-dur) var(--ease);
}

.features .features-item i[class*="bi-"]::before {
  display: block;
  line-height: 1;
}

.features .features-item:hover i[class*="bi-"] {
  background: var(--brand-navy);
  color: #fff !important;
}

.features .features-item h3,
.features .features-item h3 a {
  min-width: 0;
  margin: 0;
  padding: 0;
  font-family: var(--heading-font);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -.1px;
  color: var(--ink);
  overflow-wrap: break-word;
}

/*==============================================================
  6. #stats — metric display + illustration
==============================================================*/
.stats {
  background: #fff;
}

/* illustration: crop the stray artefact off the right edge and
   keep the art optically balanced against the metric grid */
.stats > .container > .row > .col-lg-5 img {
  display: block;
  width: 100%;
  aspect-ratio: 1.46;
  object-fit: cover;
  object-position: left center;
  margin: 0 auto;
}

.stats .stats-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  width: 100%;
  height: 100%;
  padding: 26px 24px;
  background: #fff;
  border: 1px solid var(--sx-border);
  border-radius: var(--sx-card-radius);
  box-shadow: none;
  transition: transform var(--sx-dur) var(--ease),
    box-shadow var(--sx-dur) var(--ease),
    border-color var(--sx-dur) var(--ease);
}

.stats .stats-item:hover {
  transform: translateY(var(--sx-lift));
  box-shadow: var(--shadow-md);
  border-color: var(--sx-border-hover);
}

.stats .stats-item > div {
  min-width: 0;
  flex: 1 1 auto;
}

.stats .stats-item i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  margin: 2px 0 0;
  padding: 0;
  font-size: 21px;
  line-height: 1;
  border-radius: var(--sx-badge-radius);
  background: var(--brand-navy-soft);
  color: var(--brand-navy);
}

.stats .stats-item i::before {
  display: block;
  line-height: 1;
}

.stats .stats-item span.purecounter,
.stats .stats-item .purecounter {
  display: block;
  font-family: var(--heading-font);
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1.2px;
  color: var(--brand-navy);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.stats .stats-item span.purecounter::after {
  content: "+";
  margin-left: 1px;
  font-size: .72em;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--brand-gold);
  vertical-align: 3%;
}

/* hairline turns the block into a real metric card: figure / rule / label */
.stats .stats-item p {
  margin: 14px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--sx-border);
  font-family: var(--default-font);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-muted);
}

.stats .stats-item p strong {
  display: block;
  margin-bottom: 2px;
  font-family: var(--heading-font);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.1px;
  color: var(--ink);
}

.stats .stats-item p span {
  display: block;
  font-family: var(--default-font);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink-muted);
}

/*==============================================================
  7. Callback band — premium conversion module
  NOTE: index.html carries an inline <style> block later in the
  document, so every rule here is deliberately (0,2,0) or higher.
==============================================================*/
body .ultra-classy-callback-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 80px 20px;
  background-color: var(--brand-navy);
}

body .ultra-classy-callback-section .ultra-classy-callback-container {
  display: flex;
  /* the inline <style> in index.html flips this to column below 768px;
     wrapping row + 100% basis gives the same stack with full-width children */
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 28px 44px;
  width: 100%;
  max-width: 1140px;
  padding: 36px 40px;
  background: #fff;
  border: 0;
  border-radius: 6px;
  box-shadow: 0 18px 44px rgba(11, 26, 44, .22);
}

body .ultra-classy-callback-section .ultra-classy-text {
  flex: 1 1 320px;
  min-width: 0;
  text-align: left;
}

body .ultra-classy-callback-section .ultra-classy-heading {
  margin: 0;
  font-family: var(--heading-font);
  font-size: clamp(21px, 2.1vw, 27px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -.5px;
  color: var(--brand-navy);
}

body .ultra-classy-callback-section .ultra-classy-subtext {
  margin: 10px 0 0;
  font-family: var(--default-font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-muted);
  text-wrap: pretty;
}

body .ultra-classy-callback-section .ultra-classy-form {
  display: flex;
  flex-direction: row;
  flex: 0 1 448px;
  align-items: stretch;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

body .ultra-classy-callback-section .ultra-classy-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  font-family: var(--default-font);
  font-size: 15px;
  color: var(--ink);
  background-color: #fff;
  border: 1px solid var(--sx-border);
  border-radius: var(--radius-md);
  box-shadow: none;
  transition: border-color var(--sx-dur) var(--ease), box-shadow var(--sx-dur) var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

body .ultra-classy-callback-section .ultra-classy-input::placeholder {
  font-style: normal;
  color: #97a4b5;
  opacity: 1;
}

body .ultra-classy-callback-section .ultra-classy-input:focus,
body .ultra-classy-callback-section .ultra-classy-input:focus-visible {
  outline: none;
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 3px rgba(41, 80, 120, .14);
}

body .ultra-classy-callback-section .ultra-classy-button {
  flex: 0 0 auto;
  height: 52px;
  padding: 0 30px;
  font-family: var(--heading-font);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .1px;
  color: #fff;
  background-color: var(--brand-navy);
  border: 0;
  border-radius: var(--radius-md);
  box-shadow: none;
  cursor: pointer;
  transition: background-color var(--sx-dur) var(--ease),
    transform var(--sx-dur) var(--ease),
    box-shadow var(--sx-dur) var(--ease);
}

body .ultra-classy-callback-section .ultra-classy-button:hover {
  background-color: var(--brand-navy-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(11, 26, 44, .22);
}

body .ultra-classy-callback-section .ultra-classy-button:active {
  transform: translateY(0);
}

/* ---- confirmation modal ---- */
body .ultra-classy-callback-section .popup-overlay {
  padding: 20px;
  background: rgba(15, 28, 45, .64);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

body .ultra-classy-callback-section .popup-content {
  width: 100%;
  max-width: 420px;
  padding: 32px 30px 28px;
  background: #fff;
  border-top: 2px solid var(--brand-gold);
  border-radius: 6px;
  box-shadow: 0 24px 60px rgba(11, 26, 44, .34);
  text-align: center;
}

body .ultra-classy-callback-section .popup-content p {
  margin: 0 0 22px;
  font-family: var(--default-font);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink);
}

body .ultra-classy-callback-section .popup-close-button {
  min-height: 46px;
  padding: 0 30px;
  font-family: var(--heading-font);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background-color: var(--brand-navy);
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color var(--sx-dur) var(--ease);
}

body .ultra-classy-callback-section .popup-close-button:hover {
  background-color: var(--brand-navy-deep);
}

/*==============================================================
  8. Responsive
==============================================================*/
@media (max-width: 1199.98px) {
  :root {
    --sx-pad-y: 78px;
    --sx-title-gap: 40px;
  }
}

@media (max-width: 991.98px) {
  :root {
    --sx-pad-y: 64px;
    --sx-gap: 20px;
    --sx-title-gap: 34px;
  }

  /* illustration reads as a lead-in, not a half-page block */
  .stats > .container > .row > .col-lg-5 img {
    max-width: 480px;
    margin-bottom: 8px;
  }

  body .ultra-classy-callback-section {
    padding: 64px 20px;
  }

  body .ultra-classy-callback-section .ultra-classy-callback-container {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    padding: 30px 30px 32px;
    gap: 22px;
  }

  body .ultra-classy-callback-section .ultra-classy-text,
  body .ultra-classy-callback-section .ultra-classy-form {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 767.98px) {
  body .ultra-classy-callback-section .ultra-classy-input,
  body .ultra-classy-callback-section .ultra-classy-button {
    height: 50px;
  }

  body .ultra-classy-callback-section .ultra-classy-button {
    padding: 0 26px;
    font-size: 15px;
  }
}

@media (max-width: 575.98px) {
  :root {
    --sx-pad-y: 54px;
    --sx-gap: 16px;
    --sx-title-gap: 30px;
  }

  .services .service-item i,
  .services .service-item:hover i {
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
    font-size: 21px;
  }

  .services .service-item h4,
  .services .service-item:hover h4 {
    font-size: 17.5px;
  }

  .services .service-item p,
  .alt-services .service-item .details p {
    font-size: 14px;
  }

  .alt-services .service-item .details,
  .alt-services .details {
    padding: 20px 20px 24px;
  }

  .alt-services .service-item .details h3,
  .alt-services .details h3 {
    font-size: 17.5px;
  }

  .features .features-item {
    min-height: 72px;
    padding: 14px 16px;
    gap: 12px;
  }

  .features .features-item i,
  .features .features-item i[class*="bi-"] {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }

  .features .features-item h3 {
    font-size: 14.5px;
  }

  .stats .stats-item {
    padding: 22px 20px;
    gap: 15px;
  }

  .stats .stats-item i {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .stats .stats-item span.purecounter,
  .stats .stats-item .purecounter {
    font-size: 34px;
  }

  .stats .stats-item p {
    margin-top: 12px;
    padding-top: 12px;
  }

  body .ultra-classy-callback-section {
    padding: 52px 16px;
  }

  body .ultra-classy-callback-section .ultra-classy-callback-container {
    padding: 26px 22px 28px;
  }

  body .ultra-classy-callback-section .ultra-classy-subtext {
    font-size: 14px;
  }

  body .ultra-classy-callback-section .ultra-classy-form {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  body .ultra-classy-callback-section .ultra-classy-input,
  body .ultra-classy-callback-section .ultra-classy-button {
    width: 100%;
    font-size: 15px;
  }

  body .ultra-classy-callback-section .popup-content {
    padding: 26px 22px 24px;
  }

  body .ultra-classy-callback-section .popup-content p {
    font-size: 15px;
  }
}

/* very narrow phones */
@media (max-width: 380px) {
  .services .service-item,
  .stats .stats-item {
    padding-left: 18px;
    padding-right: 18px;
  }

  .alt-services .service-item .details,
  .alt-services .details {
    padding-left: 18px;
    padding-right: 18px;
  }

  .features .features-item {
    padding: 13px 14px;
    gap: 11px;
  }

  .features .features-item h3 {
    font-size: 14px;
  }

  .stats .stats-item span.purecounter,
  .stats .stats-item .purecounter {
    font-size: 32px;
  }
}

/*==============================================================
  9. Motion preferences
==============================================================*/
@media (prefers-reduced-motion: reduce) {
  .services .service-item,
  .services .service-item::before,
  .alt-services .service-item,
  .alt-services .service-item .img img,
  .features .features-item,
  .stats .stats-item,
  body .ultra-classy-callback-section .ultra-classy-button {
    transition: none !important;
  }

  .services .service-item:hover,
  .alt-services .service-item:hover,
  .features .features-item:hover,
  .stats .stats-item:hover,
  body .ultra-classy-callback-section .ultra-classy-button:hover {
    transform: none;
  }
}
