/*
Theme Name: KMCALS
Theme URI: https://kmcals.com
Author: KMCALS GH Ltd
Description: Corporate theme for KMCALS GH Ltd. Earthy afro-luxury design: ebony, laterite, olive and brass, with kente bands and arched frames.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: kmcals
*/

/* Layout concept: carved-arch photographs against alternating sand and ebony grounds, each section stitched with a kente band. */
:root {
	--ebony: #1b1510;
	--ebony-2: #261d16;
	--sand: #f3ebdd;
	--clay: #e9dcc6;
	--ink: #251c15;
	--muted: #6a5c4c;
	--laterite: #b0502a;
	--laterite-deep: #8f3e1f;
	--olive: #5d6a31;
	--brass: #c39a4f;
	--brass-soft: #d9bd84;
	--on-dark: #f1e6d2;
	--on-dark-muted: #bba98c;
	--line: rgba(37, 28, 21, 0.14);
	--line-dark: rgba(241, 230, 210, 0.16);

	--display: "Marcellus", "Iowan Old Style", Georgia, serif;
	--body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
	--label: "Montserrat", "Arial Black", "Segoe UI", sans-serif;

	--wrap: 1180px;
	--gutter: clamp(16px, 4vw, 40px);
	--section: clamp(64px, 9vw, 120px);
	--radius: 4px;

	--pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='%23c39a4f' stroke-opacity='.14' stroke-width='1'%3E%3Cpath d='M24 2 46 24 24 46 2 24Z'/%3E%3Cpath d='M24 14 34 24 24 34 14 24Z'/%3E%3C/g%3E%3C/svg%3E");
	color-scheme: light;
}

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

body {
	margin: 0;
	background: var(--sand);
	color: var(--ink);
	font-family: var(--body);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: 0.005em; }
h1 { font-size: clamp(2.5rem, 5.4vw, 4.4rem); }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
h3 { font-size: 1.5rem; }
p { margin: 0; }

.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--brass); color: var(--ebony); padding: 8px 14px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: calc(760px + 2 * var(--gutter)); }

.eyebrow {
	font-family: var(--label);
	font-weight: 700;
	font-size: 0.72rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--laterite);
	display: flex;
	align-items: center;
	gap: 12px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.eyebrow--light { color: var(--brass); }

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--label);
	font-weight: 700;
	font-size: 0.78rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-decoration: none;
	padding: 16px 26px;
	background: var(--laterite);
	color: #fbf4e8;
	border: 1px solid var(--laterite);
	border-radius: var(--radius);
	cursor: pointer;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { background: var(--laterite-deep); border-color: var(--laterite-deep); }
.btn--ghost { background: transparent; color: var(--on-dark); border-color: var(--line-dark); }
.btn--ghost:hover { background: transparent; border-color: var(--brass); color: var(--brass-soft); }
.btn--small { padding: 11px 18px; font-size: 0.7rem; }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.logo__star { width: 44px; height: auto; flex: none; }
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__word { font-family: var(--label); font-weight: 900; font-size: 1.55rem; letter-spacing: 0.02em; display: flex; align-items: flex-end; gap: 6px; }
.logo__word small { font-size: 0.5rem; font-weight: 700; letter-spacing: 0.1em; padding-bottom: 3px; }
.logo__tag { font-family: var(--label); font-weight: 700; font-size: 0.56rem; letter-spacing: 0.12em; text-transform: uppercase; margin-top: 8px; }
.logo--dark { color: var(--ebony); }
.logo--light { color: var(--on-dark); --star-top: #f1e6d2; }
.logo--light .logo__tag { color: var(--on-dark-muted); }

/* Masthead */
.masthead {
	position: sticky;
	top: env(safe-area-inset-top, 0px);
	z-index: 50;
	background: rgba(243, 235, 221, 0.94);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}
.masthead__row { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.masthead__brand { text-decoration: none; }
.nav { display: flex; align-items: center; gap: 32px; }
.nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.nav__list a { font-family: var(--label); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; color: var(--ink); padding-block: 6px; border-bottom: 2px solid transparent; }
.nav__list a:hover { border-color: var(--laterite); }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; }
.nav-toggle span:first-child, .nav-toggle span:first-child::before, .nav-toggle span:first-child::after { position: absolute; left: 11px; width: 22px; height: 2px; background: var(--ink); content: ""; transition: transform 0.2s; }
.nav-toggle span:first-child { top: 21px; }
.nav-toggle span:first-child::before { left: 0; top: -7px; }
.nav-toggle span:first-child::after { left: 0; top: 7px; }
.nav-toggle[aria-expanded="true"] span:first-child { background: transparent; }
.nav-toggle[aria-expanded="true"] span:first-child::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:first-child::after { transform: translateY(-7px) rotate(-45deg); }

/* Kente band */
.kente {
	height: 14px;
	background:
		linear-gradient(90deg,
			var(--laterite) 0 18%, var(--brass) 18% 22%, var(--ebony) 22% 26%, var(--brass) 26% 30%,
			var(--olive) 30% 52%, var(--brass) 52% 55%, var(--laterite) 55% 70%, var(--ebony) 70% 74%,
			var(--brass) 74% 86%, var(--olive) 86% 100%);
	background-size: 220px 100%;
	position: relative;
}
.kente::after {
	content: "";
	position: absolute;
	inset: 4px 0;
	background: repeating-linear-gradient(90deg, rgba(27, 21, 16, 0.55) 0 2px, transparent 2px 6px);
	opacity: 0.35;
}

/* Hero */
.hero { background: var(--ebony) var(--pattern); color: var(--on-dark); position: relative; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: clamp(32px, 5vw, 72px); align-items: center; padding-block: clamp(56px, 8vw, 104px); }
.hero__copy { display: grid; gap: 26px; min-width: 0; }
.hero h1 { color: #f7eddc; }
.lede { font-size: 1.15rem; color: var(--on-dark-muted); max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 12px 0 0; padding-top: 26px; border-top: 1px solid var(--line-dark); }
.hero__facts dt { font-family: var(--label); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--brass); }
.hero__facts dd { margin: 6px 0 0; font-size: 0.95rem; color: var(--on-dark); }
.hero__art { position: relative; justify-self: center; width: min(100%, 440px); }
.hero__star { position: absolute; width: 74px; top: 6%; left: -34px; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45)); --star-top: #f1e6d2; }

