/* ==========================================================================
   DP WORLD · LG200 — ESG
   Sections, in document order:
     1. Hero                    .page-hero (shared, theme.css)
     2. Carbon claim            .esg-intro      (light)
     3. Environmental measures  .esg-features
     4. PV saving               .esg-pv         (light)
     5. Building specification  .esg-spec
     6. Closing aerial          .esg-aerial

   Sections 2 and 4 run on light artwork, so they set their own ink colour —
   the site's default type colour is white.
   ========================================================================== */

:root {
  --esg-ink:      #1F174F;   /* indigo type on the light sections */
  --esg-ink-soft: #3B3B4F;   /* body copy on the light sections */
}

/* Hero type runs to the same scale as the other interior pages. The measure is
   what folds this headline to three lines — see docs/ESG.md. */
.page-hero--esg {
  --hero-title-size: clamp(1.9rem, 5.885vw, 67px);
  --hero-title-measure: 50rem;
}

/* ==========================================================================
   2 · Carbon claim — two centred paragraphs on a light band that fades into
       the photograph below it.
   ========================================================================== */
.esg-intro {
  color: var(--esg-ink);
  background: linear-gradient(180deg, #E5E5E5 0%, #93BDEA 100%);
  padding-block: clamp(2.5rem, 5.2vw, 4.25rem) clamp(2.5rem, 5.4vw, 4.5rem);
}
.esg-intro__inner {
  text-align: center;
}
.esg-intro__lead {
  font-weight: 600;
  font-size: clamp(0.95rem, 1.35vw, 1.25rem);
  line-height: 1.42;
  max-width: 46rem;
  margin: 0 auto;
}
.esg-intro__copy {
  color: var(--esg-ink-soft);
  font-weight: 300;
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  line-height: 1.42;
  max-width: 38rem;
  margin: clamp(1rem, 2.2vw, 1.75rem) auto 0;
}

/* ==========================================================================
   3 · Environmental measures — the photograph sets the height: it runs at its
       own ratio, full width and uncropped, with the cards over its sky.
   ========================================================================== */
.esg-features {
  position: relative;
  isolation: isolate;
}
.esg-features__media img {
  display: block;
  width: 100%;
  height: auto;
}
/* Blue wash over the top 40% of the photograph, so the cards read against the
   sky without a solid band behind them. */
.esg-features::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 40%;
  z-index: 0;
  background: linear-gradient(180deg, #0178DE 0%, rgba(1, 120, 222, 0) 100%);
  pointer-events: none;
}
.esg-features__inner {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 1;                 /* over the wash */
  padding-block: clamp(2.25rem, 4.6vw, 3.75rem) clamp(1.5rem, 3vw, 2.5rem);
}

.esg-feature-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.8vw, 3rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
/* Every column carries a hairline down its left edge, fading out toward the
   foot of the card. A border cannot fade, so it is drawn as a 1px layer. */
.esg-feature {
  position: relative;
  padding-left: clamp(1rem, 2.2vw, 2.25rem);
}
.esg-feature::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--rule-fade);
  pointer-events: none;
}
.esg-feature__icon {
  display: block;
  width: auto;
  height: clamp(2.1rem, 3.2vw, 3rem);
  margin-bottom: clamp(0.9rem, 2vw, 1.6rem);
}
.esg-feature__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(0.95rem, 1.32vw, 1.2rem);
  line-height: 1.22;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  margin: 0 0 clamp(0.6rem, 1.3vw, 1rem);
}
.esg-feature__copy {
  font-weight: 300;
  font-size: clamp(0.8rem, 1.02vw, 0.95rem);
  line-height: 1.36;
  margin: 0;
  max-width: 26ch;
}

/* ==========================================================================
   4 · PV saving — the figure and its copy beside the plant photograph.
   ========================================================================== */
