/*
Theme Name: PokeBroski
Theme URI: https://pokebroski.it
Author: PokeBroski
Description: Tema custom standalone per il sito vetrina di PokeBroski, community dedicata al mondo Pokémon e al collezionismo di carte. Mobile-first, accessibile e performante.
Version: 1.13.0
Requires at least: 6.3
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: pokebroski
*/

/* =========================================================
   1. VARIABILI GLOBALI (palette, tipografia, spaziature)
   ========================================================= */
:root {
	/* Colori brand */
	--color-primary: #e30613;
	--color-secondary: #e63122;
	--color-peach: #f7b298;
	--color-dark: #220000;
	--color-white: #ffffff;
	--color-gray: #f4f2f1;

	/* Gradienti */
	--gradient-energy: linear-gradient(135deg, #e30613, #e63122);
	--gradient-depth: linear-gradient(135deg, #e30613, #220000);

	/* Messaggi di esito dei form (due serie: su fondo chiaro e su fondo scuro) */
	--color-success: #17663d;
	--color-warning: #8a5a00;
	--color-error: #b3000f;
	--color-success-light: #7ddba4;
	--color-warning-light: #f7b298;
	--color-error-light: #ff9a92;

	/* GameBroski — richiamo alle console portatili anni '90. E' un'evocazione:
	   nessun marchio, font o asset ufficiale, solo l'atmosfera dello schermo a
	   cristalli liquidi e della cartuccia. */
	--gb-shell: #1a1414;       /* scocca scura, parente del nero caldo del brand */
	--gb-screen: #cfe0a3;      /* verde da schermo LCD */
	--gb-screen-ink: #1b3a1f;  /* testo sullo schermo (8,9:1 sul verde) */
	--gb-pixel: 8px;           /* passo della griglia a pixel */

	/* Fondo del riquadro di gioco: rispecchia i due temi dei minigiochi
	   (--pbg-panel del plugin PokeBroski Games), che dichiarano lo sfondo
	   trasparente e cambiano solo il colore del testo. */
	--gb-panel: #f4f3ef;
	--gb-panel-dark: #26262a;

	/* Tipografia */
	--font-heading: "Sora", sans-serif;
	--font-body: "Inter", sans-serif;

	/* Spaziature (scala fluida) */
	--space-2xs: 0.5rem;
	--space-xs: 0.75rem;
	--space-sm: 1rem;
	--space-md: 1.5rem;
	--space-lg: 2.5rem;
	--space-xl: 4rem;
	--space-2xl: 6rem;

	/* Layout */
	--container-width: 1200px;
	--container-padding: 1.25rem;
	--radius-sm: 8px;
	--radius-md: 16px;
	--radius-lg: 24px;
	--shadow-soft: 0 10px 30px rgba(34, 0, 0, 0.08);
	--shadow-hover: 0 16px 40px rgba(34, 0, 0, 0.14);
	--transition-base: 0.25s ease;

	/* Header */
	--header-height: 76px;
}

/* =========================================================
   2. RESET DI BASE
   ========================================================= */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
	margin: 0;
}

ul[class],
ol[class] {
	margin: 0;
	padding: 0;
	list-style: none;
}

img,
picture,
svg {
	max-width: 100%;
	display: block;
}

img {
	height: auto;
}

a {
	color: var(--color-primary);
	text-decoration: none;
}

button {
	font-family: inherit;
	cursor: pointer;
}

input,
textarea,
select,
button {
	font: inherit;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* =========================================================
   3. TIPOGRAFIA DI BASE
   ========================================================= */
body {
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.65;
	color: var(--color-dark);
	background-color: var(--color-white);
	font-weight: 400;
}

h1,
h2,
h3,
h4 {
	font-family: var(--font-heading);
	font-weight: 800;
	line-height: 1.2;
	color: var(--color-dark);
}

h1 {
	font-size: clamp(2.25rem, 5vw, 3.5rem);
}

h2 {
	font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
	font-size: clamp(1.25rem, 3vw, 1.5rem);
	font-weight: 700;
}

h4 {
	font-size: 1.125rem;
	font-weight: 700;
}

p {
	max-width: 70ch;
}

a {
	transition: color var(--transition-base);
}

a:hover,
a:focus {
	color: var(--color-secondary);
}

/* =========================================================
   4. ACCESSIBILITA'
   ========================================================= */
:focus-visible {
	outline: 3px solid var(--color-secondary);
	outline-offset: 2px;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--color-dark);
	color: var(--color-white);
	padding: var(--space-xs) var(--space-sm);
	z-index: 10000;
	border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
	left: 0;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	word-wrap: normal !important;
}

/* =========================================================
   5. LAYOUT DI BASE / UTILITY
   ========================================================= */
.container {
	width: 100%;
	max-width: var(--container-width);
	margin-inline: auto;
	padding-inline: var(--container-padding);
}

.section {
	padding-block: var(--space-2xl);
	scroll-margin-top: var(--header-height);
}

.section--gray {
	background-color: var(--color-gray);
}

.section--dark {
	background: var(--gradient-depth);
	color: var(--color-white);
}

.section--dark h2,
.section--dark h3,
.section--dark p {
	color: var(--color-white);
}

.section-heading {
	text-align: center;
	max-width: 760px;
	margin-inline: auto;
	margin-bottom: var(--space-lg);
}

.section-heading h2 {
	margin-bottom: var(--space-xs);
}

.section-heading p {
	margin-inline: auto;
	color: #5a4a4a;
}

.section--dark .section-heading p {
	color: var(--color-peach);
}

/* Sotto-titolo all'interno di una sezione (es. "Le nostre rubriche" prima di una grid) */
.subsection-heading {
	text-align: center;
	margin-bottom: var(--space-md);
}

.subsection-heading small {
	display: block;
	margin-top: 0.2rem;
	font-size: 0.8rem;
	font-weight: 500;
	color: #5a4a4a;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.eyebrow {
	display: inline-block;
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 0.85rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-secondary);
	margin-bottom: var(--space-2xs);
}

.section--dark .eyebrow {
	color: var(--color-peach);
}

.text-center {
	text-align: center;
}

/* Paragrafi usati come wrapper di CTA: rimuove il limite 70ch perché
   text-align:center deve agire sull'intera larghezza del container */
p.text-center,
.countdown-cta {
	max-width: none;
}

.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* =========================================================
   6. CONTENUTO PAGINA (entry-content, pagine legali)
   ========================================================= */
.entry-content {
	max-width: 760px;
	margin-inline: auto;
}

.entry-content > * + * {
	margin-top: var(--space-sm);
}

.entry-content h2,
.entry-content h3 {
	margin-top: var(--space-lg);
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.25em;
}

.entry-content ul {
	list-style: disc;
}

.entry-content ol {
	list-style: decimal;
}

.entry-content li + li {
	margin-top: var(--space-2xs);
}

/* =========================================================
   7. ANIMAZIONI (fade-in allo scroll)
   ========================================================= */
.fade-in-up {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* Reduced-motion: elemento già visibile, nessuna transizione. */
@media (prefers-reduced-motion: reduce) {
	.fade-in-up {
		opacity: 1;
		transform: none;
		transition: none;
	}
}
