/* ==========================================================================
   Nami — stili del tema che theme.json non copre
   ========================================================================== */

:root {
	--nami-radius-card: var(--wp--custom--radius--card, 28px);
	--nami-radius-card-s: var(--wp--custom--radius--card-s, 20px);
	--nami-radius-field: var(--wp--custom--radius--field, 12px);
	--nami-ease: cubic-bezier(.2, .8, .2, 1);
	--nami-line: 1px solid var(--wp--preset--color--contrast);
	--nami-line-soft: 1px solid rgba(10, 10, 10, .15);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* Accessibilità ------------------------------------------------------------ */
.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;
}
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--contrast);
	outline-offset: 3px;
}
.has-accent-background-color :where(a, button, input, select, textarea):focus-visible,
.has-accent-strong-background-color :where(a, button, input, select, textarea):focus-visible { outline-color: var(--wp--preset--color--contrast); }

/* Titoli: le parole in corsivo diventano Playfair Display -------------------- */
:where(h1, h2, h3, .wp-block-heading, .nami-hero-title) em {
	font-family: var(--wp--preset--font-family--playfair);
	font-style: italic;
	font-weight: 400;
	letter-spacing: -0.01em;
}
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* Etichetta di sezione con lineetta (stile paragrafo "Etichetta") ---------- */
.is-style-eyebrow {
	font-size: 13px !important;
	font-weight: 600;
	letter-spacing: .08em;
	line-height: 1.4;
	text-transform: uppercase;
	display: flex;
	align-items: center;
	gap: 14px;
}
.is-style-eyebrow:not(.has-text-color) { color: var(--wp--preset--color--accent-ink); }
.is-style-eyebrow::before {
	content: "";
	flex: 0 0 36px;
	height: 1.5px;
	background: currentColor;
}
.is-style-eyebrow.has-text-align-center { justify-content: center; }

/* Logo testuale ------------------------------------------------------------ */
.nami-logo { margin: 0; line-height: 1; }
.nami-logo a {
	color: var(--wp--preset--color--contrast);
	font-weight: 700;
	font-size: 36px;
	letter-spacing: -0.03em;
	text-decoration: none;
}
.nami-logo a:hover { color: var(--wp--preset--color--contrast); }
.nami-wordmark {
	font-weight: 700;
	font-size: clamp(120px, 30vw, 440px);
	line-height: .78;
	letter-spacing: -0.035em;
	margin: 0 0 0 -0.04em !important;
	white-space: nowrap;
	overflow: hidden;
}

/* Header ------------------------------------------------------------------- */
.nami-header { border-bottom: var(--nami-line); min-height: 104px; }
.nami-header .wp-block-navigation__container { gap: 40px; }
.nami-header .wp-block-navigation-item__content { padding: 12px 0; }
.nami-header .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--accent-ink); }
.nami-header .current-menu-item > .wp-block-navigation-item__content,
.nami-header [aria-current="page"] { color: var(--wp--preset--color--accent-ink); }
.nami-header .wp-block-buttons .wp-block-button__link { padding: 14px 24px; font-size: 15px; }
@media (max-width: 999px) {
	.nami-header .nami-nav-inline, .nami-header .nami-header-cta { display: none !important; }
	.nami-header { min-height: 76px; }
	.nami-logo a { font-size: 30px; }
}

/* Menu a tutto schermo (core/navigation con overlay "sempre") --------------- */
.nami-nav-overlay .wp-block-navigation__responsive-container-open {
	width: 48px; height: 48px;
	border-radius: 999px;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
	display: inline-flex; align-items: center; justify-content: center;
	transition: transform var(--wp--custom--transition, 200ms ease);
}
.nami-nav-overlay .wp-block-navigation__responsive-container-open:hover { transform: scale(1.06); }
.nami-nav-overlay .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--base) !important;
	color: var(--wp--preset--color--contrast) !important;
	padding: 28px clamp(20px, 4.5vw, 64px) 56px;
}
.nami-nav-overlay .wp-block-navigation__responsive-container-close {
	top: 28px; right: clamp(20px, 4.5vw, 64px);
	width: 48px; height: 48px;
	border-radius: 999px;
	background: var(--wp--preset--color--accent);
	display: inline-flex; align-items: center; justify-content: center;
}
.nami-nav-overlay .is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: clamp(96px, 14vh, 160px) !important;
	align-items: flex-start !important;
}
.nami-nav-overlay .is-menu-open .wp-block-navigation__container {
	gap: 0 !important;
	align-items: flex-start !important;
}
.nami-nav-overlay .is-menu-open .wp-block-navigation-item__content {
	font-size: clamp(40px, 6vw, 64px) !important;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.08 !important;
	padding: 2px 0 !important;
	color: var(--wp--preset--color--contrast);
}
.nami-nav-overlay .is-menu-open .wp-block-navigation-item__content:hover,
.nami-nav-overlay .is-menu-open .wp-block-navigation-item:last-child .wp-block-navigation-item__content { color: var(--wp--preset--color--accent-ink); }

