/* ============================================================
   Schottlerworks — shared site chrome (header, breadcrumb, footer)
   Linked from EVERY page, whatever its own stylesheet (sw2.css,
   sw.css, or a NeverSpend title's embedded styles), so the top and
   bottom of the site are identical everywhere. Self-contained: all
   rules are scoped under .site-header / .crumb-bar / .site-footer
   and use their own --sw-* tokens, so page styles can't leak in.
   ============================================================ */

.site-header, .crumb-bar, .site-footer {
    --sw-cream: #FBF5EC;
    --sw-sand: #F4E7D4;
    --sw-ink: #2A1F17;
    --sw-ink-2: #5E4D40;
    --sw-ink-3: #8C7A6B;
    --sw-line: rgba(42,31,23,0.10);
    --sw-accent: #C4532A;
    --sw-accent-dark: #8F3A1C;
    --sw-sun: #F2B84B;
    --sw-head: 'Bricolage Grotesque', 'DM Sans', system-ui, sans-serif;
    --sw-body: 'DM Sans', system-ui, sans-serif;
    font-family: var(--sw-body);
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}
.site-header *, .crumb-bar *, .site-footer * { box-sizing: border-box; }
.sw-wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

/* Older pages sit inside a centred .wrapper; break the chrome out to full width. */
.wrapper > .site-header, .wrapper > .crumb-bar, .wrapper > .site-footer {
    margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
}

/* ---------------- header ---------------- */
.site-header {
    position: sticky; top: 0; z-index: 900;
    background: rgba(251,245,236,0.9);
    backdrop-filter: saturate(1.4) blur(12px);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--sw-line);
    padding: 0; margin-top: 0;
}
.site-header .sw-wrap { display: flex; align-items: center; gap: 28px; height: 72px; }
.sw-brand {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--sw-head); font-weight: 800; font-size: 1.35rem; line-height: 1;
    letter-spacing: -0.02em; text-decoration: none; color: var(--sw-ink);
}
.sw-brand-mark {
    width: 34px; height: 34px; border-radius: 10px;
    background: var(--sw-accent); color: #fff;
    display: grid; place-items: center;
    font-size: 1.05rem; font-weight: 800;
    box-shadow: inset 0 -3px 0 rgba(0,0,0,0.15);
    transform: rotate(-4deg);
}
.sw-nav { display: flex; gap: 4px; margin-left: auto; }
.sw-nav a {
    text-decoration: none; color: var(--sw-ink-2); font-weight: 500; font-size: 0.97rem; line-height: 1.2;
    padding: 8px 14px; border-radius: 999px; transition: background .2s, color .2s;
}
.sw-nav a:hover { background: var(--sw-sand); color: var(--sw-ink); }
.sw-nav a[aria-current="page"] { background: var(--sw-ink); color: var(--sw-cream); }
.sw-cta {
    margin-left: 8px; display: inline-flex; align-items: center;
    background: var(--sw-accent); color: #fff; text-decoration: none;
    font-weight: 600; font-size: 0.92rem; line-height: 1.1;
    padding: 9px 16px; border-radius: 999px;
    box-shadow: 0 4px 0 var(--sw-accent-dark);
    transition: transform .2s ease, box-shadow .2s ease;
}
.sw-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--sw-accent-dark), 0 12px 24px rgba(196,83,42,0.25); }
.site-header a:focus-visible, .site-footer a:focus-visible, .crumb-bar a:focus-visible { outline: 3px solid var(--sw-sun); outline-offset: 3px; }
@media (max-width: 860px) {
    /* Two-row header on phones: let it scroll away so page sub-navs (wiki, recipes) can stick at top: 0. */
    .site-header { position: relative; }
    .site-header .sw-wrap { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 10px; row-gap: 8px; }
    .sw-cta { margin-left: auto; }
    .sw-nav { order: 3; width: 100%; margin-left: -10px; overflow-x: auto; scrollbar-width: none; }
    .sw-nav::-webkit-scrollbar { display: none; }
    .sw-nav a { white-space: nowrap; padding: 6px 12px; }
}
@media (max-width: 420px) {
    .sw-wrap { padding: 0 18px; }
    .sw-nav { gap: 0; }
    .sw-nav a { padding: 6px 9px; font-size: 0.92rem; }
}

/* ---------------- breadcrumb bar (inner pages) ---------------- */
.crumb-bar { padding: 16px 0 0; }
.crumb-bar .sw-crumbs {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
    font-size: 0.86rem; color: var(--sw-ink-3);
}
.crumb-bar a { color: var(--sw-ink-2); text-decoration: none; }
.crumb-bar a:hover { color: var(--sw-accent); text-decoration: underline; }
.crumb-bar .sep { color: var(--sw-ink-3); opacity: .7; }
.crumb-bar .here { color: var(--sw-ink); font-weight: 600; }

/* ---------------- footer ---------------- */
.site-footer { background: var(--sw-ink); color: #D9CBBB; padding: 64px 0 36px; margin-top: 72px; border: 0; }
.sw-footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 36px; }
.site-footer .sw-brand { color: var(--sw-cream); }
.site-footer p { font-size: 0.95rem; line-height: 1.6; margin: 14px 0 0; max-width: 26em; color: #BFAF9E; }
.site-footer h4 {
    font-family: var(--sw-head); color: var(--sw-cream); font-size: 1rem; font-weight: 700;
    margin: 0 0 12px; letter-spacing: -0.01em; text-transform: none;
}
.site-footer ul { list-style: none; display: grid; gap: 8px; margin: 0; padding: 0; }
.site-footer ul a { color: #D9CBBB; text-decoration: none; font-size: 0.95rem; }
.site-footer ul a:hover { color: var(--sw-sun); }
.sw-social { display: flex; gap: 10px; margin-top: 20px; }
.sw-social a {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    background: rgba(251,245,236,0.08); color: var(--sw-cream); transition: background .2s, transform .2s;
}
.sw-social a:hover { background: var(--sw-accent); transform: translateY(-2px); }
.sw-social svg { width: 18px; height: 18px; display: block; }
.sw-footer-base {
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
    border-top: 1px solid rgba(251,245,236,0.12); margin-top: 48px; padding-top: 22px;
    font-size: 0.86rem; color: #A8968A;
}
.sw-footer-base a { color: #A8968A; }
@media (max-width: 860px) {
    .sw-footer-grid { grid-template-columns: 1fr 1fr; }
    .sw-footer-grid > :first-child { grid-column: 1 / -1; }
}
