/*
Theme Name: Third Attractor — Resonance
Theme URI: https://3da.manifest-nirvana.com/
Author: Vincent Drouot
Description: Child theme of Ollie carrying the Third Attractor "Resonance" design system: the palette, type scale and spacing live in theme.json, the components live in the "Third Attractor — Resonance blocks" plugin. Ollie's semantic slugs (base, main, primary…) are remapped to the brand, so every Ollie pattern adopts it too.
Template: ollie
Version: 1.17.16
Requires at least: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: third-attractor
*/

/* Design tokens live in theme.json.
   Component styles live in the plugin (assets/blocks.css).
   Put site-specific overrides below this line. */

/* Boxed chrome.
   The top bar and the header keep a full-bleed band — the sticky blur has to
   reach the viewport edges — but their CONTENT lines up with the hero and every
   section below, i.e. the theme's own wide size. Padding does the centring, so
   nothing moves when the band gains or loses its background. */
.ta-topbar,
.ta-header {
	padding-inline: max(
		var(--wp--preset--spacing--medium),
		calc((100% - var(--wp--style--global--wide-size, 1260px)) / 2)
	) !important;
}

/* Un ancêtre filtré devient le bloc conteneur de ses descendants `fixed` : tant
   que l'en-tête portait son flou, le menu déroulant se retrouvait enfermé dans
   la bande de l'en-tête — 101 px de haut au lieu du plein écran, une seule
   entrée visible sur six. WordPress marque <html> pendant l'ouverture, ce qui
   permet de suspendre le flou juste le temps du menu. */
html.has-modal-open .ta-header {
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}

/* The chrome is one continuous band: no air between the top bar, the header and
   a full-bleed hero. Core's layout puts a block-gap margin between every
   top-level child, so these three have to opt out explicitly. */
.ta-topbar,
.ta-header {
	margin-block: 0 !important;
}
/* A full-bleed opening sits flush under the header, whatever wraps it: the front
   page and the interior templates put it inside their own <main>, a Page puts it
   inside post-content. Anything else keeps its breathing room. */
.wp-site-blocks > main:has(> .alignfull:first-child),
.wp-site-blocks > .wp-block-post-content:has(> .alignfull:first-child),
.wp-site-blocks > main > .wp-block-post-content:has(> .alignfull:first-child) {
	margin-block-start: 0 !important;
}

/* The header hairline and its sticky behaviour — not expressible as block supports. */
.ta-header {
	position: sticky;
	top: 0;
	z-index: 30;
	border-bottom: 1px solid var(--wp--preset--color--border-light);
	backdrop-filter: blur(var(--wp--custom--chrome--blur, 16px));
	-webkit-backdrop-filter: blur(var(--wp--custom--chrome--blur, 16px));
	/* Mixed from the palette's panel colour instead of written out, so the bar
	   follows `void-2` wherever it is changed — theme.json or the Styles panel. */
	background-color: color-mix(
		in srgb,
		var(--wp--preset--color--void-2, #0B1F33) calc(var(--wp--custom--chrome--opacity, 0.72) * 100%),
		transparent
	) !important;
}
.ta-header .wp-block-navigation a:hover { color: var(--wp--preset--color--aqua); }
.ta-header .wp-block-site-title a { text-decoration: none; color: var(--wp--preset--color--cream); }

/* Footer hairline. */
.ta-footer { border-top: 1px solid var(--wp--preset--color--border-light); }
.ta-footer .wp-block-list { list-style: none; padding-left: 0; }
.ta-footer .wp-block-list li { margin-block: var(--wp--preset--spacing--small, 8px); }
