/* ══════════════════════════════════════════════════════════════════════════
   PEC PM EXPERTS — ACCESSIBILITY STYLES
   ══════════════════════════════════════════════════════════════════════════ */

/* ── SKIP LINK ── */
.pec-skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    z-index: 99999;
    padding: 12px 24px;
    background: #F5A623;
    color: #000000;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 0 0 8px 0;
    text-decoration: none;
    transition: top 0.2s ease;
}
.pec-skip-link:focus {
    top: 0;
    outline: 3px solid #000;
    outline-offset: 2px;
}

/* ── FOCUS VISIBLE ── */
*:focus-visible {
    outline: 3px solid #F5A623;
    outline-offset: 3px;
    border-radius: 2px;
}
*:focus:not(:focus-visible) {
    outline: none;
}

/* ── ACCESSIBILITY TOOLBAR WRAPPER ── */
.pec-a11y-toolbar {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

/* ── COLLAPSED BUTTONS (icon only) ── */
.pec-a11y-toolbar button {
    display: flex;
    align-items: center;
    gap: 0px;
    overflow: hidden;
    width: 44px;
    height: 44px;
    padding: 0 13px;
    background: #1A1A1A;
    border: 1px solid rgba(245, 166, 35, 0.5);
    border-radius: 22px;
    color: #FFFFFF;
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: width 0.3s ease, padding 0.3s ease,
                background 0.2s, border-color 0.2s,
                color 0.2s, gap 0.3s ease;
    box-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

/* ── LABEL (hidden when collapsed) ── */
.pec-a11y-toolbar button .btn-label {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-width 0.3s ease;
    font-size: 0.88rem;
    font-weight: 600;
    pointer-events: none;
}

/* ── ICON ── */
.pec-a11y-toolbar button .btn-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
}

/* ── EXPANDED STATE (hover or focus) ── */
.pec-a11y-toolbar button:hover,
.pec-a11y-toolbar button:focus-visible {
    width: 160px;
    padding: 0 16px;
    gap: 10px;
    background: #F5A623;
    border-color: #F5A623;
    color: #000000;
}

.pec-a11y-toolbar button:hover .btn-label,
.pec-a11y-toolbar button:focus-visible .btn-label {
    opacity: 1;
    max-width: 120px;
}

/* ── ACTIVE/PRESSED STATE ── */
.pec-a11y-toolbar button[aria-pressed="true"] {
    background: #F5A623;
    border-color: #F5A623;
    color: #000000;
    width: 44px;
}

.pec-a11y-toolbar button[aria-pressed="true"]:hover {
    width: 160px;
}

/* ══════════════════════════════════════════════════════════════════════════
   FOCUS MODE
   ══════════════════════════════════════════════════════════════════════════ */

/* Dimmed sections */
body.pec-focus-mode .pec-focus-dimmed {
    opacity: 0.15 !important;
    transition: opacity 0.4s ease !important;
    pointer-events: none;
}

/* Active (hovered) section */
body.pec-focus-mode .pec-focus-active {
    opacity: 1 !important;
    transition: opacity 0.4s ease !important;
    pointer-events: auto;
    outline: 3px solid rgba(245, 166, 35, 0.4);
    outline-offset: -3px;
}

/* Navbar and toolbar always visible */
body.pec-focus-mode .site-header,
body.pec-focus-mode .pec-a11y-toolbar {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   DYSLEXIA FONT MODE
   ══════════════════════════════════════════════════════════════════════════ */

body.pec-dyslexia-font,
body.pec-dyslexia-font p,
body.pec-dyslexia-font h1,
body.pec-dyslexia-font h2,
body.pec-dyslexia-font h3,
body.pec-dyslexia-font h4,
body.pec-dyslexia-font h5,
body.pec-dyslexia-font h6,
body.pec-dyslexia-font a,
body.pec-dyslexia-font span,
body.pec-dyslexia-font li,
body.pec-dyslexia-font label,
body.pec-dyslexia-font input,
body.pec-dyslexia-font textarea,
body.pec-dyslexia-font select {
    font-family: 'OpenDyslexic', 'Arial', sans-serif !important;
}

body.pec-dyslexia-font p,
body.pec-dyslexia-font li {
    line-height: 1.9 !important;
    letter-spacing: 0.05em !important;
    word-spacing: 0.1em !important;
}

body.pec-dyslexia-font h1,
body.pec-dyslexia-font h2,
body.pec-dyslexia-font h3,
body.pec-dyslexia-font h4 {
    letter-spacing: 0.03em !important;
    line-height: 1.3 !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   FONT SIZE SCALING
   ══════════════════════════════════════════════════════════════════════════ */

body.pec-text-large {
    font-size: 106% !important;
}
body.pec-text-xlarge {
    font-size: 115% !important;
}

body.pec-text-large p,
body.pec-text-large .page-content p,
body.pec-text-large .post-card-excerpt,
body.pec-text-large .blog-hero-content p,
body.pec-text-large .service-card p,
body.pec-text-large .testimonial-card p,
body.pec-text-large .mini-card p,
body.pec-text-large .guidance-content p,
body.pec-text-large .hero p {
    font-size: 1.15em !important;
    line-height: 1.75 !important;
}

body.pec-text-xlarge p,
body.pec-text-xlarge .page-content p,
body.pec-text-xlarge .post-card-excerpt,
body.pec-text-xlarge .blog-hero-content p,
body.pec-text-xlarge .service-card p,
body.pec-text-xlarge .testimonial-card p,
body.pec-text-xlarge .mini-card p,
body.pec-text-xlarge .guidance-content p,
body.pec-text-xlarge .hero p {
    font-size: 1.28em !important;
    line-height: 1.85 !important;
}

/* Never scale these */
body.pec-text-large .site-header,
body.pec-text-large .nav-links,
body.pec-text-large .nav-links a,
body.pec-text-large .btn-nav,
body.pec-text-large .logo,
body.pec-text-large .pec-a11y-toolbar,
body.pec-text-large .site-footer,
body.pec-text-xlarge .site-header,
body.pec-text-xlarge .nav-links,
body.pec-text-xlarge .nav-links a,
body.pec-text-xlarge .btn-nav,
body.pec-text-xlarge .logo,
body.pec-text-xlarge .pec-a11y-toolbar,
body.pec-text-xlarge .site-footer {
    font-size: unset !important;
    line-height: unset !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   ACCESSIBLE VIDEO
   ══════════════════════════════════════════════════════════════════════════ */

.pec-accessible-video { margin: 32px 0; }
.pec-accessible-video video {
    border-radius: 8px;
    border: 1px solid rgba(245, 166, 35, 0.2);
}
.pec-transcript {
    margin-top: 12px;
    background: #0A0A0A;
    border: 1px solid rgba(245, 166, 35, 0.2);
    border-radius: 8px;
    overflow: hidden;
}
.pec-transcript summary {
    padding: 14px 20px;
    cursor: pointer;
    font-weight: 600;
    color: #F5A623;
    font-size: 1rem;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}
.pec-transcript summary::before {
    content: '▶';
    font-size: 0.7rem;
    transition: transform 0.2s;
}
.pec-transcript[open] summary::before {
    transform: rotate(90deg);
}
.pec-transcript-body {
    padding: 20px 24px;
    font-size: 1rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.75;
    border-top: 1px solid rgba(245, 166, 35, 0.1);
}

/* ══════════════════════════════════════════════════════════════════════════
   REDUCED MOTION
   ══════════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .gallery-track, .marquee-track { animation: none !important; }
}

/* ══════════════════════════════════════════════════════════════════════════
   MOBILE
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .pec-a11y-toolbar { bottom: 16px; right: 16px; }
    .pec-a11y-toolbar button { width: 40px; height: 40px; padding: 0 11px; }
    .pec-a11y-toolbar button:hover,
    .pec-a11y-toolbar button:focus-visible { width: 150px; padding: 0 14px; }
}