/* cloud.infinibotos.com marketing pages: mobile premium layer (2026-10-30), same system
   as docs/assets/landing/premium-m.css on infinibotos.com. Almost everything lives inside a width query, so 1440 stays as
   it was. GPU-only motion (opacity + transform), no blur filters. */

/* Applies at every width: the count-up numbers inherited the caption's block style. */
.stat > span { display: block; margin-top: 8px; font-size: 0.9rem; color: var(--text-3); }
.stat b span { display: inline; margin: 0; font: inherit; color: inherit; }

/* ---------- Dock + carousel meter exist only where the script adds them ---------- */
.pm-dock { display: none; }
.pm-meter { display: none; }
.pm-phones { display: none; }

/* ---------- Section scenes: tablet and down ---------- */
@media (max-width: 1024px) {
  :root { --gutter: var(--pad, 18px); --text-3: var(--fg-3, #a1a1aa); --font-mono: "JetBrains Mono", ui-monospace, monospace; --font-display: inherit; --pm-gold: 251, 191, 36; --pm-cool: 110, 167, 255; --pm-violet: 192, 132, 252; }
  .pm-scene { position: relative; isolation: isolate; overflow-x: clip; }
  .pm-scene::before {
    content: ""; position: absolute; z-index: -1; inset: -8% -30%; pointer-events: none;
    background:
      radial-gradient(380px 300px at var(--ax, 16%) var(--ay, 260px), rgba(var(--pm-gold), var(--aa, 0.13)), transparent 72%),
      radial-gradient(340px 300px at var(--bx, 88%) var(--by, 62%), rgba(var(--pm-tint, var(--pm-cool)), 0.08), transparent 72%);
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 120px, #000 calc(100% - 120px), transparent);
    mask-image: linear-gradient(180deg, transparent, #000 120px, #000 calc(100% - 120px), transparent);
    will-change: transform;
    animation: pmDrift 26s ease-in-out infinite alternate paused;
  }
  .pm-scene.pm-live::before { animation-play-state: running; }
  @keyframes pmDrift { from { transform: translate3d(-3%, -1%, 0); } to { transform: translate3d(3%, 2%, 0); } }
  /* Gold divider between sections: a hairline with a lit node. */
  .pm-scene + .pm-scene::after, .pm-rule::after {
    content: ""; position: absolute; left: 50%; top: 0; width: min(78%, 520px); height: 1px; transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(var(--pm-gold), 0.5) 50%, transparent);
    box-shadow: 0 0 22px 1px rgba(var(--pm-gold), 0.2);
  }
  .pm-grid::before {
    background:
      linear-gradient(rgba(var(--pm-gold), 0.045) 1px, transparent 1px) 0 0 / 44px 44px,
      linear-gradient(90deg, rgba(var(--pm-gold), 0.045) 1px, transparent 1px) 0 0 / 44px 44px,
      radial-gradient(380px 300px at var(--ax, 16%) var(--ay, 260px), rgba(var(--pm-gold), var(--aa, 0.13)), transparent 72%);
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 140px, rgba(0, 0, 0, 0.6) 50%, #000 calc(100% - 200px), transparent);
    mask-image: linear-gradient(180deg, transparent, #000 140px, rgba(0, 0, 0, 0.6) 50%, #000 calc(100% - 200px), transparent);
    animation: none;
  }
  .pm-a { --ax: 22%; --bx: 84%; --by: 58%; }
  .pm-b { --ax: 78%; --bx: 18%; --by: 70%; --pm-tint: var(--pm-violet); }
  .pm-c { --ax: 50%; --ay: 220px; --aa: 0.16; --bx: 50%; --by: 92%; }
  .pm-d { --ax: 22%; --ay: 42%; --bx: 80%; --by: 18%; --pm-tint: var(--pm-violet); }
  .it { background: linear-gradient(100deg, #ffe9a8, var(--gold, #fbbf24) 48%, #e8960c); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; padding-right: 0.08em; }
  .it--cream { background-image: linear-gradient(100deg, #fff8df, #ffe9a8); }
}

/* Tablet: no orphan card on the last row. */
@media (min-width: 761px) and (max-width: 1024px) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .trio { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .trio .card { padding: 22px 18px; }
}

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  body { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }

  /* Fluid type: larger, tighter display sizes; nothing under 12px. */
  :root {
    --fs-h2: clamp(2.2rem, 1.2rem + 5.4vw, 2.9rem);
    --fs-h3: clamp(1.5rem, 1.15rem + 2.1vw, 1.85rem);
    --section: 72px;
    --fs-label: 0.75rem;
  }
  .h2[style*="--fs-h3"], .h2[style*="fs-h3"] { font-size: clamp(1.9rem, 1.1rem + 4vw, 2.35rem) !important; line-height: 1.05; }
  .eyebrow { letter-spacing: 0.15em; line-height: 1.5; }
  .eyebrow::before { flex: none; }
  .hero .hero-pill, .hero-pill { font-size: 0.75rem !important; letter-spacing: 0.05em; line-height: 1.4; }
  .hero-install__status, .hero-install__fine { font-size: 0.8125rem; }
  .hero-install code { font-size: 0.8125rem; }
  .plan__tag { min-height: 0; }
  .la-cap { font-size: 0.75rem; }
  .la-q { font-size: 0.8125rem; }
  .ps-play__title { font-size: 0.875rem; }

  /* Tap targets ≥ 44px. */
  .btn-ghost, .btn-sm { min-height: 44px; }
  .hero-install__tab { min-height: 44px; }
  .hero-install__cloudnote a, .hero-install__guide a { display: inline-block; padding-block: 10px; margin-block: -7px; }
  .ps-links a { min-height: 44px; }
  .ps-crumbs { align-items: center; }
  .ps-crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
  .nav-brand { min-height: 44px; }
  .faq summary { min-height: 56px; }

  /* Hero: tighter, the CTA card sits higher. */
  .hero { padding: 34px 0 36px; min-height: 0; }
  .hero-logo { width: 62px; height: 62px; margin-bottom: 16px; }
  .hero-pill { margin-bottom: 18px; }
  .hero-scroll { display: none; }

  /* ---------- Snap carousels instead of long stacks ---------- */
  .pm-rail {
    display: grid !important; grid-auto-flow: column; grid-template-columns: none !important;
    grid-auto-columns: min(84vw, 340px); gap: 14px; align-items: stretch;
    margin-inline: calc(-1 * var(--pm-g, var(--gutter, 18px)));
    padding: 6px var(--pm-g, var(--gutter, 18px)) 10px;
    overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--pm-g, var(--gutter, 18px));
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .pm-rail::-webkit-scrollbar { display: none; }
  .pm-rail > * { scroll-snap-align: start; min-width: 0; }
  .pm-rail:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
  .js .pm-rail[data-stagger] > * { opacity: 1; transform: none; transition: none; }
  .pm-meter { display: flex; align-items: center; gap: 12px; margin: 10px 0 0; }
  .pm-meter__track { position: relative; flex: 1; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
  .pm-meter__bar { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(var(--p, 0.1)); background: linear-gradient(90deg, #d97706, #fbbf24 70%, #ffe9a8); }
  .pm-meter__n { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; color: var(--text-3); font-variant-numeric: tabular-nums; }
  .pm-meter__n b { color: var(--gold); font-weight: 700; }

  /* Glass and gold cards in rails: stronger edge, lit top line. */
  .pm-rail > .card, .step, .stat {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018) 58%, rgba(251, 191, 36, 0.05)), #0b0a0a;
    border-color: rgba(251, 191, 36, 0.17);
    box-shadow: inset 0 1px 0 rgba(255, 233, 168, 0.13), 0 22px 44px -30px #000;
  }
  .trust.pm-rail > .card { display: grid; gap: 10px; align-content: start; }
  .trust.pm-rail > .card b { font-size: 1.12rem; line-height: 1.3; }
  .plans.pm-rail { grid-auto-columns: min(82vw, 330px); padding-top: 14px; }
  .plans .plan .btn { margin-top: auto; }
  .plan { grid-template-rows: auto auto auto 1fr auto; }

  /* Stats: a 2×2 instrument panel with large gold numerals. */
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 18px 16px; }
  .stat b { font-size: 2.9rem; background: linear-gradient(170deg, #fff4cf, #fbbf24 60%, #d97706); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
  .stat b small { color: inherit; -webkit-text-fill-color: inherit; }
  .stat > span { font-size: 0.875rem; line-height: 1.4; }

  /* How it works: pinned stack, each step slides over the last. */
  .steps { display: block; }
  .step { position: sticky; top: calc(82px + var(--i, 0) * 12px); margin-bottom: 14px; min-height: 280px; }
  .step:nth-child(2) { --i: 1; } .step:nth-child(3) { --i: 2; }
  .step::before { background: linear-gradient(170deg, #fff4cf, #fbbf24 60%, #d97706); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
  .step code { display: block; overflow-x: auto; white-space: nowrap; }

  /* Real app UI in frames: larger on a phone, lit from below. */
  .laptop { padding: 0; }
  .laptop__base { margin: 0; }
  .laptop::after { content: ""; position: absolute; left: 6%; right: 6%; bottom: -26px; height: 54px; background: radial-gradient(50% 50% at 50% 50%, rgba(251, 191, 36, 0.34), transparent 72%); pointer-events: none; z-index: -1; }
  .showcase { gap: 30px; }

  /* Phone wall: every mobile capture, swipeable. */
  .pm-phones { display: grid; }
  .pm-phones.pm-rail { grid-auto-columns: min(64vw, 240px); gap: 16px; padding-block: 12px 18px; }
  .pm-phone { margin: 0; display: grid; gap: 12px; }
  .pm-phone .phone { max-width: none; border-radius: 34px; padding: 8px; }
  .pm-phone .phone::before { top: 14px; width: 66px; height: 18px; }
  .pm-phone .phone__screen { border-radius: 26px; }
  .pm-phone .phone__screen img { opacity: 1; position: static; }
  .pm-phone figcaption { text-align: center; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
  .pm-phones-old { display: none !important; }

  /* Explorer tabs: say there is more to swipe. */
  .explorer__tabs { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); scrollbar-width: none; grid-auto-columns: min(74vw, 280px); }
  .explorer__tabs::-webkit-scrollbar { display: none; }

  /* Compare table: first column stays put while the plans scroll. */
  .compare { -webkit-overflow-scrolling: touch; }
  .compare td:first-child, .compare th:first-child { position: sticky; left: 0; background: #0d0c0b; z-index: 1; box-shadow: 1px 0 0 var(--border); }

  /* Closing band and premium footer. */
  .cta-band { padding: 54px 20px; border-radius: 24px; }
  .cta-band .btn-row .btn-primary { width: 100%; }
  .footer { position: relative; padding: 46px 0 34px; border-top: 0; background: radial-gradient(90% 200px at 50% 0, rgba(251, 191, 36, 0.13), transparent 72%), #060607; }
  .footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.6), transparent); }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 26px 18px; }
  .footer__grid > :first-child { grid-column: 1 / -1; }
  .footer__grid > :first-child p { max-width: 34ch; font-size: 1rem; color: var(--text-2); }
  .footer ul { gap: 0; }
  .footer li a { display: flex; align-items: center; min-height: 44px; color: var(--text-2); }
  .footer h3 { color: var(--gold); margin-bottom: 6px; font-size: 0.75rem; }
  .footer__bottom { font-size: 0.8125rem; line-height: 1.6; }
  .footer > .container::after {
    content: "InfiniBot"; display: block; margin-top: 18px; text-align: center; line-height: 1;
    font-family: var(--font-display); font-style: italic; font-size: 25vw; letter-spacing: -0.03em;
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.3), rgba(251, 191, 36, 0.02)); -webkit-background-clip: text; background-clip: text; color: transparent;
  }

  /* Sticky bottom CTA. Fixed + transformed, so it can never shift layout. */
  .pm-dock {
    position: fixed; z-index: 85; left: 0; right: 0; bottom: 0; display: flex; gap: 10px; align-items: center;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(10, 9, 8, 0.9), rgba(5, 5, 7, 0.98));
    border-top: 1px solid rgba(251, 191, 36, 0.32);
    box-shadow: 0 -18px 40px -22px #000;
    transform: translate3d(0, 110%, 0); visibility: hidden;
    transition: transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s 0.38s;
  }
  .pm-dock.is-on { transform: none; visibility: visible; transition: transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .pm-dock a { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 13px; font-family: "Manrope", ui-sans-serif, system-ui, sans-serif; font-weight: 700; font-size: 0.9rem; letter-spacing: -0.01em; white-space: nowrap; text-decoration: none; }
  .pm-dock__go { flex: 1 1 auto; padding: 0 12px; color: #140f02; background: linear-gradient(180deg, #ffe08a, #fbbf24 45%, #f59e0b); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55); }
  .pm-dock__alt { flex: 0 0 auto; padding: 0 12px; color: #f4f4f5; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.04); }

  /* Entrance for pages without their own reveal script. */
  .pm-rv { opacity: 0; transform: translate3d(0, 22px, 0); transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .pm-rv.is-in { opacity: 1; transform: none; }
}

/* ---------- Plugin pages ---------- */
@media (max-width: 760px) {
  .ps-card { min-height: 100%; }
  .ps-hero { padding-bottom: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .pm-scene::before { animation: none !important; }
  .pm-dock { transition: none !important; }
  .pm-rv { opacity: 1 !important; transform: none !important; transition: none !important; }
}
.low-end .pm-scene::before { animation: none; }

@media (max-width: 760px) {
  .sec { position: relative; }
  .sec-head { margin-bottom: 26px; }
  .pm-rail > .card, .pm-rail > article { height: 100%; }
  .plans.pm-rail { align-items: stretch; }
  .footer > .container::after { font-style: normal; }
}
