/* ============================================================
   Pricing page, "Pro spotlight" layout (21 Nov 2026, round 2).
   Loaded by pricing.html and fr/pricing.html only.

   Rules this file keeps (Lucas, 21 Nov):
   - one neutral surface + one accent (#00C96B), no coloured glow,
     hairline borders at 6-10% white;
   - nested radius: inner radius = outer radius - padding
     (phone 32 - 20 = 12, desktop 40 - 28 = 12);
   - weights 400-600, only the price goes heavier;
   - every tap target at least 44px tall;
   - one easing curve (--spot-ease).

   Billing state lives on [data-billing] (the pricing section), so
   every monthly/quarterly swap is driven from CSS.
   Phone (<= 760px): the three plans are a horizontal scroll-snap
   carousel. Desktop: Pro on top, Growth and Agency compact under it.
   ============================================================ */

.pricing-spot {
  --spot-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spot-radius: 32px;
  --spot-pad: 20px;
  --spot-inner: calc(var(--spot-radius) - var(--spot-pad)); /* 12px */
  --spot-line: rgba(255, 255, 255, 0.08);
  --spot-line-soft: rgba(255, 255, 255, 0.06);
  max-width: 920px;
  margin: 0 auto;
}

/* ── Shared card surface ──────────────────────────────────── */
.spot-card {
  position: relative;
  padding: var(--spot-pad);
  border-radius: var(--spot-radius);
  background: color-mix(in oklch, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--spot-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 32px rgba(0, 0, 0, 0.32);
}
/* Pro is set apart by a slightly lighter surface, not by colour. */
.spot-pro {
  background: color-mix(in oklch, var(--surface-2) 92%, transparent);
  border-color: rgba(255, 255, 255, 0.10);
}

.spot-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.spot-name {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.spot-popular {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}
.spot-popular::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}
.spot-head__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  outline: 1px solid rgba(255, 255, 255, 0.1);
  outline-offset: -1px;
  margin-left: auto;
}

.spot-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-2);
  margin: -8px 0 16px;
  text-wrap: pretty;
}

/* Price row: [struck monthly price] [price]. The struck price folds
   to zero width on monthly, so the number glides instead of jumping. */
.spot-price {
  display: flex;
  align-items: baseline;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.spot-price__now {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
  display: inline-flex;
  align-items: baseline;
}
.spot-price__now--sm { font-size: 40px; }
.spot-price__text { font-size: 36px; font-weight: 700; letter-spacing: -0.03em; color: var(--text); line-height: 1; }
.spot-price__cur { font-size: 0.5em; font-weight: 600; letter-spacing: 0; }
.spot-price__cur--pre { margin-right: 0.04em; }
.spot-price__cur--post { margin-left: 0.12em; }
.spot-price__was {
  display: inline-block;
  margin-right: 12px;
  font-size: 20px;
  font-weight: 500;
  color: var(--text-3);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.spot-per {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-3);
}

/* Lines that swap with billing share one grid cell, so the taller of
   the two reserves the space and nothing below moves. */
.spot-swap { display: grid; margin-top: 8px; }
.spot-swap > * {
  grid-area: 1 / 1;
  align-self: start;
  transition: opacity 0.3s var(--spot-ease), transform 0.3s var(--spot-ease);
}
[data-billing="quarterly"] [data-when="monthly"],
[data-billing="monthly"] [data-when="quarterly"] {
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.2s var(--spot-ease), transform 0.2s var(--spot-ease), visibility 0s 0.2s;
}

.spot-save {
  display: block;
  padding: 4px 0;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 500;
  color: var(--green);
}
.spot-save strong { font-weight: 600; }
.spot-save__switch {
  position: relative;
  font: inherit;
  font-weight: 500;
  color: var(--green);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}
.spot-save__switch::after { content: '\00a0\2192'; }
/* Text-sized button, 44px tap area. */
.spot-save__switch::before { content: ''; position: absolute; inset: -10px -4px; }
.spot-save__switch:hover { color: color-mix(in oklch, var(--green) 80%, white); }

.spot-guarantee {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: var(--spot-inner);
  background: var(--green-dim);
  color: var(--green);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s var(--spot-ease);
}
.spot-guarantee::before { content: '\2713'; }
.spot-guarantee:hover { background: color-mix(in oklch, var(--green) 18%, transparent); }

/* Buttons: radius follows the card (outer - padding). */
.pricing-spot .btn,
.pricing-spot .btn.btn--primary {
  width: 100%;
  min-height: 48px;
  justify-content: center;
  border-radius: var(--spot-inner);
  transition-property: transform, filter, background-color, border-color, box-shadow;
  transition-duration: 0.2s;
  transition-timing-function: var(--spot-ease);
}
.spot-cta { margin-top: 12px; }
.spot-monthly { display: grid; justify-items: start; gap: 4px; }
.spot-trial {
  display: block;
  padding: 12px 0;
  text-align: center;
  text-wrap: balance;
  line-height: 1.45;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  border-radius: var(--spot-inner);
  transition: color 0.2s var(--spot-ease);
}
.spot-trial::after { content: '\00a0\2192'; }
.spot-trial:hover { color: var(--text); }

/* Iris answers · Val sells */
.spot-duo {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.spot-duo li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-2);
}
.spot-duo strong { color: var(--text); font-weight: 600; }
.spot-duo img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  outline: 1px solid rgba(255, 255, 255, 0.1);
  outline-offset: -1px;
}

