/* aimlink.ai Pricing page (pricing/index.html). Load after site.css and nav.css. Script: assets/pricing-page.js.

   The answer to "what does it cost?" is one line, so the page is short. The frame of the FAQ and Contact pages:
   1. Hero (data-rhythm="hero"): the statement on night with the rings of the target as hairlines.
   2. The three apps hang over the hero's hard edge as dark cards (GO, CLUB, TARGET): the app, the one word that matters, what
      it is for, where it runs and the one thing to do (the store badges, or Request access for TARGET, which is in beta).
      No table, no ranking, no badge: there is nothing to compare, the answer is the same three times.
   3. "Questions?" on the light: the FAQ and Contact.
   The one moment: when the cards arrive, the rings of each little target draw from the outside in, and a shot lands in its ten
   (the same hole and ring as the Contact form's target), one card after the other.
   Static by default: without JS every ring is drawn and every shot has landed. Reduced motion keeps the finished state and
   fades the shot in. Type and space come from the tokens. */

@layer sections {
  /* ───────────────────────── Hero ───────────────────────── */
  .pr-top { --pr-over: clamp(6.5rem, 11vw, 9rem); position: relative; isolation: isolate; }
  .pr-hero { position: relative; isolation: isolate; overflow: clip; background: var(--color-night); color: var(--text); padding-bottom: calc(var(--pr-over) + var(--space-5)); }
  .pr-hero-copy { display: grid; justify-items: start; }
  .pr-hero .hl { display: block; }
  .pr-hero .lede { margin-top: var(--gap-head); color: var(--text); opacity: 0.92; max-width: 30ch; }
  .pr-hero .w { display: inline-block; animation: rise var(--duration-reveal) var(--ease-out) both; animation-delay: calc(120ms + var(--i) * var(--motion-stagger)); }
  .pr-hero .lede { animation: rise var(--duration-reveal) var(--ease-out) 360ms both; }
  .pr-rings {
    position: absolute; z-index: -1; right: -26vw; top: -14vw; width: 72vw; aspect-ratio: 1; pointer-events: none;
    background: repeating-radial-gradient(circle at 50% 50%, transparent 0 calc(5.5% - 1px), rgb(160 224 32 / 0.16) calc(5.5% - 1px) 5.5%);
    -webkit-mask-image: radial-gradient(circle at 50% 50%, black 0 56%, transparent 71%);
    mask-image: radial-gradient(circle at 50% 50%, black 0 56%, transparent 71%);
  }
  @media (min-width: 900px) { .pr-rings { right: -2vw; top: -12vw; width: 50vw; } }

  /* ───────────────────────── The three apps ───────────────────────── */
  /* data-rhythm="proof" gives the bottom; the top is zero, because the cards hang up into the hero */
  .pr-body { position: relative; background: var(--bg); color: var(--text); padding-top: 0; }
  .pr-body > .container { display: flow-root; }                 /* the negative margin must not collapse through the section */
  .pr-grid { display: grid; gap: var(--space-5); margin-top: calc(-1 * var(--pr-over)); position: relative; }
  @media (min-width: 1000px) { .pr-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.75rem); } }

  .pr-card {
    position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; gap: var(--space-6); min-width: 0;
    padding: clamp(1.5rem, 3vw, 2rem); border-radius: var(--radius-panel);
    background: var(--bg-alt); color: var(--text);
    box-shadow: inset 0 0 0 1px var(--line), 0 28px 50px -26px rgb(12 20 28 / 0.6);
  }
  /* SpotlightCard: a soft light follows the pointer (pricing-page.js hands it --mx and --my; a mouse only) */
  .pr-card::before {
    content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
    background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgb(160 224 32 / 0.11), transparent 70%);
    opacity: 0; transition: opacity var(--duration-nav) var(--ease-hover);
  }
  @media (hover: hover) and (pointer: fine) { .pr-card:hover::before { opacity: 1; } }

  .pr-main { display: grid; gap: var(--space-4); align-content: start; }
  .pr-id { display: flex; align-items: center; gap: var(--space-3); }
  .pr-logo { flex: none; width: 56px; height: 56px; }
  .pr-id .title { padding-top: 0.12em; }

  /* the word, and the target that answers it */
  .pr-price { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
  .pr-free {
 font: var(--type-display-xl-weight) clamp(4.5rem, 3rem + 3.4vw, 7rem)/0.8 var(--font-display); letter-spacing: var(--type-display-xl-tracking); color: var(--color-lime); padding-top: 0.08em;
 }
  .pr-target { flex: none; width: clamp(5.25rem, 4rem + 3vw, 7rem); height: auto; aspect-ratio: 1; overflow: visible; }
  .pr-ring { fill: none; stroke: var(--color-lime); stroke-opacity: 0.38; stroke-width: 0.8; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; transform: rotate(-90deg); }
  .pr-ten { fill: var(--color-lime); }
  .pr-hole { fill: var(--color-night); transform-box: fill-box; transform-origin: center; }
  .pr-impact { fill: none; stroke: var(--color-lime); stroke-width: 0.8; opacity: 0; transform-box: fill-box; transform-origin: center; }

  .pr-side { display: flex; flex-direction: column; gap: var(--space-3); flex: 1; min-width: 0; }
  .pr-for { color: var(--text); font-size: var(--type-body-size); line-height: 1.5; max-width: 34ch; text-wrap: pretty; }
  .pr-on { font: 700 var(--type-label-size)/var(--type-label-leading) var(--font-text); letter-spacing: var(--type-label-tracking); text-transform: uppercase; color: var(--text-muted); }
  .pr-act { margin-top: auto; padding-top: var(--space-3); display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); align-items: center; justify-content: flex-start; }

  /* two apps wide the card becomes two columns: who it is, and what to do */
  @media (min-width: 640px) and (max-width: 999.98px) {
    .pr-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-6) var(--space-7); align-items: stretch; }
    .pr-side { padding-top: calc(56px + var(--space-4)); }
  }

  /* ───────────────────────── The moment: the rings draw, a shot lands in the ten ─────────────────────────
     The cards come in with the site's reveal ([data-reveal] puts .is-in on them); the sequence waits for that,
     card by card (--k). Without the reveal (no JS, reduced motion) the page simply stands finished. */
  @media (prefers-reduced-motion: no-preference) {
    .reveal-ready .pr-card:not(.is-in) .pr-ring { stroke-dashoffset: 1; }
    .reveal-ready .pr-card:not(.is-in) .pr-ten { opacity: 0; }
    .reveal-ready .pr-card:not(.is-in) .pr-hole { opacity: 0; }
    .pr-card.is-in .pr-ring { animation: pr-draw 640ms var(--ease-out) both; animation-delay: calc(260ms + var(--k, 0) * 160ms + var(--r) * 90ms); }
    .pr-card.is-in .pr-ten { animation: pr-fade var(--duration-nav) var(--ease-out) both; animation-delay: calc(260ms + var(--k, 0) * 160ms + 420ms); }
    .pr-card.is-in .pr-hole { animation: pr-land 240ms var(--ease-out) both; animation-delay: calc(260ms + var(--k, 0) * 160ms + 720ms); }
    .pr-card.is-in .pr-impact { animation: pr-impact 760ms var(--ease-out) both; animation-delay: calc(260ms + var(--k, 0) * 160ms + 720ms); }
  }
  @keyframes pr-draw { from { stroke-dashoffset: 1; } }
  @keyframes pr-fade { from { opacity: 0; } }
  @keyframes pr-land { from { opacity: 0; transform: scale(1.5); } }
  @keyframes pr-impact { from { opacity: 0.85; transform: scale(1); } to { opacity: 0; transform: scale(3.4); } }

  /* ───────────────────────── Questions? ───────────────────────── */
  .pr-ask {
    position: relative; display: grid; gap: var(--space-5); align-items: center; margin-top: var(--gap-group);
    padding: clamp(1.5rem, 3vw, 2.5rem); border-radius: var(--radius-panel); background: var(--bg-alt); box-shadow: inset 0 0 0 1px var(--line);
  }
  .pr-ask-copy { display: grid; gap: var(--space-3); justify-items: start; }
  .pr-ask p { color: var(--text-muted); font-size: var(--type-body-size); line-height: 1.55; max-width: 46ch; text-wrap: pretty; }
  .pr-ask-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
  @media (min-width: 800px) { .pr-ask { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-8); } }
  @media (max-width: 599.98px) { .pr-ask-actions .btn { flex: 1 1 100%; } }
}

/* ───────────────────────── Reduced motion: colour and opacity only ───────────────────────── */
@layer utilities {
  @media (prefers-reduced-motion: reduce) {
    .pr-hero .w, .pr-hero .lede { animation: none; }
    .pr-card.is-in .pr-hole { animation: pr-fade var(--duration-reduced) var(--ease-out) both; animation-delay: calc(var(--k, 0) * 120ms); }
  }
}
  .pr-free small { display: block; margin-top: 0.3em; font: 600 clamp(1.25rem, 1rem + 0.8vw, 1.75rem)/1 var(--font-display); letter-spacing: .04em; color: var(--text); }
