/*
 * Zahra Collective: shared styles. "Many Threads" design foundations v1.
 *
 * Five colours only: plum, gold, brown, grey and white, plus lighter tints of them.
 * Playfair Display for headings, Montserrat for reading, Cinzel for labels, buttons and menus.
 * Each section block adds its own small stylesheet (blocks/<name>/style.css) on top of this one.
 */

:root {
	--plum: #563239;
	--gold: #F9C049;
	--brown: #4E3019;
	--grey: #7A7A7A;
	--white: #FFFFFF;
	--cream: rgba(249, 192, 73, .14);
	--plum-7: rgba(86, 50, 57, .07);
	--line: rgba(86, 50, 57, .16);
	--serif: 'Playfair Display', Georgia, serif;
	--sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--caps: 'Cinzel', Georgia, serif;
	--yo: 'Noto Serif Display', Georgia, serif;
	--ar: 'Amiri', serif;
	--ease: cubic-bezier(.22, .7, .2, 1);
	--fast: .2s;
	--base: .7s;
	--slow: 1.1s;
	--gutter: clamp(16px, 4vw, 48px);
	--max: 1280px;
	--pad: clamp(72px, 9vw, 120px);
	--r-card: 22px;
	--r-photo: 24px;
	--r-rect: 6px;
	--r-round: 28px;
}

/* Reset, kept small. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 110px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--white); color: var(--brown); font-family: var(--sans); font-size: 18px; line-height: 1.72; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
p, ul, ol, figure, blockquote { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
a { color: var(--plum); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--brown); }
:focus-visible { outline: 3px solid var(--brown); outline-offset: 3px; }
.on-dark :focus-visible, .sec--plum :focus-visible, .sec--brown :focus-visible { outline-color: var(--gold); }
[hidden] { display: none !important; }
main:focus { outline: none; }

/* Language: Yoruba headings with stacked tone marks, and Arabic. */
[lang="yo"] { font-family: inherit; }
.display [lang="yo"], .h2 [lang="yo"], .h3 [lang="yo"], h1 [lang="yo"], h2 [lang="yo"], h3 [lang="yo"] { font-family: var(--yo); }
[lang="ar"] { font-family: var(--ar); direction: rtl; unicode-bidi: isolate; }

/* Accessibility helpers. */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 1000; padding: 12px 22px; border-radius: 999px; background: var(--plum); color: var(--white); font-family: var(--caps); font-weight: 700; font-size: 14px; letter-spacing: .1em; text-decoration: none; }
.skip:focus { top: 12px; color: var(--white); }

