/*
Theme Name: Oryx Executive Search
Theme URI: https://staging.oryxes.co.uk/
Description: Custom theme for Oryx Executive Search, built from the Figma "Oryx" file.
Author: Talent Hero Media
Version: 0.2.0
Text Domain: oryx
*/

/* ==========================================================================
   Design tokens — from the Figma "Oryx" file (GLOBAL_VARS fills/text styles)
   ========================================================================== */

:root {
	/* Brand */
	--color-purple: #662483;
	--color-purple-alt: #652981;
	--color-purple-tint: #F4DBFF;

	/* Neutrals */
	--color-ink: #1D1D1B;
	--color-charcoal-1: #221B2E;   /* headings on light backgrounds */
	--color-charcoal-2: #2A2233;   /* chip / small text */
	--color-deep-teal: #07232F;
	--color-grey: #9D9D9C;

	/* Off-whites / paper tones */
	--color-paper-1: #F8F7F3;
	--color-paper-2: #F4F0E7;      /* also the card border colour */
	--color-paper-3: #EEE9DE;
	--color-grey-light: #EFEFEF;
	--color-white: #FFFFFF;

	/* Accent */
	--color-gold: #C8B27A;

	/* Type */
	--font-display: 'Literata', Georgia, 'Times New Roman', serif;
	--font-body: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;

	/* Fluid type. The comp is a single 1920px frame, so every size below is the
	   comp value at the top end and a deliberately chosen phone value at the
	   bottom — 72px display type wraps to five lines on a 375px screen. */
	--step-display: clamp(2.25rem, 1.35rem + 3.84vw, 4.5rem);   /* 36 → 72 */
	--step-h2:      clamp(1.75rem, 1.19rem + 2.4vw, 3.4375rem); /* 28 → 55 */
	--step-h3:      clamp(1.375rem, 1.13rem + 1.07vw, 2rem);    /* 22 → 32 */
	--step-lead:    clamp(1.125rem, 1.0rem + 0.53vw, 1.4375rem);/* 18 → 23 */
	--step-body:    clamp(1rem, 0.96rem + 0.18vw, 1.125rem);    /* 16 → 18 */
	--step-small:   1.0625rem;                                   /* 17, nav */

	/* Layout. The comp insets content 375px inside a 1920px frame, i.e. a
	   1170px column; below that the gutter shrinks rather than the column. */
	--content-max: 1170px;
	--gutter: 24px;
	--section-y: clamp(56px, 3.5rem + 2.5vw, 100px);
}

@media (min-width: 768px) {
	:root { --gutter: 40px; }
}

@media (min-width: 1280px) {
	:root { --gutter: 64px; }
}

/* ==========================================================================
   Base
   ========================================================================== */

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

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

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: var(--step-body);
	line-height: 1.667;              /* 30px on 18px, per the comp */
	color: var(--color-ink);
	background: var(--color-white);
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: inherit; }

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 300;
	line-height: 1.2;
	margin: 0;
	color: var(--color-charcoal-1);
}

h1 { font-size: var(--step-display); }
h2 { font-size: var(--step-h2); }
h3 { font-size: var(--step-h3); }

p { margin: 0 0 1.25em; }
p:last-child { margin-bottom: 0; }

/* Focus is never removed, only restyled — keyboard users need to see it. */
:focus-visible {
	outline: 2px solid var(--color-purple);
	outline-offset: 3px;
}

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

/* ==========================================================================
   Layout primitives
   ========================================================================== */

