/*
Theme Name: A11y For All
Theme URI: https://wordpress.com/home/a11yforall.com
Author: A11y For All
Description: A custom, WCAG 2.2 AA compliant theme for A11y For All.
Version: 1.0.1
License: GNU General Public License v2 or later
Text Domain: a11yforall
*/

/* Regal SME Design System - A11y For All v3 */

:root {
    /* Base Palette - Regal & Approachable */
    --bg-base: #FDFDFD;
    /* Pure clean background */
    --bg-surface: #F5F5F4;
    /* Warm Light Gray */
    --bg-glass: rgba(253, 253, 253, 0.85);
    /* Light Glassmorphism Base */
    --bg-glass-card: rgba(245, 245, 244, 0.95);

    /* Text & Accents */
    --text-main: #1C2321;
    /* Deep Charcoal for excellent readability */
    --text-muted: #5E6C68;
    /* Softened charcoal */

    /* Primary Colors - The SME Brand */
    --accent-sage: #4A5D4E;
    /* Deep authoritative Sage Green */
    --accent-sage-light: #F0F4F1;
    /* Extremely subtle sage tint for backgrounds */

    /* Secondary Accents - Luxury/Regal Touch */
    --accent-gold: #C5A059;
    /* Understated Gold */
    --accent-gold-light: rgba(197, 160, 89, 0.1);

    /* Interactive States & Accessibility Focus */
    --focus-ring: #D4AF37;
    /* Gold focus ring */
    --focus-ring-offset: #1C2321;
    /* Dark outer offset for extreme contrast */
    --border-subtle: #E5E7EB;

    /* Typography - Editorial & Regal */
    --font-heading: 'Merriweather', 'Playfair Display', serif;
    --font-body: 'Lato', 'Inter', system-ui, sans-serif;

    /* Spacing & Radii */
    --radius-sm: 4px;
    /* Sharper, more professional radii */
    --radius-md: 8px;
    --radius-lg: 12px;
    --container-max: 1200px;
    /* Slightly tighter for text-heavy editorial feel */
}

/* =========================================
   Reset & Base Styles
========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.7;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Clean background - replacing the dark mode glow */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 500px;
    background: linear-gradient(to bottom, var(--accent-sage-light) 0%, transparent 100%);
    z-index: -1;
    pointer-events: none;
}

/* Accessibility: Focus States - Double ring for high contrast on light/dark backgrounds */
*:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 4px;
    border-radius: 2px;
}

/* Accessibility: Skip Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    background: var(--text-main);
    color: #FFF;
    padding: 1rem 1.5rem;
    z-index: 9999;
    font-family: var(--font-body);
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: top 0.3s ease;
    border: 2px solid var(--accent-gold);
}

.skip-link:focus {
    top: 1rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Typography Links & Buttons */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--accent-sage);
    /* Headings in deep sage */
    font-weight: 700;
    line-height: 1.3;
}

a {
    color: var(--accent-sage);
    text-decoration: underline;
    text-decoration-color: var(--accent-gold);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--text-main);
    text-decoration-thickness: 2px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-weight: 600;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent-sage);
    color: #FFF;
    border: 1px solid var(--accent-sage);
}

.btn-primary:hover {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: #FFF;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.2);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--accent-sage);
    color: var(--accent-sage);
}

.btn-secondary:hover {
    background: var(--accent-sage-light);
    color: var(--text-main);
}

/* =========================================
   Layout & Components
========================================= */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header & Navigation */
header[role="banner"] {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.25rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-sage);
}

.logo-link:hover {
    text-decoration: none;
}

/* Elegant CSS Logo mark */
.logo-logo {
    width: 32px;
    height: 32px;
    border: 2px solid var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--accent-sage);
}

.logo-logo::after {
    content: '';
    width: 8px;
    height: 8px;
    background: #FFF;
    display: block;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

nav a {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    text-decoration: none;
}

nav a:hover,
nav a[aria-current="page"] {
    color: var(--accent-gold);
    text-decoration: none;
}

nav a[aria-current="page"] {
    position: relative;
}

nav a[aria-current="page"]::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-gold);
}

/* Standardized Content Sections */
.section {
    padding: 5rem 0;
}

.section-header {
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    color: var(--accent-sage);
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 700px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

/* Regal Card Design */
.card {
    background: #FFF;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.05);
    border-color: var(--accent-gold);
}

/* Subtle top border accent on cards */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-sage);
    transition: background 0.3s ease;
}

.card:hover::before {
    background: var(--accent-gold);
}

.card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-meta {
    font-family: var(--font-body);
    color: var(--accent-gold);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-sage);
}

.card h3 a {
    color: var(--accent-sage);
    text-decoration: none;
}

.card h3 a:hover {
    color: var(--accent-gold);
}

.card h3 a::before {
    /* Expand link hit area */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    flex-grow: 1;
}

.card-link {
    color: var(--accent-sage);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    transition: color 0.3s;
}

.card:hover .card-link {
    color: var(--accent-gold);
}

.card-link svg {
    transition: transform 0.3s;
}

.card:hover .card-link svg {
    transform: translateX(4px);
}

/* Resource List Styles */
.resource-list {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.resource-list li {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    padding-left: 1.25rem;
    position: relative;
}

.resource-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-gold);
    font-weight: bold;
}

.resource-list a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s, text-decoration-color 0.2s;
}

.resource-list a:hover {
    color: var(--accent-sage);
    text-decoration: underline;
    text-decoration-color: var(--accent-gold);
}

.card .card-description {
    color: var(--text-main);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* Footer - Regal & Clean */
footer {
    background: var(--accent-sage);
    color: #FFF;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand .logo-link {
    color: #FFF;
}

.footer-brand .logo-logo {
    border-color: var(--accent-gold);
    background: transparent;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.8);
    margin-top: 1.5rem;
    max-width: 320px;
    font-size: 0.95rem;
}

.footer-links h4 {
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
    font-weight: 700;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0;
    margin: 0;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--accent-gold);
    text-decoration: underline;
    text-decoration-color: var(--accent-gold);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 600;
}

.social-links a:hover {
    color: var(--accent-gold);
}


/* Layout Utilities */
.hero {
    padding: 8rem 0 6rem;
    position: relative;
    border-bottom: 1px solid var(--border-subtle);
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #FFF;
    border: 1px solid var(--accent-gold);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    color: var(--accent-sage);
    font-family: var(--font-body);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
    color: var(--text-main);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero h1 span {
    color: var(--accent-sage);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 3rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Responsiveness */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .hero {
        padding: 5rem 0 4rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}
