/*
Theme Name: Social Hero Academy
Theme URI: https://socialhero.my
Author: Social Hero Academy
Description: Theme for Social Hero Academy, a Social Hero Foundation academy in Johor Bahru. Calm, textbook-style serif headings, a hand-drawn red marking line, and the cape mark. Italic words in page and section headings get the red marking line automatically.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: social-hero-academy
Tags: block-patterns, full-site-editing, blog, education
*/

/* ---------- base */
html { scroll-behavior: smooth; }
h1, h2, h3 { text-wrap: balance; }
.wp-site-blocks > * + * { margin-block-start: 0; }
.sha-page > * { margin-block-start: 0 !important; margin-block-end: 0; }
.sha-measure { max-width: 780px; }
img { max-width: 100%; height: auto; }

/* Italic words in headings: red, with the hand-drawn marking line */
:where(h1, h2, .sha-statement) em {
	color: var(--wp--preset--color--hero-red);
	font-style: italic;
	white-space: nowrap;
	padding-bottom: 0.14em;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M2 9 C 40 3, 90 12, 130 6 S 185 4, 198 8' fill='none' stroke='%23C4302B' stroke-width='3' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") no-repeat 50% 100% / 96% 0.2em;
}
.has-ink-background-color :where(h1, h2, h3, p) em {
	color: var(--wp--preset--color--blush);
	background: none;
	padding-bottom: 0;
}

/* ---------- text styles */
.is-style-eyebrow {
	font-size: 14px !important;
	font-weight: 600;
	letter-spacing: 3px;
	text-transform: uppercase;
	line-height: 1.4;
}
.is-style-eyebrow:not(.has-text-color) { color: var(--wp--preset--color--muted); }
.is-style-eyebrow a { text-decoration: none; color: inherit; }
.sha-lead { max-width: 640px; }
.sha-more a { font-weight: 600; }
.sha-crumb a { color: inherit; }
.sha-num {
	font-family: var(--wp--preset--font-family--serif);
	font-weight: 600;
	font-size: 22px;
	line-height: 1;
	color: var(--wp--preset--color--hero-red);
}
.sha-stat {
	font-family: var(--wp--preset--font-family--serif);
	font-weight: 600;
	font-size: clamp(36px, 4vw, 48px);
	line-height: 1;
	color: var(--wp--preset--color--hero-red);
}
.sha-statement {
	font-size: clamp(34px, 4.4vw, 52px) !important;
	line-height: 1.15;
	max-width: 880px;
	margin-inline: auto;
}
.sha-quote { line-height: 1.35; }
.sha-card-title a { text-decoration: none; }
.sha-card-title a:hover { color: var(--wp--preset--color--hero-red); }

/* ---------- header */
.sha-header { border-bottom: 1px solid var(--wp--preset--color--line); background: var(--wp--preset--color--paper); }
.sha-brand { gap: 12px !important; }
.sha-mark, .sha-mark img { width: 28px; height: auto; margin: 0; }
.sha-wordmark { font-family: var(--wp--preset--font-family--serif); font-weight: 600; font-size: 22px; line-height: 1.1; margin: 0; }
.sha-wordmark a { text-decoration: none; color: var(--wp--preset--color--ink); }
.sha-wordmark em { color: var(--wp--preset--color--hero-red); }
.sha-navbar { gap: 12px 28px !important; }
.sha-nav a { text-decoration: none; }
.sha-nav a:hover { color: var(--wp--preset--color--hero-red); }
.sha-header .wp-block-button__link { padding: 10px 20px; }

