/* ═══════════════════════════════════════════════════════════════════
   ACCESSIBILITY LAYER — ת"י 5568 / WCAG 2.0 AA
   ───────────────────────────────────────────────────────────────────
   VISUAL CONTRACT: nothing in this file changes the design for a
   mouse user. Every rule is one of three kinds only:
     1. :focus-visible  → paints a ring for KEYBOARD users only.
     2. screen-reader-only helpers → zero visual footprint.
     3. contrast correction on text that fails WCAG 1.4.3 and is
        literally unreadable (the privacy-policy surface, where the
        plugin ships light-background colours onto a black page).
   No layout, no sizes, no fonts, no spacing, no brand colours.
   ═══════════════════════════════════════════════════════════════════ */

:root {
    /* Focus ring — the site's own gold token, so it reads as "ours". */
    --a11y-ring: var(--c-gold-1, #efdcc3);
}

/* ─────────────────────────────────────────────────────────────────
   1. VISIBLE KEYBOARD FOCUS  (WCAG 2.4.7)
   :focus-visible only — a click never paints a ring.
   ───────────────────────────────────────────────────────────────── */
.site-header a:focus-visible,
.site-header button:focus-visible,
.site-header [role="button"]:focus-visible,
.site-header__social-item:focus-visible,
.site-menu a:focus-visible,
.site-menu button:focus-visible,
.footer a:focus-visible,
.footer button:focus-visible,
.floating-wa:focus-visible,
.mey-tel:focus-visible,
.mey-tel-btn:focus-visible,
.mey-formtel a:focus-visible,
.footer__nagish:focus-visible,
.footer__back-to-top:focus-visible,
.footer__whatsapp:focus-visible,
.testimonials__card-body:focus-visible,
.testimonials__arrow:focus-visible,
.projects__card:focus-visible,
.projects__cta:focus-visible,
.cat-card:focus-visible,
.cat-hero__crumb a:focus-visible,
.crumbs a:focus-visible,
.art-main a:focus-visible,
.art-prose a:focus-visible,
.contact__cta:focus-visible,
.contact__form input:focus-visible,
.contact__form textarea:focus-visible {
    outline: 2px solid var(--a11y-ring);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Pages whose chrome comes from Elementor (header/footer templates,
   privacy-policy menu). Same ring, derived from the local text colour
   so it stays legible on either surface. */
.elementor-location-header a:focus-visible,
.elementor-location-header button:focus-visible,
.elementor-location-footer a:focus-visible,
.elementor-location-footer button:focus-visible,
.elementor-location-popup a:focus-visible,
.elementor-location-popup button:focus-visible,
.elementor-widget-container a:focus-visible,
.pcs a:focus-visible,
.pcs .link:focus-visible,
.pcs button:focus-visible,
#breadcrumbs a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
    border-radius: 2px;
}

/* The skip-link target is focused programmatically (never by Tab),
   so it must not paint a ring when the visitor uses the skip link. */
#content:focus:not(:focus-visible),
main#content:focus {
    outline: none;
}

/* ─────────────────────────────────────────────────────────────────
   2. SCREEN-READER-ONLY  (.sr-only already exists in base.css;
   this is the identical helper under the WP-conventional name so
   markup can use either.)
   ───────────────────────────────────────────────────────────────── */
.mey-sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* ─────────────────────────────────────────────────────────────────
   3. CONTRAST CORRECTIONS  (WCAG 1.4.3)
   ───────────────────────────────────────────────────────────────── */

/* 3a. Footer credit line. On Elementor-chrome pages the global link
   colour (#cc3366) lands on the near-black footer at 3.89:1. The same
   hue, two steps lighter → 4.99:1. On our own templates (.meital-tpl)
   the credits already inherit white, so they are left untouched. */
body:not(.meital-tpl) .footer__credits a {
    color: #d8527f;
}

/* NOTE: deliberately NOT ".footer__credits a strong" — footer.css paints the
   "Digitouch" credit white on mobile, and overriding it here turned it pink.
   Left alone, it keeps exactly the colour it has today (white on mobile at
   18:1, the lifted hue on desktop). */

/* 3b. PRIVACY-POLICY SURFACE.
   The privacy-policy page is rendered by the Privacy Compliance Suite
   plugin, whose stylesheet is written for a WHITE page (#373737 text,
   #333 breadcrumb). This site's page surface is black, so that text
   lands at 1.76:1 — unreadable. We repaint the TEXT ONLY, using the
   site's own tokens; the background, fonts, sizes and layout are
   untouched.
   NOTE: the right long-term home for this is the plugin itself (a
   dark-surface variant). Kept here, at site level, so a plugin update
   cannot silently re-break the page. */
.pcs,
.pcs p,
.pcs li,
.pcs ul,
.pcs ol,
.pcs span,
.pcs strong,
.pcs em,
.pcs td,
.pcs th,
.pcs .title,
.pcs .description,
.pcs h2,
.pcs h3,
.pcs h4,
.pcs h5,
.pcs h6,
.pcs .pcs-toc .name,
.pcs .pcs-toc .item,
.pcs .pcs-toc .link,
.pcs .pcs-toc .number,
.pcs #breadcrumbs,
.pcs #breadcrumbs span,
.pcs .breadcrumb_last {
    color: var(--c-text, #ffffff) !important;
}

/* Links on that surface: same hue, lifted to 5.43:1 on black, and
   underlined so they are not distinguished by colour alone
   (WCAG 1.4.1 — axe `link-in-text-block`). */
.pcs a,
.pcs #breadcrumbs a,
.pcs .pcs-toc a {
    color: #d8527f !important;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* A long un-breakable URL inside the policy text (a facebook.com
   privacy link) was 354px wide and pushed the page 50px past a 320px
   screen. Breaking long links only has an effect once they no longer
   fit, so wider screens are unchanged. (WCAG 1.4.10) */
.pcs a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* ─────────────────────────────────────────────────────────────────
   4. SKIP LINK — relocated to the top of <body> (see meital-a11y.php)
   so it is the first stop in the Tab order without a positive
   tabindex. The plugin's own off-screen positioning is kept; we only
   pin the horizontal side so an off-screen element can never widen
   the viewport on a narrow screen.
   ───────────────────────────────────────────────────────────────── */
a.pojo-skip-link {
    inset-inline-start: 0;
    inset-inline-end: auto;
}

/* 3c. The table-of-contents panel inside the policy is the one surface on
   that page with a LIGHT background (#f6f6f6) shipped by the plugin, so the
   repaint above must not reach it — its text stays the plugin's own dark
   grey (11:1 on that panel), exactly as it looks today. */
.pcs .pcs-toc,
.pcs .pcs-toc *,
.pcs .pcs-toc .name,
.pcs .pcs-toc .accordion,
.pcs .pcs-toc .item,
.pcs .pcs-toc .link,
.pcs .pcs-toc .number {
    color: #373737 !important;
}

.pcs .pcs-toc a {
    color: #9c2b50 !important;   /* 6.76:1 on #f6f6f6 */
}
