/* ==========================================================================
   QuantumOrbit Consulting — Base
   Design tokens, reset, typography, layout primitives, buttons, forms.
   ========================================================================== */

:root {
	/* Brand palette (overridable in Customizer > Colors) */
	--qo-primary: #1c2120;      /* Charcoal Grey — page background */
	--qo-secondary: #333333;    /* Dusty charcoal — panels, hover */
	--qo-accent: #b5a48e;       /* Sand — buttons, highlights */
	--qo-link: #6cb5ff;         /* Link blue */
	--qo-text: #ebedee;         /* Cloud White */
	--qo-black: #000000;        /* Footer */
	--qo-underline: #1f6bff;    /* Page-title underline (About) */

	--qo-text-muted: rgba(235, 237, 238, 0.72);
	--qo-border: rgba(181, 164, 142, 0.75);
	--qo-line: rgba(235, 237, 238, 0.35);
	--qo-on-accent: #1c2120;

	/* Typography */
	--qo-font-heading: "Playfair Display", Georgia, "Times New Roman", serif;
	--qo-font-body: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

	--qo-fs-hero: clamp(36px, 22.4px + 2.6vw, 56px);       /* banner headings (original design size) */
	--qo-fs-h2: clamp(32px, 21.6px + 2vw, 50px);           /* section headings (original design size) */
	--qo-fs-lead: 20px;                                    /* banner subtitle + section intros (18px on phones, see responsive.css) */
	--qo-fs-card-title: clamp(17px, 16px + 0.25vw, 20px);
	--qo-fs-body: 16px;                                    /* body text */
	--qo-fs-small: 16px;                                   /* body text in cards, lists, tables */
	--qo-fs-button: 16px;                                  /* CTA / button text */

	/* Layout */
	--qo-container: 1200px;
	--qo-container-md: 960px;
	--qo-container-narrow: 900px;
	--qo-container-content: 820px;
	--qo-gutter: clamp(16px, 4vw, 40px);
	--qo-section-y: clamp(56px, 7vw, 104px);
	--qo-radius: 16px;
	--qo-radius-sm: 10px;
	--qo-header-h: 96px;
	--qo-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
	--qo-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--qo-header-h) + 16px);
}

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

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

body {
	margin: 0;
	background: var(--qo-primary);
	color: var(--qo-text);
	font-family: var(--qo-font-body);
	font-size: var(--qo-fs-body);
	font-weight: 400;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

@supports (overflow: clip) {
	body {
		overflow-x: clip; /* keeps position: sticky working */
	}
}

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

figure {
	margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 0.5em;
	color: var(--qo-text);
	line-height: 1.2;
	overflow-wrap: break-word;
}

h1,
h2 {
	font-family: var(--qo-font-heading);
	font-weight: 400;
}

h3,
h4,
h5,
h6 {
	font-family: var(--qo-font-body);
	font-weight: 600;
}

p {
	margin: 0 0 1em;
}

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

a {
	color: var(--qo-link);
	text-decoration: none;
	transition: color 0.2s ease;
}

a:hover {
	color: var(--qo-text);
}

strong,
b {
	font-weight: 600;
}

ul,
ol {
	margin: 0 0 1em;
	padding-left: 1.25em;
}

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

/* Pointer cursor on everything clickable */
a[href],
button:not(:disabled),
[role="button"],
input[type="submit"]:not(:disabled),
input[type="button"]:not(:disabled),
input[type="reset"]:not(:disabled),
select,
summary {
	cursor: pointer;
}

hr {
	border: 0;
	border-top: 1px solid var(--qo-line);
	margin: 2em 0;
}

/* ---------- Accessibility ---------- */
.screen-reader-text {
	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-link:focus {
	position: fixed !important;
	top: 12px;
	left: 12px;
	z-index: 1000;
	width: auto;
	height: auto;
	clip: auto;
	padding: 12px 18px;
	background: var(--qo-accent);
	color: var(--qo-on-accent);
	border-radius: 999px;
	font-weight: 500;
}

:focus-visible {
	outline: 2px solid var(--qo-link);
	outline-offset: 3px;
}

#main:focus {
	outline: none;
}

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

.container--md {
	max-width: calc(var(--qo-container-md) + 2 * var(--qo-gutter));
}

.container--narrow {
	max-width: calc(var(--qo-container-narrow) + 2 * var(--qo-gutter));
}

.container--content {
	max-width: calc(var(--qo-container-content) + 2 * var(--qo-gutter));
}

.stack.container--md {
	padding-inline: 0;
}

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

.section + .section {
	padding-top: calc(var(--qo-section-y) * 0.5);
}

.grid {
	display: grid;
	gap: clamp(16px, 2vw, 24px);
}

.grid--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* ---------- Typography helpers ---------- */
.qo-break {
	display: inline;
}

@media (min-width: 641px) {
	.qo-break {
		display: block;
	}
}

/* Headings with a requested line break: balance the lines before the break
   so no short orphan line is left (e.g. "disruption and"). */
:is(h1, h2):has(.qo-break) {
	text-wrap: balance;
}

.text-accent {
	color: var(--qo-accent);
}

.section-head {
	max-width: 1080px;
	margin: 0 auto clamp(32px, 4vw, 48px);
	text-align: center;
}

.section-head--wide {
	max-width: 1080px;
}

.section-head .section-intro {
	max-width: 960px;
	margin-inline: auto;
}

.section-title {
	font-family: var(--qo-font-heading);
	font-size: var(--qo-fs-h2);
	font-weight: 400;
	line-height: 1.22;
	margin: 0;
	text-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.section-intro {
	margin-top: clamp(16px, 2vw, 24px);
	font-size: var(--qo-fs-lead);
	line-height: 1.45;
}

.section-intro p + p {
	margin-top: 1em;
}

.section-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: clamp(28px, 3vw, 40px);
}

.section-actions:empty {
	display: none;
}

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	min-height: 44px;
	padding: 11px 20px 9px; /* label nudged down 1px for optical centring */
	border: 2px solid var(--qo-accent);
	border-radius: 999px;
	font-family: var(--qo-font-body);
	font-size: var(--qo-fs-button);
	font-weight: 400;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.25s var(--qo-ease), color 0.25s var(--qo-ease), border-color 0.25s var(--qo-ease), transform 0.25s var(--qo-ease), box-shadow 0.25s var(--qo-ease);
}

