/*
Theme Name:   MegaMasterok
Theme URI:    https://megamasterok.ru/
Description:  MegaMasterok child theme for GeneratePress. GeneratePress provides the infrastructure; this theme owns the visual identity.
Author:       MegaMasterok
Template:     generatepress
Version:      0.1.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:  megam
*/

/*
 * Global design foundation.
 *
 * GeneratePress loads this file automatically (handle `generate-child`),
 * after its own stylesheet. Component styles live in assets/css/.
 */

:root {
	/* Layout */
	--megam-content: 1340px;
	--megam-gutter: clamp(16px, 3.4vw, 48px);

	/* Type */
	--megam-font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
	--megam-fs-xs: 0.8125rem;   /* 13 */
	--megam-fs-sm: 0.875rem;    /* 14 */
	--megam-fs-base: 1rem;      /* 16 */
	--megam-fs-md: 1.0625rem;   /* 17 */
	--megam-fs-lead: clamp(1.0625rem, 0.96rem + 0.42vw, 1.3125rem);
	--megam-fs-hero: clamp(2.125rem, 1.1rem + 2.75vw, 3.3rem);
	--megam-lh-tight: 1.08;
	--megam-lh-body: 1.55;

	/* Colour */
	--megam-ink: #141a26;          /* headlines */
	--megam-text: #283040;         /* body text */
	--megam-muted: #586173;        /* supporting text */
	--megam-subtle: #8a92a1;       /* placeholders, meta */
	--megam-accent: #f0651a;       /* MegaMasterok orange */
	--megam-accent-strong: #d4520b;
	--megam-accent-soft: #fdeadd;
	--megam-blue: #2a64c5;
	--megam-blue-soft: #e4edfb;
	--megam-amber: #e2931a;
	--megam-amber-soft: #fdf0d6;
	--megam-coral: #e5552c;
	--megam-coral-soft: #fde4dc;
	--megam-bg: #ffffff;
	--megam-surface: #ffffff;
	--megam-surface-alt: #f3f5f8;
	--megam-line: #e3e7ed;
	--megam-line-strong: #d0d6df;
	--megam-positive: #2f8f4e;     /* verified "plus" markers only */
	--megam-caution: #d33b2c;      /* verified "minus" markers only */

	/* Shape */
	--megam-radius-sm: 6px;
	--megam-radius: 10px;
	--megam-radius-lg: 14px;
	--megam-shadow-1: 0 1px 2px rgba(20, 26, 38, 0.05), 0 4px 16px rgba(20, 26, 38, 0.07);
	--megam-shadow-2: 0 1px 3px rgba(20, 26, 38, 0.06), 0 12px 32px rgba(20, 26, 38, 0.11);
	--megam-shadow-accent: 0 4px 12px rgba(240, 101, 26, 0.28);

	/* Spacing */
	--megam-space-1: 4px;
	--megam-space-2: 8px;
	--megam-space-3: 12px;
	--megam-space-4: 16px;
	--megam-space-5: 24px;
	--megam-space-6: 32px;
	--megam-space-7: 48px;
	--megam-space-8: 64px;

	--megam-focus: 0 0 0 3px rgba(42, 100, 197, 0.35);

	/* Visual asset placeholders (inc/visual-assets.php) */
	--megam-placeholder: #e4e8ee;
	--megam-placeholder-line: #d3d9e1;
}

body {
	background-color: var(--megam-bg);
	color: var(--megam-text);
	font-family: var(--megam-font);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

.megam-container {
	box-sizing: border-box;
	width: 100%;
	max-width: calc(var(--megam-content) + 2 * var(--megam-gutter));
	margin-inline: auto;
	padding-inline: var(--megam-gutter);
}

.megam-icon {
	display: block;
	flex: none;
}

/*
 * Visual asset slots (inc/visual-assets.php, ASSET_PIPELINE.md).
 *
 * A slot renders either the installed <picture> or a neutral placeholder with
 * the same geometry. Placeholders must never imitate the final artwork.
 */

.megam-visual {
	display: block;
	box-sizing: border-box;
}

.megam-visual__img {
	display: block;
	max-width: 100%;
	height: auto;
}

.megam-visual--placeholder {
	position: relative;
	aspect-ratio: var(--megam-visual-ratio, auto);
	background-color: var(--megam-placeholder);
	box-shadow: inset 0 0 0 1px var(--megam-placeholder-line);
}

/* Fill the parent box (the parent owns the geometry). */
.megam-visual--fill,
.megam-visual--fill .megam-visual__img {
	width: 100%;
	height: 100%;
}

.megam-visual--fill .megam-visual__img {
	max-width: none;
	object-fit: cover;
}

.megam-visual--fill.megam-visual--placeholder {
	aspect-ratio: auto;
}

/* Development label (local/development environments only). */
.megam-visual__label {
	position: absolute;
	right: 12px;
	bottom: 12px;
	padding: 3px 8px;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.85);
	color: var(--megam-muted);
	font-size: 11px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.02em;
	white-space: nowrap;
	/* Small slots: truncate instead of clipping mid-word (the full ID is in data-asset-id / title). */
	box-sizing: border-box;
	max-width: calc(100% - 24px);
	overflow: hidden;
	text-overflow: ellipsis;
	pointer-events: none;
}
