/*
Theme Name: Lux Kybernetica
Description: A custom block theme scaffolded by Studio Code.
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lux-kybernetica
Tags: full-site-editing, block-patterns, block-styles, wide-blocks, accessibility-ready, style-variations
*/

/* WordPress inserts margin-block-start: var(--wp--style--block-gap) between the
   template's top-level sections (header part, main, footer part) — a gap that
   exists even when no markup asks for it. Zero it so sections butt edge-to-edge
   and own their vertical rhythm via padding; this does not affect block gaps
   inside nested layouts. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* === accessibilite & mouvement === */
:root {
	scroll-behavior: smooth;
}

*:focus-visible {
	outline: 2px solid var(--wp--preset--color--electric-blue);
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	:root {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

/* === structure === */
body {
	background-color: var(--wp--preset--color--graphite);
}

.wp-block-post-title a {
	text-decoration: none;
	color: inherit;
	transition: color 0.25s ease;
}

.wp-block-post-title a:hover,
.wp-block-post-title a:focus-visible {
	color: var(--wp--preset--color--electric-blue);
}

hr {
	border-color: var(--wp--preset--color--line);
}

/* === eyebrow (shared) === */
.lux-eyebrow {
	text-transform: uppercase;
}

/* h2.lux-eyebrow (I7): keeps the former paragraph's plain-body register —
   theme.json's heading element style (serif, weight 500, tight leading,
   negative tracking) would otherwise leak in now that this is a heading. */
h2.lux-eyebrow {
	font-family: var(--wp--preset--font-family--sans-interface);
	font-weight: 400;
	line-height: 1.6;
	letter-spacing: normal;
}

/* === header === */
/* === footer === */

/* === motion === */
.wp-element-button {
	transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.wp-element-button:hover {
	transform: translateY(-1px);
}

/* === coordinates === */
.lux-coordinates {
	border-top: 1px solid var(--wp--preset--color--line);
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.lux-coordinates p {
	font-family: var(--wp--preset--font-family--mono-metadata);
	font-size: var(--wp--preset--font-size--meta);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ivory-dim);
	margin: 0;
}

/* === axes === */
.lux-axes-item {
	border-top: 1px solid var(--wp--preset--color--line);
}

.lux-axes-number {
	font-family: var(--wp--preset--font-family--mono-metadata);
	color: var(--wp--preset--color--electric-blue);
}

/* === signal === */
.lux-signal {
	border-top: 1px solid var(--wp--preset--color--line);
	border-bottom: 1px solid var(--wp--preset--color--line);
	background-color: var(--wp--preset--color--graphite-2);
}

/* === labs === */
.lux-lab-card {
	border: 1px solid var(--wp--preset--color--line);
	transition: border-color 0.3s ease, transform 0.3s ease;
}

.lux-lab-card:hover {
	border-color: var(--wp--preset--color--electric-blue);
	transform: translateY(-4px);
}

.lux-lab-index {
	font-family: var(--wp--preset--font-family--mono-metadata);
	color: var(--wp--preset--color--ivory-dim);
}

.lux-lab-secondary {
	display: flex;
	flex-direction: column;
}

.lux-lab-meta {
	margin-top: var(--wp--preset--spacing--30);
	padding-top: var(--wp--preset--spacing--20);
	border-top: 1px solid var(--wp--preset--color--line);
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--10);
}

.lux-lab-meta__item {
	font-family: var(--wp--preset--font-family--mono-metadata);
	color: var(--wp--preset--color--ivory-dim);
	letter-spacing: 0.03em;
	margin: 0;
}

.lux-lab-row {
	padding-block: var(--wp--preset--spacing--20);
	border-top: 1px solid var(--wp--preset--color--line);
	transition: padding-inline-start 0.3s ease;
}

.lux-lab-row:last-child {
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.lux-lab-row .wp-block-heading {
	transition: color 0.3s ease;
}

.lux-lab-row:hover {
	padding-inline-start: 0.4rem;
}

.lux-lab-row:hover .wp-block-heading {
	color: var(--wp--preset--color--electric-blue);
}

/* === cta-veilleur === */
.lux-cta-veilleur {
	background-color: var(--wp--preset--color--graphite-2);
	border-top: 1px solid var(--wp--preset--color--line);
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.lux-cta-veilleur__meta {
	margin-top: var(--wp--preset--spacing--20);
}

/* === duo === */
.lux-duo-card {
	border-left: 2px solid var(--wp--preset--color--line);
	transition: border-color 0.3s ease;
}

.lux-duo-card:hover {
	border-left-color: var(--wp--preset--color--spectral-violet);
}

/* === feed === */
.lux-feed-item {
	transition: padding-inline-start 0.3s ease;
}

.lux-feed-item .wp-block-heading {
	transition: color 0.3s ease;
}

.lux-feed-item:hover {
	padding-inline-start: 0.4rem;
}

.lux-feed-item:hover .wp-block-heading {
	color: var(--wp--preset--color--electric-blue);
}

.lux-feed .wp-block-post-terms {
	font-family: var(--wp--preset--font-family--mono-metadata);
	font-size: var(--wp--preset--font-size--meta);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.lux-feed .wp-block-post-terms a {
	color: var(--wp--preset--color--ivory-dim);
	text-decoration: none;
}

.lux-feed .wp-block-post-terms a:hover {
	color: var(--wp--preset--color--electric-blue);
}

/* === contact === */
.lux-contact {
	border-top: 1px solid var(--wp--preset--color--line);
}

.lux-contact__closing .wp-block-buttons {
	margin-top: var(--wp--preset--spacing--20);
}

/* === patterns: hero / navigation instrument === */
.lux-hero {
	position: relative;
	overflow: hidden;
	background-color: var(--wp--preset--color--graphite);
	isolation: isolate;
}

.lux-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background:
		linear-gradient(90deg, transparent 49.9%, color-mix(in srgb, var(--wp--preset--color--line) 58%, transparent) 50%, transparent 50.1%),
		linear-gradient(0deg, transparent 49.9%, color-mix(in srgb, var(--wp--preset--color--line) 30%, transparent) 50%, transparent 50.1%);
	background-size: 18rem 18rem;
	mask-image: linear-gradient(to right, transparent, black 35%, black);
	opacity: 0.45;
}

.lux-hero__frame {
	padding-block: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
}

.lux-hero__frame > *,
.lux-hero__content > *,
.lux-orbit > *,
.lux-operations__frame > *,
.lux-operation > * {
	margin-block-start: 0;
}

.lux-hero__registry,
.lux-hero__eyebrow,
.lux-hero__baseline,
.lux-orbit,
.lux-operations__index,
.lux-operation__number,
.lux-operation__code {
	font-family: var(--wp--preset--font-family--mono-metadata);
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.lux-hero__registry {
	padding-bottom: var(--wp--preset--spacing--20);
	border-bottom: 1px solid var(--wp--preset--color--line);
	color: var(--wp--preset--color--ivory-dim);
}

.lux-hero__columns {
	gap: var(--wp--preset--spacing--40);
	padding-block: var(--wp--preset--spacing--50);
}

.lux-hero__eyebrow {
	margin-bottom: var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--electric-blue);
}

.lux-hero__eyebrow::before {
	content: "";
	display: inline-block;
	width: 1.5rem;
	height: 1px;
	margin: 0 0.75rem 0.25em 0;
	background: var(--wp--preset--color--electric-blue);
}

.lux-hero__title {
	position: relative;
	z-index: 3;
	max-width: 12ch;
	margin-bottom: calc(var(--wp--preset--spacing--30) + 20px);
	font-size: clamp(3.35rem, 16vw, 6.4rem);
	font-weight: 400;
	line-height: 0.92;
	letter-spacing: -0.02em;
	font-kerning: normal;
	text-rendering: optimizeLegibility;
	overflow-wrap: normal;
	word-break: normal;
	text-wrap: balance;
}

.lux-hero__lead {
	max-width: 28ch;
	margin-bottom: var(--wp--preset--spacing--30);
	font-family: var(--wp--preset--font-family--serif-monumental);
	line-height: 1.35;
}

.lux-hero__description {
	max-width: 58ch;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.75;
}

.lux-hero__actions {
	gap: 0.75rem;
	margin-top: var(--wp--preset--spacing--30);
}

.lux-hero__actions .wp-element-button {
	padding: 0.9rem 1.15rem;
	border: 1px solid var(--wp--preset--color--electric-blue);
	font-family: var(--wp--preset--font-family--mono-metadata);
	font-size: var(--wp--preset--font-size--meta);
	text-transform: uppercase;
	letter-spacing: 0.07em;
}

.lux-button-secondary .wp-element-button {
	color: var(--wp--preset--color--ivory);
	background: transparent;
	border-color: var(--wp--preset--color--line);
}

.lux-button-secondary .wp-element-button:hover {
	color: var(--wp--preset--color--ivory);
	background: var(--wp--preset--color--graphite-2);
	border-color: var(--wp--preset--color--spectral-violet);
}

.lux-hero__instrument {
	position: relative;
	padding-block: var(--wp--preset--spacing--30);
}

.lux-orbit {
	position: relative;
	z-index: 1;
	width: min(78vw, 20rem);
	aspect-ratio: 1;
	margin-inline: auto;
	transform: translateX(4%);
	opacity: 0.72;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 50%;
	background:
		radial-gradient(circle at center, var(--wp--preset--color--electric-blue) 0 2px, transparent 3px),
		linear-gradient(90deg, transparent 49.75%, var(--wp--preset--color--line) 50%, transparent 50.25%),
		linear-gradient(0deg, transparent 49.75%, var(--wp--preset--color--line) 50%, transparent 50.25%);
	box-shadow: inset 0 0 4rem color-mix(in srgb, var(--wp--preset--color--electric-blue) 7%, transparent);
}

.lux-orbit::before,
.lux-orbit::after {
	content: "";
	position: absolute;
	inset: 14%;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--spectral-violet) 42%, var(--wp--preset--color--line));
	border-radius: 50%;
}

.lux-orbit::before {
	border-left-color: var(--wp--preset--color--electric-blue);
	border-right-color: transparent;
	animation: lux-orbit-turn 32s linear infinite;
}

.lux-orbit::after {
	inset: 31%;
	border-color: var(--wp--preset--color--line);
	box-shadow: 0 0 1.5rem color-mix(in srgb, var(--wp--preset--color--electric-blue) 26%, transparent);
}

@keyframes lux-orbit-turn {
	to { transform: rotate(360deg); }
}

.lux-orbit__north,
.lux-orbit__bearing,
.lux-orbit__core {
	position: absolute;
	z-index: 1;
	font-size: 0.68rem;
	line-height: 1.5;
	color: var(--wp--preset--color--ivory-dim);
}

.lux-orbit__north {
	top: -0.65rem;
	left: 50%;
	padding-inline: 0.6rem;
	transform: translateX(-50%);
	background: var(--wp--preset--color--graphite);
}

.lux-orbit__core {
	top: 50%;
	left: 50%;
	text-align: center;
	color: var(--wp--preset--color--electric-blue);
	transform: translate(-50%, -50%);
}

.lux-orbit__bearing {
	right: 4%;
	bottom: 17%;
	text-align: right;
}

.lux-hero__baseline {
	gap: var(--wp--preset--spacing--20);
	padding-top: var(--wp--preset--spacing--20);
	border-top: 1px solid var(--wp--preset--color--line);
	color: var(--wp--preset--color--ivory-dim);
	font-size: 0.68rem;
}

/* === patterns: trois operations === */
.lux-operations {
	background: var(--wp--preset--color--graphite-2);
}

.lux-operations__frame {
	padding-block: var(--wp--preset--spacing--50);
}

.lux-operations__header {
	align-items: flex-end;
	gap: var(--wp--preset--spacing--30);
	padding-bottom: var(--wp--preset--spacing--40);
}

.lux-operations__title {
	margin: 0;
	font-size: clamp(2.4rem, 11vw, 4.75rem);
	line-height: 0.95;
}

.lux-operations__index {
	max-width: 18rem;
	margin: 0;
	color: var(--wp--preset--color--ivory-dim);
	font-size: 0.68rem;
	line-height: 1.65;
	text-align: right;
}

.lux-operation {
	position: relative;
	display: grid;
	grid-template-columns: 3rem minmax(0, 1fr);
	gap: 0.8rem var(--wp--preset--spacing--20);
	padding-block: var(--wp--preset--spacing--30);
	border-top: 1px solid var(--wp--preset--color--line);
	transition: background-color 0.3s ease, padding-inline 0.3s ease;
}

.lux-operation:last-child {
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.lux-operation:hover {
	padding-inline: 0.5rem;
	background: color-mix(in srgb, var(--wp--preset--color--electric-blue) 4%, transparent);
}

.lux-operation__number {
	grid-column: 1;
	grid-row: 1 / span 2;
	margin: 0;
	color: var(--wp--preset--color--electric-blue);
}

.lux-operation__name {
	grid-column: 2;
	margin: 0;
	font-family: var(--wp--preset--font-family--sans-interface);
	font-size: clamp(1.75rem, 9vw, 3rem);
	font-weight: 500;
	letter-spacing: -0.03em;
	overflow-wrap: normal;
	word-break: normal;
}

.lux-operation__text {
	grid-column: 2;
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.7;
}

.lux-operation__code {
	grid-column: 2;
	margin: 0;
	color: var(--wp--preset--color--spectral-violet);
	font-size: 0.68rem;
}

@media (min-width: 782px) {
	.lux-hero__frame {
		min-height: 44rem;
		padding-block: var(--wp--preset--spacing--50);
	}

	.lux-hero__columns {
		min-height: 35rem;
		gap: var(--wp--preset--spacing--50);
	}

	.lux-hero__content {
		flex-basis: 62%;
	}

	.lux-hero__instrument {
		flex-basis: 38%;
	}

	.lux-hero__title {
		font-size: clamp(5.75rem, 10vw, 9.2rem);
	}

	.lux-hero__description {
		font-size: var(--wp--preset--font-size--medium);
	}

	.lux-orbit {
		width: min(34vw, 26rem);
		transform: translateX(6%);
	}

	.lux-hero__instrument::before {
		content: "";
		position: absolute;
		z-index: 2;
		left: -8%;
		top: 18%;
		width: 52%;
		height: 52%;
		pointer-events: none;
		background: radial-gradient(
			ellipse at left center,
			var(--wp--preset--color--graphite) 0%,
			rgba(8, 10, 12, 0.96) 28%,
			rgba(8, 10, 12, 0.72) 50%,
			rgba(8, 10, 12, 0.28) 72%,
			transparent 100%
		);
	}

	.lux-operations__frame {
		padding-block: var(--wp--preset--spacing--60);
	}

	.lux-operations__header {
		padding-bottom: var(--wp--preset--spacing--50);
	}

	.lux-operation {
		grid-template-columns: 5rem minmax(21rem, 1.1fr) minmax(16rem, 1.15fr) 9rem;
		align-items: start;
		gap: var(--wp--preset--spacing--30);
		padding-block: var(--wp--preset--spacing--40);
	}

	.lux-operation__number {
		grid-column: 1;
		grid-row: 1;
	}

	.lux-operation__name {
		grid-column: 2;
		grid-row: 1;
		font-size: clamp(1.75rem, 6vw, 2.4rem);
	}

	.lux-operation__text {
		grid-column: 3;
		grid-row: 1;
		font-size: var(--wp--preset--font-size--medium);
	}

	.lux-operation__code {
		grid-column: 4;
		grid-row: 1;
		text-align: right;
	}
}

/* === responsive === */
.site-header > .is-layout-flex,
.site-footer > .is-layout-flex,
main.is-layout-constrained,
main > .is-layout-constrained {
	padding-left: var(--wp--preset--spacing--30);
	padding-right: var(--wp--preset--spacing--30);
	box-sizing: border-box;
}

.lux-hero {
	padding-left: var(--wp--preset--spacing--30);
	padding-right: var(--wp--preset--spacing--30);
	box-sizing: border-box;
}

.wp-block-post-title {
	overflow-wrap: break-word;
}

@media (max-width: 480px) {
	.lux-hero__title {
		font-size: clamp(2.5rem, 12vw, 3.75rem);
	}
}

/* === article prose === */
.single-post .wp-block-post-content p {
    text-align: left;
    text-justify: inter-word;
    hyphens: none !important;
    -webkit-hyphens: none !important;
}

/* === page institutionnelle ===
   Reuses the theme's existing language — mono registre line, serif title,
   hairline rules, a bounded reading measure, generous vertical rhythm — so an
   institutional page never reads as a raw WordPress document. No new tokens,
   no new graphic idiom. */
.lux-page__registry {
	margin: 0 0 var(--wp--preset--spacing--30);
	padding-bottom: var(--wp--preset--spacing--20);
	border-bottom: 1px solid var(--wp--preset--color--line);
	font-family: var(--wp--preset--font-family--mono-metadata);
	font-size: var(--wp--preset--font-size--meta);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ivory-dim);
}

.lux-page__title {
	max-width: 22ch;
	margin: 0 0 var(--wp--preset--spacing--30);
	font-size: clamp(2.4rem, 6vw, 3.75rem);
	line-height: 1.06;
}

.lux-page__rule {
	margin: 0 0 var(--wp--preset--spacing--40);
	border: 0;
	border-top: 1px solid var(--wp--preset--color--line);
}

.lux-page .wp-block-post-content {
	max-width: 40rem;
}

.lux-page .wp-block-post-content > * {
	max-width: 40rem;
}

.lux-page .wp-block-post-content p {
	line-height: 1.75;
}

.lux-page .wp-block-post-content h2 {
	margin-top: var(--wp--preset--spacing--50);
	font-size: var(--wp--preset--font-size--large);
}

.lux-page .wp-block-post-content h3 {
	margin-top: var(--wp--preset--spacing--40);
	font-size: var(--wp--preset--font-size--medium);
}

.lux-page .wp-block-post-content hr {
	margin-block: var(--wp--preset--spacing--40);
	border-color: var(--wp--preset--color--line);
}

.lux-page .wp-block-post-content ul,
.lux-page .wp-block-post-content ol {
	padding-left: 1.15rem;
}

.lux-page .wp-block-post-content li {
	margin-bottom: var(--wp--preset--spacing--10);
	line-height: 1.7;
}

.lux-page .wp-block-post-content li::marker {
	color: var(--wp--preset--color--ivory-dim);
}
