/* ---------- For agencies view (#agencies): markup from tools/ag_markup.py, the Clay calculator in ag.js, the new scenes in
   assets/ag-scenes. The Functions page's build: the Loopgents hero (lg.css: copy left over the painting, a 3:2 live scene on
   the right in the glass rim), the homepage feature cards (features.css) in two bands, then the Clay comparison (#clay-cost)
   and the home FAQ box. The body column (var(--grid-body)) in var(--gut) margins, the site type scale, crayon outlines
   from features.js ([data-crayon]). ---------- */

/* the home view folds away while #agencies is open (as fn.css does for #functions) */
body[data-view="agencies"] #home{position:absolute;top:0;left:0;right:0;height:0;overflow:hidden;visibility:hidden}

/* ---- the Solutions hero, shared by #agencies and #gtm-teams (tools/sol_markup.py; Nick 2026-10-23: light, centred, crayon
   graphics on the sides). On paper (data-paper: the header's on-paper look): badge, H1, lede, the two buttons and the
   small line centred; four transparent crayon illustrations float two a side around the copy, the live scene centred
   below in a paper rim. The art lives in the copy's band (.sol-arts covers .sol-top) and is held out of the copy column
   (--copy wide, plus --gap) by its position and width, so it never covers text or buttons whatever the screen, and each
   piece is at most --mh of the band's height (47% unless the slot table gives a tall piece more), so the two on a side
   never meet:
   >=1200px beside the copy at full size (--w from the generator's slot table), 900-1199px smaller and pushed out to the
   page edges, under 900px gone. Each piece floats on its own slow loop (transform only; loops always play). ---- */
