/* ============================================================================
   motion.css -- Tier 1-3 motion for the hub (index.html) and chapter pages.
   Loaded via build-ebook.py on hub and chapter pages.
   To remove all motion: unlink motion.css and motion.js.

   Rules:
   - Animate transform and opacity only (GPU composited, no layout thrash).
   - All effects are gated on @media (prefers-reduced-motion: no-preference)
     so users who have requested reduced motion get a static, fully-visible page.
   - Initial hidden states are applied here in CSS (not inline JS) so they take
     effect before the first paint. JS adds .motion-ready to <html> after the
     fonts are considered loaded; the animations then fire. If JS is off or
     reduced-motion is set, every element stays at its final visible state.

   Tier 1: hero entrance stagger, .hl clip-path wipe, chapter-card scroll stack,
           glow hover micro-interactions.
   Tier 2: hero 3D image parallax, reading progress bar, counter overshoot+settle.
   Tier 3: CTA arrow slide, consistent section reveals.
   ============================================================================ */

/* ----------------------------------------------------------------------------
   Motion tokens
   ---------------------------------------------------------------------------- */
:root {
  --motion-dur-fast:    200ms;
  --motion-dur-base:    400ms;
  --motion-dur-slow:    600ms;
  --motion-ease:        cubic-bezier(0.22, 1, 0.36, 1); /* ease-out spring feel */
  --motion-ease-soft:   cubic-bezier(0.34, 0, 0.2, 1);  /* gentle, no overshoot, for hover glows */
  --motion-dur-hover:   420ms; /* slower hover bloom so the glow eases in softly, not "dry" */
  --motion-stagger:     70ms;  /* interval between staggered items */
}

