/* motion.css - Atlas Minds scroll motion layer (2026-11-16). Loaded last among the site's stylesheets.

   THE SYSTEM (seven named pieces, nothing else moves):
     M1 READING LINE   a 2px gold line across the very top that fills as you read (body::after).
     M2 HERO ARRIVAL   on load, the hero's pieces arrive in a short stagger (time-based, under 1.2s).
     M3 HERO DEPARTURE desktop: as you scroll away, the hero words lift and fade while the picture
                       lags behind (two speeds = depth).
     M4 RISE           headings, intro lines and blocks rise a short way and fade in, tied to the
                       scroll position, finished while still in the lower third of the screen.
     M5 CASCADE        rows of cards arrive one after another, each rising from a 0.96 scale.
     M6 TABLE          the signature moment: demo-site previews are "laid out on a table" (homepage
                       #demo-builds; small-business #work viewer), screenshots open up from a rounded
                       inset and glide a few percent slower than their frames. Pricing ends with the
                       "draft before you pay" band wiping in.
     M7 HAIRLINE       a gold line draws along a section's top border as it arrives, then dissolves
                       back into the existing faint border.  Final call to action: the heading
                       settles from 0.97 scale.

   RULES THIS FILE KEEPS
   - Engine: native CSS scroll-driven animations (animation-timeline: view()/scroll()). No library,
     no scroll hijacking: the page scrolls at normal speed with the normal scrollbar.
   - Only opacity, clip-path and the individual transform properties `translate` and `scale` are
     animated. Individual properties compose with the site's own `transform` (hover lifts, the
     rotated website stack) instead of overwriting them.
   - Every entrance uses animation-fill-mode BACKWARDS (never forwards/both): before its range the
     element shows the start frame, after its range the animation stops applying, so at rest every
     element is back to its own stylesheet values, exactly as it sits today. The only `both` is M1,
     which is a decorative line this file creates.
   - Hidden start states exist only (a) inside @supports (animation-timeline: view()) where the
     browser itself drives them to visible, or (b) under html.motion-io, a class motion.js adds
     only when it is running the fallback. No script = nothing hidden by this file.
   - prefers-reduced-motion: reduce -> this whole layer is off (everything sits inside
     @media (prefers-reduced-motion: no-preference)). Print is untouched (screen only).
   - Scroll containers: view() follows the NEAREST scrolling ancestor, and overflow:hidden counts.
     So anything inside .final-cta, .hero, .ws-frame, .service-card, a sideways swipe row, etc.
     uses a NAMED timeline declared on a box whose own scroller is the page.
   - Phones (<768px) keep entrances with shorter distances; desktop-only (>=1101px, the site's
     own layout breakpoint) are parallax, the hero departure, the signature and card cascades.

   WHO OWNS .reveal / .section-block (the inline scripts add .visible to them):
   - Browsers with scroll-driven animations: THIS FILE. It pins their static state to visible
     (opacity 1, transform none) and draws the entrance itself, so the inline .visible switch has
     nothing left to change (no second fade). repairs.css section 6 is zero-specificity there.
   - Other browsers (Firefox today): the inline script + repairs.css section 6 timer fail-safe,
     unchanged. motion.js only animates elements that are NOT .reveal.
   - Excluded on purpose: .bundle-card (signl-select; its own script stages it with .show),
     .tl-step / .flow-node / demo widgets (script-driven, never touched). */

:root{--mo-ease:cubic-bezier(.16,1,.3,1);--mo-d:28px;--mo-s:.96}
@media (max-width:767px){:root{--mo-d:16px;--mo-s:.98}}

