/**
 * Enorosei — base: design token, reset leggero, tipografia, accessibilità.
 * Mobile-first. Breakpoint: 600px, 900px, 1200px.
 */

:root {
	/* Colori */
	--c-ivory: #F7F3EC;
	--c-paper: #FFFDF9;
	--c-sand: #EFE8DC;
	--c-ink: #0D1427;
	--c-ink-2: #1C2338;
	--c-ink-line: #2A3350;
	--c-gold: #B0976D;
	--c-gold-soft: #D8C3A0;
	--c-gold-text: #7A6340;
	--c-text: #0D1427;
	--c-text-2: #3A3F52;
	--c-muted: #5E6272;
	--c-muted-light: #A9AEBE;
	--c-on-dark: #E9E3D7;
	--c-line: #E3DBCD;
	--c-line-strong: #D9CFBE;
	--c-success: #2F5D3A;
	--c-error: #9B2C2C;
	--c-info: #2B4A6F;

	/* Font */
	--f-serif: "Playfair Display", Georgia, "Times New Roman", serif;
	--f-sans: Lato, system-ui, -apple-system, "Segoe UI", sans-serif;

	/* Scala tipografica fluida (min 375px → max 1440px) */
	--fs-xs: 0.75rem;
	--fs-sm: 0.875rem;
	--fs-base: 1rem;
	--fs-md: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
	--fs-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.375rem);
	--fs-h4: clamp(1.25rem, 1.15rem + 0.45vw, 1.5rem);
	--fs-h3: clamp(1.625rem, 1.4rem + 1vw, 2.5rem);
	--fs-h2: clamp(2rem, 1.6rem + 1.8vw, 3.25rem);
	--fs-h1: clamp(2.5rem, 1.9rem + 2.8vw, 4.5rem);
	--fs-display: clamp(2.875rem, 2rem + 3.8vw, 5rem);

	/* Spaziature */
	--s-1: 0.25rem;
	--s-2: 0.5rem;
	--s-3: 0.75rem;
	--s-4: 1rem;
	--s-5: 1.5rem;
	--s-6: 2rem;
	--s-7: 3rem;
	--s-8: 4rem;
	--s-9: clamp(3.5rem, 2.5rem + 4vw, 7rem);

	/* Layout */
	--container: 1200px;
	--container-narrow: 760px;
	--gutter: clamp(1.25rem, 0.5rem + 3.5vw, 2.5rem);
	--radius: 4px;
	--radius-sm: 2px;
	--header-h: 68px;
	--shadow-soft: 0 12px 32px rgba(13, 20, 39, 0.10);
	--ease: cubic-bezier(0.2, 0.7, 0.2, 1);
	--t-fast: 150ms;
	--t-base: 220ms;
}

@media (min-width: 900px) {
	:root {
		--header-h: 88px;
	}
}

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
	margin: 0;
	background: var(--c-ivory);
	color: var(--c-text);
	font-family: var(--f-sans);
	font-size: var(--fs-base);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

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

img {
	height: auto;
	display: block;
}

.icon {
	display: inline-block;
	flex-shrink: 0;
	vertical-align: middle;
}

/* Tipografia */
h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 var(--s-4);
	font-family: var(--f-serif);
	font-weight: 400;
	line-height: 1.12;
	color: var(--c-text);
	text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
h5,
h6 {
	font-size: var(--fs-md);
	font-family: var(--f-sans);
	font-weight: 700;
}

h1 em,
h2 em,
h3 em {
	font-style: italic;
	color: var(--c-gold-text);
}

p {
	margin: 0 0 var(--s-4);
}

a {
	color: var(--c-ink);
	text-decoration-color: var(--c-gold);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color var(--t-fast) var(--ease), text-decoration-color var(--t-fast) var(--ease);
}

a:hover {
	color: var(--c-gold-text);
}

strong,
b {
	font-weight: 700;
}

small {
	font-size: var(--fs-sm);
}

hr {
	border: 0;
	border-top: 1px solid var(--c-line);
	margin: var(--s-7) 0;
}

blockquote {
	margin: var(--s-6) 0;
	padding: var(--s-2) 0 var(--s-2) var(--s-5);
	border-left: 2px solid var(--c-gold);
	font-family: var(--f-serif);
	font-size: var(--fs-lg);
	font-style: italic;
	color: var(--c-text-2);
}

table {
	width: 100%;
	border-collapse: collapse;
}

th,
td {
	padding: var(--s-3) var(--s-4);
	border-bottom: 1px solid var(--c-line);
	text-align: left;
	vertical-align: top;
}

th {
	font-weight: 700;
}

/* Form: base */
input,
select,
textarea,
button {
	font: inherit;
	color: inherit;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="date"],
select,
textarea {
	width: 100%;
	min-height: 48px;
	padding: var(--s-3) var(--s-4);
	border: 1px solid var(--c-line-strong);
	border-radius: var(--radius-sm);
	background: var(--c-paper);
	color: var(--c-text);
	font-size: 1rem;
	transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

textarea {
	min-height: 140px;
	resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
	outline: none;
	border-color: var(--c-ink);
	box-shadow: 0 0 0 3px rgba(176, 151, 109, 0.35);
}

input[type="checkbox"],
input[type="radio"] {
	width: 18px;
	height: 18px;
	accent-color: var(--c-ink);
}

::placeholder {
	color: var(--c-muted);
	opacity: 1;
}

label {
	font-weight: 700;
	font-size: var(--fs-sm);
}

/* Accessibilità */
:focus-visible {
	outline: 2px solid var(--c-gold);
	outline-offset: 3px;
}

.site-footer :focus-visible,
.hero :focus-visible {
	outline-color: var(--c-gold-soft);
}

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

.screen-reader-text:focus {
	clip: auto !important;
	clip-path: none;
	height: auto;
	width: auto;
	z-index: 100000;
}

.skip-link:focus {
	position: fixed !important;
	top: 12px;
	left: 12px;
	padding: 12px 20px;
	background: var(--c-ink);
	color: var(--c-ivory);
	font-weight: 700;
	text-decoration: none;
	border-radius: var(--radius-sm);
}

/* Allineamenti WordPress */
.alignleft {
	float: left;
	margin: 0 var(--s-5) var(--s-4) 0;
}

.alignright {
	float: right;
	margin: 0 0 var(--s-4) var(--s-5);
}

.aligncenter {
	margin-left: auto;
	margin-right: auto;
}

.wp-caption-text,
figcaption {
	font-size: var(--fs-sm);
	color: var(--c-muted);
	margin-top: var(--s-2);
}

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