/*
Theme Name: Zouma Theme
Theme URI: https://zouma.local/
Author: Zouma
Author URI: https://zouma.local/
Description: A custom, hand-built WordPress theme for the Zouma website. Classic PHP templates with a modern CSS-variable design system.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zouma
Tags: custom-menu, featured-images, translation-ready, block-styles, wide-blocks
*/

/* -------------------------------------------------------------------------
 * This file holds the theme header, design tokens and base element styles.
 * Layout + component styles live in assets/css/main.css.
 * ---------------------------------------------------------------------- */

/* Albert Sans — self-hosted variable font (weights 100–900). */
@font-face {
	font-family: "Albert Sans";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("assets/fonts/albert-sans-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
		U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
		U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Albert Sans";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("assets/fonts/albert-sans-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
		U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
		U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Albert Sans";
	font-style: italic;
	font-weight: 100 900;
	font-display: swap;
	src: url("assets/fonts/albert-sans-italic-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
		U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
		U+FEFF, U+FFFD;
}

/* Poppins — body copy (400/500/600/700). */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/poppins-700.woff2") format("woff2"); }

:root {
	/* ---------------------------------------------------------------------
	 * Fluid sizing cap.
	 *
	 * Every fluid value in the theme — type, padding, gaps, column insets — is
	 * written as clamp(min, something * var(--zouma-vw), max) rather than
	 * against raw vw. Below the design width this behaves exactly like 1vw and
	 * the page scales down as it always did; at and above it the term freezes,
	 * so a 1440 laptop and a 4K monitor render identically instead of the
	 * whole page inflating with the screen.
	 *
	 * 14.4px is 1% of 1440. Change this one number to move the width at which
	 * the site stops growing — nothing else needs touching.
	 * ------------------------------------------------------------------- */
	--zouma-design-width: 1440;
	--zouma-vw: min(1vw, 14.4px);

	/* Brand palette — sampled from the Figma file */
	--zouma-dark: #121212;
	--zouma-teal: #042634;
	--zouma-teal-deep: #06394e;
	/* Sticky header fill. The last two digits are the alpha: d4 is 83%, c7 is
	 * 78%, b8 is 72%, a6 is 65%. Below about a0 the white nav drops under the
	 * 4.5:1 contrast threshold against the white page behind the homepage
	 * header, so that is the floor rather than a matter of taste.
	 *
	 * The reference header measures ~83%; this sits a little under it so the
	 * page still reads through, which is the point of the glass.
	 *
	 * Opened up further now that the hero grid runs behind the bar rather than
	 * stopping at it — there is finally something back there worth seeing, and
	 * at 78% the frosting had nothing to show. a8 is 66%, which is as far as it
	 * goes: the a0 floor above is a contrast limit, not a preference. */
	--zouma-header-bg: #042634a8;
	/* 16px top padding + the 60px bar. Used by heroes that sit under the
	 * header. */
	--zouma-header-h: 76px;
	--zouma-blue: #0e85b6;
	--zouma-blue-dark: #0b6d95;
	--zouma-cyan: #2baee4;
	--zouma-cyan-soft: #5fc0ea;
	--zouma-sky: #addbf3;
	--zouma-sky-soft: #c7e4f6;
	--zouma-blue-pale: #e1edf9;
	--zouma-blue-tint: #f2f8fc;
	/* The Zouma mark, as a mask rather than a picture: the shape is the same
	   eight-square ring zouma_icon('spark') draws, and masking lets every place
	   that uses it keep painting with its own background colour instead of
	   needing one recoloured copy of the artwork per context. */
	--zouma-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%23000'%3E%3Crect x='10.6' y='2' width='3.4' height='3.4' rx='1.1'/%3E%3Crect x='16.2' y='4.4' width='3.4' height='3.4' rx='1.1' transform='rotate(30 17.9 6.1)'/%3E%3Crect x='18.6' y='10.3' width='3.4' height='3.4' rx='1.1'/%3E%3Crect x='16.2' y='16.2' width='3.4' height='3.4' rx='1.1' transform='rotate(-30 17.9 17.9)'/%3E%3Crect x='10.6' y='18.6' width='3.4' height='3.4' rx='1.1'/%3E%3Crect x='4.7' y='16.2' width='3.4' height='3.4' rx='1.1' transform='rotate(30 6.4 17.9)'/%3E%3Crect x='2.3' y='10.3' width='3.4' height='3.4' rx='1.1'/%3E%3Crect x='4.7' y='4.4' width='3.4' height='3.4' rx='1.1' transform='rotate(-30 6.4 6.1)'/%3E%3C/g%3E%3C/svg%3E");
	/* Intro statement. The panel is dark now, so the reveal runs the other way:
	 * words start as a faint wash of the light text colour and resolve to full
	 * strength. Kept as a wash rather than a flat tone so it dims the body copy
	 * and the white <strong> opening by the same amount. */
	--zouma-intro-body: #9cc4dc;
	/* The unlit state on the pale panel. A flat light grey-blue rather than a
	 * wash of the text colour: on the old dark panel a low-alpha tint sank into
	 * the background, but here the ground is light, so a transparent tint would
	 * make the unread words almost white and the statement would look like it
	 * had not loaded. This is faint enough to read as "not yet" and solid
	 * enough to stay legible. */
	--zouma-intro-dim: #a6b3c3;

	/* Semantic */
	--zouma-color-bg: #ffffff;
	--zouma-color-surface: var(--zouma-blue-tint);
	--zouma-color-border: #d9e6f0;
	--zouma-color-text: #121212;
	--zouma-color-muted: #5b6770;
	--zouma-color-primary: var(--zouma-blue);
	--zouma-color-primary-dark: var(--zouma-blue-dark);
	--zouma-color-accent: var(--zouma-cyan);

	/* Typography — Albert Sans for headings, Poppins for copy */
	--zouma-font-body: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--zouma-font-heading: "Albert Sans", var(--zouma-font-body);
	--zouma-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--zouma-text-base: 0.875rem;
	--zouma-leading: 1.7;

	/* Type scale, matching the Figma values */
	--zouma-size-hero: clamp(2.25rem, 1.2rem + calc(3.4 * var(--zouma-vw)), 3.5625rem);   /* 57px */
	/* One size for every section heading on the site, per the brand direction:
	 * 48px on 105% leading. Section titles previously ranged from 30px to 53px
	 * depending on which sheet styled them. */
	--zouma-size-h2: 3rem;                                            /* 48px */
	--zouma-lh-h2: 1.05;                                              /* 105%  */
	--zouma-size-h3: 1.25rem;                                         /* 20px */
	--zouma-size-quote: clamp(1.1rem, 1rem + calc(0.5 * var(--zouma-vw)), 1.5rem);          /* 24px */
	--zouma-size-stat: clamp(1.6rem, 1.3rem + calc(1 * var(--zouma-vw)), 2rem);             /* 32px */
	--zouma-size-lede: 1rem;                                          /* 16px */
	--zouma-size-body: 0.875rem;                                      /* 14px */
	--zouma-size-eyebrow: 0.75rem;                                    /* 12px */
	--zouma-size-mini: 0.625rem;                                      /* 10px */

	/* Spacing scale */
	--zouma-space-1: 0.25rem;
	--zouma-space-2: 0.5rem;
	--zouma-space-3: 1rem;
	--zouma-space-4: 1.5rem;
	--zouma-space-5: 2.5rem;
	--zouma-space-6: 4rem;

	/* Layout */
	--zouma-content-width: 44rem;
	--zouma-wide-width: 72rem;
	--zouma-gutter: var(--zouma-space-4);

	/* Misc */
	--zouma-radius: 0.5rem;
	--zouma-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 16px rgba(16, 24, 40, 0.06);
	--zouma-transition: 150ms ease;
}

/* Base ------------------------------------------------------------------ */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background-color: var(--zouma-color-bg);
	color: var(--zouma-color-text);
	font-family: var(--zouma-font-body);
	font-size: var(--zouma-text-base);
	line-height: var(--zouma-leading);
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 var(--zouma-space-3);
	font-family: var(--zouma-font-heading);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.015em;
	text-wrap: balance;
}

h1 { font-size: var(--zouma-size-hero); }
h2 { font-size: var(--zouma-size-h2); line-height: var(--zouma-lh-h2); }
h3 { font-size: var(--zouma-size-h3); }
h4 { font-size: 1.125rem; }
h5, h6 { font-size: 1rem; }

p, ul, ol, dl, table, pre, blockquote, figure {
	margin: 0 0 var(--zouma-space-3);
}

a {
	color: var(--zouma-color-primary);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
	transition: color var(--zouma-transition);
}

a:hover,
a:focus {
	color: var(--zouma-color-primary-dark);
}

:focus-visible {
	outline: 2px solid var(--zouma-color-primary);
	outline-offset: 2px;
}

img,
video,
iframe,
svg {
	max-width: 100%;
	height: auto;
}

figure > img {
	display: block;
	border-radius: var(--zouma-radius);
}

blockquote {
	padding-left: var(--zouma-space-3);
	border-left: 3px solid var(--zouma-color-primary);
	color: var(--zouma-color-muted);
	font-style: italic;
}

code, kbd, pre, samp {
	font-family: var(--zouma-font-mono);
	font-size: 0.9em;
}

code {
	padding: 0.15em 0.35em;
	background: var(--zouma-color-surface);
	border-radius: 0.25rem;
}

pre {
	padding: var(--zouma-space-3);
	overflow-x: auto;
	background: var(--zouma-color-surface);
	border-radius: var(--zouma-radius);
}

hr {
	height: 1px;
	margin: var(--zouma-space-5) 0;
	border: 0;
	background: var(--zouma-color-border);
}

table {
	width: 100%;
	border-collapse: collapse;
}

th, td {
	padding: var(--zouma-space-2);
	border-bottom: 1px solid var(--zouma-color-border);
	text-align: left;
}

/* Forms ----------------------------------------------------------------- */

input,
select,
textarea,
button {
	font: inherit;
	color: inherit;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
select,
textarea {
	width: 100%;
	padding: 0.6rem 0.75rem;
	background: var(--zouma-color-bg);
	border: 1px solid var(--zouma-color-border);
	border-radius: var(--zouma-radius);
	transition: border-color var(--zouma-transition), box-shadow var(--zouma-transition);
}

input:focus,
select:focus,
textarea:focus {
	border-color: var(--zouma-color-primary);
	box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.15);
	outline: none;
}

button,
input[type="submit"],
input[type="button"],
.zouma-button {
	display: inline-block;
	width: auto;
	padding: 0.65rem 1.35rem;
	background: var(--zouma-color-primary);
	color: #fff;
	border: 1px solid transparent;
	border-radius: var(--zouma-radius);
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
	transition: background var(--zouma-transition);
}

button:hover,
input[type="submit"]:hover,
.zouma-button:hover {
	background: var(--zouma-color-primary-dark);
	color: #fff;
}

.zouma-button--secondary {
	background: transparent;
	color: var(--zouma-color-primary);
	border-color: var(--zouma-color-border);
}

.zouma-button--secondary:hover {
	background: var(--zouma-color-surface);
	color: var(--zouma-color-primary-dark);
}

/* Accessibility helpers -------------------------------------------------- */

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: var(--zouma-space-3);
	z-index: 999;
	padding: var(--zouma-space-2) var(--zouma-space-3);
	background: var(--zouma-color-text);
	color: #fff;
	border-radius: var(--zouma-radius);
	text-decoration: none;
}

.skip-link:focus {
	top: var(--zouma-space-3);
	color: #fff;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }

	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