/* Layout. */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap--narrow { max-width: 880px; }
.wrap--text { max-width: 760px; }
.sec { padding-top: var(--pad); padding-bottom: var(--pad); }
.sec--tight { padding-top: clamp(56px, 7vw, 96px); padding-bottom: clamp(56px, 7vw, 96px); }
.sec--flush-top { padding-top: 0; }
.sec--flush-bottom { padding-bottom: 0; }
.sec--cream { background: var(--cream); }
.sec--tint { background: var(--plum-7); }
.sec--plum { background: var(--plum); color: var(--white); }
.sec--brown { background: var(--plum); color: var(--white); }
.sec--gold { background: var(--gold); color: var(--plum); }
.sec--plum a:not(.btn), .sec--brown a:not(.btn) { color: var(--white); }
.stack > * + * { margin-top: var(--gap, 20px); }
.row { display: flex; flex-wrap: wrap; gap: var(--gap, 24px); align-items: center; }
.grid { display: grid; gap: var(--gap, 24px); grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.split { display: grid; gap: clamp(40px, 6vw, 88px); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
.split--wide-left { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.split--wide-right { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
@media (max-width: 960px) {
	.grid { grid-template-columns: repeat(min(var(--cols, 3), 2), minmax(0, 1fr)); }
	.split, .split--wide-left, .split--wide-right { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
	.grid:not(.grid--keep) { grid-template-columns: minmax(0, 1fr); }
	body { font-size: 17px; }
}

/* Type. Display 92 to 44, H2 58 to 36, panel title 46 to 32, card title 26 to 24. */
.display { font-family: var(--serif); font-weight: 350; font-size: clamp(44px, 6.2vw, 92px); line-height: 1.02; letter-spacing: -.025em; color: var(--plum); }
.h2 { font-family: var(--serif); font-weight: 350; font-size: clamp(36px, 4.2vw, 58px); line-height: 1.06; letter-spacing: -.02em; color: var(--plum); }
.h-panel { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 3.4vw, 46px); line-height: 1.1; letter-spacing: -.015em; color: var(--plum); }
.h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2vw, 28px); line-height: 1.2; color: var(--plum); }
.display em, .h2 em, .h-panel em, .h3 em { font-style: italic; font-weight: 300; color: var(--grey); }
.sec--plum :is(.display, .h2, .h-panel, .h3), .sec--brown :is(.display, .h2, .h-panel, .h3), .on-dark :is(.display, .h2, .h-panel, .h3) { color: var(--white); }
.sec--plum :is(.display, .h2, .h-panel, .h3) em, .sec--brown :is(.display, .h2, .h-panel, .h3) em, .on-dark :is(.display, .h2, .h-panel, .h3) em { color: var(--gold); }
.sec--gold :is(.display, .h2, .h-panel, .h3), .sec--gold :is(.display, .h2, .h-panel, .h3) em { color: var(--plum); }
.lead { font-size: clamp(18px, 1.5vw, 20px); line-height: 1.62; }
.small { font-size: 15px; line-height: 1.6; }
.measure { max-width: 62ch; }
.eyebrow { font-family: var(--caps); font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--brown); line-height: 1.5; }
.sec--plum .eyebrow, .sec--brown .eyebrow, .on-dark .eyebrow { color: var(--gold); }
.sec--gold .eyebrow { color: var(--plum); }
.caps { font-family: var(--caps); letter-spacing: .12em; text-transform: uppercase; }
.hd { display: grid; gap: 16px; max-width: 760px; }
.hd--center { margin-left: auto; margin-right: auto; text-align: center; justify-items: center; }
.hd + * { margin-top: clamp(40px, 5vw, 64px); }
.prose > * + * { margin-top: 1em; }
.prose a { color: var(--plum); }
.sec--plum .prose a, .sec--brown .prose a { color: var(--white); }

/* Buttons: pills in Cinzel. Primary plum, secondary outline, and versions for dark and gold. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 28px; border-radius: 999px; border: 1.5px solid var(--plum); background: var(--plum); color: var(--white); font-family: var(--caps); font-weight: 700; font-size: 14px; letter-spacing: .1em; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; }
.btn:hover { background: rgba(86, 50, 57, .86); border-color: rgba(86, 50, 57, .86); color: var(--white); }
.btn--line { background: transparent; color: var(--plum); }
.btn--line:hover { background: var(--plum); border-color: var(--plum); color: var(--white); }
.btn--brown { background: var(--plum); border-color: var(--plum); }
.btn--brown:hover { background: rgba(86, 50, 57, .86); border-color: rgba(86, 50, 57, .86); }
.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--plum); }
.btn--gold:hover { background: var(--white); border-color: var(--white); color: var(--plum); }
.btn--white { background: var(--white); border-color: var(--white); color: var(--plum); }
.btn--white:hover { background: var(--gold); border-color: var(--gold); color: var(--plum); }
.btn--ghost { background: transparent; border-color: rgba(255, 255, 255, .7); color: var(--white); }
.btn--ghost:hover { background: var(--white); border-color: var(--white); color: var(--plum); }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 13px; }
.btn--block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Text link with an arrow, in Cinzel. */
.tlink { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-family: var(--caps); font-weight: 700; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--plum); text-decoration: none; }
.tlink:hover { color: var(--brown); text-decoration: underline; }
.tlink svg { width: 18px; height: 18px; flex: none; }
.sec--plum .tlink, .sec--brown .tlink, .on-dark .tlink { color: var(--gold); }

/* Pills, chips and tags. */
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 14px; border-radius: 999px; background: var(--cream); color: var(--plum); font-family: var(--caps); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.pill--plum { background: var(--plum); color: var(--white); }
.pill--line { background: transparent; border: 1px solid var(--line); }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); color: var(--plum); font-family: var(--caps); font-size: 13px; font-weight: 700; letter-spacing: .1em; cursor: pointer; }
.chip[aria-pressed="true"], .chip[aria-current] { background: var(--plum); border-color: var(--plum); color: var(--white); }