.container {
	width: 100%;
	max-width: calc(var(--content-max) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.section {
	padding-block: var(--section-y);
}

.section--purple {
	background: var(--color-purple);
	color: var(--color-white);
}
.section--purple h1,
.section--purple h2,
.section--purple h3 { color: var(--color-white); }

.section--paper { background: var(--color-paper-1); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
	position: absolute;
	inset: 0 0 auto 0;
	z-index: 20;
	padding-block: 20px;
	color: var(--color-white);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	width: 100%;
	max-width: calc(var(--content-max) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.site-header__logo {
	display: inline-flex;
	align-items: center;
	font-family: var(--font-display);
	font-size: 1.5rem;
	text-decoration: none;
	color: inherit;
}
.site-header__logo-mark {
	display: block;
	width: auto;
	height: clamp(38px, 3.4vw, 52px);
	color: currentColor;
}

.site-header__menu {
	display: flex;
	align-items: center;
	gap: clamp(20px, 2vw, 40px);
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--step-small);
	font-weight: 500;
	letter-spacing: 0.06em;
}

.site-header__menu a {
	text-decoration: none;
	padding-block: 6px;
}
.site-header__menu a:hover { text-decoration: underline; }

/* Sub-menus. Hidden by default at every width and revealed either by hover /
   focus-within (pointer) or by the toggle button (touch and keyboard), so the
   parent item stays a working link rather than a dead dropdown handle. */
.site-header__menu li { position: relative; }

.site-header__menu .sub-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-header__submenu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin-left: 2px;
	padding: 0;
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
}

/* Drawn chevron, so there is no icon file to load or 404. */
.site-header__submenu-toggle::before {
	content: '';
	width: 7px;
	height: 7px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform 0.15s ease;
}
.site-header__submenu-toggle[aria-expanded="true"]::before {
	transform: translateY(1px) rotate(-135deg);
}

@media (min-width: 1024px) {
	.site-header__menu > li.menu-item-has-children > a { padding-right: 2px; }

	.site-header__menu .sub-menu {
		position: absolute;
		top: 100%;
		left: -20px;
		min-width: 220px;
		padding: 12px 0;
		background: var(--color-charcoal-1);
		border-radius: 12px;
		box-shadow: 0 18px 40px rgba(4, 1, 10, 0.35);
		opacity: 0;
		visibility: hidden;
		transform: translateY(-6px);
		transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
	}

	.site-header__menu .sub-menu a {
		display: block;
		padding: 10px 24px;
		white-space: nowrap;
	}

	.site-header__menu > li:hover > .sub-menu,
	.site-header__menu > li:focus-within > .sub-menu,
	.site-header__menu > li > .sub-menu.is-open {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}
}

@media (max-width: 1023px) {
	/* On a phone the sub-menu is a disclosure inside the panel, not an overlay. */
	.site-header__menu .sub-menu {
		padding-left: 16px;
	}
	.site-header__menu .sub-menu[hidden] { display: none; }
}

/* The nav collapses to a toggle below the first breakpoint; the toggle itself
   is hidden from desktop where the full menu shows. */
.site-header__toggle {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: none;
	border: 0;
	padding: 10px;
	margin: -10px;
	color: inherit;
	font: inherit;
	cursor: pointer;
	min-height: 44px;
}

@media (max-width: 1023px) {
	.site-header__nav {
		position: absolute;
		inset: 100% 0 auto 0;
		background: var(--color-charcoal-1);
		padding: var(--gutter);
	}
	.site-header__nav[hidden] { display: none; }
	.site-header__menu {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
	}
	.site-header__menu a {
		display: block;
		padding-block: 12px;   /* 44px touch target */
	}
}

@media (min-width: 1024px) {
	.site-header__toggle { display: none; }
	.site-header__nav[hidden] { display: block; }
}

/* ==========================================================================
   Hero — full-bleed photograph, dark gradient, copy bottom-left
   ========================================================================== */

.hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: min(80vh, 620px);
	padding-block: clamp(120px, 12vw, 210px) var(--section-y);
	background: var(--color-charcoal-1);
	color: var(--color-white);
	overflow: hidden;
}

.hero__media {
	position: absolute;
	inset: 0;
	object-fit: cover;
	width: 100%;
	height: 100%;
}

/* The comp runs a left-to-right dark gradient over the photograph so the copy
   keeps contrast wherever the image is light. */
.hero::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(4,1,10,0.92) 10%, rgba(4,1,10,0.6) 55%, rgba(4,1,10,0.25) 100%);
}