/* Pulsanti ----------------------------------------------------------------- */
.wp-block-button__link { transition: background-color var(--wp--custom--transition, 200ms ease), color var(--wp--custom--transition, 200ms ease), transform var(--wp--custom--transition, 200ms ease); }
.wp-block-button__link:active { transform: scale(.98); }
.wp-block-button.is-style-accent .wp-block-button__link {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
}
.wp-block-button.is-style-accent .wp-block-button__link:hover { background: #C9A96E; color: var(--wp--preset--color--contrast); }
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	border: 1.5px solid currentColor;
	color: var(--wp--preset--color--contrast);
	padding: 18.5px 30.5px;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--base); }
.wp-block-button.is-style-light .wp-block-button__link { background: var(--wp--preset--color--base); color: var(--wp--preset--color--contrast); }
.wp-block-button.is-style-light .wp-block-button__link:hover { background: var(--wp--preset--color--muted); }
.wp-block-button.is-style-underline .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--contrast);
	border-radius: 0;
	padding: 4px 0;
	border-bottom: 2px solid var(--wp--preset--color--accent);
}
.wp-block-button.is-style-underline .wp-block-button__link:hover { border-bottom-color: var(--wp--preset--color--contrast); }
.wp-block-button__link .nami-arrow, .wp-block-button__link svg { vertical-align: -3px; margin-left: 10px; }

/* Card --------------------------------------------------------------------- */
.is-style-card {
	background: var(--wp--preset--color--muted);
	border-radius: var(--nami-radius-card);
}
.is-style-card-s {
	background: var(--wp--preset--color--muted);
	border-radius: var(--nami-radius-card-s);
}
.nami-card-link { position: relative; transition: transform 250ms var(--nami-ease); }
.nami-card-link:hover { transform: translateY(-4px); }
.nami-card-link .nami-card-link__arrow a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.nami-circle-arrow {
	width: 52px; height: 52px; border-radius: 999px;
	background: var(--wp--preset--color--base);
	display: inline-flex; align-items: center; justify-content: center;
	flex: 0 0 auto;
}
.nami-circle-arrow a { color: var(--wp--preset--color--contrast); display: inline-flex; }

/* Chip (stile lista "Chip") ------------------------------------------------- */
.wp-block-list.is-style-chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.wp-block-list.is-style-chips li {
	border: 1.5px solid currentColor;
	border-radius: 999px;
	padding: 8px 18px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	margin: 0;
}

/* Riquadri tratteggiati per immagini mancanti ------------------------------ */
.nami-placeholder {
	background: repeating-linear-gradient(135deg, rgba(10,10,10,.06) 0 12px, rgba(10,10,10,.02) 12px 24px);
	border-radius: var(--nami-radius-card);
	display: flex; align-items: center; justify-content: center;
	color: var(--wp--preset--color--text-muted);
	font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
	text-align: center;
}
.wp-block-image.is-style-rounded-card img, .wp-block-cover.is-style-rounded-card { border-radius: var(--nami-radius-card); }

/* Righe elenco con linee (plus, consulenza) ---------------------------------- */
.nami-rows > * + * { margin-block-start: 0 !important; }
.nami-row { border-top: var(--nami-line); }
.nami-rows > .nami-row:last-child { border-bottom: var(--nami-line); }
.nami-row--soft { border-top: var(--nami-line-soft); }

/* Colonne con divisori verticali -------------------------------------------- */
@media (min-width: 782px) {
	.nami-divided > .wp-block-column + .wp-block-column { border-left: var(--nami-line-soft); padding-left: clamp(20px, 2.8vw, 40px); }
	.nami-divided > .wp-block-column:not(:last-child) { padding-right: clamp(20px, 2.8vw, 40px); }
	.nami-divided.wp-block-columns { gap: 0 !important; }
}

