/* Three-buyer Venn for the persona pages (src/components/solutions/PersonaVenn.astro).
   Scoped to .pv. Drawn for a light band (white or Ivory Tint). The drawing is a
   1020-unit square; --u is one unit at its rendered width. */

.pv {
  /* The scratchpad Venn's three teals (Core Pitch Deck), one per audience. */
  --pv-leaders: var(--kit-teal-dark, #0D2828);
  --pv-martech: var(--kit-teal-shade, #0C505D);
  --pv-ops: var(--kit-teal-medium, #0A7891);
  --pv-highlight: var(--kit-teal-highlight, #C9FEFF);
  --pv-citron: var(--citron-highlight, #FFFA66);
  --pv-ink: #201F1D;
  /* Each circle's fill. Overlaps mix these. */
  --pv-fill-leaders: var(--pv-leaders);
  --pv-fill-martech: var(--pv-martech);
  --pv-fill-ops: var(--pv-ops);
  container-type: inline-size;
  margin: clamp(24px, 4vw, 48px) 0 0;
  display: grid;
  gap: 32px;
  grid-template-areas: "art" "leaders" "martech" "ops";
}

/* The drawing. */
.pv-art {
  grid-area: art;
  position: relative;
  width: 100%;
  max-width: 600px;
  margin-inline: auto;
  container-type: inline-size;
  aspect-ratio: 1;
}
.pv-art > * { --u: calc(100cqi / 1020); }
.pv-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.pv-c--leaders { fill: var(--pv-fill-leaders); }
.pv-c--martech { fill: var(--pv-fill-martech); }
.pv-c--ops { fill: var(--pv-fill-ops); }
.pv-centre { fill: var(--pv-citron); }
.pv-line { fill: none; stroke: #fff; stroke-opacity: .4; stroke-width: 1.5; }
.pv-ring { fill: none; stroke: var(--pv-citron); stroke-width: 2px; vector-effect: non-scaling-stroke; }

.pv-mark {
  position: absolute;
  left: calc(var(--u) * 458);
  top: calc(var(--u) * 411);
  width: calc(var(--u) * 108);
  height: calc(var(--u) * 108);
  max-width: none;
}

/* Words over the drawing, centred on their x. */
.pv-circle-name, .pv-meet {
  position: absolute;
  margin: 0;
  transform: translateX(-50%);
  text-align: center;
  color: #fff;
}
.pv-circle-name {
  font-size: max(16px, calc(var(--u) * 50));
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.pv-circle-name--leaders { left: calc(var(--u) * 193); top: calc(var(--u) * 236); width: calc(var(--u) * 300); }
.pv-circle-name--martech { left: calc(var(--u) * 826); top: calc(var(--u) * 236); width: calc(var(--u) * 260); }
.pv-circle-name--ops { left: calc(var(--u) * 527.5); top: calc(var(--u) * 760); width: calc(var(--u) * 320); }
/* On phones the names keep a 16px floor, so they are large for the drawing and
   reach towards the leaders circle's curved left edge; move it into the open
   part of the circle. */
@media (max-width: 599px) { .pv-circle-name--leaders { left: calc(var(--u) * 216); } }

/* "You're here": an eyebrow above the current circle's name. */
.pv-here {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: max(12px, calc(var(--u) * 18));
  font-weight: 500;
  letter-spacing: .1em;
  /* Balance the tracking after the last letter so the word centres. */
  padding-left: .1em;
  text-transform: uppercase;
  color: var(--pv-citron);
}

.pv-meet {
  font-size: calc(var(--u) * 20);
  font-weight: 600;
  line-height: 1.25;
}
.pv-meet--leaders-martech { left: calc(var(--u) * 510); top: calc(var(--u) * 227); width: calc(var(--u) * 150); }
.pv-meet--martech-ops { left: calc(var(--u) * 679.5); top: calc(var(--u) * 533); width: calc(var(--u) * 165); }
.pv-meet--leaders-ops { left: calc(var(--u) * 350); top: calc(var(--u) * 520); width: calc(var(--u) * 188); }
/* The overlap words scale with the drawing and fall under 12px below
   desktop; the figcaption still carries them. */
@media (max-width: 1023px) { .pv-meet { display: none; } }

/* Text for each audience. */
.pv-side--leaders { grid-area: leaders; }
.pv-side--martech { grid-area: martech; }
.pv-side--ops { grid-area: ops; }
.pv-side { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
/* The button sits at the bottom, so in a row of boxes every button is the same distance from its box's bottom. */
.pv-side .pv-cta { margin-top: auto; }
.pv-side p { margin: 0; }
.pv-side-name {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.3;
  color: var(--pv-ink);
  font-size: var(--type-h5, 18px);
  font-weight: var(--type-subhead-weight, 600);
}
.pv-dot { width: 14px; height: 14px; margin-top: calc((1.3em - 14px) / 2); border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(13, 40, 40, .22); }
.pv-side--leaders .pv-dot { background: var(--pv-fill-leaders); }
.pv-side--martech .pv-dot { background: var(--pv-fill-martech); }
.pv-side--ops .pv-dot { background: var(--pv-fill-ops); }
.pv-side-text { font-size: var(--type-intro, 18px); line-height: 1.4; max-width: 24ch; }

/* Below desktop the texts sit under the drawing, each in a box with a light
   outline; the current page's box has a 2px Citron outline. */
@media (max-width: 1023px) {
  .pv-side {
    padding: 20px;
    border: 1px solid var(--color-neutrals-ivory-medium, #E4E1DF);
    border-radius: 16px;
    background: #fff;
  }
  .pv-side.is-current { border: 2px solid var(--pv-citron); padding: 19px; }
  /* Name close over its line, more room above the button (24px). */
  .pv-side { gap: 6px; }
  .pv-side .pv-side-text { margin-bottom: 18px; }
  /* 22px between the boxes; the drawing keeps 32px above them. */
  .pv { gap: 22px; }
  .pv-art { margin-bottom: 10px; }
}
/* Phones: each box's text runs the full width of its box. */
@media (max-width: 599px) {
  .pv-side-text { max-width: none; }
}

/* Tablet: the three texts in a row under the drawing. */
@media (min-width: 600px) and (max-width: 1023px) {
  .pv { grid-template-columns: repeat(3, 1fr); grid-template-areas: "art art art" "leaders martech ops"; }
}

/* Desktop: each text beside its circle. Leaders to the left, level with its
   circle; martech to the right; operations under its circle. The names are
   inside the circles, so the texts drop them. */
@media (min-width: 1024px) {
  .pv {
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas: "leaders art martech" ". ops .";
    column-gap: 32px;
    row-gap: 20px;
  }
  .pv > * { --art: min(600px, calc(100cqi - 2 * (240px + 32px))); }
  .pv-art { width: var(--art); max-width: none; }
  .pv-side-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pv-side--leaders, .pv-side--martech { align-self: start; margin-top: calc(var(--art) * .24); max-width: 260px; }
  .pv-side--leaders { justify-self: end; align-items: flex-end; text-align: right; }
  .pv-side--martech { justify-self: start; }
  .pv-side--ops { align-items: center; text-align: center; }
}

.pv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