.hero__inner { position: relative; z-index: 1; }

.hero h1 {
	color: var(--color-white);
	max-width: 16ch;
}

.hero__intro {
	margin-top: 28px;
	max-width: 46ch;
	font-size: var(--step-lead);
	line-height: 1.5;
}

/* ==========================================================================
   Strap line
   ========================================================================== */

.strapline {
	text-align: center;
	font-family: var(--font-display);
	font-weight: 300;
	font-size: var(--step-h2);
	line-height: 1.2;
	color: var(--color-charcoal-1);
	max-width: 24ch;
	margin-inline: auto;
}

/* ==========================================================================
   Two-column copy block (heading left, paragraph right on desktop)
   ========================================================================== */

.copy-block__grid {
	display: grid;
	gap: 32px;
}

.copy-block__body { font-size: var(--step-body); }
.copy-block__body p { margin-bottom: 1.5em; }

@media (min-width: 1024px) {
	.copy-block__grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
		gap: clamp(48px, 6vw, 130px);
		align-items: start;
	}
}

/* ==========================================================================
   Typical roles — chips in two columns
   ========================================================================== */

.roles__heading { text-align: center; margin-bottom: 48px; }

.roles__list {
	display: grid;
	gap: 16px 48px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 768px) {
	.roles__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.roles__item {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding-block: 14px;
	border-bottom: 1px solid var(--color-paper-2);
	color: var(--color-charcoal-2);
	font-size: var(--step-body);
	line-height: 1.3;
}

/* The comp marks each role with a small chevron; drawn rather than shipped as
   an asset so it inherits colour and never 404s. */
.roles__item::before {
	content: '';
	flex: 0 0 auto;
	width: 9px;
	height: 9px;
	margin-top: 0.45em;
	border-right: 2px solid var(--color-purple);
	border-bottom: 2px solid var(--color-purple);
	transform: rotate(-45deg);
}

/* ==========================================================================
   Case studies — 3-up cards
   ========================================================================== */

.case-studies__heading { text-align: center; margin-bottom: 48px; }

.case-studies__grid {
	display: grid;
	gap: 24px;
}

@media (min-width: 768px) {
	.case-studies__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
	.case-studies__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.case-study-card {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 28px;
	background: var(--color-white);
	border: 1px solid var(--color-paper-2);
	border-radius: 20px;
}

.case-study-card__logo {
	display: flex;
	align-items: center;
	height: 56px;
}
.case-study-card__logo img {
	max-height: 56px;
	width: auto;
	object-fit: contain;
}

.case-study-card__title {
	font-size: var(--step-h3);
	margin: 0;
}

.case-study-card__summary {
	font-size: 1rem;
	line-height: 1.6;
	color: var(--color-charcoal-2);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.button {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 14px 26px;
	background: var(--color-purple);
	color: var(--color-white);
	font-weight: 600;
	font-size: 1rem;
	letter-spacing: 0.02em;
	text-decoration: none;
	border: 0;
	border-radius: 30px;
	cursor: pointer;
}

.button:hover { background: var(--color-purple-alt); }

.button--ghost {
	background: transparent;
	border: 1px solid currentColor;
	color: inherit;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
	background: var(--color-charcoal-1);
	color: var(--color-white);
	padding-block: var(--section-y);
}

.site-footer__inner {
	display: grid;
	gap: 40px;
	width: 100%;
	max-width: calc(var(--content-max) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

@media (min-width: 768px) {
	.site-footer__inner { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.site-footer__heading {
	font-family: var(--font-body);
	font-size: 0.9375rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--color-gold);
	margin: 0 0 16px;
}

.site-footer__menu {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 10px;
}

.site-footer__menu a {
	text-decoration: none;
	padding-block: 4px;
	display: inline-block;
}
.site-footer__menu a:hover { text-decoration: underline; }

/* Locations run in two columns once there is room — thirteen in one column is
   a long list. */
@media (min-width: 480px) {
	.site-footer__menu--locations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
