/*
Theme Name:   GeneratePress Child
Template:     generatepress
Version:      1.0.0
Text Domain:  generatepress-child
Domain Path:  /languages
*/

/* ─── Font: Raleway — versione locale scaricata 4.101 (titoli) ────────────────── */

@font-face {
	font-family: 'Raleway Local';
	font-style: normal;
	font-weight: 100;
	font-display: swap;
	src: url('fonts/raleway-local/Raleway-Thin.woff2') format('woff2');
}

/* ─── Font: Source Sans 3 (corpo testo) ───────────────────────────────────── */

@font-face {
	font-family: 'Raleway Local';
	font-style: normal;
	font-weight: 300;
	font-display: swap;
	src: url('fonts/raleway-local/Raleway-Light.woff2') format('woff2');
}

/* Font variabile: un file copre tutti i pesi da 100 a 700, e il corsivo e'
   disegnato. Sostituisce Swiss 721 Light BT (Bitstream), che era servito come
   webfont senza licenza. SIL Open Font License. */

@font-face {
	font-family: 'Source Sans 3';
	font-style: normal;
	font-weight: 100 700;
	font-display: swap;
	src: url('fonts/source-sans/source-sans-3.woff2') format('woff2-variations'),
	     url('fonts/source-sans/source-sans-3.woff2') format('woff2');
}

@font-face {
	font-family: 'Source Sans 3';
	font-style: italic;
	font-weight: 100 700;
	font-display: swap;
	src: url('fonts/source-sans/source-sans-3-italic.woff2') format('woff2-variations'),
	     url('fonts/source-sans/source-sans-3-italic.woff2') format('woff2');
}

/* ─── Variabili globali ─────────────────────────────────────────────────────── */

:root {
	/* Palette */
	--color-bg:           #1e2128;
	--color-surface:      #272b33;
	--color-accent:       #a8553e;
	--color-accent-hover: #8a3e2b;
	--color-text:         #d4cfc8;
	--color-text-muted:   #9a9a9a;
	--color-border:       #3a3f4a;
	--color-gateway-bg:   #2a2a2a;

	/* Tipografia */
	--font-heading: 'Raleway Local', 'Helvetica Neue', sans-serif;
	--font-body:    'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;

	/* Scale tipografica */
	--text-xs:   0.75rem;    /*  12px */
	--text-sm:   0.875rem;   /*  14px */
	--text-base: 1rem;       /*  16px */
	--text-lg:   1.125rem;   /*  18px */
	--text-xl:   1.25rem;    /*  20px */
	--text-2xl:  1.5rem;     /*  24px */
	--text-3xl:  1.875rem;   /*  30px */
	--text-4xl:  2.5rem;     /*  40px */
	--text-5xl:  3.25rem;    /*  52px */

	/* Spaziatura */
	--spacing-section: 80px;
	--spacing-block:   40px;
	--max-width:       1200px;
}

/* ─── Base ──────────────────────────────────────────────────────────────────── */

body {
	background-color: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-body);
	font-size: var(--text-base);
	font-weight: 300;
	line-height: 1.65;
}

/* ─── Heading ───────────────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	font-weight: 100;
	line-height: 1.2;
	color: var(--color-text);
	margin-top: 0;
}

h1 { font-size: var(--text-5xl); font-weight: 100; letter-spacing: -0.02em; }
h2 { font-size: var(--text-4xl); font-weight: 100; letter-spacing: -0.01em; }
h3 { font-size: var(--text-3xl); font-weight: 100; }
h4 { font-size: var(--text-2xl); font-weight: 100; }
h5 { font-size: var(--text-xl);  font-weight: 100; }
h6 { font-size: var(--text-lg);  font-weight: 100; }

/* ─── Testo ─────────────────────────────────────────────────────────────────── */

p {
	margin-top: 0;
	margin-bottom: 1.25em;
}

strong, b {
	font-weight: 500;
}

em, i {
	font-style: italic;
}

small, .text-sm {
	font-size: var(--text-sm);
	color: var(--color-text-muted);
}

/* ─── Link ──────────────────────────────────────────────────────────────────── */

a {
	color: var(--color-accent);
	text-decoration: none;
	transition: color 0.15s ease;
}

a:hover {
	color: var(--color-accent-hover);
}

/* ─── Responsive: heading scale su mobile ───────────────────────────────────── */

@media (max-width: 768px) {
	h1 { font-size: var(--text-4xl); }
	h2 { font-size: var(--text-3xl); }
	h3 { font-size: var(--text-2xl); }
	h4 { font-size: var(--text-xl);  }
}

/* ─── Accessibilità ─────────────────────────────────────────────────────────── */

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

:focus-visible {
	outline: 2px solid var(--color-accent);
	outline-offset: 2px;
}

:focus:not(:focus-visible) {
	outline: none;
}

.skip-link:focus {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 9999;
	width: auto;
	height: auto;
	padding: 8px 16px;
	margin: 0;
	clip: auto;
	white-space: normal;
	overflow: visible;
	background: var(--color-bg);
	color: var(--color-accent);
	font-size: var(--text-sm);
	text-decoration: none;
	border: 2px solid var(--color-accent);
	border-radius: 4px;
}