@keyframes mo-rise{from{opacity:0;translate:0 var(--mo-d)}to{opacity:1;translate:0 0}}
@keyframes mo-card{from{opacity:0;translate:0 var(--mo-d);scale:var(--mo-s)}to{opacity:1;translate:0 0;scale:1}}
@keyframes mo-slide{from{opacity:0;translate:24px var(--mo-d);scale:var(--mo-s)}to{opacity:1;translate:0 0;scale:1}}
@keyframes mo-table{from{opacity:0;translate:0 calc(var(--mo-d) * 1.4);scale:.92}to{opacity:1;translate:0 0;scale:1}}
@keyframes mo-settle{from{scale:.92}to{scale:1}}
@keyframes mo-open{from{clip-path:inset(7% 7% 7% 7% round 14px)}to{clip-path:inset(0% 0% 0% 0% round 0px)}}
/* scale 1.06 about the centre + 3% down keeps the image's top edge exactly on the frame's top edge */
@keyframes mo-glide{from{translate:0 3%;scale:1.06}to{translate:0 0;scale:1}}
@keyframes mo-wipe{from{clip-path:inset(0% 100% 0% 0%)}to{clip-path:inset(0% 0% 0% 0%)}}
@keyframes mo-cta{from{opacity:0;translate:0 calc(var(--mo-d) * .75);scale:.97}to{opacity:1;translate:0 0;scale:1}}
@keyframes mo-lift{from{opacity:1;translate:0 0}to{opacity:.25;translate:0 -48px}}
@keyframes mo-sink{from{translate:0 0}to{translate:0 56px}}
@keyframes mo-draw{0%{opacity:1;scale:0 1}70%{opacity:1;scale:1 1}100%{opacity:0;scale:1 1}}
@keyframes mo-progress{from{scale:0 1}to{scale:1 1}}
/* 2026-11-17: hero WORDS slide only, they never fade in from nothing. A fade from opacity 0 made the browser wait
   until the headline had faded in before it counted the main content as shown (about 0.65s on /small-business,
   1s on /company). Now the words are readable on the very first frame and only drift up into place.
   2026-11-18: the same now goes for the PICTURE in a hero (mo-hero-frame). On the homepage, the 16 trade pages and
   the 5 articles that picture is the main content, and its fade from opacity 0 made Chrome count the main content a
   full second late (delay .2s + fade .8s): measured gap between first paint and main content 964 to 1072 ms on all
   22 pages, 0 ms with this change. The picture still rises and settles (translate + scale); it is simply never
   invisible. Do not put opacity back in this keyframe. */
@keyframes mo-hero-in{from{translate:0 calc(var(--mo-d) * .8)}to{translate:0 0}}
@keyframes mo-hero-frame{from{translate:0 var(--mo-d);scale:.97}to{translate:0 0;scale:1}}

@media screen and (prefers-reduced-motion:no-preference){

/* ===== M2 HERO ARRIVAL (time-based, every browser, no script needed) ======================
   Replaces the old whole-block heroIn (60px / 40px rise) with a per-piece stagger. Plays once;
   fill backwards only, so after ~1.2s nothing is left applied. */
/* homepage */
.hero-content,.hero-visual{animation:none}
.hero-content>.hero-tag,.hero-content>h1>span,.hero-content>.hero-sub,.hero-content>.hero-actions{animation:mo-hero-in .8s var(--mo-ease) backwards}
.hero-content>.hero-tag{animation-delay:.05s}
.hero-content>h1>span:first-child{animation-delay:.12s}
.hero-content>h1>span:nth-child(2){animation-delay:.2s}
.hero-content>.hero-sub{animation-delay:.28s}
.hero-content>.hero-actions{animation-delay:.36s}
.hero-visual>.hv-frame{animation:mo-hero-frame .85s var(--mo-ease) .22s backwards}
.hero-visual>.hv-app{animation-delay:.35s}
/* small-business (.hero-in pieces keep their order; the feed panel follows) */
.hero-in{animation:mo-hero-in .8s var(--mo-ease) backwards}
.hero-in.d2{animation-delay:.1s}
.hero-in.d3{animation-delay:.2s}
.hero-in.d4{animation-delay:.3s}
.proof.hero-in.d4{animation-delay:.38s}
.hero .feed{animation:mo-hero-frame .85s var(--mo-ease) .3s backwards}
/* trade pages, /websites, /blog: the same .hero-in pieces; trades.css's own tr-in fades from 0, so the words use the
   slide above and only the website picture beside them keeps a fade */
.hero-shot.hero-in{animation-name:mo-hero-frame}
/* company / difference / privacy (.page-hero) and signl-select (.product-hero) */
.page-hero{animation:none}
.page-hero>*,.product-hero>:not(.hero-orbs){animation:mo-hero-in .8s var(--mo-ease) backwards}
.page-hero>:nth-child(1),.product-hero>:nth-child(2){animation-delay:.05s}
.page-hero>:nth-child(2),.product-hero>:nth-child(3){animation-delay:.13s}
.page-hero>:nth-child(3),.product-hero>:nth-child(4){animation-delay:.21s}
.page-hero>:nth-child(4),.product-hero>:nth-child(5),.product-hero>:nth-child(6){animation-delay:.29s}

/* ===== FALLBACK (no scroll-driven animations, e.g. Firefox) ===============================
   motion.js adds .mo-t to below-the-fold targets that are NOT .reveal, then html.motion-io,
   then .is-inview as each scrolls in. Without motion.js none of these classes exist. */
.motion-io .mo-t{transition:opacity .7s var(--mo-ease),translate .7s var(--mo-ease)}
.motion-io .mo-t:not(.is-inview){opacity:0;translate:0 18px}
.motion-io .ws-item.mo-t:nth-child(2),.motion-io .ws-head>.mo-t:nth-child(2),.motion-io .team-card.mo-t:nth-child(2){transition-delay:.07s}
.motion-io .ws-item.mo-t:nth-child(3),.motion-io .ws-head>.mo-t:nth-child(3){transition-delay:.14s}
.motion-io .ws-item.mo-t:nth-child(4){transition-delay:.21s}
.motion-io .ws-item.mo-t:nth-child(5){transition-delay:.28s}
/* the demo-build tiles swipe sideways on phones: never hide a card that sits off to the side */
@media (max-width:699px){.motion-io .ws-item.mo-t:not(.is-inview){opacity:1;translate:none}}

} /* end reduced-motion / screen */


