/* Global layout styles */

:root {
    /* Verdant Ethos type system */
    --font-display: "Bricolage Grotesque", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: "Hanken Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Verdant Ethos color system (OKLCH) */
    --deep-forest: oklch(48.46% 0.0954 159.3);
    --deep-forest-dark: oklch(from var(--deep-forest) calc(l - 0.1) c h);
    --deep-forest-light: oklch(from var(--deep-forest) calc(l + 0.1) c h);

    --harvest-gold: oklch(88.12% 0.0751 88.8);
    --harvest-gold-dark: oklch(from var(--harvest-gold) calc(l - 0.1) c h);
    --harvest-gold-light: oklch(from var(--harvest-gold) calc(l + 0.1) c h);

    --eco-cream: oklch(95.23% 0.0206 67.58);
    --eco-cream-dark: oklch(from var(--eco-cream) calc(l - 0.1) c h);
    --eco-cream-light: oklch(from var(--eco-cream) calc(l + 0.1) c h);

    --ink-stone: oklch(22.31% 0.0065 135.1);
    --off-white: oklch(99.40% 0.0001 263.3);

    /* Semantic aliases */
    --primary: var(--deep-forest);
    --secondary: var(--harvest-gold);
    --tertiary: var(--eco-cream);

    --background: var(--eco-cream);
    --surface: var(--off-white);
    --surface-variant: var(--eco-cream-dark);

    --on-primary: var(--off-white);
    --on-secondary: var(--ink-stone);
    --on-tertiary: var(--ink-stone);
    --on-background: var(--ink-stone);
    --on-surface: var(--ink-stone);

    --outline: color-mix(in oklch, var(--ink-stone) 20%, transparent);
    --outline-variant: var(--eco-cream);
    --error: #ba1a1a;
    --on-error: var(--off-white);

    /* Spacing */
    --container-max: 1280px;
    --gutter: 1rem;
    --section-padding: 1.5rem;
    --section-padding-mobile: 1.5rem;
    --stack-sm: 0.75rem;
    --stack-md: 1.5rem;
    --stack-lg: 3rem;

    /* Radii */
    --radius-sm: 0.25rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

@media (min-width: 768px) {
    :root {
        --gutter: 2rem;
    }
}

* {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--on-surface);
    background-color: var(--background);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.3;
    color: var(--deep-forest-dark);
}

main {
    flex: 1;
}

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

/* ── Header ────────────────────────────────────────────────── */

.site-header {
    position: relative;
    z-index: 100;
    padding: 1rem 0;
    background-color: var(--surface);
    border-bottom: 1px solid var(--outline-variant);
}

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-header__logo {
    display: inline-flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--deep-forest);
    text-decoration: none;
    font-family: var(--font-display);
}

@media (min-width: 768px) {
    .site-header__logo {
        font-size: 1.5rem;
    }
}

.site-header__logo-img {
    display: block;
    max-width: 140px;
    max-height: 52px;
    width: auto;
    height: auto;
}

@media (min-width: 768px) {
    .site-header__logo-img {
        max-width: 160px;
        max-height: 60px;
    }
}

.site-header__menu-toggle {
    display: none;
}

.js-enabled .site-header__menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    margin-left: auto;
    background-color: transparent;
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.js-enabled .site-header__menu-toggle:hover,
.js-enabled .site-header__menu-toggle:focus {
    background-color: var(--surface-variant);
    border-color: var(--outline);
    outline: none;
}

@media (min-width: 768px) {
    .js-enabled .site-header__menu-toggle {
        display: none;
    }
}

.site-header__menu-toggle[aria-expanded="true"] .site-header__menu-icon,
.site-header__menu-toggle[aria-expanded="true"] .site-header__menu-icon::before,
.site-header__menu-toggle[aria-expanded="true"] .site-header__menu-icon::after {
    background-color: var(--deep-forest);
}

.site-header__menu-icon {
    position: relative;
    display: block;
    width: 1.25rem;
    height: 2px;
    background-color: var(--ink-stone);
    transition: background-color 0.2s ease;
}

