/*
Theme Name: Canadian Response Network
Theme URI: https://example.org/
Author: Canadian Response Network
Description: A bold, multi-page theme for volunteer response organizations. Deployments and team members are built in, with one-click page setup and no page builder required.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: crn
Tags: custom-menu, custom-logo, featured-images, translation-ready, accessibility-ready
*/

/* ===============================================================
   1. Tokens — change colours here or in Appearance > Customize
   =============================================================== */

:root {
	--ink: #101a24;
	--ink-mid: #22303d;
	--ink-soft: #4d5f6e;
	--paper: #ffffff;
	--wash: #f1f4f7;
	--line: #d8dee4;
	--signal: #c8102e;
	--signal-dark: #9c0c23;
	--hivis: #f5b923;

	--font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
	--font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

	--measure: 68ch;
	--gutter: 1.5rem;
	--rail: 1220px;
	--radius: 4px;
	--radius-lg: 8px;
	--ease: cubic-bezier(.2, .7, .3, 1);
}

/* ===============================================================
   2. Base
   =============================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img, svg, video, iframe { max-width: 100%; display: block; }
img { height: auto; }

a { color: var(--signal-dark); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--signal); }

:focus-visible { outline: 3px solid var(--hivis); outline-offset: 3px; }

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -0.022em;
	margin: 0 0 .5em;
	text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.1rem); }
h2 { font-size: clamp(1.85rem, 4vw, 2.75rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.012em; }
h4 { font-size: 1.08rem; }

p, ul, ol { margin: 0 0 1.15rem; }
p, li { max-width: var(--measure); }

blockquote {
	margin: 2rem 0;
	padding: .4rem 0 .4rem 1.4rem;
	border-left: 5px solid var(--signal);
	font-size: 1.2rem;
}

hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line); }
code, pre { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: .92em; }

/* ===============================================================
   3. Layout
   =============================================================== */

.wrap { width: 100%; max-width: var(--rail); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 780px; }

