/* Base: reset, typography, layout, header, drawer, footer, blog, widgets, 404. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { background: var(--page); color: var(--ink); }
body { margin: 0; font: 16px/1.65 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video, svg, canvas { max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { clip: auto; width: auto; height: auto; z-index: 100; top: 8px; left: 8px; padding: 10px 16px; background: var(--ink); color: var(--page); border-radius: var(--r-sm); }

h1, h2, h3, h4, h5, h6 { font-family: var(--display); font-weight: var(--display-weight); letter-spacing: var(--display-track); line-height: 1.12; text-wrap: balance; margin: 0 0 .5em; }
h1 { font-size: clamp(36px, 5vw, 64px); }
h2 { font-size: clamp(28px, 3.6vw, 44px); }
h3 { font-size: clamp(21px, 2.2vw, 26px); }
h4 { font-size: 19px; }
h5, h6 { font-size: 16px; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wide); margin: 0 auto; padding-left: var(--gl); padding-right: var(--gr); }

/* Block content: sections are full-width groups; plain blocks sit in the content column. */
.entry-content > *:not(.alignfull):not(.alignwide) { max-width: var(--wide); margin-left: auto; margin-right: auto; padding-left: var(--gl); padding-right: var(--gr); }
.entry-content > .alignwide { max-width: calc(var(--wide) + 120px); margin-inline: auto; }
.entry-content > .alignfull { max-width: none; }
.single-article .entry-content > *:not(.alignfull) { max-width: calc(var(--content) + 40px); }
.entry-content > p, .entry-content > ul, .entry-content > ol { color: var(--ink-2); }

