/**
 * DAVERON V3 - Round 3 Home-page components (sections 4, 5, 6, 7).
 * Loaded after dv-graphics.css / dv-text-system.css / glass.css.
 */

/* =========================================================
   SECTION 4 - hero capability cards (Round 4 B2: moved fully into the
   section below the hero; at most a 40px decorative peek into the
   hero's own empty bottom padding, never over its text/buttons).
   ========================================================= */
.dv-straddle-row-wrap {
  position: relative;
  z-index: 3;
  margin-top: -40px;
  padding-block: 2rem;
  pointer-events: none; /* only cards themselves are interactive */
}
.dv-straddle-backdrop {
  position: absolute;
  /* Prompt 4E, E1 glitch hunt: this used to be inset:0, so its near-
     white glow (starts at var(--teal-tint), close to white) painted
     straight over the hero's bottom 40px (the row-wrap's own negative
     margin-top pulls it up into the hero) - a pale seam band right at
     the photo/card-row join. Starting the glow below that overlap
     keeps it exactly where it was meant to be: a soft halo behind the
     cards, never over the hero photo. */
  top: 40px;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  background: radial-gradient(60% 100% at 50% 0%, var(--teal-tint) 0%, transparent 70%);
}
.dv-straddle-row {
  /* Prompt 4E, E1: match .section-container exactly (glass.css) so the
     row's left/right edges line up with the hero text and every
     section below it - this used to have its own wider 1600px cap,
     independent of the real container, which is why it drifted left
     and right of it. */
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 1.5rem;
  display: grid;
  /* Prompt 4E, E1: 4 cards now (Strategic Advisory was dropped from
     this row in 4C) - this was left at repeat(5, 1fr), so the 4 cards
     only filled 4 of 5 columns and left the 5th empty on the right. */
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  pointer-events: auto;
}
.dv-straddle-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 320px;
  min-width: 260px;
  padding: 1.75rem;
  color: var(--navy);
  text-decoration: none;
  overflow-wrap: break-word;
  transition: transform .35s var(--m-ease-out), box-shadow .35s var(--m-ease-out);
}
.dv-motion .dv-straddle-card:hover,
.dv-motion .dv-straddle-card:focus-visible {
  transform: translateY(-6px) rotate(-2deg);
  box-shadow: 0 24px 48px -20px rgba(16,38,62,.35), 0 0 0 2px var(--teal-light);
}
.dv-straddle-num {
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
  -webkit-text-stroke-width: 1.2px;
}
.dv-straddle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-top: .5rem;
  border-radius: 999px;
  background: rgba(22,123,140,.12);
  color: var(--teal-deep);
}
.dv-straddle-title {
  display: block;
  margin-top: 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.375rem;
  line-height: 1.2;
  color: var(--navy);
  overflow-wrap: anywhere;
}
.dv-straddle-link {
  margin-top: 1rem;
  font-size: var(--text-sm);
}

@media (max-width: 1279px) and (min-width: 768px) {
  /* Prompt 4E, E1: plain 2x2 for 4 cards - the old :last-child rule
     centered an odd 5th card full-width, which is wrong now and was
     stretching card 4 alone across the row. */
  .dv-straddle-row { grid-template-columns: repeat(2, 1fr); }
  .dv-straddle-row-wrap { margin-top: -40px; }
}
@media (max-width: 767px) {
  .dv-straddle-row-wrap { margin-top: -40px; }
  .dv-straddle-row { grid-template-columns: 1fr; gap: 1rem; }
  .dv-straddle-card { min-height: 260px; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .dv-motion .dv-straddle-card:hover,
  .dv-motion .dv-straddle-card:focus-visible { transform: none; }
}

/* =========================================================
   .dv-chip - shared pill base, used by several components
   (dv_values_strip(), dv_capability_bleed_cards(), philosophy
   chips) - kept standalone since it outlives any one of them.
   ========================================================= */
.dv-chip {
  padding: .5rem .9rem;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--white);
  white-space: normal;
}
@keyframes dv-chip-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   SECTION 7/14, Round 6 B5 rewrite - bleed-in cards, normal page
   flow (no sticky/scroll-stacking any more), hover/focus/tap
   reveals service chips sliding in from the side opposite the
   heading. See inc/template-tags.php dv_capability_bleed_cards().
   ========================================================= */
