/* ==========================================================================
   Base CSS - Reset, Variables, Typography
   ========================================================================== */

/* CSS Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

input,
button,
textarea,
select {
    font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

ul,
ol {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==========================================================================
   CSS Custom Properties (Variables)
   ========================================================================== */

:root {
    /* Shared Base Colors */
    --color-cream: #F5F6F2;
    --color-charcoal: #2C3331;
    --color-mid-grey: #9CA3A0;
    --color-light-grey: #E5E7E3;
    --color-white: #FFFFFF;

    /* Default Primary Colors (will be overridden by theme) */
    --color-primary: #3D8B8B;
    --color-primary-light: #5AA3A3;
    --color-primary-dark: #2D6B6B;
    --color-primary-subtle: #E8F4F4;

    /* Semantic Colors */
    --color-background: var(--color-cream);
    --color-text: var(--color-charcoal);
    --color-text-secondary: var(--color-mid-grey);
    --color-border: var(--color-light-grey);

    /* Typography */
    --font-heading: 'Howard-Light', 'Georgia', serif;
    --font-body: 'Humanst-521', 'Segoe UI', 'Helvetica Neue', 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;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;

    /* Z-index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-tooltip: 600;
}

/* ==========================================================================
   Font Face Declarations
   ========================================================================== */

@font-face {
    font-family: 'Howard-Light';
    src: url('../assets/fonts/Howard-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Humanst-521';
    src: url('../assets/fonts/Humanist-521-light-bt.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   Base Typography
   ========================================================================== */

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--color-text);
    background-color: var(--color-background);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 300;
    line-height: 1.3;
    color: var(--color-text);
}

h1 {
    font-size: var(--text-4xl);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-6);
}

h2 {
    font-size: var(--text-2xl);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: var(--space-4);
}

h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-3);
}

h4 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
}

p {
    margin-bottom: var(--space-4);
    line-height: 1.7;
}

p:last-child {
    margin-bottom: 0;
}

strong,
b {
    font-weight: 600;
}

small {
    font-size: var(--text-sm);
}

/* ==========================================================================
   Links
   ========================================================================== */

a {
    color: var(--color-primary);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-light);
}

a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-secondary {
    color: var(--color-text-secondary);
}

.text-primary {
    color: var(--color-primary);
}