.spot-detail {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--spot-line-soft);
}
.pricing-spot .pricing-card__highlights { margin: 0 0 4px; gap: 10px; }
.pricing-spot .pricing-card__highlights .pricing-card__feature { font-weight: 500; }
.pricing-spot .pricing-card__features-details { margin-top: 0; }
.pricing-spot .pricing-card__features-summary { min-height: 44px; padding: 10px 0; font-weight: 500; margin-bottom: 0; }

/* ── Growth / Agency cards ────────────────────────────────── */
.plan-card { display: flex; flex-direction: column; }
.plan-card .spot-price { margin-top: 4px; }
.plan-card__duo { margin: 20px 0 0; padding-top: 20px; border-top: 1px solid var(--spot-line-soft); }
.spot-duo li.is-off { color: var(--text-3); }
.spot-duo li.is-off strong { color: var(--text-2); }
.spot-duo li.is-off img { filter: grayscale(1); opacity: 0.55; }
.plan-card .pricing-card__highlights { margin-top: 16px; }
.plan-card__cta { margin-top: auto; padding-top: 20px; }
.plan-card .pricing-card__unavailable-msg { font-size: 13px; margin: 8px 0; }

.spot-compare {
  display: block;
  padding-block: 12px;
  text-align: center;
  line-height: 1.45;
  margin: 8px auto 0;
  width: fit-content;
  padding-inline: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s var(--spot-ease);
}
.spot-compare::after { content: '\00a0\2192'; }
.spot-compare:hover { color: var(--text); }

/* Carousel indicator: phone only. */
.spot-tabs { display: none; }

/* ── Odometer digits ──────────────────────────────────────── */
.odo { display: inline-flex; align-items: baseline; }
.odo__digit {
  display: inline-block;
  height: 1em;
  line-height: 1;
  overflow: hidden;
}
.odo__strip {
  display: flex;
  flex-direction: column;
  transition: transform 0.4s var(--spot-ease);
}
.odo__strip > span { height: 1em; line-height: 1; }
[data-billing="monthly"] .odo__strip   { transform: translateY(calc(var(--m) * -10%)); }
[data-billing="quarterly"] .odo__strip { transform: translateY(calc(var(--q) * -10%)); }

/* Characters (and the struck price) that exist in one billing state
   only fold their width to zero in the other. */
.odo__slot {
  display: inline-grid;
  grid-template-columns: 1fr;
  transition: grid-template-columns 0.4s var(--spot-ease), opacity 0.3s var(--spot-ease);
}
.odo__slot > span { overflow: hidden; min-width: 0; }
[data-billing="quarterly"] .odo__slot[data-only="monthly"],
[data-billing="monthly"] .odo__slot[data-only="quarterly"] {
  grid-template-columns: 0fr;
  opacity: 0;
}

