/* ============================================================
   HK3K Accessible Theme - WCAG 2.2 AAA Monochromatic Override

   This file ONLY activates when html.accessible-mode is set.
   It overrides frost-cosmic.css variables with a high-contrast
   grayscale palette. No glassmorphism, no glows, no animations.
   ============================================================ */

/* ----- Core Variable Overrides ----- */
html.accessible-mode {
    /* Backgrounds */
    --deep-blue: #121212;
    --rich-blue: #1E1E1E;
    --brand-blue: #2A2A2A;

    /* Accent colors → White/Gray (monochromatic) */
    --vibrant-cyan: #FFFFFF;
    --electric-cyan: #FFFFFF;
    --glow-cyan: #F0F0F0;
    --soft-purple: #FFFFFF;
    --purple: #FFFFFF;
    --royal-blue: #B0B0B0;

    /* Text */
    --white: #F0F0F0;
    --light-grey: #B0B0B0;
    --text-muted: #808080;

    /* Status → Keep functional but desaturated */
    --success: #FFFFFF;
    --warning: #B0B0B0;
    --danger: #FFFFFF;

    /* Glass → Solid opaque fills */
    --glass-fill: #1E1E1E;
    --glass-border: #505050;
    --glass-border-strong: #808080;
    --cyan-glass-border: #808080;
    --cyan-glass-border-strong: #B0B0B0;

    /* Kill all glow shadows */
    --shadow-glow-cyan: none;
    --shadow-glow-cyan-strong: none;
    --shadow-glow-purple: none;
    --shadow-glow-purple-strong: none;

    /* Instant transitions (no motion) */
    --transition: all 0.01ms ease;
    --transition-slow: all 0.01ms ease;
}

