/* ─────────────────────────────────────────────────────────────────────────
   Solutions — persona tabs (nav) and their four panels (body).

   Figma 2225:333 / 2225:342 / 2225:547 / 2225:661 / 2225:769 (desktop,
   1440 canvas) and 2353:3839 (mobile nav, 360 canvas).

   One stylesheet for both partials because they are one widget: the pills
   in personas-nav.html control the panels in body.html, and splitting the
   rules across two files would let them drift apart.

   Fluid model is the page standard: clamp(min, <intercept> + <slope>vw,
   max) interpolated between Figma's 360 and 1440 anchors, so there is no
   step at a breakpoint. Slope = (v1440 − v360) / 1080 * 100 vw.

   ROYAL #183A73 is the pill colour — border on every pill, fill plus white
   text on the selected one, and the label colour on the rest. It has no
   @theme token yet but is used 4+ times on this page; flagged as a token
   candidate rather than silently added to the theme.

   THE MOBILE PILL ROW IS WIDER THAN THE FRAME (683 of 320 in Figma), so it
   scrolls sideways rather than wrapping. Wrapping it onto three lines would
   push the panel content down by ~80px and lose the single-row rhythm the
   design has at every size.
   ───────────────────────────────────────────────────────────────────── */

/* ── Tablist ──────────────────────────────────────────────────────────── */

