/* ==========================================================================
 * Grade House Toolkit — base: tokens, reset, type, buttons, logo, tones.
 *
 * The site borrows the pattern room: pattern-master paper (white with a dot
 * and cross grid), manila production-pattern card with a punched hanging
 * hole, graphite lines and the blue pencil used for grading. One family,
 * Hanken Grotesk: headings at 600 with tight tracking, text at 400.
 *
 * Every widget root carries `gh`; rules are written `.gh .x` (0,2,0) so they
 * beat Hello's resets, while Elementor's own control CSS (0,3,0+) still wins.
 * Token names are prefixed (--gh-*): Elementor containers define --display,
 * --gap, --width etc. and would leak into unprefixed tokens.
 * ======================================================================== */

:root {
	--gh-paper: #FAFAF7;
	--gh-paper-2: #F0EFE9;
	--gh-card: #D9C69C;
	--gh-card-2: #E7DBBD;
	--gh-card-line: #9C8250;
	--gh-ink: #24272B;
	--gh-ink-2: #1A1C1F;
	--gh-text: #3B3F45;
	--gh-muted: #6B6F76;
	--gh-line: #DEDCD3;
	--gh-blue: #1F43A8;
	--gh-blue-2: #16338A;
	--gh-blue-soft: #E7EBF7;
	--gh-white: #fff;

	/* one family: Hanken Grotesk, headings at 600 with tight tracking */
	--gh-sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
	--gh-head: var(--gh-sans);
	--gh-track: -.03em;

	--gh-pad: clamp(18px, 4vw, 56px);
	--gh-max: 1320px;
	--gh-ease: cubic-bezier(.2, .7, .1, 1);
	--gh-fs-h1: clamp(40px, 5.6vw, 84px);
	--gh-fs-h2: clamp(32px, 3.8vw, 56px);
	--gh-fs-h3: clamp(21px, 1.7vw, 25px);
	--gh-fs-lead: clamp(17px, 1.25vw, 19px);
	--gh-sec: clamp(72px, 8.5vw, 124px);
	--gh-hdr: 84px;

	/* pattern-master paper: a dot every 12px, a cross every 60px */
	--gh-grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cg fill='%2324272B' fill-opacity='.16'%3E%3Ccircle cx='12' cy='12' r='.9'/%3E%3Ccircle cx='24' cy='12' r='.9'/%3E%3Ccircle cx='36' cy='12' r='.9'/%3E%3Ccircle cx='48' cy='12' r='.9'/%3E%3Ccircle cx='12' cy='24' r='.9'/%3E%3Ccircle cx='24' cy='24' r='.9'/%3E%3Ccircle cx='36' cy='24' r='.9'/%3E%3Ccircle cx='48' cy='24' r='.9'/%3E%3Ccircle cx='12' cy='36' r='.9'/%3E%3Ccircle cx='24' cy='36' r='.9'/%3E%3Ccircle cx='36' cy='36' r='.9'/%3E%3Ccircle cx='48' cy='36' r='.9'/%3E%3Ccircle cx='12' cy='48' r='.9'/%3E%3Ccircle cx='24' cy='48' r='.9'/%3E%3Ccircle cx='36' cy='48' r='.9'/%3E%3Ccircle cx='48' cy='48' r='.9'/%3E%3C/g%3E%3Cpath d='M-3 0h6M0-3v6M57 0h6M60-3v6M-3 60h6M0 57v6M57 60h6M60 57v6' stroke='%2324272B' stroke-opacity='.32' stroke-width='1'/%3E%3C/svg%3E");
}

