/*
 * Homepage value proposition component.
 *
 * Existing copy remains managed by the WordPress Customizer. This component
 * focuses on hierarchy, responsive stability, and the shared homepage surface
 * system without adding large decorative background shapes.
 */

.home-value {
  position: relative;
  padding-block: clamp(68px, 7vw, 96px);
  background: var(--isp-home-surface-sky, #f5fbff);
  border-block: 1px solid rgba(115, 192, 238, .09);
}

.home-value::before {
  content: none;
}

.home-value > .isp-container {
  display: grid;
  grid-template-columns: minmax(280px, .78fr) minmax(0, 1.32fr);
  gap: clamp(40px, 6vw, 76px);
  align-items: start;
}

.value-intro {
  position: relative;
  max-width: 455px;
  margin: 0;
  text-align: left;
}

.value-intro .section-kicker {
  color: #438fbc;
}

.value-intro h2 {
  margin: 0 0 18px;
  max-width: 500px;
  font-size: clamp(2.55rem, 4.8vw, 4.35rem);
  line-height: .98;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.value-intro > p {
  max-width: 440px;
  margin: 0 0 26px;
  color: #66696b;
  font-size: 1rem;
  line-height: 1.68;
}

.value-intro .isp-button {
  width: fit-content;
  min-height: 48px;
  padding-inline: 18px;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(115, 192, 238, .17);
}

.value-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.value-card {
  --value-accent: #438fbc;
  --value-surface: #f0f9fe;
  position: relative;
  min-height: 0;
  padding: 24px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  column-gap: 16px;
  align-content: start;
  border: 1px solid rgba(68, 68, 68, .07);
  border-radius: 23px;
  background: linear-gradient(145deg, var(--value-surface) 0%, rgba(255, 255, 255, .98) 88%);
  box-shadow: 0 9px 26px rgba(68, 68, 68, .04);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.value-card:nth-child(2) {
  --value-accent: #c85886;
  --value-surface: #fff4f8;
}

.value-card:nth-child(3) {
  --value-accent: #9a7440;
  --value-surface: #fff8ec;
}

.value-card:nth-child(4) {
  --value-accent: #438fbc;
  --value-surface: #eaf7fe;
}

.value-card:hover {
  border-color: color-mix(in srgb, var(--value-accent) 28%, transparent);
  box-shadow: 0 15px 34px rgba(68, 68, 68, .065);
  transform: translateY(-2px);
}

.value-card__number {
  display: none;
}

.value-card__icon {
  grid-column: 1;
  grid-row: 1 / span 4;
  width: 52px;
  height: 52px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(68, 68, 68, .055);
  border-radius: 17px;
  background: rgba(255, 255, 255, .91);
  color: var(--value-accent);
  box-shadow: 0 7px 18px rgba(68, 68, 68, .04);
}

.value-card__icon svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.value-card h3,
.value-card p,
.value-card .text-link {
  grid-column: 2;
}

.value-card h3 {
  margin: 1px 0 9px;
  color: var(--isp-ink);
  font-size: 1.14rem;
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: -.018em;
}

.value-card p {
  margin: 0;
  color: #696b6d;
  font-size: .89rem;
  line-height: 1.58;
}

.value-card p:nth-of-type(n + 2) {
  display: none;
}

.value-card--cta {
  background: linear-gradient(145deg, #eaf7fe 0%, #f8fcff 64%, #ffffff 100%);
}

.value-card .text-link--large {
  width: fit-content;
  margin-top: 14px;
  color: var(--value-accent);
  font-size: .9rem;
}

@media (max-width: 980px) {
  .home-value > .isp-container {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .value-intro {
    max-width: 720px;
  }

  .value-intro h2 {
    max-width: 720px;
  }

  .value-intro > p {
    max-width: 650px;
  }
}

@media (max-width: 700px) {
  .home-value {
    padding-block: 52px;
  }

  .home-value > .isp-container {
    gap: 28px;
  }

  .value-intro h2 {
    font-size: clamp(2.35rem, 11vw, 3.2rem);
  }

  .value-intro > p {
    margin-bottom: 22px;
    font-size: .96rem;
  }

  .value-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .value-card {
    padding: 20px;
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: 14px;
    border-radius: 20px;
  }

  .value-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
  }

  .value-card h3 {
    font-size: 1.08rem;
  }

  .value-card p {
    font-size: .87rem;
  }
}

@media (max-width: 420px) {
  .value-card {
    padding: 18px;
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 12px;
  }

  .value-card__icon {
    width: 44px;
    height: 44px;
  }

  .value-card__icon svg {
    width: 22px;
    height: 22px;
  }

  .value-intro .isp-button {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .value-card {
    transition: none;
  }
}

/* Object-led photo cards: the image carries the story while the soft overlay
 * keeps every saved Customizer title and description readable. */
.value-card--has-media {
  min-height: 228px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  isolation: isolate;
  background: #f8f5ee;
  border-color: rgba(68, 68, 68, .09);
  box-shadow: 0 12px 30px rgba(68, 68, 68, .07);
}

.value-card--has-media::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .98) 0%, rgba(255, 255, 255, .91) 39%, rgba(255, 255, 255, .36) 70%, rgba(255, 255, 255, .07) 100%),
    linear-gradient(0deg, rgba(255, 255, 255, .96) 0%, rgba(255, 255, 255, 0) 64%);
  pointer-events: none;
}

.value-card--has-media::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--value-accent) 56%, transparent);
  pointer-events: none;
}

.value-card__media {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
}

.value-card__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: transform .42s cubic-bezier(.2, .7, .2, 1), filter .25s ease;
}

.value-card--has-media:hover .value-card__media img,
.value-card--has-media:focus-within .value-card__media img {
  transform: scale(1.035);
  filter: saturate(1.04);
}

.value-card--has-media .value-card__icon {
  position: absolute;
  z-index: 3;
  top: 16px;
  left: 16px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 8px 22px rgba(68, 68, 68, .09);
  backdrop-filter: blur(8px);
}

.value-card--has-media .value-card__icon svg {
  width: 22px;
  height: 22px;
}

.value-card--has-media h3,
.value-card--has-media p,
.value-card--has-media .text-link {
  position: relative;
  z-index: 3;
  width: min(74%, 225px);
  grid-column: auto;
}

.value-card--has-media h3 {
  margin: 0 0 7px;
  font-size: clamp(1.04rem, 1.5vw, 1.16rem);
  line-height: 1.22;
}

.value-card--has-media p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  color: #5f6264;
  font-size: .84rem;
  line-height: 1.48;
}

.value-card--has-media .text-link--large {
  margin-top: 11px;
  font-size: .86rem;
}

@media (max-width: 700px) {
  .value-card--has-media {
    min-height: 190px;
    padding: 17px;
  }

  .value-card--has-media .value-card__icon {
    top: 14px;
    left: 14px;
  }

  .value-card--has-media h3,
  .value-card--has-media p,
  .value-card--has-media .text-link {
    width: min(76%, 270px);
  }

  .value-card--has-media p {
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .value-card__media img {
    transition: none;
  }
}