/* ----------------------------------------------------------------------------
   Reduced-motion guard: everything inside the @media block is motion-only.
   Outside the block: no hidden states, no transitions, elements are visible.
   ---------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {

  /* --------------------------------------------------------------------------
     Entrance hidden states.
     Applied only when html.motion-ready is present (JS sets it).
     Without .motion-ready (JS off, or before JS runs) all elements are visible.
     -------------------------------------------------------------------------- */

  /* Hero B left column: eyebrow, h1, CTA block */
  html.motion-ready .hero-b-left .section-caption,
  html.motion-ready .hero-b-left h1,
  html.motion-ready .hero-b-cta,
  html.motion-ready .col-12.d-lg-none .d-flex {
    opacity: 0;
    transform: translateY(16px);
  }

  /* Hero B right column: intro paragraphs */
  html.motion-ready .hero-b-right p {
    opacity: 0;
    transform: translateY(16px);
  }

  /* .hl highlight span: starts hidden for the clip-path wipe-in */
  html.motion-ready .hero-b-left h1 .hl {
    /* Override the translateY set on h1 above -- hl inherits parent transform
       so we only need the clip-path state here. The parent h1 carries the rise. */
    clip-path: inset(0 100% 0 0);
  }

  /* --------------------------------------------------------------------------
     Entrance animation classes (added by motion.js).
     -------------------------------------------------------------------------- */

  /* Generic fade+rise used for all staggered hero elements */
  .motion-enter {
    animation: motionRise var(--motion-dur-slow) var(--motion-ease) both;
  }

  /* The .hl wipe: left-to-right clip-path reveal.
     Fires when motion.js adds .motion-hl-wipe to the .hl span. */
  .motion-hl-wipe {
    animation: motionHlWipe var(--motion-dur-slow) var(--motion-ease) both;
  }

  /* --------------------------------------------------------------------------
     Keyframes
     -------------------------------------------------------------------------- */
  @keyframes motionRise {
    from {
      opacity: 0;
      transform: translateY(16px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes motionHlWipe {
    from { clip-path: inset(0 100% 0 0); }
    to   { clip-path: inset(0 0% 0 0); }
  }

  /* --------------------------------------------------------------------------
     Chapter-cards scroll stack.
     Replaces the Sinch CDN stacking-cards behavior (which throws a CustomEvent
     constructor error). Cards start slightly scaled-down and faded; motion.js
     drives them in as they enter the viewport.
     -------------------------------------------------------------------------- */
  .js-stack-cards__item {
    will-change: transform, opacity;
    /* Default: fully visible (no JS, reduced-motion already excluded by @media) */
  }

  /* JS-enhanced state: js adds .stack-cards-enhanced to <body>.
     Only then do we apply hidden states so items are visible without JS. */
  body.stack-cards-enhanced .js-stack-cards__item {
    opacity: 0;
    transform: scale(0.97) translateY(24px);
    transition:
      opacity var(--motion-dur-base) var(--motion-ease),
      transform var(--motion-dur-base) var(--motion-ease);
  }

  body.stack-cards-enhanced .js-stack-cards__item.stack-card-visible {
    opacity: 1;
    transform: scale(1) translateY(0);
  }

  /* Stagger consecutive cards so they cascade in */
  body.stack-cards-enhanced .js-stack-cards__item:nth-child(2) { transition-delay: 60ms; }
  body.stack-cards-enhanced .js-stack-cards__item:nth-child(3) { transition-delay: 120ms; }
  body.stack-cards-enhanced .js-stack-cards__item:nth-child(4) { transition-delay: 180ms; }
  body.stack-cards-enhanced .js-stack-cards__item:nth-child(5) { transition-delay: 240ms; }

  /* Once a card has scrolled in and settled (.stack-card-visible), swap its
     transition to the soft hover timing (transform + box-shadow) and drop the
     entrance stagger delay, so the hover glow eases in smoothly instead of
     popping instantly. The scroll-stack base transition only covers opacity +
     transform and carries a stagger delay, which made the card hover feel "dry". */
  body.stack-cards-enhanced .js-stack-cards__item.stack-card-visible {
    transition:
      transform var(--motion-dur-hover) var(--motion-ease-soft),
      box-shadow var(--motion-dur-hover) var(--motion-ease-soft);
    transition-delay: 0s;
  }

  /* --------------------------------------------------------------------------
     Glow micro-interactions: hover + :focus-visible.
     Applied to inline-cta cards, stat-hero sections, and chapter cards.
     All effects are GPU-composited (transform / opacity / box-shadow / filter).
     No layout properties touched. Reduced-motion gate is the enclosing @media.

     Removal: delete or unlink motion.css. No other file references these rules.
     -------------------------------------------------------------------------- */

  /* -- inline-cta card -------------------------------------------------------
     Base: ::before is a 3px top-edge yellow gradient; no existing box-shadow.
     Hover: lift 2px + soft yellow glow shadow below card + faint border glow.
     Transition: 220ms ease-out (fast enough to feel snappy, slow enough to be
     readable on a CTO/CIO audience; matches --motion-dur-fast token). */
  .inline-cta {
    transition:
      transform var(--motion-dur-hover) var(--motion-ease-soft),
      box-shadow var(--motion-dur-hover) var(--motion-ease-soft);
  }
  .inline-cta:hover,
  .inline-cta:focus-visible {
    transform: translateY(-3px);
    box-shadow:
      0 0 0 1px rgba(var(--sinch-glow-color), 0.20),
      0 10px 44px rgba(var(--sinch-glow-color), 0.16);
  }

  /* -- stat-hero section -----------------------------------------------------
     Base: lives inside .ebook-section.glow whose ::before pseudo carries the
     radial yellow halo at opacity 0.55 (ebook.css). The .stat-hero__num is the
     focal point (giant yellow number).
     Hover target: .stat-hero (the inner content block), not the full section,
     so the interaction is scoped to a readable hit area.
     Hover: lift 3px. No box-shadow needed; the .glow halo context is already
     atmospheric. The lift is the signal, restrained and clean. */
  .stat-hero {
    transition:
      transform var(--motion-dur-hover) var(--motion-ease-soft),
      filter var(--motion-dur-hover) var(--motion-ease-soft);
  }
  .stat-hero:hover,
  .stat-hero:focus-visible {
    transform: translateY(-3px);
    /* a gentle glow bloom around the giant number, eased in softly */
    filter: drop-shadow(0 0 32px rgba(var(--sinch-glow-color), 0.14));
  }

  /* -- chapter cards (.chapters-cards__item) ---------------------------------
     Base: overflow hidden, border-radius, no explicit box-shadow (the parent
     .chapters-cards carries a filter: drop-shadow from the Sinch theme).
     Hover: scale 1.01 + a subtle yellow-tinted box-shadow that echoes the glow
     token. Scale (not translateY) because the cards are sticky on desktop and
     a vertical shift interacts awkwardly with the stacking behavior.
     Transition: 240ms ease-out -- slightly slower than inline-cta so the
     larger card feels proportional. */
  .chapters-cards__item {
    transition:
      transform var(--motion-dur-hover) var(--motion-ease-soft),
      box-shadow var(--motion-dur-hover) var(--motion-ease-soft);
  }
  .chapters-cards__item:hover,
  .chapters-cards__item:focus-visible {
    transform: scale(1.012);
    box-shadow:
      0 0 0 1px rgba(var(--sinch-glow-color), 0.16),
      0 12px 48px rgba(var(--sinch-glow-color), 0.12);
  }

  /* -- Prev/next chapter nav cards (.adjacent-posts a.btn-arrow) --------------
     The chapter-pagination cards at the foot of each chapter had only the
     theme's color transition. Add a card lift + slide the chevron toward its
     edge on hover (prev -> left, next -> right). The chevron is a pseudo with an
     existing transform (horizontal flip on prev + vertical centring), so we
     animate the `translate` property, which composes with `transform` instead
     of overwriting it. */
  .adjacent-posts a.btn-arrow {
    transition: transform var(--motion-dur-hover) var(--motion-ease-soft);
  }
  .adjacent-posts a.btn-arrow:hover,
  .adjacent-posts a.btn-arrow:focus-visible {
    transform: translateY(-2px);
  }
  .adjacent-posts a.btn-arrow::before,
  .adjacent-posts a.btn-arrow::after {
    transition: translate var(--motion-dur-hover) var(--motion-ease-soft);
  }
  .adjacent-posts a.btn-arrow[rel="prev"]:hover::before,
  .adjacent-posts a.btn-arrow[rel="prev"]:hover::after,
  .adjacent-posts a.btn-arrow[rel="prev"]:focus-visible::before,
  .adjacent-posts a.btn-arrow[rel="prev"]:focus-visible::after {
    translate: -4px 0;
  }
  .adjacent-posts a.btn-arrow[rel="next"]:hover::before,
  .adjacent-posts a.btn-arrow[rel="next"]:hover::after,
  .adjacent-posts a.btn-arrow[rel="next"]:focus-visible::before,
  .adjacent-posts a.btn-arrow[rel="next"]:focus-visible::after {
    translate: 4px 0;
  }

  /* ==========================================================================
     Tier 2.1 -- Hero 3D image parallax.
     The hero B right-half image lives on .hero-front-page.hero-b::after.
     Pseudo-elements cannot be targeted by JS directly, so motion.js sets
     --hero-parallax on the hero element via a rAF scroll handler, and the
     pseudo reads it here. Low amplitude (max ~30px) for a premium, barely-
     there depth effect. Disabled below 992px (image is hidden on mobile).
     ========================================================================== */
  @media (min-width: 992px) {
    .hero-front-page.hero-b::after {
      /* Shift upward as the hero scrolls out of view. CSS var starts at 0
         and goes to a small positive px value set by motion.js. */
      transform: translateY(calc(var(--hero-parallax, 0px) * -1));
      /* Only the parallax translate -- no conflict with existing rules. */
      will-change: transform;
    }
  }

  /* ==========================================================================
     Tier 2.2 -- Reading progress bar.
     Injected into the DOM by motion.js as <div class="motion-progress-bar">.
     Scales on the X axis from 0 to 1 (transform-origin: left) as the page
     scrolls. Fixed at the very top of the viewport, above the sticky navbar
     (navbar z-index is 50 in the Sinch theme; we use 200 to clear it).
     ========================================================================== */
  .motion-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: rgb(var(--sinch-glow-color));
    transform-origin: left center;
    transform: scaleX(0);
    z-index: 200;
    pointer-events: none;
    /* Subtle transition so rapid small scrolls don't flicker */
    transition: transform 80ms linear;
  }

  /* ==========================================================================
     Tier 2.3 -- Counter suffix reveal.
     The counter suffix (.counter-suffix) starts invisible; motion.js fades
     it in after the count-up animation lands. The suffix span is injected
     into the DOM by motion.js when it initializes the counter.
     ========================================================================== */
  .counter-suffix {
    display: inline;
    opacity: 0;
    transition: opacity var(--motion-dur-fast) var(--motion-ease);
  }
  .counter-suffix.counter-suffix--visible {
    opacity: 1;
  }

  /* ==========================================================================
     Tier 3.1 -- CTA animated-arrow slide-in + subtle lift.

     Background: the Sinch theme defines the arrow shape on .btn.btn-animated
     via CSS variables (--sinch-btn-arrow-img) and sets up both ::before
     (a spacer that shrinks on hover) and ::after (the masked arrow that
     slides in). The extracted inline CSS preserved mask-size but dropped the
     critical `mask` / `-webkit-mask` declarations, so ::after rendered as a
     solid square instead of the arrow shape. It also omitted the :hover rule
     that triggers the slide. This block restores both on top of the inline
     theme CSS (no edit to the theme file).

     Hover sequence (mirrors reference/css/design-system.css lines 1313-1320):
       ::before   width 0.75rem -> 0         (spacer collapses)
       ::after    margin-left -0.75rem -> 0.5rem, opacity 0 -> 1  (arrow slides in)
     The ::after also needs mask: so the SVG shape is actually visible.

     The subtle 1px lift stays alongside the arrow; it complements rather than
     competes. Guarded by @media (min-width: 768px) because the theme hides
     both pseudos below 768px (they only exist in that breakpoint).
     ========================================================================== */

  /* Restore the arrow shape mask that the inline extraction omitted.
     Must be outside the hover rule so the shape is ready before hover. */
  @media (min-width: 768px) {
    .btn.btn-animated::after {
      -webkit-mask: var(--sinch-btn-arrow-img) no-repeat 50% 50%;
              mask: var(--sinch-btn-arrow-img) no-repeat 50% 50%;
    }
  }

  /* Lift transition (no conflict with theme color/bg/border/shadow transitions). */
  .btn-animated {
    transition: transform var(--motion-dur-fast) var(--motion-ease),
                color 0.2s ease-in-out, background-color 0.2s ease-in-out,
                border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  }

  /* Arrow reveal + lift on hover/focus. Guarded by pointer:fine so touch
     users who cannot hover never see a stuck halfway-state. */
  @media (min-width: 768px) and (hover: hover) and (pointer: fine) {
    /* Spacer collapses to make room for the arrow */
    .btn.btn-animated:hover::before,
    .btn.btn-animated:focus-visible::before {
      width: 0;
    }
    /* Arrow slides in from the left */
    .btn.btn-animated:hover::after,
    .btn.btn-animated:focus-visible::after {
      margin-left: 0.5rem;
      margin-right: 0;
      opacity: 1;
    }
  }

  /* Lift on hover/focus (all screen sizes; safe because it is transform-only). */
  .btn-animated:hover,
  .btn-animated:focus-visible {
    transform: translateY(-1px);
  }

  /* ==========================================================================
     Tier 3.2 -- Consistent section reveals.
     .altblo-content (the text column in altblocks) gets the same fade+rise as
     the existing [data-reveal] system (widgets.css, 0.6s ease, translateY 24px),
     aligned to the motion tokens. Applied only when motion.js has confirmed JS
     is active and has run the observer (body.motion-sections-enhanced).
     ========================================================================== */
  body.motion-sections-enhanced .motion-section-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition:
      opacity var(--motion-dur-slow) var(--motion-ease),
      transform var(--motion-dur-slow) var(--motion-ease);
  }
  body.motion-sections-enhanced .motion-section-reveal.motion-section-visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* ==========================================================================
     Tier 3.3 -- FAQ / Compliance accordion hover (.comp-card-head).

     The expandable cards used for compliance items (RAY BAUM, Kari's Law,
     STIR/SHAKEN, E911 in chapter 02) and for "Questions to ask" in chapter 04
     have a <button class="comp-card-head"> that gets no visual affordance on
     hover. This block adds three signals that read as "clickable" together:

       1. Background tint  -- a faint warm highlight echoing the glow token.
          Sets the card surface apart; warm so it rhymes with the yellow system.
       2. Border-color lift -- the card border brightens on the header hover so
          the whole card feels responsive, not just the text.
       3. Caret nudge      -- the caret (chevron) translates down 2px. Subtle
          movement that says "this opens downward."

     Transition matches --motion-dur-fast (200ms) and --motion-ease for
     consistency with the rest of the hover system.
     ========================================================================== */
  .comp-card {
    transition: border-color 200ms var(--motion-ease);
  }
  .comp-card-head {
    transition: background-color 200ms var(--motion-ease);
  }
  .comp-card-caret {
    /* The existing rule sets transition:transform 0.25s ease for the open-rotate.
       Extend it to also cover the hover nudge translate. */
    transition: transform 0.25s ease, color 200ms var(--motion-ease);
  }
  .comp-card:has(.comp-card-head:hover) {
    border-color: rgba(var(--sinch-glow-color), 0.45);
  }
  .comp-card-head:hover,
  .comp-card-head:focus-visible {
    background-color: rgba(var(--sinch-glow-color), 0.07);
  }
  /* Caret nudge down on hover (distinct from the rotate-on-open already in
     widgets.css). translate + existing rotate are additive on the same element
     because .comp-card.open .comp-card-caret sets transform:rotate(180deg)
     and this sets translate separately via the shorthand. Using translate()
     (not translateY) keeps specificity clean and avoids overriding the rotate. */
  .comp-card-head:hover .comp-card-caret,
  .comp-card-head:focus-visible .comp-card-caret {
    color: rgb(var(--sinch-glow-color));
    transform: translateY(2px);
  }
  /* When open AND hovered, keep the rotate and add the nudge */
  .comp-card.open .comp-card-head:hover .comp-card-caret,
  .comp-card.open .comp-card-head:focus-visible .comp-card-caret {
    transform: rotate(180deg) translateY(-2px);
  }

  /* :focus-visible ring on the button itself (keyboard a11y) */
  .comp-card-head:focus-visible {
    outline: 2px solid rgb(var(--sinch-glow-color));
    outline-offset: -2px;
    border-radius: inherit;
  }

  /* ==========================================================================
     Tier 3.4 -- Restore the missing .btn:hover background/color shift.

     The Sinch design-system sets per-variant hover tokens (--sinch-btn-hover-bg,
     --sinch-btn-hover-border-color) and a single generic .btn:hover rule that
     applies them. The extracted inline CSS carries the base token declarations
     per variant but omits (a) the hover tokens themselves and (b) the .btn:hover
     rule that reads them. Result: buttons have a transition but nothing to
     transition to. This block restores both layers.

     Hover token values mirror design-system.css (checked against reference):
       btn-secondary    bg #2977FF / border #2977FF  (light)
                        bg #1860F0 / border #1860F0  (dark)
       btn-outline-sec  bg rgba(143,154,161,.16) / border #5996FF (light)
                        bg rgba(174,183,189,.08) / border #5996FF (dark)
       btn-neutral      bg #AEB7BD / border #AEB7BD  (light)
                        bg #626C73 / border #626C73  (dark)
       btn (base)       no hover-bg override needed (stays transparent)

     Only active with (hover: hover) and (pointer: fine) to avoid sticky states
     on touch devices, consistent with the Sinch reference implementation.
     ========================================================================== */

  /* Per-variant hover tokens (these were omitted from the inline extraction) */
  .btn.btn-secondary {
    --sinch-btn-hover-bg: #2977FF;
    --sinch-btn-hover-border-color: #2977FF;
  }
  [data-theme="dark"] .btn.btn-secondary {
    --sinch-btn-hover-bg: #1860F0;
    --sinch-btn-hover-border-color: #1860F0;
  }
  .btn.btn-outline-secondary {
    --sinch-btn-hover-bg: rgba(143, 154, 161, 0.16);
    --sinch-btn-hover-border-color: #5996FF;
  }
  [data-theme="dark"] .btn.btn-outline-secondary {
    --sinch-btn-hover-bg: rgba(174, 183, 189, 0.08);
    --sinch-btn-hover-border-color: #5996FF;
  }
  .btn.btn-neutral {
    --sinch-btn-hover-bg: #AEB7BD;
    --sinch-btn-hover-border-color: #AEB7BD;
  }
  [data-theme="dark"] .btn.btn-neutral {
    --sinch-btn-hover-bg: #626C73;
    --sinch-btn-hover-border-color: #626C73;
  }

  /* The single rule that reads all those tokens and applies them */
  @media (hover: hover) and (pointer: fine) {
    .btn:hover,
    a:hover .btn:not(a),
    button:hover .btn:not(button) {
      color: var(--sinch-btn-color);
      background-color: var(--sinch-btn-hover-bg, var(--sinch-btn-bg));
      border-color: var(--sinch-btn-hover-border-color, var(--sinch-btn-border-color));
    }
  }
  .btn:focus-visible {
    outline: 2px solid var(--sinch-focus-ring-color, #9785FF);
    outline-offset: 2px;
  }

  /* ==========================================================================
     Tier 3.5 -- Carousel nav arrows ([data-carousel-nav]).

     The prev/next chapter carousel buttons get the same glow lift as the
     chapter cards: a translateY(-2px) up-step plus a box-shadow that echoes
     the yellow glow token. At 240ms they feel proportional to their target
     size (the buttons are ~56px square per ebook.css padding override).
     ========================================================================== */
  [data-carousel-nav] {
    /* Extend the btn's own transition list with transform and box-shadow.
       Keep color/bg/border/outline from the btn base so they still animate. */
    transition:
      transform 240ms var(--motion-ease),
      box-shadow 240ms var(--motion-ease),
      color 0.2s ease-in-out,
      background-color 0.2s ease-in-out,
      border-color 0.2s ease-in-out,
      outline 0.2s ease-in-out;
  }
  [data-carousel-nav]:hover,
  [data-carousel-nav]:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(var(--sinch-glow-color), 0.18);
  }
  [data-carousel-nav]:focus-visible {
    outline: 2px solid rgb(var(--sinch-glow-color));
    outline-offset: 2px;
  }

  /* ==========================================================================
     Tier 3.6 -- AI pill lift (.ai-pill).

     The pill already shows its tooltip on hover via CSS in widgets.css. Add a
     scale-up micro-interaction so the pill itself reads as interactive even
     before the tooltip appears. Scale is the right property here (not translateY)
     because the pill is fixed-position and a Y shift can feel disconnected from
     the tooltip emergence direction.
     ========================================================================== */
  .ai-pill {
    transition:
      transform 200ms var(--motion-ease),
      box-shadow 200ms var(--motion-ease);
  }
  .ai-pill:hover,
  .ai-pill:focus-visible {
    transform: scale(1.04);
    box-shadow:
      var(--sinch-box-shadow),
      0 0 0 2px rgba(var(--sinch-glow-color), 0.5);
  }
  .ai-pill:focus-visible {
    outline: 2px solid rgba(var(--sinch-glow-color), 0.8);
    outline-offset: 3px;
  }

  /* ==========================================================================
     Tier 3.7 -- Nav chapter link hover (.sub-menu__item / .chapters-menu a).

     The original theme scopes these hover states to body class selectors
     (post-type-archive-ai-prod-paradox / single-ai-prod-chapter) that the
     ebook pages never carry, so the nav chapter links have no hover effect.
     This block adds a clean bg-tint + number-pill highlight that matches the
     chapters-menu visual system, gated on (hover:hover) for touch safety.
     ========================================================================== */
  @media (hover: hover) and (pointer: fine) {
    a.sub-menu__item:hover,
    button.sub-menu__item:hover {
      background-color: rgba(var(--sinch-glow-color), 0.08);
    }
    a.sub-menu__item:hover > div p:first-child,
    button.sub-menu__item:hover > div p:first-child {
      background-color: rgb(24, 96, 240);
      color: #ffffff !important;
    }
  }
  a.sub-menu__item:focus-visible,
  button.sub-menu__item:focus-visible {
    outline: 2px solid rgb(var(--sinch-glow-color));
    outline-offset: -2px;
  }

  /* ==========================================================================
     Tier 3.8 -- Footer social icon :focus-visible ring.

     site-footer-preview.css already has a .footer-social-btn:hover rule with
     color + border-color change. Add the matching :focus-visible ring for
     keyboard navigation consistency.
     ========================================================================== */
  .footer-social-btn:focus-visible {
    outline: 2px solid rgba(255, 233, 122, 0.8);
    outline-offset: 2px;
  }

  /* ==========================================================================
     Tier 3.9 -- btn-arrow text link :focus-visible ring.

     The .btn-arrow links (e.g. "Get the ebook by email" in the nav) already
     transition color on hover via the theme. Add a :focus-visible outline for
     keyboard users so the link is clearly identified when tabbed to.
     ========================================================================== */
  .btn-arrow:focus-visible {
    outline: 2px solid var(--sinch-link-color, #1860F0);
    outline-offset: 3px;
    border-radius: 2px;
  }

  /* ==========================================================================
     Tier 3.10 -- Global :focus-visible fallback.

     Any interactive element (anchor, button) not covered by a specific rule
     above gets the Sinch focus-ring token as a baseline. This is the reduced-
     motion-safe layer: a color change (outline) carries no motion, so it is
     inside the reduced-motion guard only because this is where our hover system
     lives, but the outline itself is safe to show under reduced-motion too.
     The rule has low specificity (a single pseudo-class) so any more-specific
     rule above wins without needing !important.
     ========================================================================== */
  a:focus-visible,
  button:focus-visible {
    outline: 2px solid var(--sinch-focus-ring-color, #9785FF);
    outline-offset: 2px;
  }

} /* end @media (prefers-reduced-motion: no-preference) */

/* ==========================================================================
   Focus-visible baseline (outside reduced-motion guard).
   The rules above are inside @media (prefers-reduced-motion: no-preference)
   because they co-locate with the hover system. But focus rings are not
   "motion" -- they are a static state change, so they should show even for
   users who prefer reduced motion. This duplicate covers that case without
   adding transform or animation.
   ========================================================================== */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--sinch-focus-ring-color, #9785FF);
  outline-offset: 2px;
}
.comp-card-head:focus-visible {
  outline: 2px solid rgb(var(--sinch-glow-color));
  outline-offset: -2px;
  border-radius: inherit;
}
[data-carousel-nav]:focus-visible {
  outline: 2px solid rgb(var(--sinch-glow-color));
  outline-offset: 2px;
}
.ai-pill:focus-visible {
  outline: 2px solid rgba(var(--sinch-glow-color), 0.8);
  outline-offset: 3px;
}
.footer-social-btn:focus-visible {
  outline: 2px solid rgba(255, 233, 122, 0.8);
  outline-offset: 2px;
}
.btn-arrow:focus-visible {
  outline: 2px solid var(--sinch-link-color, #1860F0);
  outline-offset: 3px;
  border-radius: 2px;
}
.btn:focus-visible {
  outline: 2px solid var(--sinch-focus-ring-color, #9785FF);
  outline-offset: 2px;
}
a.sub-menu__item:focus-visible,
button.sub-menu__item:focus-visible {
  outline: 2px solid rgb(var(--sinch-glow-color));
  outline-offset: -2px;
}
