/* theme.css — reset + base layer del tema.
   Mantenere minimale: gli stili specifici di ogni sezione vanno aggiunti
   solo durante la conversione delle template-parts dall'handoff Claude
   Design. Non scrivere CSS speculativo. */

/* ── RESET ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
	font-family: var(--sans);
	font-weight: 400;
	color: var(--ink);
	background: var(--ivory);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	font-feature-settings: "kern", "liga";
	overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6, p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ── TYPO UTILS ────────────────────────────────────────────────────── */
.serif { font-family: var(--serif); font-optical-sizing: auto; }
.serif-italic { font-family: var(--serif); font-style: italic; font-optical-sizing: auto; }
.caps {
	text-transform: uppercase;
	letter-spacing: 0.22em;
	font-size: 11px;
	font-weight: 700;
}

/* ── LAYOUT ────────────────────────────────────────────────────────── */
.container {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding-left: var(--gutter);
	padding-right: var(--gutter);
}
.section-pad    { padding: var(--if-pad-md) 0; }
.section-pad-sm { padding: var(--if-pad-sm) 0; }
.section-pad-lg { padding: var(--if-pad-lg) 0; }
section { position: relative; }

.section-tag {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-weight: 700;
	font-size: 11px;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--green);
}
.section-tag::before {
	content: '';
	display: inline-block;
	width: 28px;
	height: 1.5px;
	background: currentColor;
}

/* ── BOTTONI ───────────────────────────────────────────────────────── */
.btn-primary {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	padding: 16px 24px;
	background: var(--ink);
	color: var(--white);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	border: 0;
	transition: background 0.25s, gap 0.25s;
}
.btn-primary:hover { background: var(--green); gap: 20px; }

.btn-ghost {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 16px 22px;
	background: transparent;
	color: var(--ink);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	border: 1.5px solid var(--ink);
	transition: background 0.25s, color 0.25s, gap 0.25s;
}
.btn-ghost:hover { background: var(--ink); color: var(--white); gap: 18px; }

/* ── UTILITY: pulse dot ────────────────────────────────────────────── */
@keyframes if-pulse-soft {
	0%, 100% { opacity: 0.6; transform: scale(1); }
	50%      { opacity: 1;   transform: scale(1.4); }
}
.pulse-dot {
	display: inline-block;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--green);
	box-shadow: 0 0 0 0 var(--green);
	animation: if-pulse-soft 2.2s ease-in-out infinite, if-pulse-ring 2.2s ease-in-out infinite;
	flex-shrink: 0;
}
@keyframes if-pulse-ring {
	0%   { box-shadow: 0 0 0 0 rgba(45, 106, 79, 0.45); }
	70%  { box-shadow: 0 0 0 14px rgba(45, 106, 79, 0); }
	100% { box-shadow: 0 0 0 0 rgba(45, 106, 79, 0); }
}

/* ── UTILITY: scroll progress bar (top) ────────────────────────────── */
/* scaleX pilotato da motion.js (ScrollTrigger): sync esatto con lo
   scroll, niente transition che insegue. */
.scroll-progress {
	position: fixed;
	top: 0;
	left: 0;
	height: 2px;
	width: 100%;
	background: var(--green);
	z-index: 100;
	transform: scaleX(0);
	transform-origin: 0 50%;
	pointer-events: none;
}

/* ── UTILITY: marquee (testimonianze infinite scroll) ──────────────── */
@keyframes if-marquee {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}
.marquee {
	display: flex;
	width: max-content;
	animation: if-marquee 60s linear infinite;
}
.marquee.is-paused,
.marquee:hover { animation-play-state: paused; }

/* ── UTILITY: reveal (gestito da motion.js / GSAP) ─────────────────── */
/* Stato di default: VISIBILE. La classe `motion` su <html> e' aggiunta
   da motion.js solo se GSAP e' caricato e prefers-reduced-motion e' off:
   solo allora i target vengono nascosti (e GSAP li rivela con stagger).
   Niente timer di sicurezza: senza JS/GSAP non si nasconde nulla. */
html.motion [data-anim="reveal"] { opacity: 0; }

