/*
Theme Name: The Headwind
Theme URI: https://theheadwind.ca
Author: The Headwind
Description: B.C. business, explained. Custom theme for theheadwind.ca (B2 "Overprint" brand).
Version: 1.0.5
Requires at least: 6.4
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: headwind
*/

:root {
  --hw-white: #FFFFFF;
  --hw-blue: #0078BF;
  --hw-pink: #FF48B0;
  --hw-ink: #1F1F24;
  --hw-mist: #E8F2F9;
  --hw-blush: #FFE3F2;
  --hw-cloud: #F1F1F4;
  --hw-muted: #6A6A72;
  --hw-sans: "Bricolage Grotesque", system-ui, sans-serif;
  --hw-mono: "Fragment Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--hw-sans); color: var(--hw-ink); background: var(--hw-white); font-variation-settings: "opsz" 24; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--hw-mono); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 48px; }
h1, h2, h3 { font-variation-settings: "opsz" 96, "wdth" 94; letter-spacing: -0.012em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed; left: 12px; top: 12px; z-index: 10000; width: auto; height: auto; clip: auto; background: #fff; padding: 10px 14px; border: 2px solid var(--hw-ink); }
:focus-visible { outline: 3px solid var(--hw-blue); outline-offset: 3px; }

/* Film grain on backgrounds (the page and flat colour sections); content sits on top. */
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.045; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1.4 -0.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.site { position: relative; z-index: 1; }
.grainy { position: relative; isolation: isolate; }
.grainy::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1.4 -0.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* Dot-grid paper: an accent for one or two sections (the hero), never the whole page. */
.dots-paper { background-image: radial-gradient(circle, rgba(31,31,36,0.16) 1.2px, transparent 1.7px); background-size: 28px 28px; background-position: 14px 14px; }

/* Overprint (blue + pink, offset) */
.ov { position: relative; display: inline-block; }
.ov .k2 { position: absolute; left: 0; top: 0; }
.ov.mult .k1, .ov.mult .k2 { mix-blend-mode: multiply; }

/* Halftone image: greyscale photo + ink screen + dots */
.ht { position: relative; overflow: hidden; background: #fff; border-radius: 6px; }
.ht img, .ht .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.35) brightness(1.08); }
.ht .ink { position: absolute; inset: 0; background: var(--ink-c, var(--hw-blue)); mix-blend-mode: screen; }
.ht .dots { position: absolute; inset: 0; background-image: radial-gradient(#fff 1px, transparent 1.5px); background-size: 5px 5px; mix-blend-mode: lighten; opacity: .42; }
.ht .band { position: absolute; left: -20px; width: 62%; bottom: 12%; height: 15%; background: var(--hw-pink); mix-blend-mode: multiply; }
.ht .ph-empty { position: absolute; inset: 0; display: grid; place-items: center; background: var(--hw-blue); color: #fff; font-weight: 800; font-size: 40px; font-variation-settings: "opsz" 96, "wdth" 92; }
.dur { position: absolute; right: 10px; bottom: 10px; background: var(--hw-ink); color: #fff; font-family: var(--hw-mono); font-size: 12px; padding: 3px 7px; z-index: 2; }

/* Highlighter */
.hl { background: linear-gradient(transparent 60%, rgba(255,72,176,.6) 60%, rgba(255,72,176,.6) 92%, transparent 92%); }

/* Block buttons (slide into their shadow on hover, press and focus) */
.btn { display: inline-flex; align-items: center; gap: 12px; background: var(--hw-pink); color: var(--hw-ink); padding: 15px 26px; font-weight: 700; font-size: 18px; border: 2px solid var(--hw-ink); border-radius: 6px; box-shadow: 6px 6px 0 var(--hw-ink); cursor: pointer; transition: box-shadow .18s ease-in, transform .18s ease-in; font-family: inherit; line-height: 1.2; }
.btn i { width: 0; height: 0; border-left: 12px solid var(--hw-ink); border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.btn:hover, .btn:active, .btn:focus-visible { box-shadow: 0 0 0 var(--hw-ink); transform: translate(6px, 6px); }
.btn.dark { background: var(--hw-ink); color: #fff; box-shadow: 6px 6px 0 var(--hw-pink); }
.btn.dark i { border-left-color: var(--hw-pink); }
.btn.dark:hover, .btn.dark:active, .btn.dark:focus-visible { box-shadow: 0 0 0 var(--hw-pink); }
.btn.light { background: #fff; }
.btn.blue { background: var(--hw-blue); color: #fff; }
.btn.blue i { border-left-color: #fff; }
.btn.sm { font-size: 16px; padding: 10px 18px; box-shadow: 4px 4px 0 var(--hw-pink); }
.btn.sm:hover, .btn.sm:active, .btn.sm:focus-visible { transform: translate(4px, 4px); }

/* Header: sticky, compacts on scroll */
.site-header { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 50; background: #fff; transition: box-shadow .25s ease; }
.site-header.scrolled { box-shadow: 0 10px 30px rgba(31,31,36,.08); }
.site-header .wrap, .site-header .logo { transition: min-height .25s ease, font-size .25s ease; }
.site-header.scrolled .wrap { min-height: 64px; }
.site-header.scrolled .logo { font-size: 32px; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 92px; gap: 24px; }
.logo { font-weight: 800; font-size: 44px; line-height: 1; letter-spacing: -0.01em; font-variation-settings: "opsz" 96, "wdth" 92; white-space: nowrap; }
.logo .k1 { color: var(--hw-blue); } .logo .k2 { color: var(--hw-pink); translate: 2px 1.5px; mix-blend-mode: multiply; }
.main-nav ul { display: flex; gap: 30px; list-style: none; align-items: center; font-size: 17px; font-weight: 600; }
.main-nav a:hover { box-shadow: inset 0 -3px 0 var(--hw-pink); }
.nav-toggle { display: none; }

/* Hero */
.hero .wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; padding-top: 56px; padding-bottom: 64px; align-items: center; }
.hero h1 { font-weight: 740; font-size: 78px; line-height: .96; }
.hero p { font-size: 21px; line-height: 1.5; margin-top: 24px; max-width: 520px; font-variation-settings: "opsz" 14; color: #3b3b42; }
.hero .meta { font-size: 14px; margin-top: 18px; color: var(--hw-muted); }
.hero .btn { margin-top: 30px; }
.hero .ht { aspect-ratio: 5/4; }

/* Sections */
.blue { background: var(--hw-blue); color: #fff; }
.pink { background: var(--hw-pink); color: var(--hw-ink); }
.mist { background: var(--hw-mist); }
.inkbg { background: var(--hw-ink); color: #cfcfd6; }
.sec-title { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.sec-title h2 { font-weight: 760; font-size: 52px; line-height: 1; }
.sec-title a { font-weight: 600; font-size: 17px; box-shadow: inset 0 -2px 0 var(--hw-pink); }

/* Numbers */
.numbers .wrap { padding-top: 56px; padding-bottom: 60px; }
.numbers h2 { font-weight: 760; font-size: 44px; line-height: 1; }
.numbers .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; margin-top: 40px; }
.numbers .ov { font-weight: 800; font-size: 68px; line-height: .9; letter-spacing: -0.01em; font-variation-settings: "opsz" 96, "wdth" 92; }
.numbers .k1 { color: var(--hw-pink); translate: 3px 2px; } .numbers .k2 { color: #fff; }
.numbers p { font-size: 16px; margin-top: 12px; line-height: 1.4; color: rgba(255,255,255,.88); }
.numbers .src { font-size: 13px; margin-top: 30px; color: rgba(255,255,255,.75); }

/* Latest */
.latest .wrap { padding-top: 64px; padding-bottom: 64px; }
.latest .grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 36px; margin-top: 32px; }
.card .ht { aspect-ratio: 16/9; }
.card h3 { font-weight: 700; font-size: 30px; line-height: 1.1; margin-top: 16px; font-variation-settings: "opsz" 40, "wdth" 96; letter-spacing: -0.005em; }
.card a:hover h3 { box-shadow: inset 0 -3px 0 var(--hw-pink); display: inline; }
.card .m { font-size: 13px; margin-top: 10px; color: var(--hw-muted); }
.stack { display: grid; gap: 28px; align-content: start; }
.stack .card a { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.stack .card h3 { font-size: 23px; margin-top: 0; }
.empty-note { margin-top: 24px; font-size: 18px; color: var(--hw-muted); }

/* Callout */
.callout .wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; padding-top: 52px; padding-bottom: 52px; }
.callout h2 { font-weight: 780; font-size: 58px; line-height: .95; }
.callout p { font-size: 19px; line-height: 1.5; font-variation-settings: "opsz" 14; }
.callout .btn { margin-top: 22px; }

/* Tailwinds */
.tail .wrap { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; padding-top: 64px; padding-bottom: 68px; align-items: center; }
.tail .ov { font-weight: 800; font-size: 112px; line-height: .85; letter-spacing: -0.015em; font-variation-settings: "opsz" 96, "wdth" 90; }
.tail .k1 { color: var(--hw-blue); } .tail .k2 { color: var(--hw-pink); translate: 3px 2.5px; }
.tail p { font-size: 20px; line-height: 1.5; margin-top: 18px; max-width: 460px; font-variation-settings: "opsz" 14; }
.tail .btn { margin-top: 26px; }
.tail ul { list-style: none; display: grid; gap: 26px; }
.tail li a { display: grid; grid-template-columns: 1fr; gap: 6px; background: #fff; padding: 20px 24px; border: 2px solid var(--hw-ink); border-radius: 6px; box-shadow: 6px 6px 0 var(--hw-pink); transition: box-shadow .18s ease-in, transform .18s ease-in; }
.tail li a:hover { box-shadow: 0 0 0 var(--hw-pink); transform: translate(6px, 6px); }
.tail li b { font-weight: 700; font-size: 22px; line-height: 1.2; }
.tail li span { font-size: 13px; color: var(--hw-muted); font-family: var(--hw-mono); }

/* Topics */
.topics .wrap { padding-top: 64px; padding-bottom: 64px; }
.topics .list { margin-top: 30px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.topics .row { display: flex; flex-direction: column; justify-content: space-between; gap: 34px; min-height: 150px; padding: 22px 24px; background: var(--hw-mist); border-radius: 6px; transition: box-shadow .18s ease-in, transform .18s ease-in; }
.topics .row:nth-child(3n+2) { background: var(--hw-blush); }
.topics .row:nth-child(3n) { background: var(--hw-cloud); }
.topics .row:hover { box-shadow: 6px 6px 0 var(--hw-ink); transform: translate(-3px, -3px); }
.topics .row b { font-weight: 700; font-size: 30px; line-height: 1.08; letter-spacing: -0.005em; font-variation-settings: "opsz" 60, "wdth" 96; }
.topics .row span { font-family: var(--hw-mono); font-size: 14px; color: var(--hw-muted); }

/* Newsletter / subscribe */
.news .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; padding-top: 60px; padding-bottom: 64px; }
.news h2 { font-weight: 780; font-size: 60px; line-height: .95; }
.news p { font-size: 19px; line-height: 1.5; margin-top: 16px; color: rgba(255,255,255,.92); font-variation-settings: "opsz" 14; }
.news .actions { display: flex; gap: 20px; flex-wrap: wrap; }
.news small { display: block; margin-top: 18px; font-size: 13px; color: rgba(255,255,255,.8); }

/* Footer */
.site-footer .wrap { padding-top: 48px; padding-bottom: 56px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.site-footer .logo .k1 { color: var(--hw-pink); translate: 3px 2px; mix-blend-mode: normal; }
.site-footer .logo .k2 { color: #fff; translate: 0 0; mix-blend-mode: normal; }
.site-footer p, .site-footer li { font-size: 15px; line-height: 1.8; }
.site-footer ul { list-style: none; }
.site-footer a:hover { color: #fff; box-shadow: inset 0 -2px 0 var(--hw-pink); }
.site-footer .fine { grid-column: 1 / -1; padding-top: 18px; font-size: 13px; color: #8d8d96; }

/* Single explainer, pages, archives */
.article .wrap, .page-body .wrap { max-width: 860px; padding-top: 56px; padding-bottom: 72px; }
.article h1, .page-body h1 { font-weight: 760; font-size: 64px; line-height: .98; }
.article .meta { font-size: 14px; color: var(--hw-muted); margin-top: 18px; }
.article .ht { aspect-ratio: 16/9; margin-top: 32px; }
.video { position: relative; aspect-ratio: 16/9; margin-top: 32px; border: 2px solid var(--hw-ink); border-radius: 6px; overflow: hidden; box-shadow: 8px 8px 0 var(--hw-pink); background: var(--hw-ink); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video.vertical { aspect-ratio: 9/16; max-width: 420px; }
.prose { font-size: 19px; line-height: 1.65; margin-top: 36px; font-variation-settings: "opsz" 14; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 34px; line-height: 1.1; margin-top: 1.6em; font-weight: 740; }
.prose h3 { font-size: 24px; line-height: 1.2; margin-top: 1.4em; font-weight: 700; }
.prose a { box-shadow: inset 0 -2px 0 var(--hw-pink); }
.prose a:hover { background: var(--hw-blush); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose blockquote { border-left: 6px solid var(--hw-pink); padding-left: 18px; }
.prose code, .prose .mono { font-family: var(--hw-mono); font-size: .85em; }
.archive .wrap { padding-top: 56px; padding-bottom: 72px; }
.archive h1 { font-weight: 760; font-size: 60px; line-height: 1; }
.archive .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 36px; }
.pager { margin-top: 40px; display: flex; gap: 16px; }

/* Mobile */
@media (max-width: 960px) {
  .wrap { padding: 0 22px; }
  .site-header .wrap { min-height: 72px; }
  .logo { font-size: 34px; }
  .nav-toggle { display: inline-flex; font: inherit; font-weight: 700; font-size: 16px; padding: 8px 14px; border: 2px solid var(--hw-ink); border-radius: 6px; background: #fff; box-shadow: 4px 4px 0 var(--hw-pink); }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 72px; background: #fff; border-bottom: 2px solid var(--hw-ink); z-index: 20; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 18px; padding: 22px; }
  .site-header.scrolled .logo { font-size: 28px; }
  .site-header.scrolled .wrap { min-height: 60px; }
  .site-header.scrolled .main-nav { top: 60px; }
  .hero .wrap, .latest .grid, .callout .wrap, .tail .wrap, .news .wrap { grid-template-columns: 1fr; gap: 32px; }
  .hero .wrap { padding-top: 28px; }
  .hero h1 { font-size: 48px; }
  .hero p { font-size: 18px; }
  .numbers .grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .numbers .ov { font-size: 48px; }
  .sec-title h2, .numbers h2 { font-size: 36px; }
  .callout h2, .news h2 { font-size: 40px; }
  .tail .ov { font-size: 72px; }
  .topics .list, .archive .grid { grid-template-columns: 1fr; }
  .stack .card a { grid-template-columns: 1fr 1.2fr; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .article h1, .page-body h1, .archive h1 { font-size: 40px; }
  .prose { font-size: 18px; }
}
