/* TRADE (designer 2026-11-16, brief qc-demo-trade). Loaded after bar.css. Three things, each separable:
   1. a palette per trade on html[data-trade] (build sets it from site.trade, default garden; ?trade= overrides):
      the ground AND the accent change ("instead of gold and black", Austin 11-16). --gold/--gold-hi keep their
      names and now mean "the trade accent". Every literal gold/brown in craft.css + bar.css is re-pointed here.
   2. the ring on the 4.9 (.ring, its own SVG), closing to 98% = 4.9 of 5.
   3. ONE button (curator 11-16 pick: B3 pill + B2 layout), same markup and boxes, so the fold check is untouched.
   4. the polish list (curator 11-16 M1-M5, T1-T4). */

/* ---------- 1. palettes ---------- */
html, html[data-trade="garden"] { /* hedge at dusk: forest ground, new-leaf accent */
  --ground: #0b1a10; --lift: #183420; --banner: #0f2215; --toast: #15291b;
  --ink: #EEF2E6; --ink-2: #CCD6C3; --ink-3: #A5B39C; --hair: rgba(238, 242, 230, .10);
  --gold: #8FCB5A; --gold-hi: #B4E27F; --act-ink: #0c2111; --act-lo: #5E9636; --act-glow: rgba(143, 203, 90, .45); }
html[data-trade="painter"] { /* Prussian blue ground, wet-paint coral */
  --ground: #0c1126; --lift: #1b2550; --banner: #10173a; --toast: #182046;
  --ink: #F2EFEA; --ink-2: #D1CEDA; --ink-3: #ABAAC2; --hair: rgba(242, 239, 234, .10);
  --gold: #FF8A5C; --gold-hi: #FFB08C; --act-ink: #2a0f05; --act-lo: #D9603A; --act-glow: rgba(255, 138, 92, .45); }
html[data-trade="electrician"] { /* steel-graphite ground, arc blue */
  --ground: #10151b; --lift: #233140; --banner: #151b23; --toast: #1c2530;
  --ink: #EEF3F8; --ink-2: #C9D3DE; --ink-3: #A0AEBF; --hair: rgba(238, 243, 248, .10);
  --gold: #4FC3FF; --gold-hi: #92DCFF; --act-ink: #031a2b; --act-lo: #2593D0; --act-glow: rgba(79, 195, 255, .45); }
html[data-trade="cleaner"] { /* deep teal ground, fresh aqua */
  --ground: #06201f; --lift: #0f3b39; --banner: #0a2a29; --toast: #10332f;
  --ink: #EDF6F3; --ink-2: #C7DAD5; --ink-3: #9FB8B1; --hair: rgba(237, 246, 243, .10);
  --gold: #5FE0C8; --gold-hi: #9DF0E0; --act-ink: #032420; --act-lo: #2DAF98; --act-glow: rgba(95, 224, 200, .45); }
html { background: var(--ground); }
.demo-banner { background: var(--banner); }
.header { background: color-mix(in srgb, var(--ground) 88%, transparent); }
.callbar { background: color-mix(in srgb, var(--ground) 95%, var(--ink)); }
.demo-toast { background: var(--toast); }
.num { text-shadow: 0 0 calc(30 * var(--u)) color-mix(in srgb, var(--ink) 18%, transparent); }
.map .chips li.is-base::before { box-shadow: 0 0 calc(16 * var(--u)) var(--act-glow); }
@keyframes bar-glow { from { box-shadow: 0 0 calc(10 * var(--u)) var(--act-glow); } to { box-shadow: 0 0 calc(22 * var(--u)) var(--gold); } }

/* ---------- 2. THE RING (Austin 11-16 "potentially add a ring"; ref1 9.43-9.8 the ring on the cut) ----------
   A thin ring round the figure, the leader's weight (1.4 px), in the accent; it closes to 98% because the
   figure is 4.9 of 5. The shears pass in front of it (it sits in .num, under .cut). */
.num__v { position: relative; display: inline-block; }
/* apply pass (curator 11-16 item 3): a 3 px knockout in the ground round the glyphs, so the ring passes BEHIND the
   figure with a gap and never touches a glyph pixel (stroke 6 px centred on the outline, painted under the fill) */
.num__v { -webkit-text-stroke: 6px var(--ko, var(--ground)); paint-order: stroke fill; }
.ring { position: absolute; left: calc(50% + 5 * var(--u)); top: 54%; width: calc(250 * var(--u)); height: calc(136 * var(--u)); transform: translate(-50%, -50%) rotate(-7deg); overflow: visible; pointer-events: none; z-index: -1; }
.ring ellipse { fill: none; stroke: var(--gold); stroke-width: 2px; vector-effect: non-scaling-stroke; stroke-linecap: round; } /* apply pass: rest 2 px, full accent */
.ring__arc { stroke-dasharray: .98 1; }
.ring__flash { opacity: 0; transform-box: fill-box; transform-origin: center; }
/* motion (html.mo only, so reduced motion shows the closed ring). M2 + ring, frame-locked to ref1 9.43-9.8: on the
   cut frame +2 (33 ms) a full ring stands just outside the mark and is gone by frame 4 (ring__flash, same clock as
   bar-halo); then the arc draws round in step with the count (0.7 s, the tick's cubic-out) to 98% = 4.9 of 5. */
@keyframes ring-draw { from { stroke-dashoffset: .98; } to { stroke-dashoffset: 0; } }
@keyframes ring-flash { 0%, 15% { opacity: 0; transform: scale(1.1); stroke-width: 3px; } 16%, 24% { opacity: .95; transform: scale(1.08); stroke-width: 3px; } 25%, 100% { opacity: 0; transform: scale(1.02); stroke-width: 2px; } }
html.mo .ring__arc { animation: ring-draw .7s cubic-bezier(.33, 1, .68, 1) .3s both; }
html.mo .ring__flash { animation: ring-flash .4s linear .3s both; }
/* the tap burst takes the trade's accent */
.burst i { background: var(--c, var(--gold-hi)); }
.burst b { background: radial-gradient(circle, #fff 0 56%, color-mix(in srgb, #fff 60%, var(--gold-hi)) 62%, var(--c, var(--gold-hi)) 67%, transparent 72%); }


/* ---------- 3. THE BUTTON (curator 11-16: B3's pill with B2's layout; webloved ref: label left, a solid circle
   holding the icon at the right edge). 4 px inset circle of 40 px; no outer rim, no shadow ring. ---------- */
.btn--call, .btn--light, .btn--ghost, .callbar a { text-shadow: none; }
.btn--call::before, .btn--light::before, .btn--call::after, .btn--light::after { display: none; }
.btn { border-radius: 999px; justify-content: space-between; gap: 12px; padding: 0 4px 0 24px; letter-spacing: .01em; font-size: 15px; }
.btn svg, .callbar a[data-call] svg { display: block; order: 2; flex: none; box-sizing: content-box; width: 18px; height: 18px; padding: 11px; border-radius: 50%; }
.btn--small { padding-left: 16px; } .btn--small svg { padding: 7px; }
.btn--call, .btn--light, .contact .btn--call { color: var(--act-ink); background: var(--gold); box-shadow: none; }
.btn--call svg, .btn--light svg, .callbar a[data-call] svg { background: var(--ground); color: var(--gold); }
/* the second action: the same pill as a ghost, a 1 px hairline (ink 18%), the circle ink 10%: a surface, not bare words */
.btn--ghost, .contact .btn--ghost { color: var(--ink); background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 18%, transparent); font-size: 15px; }
.btn--ghost svg { background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink); }
.btn:hover { filter: brightness(1.07); }
/* the call bar stays a full-bleed split; Call keeps its accent fill (r5 B3 lost it) and only Call wears the circle */
.callbar a { border-radius: 0; }
.callbar a[data-call] { background: var(--gold); color: var(--act-ink); justify-content: space-between; padding: 0 8px 0 24px; }
.callbar a:not([data-call]) { color: var(--ink); }
.callbar svg { width: 18px; height: 18px; }
/* press: the circle nudges 4 px right (bar.js scales the pill to .98 on the same 200 ms curve) */
html.mo .btn svg, html.mo .callbar a[data-call] svg { transition: transform .2s cubic-bezier(.2, 0, 0, 1); }
.btn:active svg, .callbar a[data-call]:active svg { transform: translateX(4px); }

/* ---------- 4. POLISH (curator 11-16, ranked list; each line in the run file) ---------- */
/* scene rhythm 64 + 52 (r5 P1), kept even; M2 below takes out the one uneven gap */
.scene { padding: calc(64 * var(--u)) 0 calc(52 * var(--u)); }
.map__ring { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) calc((26 - var(--r) * 6) * 1%), transparent); }
.contact__actions .btn { min-height: 56px; }
/* T1 the section index, one per section, in the existing mono; it takes the old "Example reviews" tag's slot */
.idx { font: 400 19px/1.05 var(--spec); text-transform: uppercase; letter-spacing: 0; color: var(--ink-3); margin: 0 0 calc(12 * var(--u)); }
.rv h2 { margin-bottom: calc(28 * var(--u)); }
/* M3 reviews on one left edge */
.review:nth-child(2) { margin-left: 0; }
/* M4 hairlines (1 px, ink 10%) between rows: FAQ, the service sub-list, contact hours */
.faq { gap: 0; }
.faq details + details { border-top: 1px solid var(--hair); }
.board-plain { row-gap: 0; }
.board-plain li { padding: calc(14 * var(--u)) 0; }
.board-plain li + li { border-top: 1px solid var(--hair); }
.contact dl { row-gap: 0; }
.contact dt, .contact dd { padding: 10px 0; border-top: 1px solid var(--hair); }
.contact dt:first-of-type, .contact dd:first-of-type { border-top: 0; }
/* M5 row press: 6 px right, the label and plus to the accent, 200 ms */
html.mo .faq summary, html.mo .board-plain li, html.mo .board-plain h3 { transition: transform .2s cubic-bezier(.2, 0, 0, 1), color .2s cubic-bezier(.2, 0, 0, 1); }
.faq summary:active, .board-plain li:active { transform: translateX(6px); }
.faq summary:active, .board-plain li:active h3 { color: var(--gold); }
/* T2 two tone shifts only: Reviews on a lifted ground (+6% ink); Contact (and the footer under it) on a deep wash
   of the trade accent (18% over the ground), the ref's crimson footer */
.rv { background: radial-gradient(ellipse 85% 46% at 32% 34%, color-mix(in srgb, var(--lift) 94%, var(--ink)), color-mix(in srgb, var(--ground) 94%, var(--ink)) 74%); }
.contact { background: radial-gradient(ellipse 85% 50% at 30% 40%, color-mix(in srgb, var(--gold) 24%, var(--ground)), color-mix(in srgb, var(--gold) 18%, var(--ground)) 74%); }
.footer { background: color-mix(in srgb, var(--gold) 18%, var(--ground)); }
/* T4 every reveal below the hero is a quiet fade-rise (the scramble stays on the hero spec labels) */
@keyframes qc-rise { from { opacity: 0; transform: translateY(calc(12 * var(--u))); } to { opacity: 1; transform: none; } }
html.mo [data-m="rise"]:not(.in), html.mo [data-m="title"]:not(.in) { opacity: 0; }
html.mo [data-m="rise"].in, html.mo [data-m="title"].in { animation: qc-rise .6s cubic-bezier(.2, .8, .2, 1) both; }
/* M1/M2 the about photo's top 20% is masked to nothing, so Services -> About read ~60 px emptier than every other
   scene gap (r5 frame 6 s): the photo rides up under Services' bottom padding by that amount */
.ab__photo { margin-top: calc(-56 * var(--u)); z-index: 1; }
/* M1 the map was the last near-empty frame in the r6 capture (14 s): the suburbs start 80 ms after entry, not 200 */
html.mo .map.in .chips li { animation-delay: calc(var(--i, 0) * 40ms + 80ms); }
