/* ==========================================================================
   Gerardo Millán — base
   Fuentes, tokens, fondo fijo, tipografía, layout, botones, cabecera, pie,
   encabezados de sección y utilidades. Se carga en todas las páginas.
   ========================================================================== */

/* Fuentes (OFL: ver assets/fonts/LICENSE-*.txt) ---------------------------- */

@font-face {
	font-family: "GM Inter";
	font-style: normal;
	font-display: swap;
	font-weight: 100 900;
	src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "GM Inter";
	font-style: normal;
	font-display: swap;
	font-weight: 100 900;
	src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "GM Lora";
	font-style: normal;
	font-display: swap;
	font-weight: 400 700;
	src: url("../fonts/lora-latin-ext-wght-normal.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "GM Lora";
	font-style: normal;
	font-display: swap;
	font-weight: 400 700;
	src: url("../fonts/lora-latin-wght-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "GM Lora";
	font-style: italic;
	font-display: swap;
	font-weight: 400 700;
	src: url("../fonts/lora-latin-ext-wght-italic.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "GM Lora";
	font-style: italic;
	font-display: swap;
	font-weight: 400 700;
	src: url("../fonts/lora-latin-wght-italic.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Tokens ------------------------------------------------------------------ */

:root {
	color-scheme: dark;

	/* Texto */
	--gm-ink: #fff;
	--gm-ink-soft: rgba(255, 255, 255, 0.85);
	--gm-ink-muted: rgba(255, 255, 255, 0.68);
	--gm-ink-faint: rgba(255, 255, 255, 0.45);

	/* Noche y destellos (los del fondo original) */
	--gm-night: #0b0f26;
	--gm-night-deep: #0a0b1a;
	--gm-violet: #5b21b6;
	--gm-violet-2: #7b2cbf;
	--gm-blue: #1d4ed8;
	--gm-cyan: #0094c6;
	--gm-cyan-2: #00b4d8;
	--gm-wine: #831843;
	--gm-pink: #e26ee2;
	--gm-pink-soft: #f794f7;
	--gm-gradient: linear-gradient(135deg, var(--gm-violet-2) 0%, var(--gm-pink) 100%);
	--gm-glow-pink: 0 0 32px rgba(226, 110, 226, 0.35);

	/* Vidrio */
	--gm-glass-bg: linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
	--gm-glass-solid: rgba(14, 16, 46, 0.45);
	--gm-glass-border: rgba(255, 255, 255, 0.14);
	--gm-glass-blur: 14px;
	--gm-glass-shadow: 0 12px 40px rgba(5, 6, 22, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);

	/* Formas y movimiento */
	--gm-radius-sm: 12px;
	--gm-radius-md: 18px;
	--gm-radius-lg: 28px;
	--gm-ease: cubic-bezier(0.22, 0.61, 0.36, 1);

	/* Tipografía */
	/* Nombres propios ("GM …") para no chocar con la "Inter" que registra WooCommerce. */
	--gm-font-display: "GM Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--gm-font-serif: "GM Lora", Georgia, "Times New Roman", serif;

	/* Layout */
	--gm-gutter: clamp(16px, 4vw, 40px);
	--gm-max: 1140px;
	--gm-max-wide: 1320px;
	--gm-max-narrow: 920px;

	/* Fondo (el valor real lo pone el Personalizador) */
	--gm-bg-blur: 8px;
}

/* Base -------------------------------------------------------------------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

body {
	margin: 0;
	min-height: 100vh;
	background-color: var(--gm-night);
	color: var(--gm-ink);
	font-family: var(--gm-font-serif);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: clip;
}

img,
svg,
video,
iframe {
	max-width: 100%;
}

img {
	height: auto;
}

a {
	color: var(--gm-pink-soft);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
	transition: color 0.2s ease;
}

a:hover {
	color: #fff;
}

h1,
h2,
h3,
h4 {
	color: #fff;
	line-height: 1.2;
}

:focus-visible {
	outline: 2px solid var(--gm-pink-soft);
	outline-offset: 3px;
}

::selection {
	background: rgba(226, 110, 226, 0.45);
	color: #fff;
}

.gm-main:focus {
	outline: none;
}

.gm-icon {
	display: inline-block;
	flex: none;
	width: auto;
	height: 1em;
	vertical-align: -0.125em;
}

/* Fondo fijo (antes .fondo-maestro-nubes) ---------------------------------- */

.gm-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	z-index: -1;
	width: 100%;
	height: 100vh;
	height: 100lvh;
	overflow: hidden;
	background-color: var(--gm-night);
	pointer-events: none;
}

/* Doble clase: así gana a ".woocommerce-page img { max-width:100%; height:auto }". */
.gm-backdrop .gm-backdrop__img {
	position: absolute;
	top: calc(var(--gm-bg-blur) * -2.5);
	left: calc(var(--gm-bg-blur) * -2.5);
	width: calc(100% + var(--gm-bg-blur) * 5);
	max-width: none;
	height: calc(100% + var(--gm-bg-blur) * 5);
	object-fit: cover;
	object-position: center;
	filter: blur(var(--gm-bg-blur)) saturate(1.1);
}

.gm-backdrop__tint {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 80% 20%, rgba(91, 33, 182, 0.25) 0%, transparent 65%),
		radial-gradient(circle at 15% 40%, rgba(29, 78, 216, 0.2) 0%, transparent 70%),
		radial-gradient(circle at 85% 80%, rgba(0, 148, 198, 0.25) 0%, transparent 60%),
		radial-gradient(circle at 25% 85%, rgba(131, 24, 67, 0.15) 0%, transparent 55%),
		rgba(10, 11, 26, 0.15);
}

/* Las páginas interiores oscurecen un poco más el fondo para leer cómodo. */
.gm-is-inner .gm-backdrop__tint {
	background:
		radial-gradient(circle at 80% 20%, rgba(91, 33, 182, 0.3) 0%, transparent 65%),
		radial-gradient(circle at 15% 40%, rgba(29, 78, 216, 0.22) 0%, transparent 70%),
		radial-gradient(circle at 85% 80%, rgba(0, 148, 198, 0.25) 0%, transparent 60%),
		radial-gradient(circle at 25% 85%, rgba(131, 24, 67, 0.18) 0%, transparent 55%),
		rgba(10, 11, 26, 0.35);
}

/* Layout ------------------------------------------------------------------ */

.gm-container {
	width: min(100% - 2 * var(--gm-gutter), var(--gm-max));
	margin-inline: auto;
}

.gm-container--wide {
	width: min(100% - 2 * var(--gm-gutter), var(--gm-max-wide));
}

.gm-container--narrow {
	width: min(100% - 2 * var(--gm-gutter), var(--gm-max-narrow));
}

.gm-section {
	position: relative;
	padding-block: clamp(64px, 9vw, 112px);
}

.gm-stack > * + * {
	margin-top: 24px;
}

.gm-center {
	text-align: center;
}

.gm-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
}

/* Vidrio ------------------------------------------------------------------ */

.gm-glass {
	background: var(--gm-glass-bg);
	border: 1px solid var(--gm-glass-border);
	border-radius: var(--gm-radius-lg);
	box-shadow: var(--gm-glass-shadow);
	-webkit-backdrop-filter: blur(var(--gm-glass-blur)) saturate(1.25);
	backdrop-filter: blur(var(--gm-glass-blur)) saturate(1.25);
}

/* Botones ----------------------------------------------------------------- */

.gm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.55em;
	min-height: 46px;
	padding: 12px 22px;
	border: 1px solid transparent;
	border-radius: 999px;
	font: 600 0.95rem/1.1 var(--gm-font-display);
	letter-spacing: 0.01em;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.25s var(--gm-ease), box-shadow 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.gm-btn--primary {
	background: var(--gm-gradient);
	color: #fff;
	box-shadow: 0 10px 28px rgba(123, 44, 191, 0.35);
}

.gm-btn--primary:hover,
.gm-btn--primary:focus-visible {
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 14px 34px rgba(226, 110, 226, 0.45);
}

.gm-btn--ghost {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.24);
	color: #fff;
}

.gm-btn--ghost:hover,
.gm-btn--ghost:focus-visible {
	background: rgba(255, 255, 255, 0.16);
	border-color: rgba(255, 255, 255, 0.4);
	color: #fff;
}

.gm-btn .gm-icon--arrow-right {
	transition: transform 0.25s var(--gm-ease);
}

.gm-btn:hover .gm-icon--arrow-right {
	transform: translateX(3px);
}

/* Divisor ❖ (del widget "You are safe here.") ------------------------------ */

.gm-divider {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

.gm-divider__line {
	position: relative;
	flex: 1;
	height: 4px;
}

.gm-divider__line--left {
	background: linear-gradient(to left, var(--gm-pink) 20%, rgba(226, 110, 226, 0));
	clip-path: polygon(0 50%, 100% 0, 100% 100%);
	filter: drop-shadow(-2px 0 2px rgba(226, 110, 226, 0.5));
}

.gm-divider__line--right {
	background: linear-gradient(to right, var(--gm-pink) 20%, rgba(226, 110, 226, 0));
	clip-path: polygon(0 0, 100% 50%, 0 100%);
	filter: drop-shadow(2px 0 2px rgba(226, 110, 226, 0.5));
}

.gm-divider__gem {
	margin: 0 12px;
	color: var(--gm-pink-soft);
	font-size: 12px;
	line-height: 1;
	text-shadow: 0 0 6px rgba(247, 148, 247, 0.8), 0 0 12px rgba(226, 110, 226, 0.4);
}

/* Encabezado de sección ---------------------------------------------------- */

.gm-heading {
	max-width: 780px;
	margin: 0 auto clamp(32px, 5vw, 56px);
	text-align: center;
}

.gm-heading__eyebrow {
	margin: 0 0 14px;
	color: var(--gm-pink-soft);
	font: 600 0.78rem/1 var(--gm-font-display);
	letter-spacing: 0.24em;
	text-transform: uppercase;
	text-shadow: 0 0 14px rgba(247, 148, 247, 0.35);
}

.gm-heading__title {
	margin: 0 0 20px;
	font: italic 400 clamp(1.85rem, 1.15rem + 2.4vw, 3rem) / 1.15 var(--gm-font-serif);
	letter-spacing: 0.005em;
	text-wrap: balance;
}

.gm-heading .gm-divider {
	max-width: 300px;
	margin-inline: auto;
}

.gm-heading__text {
	margin-top: 20px;
	color: var(--gm-ink-soft);
	font-size: 1.05rem;
}

.gm-heading__text p {
	margin: 0 0 0.8em;
}

.gm-heading__text p:last-child {
	margin-bottom: 0;
}

/* Texto largo -------------------------------------------------------------- */

.gm-prose {
	color: var(--gm-ink-soft);
	font-size: 1.05rem;
	line-height: 1.75;
}

.gm-prose > :first-child {
	margin-top: 0;
}

.gm-prose > :last-child {
	margin-bottom: 0;
}

.gm-prose h2,
.gm-prose h3,
.gm-prose h4 {
	margin: 1.6em 0 0.6em;
	font-family: var(--gm-font-display);
	font-weight: 600;
	letter-spacing: -0.01em;
}

.gm-prose ul,
.gm-prose ol {
	padding-left: 1.3em;
}

.gm-prose strong {
	color: #fff;
}

/* Cabecera (páginas interiores) -------------------------------------------- */

.gm-header {
	position: sticky;
	top: 0;
	z-index: 50;
	padding: 14px var(--gm-gutter) 0;
}

.admin-bar .gm-header {
	top: 32px;
}

.gm-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	max-width: var(--gm-max-wide);
	margin: 0 auto;
	padding: 8px 10px 8px 24px;
	border: 1px solid var(--gm-glass-border);
	border-radius: 999px;
	background: rgba(12, 14, 40, 0.42);
	box-shadow: var(--gm-glass-shadow);
	-webkit-backdrop-filter: blur(16px) saturate(1.3);
	backdrop-filter: blur(16px) saturate(1.3);
}

.gm-header__brand {
	color: #fff;
	font: 600 1.3rem/1 var(--gm-font-display);
	letter-spacing: -0.02em;
	text-decoration: none;
	white-space: nowrap;
	transform: scaleX(0.94);
	transform-origin: left center;
}

.gm-header__brand:hover {
	color: #fff;
	text-shadow: var(--gm-glow-pink);
}

.gm-header__nav {
	display: flex;
	align-items: center;
	gap: 4px;
}

.gm-header__link {
	padding: 10px 16px;
	border-radius: 999px;
	color: var(--gm-ink-soft);
	font: 500 0.92rem/1 var(--gm-font-display);
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.gm-header__link:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.gm-header__icon {
	position: relative;
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	color: #fff;
	font-size: 17px;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.gm-header__icon:hover {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

.gm-cart-count {
	position: absolute;
	top: 3px;
	right: 1px;
	min-width: 19px;
	height: 19px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--gm-gradient);
	box-shadow: 0 0 0 2px rgba(11, 15, 38, 0.9);
	color: #fff;
	font: 700 11px/19px var(--gm-font-display);
	text-align: center;
}

.gm-cart-count.is-empty {
	display: none;
}

/* Píldora del carrito en la portada (solo si hay samples en el carrito) */
.gm-cart-pill {
	position: fixed;
	top: 16px;
	right: 16px;
	z-index: 60;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px 10px 16px;
	border: 1px solid var(--gm-glass-border);
	border-radius: 999px;
	background: rgba(12, 14, 40, 0.5);
	box-shadow: var(--gm-glass-shadow);
	color: #fff;
	font: 600 0.9rem/1 var(--gm-font-display);
	text-decoration: none;
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
}

.gm-cart-pill:hover {
	color: #fff;
	border-color: rgba(247, 148, 247, 0.5);
}

.gm-cart-pill .gm-cart-count {
	position: static;
	box-shadow: none;
}

.gm-cart-pill:has(.gm-cart-count.is-empty) {
	display: none;
}

.admin-bar .gm-cart-pill {
	top: 48px;
}

/* Íconos de streaming ------------------------------------------------------ */

.gm-streaming {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 20px;
	margin: 0;
	padding: 0;
	line-height: 1;
	list-style: none;
}

.gm-streaming__item {
	display: flex;
}

.gm-streaming__link {
	display: inline-flex;
	color: #fff;
	line-height: 1;
	transition: transform 0.35s var(--gm-ease), filter 0.35s ease;
}

.gm-streaming__link .gm-icon {
	display: block;
	height: 1em;
}

.gm-streaming__link:hover,
.gm-streaming__link:focus-visible {
	color: #fff;
	transform: translateY(-3px) scale(1.04);
	filter: drop-shadow(0 0 14px rgba(247, 148, 247, 0.55)) drop-shadow(0 0 28px rgba(0, 180, 216, 0.35));
}

/* Pie ---------------------------------------------------------------------- */

.gm-footer {
	padding: clamp(40px, 7vw, 72px) 0 calc(32px + env(safe-area-inset-bottom));
	color: var(--gm-ink-muted);
	text-align: center;
}

.gm-footer::before {
	content: "";
	display: block;
	width: min(560px, 80%);
	height: 1px;
	margin: 0 auto clamp(36px, 6vw, 52px);
	background: linear-gradient(90deg, transparent, rgba(247, 148, 247, 0.5), transparent);
}

.gm-footer__inner {
	display: grid;
	justify-items: center;
	gap: 22px;
}

.gm-streaming--footer {
	gap: 22px;
	font-size: 30px;
}

.gm-footer__nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 22px;
	font: 500 0.9rem/1.4 var(--gm-font-display);
}

.gm-footer__nav a {
	color: var(--gm-ink-soft);
	text-decoration: none;
}

.gm-footer__nav a:hover {
	color: #fff;
	text-decoration: underline;
}

.gm-footer__text {
	margin: 0;
	font-size: 0.9rem;
	letter-spacing: 0.04em;
}

/* Páginas de contenido ----------------------------------------------------- */

.gm-page {
	padding: clamp(40px, 7vw, 80px) 0 0;
}

.gm-page__header {
	margin-bottom: clamp(24px, 4vw, 40px);
	text-align: center;
}

.gm-page__title {
	margin: 0 0 18px;
	font: italic 400 clamp(2rem, 1.35rem + 2.6vw, 3.2rem) / 1.1 var(--gm-font-serif);
	text-wrap: balance;
}

.gm-page__header .gm-divider {
	max-width: 260px;
	margin-inline: auto;
}

.gm-page__content.gm-glass {
	padding: clamp(24px, 4vw, 48px);
}

.gm-backlink {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 20px;
	color: var(--gm-ink-soft);
	font: 500 0.92rem/1 var(--gm-font-display);
	text-decoration: none;
}

.gm-backlink:hover {
	color: #fff;
}

.gm-backlink .gm-icon {
	transition: transform 0.25s var(--gm-ease);
}

.gm-backlink:hover .gm-icon {
	transform: translateX(-3px);
}

/* Utilidades de WordPress -------------------------------------------------- */

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	border: 0;
	clip-path: inset(50%);
	white-space: nowrap;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	top: 8px;
	left: 8px;
	z-index: 100000;
	display: block;
	width: auto;
	height: auto;
	padding: 12px 20px;
	border-radius: 8px;
	background: #fff;
	clip-path: none;
	color: var(--gm-night);
	font: 600 1rem/1.2 var(--gm-font-display);
	text-decoration: none;
}

.alignleft {
	float: left;
	margin: 0 1.5em 1em 0;
}

.alignright {
	float: right;
	margin: 0 0 1em 1.5em;
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

@media (max-width: 782px) {
	.admin-bar .gm-header {
		top: 46px;
	}

	.admin-bar .gm-cart-pill {
		top: 62px;
	}
}

@media (max-width: 600px) {
	.admin-bar .gm-header {
		top: 0;
	}

	.gm-header {
		padding-top: 10px;
	}

	.gm-header__inner {
		padding-left: 18px;
	}

	.gm-header__brand {
		font-size: 1.1rem;
	}

	.gm-header__link {
		padding: 10px 10px;
	}

	.gm-streaming--footer {
		font-size: 26px;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