.btn--primary {
	background: var(--qo-accent);
	color: var(--qo-on-accent);
}

.btn--primary:hover,
.btn--primary:focus-visible {
	background: #c8b9a5;
	border-color: #c8b9a5;
	color: var(--qo-on-accent);
	transform: translateY(-1px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn--outline {
	background: transparent;
	color: var(--qo-text);
}

.btn--outline:hover,
.btn--outline:focus-visible {
	background: var(--qo-accent);
	color: var(--qo-on-accent);
}

.btn--sm {
	min-height: 38px;
	padding: 8px 16px 6px;
	font-size: var(--qo-fs-button);
}

.btn-group {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.link-more {
	color: var(--qo-link);
	font-size: 17px;
}

/* ---------- Forms ---------- */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="password"],
input[type="number"],
select,
textarea {
	width: 100%;
	min-height: 48px;
	padding: 12px 16px;
	background: var(--qo-primary);
	border: 1px solid rgba(235, 237, 238, 0.25);
	border-radius: var(--qo-radius-sm);
	color: var(--qo-text);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

input:focus,
select:focus,
textarea:focus {
	border-color: var(--qo-accent);
	box-shadow: 0 0 0 3px rgba(181, 164, 142, 0.25);
	outline: none;
}

::placeholder {
	color: rgba(235, 237, 238, 0.45);
}

label {
	display: inline-block;
	margin-bottom: 6px;
	font-size: var(--qo-fs-small);
}

.search-form {
	display: flex;
	gap: 10px;
	max-width: 520px;
}

.search-form__input {
	flex: 1;
}

/* ---------- Editor content (block editor output) ---------- */
.entry-content {
	font-size: 16px;
	line-height: 1.7;
}

.entry-content > * + * {
	margin-top: 1.1em;
}

.entry-content h2 {
	font-size: clamp(28px, 22.4px + 1vw, 38px);
	margin-top: 1.6em;
}

.entry-content h3 {
	font-size: 22px;
	margin-top: 1.4em;
}

.entry-content a {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.entry-content img {
	border-radius: var(--qo-radius-sm);
}

.entry-content blockquote {
	margin: 1.5em 0;
	padding: 0.5em 0 0.5em 1.25em;
	border-left: 3px solid var(--qo-accent);
	font-family: var(--qo-font-heading);
	font-size: 22px;
}

.entry-content .alignwide {
	width: min(100vw - 2 * var(--qo-gutter), var(--qo-container));
	max-width: none;
	margin-left: 50%;
	transform: translateX(-50%);
}

.entry-content .alignfull {
	width: 100vw;
	max-width: none;
	margin-left: 50%;
	transform: translateX(-50%);
}

.entry-content .wp-block-button__link {
	background: var(--qo-accent);
	color: var(--qo-on-accent);
	border-radius: 999px;
	text-decoration: none;
}

.entry-content .is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--qo-text);
	border: 2px solid var(--qo-accent);
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
}

.entry-content th,
.entry-content td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--qo-line);
	text-align: left;
}

.alignleft {
	float: left;
	margin: 0 1.5em 1em 0;
}

.alignright {
	float: right;
	margin: 0 0 1em 1.5em;
}

.aligncenter {
	margin-inline: auto;
}

.wp-caption-text,
figcaption {
	margin-top: 8px;
	font-size: 14px;
	color: var(--qo-text-muted);
}