/* Griglie responsive -------------------------------------------------------- */
@media (max-width: 781px) {
	.wp-block-group.is-layout-grid { grid-template-columns: minmax(0, 1fr) !important; }
	.wp-block-group.is-layout-grid > * { grid-column: auto !important; grid-row: auto !important; }
	.nami-tall-card { min-height: 420px !important; }
	.nami-rows .wp-block-columns { gap: 8px !important; }
}
@media (min-width: 782px) and (max-width: 1100px) {
	.wp-block-group.is-layout-grid.nami-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* Indice divisioni (pagina Servizi) ------------------------------------------ */
.nami-index { border-top: var(--nami-line); border-bottom: var(--nami-line); }
.nami-index a { text-decoration: none; color: var(--wp--preset--color--contrast); display: block; }
.nami-index a:hover { color: var(--wp--preset--color--accent-ink); }
.nami-index .wp-block-column { padding-block: 24px; }
@media (min-width: 782px) {
	.nami-index.wp-block-columns { gap: 0 !important; }
	.nami-index .wp-block-column + .wp-block-column { border-left: var(--nami-line-soft); padding-left: 20px; }
}
@media (max-width: 781px) {
	.nami-index .wp-block-column { padding-block: 14px; border-bottom: var(--nami-line-soft); }
}

/* Titolo hero con parola che cambia (blocco nami/hero-rotating) -------------- */
.nami-hero-title {
	font-family: var(--wp--preset--font-family--arial);
	font-weight: 700;
	line-height: .92;
	letter-spacing: -0.03em;
	margin: 0;
}
.nami-hero-title .nami-rotator {
	display: inline-block;
	color: var(--wp--preset--color--accent-ink);
	will-change: transform, opacity;
}
.nami-hero-title .nami-rotator.is-in-a { animation: nami-rise-a .55s var(--nami-ease); }
.nami-hero-title .nami-rotator.is-in-b { animation: nami-rise-b .55s var(--nami-ease); }
.nami-hero-title .nami-rotator__bar {
	display: inline-block;
	width: .42em; height: .12em;
	margin-left: .06em;
	background: currentColor;
	vertical-align: baseline;
}
@keyframes nami-rise-a { from { transform: translateY(45%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes nami-rise-b { from { transform: translateY(45%); opacity: 0; } to { transform: none; opacity: 1; } }
.nami-rotator-toggle {
	position: absolute; left: -9999px;
	font: inherit; font-size: 13px;
	background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--base);
	border: 0; border-radius: 999px; padding: 8px 14px; cursor: pointer;
}
.nami-rotator-toggle:focus-visible { left: auto; position: relative; margin-top: 12px; }
@media (prefers-reduced-motion: reduce) {
	.nami-hero-title .nami-rotator { animation: none !important; }
}

/* Hero: righe e meta ---------------------------------------------------------- */
.nami-hero-meta { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--wp--preset--color--text-muted); }
.nami-hero-bottom { border-top: var(--nami-line); }
.nami-hero { min-height: min(900px, 100svh); }
@media (max-width: 781px) { .nami-hero { min-height: auto; } }

/* Testimonianze --------------------------------------------------------------- */
.nami-quote-mark { font-size: 56px; line-height: .6; font-weight: 700; color: var(--wp--preset--color--accent-ink); margin: 0 0 8px !important; }
.nami-testimonial { min-height: 300px; }

/* Moduli (Contact Form 7 e newsletter) --------------------------------------- */
.nami-form-card { background: var(--wp--preset--color--base); color: var(--wp--preset--color--contrast); border-radius: var(--nami-radius-card); padding: clamp(24px, 3vw, 44px); }
.nami-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 640px) { .nami-form-grid { grid-template-columns: minmax(0, 1fr); } }
.wpcf7 form, .nami-form { display: flex; flex-direction: column; gap: 18px; }
.wpcf7 label, .nami-form label { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; }
.wpcf7 .wpcf7-form-control-wrap { display: block; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 select, .wpcf7 textarea,
.nami-form input[type="email"], .nami-form input[type="text"] {
	width: 100%;
	box-sizing: border-box;
	min-height: 52px;
	border: 1.5px solid var(--wp--preset--color--contrast);
	border-radius: var(--nami-radius-field);
	padding: 0 16px;
	font: inherit; font-size: 16px; font-weight: 400;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}
.wpcf7 textarea { padding: 14px 16px; min-height: 140px; resize: vertical; }
.wpcf7 input:focus-visible, .wpcf7 select:focus-visible, .wpcf7 textarea:focus-visible, .nami-form input:focus-visible { outline: 2px solid var(--wp--preset--color--accent-ink); outline-offset: 2px; }
.wpcf7 .wpcf7-acceptance label, .nami-form .nami-check { flex-direction: row; align-items: flex-start; gap: 12px; font-weight: 400; color: var(--wp--preset--color--text-soft); line-height: 1.5; }
.wpcf7 .wpcf7-list-item { margin: 0; }
.wpcf7 input[type="checkbox"], .nami-form input[type="checkbox"] { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--wp--preset--color--contrast); flex: 0 0 auto; }
.wpcf7 .wpcf7-submit, .nami-form button {
	min-height: 60px;
	border: 0; border-radius: 999px;
	background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--base);
	font: inherit; font-size: 17px; font-weight: 600;
	padding: 0 32px; cursor: pointer;
	transition: background-color 200ms ease;
}
.wpcf7 .wpcf7-submit:hover, .nami-form button:hover { background: #2A2A2A; }
.wpcf7 .wpcf7-not-valid-tip { color: #B42318; font-size: 14px; margin-top: 6px; }
.wpcf7 .wpcf7-not-valid { border-color: #B42318 !important; }
.wpcf7 form .wpcf7-response-output { margin: 0; border-radius: var(--nami-radius-field); padding: 12px 16px; }
.wpcf7-spinner { margin: 0 0 0 12px; }

.nami-form.nami-newsletter { display: flex; flex-direction: row; gap: 10px; flex-wrap: wrap; align-items: center; max-width: 520px; }
.nami-newsletter input[type="email"] { flex: 1 1 240px; width: auto; border-radius: 999px; padding: 0 22px; min-height: 56px; }
.nami-newsletter button { min-height: 56px; background: var(--wp--preset--color--accent); color: var(--wp--preset--color--contrast); }
.nami-newsletter button:hover { background: #C9A96E; }
.nami-newsletter .nami-check { flex-basis: 100%; font-size: 13px; }
.nami-notice { font-size: 15px; padding: 10px 14px; border-radius: 12px; background: var(--wp--preset--color--muted); margin: 0 0 12px; }

/* Footer --------------------------------------------------------------------- */
.nami-footer a { color: var(--wp--preset--color--contrast); text-decoration: none; }
.nami-footer a:hover { color: var(--wp--preset--color--accent-ink); }
.nami-footer-bottom { border-top: var(--nami-line); }
.nami-footer .wp-block-navigation .wp-block-navigation-item__content { padding: 2px 0; }

/* Eventi (CPT) ------------------------------------------------------------------ */
.nami-event-card .wp-block-post-featured-image img { border-radius: var(--nami-radius-card-s); aspect-ratio: 4/3; object-fit: cover; }
.nami-event-card .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--contrast); }
.nami-event-card .wp-block-post-title a:hover { color: var(--wp--preset--color--accent-ink); }

/* Blog ---------------------------------------------------------------------------- */
.wp-block-post-content > * + h2 { margin-top: 1.6em; }
.wp-block-post-content h2 { font-size: var(--wp--preset--font-size--xx-large); }
.wp-block-query-pagination { font-weight: 600; }

/* Animazione di comparsa allo scroll (disattivata con reduced motion) -------- */
@media (prefers-reduced-motion: no-preference) {
	.nami-js .nami-reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--nami-ease), transform .7s var(--nami-ease); }
	.nami-js .nami-reveal.is-visible { opacity: 1; transform: none; }
}

