/*
Theme Name: Eqynox Holding
Author: Eqynox Holding
Description: A lightweight, accessible block theme for Eqynox Holding. Deep navy and gold, built on the native WordPress Site Editor. No page builder, no external fonts, no external scripts.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: eqynox-holding
*/

/* ------------------------------------------------------------------
   Base
------------------------------------------------------------------ */
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; }
.wp-site-blocks > * { margin-block-start: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }

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

/* Visible keyboard focus everywhere */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--gold-light);
	outline-offset: 3px;
	border-radius: 2px;
}
.eq-section--light :where(a, button, input, select, textarea):focus-visible,
.eq-main--page :where(a, button, input, select, textarea):focus-visible {
	outline-color: var(--wp--preset--color--navy);
}

/* ------------------------------------------------------------------
   Header
------------------------------------------------------------------ */
.eq-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(5, 14, 31, 0.95);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--wp--custom--gold-line);
	padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}
.admin-bar .eq-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .eq-header { top: 46px; } }

.eq-header__inner {
	max-width: var(--wp--style--global--content-size);
	margin-inline: auto;
	padding-block: 0.7rem;
	gap: 1.25rem;
}
.eq-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	text-decoration: none;
	color: var(--wp--preset--color--white);
}
.eq-brand img { display: block; width: 48px; height: auto; }
.eq-brand__text { display: flex; flex-direction: column; line-height: 1; }
.eq-brand__name {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.35rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	color: var(--wp--preset--color--white);
}
.eq-brand__sub {
	margin-top: 0.3rem;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.42em;
	color: var(--wp--preset--color--gold);
}
@media (max-width: 359px) { .eq-brand__text { display: none; } }

.eq-nav .wp-block-navigation-item__content { text-decoration: none; padding-block: 0.4rem; border-bottom: 2px solid transparent; }
.eq-nav .wp-block-navigation-item__content:hover { border-bottom-color: var(--wp--preset--color--gold); }
.eq-nav .eq-nav-enquiry { display: none; }
.eq-nav .wp-block-navigation__responsive-container.is-menu-open .eq-nav-enquiry { display: block; }
.eq-header__cta { margin: 0; }
@media (max-width: 999px) { .eq-header__cta { display: none; } }

/* ------------------------------------------------------------------
   Section system
------------------------------------------------------------------ */
.eq-section {
	margin-block: 0;
	padding-block: clamp(3.5rem, 8vw, 6rem);
	padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}
.eq-section--navy { background: var(--wp--preset--color--navy); }
.eq-section--soft { background: var(--wp--preset--color--navy-soft); }
.eq-section--deep { background: var(--wp--preset--color--navy-deep); }
.eq-section--light { background: var(--wp--preset--color--ivory); color: var(--wp--preset--color--ink); }
.eq-section--light :where(h1, h2, h3, h4, h5, h6) { color: var(--wp--preset--color--ink); }
.eq-section--light .eq-muted { color: var(--wp--preset--color--slate); }
.eq-section--light a:where(:not(.wp-element-button)) { color: var(--wp--preset--color--navy-soft); text-decoration: underline; }
.eq-section--light a:where(:not(.wp-element-button)):hover { color: var(--wp--preset--color--gold-ink); }
.eq-muted { color: var(--wp--preset--color--mist); }

.eq-eyebrow {
	margin: 0;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gold);
}
.eq-section--light .eq-eyebrow { color: var(--wp--preset--color--gold-ink); }

.eq-sechead { max-width: 720px; text-align: center; margin-bottom: clamp(2rem, 5vw, 3.25rem); }
.eq-sechead h2::after {
	content: "";
	display: block;
	width: 56px;
	height: 3px;
	margin: 1rem auto 0;
	background: var(--wp--preset--color--gold);
}
.eq-lead { font-size: var(--wp--preset--font-size--medium); }
/* Left-align a narrower block to the left edge of the 1180px content grid */
.eq-left { margin-left: max(0px, calc((100% - var(--wp--style--global--content-size)) / 2)) !important; margin-right: auto !important; }

/* Hero and page hero */
.eq-hero, .eq-pagehero {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(1100px 480px at 88% 0%, rgba(212, 166, 47, 0.16), transparent 62%),
		linear-gradient(180deg, var(--wp--preset--color--navy-deep) 0%, var(--wp--preset--color--navy) 100%);
}
.eq-hero { padding-block: clamp(4.5rem, 11vw, 9rem); }
.eq-pagehero { padding-block: clamp(3.5rem, 8vw, 6rem); }
.eq-hero::after, .eq-pagehero::after {
	content: "";
	position: absolute;
	right: max(-5rem, calc(50% - 780px));
	top: 50%;
	width: min(44vw, 500px);
	aspect-ratio: 352 / 332;
	transform: translateY(-50%);
	background: url("assets/images/emblem-large.png") center / contain no-repeat;
	opacity: 0.11;
	pointer-events: none;
}
.eq-pagehero::after { width: min(34vw, 360px); }
.eq-hero > *, .eq-pagehero > * { position: relative; z-index: 1; }
.eq-hero__text, .eq-pagehero__text { max-width: 800px; }
.eq-hero h1, .eq-pagehero h1 { text-wrap: balance; }
.eq-hero .eq-lead { color: var(--wp--preset--color--mist); max-width: 62ch; }
.eq-pagehero .eq-lead { color: var(--wp--preset--color--mist); max-width: 62ch; }
.eq-hero .wp-block-buttons, .eq-pagehero .wp-block-buttons { margin-top: 1.75rem; gap: 0.9rem; }

