/* =========================================================
   PROMPT 4C - Home only, C5 (Industries tile cluster). Loaded only on
   the front page, alongside dv-4b-home.css/.js and
   dv-4b-industries.css (for the shared .dv-ind-motif base styles).
   ========================================================= */

.dv-home-ind-section {
  position: relative;
  overflow: hidden;
  /* Prompt 4D, D4: 72px top/bottom, exactly - nothing else in this
     section adds vertical space (the heading-to-cluster gap is the
     markup's own `mt-10` = 40px, already correct, left untouched). */
  padding-block: var(--dv-section-pad);
}

.dv-home-ind-layout {
  display: flex;
  flex-direction: column-reverse;
  gap: 3rem;
}
@media (min-width: 900px) {
  .dv-home-ind-layout {
    display: grid;
    grid-template-columns: minmax(0, 55fr) minmax(0, 45fr);
    /* Prompt 4D, D4: "heading, cluster and text share one row axis" -
       align-items: stretch (not center) so the text column's own
       align-self: center (below) positions it against the cluster's
       real height, not an auto-height track that could be taller or
       shorter than either child. */
    align-items: stretch;
    gap: clamp(2.5rem, 5vw, 4.5rem);
  }
}

.dv-home-ind-cluster {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* Prompt 4E, E3: reverses 4D's D4 choice - the owner's reference
     shows four IDENTICAL tiles, so every row is now stretched (the
     grid default) to grid-auto-rows: 1fr - all four tiles size to the
     height of the tallest content, not just their own row's taller
     sibling. */
  grid-auto-rows: 1fr;
  gap: 24px;
}
@media (min-width: 480px) {
  /* Prompt 4E, E3: staggered 2x2, right column 48px lower - a
     transform (paint-time only), not margin-top, so the offset never
     feeds back into the grid-auto-rows:1fr height calculation above
     (margin would have skewed which tile reads as "tallest"). Set as a
     custom property, not transform directly, so the hover lift below
     (which also sets transform) can combine with it instead of
     overwriting it. */
  .dv-home-ind-cluster > :nth-child(2n) { --dv-ind-stagger: 48px; }
}
@media (max-width: 479px) {
  .dv-home-ind-cluster { grid-template-columns: 1fr; }
}

/* Prompt 4G, G4: the reference's exact per-corner pattern (R = large
   curve, 0 = sharp square corner), one shared radius token so all four
   tiles stay visually consistent, repeating every 4 tiles via nth-child. */