.dv-bleed-cards2 {
  /* Round 7 Q6: breaks out of the section-container it's nested in so
     the cards stay wide. Round 8 H2: padding-inline here is the
     gutter that keeps the cards off the browser edge - they're
     width:100% of this flex column, so it insets all of them at once. */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding-inline: clamp(16px, 3vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.dv-bleed-card2 {
  position: relative;
  /* Round 8 H2: rounded corners (20px mobile, 28px desktop below) -
     was 0 (deliberately square) in Round 7. */
  border-radius: 20px;
  overflow: hidden;
}
@media (min-width: 768px) {
  .dv-bleed-card2 { border-radius: 28px; }
}
.dv-bleed-card2-hit {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}
.dv-bleed-card2-hit:focus-visible {
  outline: 3px solid var(--teal-light);
  outline-offset: -3px;
}
.dv-bleed-card2-media-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.dv-bleed-card2-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dv-bleed-card2-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16,38,62,.35) 0%, rgba(16,38,62,.6) 100%);
}
/* Prompt 3D, Stage 8: Cybersecurity/Data (--featured) get a richer
   color tint and a visible .dv-gfx-* graphic; the other four
   (--light) get the same mechanism at low strength, not a different
   treatment, so all six still read as one family of card. */
.dv-bleed-card2-tint {
  position: absolute;
  inset: 0;
  mix-blend-mode: screen;
}
.dv-bleed-card2--featured .dv-bleed-card2-tint {
  background: linear-gradient(135deg, rgba(22,123,140,.45) 0%, rgba(255,255,255,.18) 55%, transparent 85%);
  opacity: .9;
}
.dv-bleed-card2--featured .dv-bleed-card2-tint::before { opacity: .55; }
.dv-bleed-card2--light .dv-bleed-card2-tint {
  background: linear-gradient(135deg, rgba(16,38,62,.30) 0%, transparent 70%);
  opacity: .5;
}
.dv-bleed-card2--light .dv-bleed-card2-tint::before { opacity: .22; }
.dv-bleed-card2--featured .dv-bleed-card2-title {
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.4rem);
}
.dv-bleed-card2--featured .dv-chip {
  font-size: clamp(.8125rem, .78rem + .2vw, .9375rem);
}
/* Round 7 Q6: heading + chips are real siblings in one content block
   now (mobile: normal flow below the image; desktop: an overlay grid
   - see the >=768px rule below), not absolutely positioned against
   each other the way the old overlap bug happened. */
.dv-bleed-card2-content {
  padding: 1.5rem clamp(20px, 5vw, 48px) 1.75rem;
}
.dv-bleed-card2-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  text-align: center;
  color: var(--navy);
  padding-block: .5rem;
}
.dv-bleed-card2-title {
  font-size: clamp(1.3rem, 1.1rem + 1.2vw, 2rem);
  line-height: 1.15;
  max-width: 24ch;
}
.dv-bleed-card2-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .625rem;
  padding-top: .75rem;
  list-style: none;
  margin: 0;
}
.dv-bleed-card2-chips .dv-chip {
  background: var(--offwhite);
  color: var(--navy);
}
.dv-bleed-card2-arrow {
  position: absolute;
  z-index: 3;
  top: 1.25rem;
  right: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: var(--navy);
  transition: transform .2s ease;
}
.dv-bleed-card2-arrow:hover,
.dv-bleed-card2-arrow:focus-visible { transform: scale(1.08); }