.spot-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── Chat bubble: step aside while the cards are on screen ─── */
body.page-pricing .vc-bubble {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              translate 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (max-width: 900px) {
  body.page-pricing.pricing-cards-in-view .vc-bubble[aria-expanded="false"] {
    translate: calc(100% + 32px) 0;
    opacity: 0;
    pointer-events: none;
  }
}

/* ── Phone: swipe carousel ────────────────────────────────── */
@media (max-width: 760px) {
  .spot-track {
    /* Bleed to the screen edges; each card is centred with 32px each
       side, so the next one peeks in by 32 - gap = 22px. */
    position: relative;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    gap: 10px;
    margin-inline: -24px;
    padding: 4px 32px 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
  }
  .spot-track::-webkit-scrollbar { display: none; }
  .spot-track > .spot-card { scroll-snap-align: center; scroll-snap-stop: always; }
  .spot-track:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; border-radius: var(--spot-radius); }

  .plan-card .spot-head__avatar { display: none; }

  .spot-tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 4px;
  }
  .spot-tabs button {
    min-height: 44px;
    padding: 0 12px;
    background: none;
    border: none;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-3);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s var(--spot-ease);
  }
  .spot-tabs button::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.5;
    transition: opacity 0.2s var(--spot-ease), background-color 0.2s var(--spot-ease);
  }
  .spot-tabs button[aria-current="true"] { color: var(--text); }
  .spot-tabs button[aria-current="true"]::before { background: var(--green); opacity: 1; }
  .spot-tabs button:focus-visible { outline: 2px solid var(--green); outline-offset: -4px; border-radius: var(--spot-inner); }

  .spot-compare { margin-top: 4px; }
}

@media (max-width: 380px) {
  .spot-price__now { font-size: 48px; }
}

/* The quarterly line is longer and wraps on phones: reserve two lines
   so flipping billing never moves what sits below it. */
@media (max-width: 520px) {
  .spot-pro .spot-per { min-height: 3em; }
}

/* ── Desktop ──────────────────────────────────────────────── */
@media (min-width: 761px) {
  .pricing-spot { --spot-radius: 40px; --spot-pad: 28px; }
  .spot-track {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .spot-pro {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    column-gap: 48px;
  }
  .spot-pro .spot-price__now { font-size: 72px; }
  .spot-pro .spot-detail { margin-top: 0; padding-top: 0; border-top: none; padding-left: 24px; margin-left: -24px; border-left: 1px solid var(--spot-line-soft); align-self: stretch; }
  .spot-pro .spot-cta .btn { width: 100%; }

  /* Compact rows: name and line on the left, price and button right. */
  .plan-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "head  price"
      "desc  per"
      "save  cta";
    column-gap: 20px;
    align-items: start;
  }
  .plan-card .spot-head { grid-area: head; margin-bottom: 8px; }
  .plan-card .spot-desc { grid-area: desc; margin: 0; }
  .plan-card .spot-price,
  .plan-card .pricing-card__unavailable-msg { grid-area: price; justify-content: flex-end; margin-top: 0; }
  .plan-card .spot-per { grid-area: per; text-align: right; margin-top: 6px; }
  .plan-card .spot-swap { grid-area: save; align-self: end; }
  .plan-card .spot-save { font-size: 13px; }
  .plan-card .pricing-card__highlights,
  .plan-card .plan-card__duo { display: none; }
  .plan-card .plan-card__cta { grid-area: cta; padding-top: 12px; align-self: end; }
  .plan-card .plan-card__cta .btn { width: auto; min-width: 160px; }
  .plan-card .spot-price__now--sm { font-size: 32px; }
  .plan-card .spot-price__text { font-size: 28px; }
  .plan-card .spot-head__avatar { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .odo__strip, .odo__slot, .spot-swap > *,
  [data-billing] [data-when] { transition: none !important; }
  .spot-track { scroll-behavior: auto; }
}

/* Optical centring of button labels where supported (Chrome/Safari);
   Firefox ignores it and keeps the normal line box. */
@supports (text-box: trim-both cap alphabetic) {
  .pricing-spot .btn { text-box: trim-both cap alphabetic; }
}

/* Pro: the quarterly saving line sits centred in the space the monthly
   pair (switch + guarantee) reserves, so the gap reads as rhythm. */
.spot-main .spot-swap > .spot-save[data-when="quarterly"] { align-self: center; }
