/* ==========================================================================
   FETTLE TEA — Global Styles
   Design System: Forest Green + Gold + Teal (Hybrid)
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
    /* Primary — Forest Green */
    --color-primary: #1B3D2F;
    --color-primary-light: #2A5E45;
    --color-primary-dark: #0F2A1E;
    --color-primary-rgb: 27, 61, 47;

    /* Secondary — Teal (from logo) */
    --color-secondary: #1A7A8A;
    --color-secondary-light: #2BA3B5;
    --color-secondary-dark: #0F5A66;
    --color-secondary-rgb: 26, 122, 138;

    /* Accent — Gold */
    --color-accent: #C5A55A;
    --color-accent-light: #D4B96E;
    --color-accent-dark: #A68A3E;
    --color-accent-text: #7A5C0F;       /* WCAG AA accessible gold for text on light BG (7.6:1 on cream) */
    --color-accent-rgb: 197, 165, 90;

    /* Neutrals */
    --color-cream: #FAF6F0;
    --color-offwhite: #F5F1EB;
    --color-beige: #E8E0D4;
    --color-sand: #D4C9B8;
    --color-charcoal: #2D2D2D;
    --color-dark: #1A1A1A;
    --color-white: #FFFFFF;

    /* Semantic */
    --color-bg: var(--color-cream);
    --color-text: #3D3D3D;
    --color-text-light: #6B6B6B;
    --color-heading: var(--color-primary);
    --color-link: var(--color-secondary);
    --color-link-hover: var(--color-secondary-dark);
    --color-border: rgba(27, 61, 47, 0.12);
    --color-success: #2A5E45;
    --color-error: #A63E3E;

    /* Typography */
    --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-accent: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Type Scale — Perfect Fourth (1.333) */
    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-md: 1.125rem;     /* 18px */
    --text-lg: 1.333rem;     /* ~21px */
    --text-xl: 1.777rem;     /* ~28px */
    --text-2xl: 2.369rem;    /* ~38px */
    --text-3xl: 3.157rem;    /* ~50px */
    --text-4xl: 4.209rem;    /* ~67px */
    --text-5xl: 5.61rem;     /* ~90px */

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    --space-4xl: 8rem;
    --space-section: 7.5rem;

    /* Layout */
    --container-max: 1280px;
    --container-narrow: 900px;
    --container-wide: 1440px;
    --container-padding: 1.5rem;

    /* Transitions */
    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-in-out: cubic-bezier(0.42, 0, 0.58, 1);
    --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
    --duration-fast: 200ms;
    --duration-base: 350ms;
    --duration-slow: 600ms;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.12);
    --shadow-gold: 0 4px 20px rgba(197, 165, 90, 0.15);

    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Z-index scale */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-toast: 500;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
}

/* Override WordPress block layout constraints (classic theme) */
:root {
    --wp--style--global--content-size: none;
    --wp--style--global--wide-size: none;
}

.is-layout-constrained > *,
.is-layout-constrained,
.has-global-padding,
.wp-block-post-content,
.wp-site-blocks,
.wp-site-blocks > * {
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body .site-main,
body .site-main > * {
    max-width: none;
}

/* Remove default list styles */
ul, ol { list-style: none; }

/* Prevent images from overflowing */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Remove built-in form typography */
input, button, textarea, select {
    font: inherit;
    color: inherit;
}

/* Remove default button styles */
button {
    cursor: pointer;
    background: none;
    border: none;
}

/* Anchor reset */
a {
    color: var(--color-link);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}

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

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.2;
    color: var(--color-heading);
    letter-spacing: -0.01em;
}

h1 {
    font-size: var(--text-4xl);
    letter-spacing: -0.02em;
}

h2 {
    font-size: var(--text-3xl);
    letter-spacing: -0.015em;
}

h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-md); }

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

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

.text-accent {
    font-family: var(--font-accent);
    font-style: italic;
    font-weight: 400;
}

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

.text-uppercase {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: var(--text-xs);
    font-weight: 700;
    font-family: var(--font-body);
}

/* ---------- Layout Utilities ---------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-padding);
}

.container--narrow {
    max-width: var(--container-narrow);
}

.container--wide {
    max-width: var(--container-wide);
}

.section {
    padding-block: var(--space-section);
}

.section--sm {
    padding-block: var(--space-3xl);
}

.section--lg {
    padding-block: calc(var(--space-section) * 1.5);
}

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

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

.section--beige {
    background-color: var(--color-offwhite);
}

/* Flex utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* Grid utilities */
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Text alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Spacers */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mx-auto { margin-inline: auto; }

/* ---------- Gold Divider ---------- */
.gold-divider {
    display: block;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
    border: none;
    margin-block: var(--space-md);
}

.gold-divider--center {
    margin-inline: auto;
}

.gold-divider--wide {
    width: 120px;
}

/* ---------- Selection ---------- */
::selection {
    background-color: rgba(var(--color-accent-rgb), 0.2);
    color: var(--color-primary-dark);
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-offwhite);
}

::-webkit-scrollbar-thumb {
    background: var(--color-sand);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    :root {
        --text-4xl: 3.157rem;
        --text-3xl: 2.369rem;
        --space-section: 5rem;
    }

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

@media (max-width: 768px) {
    :root {
        --text-4xl: 2.369rem;
        --text-3xl: 1.777rem;
        --text-2xl: 1.5rem;
        --space-section: 4rem;
        --container-padding: 1.25rem;
    }

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

@media (max-width: 480px) {
    :root {
        --text-4xl: 2rem;
        --text-3xl: 1.5rem;
        --text-2xl: 1.333rem;
        --space-section: 3rem;
        --container-padding: 1rem;
    }

    .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: var(--color-cream);
    padding: 0.75rem 1.5rem;
    z-index: 10000;
    font-size: var(--text-sm);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    transition: top 0.2s;
    text-decoration: none;
}

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

/* Focus indicators */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}