.site-header__menu-icon::before,
.site-header__menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 1.25rem;
    height: 2px;
    background-color: var(--ink-stone);
    transition: transform 0.2s ease;
}

.site-header__menu-icon::before {
    top: -6px;
}

.site-header__menu-icon::after {
    top: 6px;
}

.site-header__menu-toggle[aria-expanded="true"] .site-header__menu-icon {
    background-color: transparent;
}

.site-header__menu-toggle[aria-expanded="true"] .site-header__menu-icon::before {
    transform: translateY(6px) rotate(45deg);
}

.site-header__menu-toggle[aria-expanded="true"] .site-header__menu-icon::after {
    transform: translateY(-6px) rotate(-45deg);
}

.site-header__nav {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding-top: 1rem;
    gap: 0;
}

.js-enabled .site-header__nav {
    display: none;
}

.js-enabled .site-header__nav.is-open {
    display: flex;
}

@media (min-width: 768px) {
    .site-header__nav,
    .js-enabled .site-header__nav {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        width: auto;
        padding-top: 0;
        gap: 1rem 1.5rem;
    }
}

.site-header__link {
    display: inline-block;
    padding: 0.75rem 0;
    color: var(--on-surface);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease, font-weight 0.2s ease;
}

@media (min-width: 768px) {
    .site-header__link {
        display: block;
        padding: 0 0 0.25rem;
        font-size: 0.875rem;
    }
}

.site-header__link:hover,
.site-header__link.is-active {
    color: var(--deep-forest);
    border-bottom-color: var(--deep-forest);
}

.site-header__link.is-active {
    font-weight: 700;
}

.site-header__sublink.is-active {
    color: var(--deep-forest);
    background-color: var(--surface-variant);
    font-weight: 700;
}

.site-header__dropdown {
    position: relative;
}

.site-header__subnav {
    display: none;
    margin: 0;
    padding: 0.5rem 0 0.5rem 1rem;
    list-style: none;
    background-color: var(--surface);
    border-left: 2px solid var(--outline-variant);
}

@media (min-width: 768px) {
    .site-header__subnav {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 10rem;
        padding: 0.5rem 0;
        border: 1px solid var(--outline-variant);
        border-radius: var(--radius);
        box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.08);
        z-index: 100;
    }
}

.site-header__dropdown:hover .site-header__subnav,
.site-header__dropdown:focus-within .site-header__subnav,
.site-header__dropdown.is-open .site-header__subnav {
    display: block;
}

@media (max-width: 767px) {
    .site-header__subnav {
        display: block;
        padding-left: 1rem;
        border-left: 2px solid var(--outline-variant);
        box-shadow: none;
        border-radius: 0;
        border-top: none;
        border-right: none;
        border-bottom: none;
    }
}

.site-header__sublink {
    display: block;
    padding: 0.5rem 0;
    color: var(--on-surface);
    text-decoration: none;
    white-space: nowrap;
    font-size: 0.9375rem;
}

@media (min-width: 768px) {
    .site-header__sublink {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

.site-header__sublink:hover {
    background-color: var(--surface-variant);
    color: var(--deep-forest);
}

.site-header__search {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    width: 100%;
    padding-top: 1rem;
}

.js-enabled .site-header__search {
    display: none;
}

.js-enabled .site-header__search.is-open {
    display: flex;
}

@media (min-width: 768px) {
    .site-header__search,
    .js-enabled .site-header__search {
        display: flex;
        width: auto;
        padding-top: 0;
        max-width: 100%;
    }
}

.site-header__search-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.5rem;
    border: 1px solid var(--outline);
    border-radius: var(--radius);
    font-size: 1rem;
    background-color: var(--surface);
    color: var(--on-surface);
}

@media (min-width: 768px) {
    .site-header__search-input {
        max-width: 12rem;
        font-size: 0.875rem;
    }
}

.site-header__search-input:focus {
    outline: none;
    border-color: var(--primary);
    border-width: 2px;
}

.site-header__search-button {
    padding: 0.5rem 1rem;
    background-color: var(--deep-forest);
    color: var(--eco-cream);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.site-header__search-button:hover {
    background-color: var(--deep-forest-dark);
}

/* ── Footer ────────────────────────────────────────────────── */

.page-meta-bar {
    padding: 0.75rem 0;
    background-color: transparent;
    color: var(--deep-forest);
    border-bottom: 1px solid var(--outline-variant);
}

.page-meta-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    font-size: 14px;
}

.breadcrumbs__link {
    color: var(--deep-forest);
    text-decoration: none;
    opacity: 0.75;
}

.breadcrumbs__link:hover {
    opacity: 1;
    text-decoration: underline;
}

.breadcrumbs__sep {
    opacity: 0.4;
}

.breadcrumbs__current {
    opacity: 0.65;
}

.quote-widget {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 14px;
}

.quote-widget__count {
    opacity: 0.9;
}

.quote-widget__link {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--deep-forest);
    color: var(--deep-forest);
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
}