/* Photo frames: rectangles and rounded squares. */
.ph { position: relative; overflow: hidden; background: var(--plum-7); border-radius: var(--r-photo); }
.ph > img, .ph > video { width: 100%; height: 100%; object-fit: cover; }
.ph--rect { border-radius: var(--r-rect); }
.ph--round { border-radius: var(--r-round); }
.ph--square { border-radius: var(--r-round); aspect-ratio: 1; }
.ph--ring { border: 10px solid var(--white); }
.ph--sq { aspect-ratio: 1; }
.ph--34 { aspect-ratio: 3 / 4; }
.ph--45 { aspect-ratio: 4 / 5; }
.ph--43 { aspect-ratio: 4 / 3; }
.ph--169 { aspect-ratio: 16 / 9; }
.cap { margin-top: 12px; font-family: var(--caps); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brown); line-height: 1.5; }
.sec--plum .cap, .sec--brown .cap { color: rgba(255, 255, 255, .86); }

/* Cards. */
.card { position: relative; display: flex; flex-direction: column; gap: 12px; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--white); padding: 28px; color: var(--brown); text-decoration: none; }
a.card:hover { color: var(--brown); }
.card .h3 { color: var(--plum); }

/* The sun mark and the thread line. */
.sun { width: 76px; height: 76px; }
.thread { display: block; width: 100%; height: auto; color: var(--gold); }
.thread path { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }

/* Lists with a gold dot, and numbered steps. */
.dots { list-style: none; padding: 0; display: grid; gap: 12px; }
.dots li { position: relative; padding-left: 26px; }
.dots li::before { content: ""; position: absolute; left: 0; top: .62em; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(249, 192, 73, .25); }

/* Forms. Fields have their label above, their own error below, and a summary at the top. */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field > label, .field > .lbl, .form legend { font-weight: 600; font-size: 16px; color: var(--plum); }
.field .opt { font-weight: 400; color: var(--brown); }
.input, .form input[type="text"], .form input[type="email"], .form input[type="tel"], .form select, .form textarea { width: 100%; min-height: 52px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--grey); background: var(--white); color: var(--plum); font: inherit; font-size: 17px; }
.form textarea { min-height: 140px; padding: 12px 16px; resize: vertical; line-height: 1.6; }
.form select { appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23563239' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; background-size: 18px; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--plum); outline: none; box-shadow: 0 0 0 4px rgba(249, 192, 73, .45); }
.form [aria-invalid="true"] { border-color: var(--plum); border-width: 2px; }
.form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 10px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.55; }
.check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--plum); }
.check label { cursor: pointer; }
.choice { display: flex; gap: 12px; align-items: center; min-height: 52px; padding: 10px 16px; border-radius: 14px; border: 1.5px solid var(--line); cursor: pointer; }
.choice input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--plum); }
.choice:has(input:checked) { border-color: var(--plum); background: var(--plum-7); }
.er { display: block; font-size: 15px; font-weight: 600; color: var(--plum); }
.er::before { content: "! "; font-weight: 700; }
.form-summary { padding: 14px 18px; border-radius: 14px; background: var(--white); border: 2px solid var(--plum); color: var(--plum); font-weight: 600; font-size: 15px; }
.form-done { display: grid; gap: 8px; padding: 22px 24px; border-radius: 18px; background: var(--white); border: 1px solid var(--line); color: var(--brown); }
.form-done strong { font-family: var(--serif); font-weight: 400; font-size: 24px; color: var(--plum); }
.form-note { font-size: 14px; line-height: 1.6; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* An email field and button sitting together as one pill (sign-ups). */
.inline-field { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-field input[type="email"] { flex: 1 1 240px; min-height: 54px; padding: 0 22px; border-radius: 999px; }
.inline-field .btn { min-height: 54px; }

/* Forms on plum and brown. */
.on-dark .field > label, .on-dark .form legend, .sec--plum .field > label, .sec--brown .field > label { color: var(--white); }
.on-dark .form input[type="email"], .on-dark .form input[type="text"], .sec--plum .form input[type="email"], .sec--brown .form input[type="email"] { border-color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .08); color: var(--white); }
.on-dark .form input::placeholder, .sec--plum .form input::placeholder, .sec--brown .form input::placeholder { color: rgba(255, 255, 255, .7); }
.on-dark .check input, .sec--plum .check input, .sec--brown .check input { accent-color: var(--gold); }
.on-dark .er, .sec--plum .er, .sec--brown .er { color: var(--gold); }
.on-dark .form-summary, .sec--plum .form-summary, .sec--brown .form-summary { background: transparent; border-color: var(--gold); color: var(--white); }
.on-dark .form-done, .sec--plum .form-done, .sec--brown .form-done { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .25); color: var(--white); }
.on-dark .form-done strong, .sec--plum .form-done strong, .sec--brown .form-done strong { color: var(--gold); }

