/* ==========================================================
   09 · Pricing: billing toggle, three plans (Studio = dark,
   ribbon-striped), Agency per-portal slider, inclusions strip
   ========================================================== */
.pricing { padding: 120px 0 40px; }
.pr-head { display: grid; gap: 20px; justify-items: center; text-align: center; margin-bottom: 48px; }
.pr-head .h2 { text-wrap: balance; }

/* toggle */
.pr-toggle { display: inline-flex; margin-top: 8px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.pr-toggle button { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 9px; font-size: 14.5px; font-weight: 500; color: var(--ink-500); transition: background-color .2s, color .2s, box-shadow .2s; }
.pr-toggle button[aria-checked="true"] { background: var(--ink-950); color: var(--white); box-shadow: 0 4px 12px -4px rgba(11,16,32,.45); }
.pr-toggle button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.pr-toggle em { font-style: normal; font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 99px; background: var(--teal-50); color: #08715F; }
.pr-toggle [aria-checked="true"] em { background: rgba(44,201,180,.2); color: #8EF0E0; }

/* grid */
.pr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }

.plan {
  position: relative;
  display: flex; flex-direction: column; gap: 22px;
  padding: 30px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-sm);
}
.pl-top h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.pl-top p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-500); min-height: 3em; }

.pl-price { display: flex; align-items: flex-start; gap: 2px; color: var(--ink-950); }
.pl-price .cur { margin-top: 8px; font-family: var(--font-display); font-size: 24px; font-weight: 600; }
.pl-price .amt {
  font-family: var(--font-display); font-size: 56px; font-weight: 600; letter-spacing: -0.04em; line-height: 1;
  font-variant-numeric: tabular-nums;
  display: inline-block; transition: opacity .2s ease, transform .25s ease;
}
.pl-price .amt.is-swapping { opacity: 0; transform: translateY(-6px); }
.pl-price .per { margin: 10px 0 0 8px; display: grid; font-size: 14.5px; color: var(--ink-600); }
.pl-price .per small { font-size: 13px; color: var(--ink-500); }

.pl-cta { width: 100%; }

.pl-feat { list-style: none; margin: 0; padding: 22px 0 0; border-top: 1px solid var(--ink-100); display: grid; gap: 11px; font-size: 15px; color: var(--ink-800); }
.pl-feat li { display: flex; gap: 10px; align-items: flex-start; }
.pl-feat .i { margin-top: 3px; color: var(--teal-500); width: 15px; height: 15px; }
.pl-feat li:first-child:not(:only-child) span { font-weight: 600; }
.plan:first-child .pl-feat li:first-child span { font-weight: 400; }