.quote-widget__link:hover {
    background-color: var(--deep-forest);
    color: var(--eco-cream);
}

.site-footer {
    padding: 3rem 0 1.5rem;
    background-color: var(--deep-forest-dark);
    border-top: 1px solid var(--deep-forest-light);
    color: var(--eco-cream);
}

.site-footer__inner {
    display: grid;
    gap: 2rem;
}

.site-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
}

.site-footer__logo {
    display: inline-block;
    color: var(--eco-cream);
    text-decoration: none;
}

.site-footer__logo-img {
    display: block;
    width: auto;
    max-width: 120px;
    height: auto;
}

.site-footer__logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
}

.site-footer__social-wrap {
    max-width: 120px;
    width: 100%;
}

.site-footer__social {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--eco-cream);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.site-footer__social-link:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.site-footer__social-icon {
    width: 1.5rem;
    height: 1.5rem;
    fill: currentColor;
}

.site-footer__heading {
    margin: 0 0 1rem;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--eco-cream);
}

.site-footer__menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.site-footer__subnav {
    margin: 0.25rem 0 0.5rem;
    padding-left: 1rem;
    list-style: none;
    border-left: 1px solid var(--deep-forest-light);
}

.site-footer__sublink {
    display: inline-block;
    padding: 0.25rem 0;
    color: var(--eco-cream);
    text-decoration: none;
    opacity: 0.75;
    font-size: 0.9375rem;
    transition: opacity 0.2s ease;
}

.site-footer__sublink:hover,
.site-footer__sublink.is-active {
    opacity: 1;
    text-decoration: underline;
}

.site-footer__link {
    display: inline-block;
    color: var(--eco-cream);
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.site-footer__link:hover,
.site-footer__link.is-active {
    opacity: 1;
    text-decoration: underline;
}

.site-footer__address {
    font-style: normal;
    line-height: 1.6;
}

.site-footer__address p {
    margin: 0 0 0.5rem;
    color: var(--eco-cream);
    opacity: 0.85;
}

.site-footer__contact-link {
    color: var(--eco-cream);
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.site-footer__contact-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.site-footer__legal {
    padding-top: 1.5rem;
    border-top: 1px solid var(--deep-forest-light);
    text-align: center;
}

.site-footer__legal p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--eco-cream);
    opacity: 0.7;
}

@media (min-width: 768px) {
    .site-footer__inner {
        grid-template-columns: 1.5fr 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 3rem 2rem;
    }

    .site-footer__brand {
        grid-column: 1;
        grid-row: 1;
    }

    .site-footer__nav {
        grid-column: 2;
        grid-row: 1;
    }

    .site-footer__contact {
        grid-column: 3;
        grid-row: 1;
    }

    .site-footer__legal {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

/* ── Buttons ───────────────────────────────────────────────── */

.button--eco-cream {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--eco-cream);
    color: var(--deep-forest);
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.button--eco-cream:hover {
    background-color: var(--eco-cream-dark);
}

/* ── Utility ───────────────────────────────────────────────── */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