/* Hero a tutta altezza --------------------------------------------------------- */
.nami-hero { display: flex; flex-direction: column; justify-content: space-between; min-height: min(796px, calc(100svh - 104px)); }
.nami-hero > * { width: 100%; }
.nami-hero-bottom { border-top: var(--nami-line); }
@media (max-width: 781px) { .nami-hero { min-height: calc(100svh - 76px); } }

/* Separatore di sezione ---------------------------------------------------------- */
.wp-block-separator.nami-hr { border: 0; border-top: 1px solid var(--wp--preset--color--contrast); opacity: 1; width: 100%; }
.wp-block-separator.nami-hr:first-child { margin-top: 0; }

/* Celle con linee (pagina Servizi) ------------------------------------------------ */
.nami-cells { border-top: var(--nami-line); }
.nami-cells > * { border-bottom: var(--nami-line-soft); padding: 26px 0; }
@media (min-width: 782px) {
	.nami-cells.is-layout-grid { gap: 0 !important; }
	.nami-cells > *:nth-child(odd) { padding-right: 24px; }
	.nami-cells > *:nth-child(even) { padding-left: 24px; border-left: var(--nami-line-soft); }
}
.nami-cells h3, .is-style-card-s h3 { font-size: 24px; margin: 0 0 6px; }
.nami-cells p, .is-style-card-s p { margin: 0; font-size: 16px; line-height: 1.55; }