.sol-hero{--copy:700px;--gap:clamp(28px,3vw,48px);position:relative;padding:clamp(124px,10.6vw,164px) var(--gut) 0}
.sol-top{position:relative}
.sol-copy{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;gap:20px;max-width:var(--copy);margin:0 auto;text-align:center}
/* the pixel badge (lg.css's lgp-badge shape) tinted for paper: the page's menu-tile colour, ink dark enough to read */
.sol-badge{--cc:var(--brand);display:inline-flex;align-items:center;gap:9px;height:34px;padding:0 13px 0 10px;border-radius:7px;background:color-mix(in srgb,var(--cc) 10%,#FBFAF7);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--cc) 38%,transparent);color:color-mix(in srgb,var(--cc) 50%,#16141A);font:400 13px/1 var(--pixel);letter-spacing:.08em;text-transform:uppercase;white-space:nowrap}
.sol-badge svg{width:18px;height:18px;flex:none;color:var(--cc)}
.sol-hero h1{max-width:min(12em,100%);margin:2px 0 0;font:500 var(--h1)/1.05 var(--sans);letter-spacing:-.025em;color:#111;text-wrap:balance}
.sol-lede{max-width:640px;margin:0;font:450 clamp(16px,1.3vw,19px)/1.5 var(--sans);color:rgba(0,0,0,.74);text-wrap:pretty}
.sol-ctas{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;margin-top:8px}
.sol-small{margin:-4px 0 0;font:400 14px/1.45 var(--sans);color:var(--fg-60);text-wrap:balance}
/* the live scene: 3:2 on its marble, in a calm paper rim (the dark pages' glass rim, tuned for paper) */
.sol-shot{position:relative;z-index:1;width:min(860px,100%);margin:clamp(48px,4.6vw,72px) auto 0;padding:12px;border-radius:22px;background:rgba(255,255,255,.5);box-shadow:inset 0 0 0 1px rgba(255,255,255,.75),0 0 0 1px rgba(40,30,10,.08),0 40px 72px -44px rgba(80,60,20,.45)}
.sol-shot .f-well{border-radius:12px}
/* the side art: right edge of a left piece at the copy column's edge minus --gap (and --dx, its stagger); its width never
   more than the room left of that line (into the page gutter, 20px short of the screen edge: room for the float's tilt) */
.sol-arts{position:absolute;inset:0;pointer-events:none}
.sol-art{--dx:0px;--room:calc(50% - var(--copy) / 2 - var(--gap) - var(--dx) + var(--gut) - 20px);position:absolute;width:min(var(--w),var(--room));max-width:none;height:auto;max-height:var(--mh,47%);aspect-ratio:var(--ar);object-fit:contain;transform-origin:50% 60%;animation:sol-float var(--t,7s) ease-in-out var(--d,0s) infinite;will-change:transform}
.sol-l1,.sol-l2{right:calc(50% + var(--copy) / 2 + var(--gap) + var(--dx))}
.sol-r1,.sol-r2{left:calc(50% + var(--copy) / 2 + var(--gap) + var(--dx))}
.sol-l1{--dx:28px;top:-2%;--t:7.2s;--d:-1.3s;--r0:-5deg;--r1:-2deg}
.sol-l2{bottom:-2%;--t:8.6s;--d:-5.1s;--r0:2deg;--r1:5deg}
.sol-r1{top:-2%;--t:6.4s;--d:-3.2s;--r0:7deg;--r1:3deg}
.sol-r2{--dx:36px;bottom:-4%;--t:7.9s;--d:-.6s;--r0:-3deg;--r1:-6deg}
@keyframes sol-float{0%,100%{transform:translate3d(0,0,0) rotate(var(--r0,0deg))}50%{transform:translate3d(0,-10px,0) rotate(var(--r1,0deg))}}
@media (max-width:1199px){
  .sol-hero{--copy:640px;--gap:32px}
  /* pinned to the page edges here, so no stagger (--dx would only take width away) */
  .sol-art{--dx:0px;width:min(calc(var(--w) * .66),var(--room))}
  .sol-l1,.sol-l2{right:auto;left:calc(20px - var(--gut))}
  .sol-r1,.sol-r2{left:auto;right:calc(20px - var(--gut))}
}
/* 900-1023px: a narrower copy column (the lede still sets in two lines), so the pieces keep about 100px instead of
   shrinking to 40px specks at 900 */
@media (max-width:1023px){.sol-hero{--copy:560px}}
@media (max-width:899px){.sol-arts{display:none}}
@media (max-width:480px){.sol-ctas{width:100%;flex-direction:column}.sol-ctas .btn{width:100%}}

/* ---- the painted variant (#agencies, Nick 2026-10-24: his juggler-and-roller-coaster painting as the hero background,
   the hero kept centred). A full-bleed band in the painting's sky blue: the copy (white) sits in the sky, the drawing band
   (hero-fig-*, the painting's lower part) underneath at min(100vw, 1440px) wide so the juggler keeps one size from laptop
   to desktop, and a tile of the painting's own plain sky fills everything above and beside it at the same scale as the
   drawing (512 file px of tile = 512 file px of drawing), so the specks run on without a seam. The drawing's top fades in
   over the tiled sky; past 1440px its sides fade too. Phones show the drawing at 175vw, cropped at the sides, so the
   juggler stays readable. No side art and no scene: the testimonials card overlaps the foot of the painting, as on home. ---- */
.sol-hero-paint{padding:0}
.sol-paint{--sky:#0273E7;--fw:min(100vw,1440px);position:relative;isolation:isolate;overflow:hidden;padding-top:clamp(124px,10.6vw,164px);background:var(--sky) var(--tile) 0 0 / calc(var(--fw) * .256) repeat;color:#fff}
.sol-paint .sol-top{padding:0 var(--gut)}
/* a soft halo of clean sky behind the copy, so the painting's white specks don't salt the small text */
.sol-paint .sol-copy::before{content:"";position:absolute;z-index:-1;inset:-48px -18%;background:radial-gradient(closest-side,var(--sky) 62%,color-mix(in srgb,var(--sky) 0%,transparent));pointer-events:none}
.sol-paint h1{color:#fff}
.sol-paint .sol-lede{color:rgba(255,255,255,.9)}
.sol-paint .sol-small{color:rgba(255,255,255,.76)}
.sol-paint .sol-badge{background:rgba(255,255,255,.14);box-shadow:inset 0 0 0 1px rgba(255,255,255,.34);color:#fff}
.sol-paint .sol-badge svg{color:#FFD559}
.sol-fig{display:block;position:relative;z-index:-1;width:var(--fw);margin:calc(var(--fw) * -.02) auto 0}
.sol-fig img{display:block;width:100%;height:auto;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 8%);mask-image:linear-gradient(to bottom,transparent,#000 8%)}
@media (min-width:1441px){.sol-fig img{-webkit-mask-image:linear-gradient(to bottom,transparent,#000 8%),linear-gradient(to right,transparent,#000 6%,#000 94%,transparent);mask-image:linear-gradient(to bottom,transparent,#000 8%),linear-gradient(to right,transparent,#000 6%,#000 94%,transparent);-webkit-mask-composite:source-in;mask-composite:intersect}}
@media (max-width:899px){.sol-paint{--fw:175vw}.sol-fig{margin-left:-37.5vw;margin-top:-16px}}
/* the two product animations on its edges (#agencies, Nick 2026-10-24): left the Waterfalls page's "How waterfalls work"
   (wfHow, full window), right the home page's "No credits, no meter, no limits" (homeFlat), in the Waterfalls hero's style
   (waterfalls.css .wfp-hero-shot): the same glass frame, slimmer (10px for 14px), with the same corners (22px frame,
   12px marble well, so the two radii sit concentric) and the app window on a thin border of the same marble. Each frame is
   glued to its edge of the screen with 40% of it running off, and kept out of the centred copy (the visible part stops
   --clear short of the middle). Only where there is room for them next to the copy: 1200px and up. */
.sol-side{--clear:330px;--off:.4;--sw:min(860px,calc((50vw - var(--clear)) / (1 - var(--off))));position:absolute;z-index:0;top:clamp(150px,12.4vw,200px);width:var(--sw);padding:9px;border-radius:22px;background:rgba(255,255,255,.12);box-shadow:0 40px 80px -40px rgba(0,0,0,.6);pointer-events:none}
.sol-side-l{left:calc(var(--sw) * var(--off) * -1)}
.sol-side-r{right:calc(var(--sw) * var(--off) * -1)}
/* radii nest: frame 22 = marble 13 + 9px of glass; marble 13 = window 8 + a 5px ring of marble */
.sol-mar{position:relative;isolation:isolate;padding:5px;border-radius:13px;background:#8FB9EA var(--marble) center/cover no-repeat;box-shadow:inset 0 0 0 1px rgba(0,0,0,.08)}
.sol-mar::after{content:"";position:absolute;inset:0;z-index:2;border-radius:inherit;pointer-events:none;background:url(assets/site/grain-dark.avif) 0 0/256px 256px;mix-blend-mode:overlay;opacity:.22}   /* the wells' grain (features.css .f-well::after) */
.sol-clip{position:relative;z-index:1;aspect-ratio:var(--ar);overflow:hidden;border-radius:8px;isolation:isolate;box-shadow:0 1px 2px rgba(0,0,0,.12)}
.sol-anim.f-well{max-width:none;border-radius:0;background:none;box-shadow:none}   /* sized and pulled by its inline style; sol-clip rounds it */
.sol-anim.f-well::after{display:none}
/* with the windows beside it, the clean-sky halo stays inside the copy column, so it doesn't veil their inner edges */
@media (min-width:1200px){.sol-hero-paint:has(.sol-side) .sol-copy::before{inset:-40px -2%}}
@media (max-width:1199px){.sol-side{display:none}}

/* ---- the home testimonials card under the painted hero, rising over its foot as on home, holding the proof strip (Nick:
   "use this as a content inside the testimonial"). It rises 96px, not home's 130, so the juggler's face stays clear ---- */
#agencies .agp-trusted{margin-top:-96px}
#agencies .agp-trusted .t-card{padding-top:clamp(30px,3.2vw,44px)}   /* no "Built by" tab here, so no room kept for it */
.agp-proof.agp-proof-card{width:100%;padding:0;text-align:left}   /* over .agp-proof below: the card gives the room */
/* phones: the drawing is small there, so the card only touches its foot. Smaller logos keep a "Built by" line whole at
   360; below that the logo and its comma or period (.agp-lg) wrap under the words together */
@media (max-width:720px){#agencies .agp-trusted{margin-top:-28px}}
@media (max-width:380px){.agp-proof-card .agp-built .agp-hr{height:17px}.agp-proof-card .agp-built .agp-sc{height:19px}}

.agp-badge{--cc:var(--amber)}   /* the Solutions menu's agency tile */

/* ---- proof strip: Dan's sentence on the left, who it's built with on the right, on paper under the hero ---- */
.agp-proof{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);align-items:center;gap:clamp(24px,4vw,64px);width:min(var(--grid-body),calc(100% - var(--gut) * 2));margin:0 auto;padding:clamp(36px,4vw,56px) 0 0}
.agp-quote{display:grid;grid-template-columns:56px minmax(0,1fr);gap:6px 18px;align-items:center;margin:0}
.agp-face{grid-row:1 / 3;width:56px;height:56px;border-radius:50%;object-fit:cover;box-shadow:0 0 0 1px var(--fg-10)}
.agp-quote blockquote{margin:0}
.agp-quote blockquote p{font:500 clamp(17px,1.42vw,20.5px)/1.4 var(--sans);letter-spacing:-.005em;color:#18161D;text-wrap:pretty}
.agp-quote figcaption{display:flex;align-items:center;gap:10px;font:400 14px/1.3 var(--sans);color:var(--fg-60)}
.agp-quote figcaption b{font-weight:500;color:var(--fg-80)}
.agp-quote figcaption img{width:auto;height:14px;filter:grayscale(1);opacity:.7}
.agp-built{display:flex;flex-direction:column;gap:6px;padding:6px 0 6px clamp(24px,4vw,64px);border-left:1px solid var(--fg-10);font:500 15.5px/1.5 var(--sans);color:var(--fg-70)}
.agp-built>span{display:flex;flex-wrap:wrap;align-items:center;gap:0 8px}
/* a logo and its comma or period, one piece: a line never breaks between them (nowrap let the line run off a phone) */
.agp-lg{display:inline-flex;align-items:center;white-space:nowrap}
.agp-built img{display:inline-block;width:auto;height:20px;margin-right:2px;filter:grayscale(1) contrast(1.15);opacity:.8;mix-blend-mode:multiply}
.agp-built .agp-sc{height:22px}
@media (max-width:900px){.agp-proof{grid-template-columns:minmax(0,1fr);gap:22px}.agp-built{padding:20px 0 0;border-left:0;border-top:1px solid var(--fg-10)}}

/* ---- feature bands: the homepage cards under a centred heading ---- */
.agp-band{padding-top:clamp(80px,7.6vw,120px);padding-bottom:0}
.agp-band .lgp-sec-head{margin-bottom:clamp(36px,4vw,56px)}
/* "Priced in dollars, not credits": a pixel tag in the card's colour, under the wallet card's body */
.agp-chip{display:inline-flex;align-items:center;height:26px;padding:0 9px;border-radius:6px;background:color-mix(in srgb,var(--cc) 10%,#FBFAF7);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--cc) 32%,transparent);color:color-mix(in srgb,var(--cc) 58%,#16141A);font:400 12px/1 var(--pixel);letter-spacing:.02em;white-space:nowrap}

/* ---- the Clay comparison (#compare-clay, #compare-clay-teams): the fact table and the "work together" box ---- */
.agp-clay{padding:clamp(96px,8.6vw,136px) var(--gut) 0}
.agp-eyebrow{--cc:var(--brand)}
.agp-clay .lgp-sec-head{margin-bottom:clamp(40px,4.4vw,60px)}

/* the fact strip: Clay a plain column, Loopster's on a light orange band (vs.css's table) */
.agp-facts-wrap{width:min(980px,100%);margin:clamp(48px,5vw,72px) auto 0}
.agp-clay .lgp-sec-head .agp-vslink{margin-top:14px}
/* padding on the inline link: a 42px finger target that leaves the line where it is */
.agp-vslink a{padding:10px 0;font:500 16px/1.4 var(--sans);color:#18161D;text-decoration:underline;text-decoration-thickness:1.5px;text-underline-offset:4px;text-decoration-color:color-mix(in srgb,#18161D 45%,transparent);transition:text-decoration-color .2s}
.agp-vslink a:hover,.agp-vslink a:focus-visible{text-decoration-color:#18161D}
.agp-facts{width:100%;border-collapse:separate;border-spacing:0;font:400 15.5px/1.45 var(--sans)}
.agp-facts :is(th,td){padding:15px 18px;text-align:left;vertical-align:top}
.agp-facts thead :is(th,td){padding-top:16px;padding-bottom:14px;border-bottom:1px solid rgba(0,0,0,.14)}
.agp-facts thead .vs-who{font-size:16px;font-weight:600;color:#111}
.agp-facts thead .vs-mark{width:28px;height:28px;border-radius:7px}
.agp-facts tbody th[scope="row"],.agp-facts thead td{width:24%}
.agp-facts tbody th[scope="row"]{font-weight:500;color:var(--fg-80)}
.agp-facts tbody :is(th,td){border-top:1px solid var(--fg-10)}
.agp-facts tbody tr:first-child>*{border-top:0}
.agp-facts tbody td,.agp-facts thead th{width:38%}
.agp-facts .agp-them{color:var(--fg-70)}
.agp-facts .agp-us{background:color-mix(in srgb,var(--brand) 6%,rgba(255,255,255,.7));font-weight:500;color:#18161D}
.agp-facts thead .agp-th-us{background:linear-gradient(color-mix(in srgb,var(--brand) 9%,transparent),color-mix(in srgb,var(--brand) 9%,transparent)),var(--paper);border-radius:14px 14px 0 0}
.agp-facts tbody tr:last-child .agp-us{border-radius:0 0 14px 14px}
.agp-tag{display:none}

@media (max-width:640px){
  .agp-facts,.agp-facts tbody,.agp-facts tr,.agp-facts th,.agp-facts td{display:block;width:auto}
  .agp-facts thead{display:none}
  .agp-facts tbody tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);margin-bottom:10px;overflow:hidden;border-radius:12px;box-shadow:inset 0 0 0 1px var(--fg-10);background:rgba(255,255,255,.5)}
  .agp-facts tbody th[scope="row"]{grid-column:1 / -1;width:auto;padding:12px 14px 4px;border:0;font-size:15px}
  .agp-facts tbody td{width:auto;padding:8px 14px 12px;border:0;font-size:14.5px}
  .agp-facts tbody tr:last-child .agp-us{border-radius:0}
  .agp-tag{display:block;margin-bottom:4px;font:400 11px/1 var(--pixel);letter-spacing:.06em;text-transform:uppercase;color:var(--fg-60)}
}

/* ---- the Clay comparison (#compare-clay): the fact table, then the /vs/clay page's "work together" box (vs.css), centred ---- */
.agp-together{margin:clamp(28px,3vw,40px) auto 14px}   /* its crayon outline hangs ~10px past the box: the room below keeps it
   inside this section, or the next section's paper (position:relative) paints over the bottom line and breaks it */

/* ---- FAQ: the home FAQ box, without its painting ---- */
.agp-faq{margin-top:clamp(88px,8vw,124px);padding-top:0;padding-bottom:clamp(80px,8vw,120px);border-top:0}


/* ---- the footer's main CTA says the page's line here ("More clients, same price."), with both buttons, over Nick's galaxy
   painting (2026-10-24: assets/site/ag/cta-galaxy-*, index.html .fc-art-ag) instead of the main CTA art. Hidden elsewhere,
   so its lazy image never loads on other pages. The ring sits in the middle, the copy on the dark space below it ---- */
/* (specific enough to beat the site's own picture.pc{display:contents}, which would otherwise show it on every page) */
.foot-cta-main>picture.pc.fc-art-ag{display:none}
body[data-view="agencies"] .foot-cta-main>picture.pc:not(.fc-art-ag){display:none}
body[data-view="agencies"] .foot-cta-main>picture.pc.fc-art-ag{display:contents}
.foot-art-ag{position:absolute;inset:0;z-index:-1;width:100%;height:100%;max-width:none;object-fit:cover;object-position:50% 42%}
.foot-cta-in .fc-ag,.foot-cta-in .fc-ag-ctas{display:none}
body[data-view="agencies"] .foot-cta-main .foot-cta-in>p:not(.fc-ag),body[data-view="agencies"] .foot-cta-main .foot-cta-in>.btn{display:none}
body[data-view="agencies"] .foot-cta-main .foot-cta-in .fc-ag{display:block}
body[data-view="agencies"] .foot-cta-main .foot-cta-in .fc-ag-ctas{display:flex;flex-wrap:wrap;gap:12px}
@media (max-width:720px){body[data-view="agencies"] .foot-cta-main .foot-cta-in .fc-ag-ctas{flex-direction:column;width:100%}}