/* ── NAV — frosted glass + scrolled state ──────────────────────────── */
.nav {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 90;
	background: rgba(240, 240, 240, 0.62);
	backdrop-filter: blur(14px) saturate(140%);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	border-bottom: 1px solid rgba(45, 106, 79, 0.10);
	transition: background 0.4s, border-color 0.4s;
}
.nav.is-scrolled {
	background: rgba(240, 240, 240, 0.94);
	border-bottom-color: var(--rule);
}
.nav-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px var(--gutter);
	max-width: var(--container);
	margin: 0 auto;
	transition: padding 0.4s;
}
.nav.is-scrolled .nav-inner { padding-top: 12px; padding-bottom: 12px; }
.nav-brand { display: inline-flex; align-items: center; }
.nav-brand__logo { display: block; height: 44px; width: auto; max-width: 200px; object-fit: contain; }
.nav.is-scrolled .nav-brand__logo { height: 36px; transition: height 0.4s; }
.nav-links { display: flex; gap: clamp(18px, 1.8vw, 32px); align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-links a {
	font-family: var(--sans);
	font-weight: 700;
	font-size: 11px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--ink);
	opacity: 0.85;
	transition: opacity 0.2s;
	position: relative;
	padding-bottom: 4px;
}
.nav-links a:hover { opacity: 1; }
/* Pagina corrente evidenziata (classi WP menu + aria-current) */
.nav-links .current-menu-item > a,
.nav-links .current-menu-ancestor > a,
.nav-links .current_page_item > a,
.nav-links a[aria-current="page"] {
	opacity: 1;
	color: var(--green);
}
/* Underline animato left-to-right (solo pointer fine: niente su touch) */
@media (hover: hover) and (min-width: 1025px) {
	.nav-links a::after {
		content: '';
		position: absolute;
		left: 0;
		bottom: 0;
		height: 1.5px;
		width: 100%;
		background: var(--green);
		transform: scaleX(0);
		transform-origin: left center;
		transition: transform var(--dur) var(--ease);
	}
	.nav-links a:hover::after { transform: scaleX(1); }
	/* Sulla pagina corrente l'underline resta fisso */
	.nav-links .current-menu-item > a::after,
	.nav-links .current_page_item > a::after,
	.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
}
.nav-cta {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-left: clamp(16px, 2vw, 32px);
	padding: 10px 16px;
	background: var(--ink);
	color: var(--white) !important;
	opacity: 1 !important;
	transition: background 0.25s, gap 0.25s;
}
.nav-cta:hover { background: var(--green); gap: 14px; }

/* Chip "strumento gratuito" nella nav: la survey e' un tool, non una pagina,
   quindi si distingue dai link testuali con un pallino oro e un bordo. */
.nav-links a.nav-tool {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 14px;
	border: 1px solid var(--gold);
	border-radius: 999px;
	color: var(--green);
	opacity: 1;
	padding-bottom: 7px;
}
.nav-links a.nav-tool::before {
	content: '';
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--gold);
	flex: 0 0 auto;
}
.nav-links a.nav-tool::after { content: none !important; }
.nav-links a.nav-tool:hover { background: var(--gold); color: var(--white); }

/* Hamburger button (mobile only).
   z-index sopra il drawer (95): a menu aperto il bottone resta visibile
   come X per chiudere, altrimenti il drawer full-screen lo coprirebbe
   e il menu non avrebbe nessun controllo di chiusura. */
.nav-burger {
	display: none;
	width: 40px;
	height: 40px;
	background: transparent;
	border: 0;
	cursor: pointer;
	padding: 0;
	flex-direction: column;
	gap: 5px;
	align-items: center;
	justify-content: center;
	margin-right: 8px;
	position: relative;
	z-index: 96;
}
.nav-burger span {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--ink);
	transition: transform 0.3s, opacity 0.2s;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1024px) {
	.nav-burger { display: flex; }
	.nav-inner { position: relative; gap: 12px; }
	.nav-brand { margin-right: auto; }
	/* Su tablet/mobile la CTA header sparisce: la booking action e' affidata
	   alla sticky-cta in basso (evita il doppione header + barra fissa). */
	.nav-cta { display: none; }
	.nav-links {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		width: 100vw;
		height: 100svh;
		background: var(--ivory);
		padding: 96px var(--gutter) 32px;
		display: flex;
		flex-direction: column;
		gap: 18px;
		align-items: stretch;
		transform: translateY(-100%);
		transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
		z-index: 95;
		overflow-y: auto;
		list-style: none;
		margin: 0;
	}
	.nav-links.is-open { transform: none; }
	.nav-links li,
	.nav-links > * {
		display: block;
		width: 100%;
		list-style: none;
		margin: 0;
		padding: 0;
	}
	.nav-links a {
		display: block;
		font-size: 24px;
		font-family: var(--serif);
		font-weight: 400;
		font-style: italic;
		text-transform: none;
		letter-spacing: -0.01em;
		color: var(--ink);
		opacity: 1;
		padding: 4px 0 14px;
		border-bottom: 1px solid var(--rule);
		width: 100%;
		text-decoration: none;
	}
	.nav-links a:hover { color: var(--green); }
}
@media (max-width: 480px) {
	.nav-cta { font-size: 9px; padding: 8px 10px; letter-spacing: 0.1em; }
	.nav-inner { padding: 12px 16px; }
}

