/*
Theme Name: Stop Gambling Harm
Theme URI: https://stopgamblingharm.com
Author: Circulate
Author URI: https://www.circulateonline.com/
Description: Custom theme for Stop Gambling Harm. Homepage, News (posts), Take Part and Get in Touch.
Version: 1.0.6
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: sgh
*/

:root {
	--teal: #155150;
	--teal-soft: #3F6E6D;
	--paper: #F6F5F3;
	--sand: #EDEAE5;
	--line: #D9D4CC;
	--field: #B9C7C6;
	--wine: #96083A;
	--pink: #E8A6BD;
	--serif: 'Instrument Serif', Georgia, serif;
	--sans: Archivo, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--paper);
	color: var(--teal);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.6;
}

img { max-width: 100%; height: auto; }
a { color: var(--teal); }
a:hover { color: var(--wine); }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; }
:focus-visible { outline: 3px solid var(--wine); outline-offset: 3px; }
[id] { scroll-margin-top: 24px; }

.wrap { max-width: 1280px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }
.section { padding-top: 88px; padding-bottom: 88px; }
.band-teal { background: var(--teal); color: var(--paper); }
.band-sand { background: var(--sand); }

.h-xl { font-size: clamp(48px, 7vw, 76px); line-height: 1; }
.h-lg { font-size: clamp(40px, 5.5vw, 60px); line-height: 1; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--paper); color: var(--teal); padding: 12px 16px; z-index: 10; }
.skip-link:focus { left: 8px; top: 8px; }

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

