/* Autowhat — one image system (banners, surfaces, pattern, UI vs photo) */

:root {
  --aw-ver: aw15;
  --aw-hero-enterprise: url("../img/aw/hero/hero-enterprise.webp?v=aw9");
  --aw-hero-workforce: url("../img/aw/hero/hero-workforce.webp?v=aw9");
  --aw-hero-plant: url("../img/aw/hero/hero-plant.webp?v=aw9");
  --aw-hero-yard: url("../img/aw/hero/hero-yard.webp?v=aw9");
  --aw-hero-retail: url("../img/aw/hero/hero-retail.webp?v=aw9");
  --aw-hero-insight: url("../img/aw/hero/hero-insight.webp?v=aw9");
  --aw-ambient: url("../img/hero/ambient-clean.webp?v=amb2");
  --aw-mesh: url("../img/hero/pattern-mesh.webp?v=pat3");

  /* Banners only — editorial `<img>` frames stay clean below */
  --photo-filter: saturate(1.05) contrast(1.04) brightness(0.97);
  --photo-filter-ui: none;
  --photo-overlay-image:
    radial-gradient(ellipse 110% 75% at 50% 100%, rgba(11, 143, 168, 0.38), transparent 58%),
    linear-gradient(100deg, rgba(11, 143, 168, 0.62) 0%, rgba(11, 143, 168, 0.14) 46%, transparent 72%);
  --photo-overlay-size: auto, auto;
  --photo-editorial-filter: none;
  --photo-frame-bg: #e4eff0;
  --photo-ui-bg: linear-gradient(180deg, #f4fcfd 0%, #e8f1f2 100%);

  --bg-pattern-dots: radial-gradient(circle at 1px 1px, rgba(0, 167, 201, 0.09) 1px, transparent 0);
  --bg-pattern-dots-size: 28px 28px;
  --bg-pattern-dots-soft: radial-gradient(circle at 1px 1px, rgba(0, 167, 201, 0.04) 1px, transparent 0);
  --bg-pattern-dots-soft-size: 26px 26px;
  --bg-pattern-glow: radial-gradient(ellipse 120% 70% at 50% -18%, rgba(9, 187, 223, 0.07), transparent 55%);
  --bg-pattern-aurora:
    radial-gradient(ellipse 85% 55% at 8% 0%, rgba(9, 187, 223, 0.11), transparent 52%),
    radial-gradient(ellipse 70% 50% at 92% 12%, rgba(0, 167, 201, 0.08), transparent 54%);
  --bg-pattern-lines: repeating-linear-gradient(
    -11deg,
    transparent 0,
    transparent 38px,
    rgba(0, 167, 201, 0.028) 38px,
    rgba(0, 167, 201, 0.028) 39px
  );
  --bg-pattern-grid:
    linear-gradient(rgba(0, 167, 201, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 167, 201, 0.035) 1px, transparent 1px);
  --bg-pattern-grid-size: 56px 56px;
  --bg-pattern-mesh-tile: url("../img/hero/pattern-mesh.webp?v=pat3");
  --bg-pattern-wash: var(--bg-pattern-glow), var(--bg-pattern-dots);

  --banner-glow-a: radial-gradient(820px 460px at 84% 14%, rgba(9, 187, 223, 0.13), transparent 62%);
  --banner-glow-b: radial-gradient(640px 380px at 58% 100%, rgba(0, 167, 201, 0.08), transparent 58%);
  --banner-scrim: linear-gradient(104deg, rgba(11, 143, 168, 0.74) 0%, rgba(11, 143, 168, 0.18) 44%, transparent 72%);
  --banner-stack-size: auto, auto, auto, cover, cover;
  --banner-stack-pos: 0 0, 100% 0, 50% 100%, center, var(--banner-pos, center);
  --banner-stack-blend: normal, normal, normal, soft-light, normal;
}

/* Page + hero banners */
.page-hero.art-orbit,
.hero-slide.art-orbit { --banner-photo: var(--aw-hero-enterprise); --banner-pos: 68% center; }
.page-hero.art-aisle,
.hero-slide.art-aisle { --banner-photo: var(--aw-hero-workforce); --banner-pos: center; }
.page-hero.art-cold,
.hero-slide.art-cold { --banner-photo: var(--aw-hero-plant); --banner-pos: center; }
.page-hero.art-lanes,
.hero-slide.art-lanes { --banner-photo: var(--aw-hero-yard); --banner-pos: center right; }
.page-hero.art-lattice,
.hero-slide.art-lattice { --banner-photo: var(--aw-hero-retail); --banner-pos: 66% center; }
.page-hero.art-graph,
.hero-slide.art-graph { --banner-photo: var(--aw-hero-insight); --banner-pos: center; }

.page-hero::before,
.hero-slide::before {
  filter: var(--photo-filter);
}

.page-hero[class*="art-"]::before,
.hero-slide[class*="art-"]::before {
  background-image:
    var(--banner-scrim),
    var(--banner-glow-a),
    var(--banner-glow-b),
    var(--aw-ambient),
    var(--banner-photo);
  background-size: var(--banner-stack-size);
  background-position: var(--banner-stack-pos);
  background-repeat: no-repeat;
  background-blend-mode: var(--banner-stack-blend);
}

.page-hero::after,
.hero-slide::after,
.page-close::after,
.home-close::after {
  background-image: var(--photo-overlay-image);
  background-size: var(--photo-overlay-size);
}

.home .hero-slide::after {
  background-image: radial-gradient(ellipse 95% 65% at 50% 100%, rgba(11, 143, 168, 0.22), transparent 58%);
  background-size: auto;
}

.page-close::before,
.home-close::before {
  background-image:
    var(--banner-scrim),
    var(--banner-glow-a),
    var(--banner-glow-b),
    var(--aw-ambient),
    var(--banner-photo, var(--aw-hero-enterprise));
  background-size: var(--banner-stack-size);
  background-position: var(--banner-stack-pos);
  background-repeat: no-repeat;
  background-blend-mode: var(--banner-stack-blend);
  filter: var(--photo-filter);
}

.home-close::before {
  --banner-photo: var(--aw-hero-yard);
  --banner-pos: center right;
}

.page-close::before {
  --banner-photo: var(--aw-hero-enterprise);
  --banner-pos: center right;
}

/* Editorial + product image frames — clean photos, no mesh or tint stacks */
.aw-photo,
.story-fig,
.sector-fig,
.step-row figure,
.product-shot,
.tile-shot,
.shot-grid a,
.fh-topic__fig,
.fh-step__fig,
.fh-card__shot {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--photo-frame-bg);
}