/* ---------- Header ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--page); }
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: color-mix(in srgb, var(--page) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); color: var(--ink); transition: background .35s ease, border-color .35s ease, color .35s ease; }
.site-header.on-dark { background: transparent; border-color: transparent; color: #FFFFFF; backdrop-filter: none; -webkit-backdrop-filter: none; --mark-ink: #FFFFFF; }
.site-header.on-dark.is-scrolled { background: rgba(7, 15, 28, .78); border-color: rgba(255, 255, 255, .06); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); } /* text scrolling under the header stays readable */
.admin-bar .site-header { top: calc(32px + env(safe-area-inset-top, 0px)); }
.nav { display: flex; align-items: center; gap: 28px; min-height: 76px; }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; flex: none; }
.logo .logo-mark { width: 38px; height: 38px; flex: none; }
.logo .wm { display: flex; flex-direction: column; line-height: 1; }
.logo b { font: 700 20px/1 Unbounded, "Inter Tight", system-ui, sans-serif; letter-spacing: .02em; }
.logo small { font: 600 8.5px/1 var(--mono); letter-spacing: .26em; margin-top: 5px; opacity: .7; }
.nav-primary { margin-left: auto; }
.nav-links, .drawer-links, .footer-links { list-style: none; margin: 0; padding: 0; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { display: block; padding: 10px 14px; border-radius: var(--r-pill); text-decoration: none; font-weight: 500; font-size: 15px; opacity: .88; }
.nav-links a:hover { opacity: 1; background: color-mix(in srgb, currentColor 8%, transparent); }
.nav-links .current-menu-item > a, .nav-links a[aria-current="page"] { opacity: 1; box-shadow: inset 0 -2px 0 var(--coral); border-radius: 0; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-actions .phone { font-weight: 600; text-decoration: none; font-size: 15px; }
.on-dark .nav-cta { background: #FFFFFF; color: var(--ink); }
.burger { display: none; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid currentColor; background: transparent; color: inherit; cursor: pointer; place-items: center; opacity: .9; }
.drawer { border-top: 1px solid var(--line); background: var(--page); color: var(--ink); }
.drawer .wrap { display: grid; gap: 18px; padding-block: 8px 24px; }
.drawer-links { display: grid; gap: 2px; }
.drawer-links a { display: block; padding: 14px 4px; font: 600 22px/1.2 var(--display); letter-spacing: var(--display-track); text-decoration: none; border-bottom: 1px solid var(--line); }
.drawer .btn { justify-self: start; }

/* ---------- Page header (pages that show their title) ---------- */
.page-header { padding-block: 72px 24px; }
.page-header .entry-title { font-size: clamp(34px, 4.6vw, 56px); margin: 0; }

/* ---------- Blog ---------- */
.layout-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; padding-block: 64px 24px; align-items: start; }
.post-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.post-card { display: grid; gap: 12px; align-content: start; min-width: 0; }
.post-card .thumb { display: block; aspect-ratio: 16/10; border-radius: var(--r-md); overflow: hidden; background: linear-gradient(135deg, var(--mist), var(--teal-soft)); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.post-card:hover .thumb img { transform: scale(1.05); }
.post-card .cats { font: 600 11px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--teal-ink); }
.post-card .cats a { text-decoration: none; }
.post-card h2 { font-size: 20px; line-height: 1.25; letter-spacing: -.01em; margin: 0; }
.post-card h2 a { text-decoration: none; }
.post-card p { color: var(--muted); font-size: 15px; margin: 0; }
.post-card .more { font-weight: 600; font-size: 14px; color: var(--coral-ink); text-decoration: none; }
.single-article { min-width: 0; }
.single-article .entry-header { margin-bottom: 28px; }
.single-article .entry-meta { color: var(--muted); font-size: 14px; }
.single-article .entry-content { font-size: 17.5px; line-height: 1.75; }
.single-article .entry-content h2 { font-size: clamp(24px, 2.6vw, 32px); margin-top: 1.6em; }
.single-article .entry-content h3 { font-size: 21px; margin-top: 1.4em; }
.sidebar { display: grid; gap: 18px; position: sticky; top: 100px; }
.widget { border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; display: grid; gap: 12px; }
.widget-title { font: 600 13px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; margin: 0; }
.widget ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.widget a { text-decoration: none; color: var(--ink-2); }
.widget a:hover { color: var(--coral-ink); }
.widget .wp-block-search__inside-wrapper { display: flex; gap: 8px; }
.widget input[type="search"] { flex: 1; min-width: 0; font: inherit; border: 1.5px solid var(--line); border-radius: var(--r-pill); padding: 10px 16px; }
.widget .wp-block-search__button { font: 600 14px/1 var(--body); border: 0; border-radius: var(--r-pill); padding: 10px 16px; background: var(--btn-bg); color: var(--btn-fg); cursor: pointer; }
.widget h2:not(.widget-title), .widget .wp-block-heading { font: 600 13px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; margin: 0 0 6px; }
.pagination, .nav-links.posts { display: flex; gap: 8px; margin-top: 36px; }
.pagination .page-numbers { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line); text-decoration: none; }
.pagination .current { background: var(--ink); color: var(--page); border-color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: var(--on-night); margin-top: clamp(64px, 9vw, 112px); position: relative; overflow: hidden; --mark-ink: #FFFFFF; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 32px; padding-block: 72px 48px; font-size: 15px; }
.footer-top:not(:has(> :nth-child(4))) { grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)); }
.footer-brand { display: grid; gap: 18px; align-content: start; color: var(--on-night-muted); }
.footer-brand .widget img { display: none; } /* live widget holds the old PNG logo; the SVG logo is printed instead */
.logo-footer .logo-mark { width: 48px; height: 48px; }
.logo-footer b { font-size: 26px; }
.site-footer .widget { border: 0; padding: 0; border-radius: 0; color: var(--on-night-muted); }
.site-footer .widget-title, .site-footer .widget h2 { font: 600 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #FFFFFF; margin-bottom: 6px; }
.site-footer .widget p { margin: 0; }
.site-footer .widget a, .footer-links a { color: var(--on-night-muted); text-decoration: none; }
.site-footer .widget a:hover, .footer-links a:hover { color: #FFFFFF; }
.social-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; }
.social-links a { width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); display: grid; place-items: center; color: #FFFFFF; }
.social-links svg { width: 18px; height: 18px; }
.footer-giant { font: 700 clamp(64px, 17vw, 240px)/.8 Unbounded, system-ui, sans-serif; letter-spacing: -.05em; color: rgba(255, 255, 255, .045); white-space: nowrap; padding-left: var(--gl); user-select: none; margin-bottom: -.12em; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding-block: 20px calc(28px + env(safe-area-inset-bottom, 0px)); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--on-night-muted); position: relative; }
.footer-bottom p { margin: 0; }
.footer-bottom .copyright a { color: #FFFFFF; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- 404 ---------- */
.error-404 { padding-block: 120px; text-align: center; display: grid; gap: 18px; justify-items: center; }

@media (max-width: 1020px) {
	.nav-primary, .nav-actions .nav-cta, .nav-actions .phone { display: none; }
	.burger { display: grid; }
	.nav-actions { margin-left: auto; }
	.footer-top, .footer-top:not(:has(> :nth-child(4))) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
	.layout-sidebar, .post-list { grid-template-columns: minmax(0, 1fr); }
	.sidebar { position: static; }
}
@media (max-width: 560px) {
	.footer-top, .footer-top:not(:has(> :nth-child(4))) { grid-template-columns: minmax(0, 1fr); padding-bottom: 32px; }
	.footer-bottom { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
	.logo small { display: none; }
}
