/*
 * .discuss-panels — centred head on a blue background with two blurred ellipses, a framed box with
 * a photo card (components/photo-caption.css) and a column of dark glass panels
 * (template-parts/flexible/discuss-panels.php).
 * Figma: Strategy Session "What will we discuss?" D 18:42897 / M 18:50448.
 *
 * Phones and tablets: the photo above the panels (box full width on phones). From 1025 px: photo 542 px
 * on the left, panels on the right; the photo takes the height of the panels column.
 */

.discuss-panels {
  --dp-eye-gap: clamp(2.5625rem, 2.1626rem + 1.7062vw, 3.6875rem);
  --dp-sub-gap: clamp(1.1875rem, 0.4766rem + 3.0332vw, 3.1875rem);
  --dp-head-gap: clamp(3.125rem, 2.4797rem + 2.8436vw, 4.6875rem);
  --dp-sub-trim: 0.24em;

  position: relative;
  padding-top: var(--nv-section-y);
  padding-bottom: var(--nv-section-y);
  background-color: var(--nv-blue);
  color: var(--nv-white);
  overflow: hidden;
  isolation: isolate;

  /* @media (width >= 64.0625em) .discuss-panels */
  @media (width >= 64.0625em) {
    --dp-sub-trim: 0.34em;
  }
}

/* .discuss-panels__bg — two blurred ellipses (Figma Ellipse 122 / 123; layer blur 180 / 150 = CSS 90 / 75 px) */
.discuss-panels__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;

  /* .discuss-panels__bg::before, ::after */
  &::before,
  &::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
  }

  /* .discuss-panels__bg::before — dark, top left */
  &::before {
    top: -9.4375rem;
    left: -7.5rem;
    width: 33.2188rem;
    height: 33.2188rem;
    background: var(--nv-navy);
    filter: blur(90px);

    /* @media (width >= 48em) .discuss-panels__bg::before */
    @media (width >= 48em) {
      top: -30.625rem;
      left: -11.25rem;
      width: 66.4375rem;
      height: 66.625rem;
    }
  }

  /* .discuss-panels__bg::after — light blue, bottom right */
  &::after {
    right: -13rem;
    bottom: -12.125rem;
    width: 26.0625rem;
    height: 26.125rem;
    background: #2176be;
    filter: blur(75px);

    /* @media (width >= 48em) .discuss-panels__bg::after */
    @media (width >= 48em) {
      right: 0;
      bottom: 0;
    }
  }
}

/* .discuss-panels__container — head and box in a column */
.discuss-panels__container {
  display: flex;
  flex-direction: column;
  gap: var(--dp-head-gap);
}

/* .discuss-panels__head — centred; every gap is measured ink to ink (Figma), line boxes are trimmed */
.discuss-panels__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* .discuss-panels__eyebrow — green label with a rhomb; 10 px of Figma pill padding above the cap height */
.discuss-panels__eyebrow {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.3125rem;
  max-width: 18em; /* phones: wraps after the 4th word as in the phone frame */
  padding-top: calc(0.625rem - 0.14em);
  margin-bottom: -0.14em;
  color: var(--nv-green);
  font-weight: 500;
  font-size: var(--nv-fs-eyebrow);
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  overflow-wrap: anywhere;

  /* @media (width >= 48em) .discuss-panels__eyebrow */
  @media (width >= 48em) {
    max-width: none;
  }

  /* @media (width >= 64.0625em) .discuss-panels__eyebrow */
  @media (width >= 64.0625em) {
    letter-spacing: 0.1em;
  }

  /* .discuss-panels__eyebrow::before — rhomb level with the first line */
  &::before {
    content: "";
    flex-shrink: 0;
    width: 0.53rem;
    height: 0.53rem;
    margin-top: calc(0.5lh - 0.265rem);
    background: url("../../img/icons/rhomb.svg") center / contain no-repeat;
  }
}

/* .discuss-panels__title — white, 40 → 75 px */
.discuss-panels__title {
  margin-top: calc(var(--dp-eye-gap) - 0.14em);
  margin-bottom: -0.14em;
  color: var(--nv-white);
  font-weight: 400;
  font-size: clamp(2.5rem, 1.7225rem + 3.3175vw, 4.6875rem);
  line-height: 1;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;

  /* @media (width >= 48em) .discuss-panels__title */
  @media (width >= 48em) {
    letter-spacing: -0.02em;
  }

  & strong {
    color: var(--nv-green);
    font-weight: inherit;
  }
}

/* .discuss-panels__subtitle — 20 → 23 px, white 70 % */
.discuss-panels__subtitle {
  max-width: 60rem;
  margin-top: calc(var(--dp-sub-gap) - var(--dp-sub-trim));
  margin-bottom: calc(var(--dp-sub-trim) * -1);
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--nv-fs-lead);
  line-height: 1.2;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;

  /* @media (width >= 64.0625em) .discuss-panels__subtitle */
  @media (width >= 64.0625em) {
    line-height: 1.4;
  }

  & > * {
    margin: 0;
  }

  & > * + * {
    margin-top: 1.25rem;
  }

  & strong {
    color: inherit;
    font-weight: 700;
  }
}

/* .discuss-panels__box — frame with a 10 % light stroke (inside the 20 px padding, as in Figma); phones: full width as in the phone frame */
.discuss-panels__box {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-left: -1.25rem;
  margin-right: -1.25rem;
  padding: calc(1.25rem - 0.0625rem);
  border: 0.0625rem solid rgba(232, 242, 249, 0.1);
  border-radius: var(--nv-radius-m);

  /* @media (width >= 48em) .discuss-panels__box */
  @media (width >= 48em) {
    margin-left: 0;
    margin-right: 0;
  }

  /* @media (width >= 64.0625em) .discuss-panels__box */
  @media (width >= 64.0625em) {
    flex-direction: row;
  }
}