/* Buttons */
.btn {
	display: inline-block;
	border: 1.5px solid var(--teal);
	color: var(--teal);
	background: transparent;
	text-decoration: none;
	padding: 13px 22px;
	font-family: inherit;
	font-weight: 600;
	font-size: 15px;
	line-height: 1.3;
	cursor: pointer;
}
.btn:hover { background: var(--teal); color: var(--paper); }
.btn--solid { background: var(--teal); color: var(--paper); }
.btn--solid:hover { background: var(--wine); border-color: var(--wine); color: var(--paper); }
.btn--light { background: var(--paper); border-color: var(--paper); color: var(--teal); }
.btn--light:hover { background: var(--pink); border-color: var(--pink); color: var(--teal); }
.btn--lg { padding: 16px 26px; font-size: 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header */
.site-header { background: var(--teal); color: var(--paper); }
.site-header__inner { padding-top: 18px; padding-bottom: 18px; display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: center; justify-content: space-between; }
.site-title { color: var(--paper); text-decoration: none; font-family: var(--serif); font-size: 28px; line-height: 1.2; }
.site-title:hover { color: var(--paper); }
.site-nav { display: flex; flex-wrap: wrap; gap: 8px 32px; align-items: center; font-size: 15px; font-weight: 500; }
.site-nav a { color: var(--paper); text-decoration: none; padding-bottom: 2px; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a.is-current { border-bottom-color: var(--pink); color: var(--paper); }
.site-nav a.site-nav__cta { background: var(--paper); color: var(--teal); font-weight: 600; padding: 12px 20px; border: 0; }
.site-nav a.site-nav__cta:hover { background: var(--pink); color: var(--teal); }

/* Footer */
.site-footer { background: var(--teal); color: var(--paper); font-size: 14px; }
.site-footer__inner { padding-top: 32px; padding-bottom: 32px; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: var(--paper); }
.site-footer a:hover { color: var(--pink); }

/* Home: hero */
.hero { padding-top: 72px; padding-bottom: 72px; display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.hero__text { flex: 1 1 480px; min-width: 0; }
.hero__text h1 { margin-bottom: 20px; }
.hero__lede { margin-bottom: 32px; font-size: 21px; line-height: 1.5; max-width: 540px; }
.hero__img { flex: 1 1 420px; min-width: 0; width: 100%; height: 400px; object-fit: cover; display: block; }

/* Home: purpose */
.purpose { display: flex; flex-wrap: wrap; gap: 32px 80px; }
.purpose h2 { flex: 1 1 280px; }
.purpose__body { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; font-size: 19px; }

/* Home: specifics */
.specifics__intro { margin: 16px 0 48px; font-size: 19px; line-height: 1.55; max-width: 720px; }
.specifics__cols { display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: flex-start; }
.specifics__list { flex: 1 1 520px; min-width: 0; margin: 0; padding: 0; list-style: none; border-bottom: 1.5px solid var(--teal); }
.specifics__list li { display: flex; gap: 24px; padding: 20px 0; border-top: 1.5px solid var(--teal); font-size: 18px; line-height: 1.5; }
.specifics__num { font-family: var(--serif); font-size: 34px; line-height: 1; color: var(--wine); min-width: 32px; }
.specifics__img { flex: 1 1 380px; min-width: 0; width: 100%; height: 520px; object-fit: cover; display: block; }

/* Home: actions */
.actions__grid { margin-top: 48px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.actions__grid p { padding-top: 20px; border-top: 3px solid var(--wine); }

/* Home: founders */
.founders__grid { margin-top: 48px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px 28px; }
.founder { display: flex; flex-direction: column; gap: 14px; font-size: 15px; }
.founder__img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--sand); }
.founder h3 { margin-top: 4px; font-size: 30px; line-height: 1.15; }
.founder__bio { display: flex; flex-direction: column; gap: 14px; }

/* Section head with link */
.section-head { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: flex-end; justify-content: space-between; margin-bottom: 40px; }
.link-underline { font-weight: 600; font-size: 16px; text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 3px; }

/* News cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px; }
.card-grid--loose { gap: 48px 32px; }
.card { text-decoration: none; color: var(--teal); display: flex; flex-direction: column; gap: 14px; }
.card:hover { color: var(--teal); }
.card:hover .card__title { color: var(--wine); }
.card__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: var(--line); }
div.card__img { background: var(--teal); display: flex; align-items: center; justify-content: center; }
div.card__img::after { content: "Stop Gambling Harm"; font-family: var(--serif); font-size: 26px; color: var(--paper); opacity: .9; }
.meta { font-size: 13px; color: var(--teal-soft); }
.card__title { font-family: var(--serif); font-size: 28px; line-height: 1.15; }
.card__excerpt { font-size: 15px; line-height: 1.55; }
.card--compact { gap: 10px; border-top: 1.5px solid var(--teal); padding-top: 18px; }
.card--compact .card__title { font-size: 26px; }

/* CTA band */
.cta { display: flex; flex-wrap: wrap; gap: 32px 64px; align-items: center; justify-content: space-between; }
.cta__text { flex: 1 1 520px; min-width: 0; }
.cta__text h2 { font-size: clamp(38px, 5vw, 52px); line-height: 1.05; margin-bottom: 16px; }
.cta__text p { font-size: 18px; max-width: 660px; }
.cta--band { padding-top: 72px; padding-bottom: 72px; }

/* News index */
.page-head { padding-top: 72px; padding-bottom: 40px; }
.page-head h1 { margin-bottom: 16px; }
.page-head__intro { margin-bottom: 32px; font-size: 19px; line-height: 1.55; max-width: 620px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.filters a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--teal); border: 1.5px solid var(--teal); }
.filters a:hover, .filters a.is-current { background: var(--teal); color: var(--paper); }

.featured-wrap { padding-top: 16px; padding-bottom: 48px; }
.featured { text-decoration: none; color: var(--teal); display: flex; flex-wrap: wrap; gap: 32px 48px; align-items: center; background: var(--sand); }
.featured:hover { color: var(--teal); }
.featured:hover .featured__title { color: var(--wine); }
.featured__img { flex: 1 1 520px; min-width: 0; width: 100%; height: 420px; object-fit: cover; object-position: center 25%; display: block; }
.featured__body { flex: 1 1 380px; min-width: 0; padding: 32px 40px 32px 0; display: flex; flex-direction: column; gap: 16px; }
.featured__body--solo { padding-left: 40px; }
.featured .meta { font-size: 14px; }
.featured__title { font-family: var(--serif); font-size: clamp(32px, 4vw, 44px); line-height: 1.08; }
.featured__excerpt { font-size: 17px; }
.featured__more { font-size: 15px; font-weight: 600; }

.news-list { padding-top: 16px; padding-bottom: 88px; }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 64px; }
.pagination .page-numbers { min-width: 44px; min-height: 44px; padding: 0 12px; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--teal); color: var(--teal); text-decoration: none; font-weight: 600; }
.pagination .page-numbers.current, .pagination a.page-numbers:hover { background: var(--teal); color: var(--paper); }
.pagination .page-numbers.dots { border-color: transparent; }
.pagination .prev, .pagination .next { padding: 0 18px; }
.empty-note { font-size: 18px; padding: 24px 0 88px; }