/* ----- Kill All Animations ----- */
html.accessible-mode *,
html.accessible-mode *::before,
html.accessible-mode *::after {
    animation: none !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

/* ----- Kill Glassmorphism ----- */
html.accessible-mode .card,
html.accessible-mode .modal-content,
html.accessible-mode .input-field,
html.accessible-mode .btn-secondary,
html.accessible-mode .feature-card,
html.accessible-mode .step-card,
html.accessible-mode .tip-card,
html.accessible-mode .faq-item,
html.accessible-mode .waitlist-modal-content,
html.accessible-mode header {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* ----- Kill All Text Shadows & Box Shadows ----- */
html.accessible-mode * {
    text-shadow: none !important;
}

html.accessible-mode .feature-card,
html.accessible-mode .step-card,
html.accessible-mode .tip-card,
html.accessible-mode .btn-primary,
html.accessible-mode .btn-secondary {
    box-shadow: none !important;
}

/* ----- Kill All Gradients ----- */
html.accessible-mode .gradient-text {
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: #FFFFFF !important;
    background-clip: unset !important;
}

html.accessible-mode .shimmer-you {
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: #FFFFFF !important;
    background-clip: unset !important;
}

/* ----- Enhanced Borders (2-3px for visibility) ----- */
html.accessible-mode .feature-card,
html.accessible-mode .step-card,
html.accessible-mode .tip-card,
html.accessible-mode .faq-item {
    border: 2px solid #505050;
    background: #1E1E1E;
}

html.accessible-mode .feature-card:hover,
html.accessible-mode .step-card:hover,
html.accessible-mode .tip-card:hover {
    border-color: #FFFFFF;
    transform: none !important;
    box-shadow: none !important;
}

html.accessible-mode .feature-card.featured {
    border-color: #808080;
}

html.accessible-mode .feature-card.featured:hover {
    border-color: #FFFFFF;
}

/* ----- Header ----- */
html.accessible-mode header {
    background: #1E1E1E !important;
    border-bottom: 2px solid #505050;
}

html.accessible-mode .nav-links a {
    color: #F0F0F0 !important;
}

html.accessible-mode .nav-links a:hover {
    color: #FFFFFF !important;
    text-decoration: underline;
}

html.accessible-mode .logo-text {
    color: #FFFFFF !important;
    filter: none !important;
}

/* ----- Buttons ----- */
html.accessible-mode .btn-primary {
    background: #FFFFFF !important;
    color: #121212 !important;
    border: 2px solid #FFFFFF !important;
    font-weight: 700;
    box-shadow: none !important;
}

html.accessible-mode .btn-primary:hover {
    background: #B0B0B0 !important;
    color: #121212 !important;
    transform: none !important;
}

html.accessible-mode .btn-secondary {
    background: transparent !important;
    color: #F0F0F0 !important;
    border: 2px solid #808080 !important;
    box-shadow: none !important;
}

html.accessible-mode .btn-secondary:hover {
    border-color: #FFFFFF !important;
    color: #FFFFFF !important;
    background: rgba(255, 255, 255, 0.1) !important;
    transform: none !important;
}

/* ----- Typography Enhancements ----- */
html.accessible-mode body {
    font-size: 1.125rem;
    line-height: 1.6;
    letter-spacing: 0.02em;
}

html.accessible-mode h1 {
    letter-spacing: 0.01em;
}

/* ----- Links Always Underlined ----- */
html.accessible-mode a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

html.accessible-mode .nav-links a,
html.accessible-mode .logo-link {
    text-decoration: none;
}

html.accessible-mode .nav-links a:hover {
    text-decoration: underline;
}

/* ----- Enhanced Focus Indicators ----- */
html.accessible-mode *:focus-visible {
    outline: 3px solid #FFFFFF !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
}

/* ----- FAQ ----- */
html.accessible-mode .faq-question {
    background: #1E1E1E;
    color: #F0F0F0;
    border: 2px solid #505050;
}

html.accessible-mode .faq-question:hover {
    border-color: #FFFFFF;
}

html.accessible-mode .faq-answer {
    background: #1A1A1A;
    border-color: #505050;
    color: #B0B0B0;
}

/* ----- Footer ----- */
html.accessible-mode footer {
    background: #1A1A1A !important;
    border-top: 2px solid #505050;
}

html.accessible-mode .footer-bottom {
    border-top-color: #505050;
}

/* ----- Hero Section ----- */
html.accessible-mode .hero {
    background: #121212 !important;
}

html.accessible-mode .hero-badge {
    background: #1E1E1E !important;
    border: 2px solid #808080 !important;
    color: #F0F0F0 !important;
    box-shadow: none !important;
}

html.accessible-mode .notion-badge {
    background: #1E1E1E !important;
    border: 2px solid #505050 !important;
    box-shadow: none !important;
}

html.accessible-mode .social-proof {
    opacity: 1;
}

html.accessible-mode .avatar-dot {
    background: #808080 !important;
    box-shadow: none !important;
}

html.accessible-mode .hero-image {
    border: 2px solid #505050 !important;
    box-shadow: none !important;
}

html.accessible-mode .hero-image-badge,
html.accessible-mode .notion-integration-badge {
    background: #1E1E1E !important;
    border: 2px solid #505050 !important;
    color: #F0F0F0 !important;
    box-shadow: none !important;
}

/* ----- Section Backgrounds ----- */
html.accessible-mode .bg-muted,
html.accessible-mode section {
    background: #121212 !important;
}

html.accessible-mode .bg-muted {
    background: #1A1A1A !important;
}

/* ----- CTA Section ----- */
html.accessible-mode .cta-section {
    background: #1A1A1A !important;
    border-top: 2px solid #505050;
    border-bottom: 2px solid #505050;
}

/* ----- Trust Badges ----- */
html.accessible-mode .trust-badge svg {
    fill: #B0B0B0;
}

/* ----- Coming Soon Badges ----- */
html.accessible-mode .coming-soon-badge,
html.accessible-mode .coming-soon-label {
    background: #2A2A2A !important;
    border: 2px solid #808080 !important;
    color: #F0F0F0 !important;
    box-shadow: none !important;
}

/* ----- Notion Integration Badge ----- */
html.accessible-mode .notion-integration {
    background: #2A2A2A !important;
    border-color: #505050 !important;
}

/* ----- Info Boxes ----- */
html.accessible-mode .info-box {
    background: #1E1E1E !important;
    border: 2px solid #505050 !important;
}

/* ----- Images ----- */
html.accessible-mode .hero-image img,
html.accessible-mode .step-card img,
html.accessible-mode .feature-card img {
    filter: grayscale(20%);
    border: 2px solid #505050;
}

/* ----- Corner Bracket Effects → Simple border ----- */
html.accessible-mode .feature-card::before,
html.accessible-mode .feature-card::after,
html.accessible-mode .feature-card .feature-icon::before,
html.accessible-mode .feature-card .feature-icon::after {
    display: none !important;
}

/* ----- Step Connectors ----- */
html.accessible-mode .step-connector {
    background: #505050 !important;
}

html.accessible-mode .step-number {
    background: #FFFFFF !important;
    color: #121212 !important;
}

/* ----- Scrollbar ----- */
html.accessible-mode ::-webkit-scrollbar-track {
    background: #121212;
}

html.accessible-mode ::-webkit-scrollbar-thumb {
    background: #505050;
    border-radius: 0;
}

html.accessible-mode ::-webkit-scrollbar-thumb:hover {
    background: #808080;
}

/* ----- Disable Nitro Mode entirely ----- */
html.accessible-mode.nitro-mode * {
    animation: none !important;
    filter: none !important;
}

/* ----- Skip Navigation Link ----- */
html.accessible-mode .skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: #FFFFFF;
    color: #121212;
    padding: 1rem;
    z-index: 10000;
    font-weight: 700;
    font-size: 1.125rem;
    text-decoration: none;
}

html.accessible-mode .skip-link:focus {
    top: 0;
}

/* ============================================================
   MODE SELECTION SPLASH SCREEN
   Always uses accessible styling (neutral, high contrast)
   ============================================================ */

#mode-selection-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #121212;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 1;
    transition: opacity 0.3s ease;
}