@media (prefers-reduced-motion: no-preference) {
	.eq-hero__text > *, .eq-pagehero__text > * { animation: eq-rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
	.eq-hero__text > *:nth-child(2), .eq-pagehero__text > *:nth-child(2) { animation-delay: 0.08s; }
	.eq-hero__text > *:nth-child(3), .eq-pagehero__text > *:nth-child(3) { animation-delay: 0.16s; }
	.eq-hero__text > *:nth-child(4), .eq-pagehero__text > *:nth-child(4) { animation-delay: 0.24s; }
	@keyframes eq-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* Outline buttons */
body .wp-block-button.is-style-outline > .wp-block-button__link.wp-element-button {
	background: transparent;
	color: var(--wp--preset--color--gold);
	border: 2px solid var(--wp--preset--color--gold);
}
body .wp-block-button.is-style-outline > .wp-block-button__link.wp-element-button:hover {
	background: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--navy-deep);
}
body .eq-section--light .wp-block-button.is-style-outline > .wp-block-button__link.wp-element-button {
	color: var(--wp--preset--color--navy);
	border-color: var(--wp--preset--color--navy);
}
body .eq-section--light .wp-block-button.is-style-outline > .wp-block-button__link.wp-element-button:hover {
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white);
}
.wp-element-button { transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease; }

/* ------------------------------------------------------------------
   Division cards
------------------------------------------------------------------ */
.eq-grid-divisions, .eq-grid-divisions.is-layout-flex { gap: 1.5rem; justify-content: center; align-items: stretch; }
.eq-card {
	display: flex;
	flex-direction: column;
	flex: 0 1 calc(25% - 1.125rem);
	min-width: 0;
	background: var(--wp--preset--color--navy-soft);
	border: 1px solid var(--wp--custom--gold-line);
	border-radius: var(--wp--custom--radius);
	overflow: hidden;
	transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
@media (max-width: 1100px) { .eq-card { flex-basis: calc(50% - 0.75rem); } }
@media (max-width: 640px) { .eq-card { flex-basis: 100%; } }
.eq-card:hover { transform: translateY(-4px); border-color: var(--wp--preset--color--gold); box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35); }
.eq-card .wp-block-image { margin: 0; }
.eq-card img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; }
.eq-card__body { display: flex; flex-direction: column; gap: 0.7rem; flex: 1; padding: 1.25rem 1.4rem 1.6rem; }
.eq-card__body h3 { margin: 0; font-size: 1.2rem; }
.eq-card__body p { margin: 0; color: var(--wp--preset--color--mist); font-size: 0.95rem; }
.eq-card__body .wp-block-buttons { margin-top: auto; padding-top: 0.75rem; }
.eq-card__body .wp-block-button__link { padding: 0.7em 1.3em; font-size: 0.78rem; }

/* ------------------------------------------------------------------
   Benefits, steps, values
------------------------------------------------------------------ */
.eq-benefits, .eq-steps, .eq-values { gap: clamp(1.5rem, 3vw, 2.25rem); }
.eq-benefit, .eq-value { border-top: 3px solid var(--wp--preset--color--gold); padding-top: 1.1rem; }
.eq-benefit h3, .eq-value h3 { margin: 0 0 0.5rem; }
.eq-benefit p, .eq-value p { margin: 0; }
.eq-step { padding: 1.5rem 1.4rem; border: 1px solid var(--wp--custom--gold-line); border-radius: var(--wp--custom--radius); background: rgba(15, 39, 72, 0.55); height: 100%; }
.eq-step__num {
	margin: 0 0 0.4rem;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 2.4rem;
	line-height: 1;
	color: var(--wp--preset--color--gold);
}
.eq-step h3 { margin: 0 0 0.5rem; }
.eq-step p:last-child { margin: 0; color: var(--wp--preset--color--mist); }

/* Check lists */
.eq-checklist { list-style: none; padding: 0; margin: 0; }
.eq-checklist li { position: relative; padding-left: 2rem; margin-bottom: 0.7rem; }
.eq-checklist li::before {
	content: "";
	position: absolute;
	left: 0.1rem;
	top: 0.5em;
	width: 0.85rem;
	height: 0.45rem;
	border-left: 3px solid var(--wp--preset--color--gold);
	border-bottom: 3px solid var(--wp--preset--color--gold);
	transform: rotate(-45deg);
}
.eq-section--light .eq-checklist li::before { border-color: var(--wp--preset--color--gold-ink); }