:root { --dv-tile-r: clamp(22px, 2.4vw, 34px); }
.dv-home-ind-cluster > :nth-child(4n+1) { --dv-r-tl: 0; --dv-r-tr: var(--dv-tile-r); --dv-r-br: 0; --dv-r-bl: var(--dv-tile-r); }
.dv-home-ind-cluster > :nth-child(4n+2) { --dv-r-tl: var(--dv-tile-r); --dv-r-tr: 0; --dv-r-br: var(--dv-tile-r); --dv-r-bl: 0; }
.dv-home-ind-cluster > :nth-child(4n+3) { --dv-r-tl: var(--dv-tile-r); --dv-r-tr: 0; --dv-r-br: var(--dv-tile-r); --dv-r-bl: 0; }
.dv-home-ind-cluster > :nth-child(4n) { --dv-r-tl: 0; --dv-r-tr: var(--dv-tile-r); --dv-r-br: 0; --dv-r-bl: var(--dv-tile-r); }
.dv-home-ind-tile {
  border-radius: var(--dv-r-tl, 20px) var(--dv-r-tr, 20px) var(--dv-r-br, 20px) var(--dv-r-bl, 20px);
  overflow: hidden;
  /* Prompt 4D, D4: 28px, equal on all sides (was already 1.75rem =
     28px - unchanged). No min-height - the tile's height now follows
     its own content; CSS Grid's default align-items:stretch still
     equalizes the two tiles sharing a grid row to whichever is
     taller, so rows stay matched without an arbitrary minimum. */
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  transform: translateY(var(--dv-ind-stagger, 0px));
  transition: transform .3s var(--m-ease-out), box-shadow .3s var(--m-ease-out), opacity .3s var(--m-ease-out);
}
.dv-home-ind-tile--white { background: #fff; color: var(--navy); }
/* Prompt 4I, I1: was --teal - the section wrapper itself is teal now
   (see dv_home_industries_cluster()), so these tiles switched to navy
   to stay visually distinct from their own section background. */
.dv-home-ind-tile--navy { background: var(--navy); color: #fff; }

/* Prompt 4D, D3/D4: one Font Awesome icon (was a hand-drawn line
   motif, removed). */
.dv-home-ind-tile-motif { font-size: 1.75rem; line-height: 1; color: var(--navy); }
.dv-home-ind-tile--navy .dv-home-ind-tile-motif { color: #fff; }

.dv-home-ind-tile-title { font-size: clamp(1.5rem, 2vw, 1.75rem); font-weight: 600; line-height: 1.2; }
.dv-home-ind-tile-body { font-size: 1.125rem; line-height: 1.5; }
.dv-home-ind-tile--white .dv-home-ind-tile-body { color: var(--text-muted); }
.dv-home-ind-tile--navy .dv-home-ind-tile-body { color: rgba(255,255,255,.88); }

html.js .dv-motion .dv-home-ind-tile-motif {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s var(--m-ease-out), transform .5s var(--m-ease-out);
}
html.js .dv-motion .dv-home-ind-tile.is-played .dv-home-ind-tile-motif {
  opacity: 1;
  transform: none;
}

/* Hover/focus: lift 8px, bigger shadow, siblings dim to 85%. */
html.js .dv-motion [data-dv-home-ind-cluster]:hover .dv-home-ind-tile,
html.js .dv-motion [data-dv-home-ind-cluster]:focus-within .dv-home-ind-tile {
  opacity: .85;
}
html.js .dv-motion [data-dv-home-ind-cluster] .dv-home-ind-tile:hover,
html.js .dv-motion [data-dv-home-ind-cluster] .dv-home-ind-tile:focus-within {
  opacity: 1;
  /* Prompt 4E, E3: combine with the resting stagger offset above (0 for
     the left column, 48px for the right) instead of replacing it -
     otherwise a right-column tile would snap from +48px to -8px. */
  transform: translateY(calc(var(--dv-ind-stagger, 0px) - 8px));
  box-shadow: 0 22px 44px rgba(16,38,62,.28);
}

.dv-home-ind-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.1rem;
  /* Prompt 4D, D4: vertically centered against the cluster, no margin
     or padding above/below, no min-height - align-self:center (not
     the grid's align-items:stretch default) so this column takes its
     own natural (larger) content height and centers within the
     cluster's taller track, instead of being stretched to match it. */
  align-self: center;
  margin: 0;
  padding: 0;
}
.dv-home-ind-text-line {
  font-size: clamp(1.375rem, 2vw, 1.875rem);
  line-height: 1.5;
  color: rgba(255,255,255,.85);
  max-width: 46ch;
}

@media (prefers-reduced-motion: reduce) {
  /* dv-4c-home.js skips the whole cluster entirely under reduced
     motion, so .is-played never gets added - without this, the icon
     would stay permanently in its pre-reveal (lifted/faded) state
     instead of final/complete. */
  .dv-home-ind-tile,
  .dv-home-ind-tile-motif {
    transition: none !important;
  }
  .dv-home-ind-tile-motif { opacity: 1 !important; transform: none !important; }
  html.js .dv-motion [data-dv-home-ind-cluster] .dv-home-ind-tile:hover,
  html.js .dv-motion [data-dv-home-ind-cluster] .dv-home-ind-tile:focus-within {
    /* Prompt 4E, E3: no hover lift under reduced motion, but keep the
       resting stagger offset - plain `none` would snap a right-column
       tile back to 0 on hover. */
    transform: translateY(var(--dv-ind-stagger, 0px));
  }
}