.band { padding-block: clamp(3.25rem, 7vw, 6rem); }
.band--wash { background: var(--wash); }
.band--ink { background: var(--ink); color: #dce5ec; }
.band--ink h2, .band--ink h3, .band--ink h4 { color: #fff; }
.band--tight { padding-block: clamp(2.25rem, 4vw, 3.25rem); }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: .8rem 1.1rem; z-index: 999; }
.skip-link:focus { left: 0; color: #fff; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

.marker { display: flex; gap: 4px; margin-bottom: 1.35rem; }
.marker span { display: block; width: 26px; height: 6px; border-radius: 1px; background: var(--signal); }
.marker span:nth-child(2) { opacity: .55; width: 16px; }
.marker span:nth-child(3) { opacity: .25; width: 9px; }
.band--ink .marker span { background: var(--hivis); }

.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 60ch; }
.band--ink .lede { color: #b9c8d4; }

/* ===============================================================
   4. Buttons and chips
   =============================================================== */

.btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 1.02rem;
	line-height: 1;
	padding: 1.05rem 1.7rem;
	border-radius: var(--radius);
	border: 2px solid var(--signal);
	background: var(--signal);
	color: #fff;
	text-decoration: none;
	transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { background: var(--signal-dark); border-color: var(--signal-dark); color: #fff; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--quiet:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

.btn--onDark { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn--onDark:hover { background: #fff; color: var(--ink); border-color: #fff; }

.btn--small { padding: .7rem 1.15rem; font-size: .95rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }

.chip {
	display: inline-block;
	font-family: var(--font-display);
	font-size: .78rem;
	font-weight: 600;
	padding: .3rem .68rem;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: var(--paper);
	color: var(--ink-soft);
	white-space: nowrap;
}
.chip--confirmed { background: #e6f4ec; border-color: #b2dcc3; color: #175f31; }
.chip--standby   { background: #fdf2d8; border-color: #f0d494; color: #7a5300; }
.chip--past      { background: var(--wash); }

/* ===============================================================
   5. Header
   =============================================================== */

.topbar { background: var(--ink); color: #b7c6d2; font-size: .9rem; }
.topbar .wrap {
	display: flex; flex-wrap: wrap; gap: .3rem 1.5rem;
	align-items: center; justify-content: space-between; padding-block: .6rem;
}
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar__contact { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; }

.masthead { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 60; }
.masthead .wrap { display: flex; align-items: center; gap: 1.25rem; padding-block: .95rem; }

.brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { max-height: 62px; width: auto; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; line-height: 1.08; letter-spacing: -0.02em; max-width: 15ch; }
.brand__mark {
	width: 46px; height: 46px; flex: none; border-radius: var(--radius);
	background: var(--signal); display: grid; place-items: center; color: #fff;
	font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em;
}

.nav-toggle {
	display: none; align-items: center; gap: .5rem;
	font-family: var(--font-display); font-weight: 600; font-size: 1rem;
	background: transparent; border: 2px solid var(--line);
	border-radius: var(--radius); padding: .65rem .9rem; cursor: pointer; color: var(--ink);
}

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.6rem; align-items: center; }
.nav li { max-width: none; }
.nav a {
	font-family: var(--font-display); font-weight: 600; font-size: 1.02rem;
	color: var(--ink); text-decoration: none; padding: .4rem 0;
	border-bottom: 3px solid transparent; display: inline-block;
	transition: border-color .2s var(--ease);
}
.nav a:hover { border-bottom-color: var(--signal); color: var(--ink); }
.nav .current-menu-item > a, .nav .current_page_item > a, .nav .current-menu-parent > a { border-bottom-color: var(--signal); }

.masthead__cta { flex: none; }

@media (max-width: 1060px) { .masthead__cta { display: none; } }

@media (max-width: 900px) {
	.nav-toggle { display: inline-flex; }
	.nav { display: none; width: 100%; order: 5; border-top: 1px solid var(--line); margin-top: .85rem; }
	.nav.is-open { display: block; }
	.nav ul { flex-direction: column; align-items: stretch; gap: 0; }
	.nav a { padding: .9rem 0; border-bottom: 1px solid var(--line); }
	.masthead .wrap { flex-wrap: wrap; }
}

/* ===============================================================
   6. Hero
   =============================================================== */

.hero {
	position: relative;
	background: var(--ink);
	color: #dce5ec;
	overflow: hidden;
	padding-block: clamp(3.5rem, 8vw, 6.5rem);
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__scrim { position: absolute; inset: 0; background: rgba(16, 26, 36, .78); z-index: 1; }

.hero__stripes {
	position: absolute; inset: 0; z-index: 1; opacity: .5;
	background-image: repeating-linear-gradient(115deg, rgba(255,255,255,.035) 0 2px, transparent 2px 26px);
}
.hero__glow {
	position: absolute; z-index: 1; pointer-events: none;
	right: -12%; top: -35%; width: 62%; aspect-ratio: 1; border-radius: 50%;
	background: radial-gradient(circle, rgba(200,16,46,.30) 0%, rgba(200,16,46,0) 68%);
}

.hero .wrap { position: relative; z-index: 2; }
.hero__grid { display: grid; gap: clamp(2.25rem, 5vw, 3.75rem); align-items: center; }
@media (min-width: 1000px) { .hero__grid { grid-template-columns: 1.1fr .9fr; } }

.hero h1 { color: #fff; margin-bottom: .7rem; }
.hero__lead { font-size: 1.25rem; color: #bccbd7; max-width: 54ch; }

.hero__reveal { opacity: 0; transform: translateY(14px); animation: crn-rise .7s var(--ease) forwards; }
.hero__reveal--late { animation-delay: .12s; }
@keyframes crn-rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero__reveal { opacity: 1; transform: none; } }

.next-panel {
	background: rgba(255,255,255,.055);
	border: 1px solid rgba(255,255,255,.16);
	border-radius: var(--radius-lg);
	padding: 1.75rem 1.6rem;
	border-top: 6px solid var(--signal);
}
.next-panel h2 { font-size: 1rem; color: #9db0bf; font-weight: 600; letter-spacing: 0; margin-bottom: 1.1rem; }
.next-panel__event { border-top: 1px solid rgba(255,255,255,.14); padding-top: 1.1rem; margin-top: 1.1rem; }
.next-panel__event:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.next-panel__date { font-family: var(--font-display); font-weight: 700; color: var(--hivis); font-size: .95rem; margin-bottom: .2rem; }
.next-panel__title { font-size: 1.2rem; margin-bottom: .25rem; }
.next-panel__title a { color: #fff; text-decoration: none; }
.next-panel__title a:hover { text-decoration: underline; color: #fff; }
.next-panel__meta { font-size: .95rem; color: #aebdc9; margin: 0; max-width: none; }
.next-panel__all { display: inline-block; margin-top: 1.35rem; color: #fff; font-weight: 600; font-family: var(--font-display); }
.next-panel__empty { color: #aebdc9; margin: 0; max-width: none; }

/* ===============================================================
   7. Stats band
   =============================================================== */

.stats { background: var(--signal); color: #fff; }
.stats .wrap { display: grid; gap: 1.5rem; padding-block: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { border-left: 3px solid rgba(255,255,255,.4); padding-left: 1.1rem; }
.stat__num { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.1rem, 4.5vw, 3rem); line-height: 1; letter-spacing: -0.03em; }
.stat__label { margin: .35rem 0 0; font-size: .98rem; color: rgba(255,255,255,.88); max-width: none; }

/* ===============================================================
   8. Page banner
   =============================================================== */

.banner {
	position: relative; background: var(--ink); color: #dce5ec; overflow: hidden;
	padding-block: clamp(3rem, 6vw, 4.75rem);
}
.banner__bg { position: absolute; inset: 0; z-index: 0; }
.banner__bg img { width: 100%; height: 100%; object-fit: cover; }
.banner__scrim { position: absolute; inset: 0; background: rgba(16,26,36,.8); z-index: 1; }
.banner__stripes {
	position: absolute; inset: 0; z-index: 1; opacity: .45;
	background-image: repeating-linear-gradient(115deg, rgba(255,255,255,.035) 0 2px, transparent 2px 26px);
}
.banner .wrap { position: relative; z-index: 2; }
.banner h1 { color: #fff; margin-bottom: .35rem; font-size: clamp(2.1rem, 5vw, 3.4rem); }
.banner p { color: #b9c8d4; font-size: 1.15rem; margin: 0; }

.crumbs { font-size: .92rem; color: #90a3b2; margin: 0 0 1rem; max-width: none; }
.crumbs a { color: #cdd9e3; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; color: #fff; }

/* ===============================================================
   9. Services
   =============================================================== */

.caps { display: grid; gap: 1.25rem; margin-top: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.cap {
	background: var(--paper);
	border: 1px solid var(--line);
	border-top: 5px solid var(--signal);
	border-radius: 0 0 var(--radius-lg) var(--radius-lg);
	padding: 1.6rem 1.5rem;
	transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.cap:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(16,26,36,.09); }
.cap h3 { margin-bottom: .4rem; }
.cap p { margin: 0; color: var(--ink-soft); max-width: none; }

.service-row {
	display: grid; gap: 1.5rem 3rem; align-items: start;
	padding: 2.75rem 0; border-top: 1px solid var(--line);
}
@media (min-width: 820px) { .service-row { grid-template-columns: 1fr 1.6fr; } }
.service-row h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.service-row p { color: var(--ink-soft); }

/* ===============================================================
   10. Deployment schedule
   =============================================================== */

.schedule { list-style: none; margin: 2.5rem 0 0; padding: 0; }
.schedule > li { max-width: none; }

.dep {
	display: grid; grid-template-columns: 88px 1fr; gap: 1.4rem;
	padding: 1.6rem 1.25rem 1.6rem 0;
	border-top: 1px solid var(--line);
	align-items: start;
	transition: background-color .2s var(--ease);
}
.dep:hover { background: var(--wash); }
.schedule > li:last-child .dep { border-bottom: 1px solid var(--line); }

.dep__date { text-align: center; border-radius: var(--radius); overflow: hidden; background: var(--paper); border: 1px solid var(--line); }
.dep__month { display: block; background: var(--signal); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: .82rem; padding: .3rem 0; }
.dep__day { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.85rem; line-height: 1.45; }
.dep__year { display: block; font-size: .78rem; color: var(--ink-soft); padding-bottom: .35rem; }

.dep__head { display: flex; flex-wrap: wrap; gap: .5rem .85rem; align-items: baseline; }
.dep__title { font-size: 1.28rem; margin: 0; }
.dep__title a { color: var(--ink); text-decoration: none; }
.dep__title a:hover { color: var(--signal-dark); }
.dep__meta { margin: .4rem 0 0; color: var(--ink-soft); font-size: .97rem; max-width: none; }
.dep__excerpt { margin: .6rem 0 0; color: var(--ink-soft); max-width: none; }

/* ===============================================================
   11. Team
   =============================================================== */

.team {
	list-style: none; margin: 2.5rem 0 0; padding: 0;
	display: grid; gap: 2rem 1.6rem;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.team > li { max-width: none; }

.member__frame { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--wash); margin-bottom: .9rem; }
.member__frame::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px;
	background: var(--signal); transform: scaleX(0); transform-origin: left;
	transition: transform .25s var(--ease);
}
.member:hover .member__frame::after { transform: scaleX(1); }

.member__photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.member__photo--blank {
	display: grid; place-items: center; aspect-ratio: 4 / 5;
	background: var(--ink); color: #7d93a5;
	font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; letter-spacing: -0.02em;
}
.member__name { font-size: 1.1rem; margin: 0 0 .12rem; }
.member__name a { color: var(--ink); text-decoration: none; }
.member__name a:hover { color: var(--signal-dark); }
.member__role { margin: 0; color: var(--signal-dark); font-weight: 600; font-size: .96rem; max-width: none; }
.member__creds { margin: .2rem 0 0; color: var(--ink-soft); font-size: .9rem; max-width: none; }
.member__bio { margin: .55rem 0 0; font-size: .95rem; color: var(--ink-soft); max-width: none; }

/* ===============================================================
   12. Pages, posts, archives
   =============================================================== */

.entry { padding-block: clamp(2.5rem, 5vw, 4rem); }
.entry img { border-radius: var(--radius-lg); }
.entry h2, .entry h3 { margin-top: 2.25rem; }
.entry .alignleft { float: left; margin: .35rem 1.75rem 1rem 0; }
.entry .alignright { float: right; margin: .35rem 0 1rem 1.75rem; }
.entry .aligncenter { margin-inline: auto; }
.entry .alignwide, .entry .alignfull { max-width: none; }

.postlist { list-style: none; margin: 2rem 0 0; padding: 0; }
.postlist > li { max-width: none; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.postlist h2 { font-size: 1.4rem; margin-bottom: .25rem; }
.postlist h2 a { color: var(--ink); text-decoration: none; }
.postlist h2 a:hover { color: var(--signal-dark); }
.postlist .meta { color: var(--ink-soft); font-size: .93rem; margin: 0 0 .4rem; }

.pagination { margin-top: 2.75rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.pagination .page-numbers {
	display: inline-block; padding: .55rem .95rem;
	border: 1px solid var(--line); border-radius: var(--radius);
	text-decoration: none; color: var(--ink);
	font-family: var(--font-display); font-weight: 600;
}
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }

.notice { border: 1px dashed var(--line); border-radius: var(--radius-lg); padding: 1.75rem; color: var(--ink-soft); background: var(--paper); }
.notice p:last-child { margin-bottom: 0; }

.facts {
	list-style: none; margin: 0 0 2.25rem; padding: 1.4rem 1.6rem;
	background: var(--wash); border-radius: var(--radius-lg); border-left: 5px solid var(--signal);
}
.facts li { max-width: none; margin-bottom: .55rem; }
.facts li:last-child { margin-bottom: 0; }
.facts strong { font-family: var(--font-display); }

.contact-grid { display: grid; gap: 2.5rem; }
@media (min-width: 880px) { .contact-grid { grid-template-columns: 1.3fr .7fr; } }
.contact-card { background: var(--wash); border-radius: var(--radius-lg); padding: 1.75rem 1.6rem; border-top: 5px solid var(--signal); }
.contact-card h3 { font-size: 1.15rem; }
.contact-card ul { list-style: none; margin: 0; padding: 0; }
.contact-card li { max-width: none; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.contact-card li:last-child { border-bottom: 0; }

/* ===============================================================
   13. CTA and footer
   =============================================================== */

.cta { position: relative; overflow: hidden; }
.cta__stripes {
	position: absolute; inset: 0; z-index: 0; opacity: .45;
	background-image: repeating-linear-gradient(115deg, rgba(255,255,255,.035) 0 2px, transparent 2px 26px);
}
.cta .wrap { position: relative; z-index: 1; }
.cta__grid { display: grid; gap: 1.75rem; align-items: center; }
@media (min-width: 880px) { .cta__grid { grid-template-columns: 1.35fr auto; } }
.cta p { color: #b9c8d4; font-size: 1.13rem; margin: 0; }
.cta h2 { margin-bottom: .45rem; }
.cta .btn-row { margin-top: 0; }

.site-footer { background: var(--ink); color: #9fb1bf; padding-block: 3.5rem 2rem; font-size: .97rem; }
.site-footer a { color: #fff; }
.site-footer h3 { color: #fff; font-size: 1.02rem; margin-bottom: .75rem; }
.footer__grid { display: grid; gap: 2.25rem; }
@media (min-width: 780px) { .footer__grid { grid-template-columns: 1.5fr 1fr 1fr; } }
.footer__grid ul { list-style: none; margin: 0; padding: 0; }
.footer__grid li { margin-bottom: .45rem; max-width: none; }
.footer__grid a { text-decoration: none; }
.footer__grid a:hover { text-decoration: underline; }
.footer__mark { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }

.colophon {
	margin-top: 2.75rem; padding-top: 1.35rem;
	border-top: 1px solid rgba(255,255,255,.15);
	font-size: .88rem; color: #8397a7;
}
.colophon p { margin: 0; max-width: none; }

/* ===============================================================
   14. WordPress core classes
   =============================================================== */

.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption { font-size: .9rem; color: var(--ink-soft); }
.bypostauthor { display: block; }
.comment-list { list-style: none; padding: 0; }
