/* fx-pricing.css: owned by the pricing page builder. Page-specific design and motion only.
   Every rule is scoped under .page-pricing. Base CSS never hides content: the only
   pre-states live under html.pf-anim, which fx-pricing.js adds and a timer always removes. */

/* Local fallbacks so the page still eases correctly if fx.css has not shipped its tokens. */
.page-pricing {
  --pf-thrust: var(--ease-thrust, cubic-bezier(.16, 1, .3, 1));
  --pf-orbit: var(--ease-orbit, cubic-bezier(.45, 0, .55, 1));
  --pf-dock: var(--ease-dock, cubic-bezier(.34, 1.56, .64, 1));
  --pf-t3: var(--t-3, 380ms);
  --pf-t4: var(--t-4, 600ms);
  --pf-t5: var(--t-5, 900ms);
  --pf-t6: var(--t-6, 1400ms);
}

/* ==========================================================================
   Hero: Flight Plan instrument
   ========================================================================== */
.page-pricing .page-hero { position: relative; overflow: hidden; }
@media (min-width: 960px) {
  .page-pricing .hero-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 2rem; align-items: center; }
}
.page-pricing .hero-instrument { width: 100%; max-width: 440px; aspect-ratio: 1; margin-inline: auto; contain: layout paint; }
@media (min-width: 600px) and (max-width: 959px) { .page-pricing .hero-instrument { max-width: 360px; margin-top: 1.5rem; } }
@media (max-width: 599px) { .page-pricing .hero-instrument { display: none; } }
.page-pricing .flight-plan { display: block; width: 100%; height: 100%; overflow: visible; }

