/* Woodend Mill — Design System
   2026-04-24 v1
   Mossy green + warm stone brown + industrial slate palette with dark/light mode.
   Fonts: Inter (UI), Merriweather (body).
   NOTE: All colour/font declarations use !important to override Tailwind CDN reset.
*/

/* ================================================
   CSS Custom Properties
   ================================================ */
:root {
    /* Brand */
    --wm-green:        #4A6B3A;   /* mossy green */
    --wm-green-light:  #6B8E55;
    --wm-green-dark:   #33502A;
    --wm-green-950:    #1A2E14;

    --wm-brown:        #8B6F47;   /* warm stone */
    --wm-brown-dark:   #6B5535;
    --wm-brown-light:  #B09775;

    --wm-slate:        #3A4651;   /* industrial grey */
    --wm-slate-dark:   #242B33;

    /* Surfaces */
    --bg-primary:    #F7F4EE;   /* cream / weathered stone */
    --bg-secondary:  #EEE9DD;
    --bg-card:       #FFFFFF;
    --bg-hero:       #1C2228;

    /* Text */
    --text-primary:   #2A2F36;
    --text-secondary: #525A64;
    --text-tertiary:  #8A8F98;
    --text-inverse:   #F7F4EE;
    --text-link:      #4A6B3A;
    --text-link-hover:#33502A;

    /* Borders */
    --border-light:   #DED8C8;
    --border-medium:  #BFB79F;

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

/* Dark mode */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-primary:    #1C2228;
        --bg-secondary:  #252D35;
        --bg-card:       #2A323B;
        --bg-hero:       #141A1F;

        --text-primary:   #E8E5DB;
        --text-secondary: #B9B3A2;
        --text-tertiary:  #8A8F98;
        --text-inverse:   #1C2228;
        --text-link:      #9FB787;
        --text-link-hover:#C4D6B0;

        --border-light:   #3A4651;
        --border-medium:  #525A64;
    }
}

[data-theme="dark"] {
    --bg-primary:    #1C2228;
    --bg-secondary:  #252D35;
    --bg-card:       #2A323B;
    --bg-hero:       #141A1F;

    --text-primary:   #E8E5DB;
    --text-secondary: #B9B3A2;
    --text-tertiary:  #8A8F98;
    --text-inverse:   #1C2228;
    --text-link:      #9FB787;
    --text-link-hover:#C4D6B0;

    --border-light:   #3A4651;
    --border-medium:  #525A64;
}


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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body) !important;
    color: var(--text-primary) !important;
    background-color: var(--bg-primary) !important;
    line-height: 1.7;
    margin: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading) !important;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.625rem; }
h3 { font-size: 1.25rem; }

a {
    color: var(--text-link);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover { color: var(--text-link-hover); }


/* ================================================
   Layout
   ================================================ */
.page-wrap {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-spacing {
    padding-top: 3rem;
    padding-bottom: 3rem;
}
@media (min-width: 640px) {
    .section-spacing { padding-top: 4rem; padding-bottom: 4rem; }
}
@media (min-width: 1024px) {
    .section-spacing { padding-top: 5rem; padding-bottom: 5rem; }
}

.content-narrow { max-width: 48rem; margin: 0 auto; }


/* ================================================
   Components: Cards
   ================================================ */
.wm-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.wm-card:hover {
    border-color: var(--wm-green-light);
    box-shadow: 0 4px 16px rgba(74, 107, 58, 0.1);
}


/* ================================================
   Components: Buttons
   ================================================ */
.btn-primary,
a.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    background: var(--wm-green) !important;
    color: #fff !important;
    font-family: var(--font-ui) !important;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    text-decoration: none !important;
}
.btn-primary:hover,
a.btn-primary:hover {
    background: var(--wm-green-dark) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

.btn-secondary,
a.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    background: transparent !important;
    color: var(--wm-green) !important;
    font-family: var(--font-ui) !important;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 0.375rem;
    border: 2px solid var(--wm-green) !important;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-decoration: none !important;
}
.btn-secondary:hover,
a.btn-secondary:hover {
    background: var(--wm-green) !important;
    color: #fff !important;
}

.btn-secondary-light,
a.btn-secondary-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    background: transparent !important;
    color: #fff !important;
    font-family: var(--font-ui) !important;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 0.375rem;
    border: 2px solid rgba(255,255,255,0.6) !important;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none !important;
}
.btn-secondary-light:hover,
a.btn-secondary-light:hover {
    background: rgba(255,255,255,0.15) !important;
    color: #fff !important;
}


/* ================================================
   Components: Forms
   ================================================ */
.wm-input {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-family: var(--font-body) !important;
    font-size: 0.9375rem;
    color: var(--text-primary) !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-medium) !important;
    border-radius: 0.375rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.wm-input:focus {
    outline: none;
    border-color: var(--wm-green) !important;
    box-shadow: 0 0 0 3px rgba(74, 107, 58, 0.15);
}
textarea.wm-input { resize: vertical; min-height: 140px; }

.wm-select {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-family: var(--font-body) !important;
    font-size: 0.9375rem;
    color: var(--text-primary) !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-medium) !important;
    border-radius: 0.375rem;
}
.wm-select:focus {
    outline: none;
    border-color: var(--wm-green) !important;
    box-shadow: 0 0 0 3px rgba(74, 107, 58, 0.15);
}

.wm-label {
    display: block;
    font-family: var(--font-ui) !important;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary) !important;
    margin-bottom: 0.375rem;
}


