/*
 * Timber base styles — shared by the starter themes (Birch, Ebony).
 * Styles everything the CMS renders for you: inner pages, blog, posts, forms, 404 and the cookie notice hooks.
 * A theme sets the design tokens below on :root and adds its own header, footer and homepage sections.
 * Linked before the theme's own theme.css, so a theme can override anything here.
 */
:root {
    --bg: #faf7f2;
    --surface: #ffffff;
    --fg: #2a1f16;
    --muted: #6b5b4d;
    --line: #e8dfd3;
    /* Brand colours from Design → Branding arrive as --brand / --brand-2 / --brand-fg; until set, the theme's defaults apply. */
    --accent: var(--brand, #c2410c);
    --accent-fg: var(--brand-fg, #ffffff);
    --accent-2: var(--brand-2, #2f6f4e);
    --radius: 14px;
    --shadow: 0 1px 2px rgba(42, 31, 22, .06), 0 8px 24px -12px rgba(42, 31, 22, .18);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-head: var(--font);
    --max: 1120px;
    --narrow: 740px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.65; color: var(--fg); background: var(--bg); -webkit-font-smoothing: antialiased; }
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .5em; color: var(--fg); }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--fg); color: var(--bg); padding: 10px 14px; border-radius: 8px; transition: top .2s; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }
.no-select { -webkit-user-select: none; user-select: none; }
.no-select input, .no-select textarea { -webkit-user-select: text; user-select: text; }

.container { width: min(var(--max), 100% - 40px); margin-inline: auto; }
.container-narrow { width: min(var(--narrow), 100% - 40px); margin-inline: auto; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font: 600 15px/1.2 var(--font); text-decoration: none !important; cursor: pointer;
    border: 1px solid transparent; transition: transform .15s, box-shadow .2s, background .2s, color .2s, border-color .2s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-fg) !important; box-shadow: 0 8px 20px -10px var(--accent); }
.btn-primary:hover { box-shadow: 0 12px 26px -10px var(--accent); }
.btn-ghost, .btn-outline { background: transparent; color: var(--fg) !important; border-color: var(--line); }
.btn-ghost:hover, .btn-outline:hover { border-color: var(--fg); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-ic { display: inline-flex; }
.btn[disabled], .btn[aria-busy=true] { opacity: .6; pointer-events: none; }

/* ---------- inner-page title band (Design → Theme → Page Headers can restyle it) ---------- */
.page-hero { padding: clamp(56px, 9vw, 112px) 0 clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.page-hero .eyebrow, .eyebrow { margin: 0 0 12px; font: 700 12px/1 var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.page-hero .eyebrow a { color: inherit; text-decoration: none; }
.page-hero h1 { margin-bottom: .3em; }
.page-hero .sub { font-size: 1.2rem; color: var(--muted); max-width: 40em; margin: 0; }
.draft-note { display: inline-block; margin: 0 0 14px; padding: 5px 12px; border-radius: 99px; background: #fef3c7; color: #92400e; font: 600 12px/1 var(--font); }

/* ---------- page + post body ---------- */
.page-body { padding: clamp(32px, 6vw, 72px) 0 clamp(56px, 9vw, 112px); }
.prose { font-size: 1.1rem; line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 2em; } .prose h3 { margin-top: 1.7em; }
.prose img { border-radius: var(--radius); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; } .prose li { margin-bottom: .4em; }
.prose blockquote { margin: 1.6em 0; padding: .2em 0 .2em 1.2em; border-left: 4px solid var(--accent); color: var(--muted); font-size: 1.15em; }
.prose pre { overflow: auto; padding: 16px 18px; border-radius: 10px; background: var(--fg); color: var(--bg); font-size: .9rem; line-height: 1.55; }
.prose code { font-size: .9em; padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--fg) 8%, transparent); }
.prose pre code { padding: 0; background: none; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .95em; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose iframe, .prose video { max-width: 100%; border-radius: var(--radius); }
.article-cover { margin: clamp(24px, 4vw, 40px) auto 0; }
.article-cover img { width: 100%; border-radius: var(--radius); display: block; }

/* ---------- blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 28px; }
.post-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none !important; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 20px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.post-card-img { display: block; aspect-ratio: 16 / 10; border-radius: calc(var(--radius) - 4px); overflow: hidden; margin-bottom: 8px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--surface)), color-mix(in srgb, var(--accent-2) 22%, var(--surface))); }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.post-card:hover .post-card-img img { transform: scale(1.04); }
.post-meta { padding: 0 6px; font: 600 12px/1.2 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.post-title { padding: 0 6px; font: 700 1.2rem/1.25 var(--font-head); letter-spacing: -.01em; }
.post-excerpt { padding: 0 6px; color: var(--muted); font-size: .98rem; line-height: 1.55; }
.load-more-wrap { grid-column: 1 / -1; text-align: center; padding-top: 12px; }
.related { padding: 0 0 clamp(56px, 8vw, 100px); }
.related-title { margin-bottom: 24px; }

/* ---------- forms (padmin → Forms renders these) ---------- */
.request { padding: clamp(48px, 8vw, 100px) 0; }
.request-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.request-aside .sub { color: var(--muted); font-size: 1.15rem; }
.request-points { list-style: none; margin: 24px 0; padding: 0; display: grid; gap: 14px; }
.request-points li { position: relative; padding-left: 28px; }
.request-points li::before { content: ""; position: absolute; left: 0; top: .5em; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--accent) 25%, var(--surface)); }
.request-card { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); padding: clamp(22px, 3.4vw, 40px); box-shadow: var(--shadow); }
@media (max-width: 860px) { .request-grid { grid-template-columns: 1fr; } }