.esg-pv {
  color: var(--esg-ink);
  background: linear-gradient(180deg, #E5E5E5 0%, #93BDEA 100%);
  padding-block: clamp(2.75rem, 5.5vw, 4.75rem);
}
.esg-pv__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}
/* The icon sits in a pale disc, as drawn. */
.esg-pv__badge {
  display: grid;
  place-items: center;
  width: clamp(4.5rem, 7.5vw, 6.75rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  margin-bottom: clamp(1.25rem, 2.6vw, 2.1rem);
}
.esg-pv__badge img {
  width: 52%;
  height: auto;
}
.esg-pv__title {
  color: var(--esg-ink);
  font-size: clamp(1.35rem, 2.5vw, 2.15rem);
  line-height: 1.1;
  margin: 0 0 clamp(1rem, 2.2vw, 1.6rem);
}
.esg-pv__copy {
  color: var(--esg-ink-soft);
  font-weight: 300;
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  line-height: 1.4;
  margin: 0;
  max-width: 34ch;
}
.esg-pv__media img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

/* ==========================================================================
   5 · Building specification — the label beside a six-up icon grid, on the
       brand gradient.
   ========================================================================== */
.esg-spec {
  position: relative;
  background: linear-gradient(90deg, var(--c-indigo-800) 0%, var(--c-purple-500) 100%);
  /* Held in a variable so the rule below can start exactly where the content
     does rather than at the section's edge. */
  --spec-pad-top: clamp(3.5rem, 7.5vw, 6.5rem);
  padding-block: var(--spec-pad-top) clamp(2.5rem, 5vw, 4.25rem);
}
/* Starts level with the heading — not at the top of the section — and runs on
   to the very bottom, fading as it goes. --edge-capped lines it up with the
   content inset, since the section spans the full viewport. */
.esg-spec::before {
  content: "";
  position: absolute;
  left: var(--edge-capped);
  top: var(--spec-pad-top);
  bottom: 0;
  width: 2px;                 /* heavier than the card rules, as drawn */
  background: var(--rule-fade);
  pointer-events: none;
}
.esg-spec__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(0, 2fr);
  /* Top-aligned so the heading starts level with the rule and the first icon
     row, as drawn. */
  align-items: start;
  gap: clamp(1.75rem, 4vw, 3.5rem);
}
.esg-spec__title {
  font-size: clamp(0.95rem, 1.32vw, 1.2rem);
  line-height: 1.28;
  max-width: 16em;
  padding-left: clamp(1.25rem, 3vw, 2.75rem);
}

.esg-spec-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3.2vw, 2.75rem) clamp(1.5rem, 3vw, 3rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.esg-spec-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(0.85rem, 1.8vw, 1.5rem);
}
.esg-spec-item__icon {
  width: auto;
  height: clamp(1.85rem, 2.6vw, 2.5rem);
}
.esg-spec-item__label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(0.75rem, 1vw, 0.9375rem);
  line-height: 1.28;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0;
}

/* ==========================================================================
   6 · Closing aerial — full width, its own ratio, no crop.
   ========================================================================== */
.esg-aerial img {
  display: block;
  width: 100%;
  height: auto;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  /* Stacked, the grid sits under the heading rather than beside it — so the
     indent moves from the heading to the whole column, keeping the icons clear
     of the rule instead of running into it. */
  .esg-spec__inner {
    grid-template-columns: 1fr;
    padding-left: clamp(1.25rem, 4vw, 2.75rem);
  }
  .esg-spec__title {
    max-width: none;
    padding-left: 0;
    padding-bottom: clamp(1rem, 2.5vw, 1.5rem);
  }
}

@media (max-width: 900px) {
  /* Two cards to a row no longer fit inside the sky, so the section unstacks:
     the cards sit on the brand gradient above the photograph, which still runs
     full width and uncropped beneath them. */
  .esg-features {
    background: linear-gradient(90deg, var(--c-indigo-800) 0%, var(--c-purple-500) 100%);
  }
  .esg-features__inner {
    position: static;
    padding-block: clamp(2.25rem, 6vw, 3.25rem);
  }
  /* Unstacked, the cards sit on the gradient — the wash would only muddy it. */
  .esg-features::before { display: none; }
  .esg-feature-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: clamp(2rem, 5vw, 3rem); }

  .esg-pv__inner { grid-template-columns: 1fr; }
  .esg-pv__copy { max-width: 46ch; }

  .esg-spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  /* Two up rather than one: the cards are short, and a single column pushed
     the photograph a long way down the page. */
  .esg-feature-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .esg-feature__copy { max-width: none; }   /* the column is the measure now */
  .esg-spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.25rem, 4vw, 2rem) clamp(0.75rem, 3vw, 1.5rem); }
}
