/* ==========================================================================
   Northwind Trust — giant-cms demo theme
   A warm, editorial charity aesthetic. Targets the project-template's existing
   BEM/semantic markup. Hand-authored (no build step).
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400..700;1,9..144,400..600&family=Hanken+Grotesk:wght@400;500;600;700&display=swap");

/* ---- Design tokens ------------------------------------------------------- */
:root {
    --cream: #fbf7f0;
    --cream-deep: #f3ebdd;
    --ink: #1f2e28;
    --ink-soft: #4a5a52;
    --green-900: #10271f;
    --green-700: #1c5c49;   /* primary */
    --green-500: #2f7d63;
    --green-100: #e3efe7;
    --coral: #e8743b;        /* accent */
    --coral-soft: #f4a35e;
    --blue: #3e6b7a;         /* --blue modifier */
    --blue-100: #e0ecef;
    --terracotta: #c75b39;   /* --red modifier */
    --card: #ffffff;
    --line: rgba(16, 39, 31, 0.12);
    --shadow-sm: 0 2px 8px -4px rgba(16, 39, 31, 0.4);
    --shadow: 0 20px 44px -28px rgba(16, 39, 31, 0.55);
    --shadow-lg: 0 36px 70px -36px rgba(16, 39, 31, 0.5);
    --radius: 18px;
    --radius-sm: 12px;
    --radius-pill: 999px;
    --display: "Fraunces", Georgia, serif;
    --body: "Hanken Grotesk", system-ui, sans-serif;
    --maxw: 1180px;
    --gutter: clamp(1.1rem, 4vw, 2.5rem);
}

/* ---- Reset & base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: var(--body);
    color: var(--ink);
    background: var(--cream);
    line-height: 1.65;
    font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--green-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--coral); }
ul, ol { padding: 0; list-style: none; }

h1, h2, h3, h4, .h3 {
    font-family: var(--display);
    line-height: 1.08;
    font-weight: 540;
    letter-spacing: -0.015em;
    color: var(--green-900);
    text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 1.6rem + 4vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3rem); }
h3, .h3 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.7rem); }
h4 { font-size: 1.2rem; }
p { text-wrap: pretty; }

/* ---- Layout helpers ------------------------------------------------------ */
.wrapper { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrapper--xs { max-width: 720px; }
.wrapper--thin { max-width: 860px; }
.wrapper--very-thin { max-width: 760px; }
.wrapper--sm { max-width: 980px; }
.page-block { margin-block: clamp(3rem, 6vw, 6rem); }
main > .cms-placeholder:empty { display: none; }

.columns { display: grid; gap: clamp(1.25rem, 3vw, 2rem); }
.columns--2 { grid-template-columns: repeat(2, 1fr); }
.columns--3 { grid-template-columns: repeat(3, 1fr); }
.columns--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) { .columns--3, .columns--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .columns--2, .columns--3, .columns--4 { grid-template-columns: 1fr; } }

.skip-links { position: absolute; left: -9999px; top: 0; }
.skip-links a:focus { position: fixed; left: 1rem; top: 1rem; z-index: 200; background: var(--green-900); color: #fff; padding: 0.6rem 1rem; border-radius: 8px; }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; gap: 0.5em;
    font-family: var(--body); font-weight: 600; font-size: 1rem;
    background: var(--green-700); color: #fff;
    padding: 0.85em 1.5em; border-radius: var(--radius-pill);
    text-decoration: none; border: 0; cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
    box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--green-900); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--ghost, .cta-block .btn { background: var(--coral); }