.section-solutions-personas {
  background: var(--color-white, #fff);
  padding-top: clamp(3.75rem, 1.875rem + 8.33333vw, 9.375rem); /* 60 -> 150 */
  padding-bottom: clamp(1.25rem, 0.41667rem + 3.7037vw, 3.125rem); /* 20 -> 50 */
}

.section-solutions-personas__list {
  display: flex;
  align-items: center;
  gap: 0.625rem; /* 10 at both anchors */
  margin: 0;
  padding-inline: clamp(1.25rem, -1.45833rem + 12.037vw, 9.375rem); /* 20 -> 150 */
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.section-solutions-personas__list::-webkit-scrollbar {
  display: none;
}

/* Once the row fits without scrolling it should sit centred, as it does in
   the desktop frame. `justify-content: center` alone would clip the leading
   pills when the row DOES overflow a scroll container, so the centring is
   only applied where there is room for it. */
@media (width >= 80rem) {
  .section-solutions-personas__list {
    justify-content: center;
  }
}

.section-solutions-personas__tab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: clamp(1rem, 0.60417rem + 1.75926vw, 2.1875rem); /* 16 -> 35 */
  padding-block: clamp(0.625rem, 0.625rem + 0vw, 0.625rem); /* 10 at both */
  border: 1.5px solid #183a73;
  border-radius: var(--radius-button);
  background: transparent;
  color: #183a73;
  font-family: var(--font-primary, "Inter", sans-serif);
  font-weight: 600;
  font-size: clamp(0.75rem, 0.625rem + 0.5556vw, 1.125rem); /* 12 -> 18 */
  line-height: clamp(0.975rem, 0.8125rem + 0.6852vw, 1.4375rem); /* 15.6 -> 23 */
  letter-spacing: -0.016em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.2s,
    color 0.2s;
}

.section-solutions-personas__tab[aria-selected="true"] {
  background: #183a73;
  color: var(--color-white, #fff);
}

.section-solutions-personas__tab:focus-visible {
  outline: 3px solid var(--color-yellow, #dbe64c);
  outline-offset: 3px;
}

.section-solutions-personas__tab:hover:not([aria-selected="true"]) {
  background: rgb(24 58 115 / 8%);
}

/* Desktop pills carry a fixed 70 height; below that the padding alone sets
   it, which is what the mobile frame does. */
@media (width >= 64rem) {
  .section-solutions-personas__tab {
    height: min(4.375rem, 4.8611vw); /* 70 */
    padding-block: 0;
  }
}

/* ── Panels ───────────────────────────────────────────────────────────── */

.section-solutions-body {
  background: var(--color-white, #fff);
  color: var(--color-navy, #001f3e);
}

.section-solutions-body__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.875rem, 1.25rem + 2.7778vw, 3.125rem); /* 30 -> 50 */
  padding-inline: clamp(1.25rem, -1.45833rem + 12.037vw, 9.375rem); /* 20 -> 150 */
  padding-top: clamp(1.25rem, 0.41667rem + 3.7037vw, 3.125rem); /* 20 -> 50 */
  padding-bottom: clamp(3.75rem, 1.875rem + 8.33333vw, 9.375rem); /* 60 -> 150 */
}

/* Panel visibility is declarative and server-rendered — see the note in
   body.html. Doing it here rather than in script means the correct single
   panel is painted on the very first frame, with no flash of all four. */
.has-js-tabs .section-solutions-body__panel[data-selected="false"] {
  display: none;
}

.section-solutions-body__panel:focus-visible {
  outline: 3px solid var(--color-yellow, #dbe64c);
  outline-offset: 3px;
}

.section-solutions-body__subheading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(1.5rem, 0.95833rem + 2.4074vw, 3.125rem); /* 24 -> 50 */
  width: 100%;
  max-width: min(68.75rem, 76.3889vw); /* 1100 */
}

.section-solutions-body__title-block {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(1rem, 0.29167rem + 3.14815vw, 3.125rem); /* 16 -> 50 */
  width: 100%;
  max-width: min(50rem, 55.5556vw); /* 800 */
}

.section-solutions-body__title {
  font-family: var(--font-primary, "Inter", sans-serif);
  font-weight: 600;
  font-size: clamp(2rem, 1.33333rem + 2.963vw, 3.75rem); /* 32 -> 60 */
  line-height: clamp(2.1875rem, 1.60417rem + 2.5926vw, 3.125rem); /* 35 -> 50 */
  letter-spacing: -0.019em;
}

.section-solutions-body__title-line {
  display: block;
}

.section-solutions-body__subtitle {
  font-family: var(--font-primary, "Inter", sans-serif);
  font-weight: 600;
  font-size: clamp(1.25rem, 1.04167rem + 0.92593vw, 1.875rem); /* 20 -> 30 */
  line-height: clamp(1.625rem, 1.47917rem + 0.6481vw, 2.0625rem); /* 26 -> 33 */
  letter-spacing: -0.016em;
}

/* Figma indents the description rows 120 from the 1100 block. On mobile
   that indent would eat the line length, so it interpolates from 0. */
.section-solutions-body__description {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem; /* 10 */
  width: 100%;
  padding-left: clamp(0rem, -2.5rem + 11.1111vw, 7.5rem); /* 0 -> 120 */
}

.section-solutions-body__asterisk {
  flex-shrink: 0;
  width: clamp(2rem, 1.375rem + 2.7778vw, 3.875rem); /* 32 -> 62 */
  font-family: var(--font-accent, "Rock Salt", cursive);
  font-weight: 400;
  font-size: clamp(1.75rem, 1.39583rem + 1.57407vw, 2.8125rem); /* 28 -> 45 */
  line-height: clamp(1.875rem, 1.54167rem + 1.48148vw, 2.875rem); /* 30 -> 46 */
  letter-spacing: -0.019em;
  text-align: center;
  color: var(--color-green, #00804d);
}

.section-solutions-body__description-text {
  font-family: var(--font-primary, "Inter", sans-serif);
  font-weight: 400;
  font-size: clamp(1rem, 0.875rem + 0.55556vw, 1.375rem); /* 16 -> 22 */
  line-height: clamp(1.5rem, 1.33333rem + 0.7407vw, 1.9375rem); /* 24 -> 31 */
  letter-spacing: -0.016em;
}

/* ── Capabilities ─────────────────────────────────────────────────────── */

.section-solutions-body__capabilities {
  width: 100%;
  max-width: min(68.75rem, 76.3889vw); /* 1100 */
  padding-top: clamp(1.25rem, 0.41667rem + 3.7037vw, 3.125rem); /* 20 -> 50 */
}

/* Title case at 40/45, NOT the uppercase 30/38 with 0.3em tracking the
   previous build used — that styling was never in the design. */
.section-solutions-body__label {
  font-family: var(--font-primary, "Inter", sans-serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 1.16667rem + 1.48148vw, 2.5rem); /* 24 -> 40 */
  line-height: clamp(1.75rem, 1.39583rem + 1.57407vw, 2.8125rem); /* 28 -> 45 */
  letter-spacing: -0.016em;
  color: var(--color-green, #00804d);
}

.section-solutions-body__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Rules sit on the BOTTOM of each row and the last row has none — the old
   build put them on top, which left a rule under the label and none above
   the CTA. */
.section-solutions-body__item {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0 clamp(1.5rem, 0.54167rem + 4.25926vw, 4.375rem); /* 0 -> 70 column */
  padding-block: clamp(1.5rem, 0.95833rem + 2.40741vw, 3.125rem); /* 24 -> 50 */
  border-bottom: 1px solid var(--color-black, #000);
}

.section-solutions-body__item:last-child {
  border-bottom: none;
}

.section-solutions-body__item-title {
  flex-shrink: 0;
  width: 100%;
  font-family: var(--font-primary, "Inter", sans-serif);
  font-weight: 600;
  font-size: clamp(1.25rem, 1.04167rem + 0.92593vw, 1.875rem); /* 20 -> 30 */
  line-height: clamp(1.625rem, 1.47917rem + 0.6481vw, 2.0625rem); /* 26 -> 33 */
  letter-spacing: -0.016em;
}

.section-solutions-body__item-body {
  flex: 1 0 0;
  min-width: 0;
  font-family: var(--font-primary, "Inter", sans-serif);
  font-weight: 400;
  font-size: clamp(1rem, 0.875rem + 0.55556vw, 1.375rem); /* 16 -> 22 */
  line-height: clamp(1.5rem, 1.33333rem + 0.7407vw, 1.9375rem); /* 24 -> 31 */
  letter-spacing: -0.016em;
}

/* The two-column row only exists once there is room for a 400 title column
   beside the body; below that the flex-wrap stacks them. */
@media (width >= 64rem) {
  .section-solutions-body__item-title {
    width: min(25rem, 27.7778vw); /* 400 */
  }
}

/* ── CTA ──────────────────────────────────────────────────────────────── */

.section-solutions-body__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: clamp(1.75rem, 1.45833rem + 1.2963vw, 2.625rem); /* 28 -> 42 */
  padding-block: clamp(0.875rem, 0.75rem + 0.5556vw, 1.25rem); /* 14 -> 20 */
  border-radius: var(--radius-button);
  background: var(--color-yellow, #dbe64c);
  font-family: var(--font-primary, "Inter", sans-serif);
  font-weight: 600;
  font-size: clamp(1rem, 0.875rem + 0.55556vw, 1.375rem); /* 16 -> 22 */
  line-height: clamp(1.375rem, 1.20833rem + 0.74074vw, 1.875rem); /* 22 -> 30 */
  letter-spacing: -0.016em;
  color: var(--color-navy, #001f3e);
  text-align: center;
  text-decoration: none;
  transition: opacity 0.2s;
}

.section-solutions-body__cta:hover {
  opacity: 0.9;
}

.section-solutions-body__cta:focus-visible {
  outline: 3px solid var(--color-yellow, #dbe64c);
  outline-offset: 3px;
}

/* ── Decoratives (HOA Boards panel only) ──────────────────────────────── */

/* Figma positions these per persona; only the HOA Boards pair is built.
   Both exports carry preserveAspectRatio="none", so each needs width AND
   height pinned or it distorts — see .claude/rules/assets.md. */
.section-solutions-body__circle,
.section-solutions-body__highlight {
  display: none;
  position: absolute;
  max-width: none;
  pointer-events: none;
}

/* Desktop: the heading block scales as one piece with the viewport (1px of
   the 1440 frame = --space-sol-u), so the title wraps exactly as in Figma
   at every width from 1024 and the decoratives stay on their words. */
@media (width >= 64rem) {
  .section-solutions-body__subheading {
    --space-sol-u: min(0.0625rem, calc(100vw / 1440));
  }

  .section-solutions-body__title-block {
    isolation: isolate; /* the highlight sits behind the title text */
  }

  .section-solutions-body__title {
    font-size: calc(60 * var(--space-sol-u));
    line-height: calc(50 * var(--space-sol-u));
  }

  .section-solutions-body__subtitle {
    font-size: calc(30 * var(--space-sol-u));
    line-height: calc(33 * var(--space-sol-u));
  }

  /* Figma: asterisk at 120, 62 wide, 10 gap, text 900 wide */
  .section-solutions-body__description-text {
    max-width: calc(900 * var(--space-sol-u));
  }

  /* HOA Boards (Figma 2225:344): title box 129, subtitle box 109, 55 apart */
  .section-solutions-body__panel--hoa-boards .section-solutions-body__title-block {
    gap: calc(55 * var(--space-sol-u));
  }

  .section-solutions-body__panel--hoa-boards .section-solutions-body__title {
    min-height: calc(129 * var(--space-sol-u));
  }

  .section-solutions-body__panel--hoa-boards .section-solutions-body__subtitle {
    min-height: calc(109 * var(--space-sol-u));
  }

  /* Circle Green (2225:345): box 293x93.15 at 376 / -14 of the title; the
     287.24x70.04 drawing centred in it, rotate -4.68deg skewX 0.82deg */
  .section-solutions-body__circle {
    display: block;
    top: calc(-2.44 * var(--space-sol-u));
    left: calc(378.88 * var(--space-sol-u));
    width: calc(287.24 * var(--space-sol-u));
    height: calc(70.04 * var(--space-sol-u));
    transform: rotate(-4.68deg) skewX(0.82deg);
  }

  /* Highlight Lime (2225:282): 380x40 under "Gatekeepers", 8 left of the
     title and 85 below its top, behind the text */
  .section-solutions-body__highlight {
    z-index: -1;
    display: block;
    top: calc(85 * var(--space-sol-u));
    left: calc(-8 * var(--space-sol-u));
    width: calc(380 * var(--space-sol-u));
    height: calc(40 * var(--space-sol-u));
  }
}
