/*
Theme Name: Bokul Child
Theme URI: https://addspice.net
Description: Child theme for Bokul. All of AddSpice's visual customisation lives
             here, so the parent theme (a wordpress.org theme) can update freely.
Author: Brian / F.R.I.D.A.Y.
Template: bokul
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bokul-child
*/

/* =====================================================================
   KNOBS — edit these. Save; the page picks it up on reload (the file's
   modified time is the cache-buster, so no version bump is needed).
   ---------------------------------------------------------------------
   --asp-paper          page background colour        (#f9f3ea warm paper)
   --asp-vignette       corner darkening, body        0 = flat, 0.2 = heavy
   --asp-vignette-menu  corner darkening, menu overlay
   --asp-tile           grain tile size in px         smaller = finer grain
   --asp-menu-size      mobile menu text size         1.15rem = 18.4px
   --asp-menu-colour    mobile menu text colour       links use theme primary
   Grain STRENGTH is the one value not exposed here: it lives inside the SVG
   data URI below as opacity='0.38'. 0.15 is a whisper, 0.6 is heavy film.
   ===================================================================== */
:root {
	--asp-paper: #f9f3ea;
	--asp-vignette: 0.07;
	--asp-vignette-menu: 0.08;
	--asp-tile: 200px;
	--asp-menu-size: 1.15rem;
	--asp-menu-weight: 700;
	--asp-menu-colour: var(--wp--preset--color--primary);

	/* feTurbulence noise, generated by the browser — no image file involved.
	   stitchTiles keeps the tile edges from showing as a seam. */
	--asp-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23grain)' opacity='0.38'/%3E%3C/svg%3E");
}

/* ---- Global: warm film-grain paper -----------------------------------
   Body is the only element painting a background, so this rule covers
   every template. The vignette stays fixed to the viewport; the noise
   tile scrolls with the content. */
body {
	background-color: var(--asp-paper) !important;
	background-image:
		radial-gradient(ellipse at center, rgba(255, 255, 255, 0) 50%, rgba(92, 64, 44, var(--asp-vignette)) 100%),
		var(--asp-grain);
	background-repeat: no-repeat, repeat;
	background-blend-mode: normal, multiply;
	background-size: 100% 100%, var(--asp-tile) var(--asp-tile);
	background-attachment: fixed, scroll;
}

/* ---- Navigation overlay ----------------------------------------------
   Core turns the block's "justify right" into align-items: flex-end on the
   overlay, so the list shrink-wraps to its widest item and clips. Span it
   and centre it. Scoped to .is-menu-open: the desktop header is untouched. */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	width: 100% !important;
	align-items: center !important;
}

/* Core pins the close button at top:0 / right:0 with no padding. */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
	top: 12px !important;
	right: 12px !important;
	padding: 8px !important;
}

/* Every state pinned to one colour, or a tap flashes the near-black body colour. */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:focus,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:focus-visible,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:active {
	color: var(--asp-menu-colour) !important;
	font-size: var(--asp-menu-size) !important;
	font-weight: var(--asp-menu-weight) !important;
}

/* The overlay carries its own copy of the paper so it reads as one surface. */
.wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--asp-paper) !important;
	background-image:
		radial-gradient(ellipse at center, rgba(255, 255, 255, 0) 45%, rgba(92, 64, 44, var(--asp-vignette-menu)) 100%),
		var(--asp-grain);
	background-repeat: no-repeat, repeat;
	background-blend-mode: normal, multiply;
	background-size: 100% 100%, var(--asp-tile) var(--asp-tile);
}