/* Arched and round photo frames. The pattern shows if a photo cannot load. */
figure { margin: 0; }
.arch, .roundel, .division__img { background: var(--ebony-2) var(--pattern); overflow: hidden; position: relative; }
.arch img, .roundel img, .division__img img { width: 100%; height: 100%; object-fit: cover; }
.is-missing::before { content: "Photo \00B7  " attr(data-alt); position: absolute; inset: auto 16% 50% 16%; transform: translateY(50%); text-align: center; font-family: var(--label); font-weight: 600; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass-soft); line-height: 1.6; z-index: 1; }
.arch { border-radius: 999px 999px var(--radius) var(--radius); aspect-ratio: 3 / 4; max-width: 100%; }
.arch::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(217, 189, 132, 0.55); border-radius: inherit; pointer-events: none; }
.arch--tall { aspect-ratio: 3 / 4.1; }
.roundel { position: absolute; width: 42%; aspect-ratio: 1; border-radius: 50%; right: -6%; bottom: -5%; border: 6px solid var(--ebony); max-width: 100%; }

/* Sections */
.section { padding-block: var(--section); }
.section--sand { background: var(--sand); }
.section--clay { background: var(--clay); }
.section--ebony { background: var(--ebony) var(--pattern); color: var(--on-dark); }
.section__head { display: grid; gap: 16px; max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.section__head--light h2 { color: #f7eddc; }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(36px, 6vw, 88px); align-items: center; }
.about__copy { display: grid; gap: 20px; min-width: 0; }
.about__copy > p { color: var(--muted); max-width: 36em; }
.pillars { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.pillars li { padding: 16px 0 16px 34px; border-bottom: 1px solid var(--line); position: relative; color: var(--muted); }
.pillars li::before { content: ""; position: absolute; left: 4px; top: 24px; width: 10px; height: 10px; background: var(--laterite); transform: rotate(45deg); }
.pillars strong { color: var(--ink); font-weight: 600; }

/* Divisions */
.divisions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 32px); }
.division { background: var(--sand); display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.division__img { min-height: 100%; aspect-ratio: auto; }
.division__body { padding: 28px 26px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.division__body p { color: var(--muted); font-size: 0.97rem; }
.division__meta { margin-top: auto !important; padding-top: 12px; border-top: 1px solid var(--line); font-family: var(--label); font-weight: 600; font-size: 0.7rem !important; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink) !important; }
.status { align-self: flex-start; font-family: var(--label); font-weight: 700; font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; padding: 5px 10px; border-radius: 2px; display: inline-flex; align-items: center; gap: 7px; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status--live { background: rgba(93, 106, 49, 0.14); color: var(--olive); }
.status--soon { background: rgba(176, 80, 42, 0.12); color: var(--laterite-deep); }
.status--dev { background: rgba(195, 154, 79, 0.2); color: #7a5a1f; }

/* Directions */
.directions { position: relative; overflow: hidden; }
.directions__bg { position: absolute; inset: 0; opacity: 0.22; }
.directions__bg img { width: 100%; height: 100%; object-fit: cover; filter: sepia(0.5) saturate(0.8); }
.directions::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(27, 21, 16, 0.6), rgba(27, 21, 16, 0.92)); z-index: 1; }
.directions .wrap { position: relative; z-index: 2; }
.directions__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 32px); }
.direction { border: 1px solid var(--line-dark); border-top: 3px solid var(--brass); padding: clamp(26px, 3.5vw, 40px); background: rgba(27, 21, 16, 0.55); display: grid; gap: 14px; }
.direction h3 { font-size: 1.9rem; color: #f7eddc; }
.direction p { color: var(--on-dark-muted); }
.direction__route { display: flex; align-items: center; gap: 12px; font-family: var(--label); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--brass) !important; }
.direction__route svg { width: 40px; height: 10px; }

