/*
Theme Name: Zonkey
Theme URI: https://zonkey.com.au
Author: Zonkey
Author URI: https://zonkey.com.au
Description: A lightweight, accessible WordPress theme optimized for Gravity Forms with WCAG compliance features.
Version: 1.5.1
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zonkey
Tags: accessibility-ready, custom-colors, custom-menu, editor-style, featured-images, flexible-header, threaded-comments, translation-ready
*/

/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Root Variables - Will be overridden by Customizer */
:root {
    /* Colors */
    --color-primary: #2563eb;
    --color-secondary: #7c3aed;
    --color-tertiary: #059669;
    --color-text: #1f2937;
    --color-text-muted: #6b7280;
    --color-text-light: #9ca3af;
    --color-background: #ffffff;
    --color-background-alt: #f9fafb;
    --color-background-muted: #f3f4f6;
    --color-border: #e5e7eb;

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-nav: 'Poppins', sans-serif;
    --font-body: 'Poppins', sans-serif;

    /* Layout */
    --container-width: 1280px;
    --header-height: 80px;

    /* Transitions */
    --transition-fast: 0.1s;
    --transition-speed: 0.3s;
    --transition-slow: 0.4s;

    /* Shadows - Design System */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 10px 20px rgba(0, 0, 0, 0.1), 0 6px 6px rgba(0, 0, 0, 0.08);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-full: 9999px;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Breakpoints (for reference in media queries) */
    /* --breakpoint-sm: 480px; */
    /* --breakpoint-md: 768px; */
    /* --breakpoint-lg: 1024px; */

    /* Touch Targets - WCAG 2.2 */
    --touch-target-min: 44px;
}

/* Reduced Motion Support - WCAG Compliance */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body.disable-animations *,
body.disable-animations *::before,
body.disable-animations *::after {
    animation: none !important;
    transition: none !important;
}

/* Base Styles */
body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Skip to Content Link - WCAG Compliance */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100000;
}

.skip-link:focus {
    top: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--color-text);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--color-secondary);
}

a:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Lists */
ul, ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

li {
    margin-bottom: 0.5rem;
}

ul {
    list-style-type: disc;
}

ol {
    list-style-type: decimal;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Main Content */
main {
    min-height: calc(100vh - var(--header-height) - 200px);
    padding: 40px 0;
}

/* Remove top padding when breadcrumbs are present (they have their own spacing) */
main:has(.breadcrumbs) {
    padding-top: 0;
}

/* Full Width Pages - remove top padding from main */
main:has(.page-full-width) {
    padding-top: 0;
	padding-bottom: 0;
}

/* Full Width Pages */
.page-full-width {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

body.page .page-full-width .entry-header {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 40px 20px 0;
}

body.page .page-full-width .entry-content {
    width: 100%;
}

body.page .page-full-width .entry-content > .alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
}

/* Accessibility */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    h4 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }
}
