/*
Theme Name: EP Consulting Studio
Theme URI: https://ep-consultingstudio.com
Author: Emanuele Pasini
Description: Tema a blocchi su misura per EP Consulting Studio. Il metodo dell'ascolto: "Parla poco, odi assai et guarda al fine di ciò che fai".
Version: 1.0.2
Requires at least: 6.5
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ep-consulting
*/

html { scroll-behavior: smooth; }
:where(section[id], .wp-block-group[id]) { scroll-margin-top: 90px; }
body { -webkit-font-smoothing: antialiased; }
::selection { background: var(--wp--preset--color--brick); color: #fff; }

/* ---------- Header ---------- */
.ep-header {
	position: sticky; top: 0; z-index: 50;
	border-bottom: 1px solid transparent;
	transition: border-color .3s ease, box-shadow .3s ease;
}
/* Sfondo sfocato su uno pseudo-elemento: un backdrop-filter sull'header
   intrappolerebbe dentro l'header il menu mobile a tutto schermo. */
.ep-header::before {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background: color-mix(in srgb, var(--wp--preset--color--paper) 88%, transparent);
	backdrop-filter: saturate(1.4) blur(10px);
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
}
.ep-header.is-scrolled { border-bottom-color: rgba(22,24,29,.08); box-shadow: 0 6px 24px -18px rgba(22,24,29,.35); }
body.admin-bar .ep-header { top: 32px; }
.ep-logo { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--wp--preset--color--ink); }
.ep-logo__mark {
	display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
	background: var(--wp--preset--color--ink); color: var(--wp--preset--color--paper);
	font-family: var(--wp--preset--font-family--serif); font-size: 1.15rem; font-weight: 600; letter-spacing: .02em;
	position: relative;
}
.ep-logo__mark::after { content: ""; position: absolute; right: 7px; bottom: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--wp--preset--color--brick); }
.ep-logo__text { font-weight: 600; letter-spacing: -.01em; line-height: 1.1; }
.ep-logo__text small { display: block; font-weight: 400; font-size: .75rem; color: var(--wp--preset--color--ink-soft); letter-spacing: .08em; text-transform: uppercase; }
.ep-logo__img { display: block; height: 52px; width: auto; }
.ep-logo-footer { display: block; width: 150px; height: auto; margin-bottom: 1.5rem; }
@media (max-width: 781px) { .ep-logo__img { height: 38px; } }
/* Menu mobile a tutto schermo */
.ep-nav-mobile { display: none !important; }
.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--paper) !important; color: var(--wp--preset--color--ink) !important;
	padding: 1.5rem clamp(1.25rem, 6vw, 2.5rem) !important;
}
.wp-block-navigation__responsive-container.is-menu-open .ep-nav-mobile { display: flex !important; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 4rem !important; align-items: flex-start !important; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { align-items: flex-start !important; gap: 1.4rem !important; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a {
	font-family: var(--wp--preset--font-family--serif); font-size: 2.2rem; font-weight: 500; letter-spacing: -.01em;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a:hover { color: var(--wp--preset--color--brick); }
.ep-header .wp-block-navigation a { text-decoration: none; font-weight: 500; }
.ep-header .wp-block-navigation a:hover { color: var(--wp--preset--color--brick); }

/* ---------- Utilità ---------- */
.ep-eyebrow {
	display: inline-flex; align-items: center; gap: .6rem;
	font-size: .78rem !important; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
	color: var(--wp--preset--color--brick);
}
.ep-eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.ep-on-dark .ep-eyebrow { color: #F0A486; }
.ep-lead { font-size: var(--wp--preset--font-size--large); color: var(--wp--preset--color--ink-soft); max-width: 44ch; }
.ep-on-dark .ep-lead, .ep-on-dark p { color: rgba(246,242,234,.78); }
.ep-on-dark h2, .ep-on-dark h3 { color: var(--wp--preset--color--paper); }
em.ep-accent, .ep-accent em { font-style: italic; color: var(--wp--preset--color--brick); font-weight: 400; }
.ep-on-dark em.ep-accent { color: #F0A486; }

.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent; color: var(--wp--preset--color--ink); border: 1.5px solid currentColor;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--paper); }
.wp-block-button__link { transition: transform .2s ease, background-color .2s ease, color .2s ease; }
.wp-block-button__link:hover { transform: translateY(-2px); }

/* ---------- Hero ---------- */
.ep-hero { position: relative; overflow: hidden; }
.ep-hero::before {
	content: ""; position: absolute; width: 620px; height: 620px; right: -180px; top: -200px; border-radius: 50%;
	background: radial-gradient(circle at center, rgba(194,80,46,.16), rgba(194,80,46,0) 65%);
	pointer-events: none;
}
.ep-hero h1 { max-width: 13ch; }

/* L'incisione: citazione resa come lapide */
.ep-inscription {
	position: relative; border-radius: 6px 6px 120px 120px / 6px 6px 60px 60px;
	background:
		radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.55), transparent 55%),
		repeating-linear-gradient(115deg, rgba(0,0,0,.018) 0 2px, transparent 2px 7px),
		linear-gradient(160deg, #EDE5D6, #D9CDB8);
	box-shadow: inset 0 2px 0 rgba(255,255,255,.6), inset 0 -10px 30px rgba(90,70,40,.15), 0 30px 60px -30px rgba(60,40,20,.45);
	border: 1px solid rgba(120,95,60,.25);
	text-align: center;
}
.ep-inscription .ep-inscription__text {
	font-family: var(--wp--preset--font-family--serif); text-transform: uppercase;
	letter-spacing: .16em; line-height: 1.55; font-weight: 500;
	color: #5B4A33;
	text-shadow: 0 1px 0 rgba(255,255,255,.7), 0 -1px 0 rgba(60,40,20,.35);
}
.ep-inscription .ep-inscription__rule { width: 60px; height: 1px; margin-inline: auto; background: rgba(91,74,51,.45); border: 0; }
.ep-inscription .ep-inscription__caption { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: #7A6648; }

/* ---------- Metodo ---------- */
.ep-step { position: relative; height: 100%; }
.ep-step__num {
	font-family: var(--wp--preset--font-family--serif); font-style: italic; font-size: 3.2rem !important; line-height: 1;
	color: var(--wp--preset--color--brick); opacity: .9;
}
.ep-step__motto { font-family: var(--wp--preset--font-family--serif); font-style: italic; font-size: 1.5rem !important; line-height: 1.2; }
.ep-step-card { border-top: 2px solid rgba(246,242,234,.18); transition: border-color .3s ease; }
.ep-step-card:hover { border-top-color: var(--wp--preset--color--brick); }

.ep-process { counter-reset: ep; }
.ep-process .ep-process__item { position: relative; border-left: 1px solid rgba(22,24,29,.15); }
.ep-process .ep-process__item::before {
	content: ""; position: absolute; left: -6px; top: 0.4rem; width: 11px; height: 11px; border-radius: 50%;
	background: var(--wp--preset--color--paper); border: 2px solid var(--wp--preset--color--brick);
}

/* ---------- Card competenze ---------- */
.ep-card {
	height: 100%; border: 1px solid rgba(22,24,29,.08);
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.ep-card:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -28px rgba(22,24,29,.45); border-color: rgba(194,80,46,.35); }
.ep-card__icon {
	display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
	background: rgba(194,80,46,.1); color: var(--wp--preset--color--brick); font-size: 1.3rem !important; line-height: 1;
}
.ep-card .ep-tags { margin-top: .5rem; }
.ep-tags { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0; }
.ep-tags li { font-size: .78rem; padding: .25rem .65rem; border-radius: 99px; background: var(--wp--preset--color--paper); color: var(--wp--preset--color--ink-soft); }

/* ---------- Numeri ---------- */
.ep-stat__num { font-family: var(--wp--preset--font-family--serif); font-size: clamp(2.6rem, 5vw, 3.8rem) !important; line-height: 1; font-weight: 500; }
.ep-stat__num em { color: var(--wp--preset--color--brick); font-style: normal; }

/* ---------- Clienti ---------- */
.ep-cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.ep-case {
	background: var(--wp--preset--color--white); border: 1px solid rgba(22,24,29,.08); border-radius: 20px;
	padding: 1.75rem; display: flex; flex-direction: column; gap: .6rem;
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.ep-case:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -28px rgba(22,24,29,.45); border-color: rgba(194,80,46,.35); }
.ep-case__logo { height: 64px; display: flex; align-items: center; margin-bottom: .75rem; }
.ep-case__logo img { max-height: 56px; max-width: 180px; width: auto; height: auto; object-fit: contain; }
.ep-case__wordmark { font-family: var(--wp--preset--font-family--serif); font-size: 1.6rem; font-weight: 500; letter-spacing: -.01em; }
.ep-case__sector { margin: 0; font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--wp--preset--color--brick); }
.ep-case h3 { margin: 0; }
.ep-case p:last-child { margin: 0; color: var(--wp--preset--color--ink-soft); }
.ep-alumni { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .35rem 1.5rem; }
.ep-alumni li { font-family: var(--wp--preset--font-family--serif); font-size: 1.15rem; color: var(--wp--preset--color--ink-soft); }
@media (max-width: 900px) { .ep-cases { grid-template-columns: 1fr; } }

/* ---------- Chi sono ---------- */
.ep-portrait img { border-radius: 24px; aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.ep-portrait { max-width: 340px; margin-inline: auto; }
.ep-portrait { position: relative; }
.ep-portrait::after {
	content: ""; position: absolute; inset: 18px -18px -18px 18px; border-radius: 24px;
	border: 1.5px solid var(--wp--preset--color--brick); z-index: -1;
}

/* ---------- CTA finale ---------- */
.ep-cta { border-radius: 28px; position: relative; overflow: hidden; }
.ep-cta::after {
	content: "“"; position: absolute; right: 2rem; top: -3.5rem; font-family: var(--wp--preset--font-family--serif);
	font-size: 22rem; line-height: 1; color: rgba(246,242,234,.05); pointer-events: none;
}
.ep-cta .wp-block-button__link { background: var(--wp--preset--color--paper); color: var(--wp--preset--color--ink); }
.ep-cta .wp-block-button__link:hover { background: var(--wp--preset--color--brick); color: #fff; }
.ep-cta .is-style-outline .wp-block-button__link { background: transparent; color: var(--wp--preset--color--paper); }

.ep-footer a { color: inherit; text-decoration: none; }
.ep-footer a:hover { color: var(--wp--preset--color--brick); }

/* ---------- Animazioni d'ingresso ---------- */
@media (prefers-reduced-motion: no-preference) {
	.js .ep-reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
	.js .ep-reveal.is-visible { opacity: 1; transform: none; }
}

@media (max-width: 781px) {
	.ep-header .wp-block-buttons { display: none; }
	.ep-portrait::after { inset: 12px -10px -12px 10px; }
	.ep-cta::after { display: none; }
}