.cta-block .btn:hover { background: #d25f28; }

.arrow-btn, .more-btn {
    display: inline-flex; align-items: center; gap: 0.45em;
    font-weight: 600; color: var(--green-700); text-decoration: none;
}
.arrow-btn svg, .arrow-btn img { width: 1.1em; height: 1.1em; transition: transform 0.18s ease; }
.arrow-btn:hover { color: var(--coral); }
.arrow-btn:hover svg, .arrow-btn:hover img { transform: translateX(4px); }

/* ---- Header / nav -------------------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(251, 247, 240, 0.85);
    backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.site-header__bar {
    max-width: var(--maxw); margin-inline: auto; padding: 0.85rem var(--gutter);
    display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.site-brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--green-900); }
.site-brand svg, .site-brand img { width: 38px; height: 38px; }
.site-brand__name { font-family: var(--display); font-weight: 600; font-size: 1.3rem; letter-spacing: -0.02em; }
.site-header nav#navigation { flex: 1; }
.site-header nav#navigation > ul {
    display: flex; align-items: center; justify-content: flex-end; gap: 0.35rem; flex-wrap: wrap;
}
#navigation li.child { position: relative; }
#navigation li.child > a {
    display: inline-block; padding: 0.5rem 0.9rem; border-radius: var(--radius-pill);
    font-weight: 600; color: var(--ink); text-decoration: none; font-size: 0.98rem;
    transition: background 0.15s ease, color 0.15s ease;
}
#navigation li.child > a:hover { background: var(--green-100); color: var(--green-900); }
#navigation li.selected > a { background: var(--green-700); color: #fff; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
    .nav-toggle {
        display: inline-flex; align-items: center; justify-content: center;
        width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 12px;
        background: var(--card); cursor: pointer; gap: 0; flex-direction: column;
    }
    .nav-toggle span { display: block; width: 20px; height: 2px; background: var(--green-900); margin: 2px 0; transition: 0.2s; }
    .site-header nav#navigation {
        position: absolute; top: 100%; left: 0; right: 0; background: var(--cream);
        border-bottom: 0; padding: 0;
        max-height: 0; overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease; box-shadow: var(--shadow);
    }
    body.nav-open .site-header nav#navigation {
        max-height: 80vh;
        border-bottom: 1px solid var(--line); padding: 1rem var(--gutter) 1.5rem;
    }
    .site-header nav#navigation > ul { flex-direction: column; align-items: stretch; gap: 0.2rem; }
    #navigation li.child > a { display: block; padding: 0.8rem 1rem; }
}

/* ---- Breadcrumb ---------------------------------------------------------- */
.breadcrumb { border-bottom: 1px solid var(--line); background: var(--cream); }
.breadcrumb .wrapper { padding-block: 0.9rem; }
.breadcrumb ul { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.88rem; color: var(--ink-soft); }
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb li img { width: 8px; height: 8px; opacity: 0.4; }
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--coral); }

/* ---- Hero ---------------------------------------------------------------- */
.hero {
    display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: stretch;
    gap: clamp(1.5rem, 4vw, 3.5rem);
    background:
        radial-gradient(120% 120% at 0% 0%, var(--green-100) 0%, transparent 55%),
        linear-gradient(160deg, var(--cream) 0%, var(--cream-deep) 100%);
    border-bottom: 1px solid var(--line);
}
.hero__text { display: flex; align-items: center; padding-block: clamp(2.5rem, 6vw, 5.5rem); }
.hero__text .wrapper { margin-inline: 0; max-width: 620px; padding-right: 1rem; }
.hero__text h1 { margin-bottom: 1.1rem; }
.hero__text h1::after {
    content: ""; display: block; width: 84px; height: 6px; margin-top: 1.3rem;
    background: var(--coral); border-radius: var(--radius-pill);
}
.hero__text p { font-size: 1.2rem; color: var(--ink-soft); max-width: 48ch; }
.hero__ctas { margin-top: 2rem; }
.hero__image { position: relative; min-height: 320px; overflow: hidden; }
.hero__image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 820px) {
    .hero { grid-template-columns: 1fr; }
    .hero__image { min-height: 240px; order: -1; }
}