#mode-selection-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

#mode-selection-overlay h1 {
    color: #FFFFFF;
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    text-align: center;
}

#mode-selection-overlay .subtitle {
    color: #B0B0B0;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    margin-bottom: 2.5rem;
    text-align: center;
}

.mode-cards {
    display: flex;
    gap: 2rem;
    max-width: 800px;
    width: 100%;
}

.mode-card {
    flex: 1;
    padding: 2.5rem 2rem;
    border: 2px solid #505050;
    background: #1E1E1E;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s ease;
}

.mode-card:hover {
    border-color: #FFFFFF;
}

.mode-card:focus-visible {
    outline: 3px solid #FFFFFF;
    outline-offset: 2px;
}

.mode-card h2 {
    color: #FFFFFF;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.mode-card p {
    color: #B0B0B0;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.mode-card .mode-btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
}

/* Frost Cosmic preview card */
.mode-card.frost-card {
    border-color: #505050;
}

.mode-card.frost-card .mode-preview {
    height: 80px;
    margin-bottom: 1.5rem;
    background: #0D1B2A;
    border: 1px solid rgba(0, 229, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    color: #00E5FF;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

.mode-card.frost-card .mode-btn {
    background: #A78BFA;
    color: #FFFFFF;
}

.mode-card.frost-card:hover .mode-btn {
    background: #00E5FF;
    color: #0D1B2A;
}

/* Accessible preview card */
.mode-card.accessible-card .mode-preview {
    height: 80px;
    margin-bottom: 1.5rem;
    background: #121212;
    border: 2px solid #808080;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    color: #F0F0F0;
}

.mode-card.accessible-card .mode-btn {
    background: #FFFFFF;
    color: #121212;
}

.mode-card.accessible-card:hover .mode-btn {
    background: #B0B0B0;
    color: #121212;
}

/* Footer note */
.mode-footer {
    margin-top: 2rem;
    color: #808080;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    text-align: center;
}

.mode-skip {
    display: inline-block;
    margin-top: 1rem;
    color: #B0B0B0;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem 1rem;
}

.mode-skip:hover {
    color: #FFFFFF;
}

.mode-skip:focus-visible {
    outline: 3px solid #FFFFFF;
    outline-offset: 2px;
}

/* ----- Accessibility Settings Toggle (in nav) ----- */
.a11y-toggle {
    background: none;
    border: 2px solid #505050;
    color: #F0F0F0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    margin-left: 0.5rem;
    transition: all 0.15s ease;
}

.a11y-toggle:hover {
    border-color: var(--vibrant-cyan);
    color: var(--vibrant-cyan);
}

.a11y-toggle:focus-visible {
    outline: 3px solid #FFFFFF;
    outline-offset: 2px;
}

html.accessible-mode .a11y-toggle {
    border-color: #FFFFFF;
    color: #FFFFFF;
}

/* ============================================================
   FULL-PAGE ACCESSIBILITY MODE SELECTOR
   Two-panel takeover when user clicks "Accessibility" in footer
   ============================================================ */

#a11y-prompt-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
}

#a11y-prompt-modal.active {
    display: flex;
}

/* ----- Inner container ----- */
.a11y-modal-inner {
    max-width: 860px;
    width: 100%;
    position: relative;
    text-align: center;
}