/* Riquadri con bordo chiaro su fondo oro pieno --------------------------------------- */
.nami-outline-tile { border: 1.5px solid rgba(255, 255, 255, .6); border-radius: var(--nami-radius-card-s); padding: 22px 24px; }
.nami-outline-tile p { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.25; }

/* Metodo in 4 fasi --------------------------------------------------------------- */
.nami-gold-top { border-top: 2px solid var(--wp--preset--color--accent); }

/* Indice divisioni ---------------------------------------------------------------- */
.nami-index p { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.3; }
.nami-index mark { display: block; font-size: 13px; font-weight: 600; background: none; color: var(--wp--preset--color--accent-ink); margin-bottom: 4px; }
.nami-breadcrumb { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--wp--preset--color--text-muted); }
.nami-breadcrumb a { color: var(--wp--preset--color--text-muted); text-decoration: none; }
.nami-breadcrumb a:hover { color: var(--wp--preset--color--accent-ink); }

/* Numeri grandi ------------------------------------------------------------------ */
.nami-number { font-weight: 700; line-height: .9 !important; color: var(--wp--preset--color--accent-ink); margin: 0; }
.has-accent-background-color .nami-number, .has-accent-strong-background-color .nami-number { color: inherit; }
.nami-small-num { font-size: 13px; font-weight: 600; margin: 0; }

/* Link a tutto blocco nelle card ---------------------------------------------------- */
.nami-stretch { position: relative; }
.nami-stretch .nami-circle-arrow a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.nami-circle-arrow { margin: 0 !important; font-size: 22px; line-height: 1; }
.nami-circle-arrow a { width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.nami-contact-links a { text-decoration: none; }
.nami-contact-links a:hover { text-decoration: underline; }
.is-style-card h3 a, .is-style-card-s h3 a { color: inherit; text-decoration: none; }
.is-style-card h3 a:hover { color: var(--wp--preset--color--accent-ink); }
.nami-rows--soft { border-top: var(--nami-line); }
.nami-rows--soft > .nami-row { border-top: 0; border-bottom: var(--nami-line-soft); }
.nami-rows--soft > .nami-row:last-child { border-bottom: var(--nami-line-soft); }
.nami-row h3 { margin: 0; }
@media (max-width: 781px) { .nami-reverse-mobile { flex-direction: column-reverse; } }

/* Rifiniture mobile ------------------------------------------------------------- */
@media (max-width: 781px) {
	.nami-hero { min-height: auto; }
	.nami-grid-3 > .is-style-card { min-height: 220px !important; }
	.nami-grid-3 > .nami-tall-card { min-height: 360px !important; }
	.nami-testimonial { min-height: 0; }
	.nami-placeholder[style*="min-height"] { min-height: 220px !important; }
}
@media (max-width: 600px) {
	.nami-hero-bottom .wp-block-buttons, .nami-hero-bottom .wp-block-button { width: 100%; }
	.nami-hero-bottom .wp-block-button__link { width: 100%; box-sizing: border-box; text-align: center; }
	.nami-hero-meta p:last-child { display: none; }
}

/* Logo -------------------------------------------------------------------------- */
.nami-logo-img { margin: 0 !important; line-height: 0; }
.nami-logo-img img { display: block; height: auto; }
@media (max-width: 999px) { .nami-logo-img img { width: 150px !important; } }
.nami-logo-xl { margin-block: var(--wp--preset--spacing--40) 0 !important; }
.nami-logo-xl img { display: block; width: 100%; max-width: 820px; height: auto; }
