/* Phillips360 Modern V2.033 — focused homepage refinements.
   This layer loads only on the modern homepage, after final-polish.css and
   before accessibility.css. It keeps the approved changes isolated from
   payment, legacy templates, integrations, and administrator screens. */

/* Why Phillips360: wider, equal-size cards with readable service headings. */
body.p360-site .p360-value-grid {
  --p360-home-card-gap: clamp(18px, 2vw, 28px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: var(--p360-home-card-gap);
}
body.p360-site .p360-value-card,
body.p360-site .p360-value-card:nth-child(n+5) {
  display: flex;
  min-height: clamp(340px, 31vw, 430px);
  height: 100%;
  padding: clamp(28px, 3.2vw, 44px);
  grid-column: auto;
  flex-direction: column;
}
body.p360-site .p360-value-card:last-child:nth-child(odd) {
  width: calc(50% - (var(--p360-home-card-gap) / 2));
  grid-column: 1 / -1;
  justify-self: center;
}
body.p360-site .p360-value-card__icon {
  margin: clamp(26px, 3.2vw, 42px) 0 clamp(22px, 2.7vw, 34px);
}
body.p360-site .p360-value-card h3 {
  max-width: none;
  margin-bottom: 14px;
  font-size: clamp(1.45rem, 1.8vw, 2.05rem);
  letter-spacing: -.028em;
  line-height: 1.12;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
}
body.p360-site .p360-value-card p { margin-bottom: 0; }

/* Client ribbon: stronger theme-consistent label and larger logo slots. */
body.p360-site .p360-clients__heading span {
  display: inline-flex;
  min-height: 34px;
  padding: 7px 12px;
  align-items: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--p360-accent) 34%, transparent);
  border-radius: var(--p360-control-radius);
  background: color-mix(in srgb, var(--p360-accent) 11%, transparent);
  color: var(--p360-accent-strong);
  font-size: clamp(.76rem, .82vw, .9rem);
  font-weight: 820;
  letter-spacing: .105em;
}
body.p360-site .p360-clients__heading span::before {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--p360-accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--p360-accent) 14%, transparent);
  content: "";
}
body.p360-site .p360-logo-marquee__item {
  width: clamp(210px, 19vw, 300px);
  height: 158px;
  padding: 24px 30px;
}
body.p360-site .p360-logo-marquee__item img {
  max-width: 205px;
  max-height: 90px;
  opacity: .7;
}

/* Featured Work: preserve each source image's intrinsic aspect ratio. */
body.p360-site .p360-work-card__media,
body.p360-site .p360-work-card--featured .p360-work-card__media {
  aspect-ratio: auto;
  background: rgba(8, 17, 26, .08);
}
body.p360-site .p360-work-card__media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  transform: none;
}
body.p360-site .p360-work-card__media:hover img {
  filter: saturate(1.04);
  transform: none;
}

@media (max-width: 760px) {
  body.p360-site .p360-value-grid { grid-template-columns: 1fr; }
  body.p360-site .p360-value-card,
  body.p360-site .p360-value-card:nth-child(n+5),
  body.p360-site .p360-value-card:last-child:nth-child(odd) {
    width: 100%;
    min-height: 0;
    grid-column: auto;
  }
  body.p360-site .p360-logo-marquee__item {
    width: 190px;
    height: 138px;
    padding: 22px 26px;
  }
  body.p360-site .p360-logo-marquee__item img {
    max-width: 165px;
    max-height: 76px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.p360-site .p360-logo-marquee__item img,
  body.p360-site .p360-work-card__media img { transform: none !important; }
}