/* Studio: the dark, featured plan, with the ribbon as a top stripe */
.plan-pop {
  /* first paint before (or without) WebGL: a still frame of the same
     palette, dark where the text sits, the blue folds low and right */
  background:
    linear-gradient(200deg, rgba(4,6,13,0) 40%, rgba(28,77,245,.38) 78%, rgba(75,135,255,.5) 100%),
    linear-gradient(160deg, #04060D 0%, #070D26 55%, #0C1A5A 100%);
  border-color: var(--ink-950);
  color: var(--white);
  box-shadow: 0 30px 60px -24px rgba(11,16,32,.55);
  overflow: hidden;
  isolation: isolate;
}
/* the live gradient: sits between the card background and its content,
   fades in on its first frame */
.pl-flow { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0; transition: opacity .9s ease; pointer-events: none; }
.pl-flow.is-live { opacity: 1; }

/* Solo and Agency: white cards with the brand blue rising from the
   bottom edge (the reference's lavender wash, in the logo blues) */
.pr-grid > .plan:not(.plan-pop) {
  background:
    linear-gradient(180deg, rgba(255,255,255,0) 52%, rgba(214,228,255,.55) 78%, rgba(150,184,255,.6) 100%),
    var(--surface);
  border-color: rgba(16,24,48,.07);
}
.plan-pop .pl-top h3, .plan-pop .pl-price { color: var(--white); }
.plan-pop .pl-top p, .plan-pop .pl-price .per, .plan-pop .pl-price .per small { color: #A9B0C2; }
.plan-pop .pl-feat { border-top-color: rgba(255,255,255,.1); color: #DDE0E8; }
.plan-pop .pl-feat .i { color: var(--teal-400); }
.pl-badge {
  position: absolute; right: 22px; top: 26px;
  padding: 4px 10px; border-radius: 99px;
  font-size: 12.5px; font-weight: 600; color: var(--white);
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16);
  display: inline-flex; align-items: center; gap: 7px;
}
.pl-badge::before { /* the ribbon's three colours, as a small mark */
  content: ""; width: 14px; height: 6px; border-radius: 2px;
  background: linear-gradient(90deg, var(--ribbon-1) 0 33.3%, var(--ribbon-2) 33.3% 66.6%, var(--ribbon-3) 66.6%);
}

/* Agency per-portal slider */
.pl-slider { display: grid; gap: 8px; margin-top: -6px; }
.pl-slider label { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--ink-600); }
.pl-slider output { font-weight: 600; color: var(--ink-950); font-variant-numeric: tabular-nums; padding: 2px 9px; border-radius: 7px; background: var(--ink-50); border: 1px solid var(--ink-150); }
.pl-slider input[type="range"] {
  --p: 10.5%;
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 99px; margin: 8px 0 2px;
  background: linear-gradient(90deg, var(--cobalt-500) var(--p), var(--ink-150) var(--p));
  cursor: pointer;
}
.pl-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--white); border: 1px solid var(--ink-200);
  box-shadow: 0 2px 6px rgba(16,24,48,.2), 0 0 0 4px rgba(47,107,255,.14);
}
.pl-slider input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--white); border: 1px solid var(--ink-200);
  box-shadow: 0 2px 6px rgba(16,24,48,.2), 0 0 0 4px rgba(47,107,255,.14);
}
.pl-slider input[type="range"]:focus-visible { outline: 2px solid var(--primary); outline-offset: 6px; }
.pl-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-500); }

/* inclusions strip */
.pr-incl { list-style: none; margin: 32px 0 0; padding: 18px 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 32px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); font-size: 14.5px; color: var(--ink-600); }
.pr-incl li { display: flex; align-items: center; gap: 8px; }
.pr-incl .i { color: var(--cobalt-500); }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .pr-grid { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin-inline: auto; }
  .plan-pop { order: -1; }
  .pl-top p { min-height: 0; }
}
@media (max-width: 767px) {
  .pricing { padding: 72px 0 24px; }
  .pr-head { justify-items: start; text-align: left; margin-bottom: 32px; }
  .plan { padding: 24px 20px; border-radius: var(--r-xl); }
  .pl-price .amt { font-size: 48px; }
  .pr-incl { justify-content: flex-start; flex-direction: column; padding: 18px 20px; }
}

/* no hairline stroke around the cards: the white cards are defined by
   their shadow and wash, the Studio card by its own dark ground */

.pr-grid > .plan:not(.plan-pop) { box-shadow: 0 1px 2px rgba(16,24,48,.05), 0 8px 24px -12px rgba(16,24,48,.14); }

/* Studio's button: white on the dark card instead of saturated blue,
   so the moving gradient carries the colour and the button reads as the action */
.plan-pop .pl-cta {
  background: #fff; color: var(--ink-950);
  box-shadow: inset 0 -1px 0 rgba(16,24,48,.12), 0 1px 0 rgba(255,255,255,.2), 0 8px 20px -8px rgba(0,0,0,.55);
}
.plan-pop .pl-cta:hover { background: #EEF2FA; }
.plan-pop .pl-cta:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* (the line was the 1px border: background gradients tile into the border
   area, so its top row showed the gradient's blue bottom. No border at all,
   and the gradient is pinned to the outer edge so it can't wrap.) */
.pr-grid > .plan, .pr-grid > .plan:not(.plan-pop) { border: 0; background-origin: border-box; background-repeat: no-repeat; }