.aw-photo::after,
.story-fig::after,
.sector-fig::after,
.step-row figure::after,
.product-shot::after,
.tile-shot::after,
.shot-grid a::after,
.fh-topic__fig::after,
.fh-step__fig::after,
.fh-card__shot::after {
  content: none;
}

.aw-photo img,
.story-fig img,
.sector-fig img,
.step-row img,
.product-shot img,
.tile-shot img,
.shot-grid img,
.fh-topic__fig img,
.fh-step__fig img,
.fh-card__shot img {
  display: block;
  width: 100%;
  max-width: none;
  filter: var(--photo-editorial-filter);
}

.story-fig img,
.sector-fig img,
.step-row img,
.fh-topic__fig img,
.fh-step__fig img,
.tile-shot img,
.shot-grid img[src*=".jpg"],
.product-shot img[src*=".jpg"],
.fh-card__shot img[src*=".jpg"] {
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.product-shot img[src*=".jpg"] {
  height: auto;
  max-height: min(52vh, 440px);
}

.product-shot img[src*=".png"],
.tile-shot img[src*=".png"],
.shot-grid img[src*=".png"],
.fh-card__shot img[src*=".png"] {
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 12px 16px;
  box-sizing: border-box;
  filter: none;
}

.product-shot:has(img[src*=".png"]),
.tile-shot:has(img[src*=".png"]),
.shot-grid a:has(img[src*=".png"]),
.fh-card__shot:has(img[src*=".png"]) {
  background: var(--photo-ui-bg);
}

.fh-logos img,
.logo-row img,
img[src*="img/aw/logos/"] {
  filter: none;
}

/* Contextual crop — home teasers + sector tiles */
.story-fig img[src*="process"] { object-position: center 40%; }
.story-fig img[src*="hero-plant"] { object-position: center 42%; }
.story-fig img[src*="leakage"] { object-position: center 22%; }
.story-fig img[src*="gps"] { object-position: center 38%; }
.story-fig img[src*="logistics"] { object-position: 55% 40%; }
.fh-topic__fig img[src*="manufacturing"] { object-position: center 45%; }
.fh-topic__fig img[src*="manufacturing-hero"] { object-position: center 38%; }
.fh-card__shot img[src*="xforce"] { object-position: left center; }
.fh-card__shot img[src*="payables"] { object-position: center 30%; }
.fh-card__shot img[src*="autogrow"] { object-position: center 35%; }
.fh-card__shot img[src*="content-ai"] { object-position: center 28%; }
.fh-card__shot img[src*="vidyanta"] { object-position: center 32%; }
.fh-topic__fig img[src*="hero-yard"] { object-position: 55% center; }
.fh-topic__fig img[src*="autoaudit"] { object-position: center 32%; }
.fh-topic__fig img[src*="bfsi"] { object-position: 50% 35%; }
.fh-topic__fig img[src*="plant"] { object-position: center 52%; }
.fh-topic__fig img[src*="retail"] { object-position: 48% center; }
.fh-topic__fig img[src*="qsr"] { object-position: center 42%; }
.fh-topic__fig img[src*="education"] { object-position: 55% 40%; }
.fh-step__pat--1 { object-position: 42% 38%; }
.fh-step__pat--2 { object-position: 58% 42%; }
.fh-step__pat--3 { object-position: 35% 55%; }
.fh-step__pat--4 { object-position: 65% 48%; }
.step-row .fh-step__pat--1 { object-position: 40% 36%; }
.step-row .fh-step__pat--2 { object-position: 55% 44%; }
.step-row .fh-step__pat--3 { object-position: 38% 52%; }
.step-row .fh-step__pat--4 { object-position: 62% 46%; }

@media (max-width: 720px) {
  .page-hero[class*="art-"]::before,
  .hero-slide[class*="art-"]::before {
    --banner-stack-size: auto, auto, auto, cover, cover;
    background-position: 0 0, 100% 0, 50% 100%, center, center !important;
  }
}