@media (min-width: 768px) {
  /* Fixed card height (tallest-state sizing) so chips never cause a
     jump. Re-verified against both 8-chip cards (Cybersecurity,
     Strategic Advisory) at 1440/1280/1024 after the Q6 grid rewrite. */
  .dv-bleed-card2 { min-height: clamp(420px, 34vw, 500px); }
  .dv-bleed-card2-hit { position: absolute; inset: 0; height: 100%; }
  .dv-bleed-card2-media-wrap { position: absolute; inset: 0; aspect-ratio: auto; }
  .dv-bleed-card2-heading { color: var(--white); }
  /* Round 7 Q6: a real two-column grid (heading cell ~38%, chip cell
     ~55%, >=48px gap) replaces the old absolutely-positioned overlay
     - this is what actually stops the heading and chips overlapping,
     since the browser's own grid layout guarantees the two columns
     never share space, instead of two independently-positioned boxes
     whose math had to be right by hand. */
  .dv-bleed-card2-content {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: 1700px;
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 38%) minmax(0, 55%);
    column-gap: 48px;
    align-items: center;
    padding-inline: clamp(48px, 4vw, 64px);
    padding-block: 0;
  }
  .dv-bleed-card2--even .dv-bleed-card2-content { grid-template-columns: minmax(0, 55%) minmax(0, 38%); }
  .dv-bleed-card2-heading {
    /* Spans both columns at rest, centred alone - only a transform
       (never a grid-column reassignment) moves it toward its own
       side once active, so this stays transform/opacity only.
       width:fit-content + justify-self:center stops the grid from
       stretching this to the full spanned width (its default
       behaviour) - a stretched, nearly-card-wide box meant the
       JS-measured shift still dragged most of its own invisible
       flex padding into the chip cell even once centred correctly,
       which is what let it visually overlap. */
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
    width: fit-content;
    max-width: 90%;
    padding-block: 0;
    transition: transform .4s var(--m-ease-out, ease);
  }
  .dv-bleed-card2--odd .dv-bleed-card2-chips { grid-column: 2 / 3; grid-row: 1; justify-content: flex-start; }
  .dv-bleed-card2--even .dv-bleed-card2-chips { grid-column: 1 / 2; grid-row: 1; justify-content: flex-end; }
  .dv-bleed-card2-chips {
    align-content: center;
    max-height: 100%;
    overflow: hidden;
    padding-top: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease, transform .45s var(--m-ease-out, ease);
  }
  .dv-bleed-card2--odd .dv-bleed-card2-chips { transform: translateX(24px); }
  .dv-bleed-card2--even .dv-bleed-card2-chips { transform: translateX(-24px); }
  /* Shift amount comes from --dv-heading-shift, a pixel value JS
     measures per-card (initBleedCardHeadingShift(), dv-round4.js) from
     the grid's own real computed column widths - a fixed percentage
     here undershot or overshot depending on the heading's actual text
     length, which was the real cause of the heading/chip overlap this
     item exists to fix. Still transform-only. */
  .dv-bleed-card2--odd:hover .dv-bleed-card2-heading,
  .dv-bleed-card2--odd:focus-within .dv-bleed-card2-heading,
  .dv-bleed-card2--odd.is-expanded .dv-bleed-card2-heading,
  .dv-bleed-card2--even:hover .dv-bleed-card2-heading,
  .dv-bleed-card2--even:focus-within .dv-bleed-card2-heading,
  .dv-bleed-card2--even.is-expanded .dv-bleed-card2-heading {
    transform: translateX(var(--dv-heading-shift, 0px));
  }
  .dv-bleed-card2:hover .dv-bleed-card2-chips,
  .dv-bleed-card2:focus-within .dv-bleed-card2-chips,
  .dv-bleed-card2.is-expanded .dv-bleed-card2-chips {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
  }
  .dv-bleed-card2-chips .dv-chip {
    background: rgba(255,255,255,.95);
    box-shadow: 0 6px 16px -6px rgba(16,38,62,.4);
    opacity: 0;
    transform: translateY(8px);
  }
  .dv-bleed-card2:hover .dv-bleed-card2-chips .dv-chip,
  .dv-bleed-card2:focus-within .dv-bleed-card2-chips .dv-chip,
  .dv-bleed-card2.is-expanded .dv-bleed-card2-chips .dv-chip {
    animation: dv-chip-in .4s var(--m-ease-out, ease) both;
    animation-delay: calc(var(--dv-chip-i, 0) * 50ms);
  }
}
@media (prefers-reduced-motion: reduce) {
  .dv-bleed-card2-heading, .dv-bleed-card2-chips, .dv-bleed-card2-chips .dv-chip {
    transition: none !important;
    animation: none !important;
  }
}

/* =========================================================
   SECTION 6 - Who We Serve / Philosophy (AMZ sticky pattern)
   ========================================================= */
.dv-audience-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding-block: 1.75rem;
}
.dv-audience-row-title {
  font-size: clamp(1.25rem, 1.1rem + .6vw, 1.75rem);
}
.dv-audience-row-graphic {
  width: 104px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 14px;
  padding: .5rem;
  /* Prompt 4D, D3: now holds one Font Awesome icon, not an SVG
     illustration - centered in the same glass box. */
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
}
@media (max-width: 639px) {
  .dv-audience-row { grid-template-columns: auto 1fr; }
  .dv-audience-row-graphic { grid-column: 1 / -1; width: 100%; height: 64px; }
}

/* =========================================================
   SECTION 5 - "What We Do"
   ========================================================= */
.dv-wwd-grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
  .dv-wwd-grid { grid-template-columns: minmax(0,5fr) minmax(0,7fr); align-items: center; }
}
.dv-wwd-card {
  /* Round 7 Q1: reverted to the plain card - normal flow, no hanging
     PNG, no reserved space, no extra height. */
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 2.5rem;
}
/* Prompt 3D, Stage 3: .dv-wwd-left-obj (the node PNG's own positioning
   rule) removed as orphaned - its only markup usage was deleted from
   front-page.php. */