/* ---------- footer */
.sha-footer { font-size: 15px; }
.sha-footer, .sha-footer a { color: var(--wp--preset--color--line); }
.sha-footer a { text-decoration: none; }
.sha-footer a:hover { color: var(--wp--preset--color--paper); text-decoration: underline; }
.sha-footer strong, .sha-footer .sha-wordmark a { color: var(--wp--preset--color--paper); }
.sha-footer .sha-wordmark { font-size: 20px; white-space: nowrap; }
.sha-footer .sha-wordmark em { color: var(--wp--preset--color--blush); }
.sha-footer-base { border-top: 1px solid #4A4F4B; padding-top: 24px; font-size: 14px; color: #A9A79F; }
.sha-footer-base p { color: #A9A79F; }

/* ---------- hero */
.sha-hero.wp-block-cover { padding: 64px 24px; }
.sha-hero .wp-block-cover__inner-container { width: 100% !important; }
.sha-hero-card {
	max-width: 640px;
	padding: clamp(28px, 4vw, 48px) clamp(24px, 4.5vw, 56px) !important;
	border-radius: 4px;
	box-shadow: 0 12px 32px rgba(43, 47, 44, 0.14);
}
.sha-hero-card > * { margin-block: 0; }
.sha-hero-card > * + * { margin-block-start: 18px !important; }
@media (max-width: 720px) {
	.sha-hero.wp-block-cover { display: block; min-height: 0 !important; padding: 0; }
	.sha-hero .wp-block-cover__image-background { position: relative; height: 360px; display: block; }
	.sha-hero .wp-block-cover__inner-container { margin-top: -48px; padding: 0 0 32px; }
}

/* ---------- cards and lists */
.is-style-sha-card {
	background: var(--wp--preset--color--card);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	padding: 24px 26px;
}
.is-style-sha-card > * { margin-block: 0; }
.is-style-sha-card > * + * { margin-block-start: 12px; }
.sha-dark-card { border-radius: 12px; padding: 24px 26px; }
.sha-dark-card > * + * { margin-block-start: 12px; }

.sha-ring-mind { --ring: var(--wp--preset--color--mind); --ring-soft: #26646B; }
.sha-ring-meaning { --ring: var(--wp--preset--color--meaning); --ring-soft: #D9922E; }
.sha-ring-mission { --ring: var(--wp--preset--color--hero-red); --ring-soft: #C4302B; }
.sha-ring-company { --ring: var(--wp--preset--color--ink); --ring-soft: #2B2F2C; }
.sha-ring-label, .sha-ring-label a { color: var(--ring, var(--wp--preset--color--muted)) !important; }
.sha-ring-label { letter-spacing: 2px !important; font-size: 13px !important; }

.sha-programme { border-left: 8px solid var(--ring); min-height: 160px; display: flex; flex-direction: column; }
.sha-programme > p:last-child { margin-top: auto; padding-top: 8px; }
.sha-level > * { margin-block: 0; }
.sha-level > * + * { margin-block-start: 12px; }
.sha-level-art img { border-top: 6px solid var(--ring); border-radius: 4px; width: 100%; aspect-ratio: 400 / 240; object-fit: cover; }
.sha-bar::before { content: ""; display: block; width: 40px; height: 6px; border-radius: 3px; background: var(--ring-soft); margin-bottom: 8px; }
.sha-bar h3 a { text-decoration: none; }
.sha-bar > * { margin-block: 0; }
.sha-bar > * + * { margin-block-start: 8px; }
.sha-ring-group + .sha-ring-group { margin-top: 56px; }
.sha-ring-head h2 { margin: 0; color: var(--ring); }
.sha-ring-head { gap: 8px 20px !important; margin-bottom: 8px; }
.sha-ring-head p { margin: 0; }

.sha-topline { border-top: 3px solid var(--wp--preset--color--ink); padding-top: 14px; }
.sha-topline.is-red { border-top-color: var(--wp--preset--color--hero-red); }
.sha-topline > * { margin-block: 0; }
.sha-topline > * + * { margin-block-start: 10px; }

.sha-rules > * { margin: 0 !important; border-top: 1px solid var(--wp--preset--color--line); padding: 20px 0; }
.sha-rules > *:last-child { border-bottom: 1px solid var(--wp--preset--color--line); }
.sha-rule-item > * { margin-block: 0; }
.sha-rule-item > * + * { margin-block-start: 6px; }

.sha-step > * { margin-block: 0; }
.sha-step > * + * { margin-block-start: 10px; }
.sha-icon, .sha-icon img { width: 56px; height: auto; margin: 0; }
.sha-art img { width: 100%; border-radius: 4px; }
.sha-rings img { max-width: 420px; margin-inline: auto; display: block; }

.sha-way > .sha-art { margin: -24px -26px 8px; }
.sha-way > .sha-art img { border-radius: 11px 11px 0 0; aspect-ratio: 16 / 10; object-fit: cover; }

.sha-ticks { padding-left: 0; list-style: none; }
.sha-ticks li { padding-left: 26px; position: relative; margin-bottom: 4px; }
.sha-ticks li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 12px; height: 7px; border-left: 2px solid var(--wp--preset--color--hero-red); border-bottom: 2px solid var(--wp--preset--color--hero-red); transform: rotate(-45deg); }

.sha-chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.sha-chips li { border: 1.5px solid var(--wp--preset--color--ink); border-radius: 999px; padding: 8px 18px; font-size: 15px; font-weight: 600; }

.sha-facts { gap: 16px 24px !important; margin-top: 28px !important; }
.sha-fact { border-top: 1px solid var(--wp--preset--color--line); padding-top: 10px; }
.sha-fact > * { margin: 0; }
.sha-fact > * + * { margin-top: 4px; }

.sha-sticky { position: sticky; top: 24px; }
.sha-cta-card { padding: clamp(24px, 4vw, 48px); }
.sha-cta-card h2 { margin-top: 0; }

.sha-faq { max-width: 860px; }
.wp-block-details { border-top: 1px solid var(--wp--preset--color--line); padding: 18px 0; margin: 0 !important; }
.wp-block-details:last-child { border-bottom: 1px solid var(--wp--preset--color--line); }
.wp-block-details summary { font-family: var(--wp--preset--font-family--serif); font-size: 21px; font-weight: 600; cursor: pointer; }
.wp-block-details > p { color: var(--wp--preset--color--muted); }

.sha-tight > * { margin: 0; }
.sha-tight { gap: 6px !important; }

/* ---------- posts */
.sha-post-card > * { margin-block: 0; }
.sha-post-card > * + * { margin-block-start: 10px; }
.sha-post-image img { border-radius: 4px; }
.sha-post-cat a { color: var(--wp--preset--color--hero-red); }
.sha-post-date { color: var(--wp--preset--color--muted); }
.sha-post-excerpt { color: var(--wp--preset--color--muted); }
.sha-article .wp-block-post-content > p:first-child { font-size: 20px; }
.wp-block-query-pagination { margin-top: 48px; font-weight: 600; }

/* ---------- dark band */
.sha-band .wp-block-button__link:hover { background: var(--wp--preset--color--paper) !important; color: var(--wp--preset--color--ink) !important; }

/* ---------- intros and body columns */
.sha-intro h1 { font-size: clamp(40px, 5.2vw, 64px); }
.sha-body-col h2 { font-size: clamp(28px, 3vw, 34px); margin-top: 48px; }
.sha-body-col > h2:first-child { margin-top: 0; }
.sha-faq > * { max-width: 860px; }
.sha-nav-contact { display: none !important; }
.wp-block-navigation__responsive-container.is-menu-open .sha-nav-contact { display: flex !important; }

/* ---------- small screens */
@media (max-width: 599px) {
	.sha-navbar .wp-block-buttons { display: none; }
	.sha-header .alignwide { flex-wrap: nowrap !important; }
	.sha-wordmark { font-size: 20px; }
}
@media (max-width: 781px) {
	.sha-sticky { position: static; }
	.sha-cta-card .wp-block-buttons { justify-content: flex-start !important; }
}