/* .discuss-panels__box--split — photo + panels side by side from 1025 px */
.discuss-panels__box--split {
  /* @media (width >= 64.0625em) .discuss-panels__box--split */
  @media (width >= 64.0625em) {
    display: grid;
    grid-template-columns: minmax(0, 542fr) minmax(0, 808fr);
  }
}

/* .discuss-panels__photo — tablets: landscape card; a photo without panels keeps it on desktop */
.discuss-panels__photo {
  width: 100%;

  /* @media (width >= 48em) .discuss-panels__photo */
  @media (width >= 48em) {
    --pc-ratio: 3 / 2;
  }
}

/* .discuss-panels__box--split .discuss-panels__photo — desktop: the card stretches to the panels column */
.discuss-panels__box--split .discuss-panels__photo {
  /* @media (width >= 64.0625em) .discuss-panels__box--split .discuss-panels__photo */
  @media (width >= 64.0625em) {
    --pc-ratio: 542 / 752;

    align-self: stretch;
  }
}

/* .discuss-panels__panels — glass panels in a column, they share the height of the photo */
.discuss-panels__panels {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  width: 100%;
  min-width: 0;
}

/* .discuss-panels__panel — #132132 at 70 % with a 10 px backdrop blur */
.discuss-panels__panel {
  flex: 1 1 auto;
  padding:
    calc(clamp(1.8125rem, 1.5903rem + 0.9479vw, 2.4375rem) - 0.14em)
    clamp(1.25rem, 0.8057rem + 1.8957vw, 2.5rem)
    clamp(1.8125rem, 1.5459rem + 1.1374vw, 2.5625rem);
  border-radius: var(--nv-radius-s);
  background-color: rgba(19, 33, 50, 0.7);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* .discuss-panels__panel-title — 23 → 32 px Medium; --green: accent colour chosen in the admin */
.discuss-panels__panel-title {
  margin-bottom: -0.14em;
  color: var(--nv-white);
  font-weight: 500;
  font-size: clamp(1.4375rem, 1.2376rem + 0.8531vw, 2rem);
  line-height: 1;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;

  /* @media (width >= 48em) .discuss-panels__panel-title */
  @media (width >= 48em) {
    letter-spacing: -0.03em;
  }
}

/* .discuss-panels__panel-title--green */
.discuss-panels__panel-title--green {
  color: var(--nv-green);
}

/* .discuss-panels__intro — 18 → 20 px lead-in under the title */
.discuss-panels__intro {
  margin-top: clamp(1.0250rem, 1.1605rem + -0.1517vw, 1.1250rem);
  font-size: clamp(1.125rem, 1.0806rem + 0.1896vw, 1.25rem);
  line-height: 1;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;

  & > * {
    margin: 0;
  }

  & > * + * {
    margin-top: 0.5em;
  }
}

/* .discuss-panels__list — items 16 → 20 px; the top and bottom line boxes are trimmed to the cap / baseline */
.discuss-panels__list {
  --dp-item-gap: clamp(0.55rem, 0.4417rem + 0.2844vw, 0.625rem);

  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: clamp(1rem, 0.9111rem + 0.3791vw, 1.25rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  gap: var(--dp-item-gap);
}

/* .discuss-panels__panel-title + .discuss-panels__list — title → first item, 30 → 23 px ink to ink */
.discuss-panels__panel-title + .discuss-panels__list {
  margin-top: calc(clamp(1.4375rem, 2.0729rem + -0.7109vw, 1.9062rem) - 0.24em);
}

/* .discuss-panels__intro + .discuss-panels__list — lead-in → first item */
.discuss-panels__intro + .discuss-panels__list {
  margin-top: calc(clamp(2.0625rem, 1.8626rem + 0.8531vw, 2.6250rem) - 0.24em);
}

/* .discuss-panels__list:last-child — the baseline of the last line is the bottom padding edge */
.discuss-panels__list:last-child {
  margin-bottom: -0.24em;
}

/* .discuss-panels__item — text of an item is a plain line; wraps without any fixed height */
.discuss-panels__item {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* .discuss-panels__list--diamond .discuss-panels__item — rhomb 28 → 18 px text offset (diamond-list base) */
.discuss-panels__list--diamond .discuss-panels__item {
  padding-left: clamp(1.125rem, 0.9028rem + 0.9479vw, 1.75rem);

  /* .discuss-panels__list--diamond .discuss-panels__item::before */
  &::before {
    top: calc(0.6em - 0.25rem);
    left: 0;
  }
}

/* .discuss-panels__list--check — tick squares, Medium 18 → 20 px */
.discuss-panels__list--check {
  --dp-item-gap: clamp(0.8281rem, 0.7892rem + 0.1659vw, 0.9375rem);

  font-size: clamp(1.125rem, 1.0806rem + 0.1896vw, 1.25rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

/* .discuss-panels__list--check .discuss-panels__item — 24 px icon, text 10 px after it */
.discuss-panels__list--check .discuss-panels__item {
  position: relative;
  padding-left: 2.125rem;

  /* .discuss-panels__list--check .discuss-panels__item::before */
  &::before {
    content: "";
    position: absolute;
    top: calc(0.6em - 0.75rem);
    left: 0;
    width: 1.5rem;
    height: 1.5rem;
    background: url("../../img/icons/tick-square.svg") center / contain no-repeat;
  }
}