/* ----- Close button ----- */
.a11y-modal-close {
    position: absolute;
    top: -3rem;
    right: 0;
    background: none;
    border: 2px solid #505050;
    color: #B0B0B0;
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.a11y-modal-close:hover {
    border-color: #FFFFFF;
    color: #FFFFFF;
}

.a11y-modal-close:focus-visible {
    outline: 3px solid #FFFFFF;
    outline-offset: 2px;
}

/* ----- Title ----- */
.a11y-modal-inner > h2 {
    color: #FFFFFF;
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.a11y-modal-subtitle {
    color: #808080;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    margin-bottom: 2.5rem;
}

/* ----- Two panels ----- */
.a11y-modal-panels {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.a11y-panel {
    flex: 1;
    border: 2px solid #505050;
    background: #1A1A1A;
    cursor: pointer;
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
    position: relative;
    transition: border-color 0.15s ease;
}

.a11y-panel:hover {
    border-color: #808080;
}

.a11y-panel.selected {
    border-color: #FFFFFF;
    border-width: 3px;
}

.a11y-panel:focus-visible {
    outline: 3px solid #FFFFFF;
    outline-offset: 2px;
}

/* ----- "Currently Active" badge ----- */
.a11y-panel-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #808080;
    color: #121212;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.75rem;
    white-space: nowrap;
}

/* ----- Mini preview mockups ----- */
.a11y-panel-preview {
    height: 140px;
    margin-bottom: 1.5rem;
    border: 1px solid;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: none;
}

/* Frost Cosmic preview */
.frost-preview {
    background: #0D1B2A;
    border-color: rgba(0, 229, 255, 0.25);
}

.frost-preview .prev-bar {
    height: 16px;
    background: linear-gradient(90deg, #0D1B2A 0%, rgba(0, 229, 255, 0.15) 100%);
    border-bottom: 1px solid rgba(0, 229, 255, 0.2);
    display: flex;
    align-items: center;
    padding: 0 6px;
    gap: 3px;
}

.frost-preview .prev-bar-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(0, 229, 255, 0.5);
}

.frost-preview .prev-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.frost-preview .prev-hero-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 800;
    color: #00E5FF;
    letter-spacing: 0.05em;
}

.frost-preview .prev-hero-sub {
    width: 60%;
    height: 4px;
    background: rgba(167, 139, 250, 0.4);
    border-radius: 2px;
}

.frost-preview .prev-cards {
    display: flex;
    gap: 4px;
    padding: 8px;
}

.frost-preview .prev-card {
    flex: 1;
    height: 24px;
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 3px;
}

.frost-preview .prev-btn {
    width: 50px;
    height: 12px;
    background: linear-gradient(135deg, #A78BFA, #00E5FF);
    border-radius: 2px;
    margin-top: 4px;
}

/* Accessible preview */
.accessible-preview {
    background: #121212;
    border-color: #808080;
}

.accessible-preview .prev-bar {
    height: 16px;
    background: #1E1E1E;
    border-bottom: 2px solid #505050;
    display: flex;
    align-items: center;
    padding: 0 6px;
    gap: 3px;
}

.accessible-preview .prev-bar-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #808080;
}

.accessible-preview .prev-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.accessible-preview .prev-hero-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 800;
    color: #F0F0F0;
    letter-spacing: 0.05em;
}

.accessible-preview .prev-hero-sub {
    width: 60%;
    height: 4px;
    background: #505050;
    border-radius: 0;
}

.accessible-preview .prev-cards {
    display: flex;
    gap: 4px;
    padding: 8px;
}

.accessible-preview .prev-card {
    flex: 1;
    height: 24px;
    background: #1E1E1E;
    border: 2px solid #505050;
    border-radius: 0;
}

.accessible-preview .prev-btn {
    width: 50px;
    height: 12px;
    background: #FFFFFF;
    border-radius: 0;
    margin-top: 4px;
}

/* ----- Panel text ----- */
.a11y-panel h3 {
    color: #FFFFFF;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.a11y-panel p {
    color: #B0B0B0;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* ----- WCAG badge ----- */
.a11y-wcag-badge {
    display: inline-block;
    margin-top: 0.75rem;
    background: #2A2A2A;
    border: 1px solid #505050;
    color: #B0B0B0;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
}

/* ----- Confirm button ----- */
.a11y-modal-confirm {
    display: inline-block;
    background: #FFFFFF;
    color: #121212;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    padding: 1rem 3rem;
    border: none;
    cursor: pointer;
    margin-top: 0.5rem;
}

.a11y-modal-confirm:hover {
    background: #B0B0B0;
}

.a11y-modal-confirm:focus-visible {
    outline: 3px solid #FFFFFF;
    outline-offset: 2px;
}

/* ----- Responsive ----- */
@media (max-width: 640px) {
    .a11y-modal-panels {
        flex-direction: column;
    }

    .a11y-modal-inner > h2 {
        font-size: 1.5rem;
    }

    .a11y-modal-close {
        top: -2.5rem;
    }

    .a11y-panel {
        padding: 1.5rem 1rem 1rem;
    }

    .a11y-panel-preview {
        height: 110px;
    }

    .a11y-modal-confirm {
        width: 100%;
    }
}

/* ----- Mobile Responsive ----- */
@media (max-width: 640px) {
    .mode-cards {
        flex-direction: column;
    }

    #mode-selection-overlay h1 {
        font-size: 1.75rem;
    }

    .mode-card {
        padding: 2rem 1.5rem;
    }
}
