/*
Theme Name: TURBO MARKETING
Theme URI: https://turbomarketing.pro
Author: Alessandro Garau
Author URI: https://turbomarketing.pro
Description: Tema custom TURBO MARKETING™ — direct response, nero/rosso/grigio, costruito sui 5 Documenti del framework. Nessun page builder.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: turbo
*/

/* =========================================================
   0. RESET & VARIABLES
========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: 'Inter', system-ui, -apple-system, sans-serif;
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
	font-family: 'Space Grotesk', 'Inter', sans-serif;
	font-weight: 700;
	line-height: 1.15;
	margin: 0 0 .5em;
	letter-spacing: -0.01em;
}
p { margin: 0 0 1em; }
button { font-family: inherit; cursor: pointer; }

:root {
	--bg: #0b0b0d;
	--bg-alt: #141417;
	--bg-card: #17171b;
	--ink: #f2f1ef;
	--ink-muted: #a5a3ab;
	--border: #26262b;
	--red: #ff3b30;
	--red-dark: #c81e1e;
	--gray-light: #f5f5f6;
	--radius: 18px;
	--wrap: 1200px;
	--wrap-narrow: 760px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: var(--wrap-narrow); }

.text-red { color: var(--red); }
.eyebrow {
	display: inline-block;
	font-family: 'Space Grotesk', sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--red);
	margin-bottom: 14px;
}

/* =========================================================
   1. SCROLL PROGRESS BAR
========================================================= */
.scroll-progress {
	position: fixed; top: 0; left: 0; height: 3px; width: 0%;
	background: linear-gradient(90deg, var(--red), #ff8a3d);
	z-index: 9999; transition: width .1s linear;
}

/* =========================================================
   2. HEADER
========================================================= */
.site-header {
	position: sticky; top: 0; z-index: 500;
	background: rgba(11,11,13,.7);
	backdrop-filter: blur(14px) saturate(140%);
	border-bottom: 1px solid var(--border);
	transition: padding .25s ease, background .25s ease;
}
.site-header__inner {
	display: flex; align-items: center; justify-content: space-between;
	padding: 20px 24px;
	transition: padding .25s ease;
}
.site-header.is-scrolled .site-header__inner { padding: 12px 24px; }

.brand { display: flex; align-items: baseline; gap: 2px; font-family: 'Space Grotesk', sans-serif; }
.brand__mark { color: var(--red); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.brand__rest { color: var(--ink); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.brand sup { font-size: 10px; }

.nav-menu { display: flex; gap: 32px; }
.nav-menu a {
	position: relative; font-size: 15px; font-weight: 500; color: var(--ink-muted);
	transition: color .2s ease;
}
.nav-menu a::after {
	content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px;
	background: var(--red); transition: width .25s ease;
}
.nav-menu a:hover { color: var(--ink); }
.nav-menu a:hover::after { width: 100%; }

.site-header__actions { display: flex; align-items: center; gap: 16px; }

.nav-toggle {
	display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 6px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }

.mobile-nav {
	display: none; flex-direction: column; gap: 18px; padding: 20px 24px 28px;
	border-top: 1px solid var(--border);
}
.mobile-nav.is-open { display: flex; }
.mobile-nav__menu { display: flex; flex-direction: column; gap: 14px; }
.mobile-nav__menu a { font-size: 17px; font-weight: 600; }

/* =========================================================
   3. BUTTONS
========================================================= */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 15px;
	padding: 13px 26px; border-radius: 999px; border: 1px solid transparent;
	transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
	white-space: nowrap;
}
.btn--sm { padding: 9px 18px; font-size: 14px; }
.btn--lg { padding: 17px 32px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--red { background: var(--red); color: #fff; box-shadow: 0 8px 24px -8px rgba(255,59,48,.6); }
.btn--red:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 12px 30px -8px rgba(255,59,48,.75); }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink-muted); transform: translateY(-2px); }
.btn--dark { background: var(--ink); color: var(--bg); }
.btn--dark:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 12px 30px -8px rgba(0,0,0,.5); }