/* Breadcrumbs. */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; list-style: none; padding: 0; font-size: 14px; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--grey); }
.crumbs a { color: var(--brown); }
.crumbs [aria-current] { color: var(--plum); font-weight: 600; }

/* Editor notes shown only in the block editor when a section is empty. */
.pv-empty { padding: 28px; border: 2px dashed var(--line); border-radius: 18px; color: var(--brown); font-size: 15px; text-align: center; }

/* Motion: calm and unhurried. Everything is still when someone asks their device to reduce motion. */
@keyframes zzRise { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }
@keyframes zzFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes zzDrop { from { opacity: 0; translate: 0 -10px; } to { opacity: 1; translate: 0 0; } }
@keyframes zzUnveil { from { clip-path: inset(100% 0 0 0); scale: 1.06; } to { clip-path: inset(0 0 0 0); scale: 1; } }
@keyframes zzDraw { from { stroke-dashoffset: 1800; } to { stroke-dashoffset: 0; } }
@keyframes zzSlideUp { from { opacity: 0; translate: 0 48px; } to { opacity: 1; translate: 0 0; } }
@keyframes zzPop { from { opacity: 0; scale: .96; } to { opacity: 1; scale: 1; } }
@keyframes zzBreathe { 0%, 100% { scale: 1; } 50% { scale: 1.07; } }
@media (prefers-reduced-motion: no-preference) {
	a, button { transition: background-color var(--fast), color var(--fast), border-color var(--fast), box-shadow .3s var(--ease), transform .3s var(--ease); }
	.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(86, 50, 57, .18); }
	.btn:active { transform: translateY(0); box-shadow: none; }
	a.card:hover, .lift:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(86, 50, 57, .14); }
	a .ph img, .zoom img { transition: transform .8s var(--ease); }
	a:hover .ph img, .zoom:hover img { transform: scale(1.05); }
	.tlink svg, .btn svg { transition: translate .3s var(--ease); }
	.tlink:hover svg, .btn:hover svg { translate: 4px 0; }
	input, select, textarea { transition: border-color var(--fast), box-shadow var(--fast); }

	/* Page hero: label, heading, text and buttons rise in turn; the photo unveils from the bottom. */
	.hero-rise > * { animation: zzRise var(--base) var(--ease) both; }
	.hero-rise > :nth-child(2) { animation-delay: .12s; }
	.hero-rise > :nth-child(3) { animation-delay: .26s; }
	.hero-rise > :nth-child(4) { animation-delay: .36s; }
	.hero-rise > :nth-child(5) { animation-delay: .46s; }
	.hero-rise > :nth-child(6) { animation-delay: .56s; }
	.unveil img, img.unveil { animation: zzUnveil var(--slow) var(--ease) .2s both; }

	/* Scrolling: things rise in as they enter the screen (set up by the site script). */
	.js .rv { opacity: 0; translate: 0 24px; transition: opacity var(--base) var(--ease), translate var(--base) var(--ease); transition-delay: var(--d, 0s); }
	.js .rv.in { opacity: 1; translate: 0 0; }
	.thread path { stroke-dasharray: 1800; stroke-dashoffset: 1800; }
	.js .thread.in path, .no-js .thread path { animation: zzDraw 2.4s var(--ease) both; }
	.thread path:nth-child(2) { animation-delay: .2s; }
	.thread path:nth-child(3) { animation-delay: .4s; }
	.thread path:nth-child(4) { animation-delay: .6s; }
	.breathe { animation: zzBreathe 2.2s ease-in-out .6s 2; }
	[role="status"]:not(:empty):not(.sr-only) { animation: zzRise .45s var(--ease) both; }
}

/* WordPress content inside articles and simple pages. */
.alignwide { max-width: 1100px; }
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); }
.wp-caption-text, figcaption { margin-top: 10px; font-size: 14px; color: var(--brown); }