/* ===== NATIVE SCROLL-DRIVEN LAYER =========================================================
   Only browsers that understand animation-timeline read anything below. Ranges: the first
   animation-range is a percentage form, the second (lengths) overrides it where supported, so
   an older parser keeps a sane range instead of the default "whole cover range". Standard
   entrance = starts when the element's top edge enters, done 28vh later (top edge still in
   the lower third of the screen). */
@supports (animation-timeline:view()){
@media screen and (prefers-reduced-motion:no-preference){
/* 2026-11-17: the scroll-LINKED entrances that used to live here (mo-rise / mo-card / mo-slide / mo-cta /
   mo-wipe on .reveal, cards, tiles and timeline items) were removed. They tied a block's opacity to the scroll
   position, so anything sitting in the bottom third of a short window stayed half see-through while you read it
   (the faded "03" card on the homepage). Entrances are now the timed kind in every browser: the pages' own
   .reveal -> .visible transition, and motion.js marking the rest (.mo-t -> .is-inview). What stays below is
   scroll-linked on purpose and never fades text: the reading line, the hero drift, image glides, section rules. */

/* M1 READING LINE: sits above the nav (z 1000) without catching clicks */
body::after{content:'';position:fixed;top:0;left:0;right:0;height:2px;z-index:1001;background:var(--gold);transform-origin:0 50%;scale:0 1;pointer-events:none;animation:mo-progress linear both;animation-timeline:scroll(root block)}

/* M4 RISE: takes over .reveal / .section-block (see header). Static state pinned visible, so if a
   timeline is ever inactive the element simply shows. :where() keeps this at (0,1,0) so hover
   transforms such as .role-card:hover still win. */
/* non-.reveal targets (the fallback script covers these same elements) */
.ws-head>:nth-child(2){animation-range:entry 3% cover 27%;animation-range:entry 3vh entry 31vh}
.ws-head>:nth-child(3){animation-range:entry 6% cover 29%;animation-range:entry 6vh entry 34vh}

/* Final call to action: .final-cta is overflow:hidden (a scroller), so its children follow the
   section's own named timeline. The heading settles from 0.97. */
.final-cta{view-timeline:--mo-cta block}
.final-cta a.reveal{animation-range:entry 24% cover 32%;animation-range:entry 16vh entry 42vh}

/* M6 pricing promise: the "draft before you pay" band wipes in left to right (replaces its rise) */

/* Sideways swipe rows on phones: children use the row's timeline (the row itself scrolls). */
@media (max-width:900px){
  .smb-pains .pains{view-timeline:--mo-pains block}
}
@media (max-width:1100px){
}
@media (max-width:699px){
  .ws-item{animation:none}
}

/* M7 HAIRLINE: drawn over sections that already have a 1px top border. position:relative adds no
   offset (layout unchanged); every absolutely positioned child in these sections already has a
   positioned parent of its own. The line rests at opacity 0, so at rest the page is as before. */
.work-strip,.roles,.products-section,.process,.custom-section,.alt{position:relative}
.work-strip::after,.roles::after,.products-section::after,.process::after,.custom-section::after,.alt::after{content:'';position:absolute;top:-1px;left:0;right:0;height:1px;background:var(--gold-deep);transform-origin:0 50%;opacity:0;pointer-events:none;animation:mo-draw linear backwards;animation-timeline:view();animation-range:entry 0% cover 20%;animation-range:entry 0% entry 36vh}

/* ===== DESKTOP ONLY (>=1101px, the site's own 3-4 column breakpoint) ===================== */
@media (min-width:1101px){

  /* M3 HERO DEPARTURE: words lift and fade, picture lags (the hero clips, so nothing spills) */
  .hero{view-timeline:--mo-hero block}
  .hero-content,.hero-grid>div:first-child{animation:mo-lift linear none;animation-timeline:--mo-hero;animation-range:exit 0% exit 100%}
  .hero-visual{animation:mo-sink linear none;animation-timeline:--mo-hero;animation-range:exit 0% exit 100%}
  .hero .feed{animation:mo-hero-frame .85s var(--mo-ease) .3s backwards,mo-sink linear none;animation-timeline:auto,--mo-hero;animation-range:normal,exit 0% exit 100%}

  /* M5 CASCADE: cards in one row share a top edge, so offsetting each card's range staggers them */
  .role-grid>:nth-child(2),.services-grid>:nth-child(2),.trust-grid>:nth-child(2),.price-grid>:nth-child(2),.pains>:nth-child(2),.team-grid>:nth-child(2){animation-range:entry 5% cover 28%;animation-range:entry 4vh entry 32vh}
  .role-grid>:nth-child(3),.services-grid>:nth-child(3),.trust-grid>:nth-child(3),.price-grid>:nth-child(3),.pains>:nth-child(3){animation-range:entry 10% cover 31%;animation-range:entry 8vh entry 36vh}
  .services-grid>:nth-child(4){animation-range:entry 15% cover 34%;animation-range:entry 12vh entry 40vh}
  /* follow-up timeline: the five steps cascade instead of the row fading as one block */
  .smb-followups .tl.reveal{animation:none}
  .smb-followups .tl-item:nth-child(3){animation-range:entry 5% cover 28%;animation-range:entry 4vh entry 32vh}
  .smb-followups .tl-item:nth-child(4){animation-range:entry 10% cover 31%;animation-range:entry 8vh entry 36vh}
  .smb-followups .tl-item:nth-child(5){animation-range:entry 15% cover 34%;animation-range:entry 12vh entry 40vh}
  .smb-followups .tl-item:nth-child(6){animation-range:entry 20% cover 37%;animation-range:entry 16vh entry 44vh}

  /* Inner glide on card images: each frame clips (overflow:hidden), so the image follows the
     frame's own named timeline and is back to identity by the time the frame is mid-screen. */
  .ws-frame,.service-card{view-timeline:--mo-frame block}
  .ws-item:not(.ws-featured) .ws-frame img,.service-card .svc-media img{animation:mo-glide linear backwards;animation-timeline:--mo-frame;animation-range:cover 0% cover 55%}

  /* M6 TABLE, homepage #demo-builds: the featured preview settles from 0.92 while its screenshot
     opens from a rounded inset; the four smaller tiles slide in after it, in reading order. */
  .ws-list{view-timeline:--mo-ws block}
  .ws-featured .ws-frame{animation:mo-settle linear backwards;animation-timeline:--mo-ws;animation-range:entry 0% cover 28%;animation-range:entry 0% entry 36vh}
  .ws-featured .ws-view img{animation:mo-open linear backwards,mo-glide linear backwards;animation-timeline:--mo-ws,--mo-frame;animation-range:entry 4% cover 32%,cover 0% cover 55%;animation-range:entry 4vh entry 40vh,cover 0% cover 55%}
  .ws-item:nth-child(3){animation-range:entry 10% cover 31%;animation-range:entry 8vh entry 34vh}
  .ws-item:nth-child(4){animation-range:entry 20% cover 36%;animation-range:entry 16vh entry 46vh}
  .ws-item:nth-child(5){animation-range:entry 25% cover 39%;animation-range:entry 20vh entry 50vh}

  /* M6 TABLE, small-business #work: the whole viewer settles from 0.92, the preview screen opens */
  .smb-work .viewer{view-timeline:--mo-viewer block}
  .smb-work .screen{animation:mo-open linear backwards;animation-timeline:--mo-viewer;animation-range:entry 4% cover 34%;animation-range:entry 4vh entry 46vh}
}

} /* end reduced-motion / screen */
} /* end @supports */