/* ── FOOTER ────────────────────────────────────────────────────────── */
.site-footer {
	background: var(--ink);
	color: var(--ivory);
	padding: 64px var(--gutter) 36px;
	margin-top: 0;
}
.site-footer__inner { width: 100%; }
.site-footer__cols {
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr;
	gap: clamp(28px, 4vw, 64px);
	padding-bottom: 48px;
	border-bottom: 1px solid rgba(218, 214, 214, 0.24);
}
@media (max-width: 820px) {
	.site-footer__cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
	.site-footer__cols { grid-template-columns: 1fr; }
}
.site-footer__about {
	margin-top: 18px;
	font-size: 17px;
	line-height: 1.5;
	color: var(--ivory-deep);
	max-width: 380px;
	font-weight: 300;
}
.site-footer__heading {
	color: var(--gold-text);
	margin-bottom: 18px;
}
.site-footer__list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.site-footer__list a { transition: color 0.2s; }
.site-footer__list a:hover { color: var(--gold-text); }
.site-footer__email { word-break: break-all; }
.site-footer__bar {
	margin-top: 28px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
}
.site-footer__copy { color: var(--ivory-deep); opacity: 0.6; }
.site-footer__legal { display: flex; gap: 18px; }
.site-footer__legal a { color: var(--ivory-deep); opacity: 0.6; }
.site-footer__totop { color: var(--gold-text) !important; opacity: 1 !important; }

/* Copy + credit affiancati nello stesso bar (footer compatto) */
.site-footer__copy-group {
	display: inline-flex;
	align-items: baseline;
	gap: 14px;
	flex-wrap: wrap;
}
.site-footer__credit {
	font-size: 11px;
	color: var(--ivory-deep);
	opacity: 0.5;
	letter-spacing: 0.03em;
	transition: opacity 0.25s;
}
.site-footer__credit::before { content: '·'; margin-right: 14px; opacity: 0.6; }
.site-footer__copy-group:hover .site-footer__credit { opacity: 0.85; }
.site-footer__credit a {
	color: inherit;
	border-bottom: 1px solid currentColor;
	transition: color 0.2s;
}
.site-footer__credit a:hover { color: var(--gold-text); border-bottom-color: var(--gold-text); }
@media (max-width: 480px) {
	.site-footer__copy-group { gap: 6px; }
	.site-footer__credit::before { display: none; }
}

/* ── STICKY CTA mobile — appare on scroll, nascosta vicino contatti ── */
.sticky-cta {
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: 16px;
	z-index: 78;
	display: none;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 20px;
	background: var(--green);
	color: var(--white);
	font-family: var(--sans);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	box-shadow: 0 8px 24px rgba(15, 42, 31, 0.25);
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.3s, transform 0.3s, background 0.25s;
}
.sticky-cta[hidden] { display: none !important; }
.sticky-cta.is-visible { display: flex; opacity: 1; transform: none; }
.sticky-cta:hover { background: var(--green-deep); }
.sticky-cta__arrow { font-size: 18px; opacity: 0.9; }

/* Visibile solo mobile/tablet (allineato al breakpoint hamburger 1024). */
@media (min-width: 1025px) {
	.sticky-cta { display: none !important; }
}

/* Spazio in fondo su mobile/tablet: la sticky-cta non copre piu' l'ultimo
   contenuto delle sezioni ne' il footer (revisione grafica giu 2026). */
@media (max-width: 1024px) {
	body { padding-bottom: 78px; }
}

/* ── BACK-TO-TOP ──────────────────────────────────────────────────── */
.back-to-top {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 80;
	width: 44px;
	height: 44px;
	background: var(--ink);
	color: var(--ivory);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.3s, transform 0.3s, background 0.25s;
}
.back-to-top.is-visible { opacity: 1; transform: none; }
.back-to-top:hover { background: var(--green); }
.back-to-top[hidden] { display: flex; }
@media (max-width: 480px) { .back-to-top { right: 14px; bottom: 14px; } }

/* ── ACCESSIBILITY ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	* { transition-duration: 0.01ms !important; animation: none !important; }
}