.form { display: flex; flex-wrap: wrap; gap: 16px 16px; }
.form > * { flex: 1 1 100%; }
.form .form-title { margin: 0 0 4px; font-size: 1.5rem; }
.form .field { flex: 1 1 100%; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form .field.half { flex: 1 1 calc(50% - 8px); }
@media (max-width: 560px) { .form .field.half { flex-basis: 100%; } }
.form label, .form .label { font: 600 14px/1.3 var(--font); }
.form .req { color: var(--accent); }
.form input[type=text], .form input[type=email], .form input[type=tel], .form input[type=url], .form input[type=number], .form input[type=date], .form input[type=password], .form input[type=file], .form select, .form textarea {
    width: 100%; font: inherit; font-size: 16px; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; transition: border-color .15s, box-shadow .15s; }
.form textarea { resize: vertical; min-height: 120px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 15px; }
.form .check input { margin-top: .35em; accent-color: var(--accent); }
.form .checks { display: flex; flex-wrap: wrap; gap: 8px; }
.form .chip-check { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 99px; font-weight: 500; font-size: 14px; cursor: pointer; background: var(--bg); }
.form .chip-check:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--bg)); }
.form .chip-check input { accent-color: var(--accent); }
.form .pf-help, .form small { color: var(--muted); font-size: 13px; }
.form .field-error { color: #b91c1c; font-size: 13px; margin: 0; }
.form .has-error input, .form .has-error textarea, .form .has-error select { border-color: #b91c1c; }
.form button[type=submit], .form .pf-next { justify-self: start; flex: 0 0 auto; }
.form.htmx-request button[type=submit] { opacity: .6; }
.form .pf-heading h3 { margin: 8px 0 0; }
.form .pf-nav { display: flex; gap: 10px; }
.pf-hp { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; overflow: hidden; }
.pf-closed { padding: 16px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 8%, var(--bg)); }
.form-done { text-align: center; padding: 20px 0; align-items: center; }
.form-done .done-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-2); color: #fff; font-size: 26px; }
.form-done .ref { color: var(--muted); font-size: 14px; }

/* ---------- misc ---------- */
.team-section { padding: 64px 0; }
.team-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 28px; }
.team-card { text-align: center; }
.team-card-photo { position: relative; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); display: grid; place-items: center; }
.team-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-card-initials { font: 700 2rem var(--font-head); color: var(--accent); }
.team-card-bio { display: none; }
.team-card-name { margin: 12px 0 0; font-size: 1.05rem; } .team-card-role { margin: 0; color: var(--muted); font-size: .92rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition-duration: .01ms !important; animation-duration: .01ms !important; } }

/* ---------- menus (padmin → Menus renders these; dropdown/mega styles are added by the CMS when a menu needs them) ---------- */
.pf-menu-list { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; padding: 0; align-items: center; }
.pf-menu a { text-decoration: none; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.btn-block { width: 100%; }