/* ================================================
   Components: Divider
   ================================================ */
.wm-divider {
    width: 60px;
    height: 3px;
    background: var(--wm-brown) !important;
    border-radius: 2px;
    margin: 1rem 0;
}


/* ================================================
   Components: Hero
   ================================================ */
.wm-hero {
    background: linear-gradient(135deg, #141A1F 0%, #1C2228 40%, #2A3B2E 100%) !important;
    position: relative;
    overflow: hidden;
}
.wm-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 30%, rgba(74, 107, 58, 0.25), transparent 60%);
    pointer-events: none;
}
.wm-hero > * { position: relative; z-index: 1; }

.wm-hero h1,
.wm-hero .hero-title { color: #FFFFFF !important; }
.wm-hero .hero-subtitle { color: #C8D4BD !important; }
.wm-hero .hero-label {
    color: var(--wm-brown-light) !important;
    font-family: var(--font-heading) !important;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Hero with image background */
.wm-hero-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}
.wm-hero-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(20, 26, 31, 0.85) 0%, rgba(28, 34, 40, 0.75) 50%, rgba(42, 59, 46, 0.7) 100%);
}
.wm-hero-image > * { position: relative; z-index: 1; }


/* ================================================
   Components: Footer
   ================================================ */
.wm-footer {
    background: var(--wm-slate-dark) !important;
    color: #B9B3A2 !important;
}
.wm-footer a {
    color: #B9B3A2 !important;
    text-decoration: none;
    transition: color 0.15s;
}
.wm-footer a:hover { color: var(--wm-brown-light) !important; }
.wm-footer h3 { color: #F7F4EE !important; }


/* ================================================
   Components: Navigation
   ================================================ */
.wm-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background-color: rgba(247, 244, 238, 0.95) !important;
    border-bottom: 1px solid var(--border-light) !important;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .wm-nav {
        background-color: rgba(28, 34, 40, 0.95) !important;
    }
}
[data-theme="dark"] .wm-nav {
    background-color: rgba(28, 34, 40, 0.95) !important;
}

.wm-nav .nav-logo {
    font-family: var(--font-heading) !important;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text-primary) !important;
    letter-spacing: 0.02em;
}
.wm-nav .nav-logo-sub {
    font-family: var(--font-heading) !important;
    font-size: 0.6875rem;
    color: var(--text-tertiary) !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-top: -2px;
}

.wm-nav .mobile-menu {
    background: var(--bg-card) !important;
    border-top: 1px solid var(--border-light) !important;
}
.wm-nav .mobile-link { color: var(--text-primary) !important; font-family: var(--font-ui) !important; }
.wm-nav .theme-toggle { color: var(--text-tertiary) !important; }

.nav-link {
    font-family: var(--font-ui) !important;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary) !important;
    text-decoration: none !important;
    padding: 0.375rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}
.nav-link:hover { color: var(--wm-green) !important; }
.nav-link.active {
    color: var(--wm-green) !important;
    border-bottom-color: var(--wm-green);
}


/* ================================================
   Alerts
   ================================================ */
.alert-error {
    background: rgba(176, 58, 46, 0.08);
    border: 1px solid rgba(176, 58, 46, 0.35);
    color: #8B3024;
    border-radius: 0.375rem;
    padding: 0.875rem 1rem;
    margin-bottom: 1.25rem;
}
[data-theme="dark"] .alert-error {
    background: rgba(244, 114, 100, 0.08);
    color: #F9B4AC;
}

.alert-success {
    background: rgba(74, 107, 58, 0.1);
    border: 1px solid rgba(74, 107, 58, 0.35);
    color: var(--wm-green-dark);
    border-radius: 0.375rem;
    padding: 0.875rem 1rem;
    margin-bottom: 1.25rem;
}


/* ================================================
   Semantic colour classes
   ================================================ */
.color-primary   { color: var(--text-primary) !important; }
.color-secondary { color: var(--text-secondary) !important; }
.color-tertiary  { color: var(--text-tertiary) !important; }
.color-link      { color: var(--text-link) !important; }
.color-green     { color: var(--wm-green) !important; }
.color-brown     { color: var(--wm-brown) !important; }
.color-white     { color: #FFFFFF !important; }

.bg-site-primary   { background-color: var(--bg-primary) !important; }
.bg-site-secondary { background-color: var(--bg-secondary) !important; }
.bg-site-card      { background-color: var(--bg-card) !important; }

.font-heading { font-family: var(--font-heading) !important; }
.font-ui      { font-family: var(--font-ui) !important; }
.font-body    { font-family: var(--font-body) !important; }

.border-site { border-color: var(--border-light) !important; }


/* ================================================
   Feature list (Units To Let bullets)
   ================================================ */
.wm-feature-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}
.wm-feature-list li {
    padding: 0.5rem 0 0.5rem 1.75rem;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.6;
}
.wm-feature-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.95rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--wm-green);
}


/* ================================================
   Image treatments
   ================================================ */
.wm-photo {
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--border-light);
}
.wm-photo img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}
.wm-photo:hover img {
    transform: scale(1.03);
}

/* Size variants for the low-resolution legacy images — cap display width
   to avoid visible softness / upscaling artefacts. */
.wm-photo-sm  { max-width: 280px; margin-left: auto; margin-right: auto; }
.wm-photo-md  { max-width: 420px; margin-left: auto; margin-right: auto; }
.wm-photo-lg  { max-width: 560px; margin-left: auto; margin-right: auto; }