/* =========================================================
   4. SCROLL-REVEAL ANIMATIONS
========================================================= */
[data-animate] { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
[data-animate].is-visible { opacity: 1; transform: translateY(0); }

/* =========================================================
   5. HERO
========================================================= */
.hero {
	position: relative; overflow: hidden;
	padding: 160px 0 120px;
	text-align: center;
}
.hero__inner { position: relative; z-index: 2; max-width: 880px; margin: 0 auto; }
.hero__blob {
	position: absolute; border-radius: 50%; filter: blur(90px); opacity: .35; z-index: 1;
	animation: float 14s ease-in-out infinite;
}
.hero__blob--1 { width: 480px; height: 480px; background: var(--red); top: -180px; left: -120px; }
.hero__blob--2 { width: 420px; height: 420px; background: #ff8a3d; bottom: -160px; right: -100px; animation-delay: -6s; }
@keyframes float {
	0%, 100% { transform: translate(0,0) scale(1); }
	50% { transform: translate(40px,-30px) scale(1.08); }
}
.hero__title { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 22px; }
.hero__sub { font-size: 19px; color: var(--ink-muted); max-width: 620px; margin: 0 auto 36px; }
.hero__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero__scroll {
	position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
	width: 26px; height: 42px; border: 2px solid var(--border); border-radius: 20px;
	display: flex; justify-content: center; padding-top: 8px; z-index: 2;
}
.hero__scroll span { width: 4px; height: 8px; border-radius: 4px; background: var(--red); animation: scrollDown 1.8s ease infinite; }
@keyframes scrollDown { 0% { transform: translateY(0); opacity: 1; } 70% { opacity: 0; } 100% { transform: translateY(14px); opacity: 0; } }

/* =========================================================
   6. MARQUEE
========================================================= */
.marquee { overflow: hidden; background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 18px 0; }
.marquee__track { display: flex; width: max-content; animation: marquee 34s linear infinite; }
.marquee__item {
	font-family: 'Space Grotesk', sans-serif; font-size: 16px; color: var(--ink-muted);
	padding: 0 36px; white-space: nowrap; position: relative;
}
.marquee__item::after { content: '—'; position: absolute; right: -4px; color: var(--red); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee:hover .marquee__track { animation-play-state: paused; }

/* =========================================================
   7. SECTIONS (generic)
========================================================= */
.section { padding: 96px 0; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__head { text-align: center; max-width: 620px; margin: 0 auto 56px; }
.section__head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.section__sub { color: var(--ink-muted); font-size: 17px; }
.page-hero { padding: 150px 0 70px; text-align: center; }
.page-hero h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
.page-hero p { color: var(--ink-muted); font-size: 18px; max-width: 640px; margin: 0 auto; }

.prose h2 { margin-top: 1.6em; }
.prose p { color: var(--ink-muted); font-size: 18px; }
.prose strong { color: var(--ink); }
.prose img { border-radius: var(--radius); margin: 24px 0; }

/* =========================================================
   8. RAMI GRID (7 cards)
========================================================= */
.rami-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.ramo-card {
	position: relative; display: flex; flex-direction: column; gap: 18px;
	background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
	padding: 30px 26px; transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
	will-change: transform;
}
.ramo-card:hover { border-color: var(--red); box-shadow: 0 20px 40px -20px rgba(255,59,48,.35); }
.ramo-card__letter {
	font-family: 'Space Grotesk', sans-serif; font-size: 14px; font-weight: 700; color: var(--red);
	width: 32px; height: 32px; border: 1px solid var(--red); border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
}
.ramo-card__hook { font-size: 17px; font-weight: 500; flex-grow: 1; }
.ramo-card__cta { font-size: 14px; color: var(--ink-muted); font-weight: 600; }

/* =========================================================
   9. QUOTE BLOCK (capro espiatorio)
========================================================= */
.quote-block { max-width: 780px; margin: 0 auto; text-align: center; position: relative; }
.quote-block__mark { font-family: 'Space Grotesk', sans-serif; font-size: 90px; color: var(--red); line-height: 0; display: block; margin-bottom: 10px; opacity: .5; }
.quote-block h2 { font-size: clamp(2rem, 4vw, 3rem); }
.quote-block p { font-size: 19px; color: var(--ink-muted); }

/* =========================================================
   10. BIG IDEA
========================================================= */
.section--idea { text-align: center; }
.idea-statement { font-size: clamp(1.8rem, 4.6vw, 3.2rem); max-width: 900px; margin: 0 auto 26px; }
.idea-statement .strike { text-decoration: line-through; text-decoration-color: var(--red); opacity: .5; }
.idea-sub { max-width: 640px; margin: 0 auto; color: var(--ink-muted); font-size: 18px; }

/* =========================================================
   11. METHOD TIMELINE
========================================================= */
.method-timeline { position: relative; max-width: 760px; margin: 0 auto; padding-left: 50px; }
.method-timeline::before { content: ''; position: absolute; left: 20px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.method-timeline li { position: relative; display: flex; gap: 26px; padding-bottom: 46px; }
.method-timeline li:last-child { padding-bottom: 0; }
.method-timeline__num {
	position: absolute; left: -50px; top: 0; width: 42px; height: 42px; border-radius: 50%;
	background: var(--bg-card); border: 1px solid var(--red); color: var(--red);
	display: flex; align-items: center; justify-content: center; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 13px;
}
.method-timeline h3 { font-size: 20px; margin-bottom: 6px; }
.method-timeline p { color: var(--ink-muted); font-size: 16px; margin: 0; }

/* =========================================================
   12. STATS
========================================================= */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 26px; text-align: center; }
.stat-card__num { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 44px; font-weight: 700; color: var(--red); margin-bottom: 10px; }
.stat-card p { color: var(--ink-muted); margin: 0; font-size: 15px; }

/* =========================================================
   13. CASE STUDY TEASER
========================================================= */
.case-teaser {
	max-width: 780px; margin: 0 auto; text-align: center;
	background: linear-gradient(160deg, var(--bg-card), var(--bg-alt));
	border: 1px solid var(--border); border-radius: 24px; padding: 60px 40px;
}
.badge {
	display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
	background: rgba(255,59,48,.12); color: var(--red); padding: 6px 16px; border-radius: 999px; margin-bottom: 18px;
}
.badge--link:hover { background: rgba(255,59,48,.22); }
.case-teaser h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.case-teaser p { color: var(--ink-muted); font-size: 17px; }
.case-teaser__soon { display: inline-block; margin-top: 16px; font-size: 14px; color: var(--ink-muted); border-top: 1px dashed var(--border); padding-top: 16px; }

/* =========================================================
   14. CARDS GRID (blog / risorse)
========================================================= */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.post-card {
	background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
	display: flex; flex-direction: column; transition: transform .3s ease, border-color .3s ease;
}
.post-card:hover { transform: translateY(-6px); border-color: var(--red); }
.post-card__media { position: relative; aspect-ratio: 16/10; background: var(--bg-alt); overflow: hidden; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, var(--bg-alt), var(--border)); }
.post-card__placeholder--resource { background: linear-gradient(135deg, rgba(255,59,48,.18), var(--bg-alt)); }
.post-card__badge {
	position: absolute; top: 14px; left: 14px; background: rgba(11,11,13,.85); color: var(--red);
	font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 999px; backdrop-filter: blur(6px);
}
.post-card h3 { font-size: 19px; margin: 20px 22px 8px; }
.post-card p { font-size: 15px; color: var(--ink-muted); margin: 0 22px 20px; flex-grow: 1; }
.post-card__cta { margin: 0 22px 22px; font-size: 14px; font-weight: 600; color: var(--red); }
.empty-state { text-align: center; color: var(--ink-muted); font-size: 16px; grid-column: 1 / -1; padding: 40px 0; }

/* =========================================================
   15. TESTIMONIALS
========================================================= */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.testimonial-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; position: relative; }
.testimonial-card p { font-size: 18px; font-style: italic; }
.testimonial-card strong { color: var(--ink-muted); font-size: 14px; font-style: normal; }
.testimonial-card__flag {
	position: absolute; top: -12px; right: 20px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
	text-transform: uppercase; letter-spacing: .04em; padding: 5px 12px; border-radius: 999px;
}

/* =========================================================
   16. CTA FINALE
========================================================= */
.cta-final { text-align: center; background: linear-gradient(160deg, var(--red), var(--red-dark)); color: #fff; }
.cta-final h2 { font-size: clamp(2rem, 4vw, 2.8rem); color: #fff; }
.cta-final p { color: rgba(255,255,255,.85); font-size: 18px; max-width: 560px; margin: 0 auto 30px; }

/* =========================================================
   17. AUTHOR BOX / SINGLE POST
========================================================= */
.single-post__thumb img { border-radius: var(--radius); }
.post-meta { color: var(--ink-muted); font-size: 14px; display: flex; gap: 8px; }
.author-box { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.author-box h3 { margin-bottom: 4px; }
.author-box p { color: var(--ink-muted); margin: 0; }

/* =========================================================
   18. FILTER CHIPS (archive)
========================================================= */
.filter-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.chip { font-size: 14px; padding: 8px 18px; border: 1px solid var(--border); border-radius: 999px; color: var(--ink-muted); transition: all .2s ease; }
.chip:hover, .chip.is-active { border-color: var(--red); color: var(--red); }

/* =========================================================
   19. FOOTER
========================================================= */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 80px 0 30px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 40px; margin-bottom: 60px; }
.footer__tagline { color: var(--ink-muted); margin-top: 16px; }
.footer__location { color: var(--ink-muted); font-size: 14px; }
.footer__col h4 { font-size: 15px; margin-bottom: 16px; }
.footer__col ul { display: flex; flex-direction: column; gap: 10px; }
.footer__col a { color: var(--ink-muted); font-size: 15px; transition: color .2s ease; }
.footer__col a:hover { color: var(--red); }
.footer__newsletter p { color: var(--ink-muted); font-size: 14px; }
.newsletter-form { display: flex; gap: 8px; margin: 14px 0 8px; }
.newsletter-form input { flex-grow: 1; padding: 12px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--ink); }
.newsletter-form--center { justify-content: center; max-width: 460px; margin: 0 auto; }
.footer__note { font-size: 12px; color: #605f66; }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 24px; font-size: 13px; color: var(--ink-muted); }
.back-to-top {
	width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: transparent; color: var(--ink);
	transition: all .25s ease;
}
.back-to-top:hover { background: var(--red); border-color: var(--red); transform: translateY(-3px); }

/* =========================================================
   20. TWO COL / CHECK LISTS (cosa-faccio)
========================================================= */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.check-list li { position: relative; padding-left: 30px; margin-bottom: 16px; color: var(--ink-muted); }
.check-list li::before { content: '✓'; position: absolute; left: 0; color: var(--red); font-weight: 700; }
.check-list--x li::before { content: '✕'; color: var(--ink-muted); }

/* =========================================================
   21. CONTACT FORM
========================================================= */
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.contact-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.contact-form label { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--ink-muted); }
.contact-form input, .contact-form textarea {
	padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-card); color: var(--ink); font-family: inherit;
}
.contact-alt { margin-top: 50px; padding-top: 40px; border-top: 1px solid var(--border); text-align: center; }
.contact-alt p { color: var(--ink-muted); margin-bottom: 16px; }

.form-notice {
	padding: 14px 20px; border-radius: 12px; font-size: 15px; font-weight: 500; margin-bottom: 20px;
}
.form-notice--ok { background: rgba(64, 200, 120, .12); color: #4fd689; border: 1px solid rgba(64,200,120,.3); }
.form-notice--error { background: rgba(255,59,48,.12); color: var(--red); border: 1px solid rgba(255,59,48,.3); }
.form-notice--sm { padding: 8px 14px; font-size: 13px; }
.cta-final .form-notice { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.35); }

/* =========================================================
   22. RESPONSIVE
========================================================= */
@media (max-width: 900px) {
	.footer__grid { grid-template-columns: 1fr 1fr; }
	.two-col { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
	.nav-menu, .site-header__actions .btn { display: none; }
	.nav-toggle { display: flex; }
	.hero { padding: 130px 0 90px; }
	.section { padding: 70px 0; }
	.contact-form__row { grid-template-columns: 1fr; }
	.footer__grid { grid-template-columns: 1fr; gap: 32px; }
	.footer__bottom { flex-direction: column; gap: 16px; text-align: center; }
}
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* Logo custom caricato da Personalizza  piccolo, senza sfondo, sempre leggibile */
.brand img,
.custom-logo-link img,
.custom-logo {
	max-height: 44px;
	width: auto;
	height: auto;
	display: block;
	background: transparent;
	transition: max-height .25s ease;
}
.site-header.is-scrolled .brand img,
.site-header.is-scrolled .custom-logo-link img,
.site-header.is-scrolled .custom-logo {
	max-height: 34px;
}

/* -----------------------------------------------------------
   MOBILE QA + ACCESSIBILITA MOTION
----------------------------------------------------------- */
@media (max-width: 780px) {
	html, body { overflow-x: clip; }
	.btn {
		max-width: 100%;
		white-space: normal;
		text-align: center;
		line-height: 1.3;
	}
	.hero__actions { width: 100%; }
	.hero__actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	[data-animate] { opacity: 1; transform: none; transition: none; }
	.hero__blob,
	.hero__scroll span,
	.marquee__track { animation: none; }
}


/* Privacy e consensi dei moduli */
.form-consent {
	display: flex;
	align-items: flex-start;
	gap: .55rem;
	width: 100%;
	font-size: .78rem;
	line-height: 1.45;
	color: var(--muted);
}
.form-consent input[type="checkbox"] {
	flex: 0 0 auto;
	width: 1rem;
	height: 1rem;
	margin-top: .15rem;
	accent-color: var(--red);
}
.form-consent a,
.footer__bottom a {
	text-decoration: underline;
	text-underline-offset: 2px;
}
.newsletter-form .form-consent {
	flex-basis: 100%;
}