.page-pricing .flight-plan .traj path { stroke: rgba(232, 124, 248, .55); stroke-width: 1.4; stroke-linecap: round; }
.page-pricing .flight-plan .traj .orbit-back { stroke-opacity: .45; }
.page-pricing .flight-plan .orbit-low { stroke-dasharray: 3 7; stroke-width: 1.2; }
.page-pricing .flight-plan .burn,
.page-pricing .flight-plan .ascent { stroke-width: 2; }
.page-pricing .flight-plan .ascent { stroke: url(#pf-grad); }
.page-pricing .flight-plan .chevron { stroke: #f4c7fb; stroke-width: 1.6; stroke-linejoin: round; }
.page-pricing .flight-plan .sat { fill: #f4c7fb; }
.page-pricing .flight-plan .fp-labels text { font: 500 11px var(--font-display); letter-spacing: .12em; fill: var(--muted); }
.page-pricing .flight-plan .traj { transition: opacity var(--pf-t3) var(--pf-thrust), filter var(--pf-t3) var(--pf-thrust); }
.page-pricing .flight-plan .lbl { transition: opacity var(--pf-t3) var(--pf-thrust); }
.page-pricing .flight-plan .traj path { transition: stroke var(--pf-t3) var(--pf-thrust); }

/* Linking with the plan picker / plan cards. */
.page-pricing .flight-plan[data-focus="liftoff"] .traj-deepspace,
.page-pricing .flight-plan[data-focus="deepspace"] .traj-liftoff { opacity: .25; }
.page-pricing .flight-plan[data-focus="liftoff"] .lbl-deepspace,
.page-pricing .flight-plan[data-focus="deepspace"] .lbl-liftoff { opacity: .4; }
.page-pricing .flight-plan[data-focus="liftoff"] .traj-liftoff path:not(.chevron),
.page-pricing .flight-plan[data-focus="deepspace"] .traj-deepspace path:not([stroke="none"]) { stroke: url(#pf-grad); stroke-opacity: 1; }
.page-pricing .flight-plan[data-focus="liftoff"] .traj-liftoff,
.page-pricing .flight-plan[data-focus="deepspace"] .traj-deepspace { filter: drop-shadow(0 0 4px rgba(207, 76, 228, .45)); }

/* Intro pre-state, only while html.pf-anim is set by JS (removed by a 2s failsafe). */
.pf-anim .page-pricing .flight-plan .fp-planet { opacity: 0; transform: translateY(24px); transform-box: fill-box; }
.pf-anim .page-pricing .flight-plan .fp-draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.pf-anim .page-pricing .flight-plan .fp-fade,
.pf-anim .page-pricing .flight-plan .lbl { opacity: 0; }
.page-pricing .flight-plan.is-lit .fp-planet { opacity: 1; transform: none; transition: opacity 800ms var(--pf-thrust) 300ms, transform 800ms var(--pf-thrust) 300ms; }
.page-pricing .flight-plan.is-lit .fp-draw { stroke-dashoffset: 0; transition: stroke-dashoffset var(--pf-t5) var(--pf-thrust); }
.page-pricing .flight-plan.is-lit .fp-d1 { transition-delay: 500ms; }
.page-pricing .flight-plan.is-lit .fp-d2 { transition-delay: 650ms; }
.page-pricing .flight-plan.is-lit .fp-d3 { transition-delay: 800ms; }
.page-pricing .flight-plan.is-lit .fp-d4 { transition-delay: 950ms; }
.page-pricing .flight-plan.is-lit .fp-fade,
.page-pricing .flight-plan.is-lit .lbl { opacity: 1; transition: opacity var(--pf-t4) var(--pf-thrust) 900ms; }
/* After the intro, the dashes return to their real pattern. */
.page-pricing .flight-plan.is-done .fp-draw { stroke-dasharray: none; }

/* ==========================================================================
   Flight rules (.pricing-note) and the baseline grid
   ========================================================================== */
.page-pricing .pricing-note { counter-reset: pf-rule; position: relative; }
.page-pricing .pricing-note p { counter-increment: pf-rule; margin: 0; }
.page-pricing .pricing-note p::before {
  content: "RULE " counter(pf-rule, decimal-leading-zero);
  display: block; margin-bottom: .35rem;
  font: 600 .72rem/1 var(--font-display); letter-spacing: .14em; color: var(--violet);
}
@media (min-width: 720px) {
  .page-pricing .pricing-note::after {
    content: ""; position: absolute; top: 0; left: 1.25rem; right: 1.25rem; height: 1px;
    background: var(--grad); opacity: .6; transform-origin: left center;
  }
  .pf-anim .page-pricing .pricing-note::after { transform: scaleX(0); }
  .pf-anim .page-pricing .pricing-note.is-in::after { transform: scaleX(1); transition: transform var(--pf-t5) var(--pf-thrust); }
}

.page-pricing .ico .fx-ico { width: 22px; height: 22px; color: var(--violet); }
.page-pricing .baseline-grid .ico { transition: transform var(--pf-t3) var(--pf-dock); }
.pf-anim .page-pricing .baseline-grid .card:not(.is-in) .ico { transform: scale(.8); }

/* ==========================================================================
   Compare table: pre-flight checklist
   ========================================================================== */
.page-pricing .table-scroll { position: relative; }
.page-pricing .compare th:nth-child(3),
.page-pricing .compare td:nth-child(3) { background: linear-gradient(180deg, rgba(171, 123, 255, .08), rgba(239, 91, 168, .04)); }
.page-pricing .compare thead th:nth-child(3) { box-shadow: inset 0 2px 0 #cf4ce4; position: relative; }
.page-pricing .compare thead th:nth-child(3)::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--grad);
}
.page-pricing .compare .yes { display: inline-block; }

.page-pricing .fx-scan {
  position: absolute; left: 0; right: 0; top: 0; height: 2px; pointer-events: none; z-index: 2;
  background: var(--grad); box-shadow: 0 0 12px 2px rgba(207, 76, 228, .45); opacity: 0;
}
.page-pricing .fx-scan.is-run { animation: pf-scan var(--pf-t6) var(--pf-orbit) 1 both; }
@keyframes pf-scan {
  0% { opacity: 0; transform: translateY(0); }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { opacity: 0; transform: translateY(var(--pf-scan-h, 600px)); }
}
.pf-anim .page-pricing .compare tbody tr:not(.is-scanned) .yes { opacity: .6; transform: scale(.6); }
.page-pricing .compare tbody tr.is-scanned .yes { transition: transform var(--pf-t3) var(--pf-dock), opacity var(--pf-t3) var(--pf-thrust); }

/* Phones: each row becomes a two-up card, both plan values always visible. */
@media (max-width: 639px) {
  .page-pricing .table-scroll { overflow: visible; }
  .page-pricing .compare, .page-pricing .compare tbody, .page-pricing .compare tr { display: block; min-width: 0; width: 100%; }
  .page-pricing .compare thead {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  .page-pricing .compare tbody tr { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
  .page-pricing .compare tbody tr:last-child { border-bottom: 0; }
  .page-pricing .compare th[scope="row"] { grid-column: 1 / -1; padding: .9rem 1rem .25rem; border: 0; }
  .page-pricing .compare td { text-align: left; padding: .5rem 1rem .9rem; border: 0; font-size: .9rem; }
  .page-pricing .compare td::before {
    content: attr(data-label); display: block; margin-bottom: .2rem;
    font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); font-weight: 600;
  }
  .page-pricing .compare td:nth-child(3) { border-radius: 0; }
}

/* ==========================================================================
   #grow: slow orbit rings behind the Get Found Plan
   ========================================================================== */
.page-pricing #grow { position: relative; overflow: hidden; isolation: isolate; }
.page-pricing .grow-orbits { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.page-pricing #grow .container > * { position: relative; z-index: 1; }
.page-pricing #grow .container > .grow-orbits { position: absolute; z-index: 0; }
.page-pricing #grow .container { position: relative; }
.page-pricing .grow-orbits ellipse { stroke: rgba(232, 124, 248, .14); stroke-width: 1; vector-effect: non-scaling-stroke; }
.page-pricing .grow-orbits .go { transform-origin: 500px 300px; }
.pf-anim .page-pricing .grow-orbits .go-1 { animation: pf-spin 60s linear infinite; }
.pf-anim .page-pricing .grow-orbits .go-2 { animation: pf-spin 90s linear infinite reverse; }
.page-pricing .grow-orbits:not(.is-run) .go { animation-play-state: paused; }
@keyframes pf-spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Finale: Earth behind the CTA band
   ========================================================================== */
.page-pricing .pricing-finale { position: relative; overflow: hidden; isolation: isolate; }
.page-pricing .pricing-finale > .container { position: relative; z-index: 1; }
.page-pricing .finale-art {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  /* Fade the top edge so the Earth rises out of the page instead of starting at a hard seam. */
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 35%);
  mask-image: linear-gradient(to bottom, transparent, #000 35%);
}
.page-pricing .finale-art img {
  position: absolute; left: 50%; bottom: -18%; width: 130%; max-width: none; height: auto; min-height: 90%;
  object-fit: cover; opacity: .55; translate: -50% 0;
  -webkit-mask-image: radial-gradient(closest-side, #000 40%, transparent);
  mask-image: radial-gradient(closest-side, #000 40%, transparent);
  transform: translate3d(0, var(--pf-fy, 0%), 0) scale(var(--pf-fs, 1.04));
  will-change: transform;
}
@media (max-width: 719px) { .page-pricing .finale-art img { width: 220%; bottom: -10%; } }
.page-pricing .pricing-finale .cta-band { background: linear-gradient(135deg, rgba(171, 123, 255, .14), rgba(239, 91, 168, .08)), rgba(23, 19, 31, .86); }

/* ==========================================================================
   Reduced motion: final state, no loops.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .page-pricing .grow-orbits .go { animation: none !important; }
  .page-pricing .fx-scan { display: none; }
  .page-pricing .finale-art img { transform: none; }
}
.fx-calm .page-pricing .grow-orbits .go { animation: none !important; }
.fx-calm .page-pricing .fx-scan { display: none; }

/* script.js reserves min-width in ch from the full text length; on the long
   "/month" lines that reservation outgrew a 390px phone and scrolled the page
   sideways. Cap it here (script.js is Global's) and keep digits fixed-width so
   the count-up still doesn't jitter. !important is needed to beat the inline style. */
.page-pricing .plans2 .tier-price,
.page-pricing .plans2 .tier-monthly,
.page-pricing .addon .addon-price { min-width: 0 !important; max-width: 100%; font-variant-numeric: tabular-nums; }
