/* Rankstar public site — paid landing pages (is_paid_lp(): the Meta price-first ads, Nov 17 2026). Loaded only there
   (templates/site/base.html). The minimal header (partials/header-paid.html: the site's glass bar with two buttons)
   and the two-button phone bar (partials/buybar.html, rs-buybar--duo). The footer reuses the site footer's classes.
   The Calendly frame of the booking block gets a taller phone height here (site-forms.css keeps 44rem elsewhere).
   Tokens only (DESIGN.md). */
@layer components {
  /* header: logo left, buttons right (there is no nav to push them); "See prices" only where it fits */
  .rs-mast--paid .rs-mast__brand { flex: none; margin-right: auto; }  /* the logo never shrinks */
  .rs-pmast { display: flex; flex-wrap: nowrap; align-items: center; gap: .5rem; }
  .rs-pmast .rs-beacon { white-space: nowrap; }
  /* "Book a call": the outlined button with its words from 600 px (the FR pair needs ~565 px); below, a 44 px
     calendar button whose words stay for screen readers (one tap to the calendar from anywhere, LP3c) */
  .rs-pmast__cal { display: none; }
  @media (max-width: 599.98px) {
    .rs-pmast a.rs-pmast__call { flex: none; justify-content: center; width: 2.75rem; height: 2.75rem; min-height: 2.75rem; padding: 0; gap: 0; }
    .rs-pmast__call .rs-beacon__chip { display: none; }
    .rs-pmast__words { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .rs-pmast__cal { display: block; width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  }
  @media (max-width: 479.98px) {  /* 360 px phones: "Voir les prix" next to the logo */
    .rs-mast--paid .rs-logo { height: 1.375rem; }
    .rs-pmast .rs-beacon { padding: .375rem .875rem; font-size: .875rem; }
    .rs-pmast .rs-beacon__chip { display: none; }
  }
  @media (max-width: 359.98px) { .rs-mast--paid .rs-logo { height: 1.125rem; } }

  /* footer: logo, badges, ONE legal line (no columns, no contact email: LP3b, 17 Nov). The logo block's own rule is
     the only divider above the badges (the proof row's would draw a second one with nothing between them) */
  .rs-nadir--paid .rs-nadir__brand { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
  .rs-nadir--paid .rs-nadir__proof { margin-top: 0; border-top: 0; }
  /* the agency badges are plain images here (no exit to another site): no hover lift that promises a link */
  .rs-nadir--paid span.rs-nadir__badge:hover { translate: none; box-shadow: none; }
  /* the legal line (Terms, Privacy, Cookie settings; © line): kept and clickable (law + EU consent withdrawal) but
     almost invisible (Paul 18 Nov): 11 px, faint lilac on the band, readable on hover / keyboard focus */
  .rs-nadir--paid .rs-nadir__base { margin-top: 1rem; padding-top: .5rem; gap: .25rem 1rem; border-top-color: transparent; font-size: .6875rem; color: rgb(182 155 255 / .3); }
  .rs-nadir--paid .rs-nadir__legal { gap: .25rem 1rem; }
  .rs-nadir--paid :is(.rs-nadir__legal a, .rs-nadir__cookies) { font-size: .6875rem; color: rgb(182 155 255 / .3); }
  .rs-nadir--paid :is(.rs-nadir__legal a, .rs-nadir__cookies):is(:hover, :focus-visible) { color: var(--b2); }
  .rs-nadir--paid .rs-nadir__panel { padding-bottom: .75rem; }

  /* calendar height (site-forms.css --rs-cal-h: the frame and its placeholder). Wide screens: 47.5rem (760 px), the
     month and the slot list side by side with no inner scroll. Phones (final live check Nov 17): Calendly's phone
     layout stacks the month grid, the time zone and then the slot list; the site's 44rem (704 px) frame cut the week
     rows and the slots on a 390 px screen */
  .rs-paid-lp .rs-booking { --rs-cal-h: 47.5rem; }
  @media (max-width: 767.98px) {
    .rs-paid-lp .rs-booking { --rs-cal-h: 66rem; }  /* 1056 px */
    /* the screen's full width (Paul, 17 Nov evening: "make sure mobile is good"): inside the card's and the page's
       padding the frame was 298 px on a 390 px phone, under Calendly's 320 px phone layout */
    .rs-paid-lp .rs-booking:is([data-auto], [data-loaded]) { padding-inline: 0; padding-bottom: 0; border-radius: 0; background: none; box-shadow: none; }
    /* the wrap's own gutters, not 100vw: 100vw counts a classic scrollbar (Windows / Linux, a narrow desktop window)
       and the page then scrolled sideways, the calendar's left edge cut */
    .rs-paid-lp .rs-booking:is([data-auto], [data-loaded]) .rs-booking__slot { width: calc(100% + 2 * var(--gutter)); margin-inline: calc(-1 * var(--gutter)); border-radius: 0; }
    .rs-paid-lp .rs-booking iframe { border-radius: 0; }
  }
  /* the one booking section at the end (P10): Paul's heading and the calendar button only (no facts list), so the
     heading's own bottom margin goes and the grid gap alone spaces them (a 60 px hole on phones otherwise) */
  .rs-paid-lp .rs-booking .rs-head { margin-bottom: 0; }
  @media (max-width: 899.98px) { .rs-paid-lp .rs-booking:not([data-loaded], [data-auto]) { gap: 1.5rem; } }   /* data-auto: the loaded gap from the start (no jump) */

  /* phones: "From €480/mo · See prices" (filled) + "Book a call" (outlined) */
  @media (max-width: 767.98px) {
    .rs-buybar--duo { padding: .5rem; gap: .5rem; }
    .rs-buybar__prices, .rs-buybar__call { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem;
      border-radius: 12px; font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none; }
    .rs-buybar__prices { flex: 1 1 auto; min-width: 0; flex-direction: column; padding: .3125rem .75rem;
      background: var(--color-action); color: var(--color-on-action); }
    .rs-buybar__from { font-size: .75rem; font-weight: 500; white-space: nowrap; }
    .rs-buybar__from b { font-size: .8125rem; font-weight: 700; }
    .rs-buybar__dot { display: none; }
    .rs-buybar__see { font-size: .9375rem; white-space: nowrap; }
    .rs-buybar__call { flex: none; padding: 0 1rem; font-size: .9375rem; white-space: nowrap; color: var(--color-text);
      background: var(--color-surface); box-shadow: inset 0 0 0 1.5px var(--color-border-strong); }
  }
  @media (min-width: 480px) and (max-width: 767.98px) {  /* room for one line */
    .rs-buybar__prices { flex-direction: row; gap: 0; }
    .rs-buybar__from, .rs-buybar__from b { font-size: .9375rem; font-weight: 600; }
    .rs-buybar__dot { display: inline; white-space: pre; }
  }

  /* phones, v4 mobile pass (contract LP3c: every tap target 44 px or more, text readable without zoom; measured at
     390 x 844 and 360 x 740, tests/test_paid_lps_mobile.py). The rails' dots are the position indicator here: at
     5 or 6 cards a 44 px dot per card does not fit next to the two 44 px arrows on a 360 px screen, so on phones the
     arrows and the swipe move the rail and the dots no longer take taps (keyboard focus still works). */
  @media (max-width: 767.98px) {
    .rs-mast--paid .rs-mast__brand { min-height: 2.75rem; }
    .rs-paid-lp .rs-marquee__pause { width: 2.75rem; height: 2.75rem; }
    .rs-paid-lp .rs-railbar__dot { pointer-events: none; }
    .rs-nadir--paid :is(.rs-nadir__legal a, .rs-nadir__cookies) { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; min-width: 2.75rem; }
    .rs-nadir--paid .rs-nadir__legal { row-gap: 0; }
    .rs-nadir--paid :is(.rs-nadir__base, .rs-nadir__legal a, .rs-nadir__cookies) { font-size: .75rem; }   /* phones: 12 px floor, still faint */
    .rs-paid-lp :is(.rs-src__where, .rs-src__n, .rs-src__note) { font-size: .75rem; }   /* the sources tiles' 10-11 px labels */
    .rs-paid-lp :is(.rs-packcol__ghead, .rs-packcol__flag) { font-size: .75rem; }   /* the price cards' 11 px group heads and flag (A3) */
    .rs-paid-lp .rs-vol__note a { display: inline-flex; align-items: center; min-height: 2.75rem; }   /* "Over 100K? Book a free consultation": 15 px tall inline (final audit) */
  }

  /* Reduce Motion (iOS accessibility setting): site.css stops the logo marquee and lets the row wrap, which stacked
     every logo into a 750 px strip between the hero and the price grid (first price 2.7-3.5 screens down instead of
     under 2.5 / 3.0). Here the static strip stays one row, the logos past the edge clipped by the track with a soft
     fade, so the page keeps the length a moving strip has. !important because the wrap comes from the later
     utilities layer (an !important in an earlier layer wins over it). */
  @media (prefers-reduced-motion: reduce) {
    .rs-paid-lp .rs-marquee .rs-proof__row { flex-wrap: nowrap !important; }
    .rs-paid-lp .rs-marquee__track { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent) !important;
      mask-image: linear-gradient(90deg, #000 85%, transparent) !important; }
  }

  /* Keyboard focus on the purple hero and on the header while it sits over it (WCAG 1.4.11, 3:1): the buttons' own
     box-shadow replaced site.css's white halo, leaving a violet ring on violet (1.99:1). Here a white outline around a
     2 px violet band, which reads on the purple and on the violet or white buttons. Once the header is scrolled (white
     glass) the site's own ring applies again (violet outline, white halo: a white outline would vanish there). The
     outlined and ghost buttons keep their thin border inside. */
  .rs-paid-lp :is(.rs-zenith, .rs-mast--paid:not([data-scrolled], [data-open])) :is(a, button).rs-beacon:focus-visible {
    outline-color: #fff; box-shadow: 0 0 0 4px var(--color-focus); }
  .rs-paid-lp :is(.rs-zenith, .rs-mast--paid:not([data-scrolled], [data-open])) :is(a, button):is(.rs-beacon--ghost, .rs-beacon--outline):focus-visible {
    box-shadow: inset 0 0 0 1.5px color-mix(in oklab, currentColor 50%, transparent), 0 0 0 4px var(--color-focus); }
}
