/*
Theme Name: harmn.pro
Theme URI: https://freeatlastcoalition.org
Author: Free At Last Coalition
Author URI: https://freeatlastcoalition.org
Description: Custom theme for Free At Last Coalition - advocating to close the 13th Amendment slavery exception through constitutional amendment.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: harmn-pro
Tags: nonprofit, advocacy, custom-colors, custom-logo, featured-images, full-width-template
*/

/* ==========================================================================
   CSS Custom Properties (Variables)
   ========================================================================== */

:root {
    /* Primary Colors */
    --color-primary: #1e3a8a;
    --color-primary-light: #3b82f6;
    --color-primary-dark: #1e40af;

    /* Secondary Colors */
    --color-secondary: #f59e0b;
    --color-secondary-light: #fbbf24;
    --color-secondary-dark: #d97706;

    /* Accent Colors */
    --color-accent: #991b1b;
    --color-accent-light: #b91c1c;

    /* Neutrals */
    --color-white: #ffffff;
    --color-off-white: #F5F5F5;
    --color-light-gray: #e2e8f0;
    --color-medium-gray: #64748b;
    --color-dark-gray: #334155;
    --color-near-black: #0f172a;

    /* Semantic Colors */
    --color-success: #059669;
    --color-error: #dc2626;
    --color-warning: #d97706;

    /* Typography */
    --font-heading: 'Merriweather', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;

    /* Line Heights */
    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Shadows - Enhanced for elevation */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.06);
    --shadow: 0 2px 4px 0 rgb(0 0 0 / 0.08), 0 1px 2px -1px rgb(0 0 0 / 0.08);
    --shadow-md: 0 4px 8px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.08);
    --shadow-lg: 0 12px 20px -4px rgb(0 0 0 / 0.12), 0 4px 8px -4px rgb(0 0 0 / 0.08);
    --shadow-xl: 0 24px 32px -8px rgb(0 0 0 / 0.14), 0 8px 12px -6px rgb(0 0 0 / 0.1);
    --shadow-card: 0 2px 8px -2px rgb(0 0 0 / 0.1), 0 4px 16px -4px rgb(0 0 0 / 0.08);
    --shadow-card-hover: 0 8px 24px -4px rgb(0 0 0 / 0.15), 0 4px 12px -4px rgb(0 0 0 / 0.1);

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;

    /* Container */
    --container-max: 1280px;
    --container-padding: var(--space-4);
}

/* ==========================================================================
   Base Styles / Reset
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    height: 100%;
    height: -webkit-fill-available;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-dark-gray);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100%;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    /* iOS safe area support */
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    /* Sticky footer layout */
    display: flex;
    flex-direction: column;
}

/* Ensure no overflow causing white space */
body.home {
    overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: var(--leading-tight);
    color: var(--color-near-black);
}

h1 {
    font-size: var(--text-4xl);
}

h2 {
    font-size: var(--text-3xl);
}

h3 {
    font-size: var(--text-2xl);
}

h4 {
    font-size: var(--text-xl);
}

h5 {
    font-size: var(--text-lg);
}

h6 {
    font-size: var(--text-base);
}

@media (min-width: 768px) {
    h1 {
        font-size: var(--text-5xl);
    }

    h2 {
        font-size: var(--text-4xl);
    }

    h3 {
        font-size: var(--text-3xl);
    }
}

@media (min-width: 1024px) {
    h1 {
        font-size: var(--text-6xl);
    }
}

p {
    margin-bottom: var(--space-4);
}

p:last-child {
    margin-bottom: 0;
}

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

a:hover {
    color: var(--color-primary-light);
}

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

strong,
b {
    font-weight: 600;
}

blockquote {
    margin: var(--space-6) 0;
    padding: var(--space-6);
    background-color: var(--color-off-white);
    border-left: 4px solid var(--color-primary);
    font-style: italic;
    font-size: var(--text-lg);
}

blockquote cite {
    display: block;
    margin-top: var(--space-4);
    font-style: normal;
    font-size: var(--text-sm);
    color: var(--color-medium-gray);
}