/* Partners */
.partners { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(36px, 6vw, 88px); align-items: start; }
.partners__copy { display: grid; gap: 20px; justify-items: start; min-width: 0; }
.partners__copy > p { color: var(--muted); max-width: 36em; }
.steps { list-style: none; counter-reset: step; margin: 8px 0 12px; padding: 0; display: grid; gap: 0; width: 100%; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 8px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step, decimal-leading-zero); grid-row: span 2; font-family: var(--display); font-size: 1.6rem; color: var(--laterite); line-height: 1.1; }
.steps h3 { font-family: var(--body); font-weight: 600; font-size: 1.05rem; }
.steps p { color: var(--muted); font-size: 0.97rem; }
.arch--partners { position: sticky; top: 110px; }

/* Contact */
.contact__grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(36px, 6vw, 80px); align-items: start; }
.contact__copy { display: grid; gap: 20px; min-width: 0; }
.contact__copy h2 { color: #f7eddc; }
.contact__copy > p { color: var(--on-dark-muted); }
.contact__details { margin: 10px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line-dark); }
.contact__details div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-dark); }
.contact__details dt { font-family: var(--label); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--brass); padding-top: 4px; }
.contact__details dd { margin: 0; overflow-wrap: anywhere; }
.contact__details a { text-decoration-color: var(--brass); text-underline-offset: 4px; }
.form { background: var(--sand); color: var(--ink); padding: clamp(24px, 4vw, 40px); border-radius: var(--radius); display: grid; gap: 18px; border-top: 4px solid var(--laterite); min-width: 0; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-family: var(--label); font-weight: 700; font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea { font: inherit; font-size: 1rem; color: var(--ink); background: #fbf6ec; border: 1px solid rgba(37, 28, 21, 0.22); border-radius: var(--radius); padding: 12px 14px; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--laterite); box-shadow: 0 0 0 3px rgba(176, 80, 42, 0.18); }
.form .btn { justify-self: start; }
.form__hp { position: absolute; left: -9999px; }
.form__note { padding: 12px 14px; border-radius: var(--radius); font-size: 0.95rem; }
.form__note--ok { background: rgba(93, 106, 49, 0.15); color: #3f4a1d; }
.form__note--err { background: rgba(176, 80, 42, 0.12); color: var(--laterite-deep); }

/* Footer */
.footer { background: var(--ebony-2); color: var(--on-dark-muted); }
.footer__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.7fr) minmax(0, 1fr); gap: 40px; padding-block: 64px 40px; }
.footer__brand { display: grid; gap: 22px; align-content: start; }
.footer__brand p { max-width: 30em; font-size: 0.95rem; }
.footer__h { font-family: var(--label); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--brass); margin-bottom: 14px; }
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 0.95rem; }
.footer__list a { text-decoration: none; }
.footer__list a:hover { color: var(--on-dark); }
.footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-block: 22px 32px; border-top: 1px solid var(--line-dark); font-size: 0.85rem; }
.footer__staff { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--label); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; }
.footer__staff svg { width: 14px; height: 14px; }
.footer__staff:hover { color: var(--brass-soft); }

/* Inner pages */
.page .entry { display: grid; gap: 24px; }
.entry__content { color: var(--muted); }
.entry__content a { color: var(--laterite); }

/* Responsive */
@media (max-width: 960px) {
	.hero__grid, .about, .partners, .contact__grid { grid-template-columns: minmax(0, 1fr); }
	.hero__art { width: min(100%, 380px); margin-top: 8px; }
	.about .arch { max-width: 420px; }
	.arch--partners { position: relative; top: 0; max-width: 420px; }
	.divisions { grid-template-columns: minmax(0, 1fr); }
	.footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
	.nav-toggle { display: block; }
	.nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--sand); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 16px; padding: 16px var(--gutter) 24px; }
	.nav.is-open { display: flex; }
	.nav__list { flex-direction: column; gap: 0; }
	.nav__list a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 620px) {
	body { font-size: 16px; }
	.hero__facts { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.hero__star { left: -8px; width: 56px; }
	.division { grid-template-columns: minmax(0, 1fr); }
	.division__img { aspect-ratio: 16 / 10; }
	.directions__grid, .form__row { grid-template-columns: minmax(0, 1fr); }
	.contact__details div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
	.footer__grid { grid-template-columns: minmax(0, 1fr); }
	.logo__star { width: 36px; }
	.logo__word { font-size: 1.3rem; }
}
