/* ------------------------------------------------------------------------------------------
   Helpdesk overview port additions (GAIN-5002). The design's own rules for this page are
   helpdesk-overview.css (hx-*) and fx-bands.css (fx-*), both loaded as they are. Everything here
   is this site's: rules the design keeps in its global craft.css, fixes found while porting,
   and the owner's decisions. All scoped to `.hd` (the page's article), so no other route can
   pick one up.

   Sections 1-5 and 7-10 repeat crm-overview.css's port additions under `.hd`, on purpose: the
   owner chose a page sheet over a shared one so /crm's hooks and tests stay untouched. A fix
   to one of those rules belongs in both sheets.
   ------------------------------------------------------------------------------------------ */

/* 1. Tertiary links get the design's hover pill (craft.css), with no layout shift: the pill is
   drawn outside the text box, and the link is as tall as the buttons beside it. On the dark
   record band the pill is a translucent white. */
.hd :is(.fx-band-link,.hx-link-dk){position:relative;isolation:isolate;min-height:48px}
.hd :is(.fx-band-link,.hx-link-dk)::before{content:"";position:absolute;z-index:-1;top:0;left:-18px;right:-18px;height:100%;border-radius:999px;border:1px solid #2A5E44;background:#DBF2E9;opacity:0;transition:opacity 140ms cubic-bezier(.2,.7,.2,1)}
.hd .fx-band-link:hover{color:#2A5E44;text-decoration:none}
.hd :is(.fx-band-link,.hx-link-dk):hover::before{opacity:1}
.hd :is(.fx-band--dark .fx-band-link,.hx-link-dk)::before{border-color:rgba(255,255,255,.45);background:rgba(255,255,255,.08)}
.hd :is(.fx-band--dark .fx-band-link,.hx-link-dk):hover{color:#fff}
.hd :is(.pp-cta,.pp-ghost)+:is(.fx-band-link,.hx-link-dk){margin-left:18px}
@media(max-width:640px){.hd :is(.pp-cta,.pp-ghost)+:is(.fx-band-link,.hx-link-dk){margin-left:0}}

/* 2. The closing banner's title kept to two lines on desktop (craft.css); the design system's
   inline 640px cap would otherwise break it into three. */
.hd .hd-close section[style*="gradient-deep"]>div>h2{max-width:min(100%,32ch)!important;font-size:clamp(28px,3.3vw,42px)!important;line-height:1.15!important;text-wrap:balance!important}

/* 3. The closing "Book a demo": the approved outline pill from the feature pages
   (feature-shell.css `.fs-close-demo`), a solid 2px white border on the deep green, with a
   translucent white wash on hover and focus. !important where the banner writes the property
   inline. */
.hd .hd-close .hd-close-demo{background:transparent!important;color:#fff!important;border:2px solid rgba(255,255,255,.7)!important;transition:transform var(--duration-normal) var(--ease-standard),background-color var(--duration-normal) var(--ease-standard),border-color var(--duration-normal) var(--ease-standard)!important}
.hd .hd-close .hd-close-demo:is(:hover,:focus-visible){background:rgba(255,255,255,.18)!important;border-color:#fff!important;transform:translateY(-1px)}
.hd .hd-close .hd-close-demo:active{transform:translateY(0)}

/* 4. The timeline rows' entrances are CSS animations with delays. Below the fold they would
   have finished before the band is seen, so they wait, paused, until the reveal puts `is-in`
   on the card. */
.pp-motion .hd .pp-rev:not(.is-in) .hx-tl-r{animation-play-state:paused}

/* 5. Tile hover once the reveal has run. The reveal's transition (product-page.css) replaced the
   tile's own, so the hover lift snapped; the stagger travels as `--sd` and applies to the reveal
   alone (helpdesk-overview.mjs moves it there from the inline transition-delay). */
html.pp-motion .hd .fx-tile.pp-rev{transition:opacity .35s cubic-bezier(.25,.46,.45,.94) var(--sd,0s),transform .35s cubic-bezier(.25,.46,.45,.94) var(--sd,0s),translate .2s ease-out,box-shadow .2s ease-out,border-color .2s ease-out}

/* 6. The plan section's "See pricing" (helpdesk-overview.mjs adds it, as /crm's plan has one). */
.hd .hd-plan-cta{text-align:center}
.hd .hd-plan-cta .fx-band-link{margin-top:20px}

/* 7. The hero's inbox scrolls sideways inside `.hx-mock-sc` when the viewport is narrower than
   its 860px; a fade on the right edge says so while there is more to see (interactions.js
   toggles `cx-mock-more`, the class /crm's frame uses too). */
.hd .hx-hero-vis{position:relative}
.hd .hx-hero-vis::after{content:"";position:absolute;z-index:2;top:0;right:0;bottom:0;width:56px;border-radius:0 20px 20px 0;background:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.96));pointer-events:none;opacity:0;transition:opacity .2s ease}
.hd .hx-hero-vis.cx-mock-more::after{opacity:1}

/* 8. Phones and small tablets (owner decisions R1, R2, R4, R5).
   - The inbox restacks rather than scrolling: in a 342px frame the 860px mock hid its
     Properties panel, the part that says "knows the customer". The Channels column goes, and
     Properties sits under the conversation; nothing scrolls sideways, so the fade stays off.
   - The eight feature tiles become compact rows, icon beside text, roughly halving the stack.
   - The plan cards sit two across while there is room (481-720px), and tighten below.
   - The record band's actions stack: the trial full width, the links under it at the left.
   - The FAQ's inline 92px/48px padding drops to the product pages' phone padding.
   - The timeline header wraps at 400px and below instead of squeezing the name. */
@media(max-width:720px){
 .hd .hx-mock{min-width:0}
 .hd .hx-app{grid-template-columns:minmax(0,1fr)}
 .hd .hx-ch{display:none}
 .hd .hx-cust{border-left:0;border-top:1px solid var(--border-a)}
 .hd .hx-grid4 .fx-tile{display:grid;grid-template-columns:40px minmax(0,1fr);grid-template-rows:auto auto;column-gap:14px;align-items:start;padding:18px}
 .hd .hx-grid4 .fx-ico{grid-row:1/3;margin:0}
 .hd .hx-grid4 .fx-feat{padding-right:24px}
 .hd .hx-grid4 .fx-desc{margin-top:4px}
 .hd .hx-grid4 .fx-tile-go{top:18px;right:18px}
 .hd section[data-screen-label="FAQ"]{padding:68px 24px!important}
}
@media(min-width:481px) and (max-width:720px){.hd .hx-plan{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){.hd .hx-plan-c{padding:22px 20px}}
@media(max-width:640px){
 .hd .hx-rec-acts{flex-direction:column;align-items:stretch}
 .hd .hx-rec-acts .pp-cta{justify-content:center}
 .hd .hx-rec-acts .hx-link-dk{align-self:flex-start}
}
@media(max-width:400px){.hd .hx-tl-h{flex-wrap:wrap}}

/* 9. Keyboard focus that reads on these grounds; white on the dark record band and the
   closing banner. A tile shows focus on itself rather than on its stretched link. */
.hd :is(.pp-cta,.pp-ghost,.fx-band-link,.hx-link-dk,.faq-contact,.cta-link,.hx-mock-sc):focus-visible{outline:2px solid var(--green-700b);outline-offset:3px}
.hd :is(.fx-band--dark,.hd-close) :is(.pp-cta,.hx-link-dk,.cta-link):focus-visible{outline-color:#fff}
/* The link's own ring off, both the outline and the token's box-shadow ring (tokens/base.css
   `:focus-visible`), so a focused tile shows one ring, not two. */
.hd .fx-tile a.fx-feat:focus-visible{outline:none;box-shadow:none}
.hd .fx-tile:has(a.fx-feat:focus-visible){outline:2px solid var(--green-700b);outline-offset:3px}

/* 10. Reduced motion: the timeline rows settle with everything else, and nothing lifts. */
@media(prefers-reduced-motion:reduce){
 .hd .hx-tl-r{animation:none}
 .hd .pp-ghost:hover,.hd .hd-close .hd-close-demo:is(:hover,:focus-visible,:active){transform:none}
 .hd .hd-close .hd-close-demo{transition:background-color var(--duration-normal) var(--ease-standard),border-color var(--duration-normal) var(--ease-standard)!important}
 .hd .hx-hero-vis::after{transition:none}
}
