/* ============================================================
   AI CONSTRUCTION WHY - module.css
   --acw-accent / --acw-icon / --acw-bg are injected from HubL.
   Desktop: full-bleed split, copy left (aligned to the 1180px
   container), image fills the right column edge to edge.
   Type sizes and breakpoints follow applied-ai-solutions.
   ============================================================ */

.acw-section {
  --acw-accent: #2F6BFF;
  --acw-icon: #E0412F;
  --acw-bg: #FFFFFF;
  --acw-icon-tint: #FDECEA;
  --acw-line: #E6EAF1;
  position: relative;
  background: var(--acw-bg);
  -webkit-font-smoothing: antialiased;
}

@supports (background: color-mix(in srgb, red 10%, white)) {
  .acw-section {
    --acw-icon-tint: color-mix(in srgb, var(--acw-icon) 11%, #FFFFFF);
  }
}

/* -- Layout -------------------------------------------------- */
.acw-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .55fr);
  /* Full-screen, but capped so zoomed-out / very tall viewports
     don't leave the content floating in a huge gap */
  min-height: min(calc(100vh - 71px), 900px);
  min-height: min(calc(100svh - 71px), 900px);
  /* Capped so zooming out doesn't stretch the split apart; same caps
     as why-techus (1560px, stepping down to 1300px past 1560px) */
  max-width: 1560px;
  margin: 0 auto;
}

@media (min-width: 1560px) {
  .acw-grid {
    max-width: 1300px;
  }
}

.acw-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  /* Copy sits near the left edge with a fixed gutter */
  padding: clamp(48px, 7vw, 96px) clamp(40px, 3.6vw, 60px) clamp(48px, 7vw, 96px) clamp(40px, 5vw, 96px);
}

.acw-head,
.acw-points {
  width: 100%;
  max-width: 880px;
}

/* -- Header (stacked left, as in the design) ----------------- */
.acw-eyebrow {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--acw-accent);
}

.acw-section .acw-title {
  width: auto !important;
  max-width: 640px !important;
  margin: 0 !important;
  font-size: clamp(30px, 3.4vw, 44px) !important;
  font-weight: 800;
  letter-spacing: -.028em;
  line-height: 1.06;
  color: #0B1020;
}

.acw-desc {
  max-width: 620px;
  margin: 16px 0 0;
  font-size: 16px;
  line-height: 1.75;
  color: #5A6472;
}

/* -- Points (2-column list with hairline rules) -------------- */
.acw-points {
  margin-top: clamp(26px, 3.4vw, 38px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(28px, 2.6vw, 40px);
  border-top: 1px solid var(--acw-line);
}

.acw-point {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  padding: 22px 4px 22px 0;
  border-bottom: 1px solid var(--acw-line);
}

/* Hairline that draws in under the hovered point */
.acw-point::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--acw-icon);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .5s cubic-bezier(.22, .61, .36, 1);
}

.acw-point:hover::after {
  transform: scaleX(1);
}

.acw-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--acw-icon-tint);
  color: var(--acw-icon);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .35s ease, color .35s ease, box-shadow .35s ease,
              transform .45s cubic-bezier(.2, .8, .2, 1);
}

.acw-icon i {
  font-size: 19px;
  line-height: 1;
  color: inherit;
}

/* Hover only - no point is highlighted at rest */
.acw-point:hover .acw-icon {
  background: var(--acw-icon);
  color: #FFFFFF;
  transform: translateY(-2px) rotate(-6deg);
  box-shadow: 0 10px 22px -10px rgba(224, 65, 47, .55);
}

.acw-point-txt {
  flex: 1;
  min-width: 0;
}

.acw-section .acw-point-title {
  margin: 0 !important;
  font-size: 20px !important;
  font-weight: 800;
  letter-spacing: -.015em;
  line-height: 1.3;
  color: #0F1A2E;
}

.acw-point-desc {
  margin: 6px 0 0;
  font-size: 16px;
  line-height: 1.75;
  color: #5A6472;
}

/* -- Media --------------------------------------------------- */
.acw-media {
  position: relative;
  min-height: 100%;
  overflow: hidden;
}

.acw-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

/* Placeholder while no image is chosen: soft blueprint panel */
.acw-media--empty {
  background: linear-gradient(160deg, #EEF4FE 0%, #F6F9FE 45%, #E4EDFC 100%);
}

.acw-media-fallback {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(47, 107, 255, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 107, 255, .09) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(90% 80% at 50% 50%, #000 30%, transparent 85%);
  mask-image: radial-gradient(90% 80% at 50% 50%, #000 30%, transparent 85%);
}

/* -- Scroll reveal (points fade up, staggered via --d from JS) -- */
@media (prefers-reduced-motion: no-preference) {
  .acw-animate .acw-head,
  .acw-animate .acw-point {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease var(--d, 0ms),
                transform .6s cubic-bezier(.22, .61, .36, 1) var(--d, 0ms);
  }

  .acw-animate .acw-media {
    opacity: 0;
    transition: opacity .9s ease .15s;
  }

  .acw-animate .acw-head.is-visible,
  .acw-animate .acw-point.is-visible,
  .acw-animate .acw-media.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* -- Responsive ---------------------------------------------- */
@media (max-width: 1024px) {
  .acw-grid {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .acw-copy {
    padding: clamp(48px, 7vw, 96px) 40px;
  }

  /* Header centred in a 600 / 550px column */
  .acw-head {
    text-align: center;
  }

  .acw-head,
  .acw-points {
    margin-left: auto;
    margin-right: auto;
  }

  .acw-section .acw-title {
    max-width: 600px !important;
    margin: 0 auto !important;
    text-wrap: wrap;
  }

  .acw-desc {
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
    text-wrap: wrap;
  }

  /* Points stay 2-up; an odd last point fills the row */
  .acw-point:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .acw-media {
    height: 420px;
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .acw-copy {
    padding: 48px 20px;
  }

  .acw-points {
    grid-template-columns: minmax(0, 1fr);
  }

  .acw-point {
    padding: 18px 0;
  }

  .acw-media {
    height: 300px;
  }
}

/* No image on phones (portrait and landscape) or tablet portrait;
   tablet landscape keeps it */
@media (max-width: 640px),
       (max-width: 1024px) and (orientation: portrait),
       (max-width: 1024px) and (orientation: landscape) and (max-height: 500px) {
  .acw-media {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .acw-icon,
  .acw-point::after {
    transition: none;
  }

  .acw-point:hover .acw-icon {
    transform: none;
  }
}