html:has(body.gh-site) { scroll-padding-top: 100px; overflow-x: hidden; }
body.gh-site { margin: 0; background: var(--gh-paper); color: var(--gh-text); font: 400 17px/1.65 var(--gh-sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
body.gh-site .site-main, body.gh-site .page-content, body.gh-site .page-header { margin: 0; padding: 0; max-width: none; }
body.gh-site .page-header .entry-title { display: none; }
body.gh-site .elementor-section-wrap, body.gh-site .e-con { --gh-dummy: 0; }

.gh { position: relative; font-family: var(--gh-sans); color: var(--gh-text); line-height: 1.65; -webkit-font-smoothing: antialiased; }
.gh *, .gh *::before, .gh *::after { box-sizing: border-box; }
.gh img { display: block; max-width: 100%; height: auto; }
.gh a { color: inherit; }
.gh :where(h1, h2, h3, h4, p, ul, ol, dl, dd, blockquote) { margin: 0; }
.gh :where(ul, ol) { padding: 0; list-style: none; }
.gh :where(button) { font: inherit; color: inherit; }
.gh :where(blockquote) { padding: 0; border: 0; font: inherit; quotes: none; background: none; }
.gh svg.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.gh :focus-visible { outline: 2px solid var(--gh-blue); outline-offset: 3px; }

.gh .wrap { width: 100%; max-width: var(--gh-max); margin: 0 auto; padding: 0 var(--gh-pad); }
.gh .sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gh.sec { padding: var(--gh-sec) 0; }

/* ── tones ── */
.gh.tone-paper { background: var(--gh-paper); }
.gh.tone-card { background: var(--gh-card-2); }
.gh.tone-ink { background: var(--gh-ink-2); color: #C9CBCF; }
.gh.tone-ink .h2, .gh.tone-ink h3 { color: #fff; }
.gh.tone-ink .lead { color: #C9CBCF; }
.gh .gridpaper { background-color: var(--gh-paper); background-image: var(--gh-grid); background-position: -1px -1px; }

/* ── type ── */
.gh .h1 { font: 600 var(--gh-fs-h1)/1.02 var(--gh-head); letter-spacing: -.035em; color: var(--gh-ink); text-wrap: balance; }
.gh .h2 { font: 600 var(--gh-fs-h2)/1.06 var(--gh-head); letter-spacing: var(--gh-track); color: var(--gh-ink); text-wrap: balance; }
.gh .h3 { font: 600 var(--gh-fs-h3)/1.25 var(--gh-sans); letter-spacing: -.01em; color: var(--gh-ink); }
.gh .lead { font-size: var(--gh-fs-lead); line-height: 1.6; color: var(--gh-text); max-width: 60ch; text-wrap: pretty; }
.gh .head { display: grid; gap: 18px; max-width: 780px; margin-bottom: clamp(36px, 4.5vw, 64px); }
.gh .head--center { margin-inline: auto; text-align: center; justify-items: center; }
.gh .note { font-size: 14px; color: var(--gh-muted); }

/* Rich text inside widgets (story, prose, points). */
.gh .rt > * + * { margin-top: 1em; }
.gh .rt h2 { font: 600 clamp(26px, 2.4vw, 36px)/1.12 var(--gh-head); letter-spacing: var(--gh-track); color: var(--gh-ink); margin-top: 1.6em; }
.gh .rt h3 { font: 600 20px/1.3 var(--gh-sans); color: var(--gh-ink); margin-top: 1.5em; }
.gh .rt h4 { font: 600 17px/1.4 var(--gh-sans); color: var(--gh-ink); margin-top: 1.3em; }
.gh .rt > :first-child { margin-top: 0; }
.gh .rt ul, .gh .rt ol { display: grid; gap: .55em; padding-left: 0; }
.gh .rt ul > li { position: relative; padding-left: 26px; }
.gh .rt ul > li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 12px; height: 1.5px; background: var(--gh-blue); }
.gh .rt ol { counter-reset: gh-ol; }
.gh .rt ol > li { position: relative; padding-left: 32px; counter-increment: gh-ol; }
.gh .rt ol > li::before { content: counter(gh-ol); position: absolute; left: 0; top: .1em; width: 22px; height: 22px; border: 1px solid currentColor; border-radius: 50%; display: grid; place-items: center; font: 600 12px/1 var(--gh-sans); color: var(--gh-blue); }
.gh .rt a { color: var(--gh-blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.gh .rt strong { color: var(--gh-ink); font-weight: 600; }
.gh .rt blockquote { padding-left: 20px; border-left: 2px solid var(--gh-card-line); font: italic 500 20px/1.45 var(--gh-head); color: var(--gh-ink); }
.gh .rt img { border-radius: 2px; }
.gh .rt table { width: 100%; border-collapse: collapse; font-size: 15px; }
.gh .rt th, .gh .rt td { padding: 10px 12px; border-bottom: 1px solid var(--gh-line); text-align: left; vertical-align: top; }
.gh .rt th { color: var(--gh-ink); font-weight: 600; }
.gh.tone-ink .rt h2, .gh.tone-ink .rt h3, .gh.tone-ink .rt strong { color: #fff; }

/* ── buttons: square-cut, like a card edge ── */
.gh .btns { display: flex; flex-wrap: wrap; gap: 12px; }
.gh .btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border: 1px solid transparent; border-radius: 2px; font-family: var(--gh-sans); font-size: 16px; font-weight: 600; line-height: 1.2; letter-spacing: .005em; text-transform: none; text-decoration: none; text-align: center; cursor: pointer; white-space: normal; max-width: 100%; transition: background-color .2s, color .2s, border-color .2s; }
.gh .btn--sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.gh .btn--blue { background: var(--gh-blue); color: #fff; }
.gh .btn--blue:hover, .gh .btn--blue:focus-visible { background: var(--gh-blue-2); color: #fff; }
.gh .btn--line { border-color: currentColor; background: transparent; color: var(--gh-ink); }
.gh .btn--line:hover, .gh .btn--line:focus-visible { background: var(--gh-ink); border-color: var(--gh-ink); color: #fff; }
.gh .btn--paper { background: var(--gh-paper); color: var(--gh-ink); }
.gh .btn--paper:hover, .gh .btn--paper:focus-visible { background: #fff; color: var(--gh-blue); }
.gh.tone-ink .btn--line { color: #fff; }
.gh.tone-ink .btn--line:hover { background: #fff; border-color: #fff; color: var(--gh-ink); }

/* Text link with a drawn underline */
.gh .tlink { display: inline-flex; align-items: center; gap: 8px; color: var(--gh-blue); font-weight: 600; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: 2px; transition: background-size .25s var(--gh-ease); }
.gh .tlink:hover { background-size: 0 1px; background-position: 100% 100%; }

/* ── logo ── */
.gh .logo { display: inline-flex; align-items: center; color: var(--gh-ink); text-decoration: none; line-height: 0; }
.gh .logo .logo__svg { display: block; height: 58px; width: auto; max-width: none; fill: currentColor; stroke: none; }
.gh .logo--light { color: #fff; }

/* Punched hanging hole: production patterns hang from a hook through it. */
.gh .punch { position: absolute; width: 18px; height: 18px; border-radius: 50%; background: var(--gh-paper); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25); }

/* Elementor: sections sit edge to edge */
.elementor-widget[class*="elementor-widget-gh_"] > .elementor-widget-container { margin: 0; padding: 0; }

@media (max-width: 767px) {
	:root { --gh-hdr: 64px; --gh-fs-h1: 36px; --gh-fs-h2: 30px; --gh-fs-lead: 16px; --gh-sec: 64px; }
	body.gh-site { font-size: 16px; }
	html:has(body.gh-site) { scroll-padding-top: 76px; }
	.gh .btns .btn { flex: 1 1 100%; }
	.gh .logo .logo__svg { height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
	.gh *, .gh *::before, .gh *::after { animation: none !important; transition: none !important; }
}