/* Division detail page */
.eq-division-cols { gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.eq-division-cols img { width: 100%; border-radius: var(--wp--custom--radius); border: 1px solid var(--wp--custom--gold-line); }
.eq-division-cols h3 { margin: 1.5rem 0 0.75rem; }

/* Enquiry blocks */
.eq-enquiry-cols { gap: clamp(2rem, 5vw, 4rem); }
.eq-reassure { font-weight: 700; color: var(--wp--preset--color--gold-light); }
.eq-section--light .eq-reassure { color: var(--wp--preset--color--gold-ink); }
.eq-cta { text-align: center; }
.eq-cta > * { margin-inline: auto; }
.eq-cta .wp-block-buttons { justify-content: center; margin-top: 1.5rem; }
.eq-contact-details p { margin: 0 0 0.6rem; }
.eq-placeholder { border-bottom: 1px dashed var(--wp--preset--color--gold-ink); }

/* ------------------------------------------------------------------
   Inner pages and posts (light reading surface)
------------------------------------------------------------------ */
.eq-main { margin: 0; }
.eq-main--page {
	background: var(--wp--preset--color--ivory);
	color: var(--wp--preset--color--ink);
	padding: clamp(3rem, 7vw, 5.5rem) clamp(1.25rem, 4vw, 2.5rem);
}
.eq-main--page :where(h1, h2, h3, h4) { color: var(--wp--preset--color--ink); }
.eq-main--page h1 { margin-bottom: 0.5rem; }
.eq-main--page h1::after { content: ""; display: block; width: 56px; height: 3px; margin-top: 1rem; background: var(--wp--preset--color--gold); }
.eq-main--page h2 { font-size: var(--wp--preset--font-size--large); margin-top: 2.25rem; }
.eq-main--page a:where(:not(.wp-element-button)) { color: var(--wp--preset--color--navy-soft); text-decoration: underline; }
.eq-main--page a:where(:not(.wp-element-button)):hover { color: var(--wp--preset--color--gold-ink); }

/* ------------------------------------------------------------------
   Footer
------------------------------------------------------------------ */
.eq-footer {
	background: var(--wp--preset--color--navy-deep);
	border-top: 1px solid var(--wp--custom--gold-line);
	padding: clamp(3rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 2.5rem) 1.5rem;
	font-size: 0.95rem;
}
.eq-footer__inner { max-width: var(--wp--style--global--content-size); margin-inline: auto; }
.eq-footer .wp-block-columns { gap: 2.5rem; margin-bottom: 2rem; }
.eq-footer h2 {
	margin: 0 0 1rem;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gold);
}
.eq-footer p { color: var(--wp--preset--color--mist); margin: 0 0 0.6rem; }
.eq-footer img { display: block; width: 220px; height: auto; margin-bottom: 1rem; }
.eq-footer .wp-block-navigation { font-size: 0.95rem; text-transform: none; letter-spacing: 0; font-weight: 400; }
.eq-footer .wp-block-navigation__container { gap: 0.5rem; }
.eq-footer .wp-block-navigation a { text-decoration: none; color: var(--wp--preset--color--mist); }
.eq-footer .wp-block-navigation a:hover { color: var(--wp--preset--color--gold-light); text-decoration: underline; }
.eq-footer__legal {
	border-top: 1px solid var(--wp--custom--gold-line);
	padding-top: 1.25rem;
	font-size: 0.85rem;
}
.eq-footer__legal p { margin: 0; }

/* ------------------------------------------------------------------
   404
------------------------------------------------------------------ */
.eq-404 { text-align: center; }
.eq-404 .wp-block-buttons { justify-content: center; margin-top: 1.5rem; }
.eq-404__code { font-family: var(--wp--preset--font-family--serif); font-size: clamp(4rem, 14vw, 8rem); line-height: 1; color: var(--wp--preset--color--gold); margin: 0; }

/* ------------------------------------------------------------------
   Tablet: keep multi-column rows readable between 782px and 999px
------------------------------------------------------------------ */
@media (min-width: 782px) and (max-width: 999px) {
	.eq-footer .wp-block-columns,
	.eq-benefits.wp-block-columns,
	.eq-steps.wp-block-columns,
	.eq-values.wp-block-columns { flex-wrap: wrap !important; }
	.eq-footer .wp-block-column,
	.eq-benefits > .wp-block-column,
	.eq-steps > .wp-block-column,
	.eq-values > .wp-block-column { flex-basis: calc(50% - 1.25rem) !important; flex-grow: 1; }
}

/* Phones: calmer watermark, balanced headings */
@media (max-width: 640px) {
	.eq-hero::after, .eq-pagehero::after { opacity: 0.07; width: 75vw; top: auto; bottom: -8%; transform: none; }
}
h1, h2, h3 { text-wrap: balance; }

/* Contrast fixes on light reading surfaces */
.eq-main--page .eq-muted { color: var(--wp--preset--color--slate); }
.eq-division-cols h2 { margin-bottom: 1rem; }