/* ---- Key stats ----------------------------------------------------------- */
.stats__blue {
    background: linear-gradient(165deg, var(--green-700), var(--green-900));
    color: #fff; padding-block: clamp(3rem, 6vw, 5rem); border-radius: var(--radius);
    margin-inline: var(--gutter); margin-block: clamp(3rem, 6vw, 6rem);
}
.stats__blue-heading { text-align: center; max-width: 640px; margin-inline: auto; padding-inline: 1.5rem; margin-bottom: 2.5rem; }
.stats__blue-heading h3 { color: #fff; font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.6rem); }
.stats__blue-heading p { color: rgba(255, 255, 255, 0.78); margin-top: 0.75rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; }
.stats__card { text-align: center; padding: 1rem; }
.stats__card-text h4 { font-family: var(--display); font-size: clamp(2.6rem, 2rem + 2.5vw, 3.8rem); color: var(--coral-soft); line-height: 1; }
.stats__card-text p { color: rgba(255, 255, 255, 0.82); margin-top: 0.5rem; font-weight: 500; }

/* ---- Card rows (simple / icon) ------------------------------------------- */
.simple-card, .icon-card {
    height: 100%; background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.1rem);
    box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 0.75rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.simple-card:hover, .icon-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.icon-card img { width: auto; max-width: 72px; max-height: 72px; align-self: flex-start; }
.simple-card h3 { color: var(--green-900); }
.simple-card p { color: var(--ink-soft); flex: 1; }
.simple-card--primary { border-top: 5px solid var(--green-700); }
.simple-card--blue { border-top: 5px solid var(--blue); }
.simple-card--red { border-top: 5px solid var(--terracotta); }
.simple-card--white { border-top: 5px solid var(--coral); }
.simple-card .arrow-btn { margin-top: auto; }

/* ---- Featured CTA -------------------------------------------------------- */
.cta-block { margin-block: clamp(3rem, 6vw, 6rem); }
.cta-block__cta {
    background:
        radial-gradient(90% 140% at 100% 0%, rgba(232,116,59,0.18) 0%, transparent 50%),
        var(--green-900);
    color: #fff; border-radius: var(--radius); padding-block: clamp(2.5rem, 5vw, 4rem);
    margin-inline: var(--gutter);
}
.cta-block__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.cta-block__col h2 { color: #fff; }
.cta-block__col p { color: rgba(255, 255, 255, 0.8); margin-bottom: 1.5rem; }
@media (max-width: 760px) { .cta-block__cols { grid-template-columns: 1fr; } }
.cta-block__image { width: 100%; border-radius: var(--radius-sm); }
.cta-block__col h2 + p { margin-top: 0.75rem; }
.cta-block__col h2 + .btn { margin-top: 1.5rem; }

/* ---- Page cards & content/news cards ------------------------------------- */
.page-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: clamp(1.25rem, 3vw, 2rem); }
.page-cards__card, .news-cards__card, .event-cards__card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.page-cards__card:hover, .news-cards__card:hover, .event-cards__card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.page-cards__image, .news-cards__card-image img, .event-cards__card-image img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.page-cards__content, .news-cards__card-text, .event-cards__card-text { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.news-cards .wrapper, .news-cards__cards, .event-cards .wrapper, .article-cards .wrapper {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: clamp(1.25rem, 3vw, 2rem);
}
.news-info { display: flex; gap: 1rem; font-size: 0.82rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.news-info .date { color: var(--coral); }

/* ---- Pullquote / rich text ----------------------------------------------- */
.text-block { font-size: 1.1rem; }
.text-block h2, .text-block h3 { margin-block: 1.4rem 0.6rem; }
.text-block p, .text-block ul, .text-block ol { margin-bottom: 1rem; }
.text-block ul { list-style: disc; padding-left: 1.3rem; }
.quote { margin-block: clamp(2.5rem, 5vw, 4rem); }
.quote__inner { font-family: var(--display); font-size: clamp(1.4rem, 1.1rem + 1.6vw, 2.1rem); line-height: 1.3; color: var(--green-900); border-left: 5px solid var(--coral); padding-left: 1.5rem; font-style: italic; }
.quote__inner--with-image { display: grid; grid-template-columns: minmax(0, 1fr) clamp(140px, 30%, 240px); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.quote__image { width: 100%; aspect-ratio: 1; object-fit: cover; background: #fff; padding: 0.5rem 0.5rem 1.5rem; box-shadow: var(--shadow); transform: rotate(2deg); }
.quote figcaption { margin-top: 1rem; font-family: var(--body); font-style: normal; font-size: 1rem; font-weight: 500; line-height: 1.4; color: var(--ink-soft); }
.quote figcaption p:not(:empty):not(:has(> a:empty))::before { content: "\2014\00a0"; }
.quote figcaption a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 600px) { .quote__inner--with-image { grid-template-columns: 1fr; } .quote__image { max-width: 200px; } }

/* ---- Filter form --------------------------------------------------------- */
.filter-form { margin-block: clamp(1.5rem, 4vw, 2.75rem) clamp(1.25rem, 3vw, 2rem); }
.filter-form__inner { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.filter-form__field { position: relative; }
.filter-form__query { display: flex; align-items: center; flex: 1 1 280px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 0.25rem 0.25rem 0.25rem 1.1rem; box-shadow: var(--shadow-sm); }
.filter-form__query input[type="text"] { flex: 1; border: 0; background: none; font: inherit; padding: 0.55rem 0.4rem; outline: none; min-width: 0; }
.filter-form__submit { border: 0; cursor: pointer; background: var(--green-700); color: #fff; font: inherit; font-weight: 600; padding: 0.6rem 1.25rem; border-radius: var(--radius-pill); }
.filter-form__submit:hover { background: var(--green-900); }
.filter-form__dropdown__opener {
    display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; font: inherit; font-weight: 600;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 0.7rem 1.2rem; color: var(--ink); box-shadow: var(--shadow-sm);
}
.filter-form__dropdown__opener svg { width: 14px; transition: transform 0.2s ease; }
.filter-form__dropdown.open .filter-form__dropdown__opener svg { transform: rotate(180deg); }
.filter-form__dropdown__options {
    position: absolute; z-index: 30; top: calc(100% + 0.5rem); left: 0; min-width: 230px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow);
    padding: 0.75rem 1rem; display: none;
}
.filter-form__dropdown.open .filter-form__dropdown__options { display: block; }
.filter-form__dropdown__options label, .filter-form__dropdown__options li { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0; white-space: nowrap; }
.filter-form select { padding: 0.7rem 2rem 0.7rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius-pill); font: inherit; background: var(--card); box-shadow: var(--shadow-sm); cursor: pointer; }
.filter-form__lower { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; font-size: 0.9rem; }
.filter-form__clear { color: var(--ink-soft); text-decoration: underline; }
.filter-form__clear:hover { color: var(--coral); }
.filter-form__tags__opener { display: inline-flex; align-items: center; gap: 0.4rem; background: none; border: 0; cursor: pointer; font: inherit; color: var(--green-700); font-weight: 600; }
.filter-form__tags__opener svg { width: 13px; height: 13px; transition: transform 0.2s ease; }
.filter-form__lower.show-tags .filter-form__tags__opener svg { transform: rotate(180deg); }
.filter-form .tag-list { display: none; flex-wrap: wrap; gap: 0.5rem; }
.filter-form__lower.show-tags .tag-list { display: flex; }
.filter-form .tag-list label { border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 0.3rem 0.8rem; cursor: pointer; background: var(--card); }

/* ---- Pagination ---------------------------------------------------------- */
.pagination__items { display: flex; gap: 0.4rem; justify-content: center; margin-block: 2.5rem; }
.pagination__items a, .pagination__items span { padding: 0.5rem 0.85rem; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.pagination__items .active { background: var(--green-700); color: #fff; border-color: var(--green-700); }

/* ---- Vacancies ----------------------------------------------------------- */
.vacancy-card {
    background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--green-700);
    border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2rem); margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm); transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.vacancy-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.vacancy-card h4, .vacancy-card .h3 { color: var(--green-900); margin-bottom: 0.75rem; }
.vacancy-card__details { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-bottom: 1rem; }
.vacancy-card__details li { position: relative; font-weight: 600; color: var(--green-700); font-size: 0.9rem; }
.vacancy-card__details li:not(:last-child)::after { content: "·"; position: absolute; right: -0.9rem; color: var(--line); }
.vacancy-card__description { color: var(--ink-soft); margin-bottom: 1rem; }

/* ---- Detail page body ---------------------------------------------------- */
main > .text-block:first-child, main > h1 { margin-top: clamp(2rem, 5vw, 3.5rem); }
main > h1 { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.text-block h1 { font-size: clamp(2.1rem, 1.5rem + 2.5vw, 3.2rem); margin-bottom: 1rem; }
.text-block .lead { font-size: 1.25rem; color: var(--ink-soft); margin-bottom: 1.5rem; }
.text-block .meta-line { display: inline-block; font-weight: 600; color: var(--coral); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.85rem; margin-bottom: 1rem; }

/* ---- People -------------------------------------------------------------- */
.people-block__people { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; }
.people-block__person { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.people-block__person img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.people-block__person .details, .people-block__bio { padding: 1rem 1.2rem 1.3rem; }

/* ---- FAQs ---------------------------------------------------------------- */
.faqs__questions > * { border-bottom: 1px solid var(--line); }
.faqs .opener { width: 100%; text-align: left; background: none; border: 0; padding: 1.1rem 0; font-family: var(--display); font-size: 1.2rem; color: var(--green-900); cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; }
.faqs .content { padding-bottom: 1.1rem; color: var(--ink-soft); }

/* ---- Footer -------------------------------------------------------------- */
.site-footer {
    background: var(--green-900); color: rgba(255, 255, 255, 0.82);
    margin-top: clamp(3rem, 7vw, 7rem); padding: clamp(2.5rem, 5vw, 4rem) var(--gutter);
    display: grid; grid-template-columns: auto 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem);
    max-width: 100%;
}
.site-footer > ul { display: flex; gap: 0.6rem; align-items: flex-start; }
.site-footer > ul a { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,0.1); }
.site-footer > ul a:hover { background: var(--coral); }
.site-footer .icon img { width: 18px; filter: brightness(0) invert(1); }
.site-footer__right__column h4, .site-footer__right__column .h3 { color: #fff; font-size: 1.05rem; margin-bottom: 0.9rem; }
.site-footer__right__column a { color: rgba(255, 255, 255, 0.78); text-decoration: none; line-height: 2; }
.site-footer__right__column a:hover { color: var(--coral-soft); }
@media (max-width: 720px) { .site-footer { grid-template-columns: 1fr 1fr; } .site-footer > ul { grid-column: 1 / -1; } }

/* ---- CMS toolbar safety -------------------------------------------------- */
.cms-toolbar-expanded .site-header { top: 46px; }