/* Lists */
ul,
ol {
    margin-bottom: var(--space-4);
    padding-left: var(--space-6);
}

li {
    margin-bottom: var(--space-2);
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.container--narrow {
    max-width: 900px;
}

.container--wide {
    max-width: 1440px;
}

/* Section Spacing */
.section {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
}

@media (min-width: 768px) {
    .section {
        padding-top: var(--space-16);
        padding-bottom: var(--space-16);
    }
}

@media (min-width: 1024px) {
    .section {
        padding-top: var(--space-20);
        padding-bottom: var(--space-20);
    }
}

.section--dark {
    background-color: var(--color-near-black);
    color: var(--color-white);
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
    color: var(--color-white);
}

.section--gray {
    background-color: var(--color-off-white);
}

.section--primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.section--primary h2,
.section--primary h3,
.section--primary h4 {
    color: var(--color-white);
}

/* Grid */
.grid {
    display: grid;
    gap: var(--space-6);
}

.grid--2 {
    grid-template-columns: repeat(1, 1fr);
}

.grid--3 {
    grid-template-columns: repeat(1, 1fr);
}

.grid--4 {
    grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 640px) {
    .grid--2,
    .grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid--3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid--4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Flexbox Utilities */
.flex {
    display: flex;
}

.flex--center {
    align-items: center;
    justify-content: center;
}

.flex--between {
    align-items: center;
    justify-content: space-between;
}

.flex--column {
    flex-direction: column;
}

.flex--wrap {
    flex-wrap: wrap;
}

.gap-4 {
    gap: var(--space-4);
}

.gap-6 {
    gap: var(--space-6);
}

.gap-8 {
    gap: var(--space-8);
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    z-index: 9999;
    padding: var(--space-3) var(--space-4);
    background-color: var(--color-primary);
    color: var(--color-white);
    font-weight: 600;
    transition: top var(--transition);
}

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

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid var(--color-primary-light);
    outline-offset: 2px;
}

/* ==========================================================================
   WordPress Core Styles
   ========================================================================== */

/* Alignment */
.alignleft {
    float: left;
    margin-right: var(--space-6);
    margin-bottom: var(--space-4);
}

.alignright {
    float: right;
    margin-left: var(--space-6);
    margin-bottom: var(--space-4);
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--space-4);
}

.alignwide {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
}

/* Captions */
.wp-caption {
    max-width: 100%;
    margin-bottom: var(--space-4);
}

.wp-caption img {
    display: block;
    margin-bottom: var(--space-2);
}

.wp-caption-text {
    font-size: var(--text-sm);
    color: var(--color-medium-gray);
    text-align: center;
}

/* Galleries */
.gallery {
    display: grid;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.gallery-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.gallery-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.gallery-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

/* Text Alignment */
.text-left {
    text-align: left;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

/* Text Colors */
.text-primary {
    color: var(--color-primary);
}

.text-secondary {
    color: var(--color-secondary);
}

.text-accent {
    color: var(--color-accent);
}

.text-muted {
    color: var(--color-medium-gray);
}

.text-white {
    color: var(--color-white);
}

/* Font Weights */
.font-normal {
    font-weight: 400;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

/* Font Sizes */
.text-sm {
    font-size: var(--text-sm);
}

.text-lg {
    font-size: var(--text-lg);
}

.text-xl {
    font-size: var(--text-xl);
}

/* Spacing */
.mt-4 {
    margin-top: var(--space-4);
}

.mt-6 {
    margin-top: var(--space-6);
}

.mt-8 {
    margin-top: var(--space-8);
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-6 {
    margin-bottom: var(--space-6);
}

.mb-8 {
    margin-bottom: var(--space-8);
}

/* Display */
.hidden {
    display: none;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
    }

    abbr[title]::after {
        content: " (" attr(title) ")";
    }

    a[href^="#"]::after,
    a[href^="javascript:"]::after {
        content: "";
    }

    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    thead {
        display: table-header-group;
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    img {
        max-width: 100% !important;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }

    .site-header,
    .site-footer,
    .site-navigation,
    .no-print {
        display: none !important;
    }
}