/* Article */
.article-head { max-width: 820px; margin: 0 auto; padding: 56px 40px 40px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; font-weight: 600; text-decoration: none; }
.article-head .meta { font-size: 14px; margin: 20px 0 14px; }
.article-head h1 { font-size: clamp(38px, 5.5vw, 60px); line-height: 1.05; margin-bottom: 20px; }
.article-lede { font-size: 21px; line-height: 1.5; }
.article-hero { max-width: 1120px; margin: 0 auto; padding: 0 40px; }
.article-hero img { width: 100%; height: 520px; object-fit: cover; display: block; }
.entry-content { max-width: 680px; margin: 0 auto; padding: 48px 40px 24px; font-size: 18px; line-height: 1.7; }
.entry-content > * { margin-top: 0; margin-bottom: 22px; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content h2 { font-size: 34px; line-height: 1.15; margin-top: 34px; }
.entry-content h3 { font-size: 27px; line-height: 1.2; margin-top: 30px; }
.entry-content h4 { font-family: var(--sans); font-weight: 600; font-size: 18px; margin-top: 28px; }
.entry-content ul, .entry-content ol { padding-left: 24px; }
.entry-content li { margin-bottom: 8px; }
.entry-content blockquote { margin-left: 0; margin-right: 0; padding-left: 24px; border-left: 3px solid var(--wine); font-family: var(--serif); font-size: 26px; line-height: 1.3; }
.entry-content blockquote cite { display: block; margin-top: 10px; font-family: var(--sans); font-size: 14px; font-style: normal; color: var(--teal-soft); }
.entry-content figure { margin-left: 0; margin-right: 0; }
.entry-content figcaption { font-size: 14px; color: var(--teal-soft); margin-top: 8px; }
.entry-content iframe { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }
.entry-content img { height: auto; }
.entry-content .alignwide, .entry-content .alignfull { margin-left: -80px; margin-right: -80px; max-width: none; }

.share-wrap { max-width: 680px; margin: 0 auto; padding: 16px 40px 72px; }
.share { border-top: 1.5px solid var(--teal); padding-top: 20px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.share__label { font-size: 14px; font-weight: 600; }
.share__links { display: flex; flex-wrap: wrap; gap: 10px; }
.share__links a { min-height: 44px; padding: 0 16px; display: flex; align-items: center; border: 1.5px solid var(--teal); color: var(--teal); text-decoration: none; font-size: 14px; font-weight: 600; }
.share__links a:hover { background: var(--teal); color: var(--paper); }

.more-news { padding-top: 64px; padding-bottom: 72px; }
.more-news h2 { font-size: 40px; margin-bottom: 32px; }

/* Take Part */
.split-head { padding-top: 72px; padding-bottom: 56px; display: flex; flex-wrap: wrap; gap: 32px 80px; align-items: flex-end; }
.split-head h1 { flex: 1 1 320px; }
.split-head__body { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; font-size: 18px; }
.org-grid { padding-bottom: 88px; display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; }
.org { text-decoration: none; color: var(--teal); background: #fff; border: 1.5px solid var(--line); padding: 24px; min-height: 120px; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }
.org:hover { border-color: var(--teal); color: var(--teal); }
.org__name { font-family: var(--serif); font-size: 27px; line-height: 1.1; }
.org__url { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; color: var(--teal-soft); overflow-wrap: anywhere; }
.org__url svg { flex: none; }

/* Get in Touch */
.contact { padding-top: 72px; padding-bottom: 96px; display: flex; flex-wrap: wrap; gap: 48px 96px; align-items: flex-start; }
.contact__intro { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.contact__intro h1 { margin-bottom: 4px; }
.contact__intro > p { font-size: 19px; }
.contact__email { border-top: 1.5px solid var(--teal); padding-top: 20px; margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.contact__email span { font-size: 14px; color: var(--teal-soft); }
.contact__email a { font-family: var(--serif); font-size: clamp(22px, 2.6vw, 30px); text-decoration: none; overflow-wrap: anywhere; }
.note { background: var(--sand); padding: 20px 24px; font-size: 15px; }
.note a { font-weight: 600; }

.form { flex: 1 1 520px; min-width: 0; background: #fff; border: 1.5px solid var(--line); padding: 40px; display: flex; flex-direction: column; gap: 22px; }
.form__row { display: flex; flex-wrap: wrap; gap: 22px; }
.form__row .field { flex: 1 1 200px; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea { font-family: inherit; font-size: 16px; font-weight: 400; min-height: 48px; padding: 0 14px; border: 1.5px solid var(--field); border-radius: 0; background: var(--paper); color: var(--teal); width: 100%; }
.field textarea { padding: 12px 14px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.consent input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--teal); }
.form .btn { align-self: flex-start; min-height: 52px; padding: 0 30px; font-size: 16px; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { padding: 16px 20px; font-size: 15px; font-weight: 500; border-left: 4px solid var(--teal); background: var(--sand); }
.form-msg--error { border-left-color: var(--wine); color: var(--wine); }

/* Generic page */
.page-plain { max-width: 820px; margin: 0 auto; padding: 72px 40px 24px; }
.page-plain + .entry-content { max-width: 820px; padding-top: 24px; padding-bottom: 88px; }

@media (max-width: 720px) {
	.wrap, .article-head, .article-hero, .entry-content, .share-wrap, .page-plain { padding-left: 20px; padding-right: 20px; }
	.section { padding-top: 56px; padding-bottom: 56px; }
	.hero, .page-head, .split-head, .contact { padding-top: 48px; }
	.hero__img { height: 280px; }
	.specifics__img { height: 320px; }
	.featured__img { height: 260px; }
	.featured__body, .featured__body--solo { padding: 0 20px 28px; }
	.article-hero img { height: 280px; }
	.entry-content .alignwide, .entry-content .alignfull { margin-left: 0; margin-right: 0; }
	.form { padding: 24px; }
	.site-nav { gap: 8px 22px; }
}
