/* ============================================================
   4Wealth Marketing — Accessibility layer (a11y.css)
   WCAG 2.1 AA. Loaded LAST on every page, after menu.css.
   Same pattern as 4wealthfg.com (skip link, focus ring, statement).
   ============================================================ */

/* ---------- 1. Utilities ---------- */
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ---------- 2. Skip link (2.4.1) ---------- */
.skip-link{position:absolute;left:-9999px;top:8px;z-index:10000;background:#0D1B2A;color:#fff;padding:10px 16px;border-radius:6px;text-decoration:none;font-family:var(--sans);font-size:15px;letter-spacing:.04em}
.skip-link:focus{left:8px;outline:2px solid #F0EFE9;outline-offset:3px}
main:focus{outline:none} /* programmatic target only (tabindex=-1), never a tab stop */

/* ---------- 3. Focus visible (2.4.7, 1.4.11) ---------- */
:focus-visible{outline:2px solid #006E69;outline-offset:3px}
/* Dark (navy) and teal surfaces: cream ring */
.site-header :focus-visible,.site-menu :focus-visible,.site-footer :focus-visible,
.hero :focus-visible,.stm :focus-visible,.jr :focus-visible,.band :focus-visible,
.af :focus-visible,.ticker-wrap :focus-visible,.tm :focus-visible,.chap :focus-visible,.ap :focus-visible,
.en__cell--main :focus-visible,.fam__cell--here :focus-visible{outline-color:#F0EFE9}
/* Rows that fill their container: draw the ring inside so it is never clipped */
.au__opt:focus-visible{outline:2px solid #006E69;outline-offset:2px}
.menu-btn:focus-visible{outline:2px solid #F0EFE9;outline-offset:2px}
/* Keep focused elements clear of the 88px sticky header */
html{scroll-padding-top:104px}

/* ---------- 4. Colour contrast (1.4.3, 1.4.11) ---------- */
/* Teal text on cream: #00827E (3.45:1) -> #006E69 (5.31:1). The token is
   re-scoped inside cream sections, so every teal word, number and link there follows. */
.about,.gal,.sv-hero,.sheet--cream,.en,.wk-hero,.wk,.ab-hero,.story,.fd-sec,.fam,
.ct-hero,.ct,.au,.pp-hero,.pp,.as{--teal:#006E69}
.sheet--cream{--acc:#006E69}
/* Teal text on navy footer: #00827E (3.72:1) -> #00A39E (5.58:1) */
.site-footer{--teal:#00A39E}
/* Teal band and cards with light text: background #00827E -> #00605B */
.band,.en__cell--main,.fam__cell--here{--teal:#00605B}

/* Gray text on cream: -> #666560 (5.07:1) */
.eyebrow--dark,.gal__cap-note,.case__num,.rail__label,.rail__n,.rail__item,
.sv-hero__list a b,.fd__num,.au__rail li,.ct__field label,.au__field label,
.ct__note,.au__back,.au__fine,.au__opt small{color:#666560}
.sheet--cream{--dim:#595853} /* receding sheets darken to #DEDEDA: 5.3:1 */
.rail__item.is-on{color:var(--navy)}
.rail__item.is-on .rail__n{color:var(--teal)}
.rail__item:hover{color:var(--navy)}
.au__rail li.is-done{color:rgba(18,18,18,0.6)}
.au__rail li.is-now{color:var(--navy)}
.sv-hero__list:hover a:not(:hover){color:rgba(13,27,42,0.6)}
.sv-hero__list a:hover b{color:var(--teal)}
/* Placeholders and empty selects */
.ct__field input::placeholder,.ct__field textarea::placeholder,.au__field input::placeholder{color:#666560}
.ct__field select:invalid{color:#666560}
/* Errors: #b5532f (4.30:1) -> #A0441F (5.46:1) */
.ct__err,.au__err,.au__senderr,.field-err{color:#A0441F}
/* Input boundaries (1.4.11): rgba(13,27,42,.22) (1.4:1) -> #7A7974 (3.6:1) */
.ct__field input,.ct__field select,.ct__field textarea,.au__field input{border-bottom-color:#7A7974}
.ct__field input:focus,.ct__field select:focus,.ct__field textarea:focus,.au__field input:focus{border-bottom-color:var(--teal)}
.ct__field.is-bad input,.ct__field.is-bad select,.ct__field.is-bad textarea,
[aria-invalid="true"]{border-bottom-color:#A0441F!important}
/* Audit option boxes (state indicator) */
.au__opt::after{border-color:rgba(13,27,42,0.6)}
.au__opt.is-sel::after{border-color:var(--teal);background:var(--teal)}

/* Gray text on navy: -> #8A939C (5.58:1) */
.eyebrow--light,.site-footer__copy,.tm__n,.tm__role,.hero__intro-line--muted{color:#8A939C}
.tm__row.is-on .tm__n{color:var(--teal-bright)}
.tm__row.is-on .tm__role{color:rgba(255,255,255,0.8)}
@media (max-width:860px){.tm__role{color:rgba(255,255,255,0.7)}}
/* Family cards turn navy on hover: teal accent there -> #00A39E */
.fam__cell:hover .fam__name em{color:#00A39E}

/* Scroll-lit words: the unlit floor was 0.14 opacity (1.3:1). Floor raised to 0.52 (3.4:1, large text). */
.scrub .w,.story__text .w{opacity:max(var(--wo,1),0.52)}
.scrub em .w,.story__text em .w{opacity:max(var(--wo,1),0.74)} /* teal words: 3.3:1 */
/* Section hand-off: content no longer dims or fades as it scrolls (it dropped text below 4.5:1) */
.pane{filter:none!important}
.pane__flow{opacity:1!important}

/* ---------- 5. Buttons that used to be other elements ---------- */
.tm__pick{background:none;border:0;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;letter-spacing:inherit;line-height:inherit;cursor:pointer}
.tm__pick em{font-style:italic}
.folder-tabs__tab{font:inherit}

/* ---------- 6. Forms (3.3.1-3.3.3) ---------- */
.form-req{grid-column:1/-1;margin:0;font-family:var(--sans);font-size:14px;color:#666560}
.field-err{display:flex;gap:6px;align-items:baseline;margin:0;font-family:var(--sans);font-size:14px;line-height:1.5}
.field-err[hidden]{display:none}
.field-err::before{content:"!";flex:0 0 auto;display:inline-grid;place-items:center;width:16px;height:16px;border-radius:50%;background:#A0441F;color:#fff;font-size:11px;font-weight:500;line-height:1}
.ct__done h2{margin-top:24px;font-family:var(--serif);font-weight:400;font-size:clamp(44px,5vw,80px);line-height:1;color:var(--navy)}
.ct__done h2 em{font-style:italic;color:var(--teal)}
.ct__done h2:focus,.au__step h2:focus,.au__step h1:focus{outline:none}
.au__err{display:block!important}
.au__err:empty{margin:0!important}
.au__err:not(:empty)::before{content:"! ";font-style:normal;font-weight:500}
.au__count{display:block}
fieldset.au__set{border:0;margin:0;padding:0;min-width:0}
fieldset.au__set>legend{padding:0;float:left;width:100%}
fieldset.au__set>legend+*{clear:both}
.au__title{margin:0 0 6px}

/* ---------- 7. Pause control for the scrolling banner (2.2.2) ---------- */
.ticker-wrap{position:relative}
.motion-toggle{position:absolute;right:clamp(10px,2vw,24px);top:50%;transform:translateY(-50%);z-index:3;width:36px;height:36px;padding:0;border-radius:50%;border:1.5px solid #F0EFE9;background:#0D1B2A;color:#F0EFE9;display:flex;align-items:center;justify-content:center;cursor:pointer}
.motion-toggle:hover{background:#000}
.motion-toggle svg{width:14px;height:14px;display:block}
.motion-toggle .ico-play,.motion-toggle[aria-pressed="true"] .ico-pause{display:none}
.motion-toggle[aria-pressed="true"] .ico-play{display:block}
.motion-paused .ticker__track{animation-play-state:paused!important}

/* ---------- 8. Reveal safety: content shows unless the reveal script confirmed it is running ---------- */
html:not(.js) .reveal{opacity:1;transform:none}
.reveal:focus-within{opacity:1!important;transform:none!important}
@media print{.reveal,.rise{opacity:1!important;transform:none!important;animation:none!important}}

/* ---------- 9. Reduced motion (2.2.2, 2.3.1) ---------- */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-delay:0s!important;animation-iteration-count:1!important;transition-duration:.01ms!important;transition-delay:0s!important;scroll-behavior:auto!important}
  .ticker__track{animation:none!important;transform:none!important}
  .reveal,.rise{opacity:1!important;transform:none!important}
  .motion-toggle{display:none}
}

/* ---------- 10. Reflow & text spacing (1.4.10, 1.4.12) ---------- */
h1,h2,h3,p,li,dd{overflow-wrap:break-word}
@media (max-width:480px){
  .btn,.btn--pill,.btn--onteal{white-space:normal;text-align:center;max-width:100%}
  .af__go,.ct__go,.au__go{max-width:100%}
}

/* ---------- 11. Forced colours (Windows High Contrast) ---------- */
@media (forced-colors:active){
  .menu-btn span{background:ButtonText}
  .rail__item.is-on,.tm__row.is-on{outline:2px solid Highlight}
  .au__opt.is-sel::after{background:Highlight}
}

/* ---------- 12. Footer: link groups are real lists, studio is an <address> ---------- */
.fcol__list{list-style:none;margin:0;padding:0;display:grid;gap:18px;align-content:start}
.fcol__list li{margin:0;padding:0}
.fcol--contact .fcol__list{justify-items:start}
.fcol__addr{font-style:normal;display:grid;gap:18px;align-content:start}
.site-footer__legal[aria-current="page"]{color:#fff}

/* ---------- 13. Decorative ghost numerals/words are drawn by CSS, not page text ---------- */
[data-ghost]::before{content:attr(data-ghost)}
.as__placeholder{background:#FFF3B0;color:#0D1B2A;padding:0 4px}

/* ---------- 14. More contrast fixes found by the pixel scan ---------- */
/* About: quote over the office photo was white on frosted glass (~1.2:1). Shade is
   stronger and fully on whenever the quote is showing (white 8.6:1, teal 3.8:1, large text). */
.ap__shade{background:linear-gradient(to top,rgba(13,27,42,0.9),rgba(13,27,42,0.74))}
.ap.is-lit .ap__shade{opacity:1}
/* Services: receding sheets were tinted navy as the next one slid over (text fell to 4.0:1) */
.sheet::after{display:none}
/* Ticker separators: white 65% (2.9:1) -> white */
.ticker__sep{color:#fff}
/* About: "Inside 4Wealth" caption sits over the photo as it opens (1.1:1). Navy backing, brighter text. */
.ap__cap{left:50%;right:auto;transform:translateX(-50%);width:max-content;max-width:calc(100% - 32px);padding:6px 14px;border-radius:999px;background:rgba(13,27,42,0.88);color:rgba(255,255,255,0.8)}
/* Services: index numbers on the receding sheets (bg down to #DEDEDA, measured per scroll position): #666560 (4.0:1) -> #595853 (5.0:1) */
.ci__n{color:#595853}
.ci:hover .ci__n{color:var(--acc)}
/* Footer "Contact Us" button: a:hover{color:inherit} out-ranked .btn, so its text turned black on navy (1.4:1) on hover */
.site-footer .btn:hover{color:#fff}
