/*
Theme Name: Heyns Digital
Theme URI: https://heynsdigital.co.za
Author: Heyns Digital
Author URI: https://heynsdigital.co.za
Description: Single-page theme for Heyns Digital, an AI governance and literacy consultancy in Cape Town. Long-form continuous scroll, Apple product-page tone, native Gutenberg block markup, no page-builder dependency.
Version: 1.0.0
Requires at least: 6.0
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: heyns-digital
*/

/* =========================================================
   Design tokens
   ========================================================= */
:root {
	--ink: #141413;
	--cream: #F1EEE6;
	--surface: #FBFAF7;
	--body: rgba(20, 20, 19, 0.68);
	--accent: #8A6A2E;
	--border: rgba(20, 20, 19, 0.1);
	--radius: 14px;
	--font-display: 'Montserrat', system-ui, sans-serif;
	--font-body: 'Hanken Grotesk', system-ui, sans-serif;
	--header-height: 136px;
	--red: #A6453F;
	--amber: #9A6B14;
	--green: #3F7D5C;
}

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

html {
	scroll-behavior: smooth;
}

body,
h1, h2, h3, h4, p, figure {
	margin: 0;
}

img {
	max-width: 100%;
	display: block;
}

button {
	font: inherit;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.screen-reader-text:focus {
	position: fixed;
	top: 8px;
	left: 8px;
	width: auto;
	height: auto;
	padding: 12px 18px;
	background: var(--ink);
	color: var(--cream);
	border-radius: var(--radius);
	z-index: 1000;
}

/* =========================================================
   Base
   ========================================================= */
body {
	background: var(--cream);
	color: var(--ink);
	font-family: var(--font-body);
	font-weight: 400;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3,
.wp-block-heading {
	font-family: var(--font-display);
	font-weight: 700;
	letter-spacing: -0.025em;
	line-height: 1.1;
	color: var(--ink);
}

a {
	color: inherit;
	text-decoration: none;
}
a:hover {
	color: var(--accent);
}

main {
	display: block;
}

/* =========================================================
   Layout helpers
   ========================================================= */
.container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

.section {
	padding: 96px 24px;
}

.section--divider {
	border-top: 1px solid var(--border);
}

.section__inner {
	max-width: 700px;
	margin: 0 auto;
	text-align: center;
}

.section__inner--wide {
	max-width: 800px;
}

.eyebrow {
	font-family: var(--font-display);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.12em;
	color: var(--body);
	margin-bottom: 20px;
}

.section h2,
.section h1 {
	font-size: 40px;
	margin-bottom: 24px;
}

.section p {
	font-size: 18px;
	color: var(--body);
}

.received {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
}

.received .eyebrow,
.received h1,
.received p {
	margin: 0;
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	height: var(--header-height);
	background: rgba(241, 238, 230, 0.8);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	backdrop-filter: saturate(180%) blur(20px);
	border-bottom: 1px solid var(--border);
}

/* WordPress's admin toolbar is fixed at the true top of the viewport for
   logged-in users on screens 783px and wider, so our sticky header needs
   to stick 32px lower to sit below it instead of sliding underneath. Below
   783px the toolbar scrolls with the page instead, so no offset is needed. */
@media screen and ( min-width: 783px ) {
	.admin-bar .site-header {
		top: 32px;
	}
}

.site-header__inner {
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.site-header__brand {
	display: flex;
	align-items: center;
}

.site-header__logo {
	height: 132px;
	width: auto;
}

.site-header__nav {
	display: flex;
	align-items: center;
	gap: 32px;
}

.site-header__nav-link {
	font-family: var(--font-display);
	font-size: 15px;
	font-weight: 600;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 15px;
	background: var(--ink);
	color: var(--cream);
	border: none;
	border-radius: var(--radius);
	padding: 12px 26px;
	cursor: pointer;
	transition: opacity 0.15s ease;
}
.btn:hover {
	opacity: 0.85;
	color: var(--cream);
}

.btn--large {
	padding: 16px 36px;
	font-size: 16px;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
	padding-top: 140px;
	padding-bottom: 96px;
}

.hero h1 {
	font-size: 56px;
	margin-bottom: 24px;
}

.hero p {
	font-size: 20px;
}

/* =========================================================
   Services
   ========================================================= */
.services {
	max-width: 700px;
	margin: 0 auto;
}

.services__eyebrow {
	text-align: center;
}

.service {
	padding: 44px 0;
	border-top: 1px solid var(--border);
}

.service:last-child {
	border-bottom: 1px solid var(--border);
}

.service h3 {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 22px;
	margin-bottom: 12px;
}

.service p {
	font-family: var(--font-body);
	font-size: 17px;
	color: var(--body);
}

/* =========================================================
   Contact
   ========================================================= */
.contact__form {
	max-width: 560px;
	margin: 48px auto 0;
	display: flex;
	flex-direction: column;
	gap: 24px;
	text-align: left;
}

.contact__form[hidden] {
	display: none;
}

.field {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.hp-field {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.field label {
	font-family: var(--font-display);
	font-size: 14px;
	font-weight: 600;
}

.field input,
.field textarea {
	font-family: var(--font-body);
	font-size: 16px;
	color: var(--ink);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 14px 16px;
	outline: none;
	transition: border-color 0.15s ease;
}

.field input::placeholder,
.field textarea::placeholder {
	color: rgba(20, 20, 19, 0.4);
}

.field input:focus,
.field textarea:focus {
	border-color: var(--accent);
}

.field textarea {
	min-height: 140px;
	resize: vertical;
}

.contact__submit {
	align-self: center;
	margin-top: 8px;
}

.contact__status {
	text-align: center;
	margin-top: 24px;
	font-size: 17px;
	color: var(--body);
}

.contact__status[hidden] {
	display: none;
}

.contact__error {
	color: #A6453F;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
	padding: 48px 24px;
}

.site-footer__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 24px;
}

.site-footer__mark {
	height: 40px;
	width: 40px;
}

.site-footer__brand {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.site-footer__copyright {
	font-size: 13px;
	color: var(--body);
}

.site-footer__links {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 28px;
	margin: 0;
	padding: 0;
	font-size: 15px;
	color: var(--body);
}

.site-footer__links li {
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.site-footer__links li a {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.site-footer__links .social-icon {
	flex-shrink: 0;
	opacity: 0.7;
}

.site-footer__right {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 28px;
}

.site-footer__social {
	list-style: none;
	display: flex;
	gap: 18px;
	margin: 0;
	padding: 0;
}

.site-footer__social a {
	display: inline-flex;
	color: var(--body);
}

.site-footer__social a:hover {
	color: var(--accent);
}

/* =========================================================
   Password gate + training page (self-paced, password protected)
   ========================================================= */
.hero .gate__error,
.training .gate__error {
	font-size: 15px;
	color: var(--red);
	text-align: center;
}

.training [hidden] {
	display: none !important;
}

/* Each section is a white card on the cream page, with one left edge for all text. */
.training {
	padding: 24px 24px 96px;
}

.training .section {
	max-width: 780px;
	margin: 20px auto;
	padding: 56px 52px;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 20px;
	scroll-margin-top: calc(var(--header-height) + 16px);
}

.training .section__inner {
	max-width: none;
	text-align: left;
}

.training .services {
	max-width: none;
	margin: 32px 0 0;
}

.training .service:first-child {
	border-top: 1px solid var(--border);
}

.training .step-next {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
	margin-top: 48px;
	padding-top: 28px;
	border-top: 1px solid var(--border);
}

/* Title block at the top of the training stays centred */
.training .hero .section__inner {
	text-align: center;
}

.training .shield-icon {
	display: block;
	width: auto;
	height: 72px;
	margin: 0 0 20px;
}

.training .contact__form {
	max-width: none;
	margin: 32px 0 0;
}

.training .contact__submit {
	align-self: flex-start;
}

.training .step-next__count {
	font-family: var(--font-display);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--body);
}

.training h2 {
	text-wrap: balance;
}

.training .section__inner > * + p {
	margin-top: 16px;
}

.training .services {
	margin-top: 32px;
	text-align: left;
}

.training .service {
	padding: 28px 0;
}

.training .service h3 {
	font-size: 20px;
	margin-bottom: 8px;
}

.training .service p + p {
	margin-top: 8px;
}

.training .service__meta {
	font-family: var(--font-display);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--body);
	margin-bottom: 10px;
}

.tick-list {
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.tick-list li {
	position: relative;
	padding-left: 18px;
	font-size: 17px;
	color: var(--body);
}

.tick-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.7em;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--ink);
}

.training .tick-list + p {
	margin-top: 16px;
}

/* Numbered lists: parts, rules, steps */
.steps {
	list-style: none;
	margin: 32px 0 0;
	padding: 0;
	text-align: left;
	counter-reset: step;
}

.steps li {
	counter-increment: step;
	display: flex;
	gap: 20px;
	padding: 20px 0;
	border-top: 1px solid var(--border);
	font-size: 18px;
	color: var(--ink);
}

.steps li:last-child {
	border-bottom: 1px solid var(--border);
}

.steps li::before {
	content: counter(step);
	flex: 0 0 32px;
	font-family: var(--font-display);
	font-weight: 600;
	color: var(--body);
}

.steps--zero li::before {
	content: counter(step, decimal-leading-zero);
}

.steps__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.steps__title {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 20px;
	letter-spacing: -0.02em;
	color: var(--ink);
}

.steps__text {
	font-size: 17px;
	color: var(--body);
}

/* Survey figures */
.stats {
	list-style: none;
	margin: 32px 0;
	padding: 0;
	text-align: left;
}

.stats li {
	display: flex;
	align-items: baseline;
	gap: 24px;
	padding: 24px 0;
	border-top: 1px solid var(--border);
}

.stats li:last-child {
	border-bottom: 1px solid var(--border);
}

.stats__figure {
	flex: 0 0 120px;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 44px;
	line-height: 1;
	letter-spacing: -0.03em;
	color: var(--ink);
}

.stats__label {
	font-size: 18px;
	color: var(--body);
}

/* Approved tools table */
.table-wrap {
	margin-top: 32px;
	overflow-x: auto;
}

.tool-table {
	width: 100%;
	min-width: 560px;
	border-collapse: collapse;
	text-align: left;
	font-size: 16px;
}

.tool-table th {
	padding: 12px 16px 12px 0;
	border-bottom: 1px solid var(--border);
	font-family: var(--font-display);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--body);
	white-space: nowrap;
}

.tool-table td {
	padding: 16px 16px 16px 0;
	border-bottom: 1px solid var(--border);
	vertical-align: top;
	color: var(--body);
}

.tool-table td:first-child {
	font-weight: 500;
	color: var(--ink);
}

/* Fixed column widths so every row lines up under its heading */
.tool-table {
	table-layout: fixed;
}

.tool-table th:nth-child(1) {
	width: 34%;
}

.tool-table th:nth-child(2) {
	width: 32%;
}

.tool-table th:nth-child(3) {
	width: 34%;
}

.tool-table th:last-child,
.tool-table td:last-child {
	padding-right: 0;
}

/* Red, Amber, Green markers (colour is paired with the word, never alone) */
.dot {
	display: inline-block;
	width: 12px;
	height: 12px;
	margin-right: 10px;
	border-radius: 50%;
}

.dot--red {
	background: var(--red);
}

.dot--amber {
	background: var(--amber);
}

.dot--green {
	background: var(--green);
}

/* Example prompts */
.training .prompt {
	margin-top: 16px;
	padding: 20px 22px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	text-align: left;
}

.training .prompt__label {
	margin-bottom: 8px;
	font-family: var(--font-display);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--body);
}

.training .prompt__text {
	font-size: 17px;
	color: var(--ink);
}

/* Practice situations */
.situations {
	margin-top: 32px;
	text-align: left;
}

.situation {
	padding: 36px 0;
	border-top: 1px solid var(--border);
}

.situation:last-child {
	border-bottom: 1px solid var(--border);
}

.training .situation__count {
	margin-bottom: 12px;
	font-family: var(--font-display);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--body);
}

.training .situation__question {
	margin: 6px 0 20px;
	font-family: var(--font-display);
	font-size: 22px;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -0.02em;
	color: var(--ink);
}

.options {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.option {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 14px;
	padding: 16px 18px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	font-size: 17px;
	color: var(--ink);
	cursor: pointer;
	transition: border-color 0.15s ease;
}

.option:hover {
	border-color: rgba(20, 20, 19, 0.3);
}

.option:focus-within {
	border-color: var(--accent);
}

.option input {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	margin: 3px 0 0;
	accent-color: var(--ink);
}

.option__letter {
	font-family: var(--font-display);
	font-weight: 600;
}

.option__text {
	flex: 1 1 200px;
}

.option__tag {
	margin-left: auto;
	font-family: var(--font-display);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
}

.situation.is-correct .option,
.option.is-wrong {
	cursor: default;
}

.option.is-wrong {
	opacity: 0.7;
}

.option.is-correct {
	border-color: var(--green);
}

.option.is-correct .option__tag {
	color: var(--green);
}

.option.is-wrong {
	border-color: var(--red);
}

.option.is-wrong .option__tag {
	color: var(--red);
}

.feedback__body {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--border);
}

.training .feedback__result {
	font-family: var(--font-display);
	font-size: 18px;
	font-weight: 600;
	color: var(--ink);
}

.training .feedback__why {
	margin-top: 6px;
}

.training .practice-count,
.training .locked-note {
	margin-top: 24px;
	font-size: 16px;
}

/* Sign-off form */
.sign-form {
	display: flex;
	flex-direction: column;
	gap: 28px;
	margin-top: 40px;
	text-align: left;
}

.sign-form__heading {
	margin-bottom: 8px;
	font-size: 20px;
}

.checks {
	margin: 0;
	padding: 0;
	list-style: none;
}

.check {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 16px 0;
	border-top: 1px solid var(--border);
	font-size: 17px;
	color: var(--ink);
	cursor: pointer;
}

.checks li:last-child .check {
	border-bottom: 1px solid var(--border);
}

.check input {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	margin: 2px 0 0;
	accent-color: var(--ink);
}

.training .sign-form__note {
	font-size: 16px;
}

.training .sign-form__error {
	font-size: 16px;
	color: var(--red);
}

/* Confirmation record */
.record-list {
	margin: 32px 0 0;
	text-align: left;
}

.record-row {
	display: flex;
	justify-content: space-between;
	gap: 24px;
	padding: 16px 0;
	border-top: 1px solid var(--border);
}

.record-row:last-child {
	border-bottom: 1px solid var(--border);
}

.record-row dt {
	color: var(--body);
}

.record-row dd {
	margin: 0;
	font-weight: 500;
	color: var(--ink);
	text-align: right;
}

.training p.no-print {
	margin-top: 32px;
}

@media (max-width: 680px) {
	.training {
		padding: 12px 12px 64px;
	}

	.training .section {
		margin: 12px auto;
		padding: 36px 22px;
		border-radius: 16px;
	}

	/* Phone: each tool becomes a small stacked block instead of a clipped table */
	.tool-table {
		min-width: 0;
		table-layout: auto;
	}

	.tool-table thead {
		display: none;
	}

	.tool-table,
	.tool-table tbody,
	.tool-table tr,
	.tool-table td {
		display: block;
		width: 100%;
	}

	.tool-table tr {
		padding: 18px 0;
		border-bottom: 1px solid var(--border);
	}

	.tool-table td {
		padding: 2px 0;
		border: 0;
	}

	.tool-table td:first-child {
		margin-bottom: 4px;
	}

	.tool-table td:nth-child(2)::before {
		content: "Who: ";
		font-weight: 600;
		color: var(--ink);
	}

	.tool-table td:nth-child(3)::before {
		content: "Allowed: ";
		font-weight: 600;
		color: var(--ink);
	}

	.stats li {
		gap: 16px;
	}

	.stats__figure {
		flex-basis: 88px;
		font-size: 34px;
	}

	.training .situation__question {
		font-size: 20px;
	}
}

@media print {
	.site-header,
	.site-footer,
	.training > *:not(#record),
	#record .no-print {
		display: none !important;
	}

	.training {
		padding: 0;
	}

	.training #record .section {
		max-width: none;
		margin: 0;
		padding: 24px 0;
		border: 0;
		border-radius: 0;
	}
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 680px) {
	:root {
		--header-height: 68px;
	}

	.section {
		padding: 64px 20px;
	}

	.hero {
		padding-top: 96px;
		padding-bottom: 64px;
	}

	.hero h1 {
		font-size: 36px;
	}

	.hero p {
		font-size: 18px;
	}

	.section h2,
	.section h1 {
		font-size: 28px;
	}

	.section p {
		font-size: 17px;
	}

	.site-header .container {
		padding: 0 16px;
	}

	.site-header__inner {
		gap: 12px;
	}

	.site-header__logo {
		height: 44px;
	}

	.site-header__nav {
		gap: 10px;
	}

	.site-header__nav-link {
		font-size: 13px;
	}

	.btn {
		padding: 9px 14px;
		font-size: 13px;
		white-space: nowrap;
	}

	.site-footer__inner {
		flex-direction: column;
		align-items: flex-start;
	}

	.site-footer__links {
		flex-direction: column;
		gap: 10px;
	}

	.site-footer__right {
		flex-direction: column;
		align-items: flex-start;
		gap: 20px;
	}
}

@media (min-width: 681px) and (max-width: 960px) {
	.hero h1 {
		font-size: 46px;
	}

	.section h2,
	.section h1 {
		font-size: 34px;
	}
}

/* Offset anchor targets so the sticky header never covers the section top */
#services,
#contact {
	scroll-margin-top: var(--header-height);
}
