/*
Theme Name: DOes www
Description: Tema a blocchi di www.does.es.
Version: 0.1.0
Requires at least: 7.0
Requires PHP: 8.4
Text Domain: does-www
*/

:root {
	--does-red: #ad1519;
	--does-red-on-dark: #ef5257;
	--does-red-pressed: #8c1014;
	--does-yellow: #fabd00;
	--does-radius-button: 999px;
	--does-radius-card: 20px;
	--does-radius-field: 12px;
	--does-header-h: 72px;
	--does-ease: cubic-bezier(.2, .7, .2, 1);
	--does-dur-fast: 200ms;
	--does-dur-base: 400ms;
	--does-dur-reveal: 600ms;
	--does-reveal-shift: 16px;
	--does-stagger: 60ms;

	--gut: clamp(24px, 5.6vw, 80px);
	--nav-h: var(--does-header-h);
	--sec-h: 0px;
	--nav: calc(var(--nav-h) + var(--sec-h));
	--ground: var(--wp--preset--color--ground);
	--surface: var(--wp--preset--color--surface);
	--raised: var(--wp--preset--color--raised);
	--line: var(--wp--preset--color--line);
	--ink: var(--wp--preset--color--ink);
	--muted: var(--wp--preset--color--muted);
	--accent: var(--does-red);
	--accent-bright: var(--does-red-on-dark);
	--mono: var(--wp--preset--font-family--mono);
	--r-card: var(--does-radius-card);
	--ease: var(--does-ease);
}

html { scroll-padding-top: var(--nav); }
:root:has(.secnav) { --sec-h: 44px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; -webkit-font-smoothing: antialiased; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
.page-main > * + *, .page-main { margin-block-start: 0; }
::selection { background: var(--accent); color: #fff; }
a { text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; }

/* Contenitore e schermate */
.wrap { width: min(100% - 2 * var(--gut), 1280px); margin-inline: auto; }
.screen { box-sizing: border-box; padding: 160px 0; }
.hero { position: relative; isolation: isolate; min-height: 100svh; padding: calc(var(--nav) + 48px) 0 64px; display: flex; flex-direction: column; }
.cards > *, .process > *, .split > *, .hero__grid > *, .stack > * { margin-block-start: 0 !important; }
.screen > .wrap { position: relative; z-index: 1; }
.screen--surface { background: var(--surface); }
.screen h2 { max-width: 16ch; margin: 0; }
.intro { color: var(--muted); font-size: var(--wp--preset--font-size--lead); line-height: 1.5; max-width: 44ch; margin: 20px 0 0; }

/* Intestazione */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; }
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }
.nav { height: var(--nav-h); background: rgba(11, 11, 13, .92); border-bottom: 1px solid var(--line); }
.nav__wrap { width: min(100% - 2 * var(--gut), 1280px); margin-inline: auto; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav__logo { display: block; flex-shrink: 0; }
.nav__logo img { display: block; height: 40px; width: auto; }
.nav__menu { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav__menu > a:not(.btn) { color: var(--ink); text-decoration: none; position: relative; }
.nav__menu > a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav__menu > a:not(.btn):hover::after { transform: scaleX(1); }
.nav__langs { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: var(--does-radius-button); }
.nav__langs a { color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 500; padding: 4px 9px; border-radius: var(--does-radius-button); transition: color var(--does-dur-fast), background var(--does-dur-fast); }
.nav__langs a:hover { color: var(--ink); }
.nav__langs a[aria-current] { background: var(--raised); color: var(--ink); }
.nav__toggle, .nav__burger { display: none; }
.nav__drop { position: relative; }
.nav__drop summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; color: var(--ink); }
.nav__drop summary::-webkit-details-marker { display: none; }
.nav__drop summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform var(--does-dur-fast) var(--ease); }
.nav__drop[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.nav__panel { position: absolute; top: calc(100% + 22px); left: -14px; min-width: 240px; display: flex; flex-direction: column; padding: 8px; background: var(--raised); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.nav__panel a { color: var(--ink); text-decoration: none; padding: 10px 12px; border-radius: 8px; white-space: nowrap; transition: background var(--does-dur-fast); }
.nav__panel a:hover { background: rgba(255, 255, 255, .06); }

/* Barra delle sezioni della pagina */
.secnav { box-sizing: border-box; height: var(--sec-h); background: rgba(11, 11, 13, .92); border-bottom: 1px solid var(--line); }
.secnav__wrap { width: min(100% - 2 * var(--gut), 1280px); margin-inline: auto; height: 100%; display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; }
.secnav__wrap::-webkit-scrollbar { display: none; }
.secnav a { position: relative; display: flex; align-items: center; flex-shrink: 0; color: var(--muted); font-size: 14px; text-decoration: none; white-space: nowrap; transition: color var(--does-dur-fast); }
.secnav a:hover, .secnav a[aria-current] { color: var(--ink); }
.secnav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent-bright); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.secnav a[aria-current]::after { transform: scaleX(1); }

/* Bottoni */
.btn, .wp-block-button__link { transition: transform var(--does-dur-fast) var(--ease), background-color var(--does-dur-fast), border-color var(--does-dur-fast), color var(--does-dur-fast); }
.btn { display: inline-flex; align-items: center; text-decoration: none; font-weight: 500; border-radius: var(--does-radius-button); }
.btn--primary { background: var(--accent); color: #fff; padding: 10px 18px; font-size: 14px; }
.btn--primary:hover, .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { background: #c41a1f; transform: translateY(-1px); }
.btn:active, .wp-block-button__link:active { transform: translateY(1px) scale(.99); }
.wp-block-buttons { gap: 12px; margin-top: 36px; }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--ink); border: 1px solid #3a3a42; padding: calc(.875rem - 1px) calc(1.5rem - 1px); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { border-color: var(--ink); transform: translateY(-1px); }

/* Hero */
.hero { background:
	radial-gradient(60% 55% at 78% 40%, rgba(173, 21, 25, .16), transparent 70%),
	linear-gradient(to right, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 80px 80px,
	linear-gradient(to bottom, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 80px 80px,
	var(--ground); }
.hero__grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: center; flex: 1; }
.hero__text { grid-column: 1 / span 6; }
.hero h1 { margin: 0; }
.hl { background: none; color: var(--accent-bright); }
.lead { font-size: var(--wp--preset--font-size--lead); line-height: 1.5; color: #cfcfd4; max-width: 40ch; margin: 28px 0 0; }
.byline { color: var(--muted); font-size: 14px; margin: 28px 0 0; }

/* Sfondo della home */
.home .hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(42% 48% at 74% 30%, rgba(173, 21, 25, .34), transparent 72%); }
.home .hero::after, .hero__video {
	position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none;
	mix-blend-mode: screen; opacity: .85; object-fit: cover;
	-webkit-mask-image: linear-gradient(to right, transparent 10%, #000 50%);
	mask-image: linear-gradient(to right, transparent 10%, #000 50%);
}
.hero > .hero__video { margin: 0; }
.home .hero::after { content: ""; background: var(--hero-poster) center / cover no-repeat; }
.home .hero.is-playing::after { opacity: 0; }

/* Comparsa dei blocchi sotto la prima schermata */
.js [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(var(--does-reveal-shift)); transition: none; }
.js [data-reveal].is-revealing {
	transition: opacity var(--does-dur-reveal) var(--does-ease), transform var(--does-dur-reveal) var(--does-ease);
	transition-delay: calc(var(--reveal-index, 0) * var(--does-stagger));
}
@keyframes hero-in {
	from { opacity: 0; transform: translateY(var(--does-reveal-shift)); }
	to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
	.hero__text > *, .hero__grid > :last-child:not(.hero__text) { animation: hero-in var(--does-dur-reveal) var(--does-ease) both; }
	.hero__text > :nth-child(2) { animation-delay: var(--does-stagger); }
	.hero__text > :nth-child(3) { animation-delay: calc(2 * var(--does-stagger)); }
	.hero__text > :nth-child(4) { animation-delay: calc(3 * var(--does-stagger)); }
	.hero__text > :nth-child(n+5) { animation-delay: calc(4 * var(--does-stagger)); }
	.hero__grid > :last-child:not(.hero__text) { animation-delay: calc(5 * var(--does-stagger)); }
}
@media (max-width: 639px) {
	.home .hero::after, .hero__video {
		top: 48%; height: 52%; opacity: .6;
		-webkit-mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
		mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
	}
}
@media (prefers-reduced-motion: reduce) {
	.js [data-reveal]:not(.is-in) { opacity: 1; transform: none; }
	.hero__video { display: none; }
	.home .hero.is-playing::after { opacity: .85; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 639px) { .home .hero.is-playing::after { opacity: .6; } }
@media print {
	.js [data-reveal]:not(.is-in), .hero__text > *, .hero__grid > :last-child:not(.hero__text) { opacity: 1; transform: none; animation: none; transition: none; }
	.hero__video { display: none; }
}

/* Finestra del flusso */
.flow { grid-column: 8 / span 5; background: #121215; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.02) inset; overflow: hidden; font-family: var(--mono); }
.flow__bar { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.flow__dots { display: flex; gap: 6px; }
.flow__dots i { width: 10px; height: 10px; border-radius: 50%; background: #2f2f36; }
.flow__title { color: var(--muted); font-size: 12px; flex: 1; }
.flow__rows { list-style: none; margin: 0; padding: 10px; display: grid; gap: 6px; }
.flow__row { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 12px; border: 1px solid transparent; transition: background .35s, border-color .35s, opacity .35s; opacity: .45; }
.flow__row b { display: block; font-family: var(--wp--preset--font-family--sans); font-weight: 500; font-size: 15px; color: var(--ink); }
.flow__row code { display: block; font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-top: 3px; background: none; }
.flow__row > span:nth-child(2) { flex: 1; min-width: 0; }
.flow__st { width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; border: 2px solid #3a3a42; box-sizing: border-box; position: relative; transition: border-color .3s, background .3s; }
.flow__row.is-done { opacity: 1; }
.flow__row.is-done .flow__st { background: #16a34a; border-color: #16a34a; }
.flow__row.is-done .flow__st::after { content: ""; position: absolute; left: 6px; top: 3px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.flow__row.is-work { opacity: 1; background: #1a1a1e; border-color: var(--line); }
.flow__row.is-work .flow__st { border-color: var(--accent-bright) transparent var(--accent-bright) var(--accent-bright); animation: spin .8s linear infinite; }
.flow:has([data-pause][aria-pressed="true"]) .flow__st { animation-play-state: paused; }
.flow__send { font-family: var(--wp--preset--font-family--sans); font-size: 13px; font-weight: 500; padding: 7px 14px; border-radius: var(--does-radius-button); background: var(--accent); color: #fff; opacity: 0; transition: opacity .3s; }
.flow__row.is-work .flow__send, .flow__row.is-done .flow__send { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Pausa delle animazioni */
.flow__pause, .bot__pause { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: transparent; cursor: pointer; position: relative; padding: 0; color: var(--muted); }
.flow__pause::before, .bot__pause::before { content: ""; position: absolute; left: 9px; top: 8px; width: 3px; height: 10px; background: currentColor; box-shadow: 6px 0 0 currentColor; }
[aria-pressed="true"].flow__pause::before, [aria-pressed="true"].bot__pause::before { left: 10px; top: 8px; width: 0; height: 0; background: none; box-shadow: none; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; }
.flow__pause:hover, .bot__pause:hover { color: var(--ink); border-color: #3a3a42; }

/* Card dei servizi */
.cards { display: grid; gap: 24px; margin-top: 56px; }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-card); padding: 32px 28px; display: flex; flex-direction: column; transition: transform .25s var(--ease), border-color .25s; }
.card:hover { transform: translateY(-2px); border-color: #3a3a42; }
.card > * { margin: 0; }
.card__n { font-family: var(--mono); font-size: 13px; color: var(--accent-bright); }
.card h3 { margin-top: 48px; }
.card h3 + p { color: var(--muted); margin-top: 12px; }
.card__link { margin-top: auto; padding-top: 32px; font-weight: 500; }
.card__link a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .25s var(--ease); padding-bottom: 2px; }
.card__link a::after { content: " →"; }
.card:hover .card__link a { background-size: 100% 1px; }

/* Split: testo a sinistra, visual a destra */
.split { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: start; }
.split__text { grid-column: 1 / span 5; }
.split > :last-child:not(.split__text) { grid-column: 7 / span 6; }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 36px 0 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: flex; align-items: center; gap: 14px; font-size: 18px; }
.steps li::before { content: counter(s); font-family: var(--mono); font-size: 13px; color: var(--accent-bright); width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }

/* Robottino Factulia */
.bot { position: relative; background: radial-gradient(70% 70% at 40% 45%, #111a33, #0e0f14 70%); border: 1px solid var(--line); border-radius: 24px; aspect-ratio: 540 / 440; display: grid; grid-template-columns: 54fr 46fr; place-items: center; padding: 0 5% 0 2%; overflow: hidden; container-type: inline-size; }
.bot__pause { position: absolute; right: 16px; bottom: 16px; z-index: 2; }
.bot__robot { position: relative; width: 100%; aspect-ratio: 3 / 4; }
.bot__video { position: absolute; inset: 0; width: 100%; height: 100%; }
.bot__chips { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 5.5cqw; }
.bot__chip { display: flex; align-items: center; justify-content: space-between; gap: 2cqw; height: 8.2cqw; padding: 0 2.2cqw 0 3.7cqw; border: 1px solid #2b2b31; border-radius: 99px; background: #151518; color: #f3f2ef; font-family: var(--mono); font-size: max(13px, 2.8cqw); white-space: nowrap; opacity: 0; transform: translateX(-8px); transition: opacity var(--does-dur-base), transform var(--does-dur-base) var(--ease); }
.bot__chip svg { width: 3.7cqw; height: 3.7cqw; flex-shrink: 0; }
.bot.is-read .bot__chip { opacity: 1; transform: none; }
.bot.is-read .bot__chip:nth-child(2) { transition-delay: .25s; }
.bot.is-read .bot__chip:nth-child(3) { transition-delay: .5s; }

/* Metodo */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 64px; }
.process__step { border-top: 1px solid var(--line); padding-top: 28px; }
.process__step > * { margin: 0; }
.process__n { font-size: 56px; line-height: 1; letter-spacing: -0.04em; color: var(--accent-bright); font-weight: 500; }
.process__step h3 { margin-top: 40px; }
.process__step h3 + p { color: var(--muted); margin-top: 12px; }

/* Tecnologie */
.stack { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stack li { background: var(--raised); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; font-family: var(--mono); font-size: 14px; }
.stack li::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-bright); margin-right: 12px; vertical-align: 1px; }

/* Chiusura */
.close { background: radial-gradient(50% 80% at 85% 100%, rgba(173, 21, 25, .22), transparent 70%), var(--ground); padding: 200px 0; }
.close h2 { max-width: 18ch; }

/* Piè di pagina */
.foot { border-top: 1px solid var(--line); background: var(--ground); padding: 64px 0 32px; font-size: 15px; }
.foot__wrap { width: min(100% - 2 * var(--gut), 1280px); margin-inline: auto; }
.foot__cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.foot__cols > div { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.foot__cols p { margin: 0; color: var(--muted); }
.foot__cols a { color: var(--ink); text-decoration: none; }
.foot__cols a:hover { text-decoration: underline; }
.foot__h { font-size: 13px; color: var(--muted); margin-bottom: 6px !important; }
.foot__logo { height: 36px; width: auto; margin-bottom: 12px; }
.foot__legal { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--muted); font-size: 13px; }
.foot__legal a { color: var(--muted); text-decoration: none; }
.foot__legal a:hover, .foot__legal a[aria-current] { color: var(--ink); }
.foot__langs { margin-left: auto; display: flex; gap: 16px; }

/* Pagine interne */
.hero--page { min-height: 0; padding: calc(var(--nav) + 120px) 0 120px; }
.hero__side { grid-column: 8 / span 5; }
.hero--book .cards { margin-top: 64px; }
.hero--book .byline { margin-top: 40px; }
.hero--book .byline a { color: var(--ink); }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
/* cinque schede: la seconda riga centrata, stessa larghezza */
.cards--3:has(> :nth-child(5):last-child) { grid-template-columns: repeat(6, 1fr); }
.cards--3:has(> :nth-child(5):last-child) > * { grid-column: span 2; }
.cards--3:has(> :nth-child(5):last-child) > :nth-child(4) { grid-column: 2 / span 2; }
.cards--2 { grid-template-columns: repeat(2, 1fr); }
.card--book .wp-block-buttons { margin-top: auto; padding-top: 32px; }
.prices { list-style: none; padding: 0; margin: 28px 0 0 !important; border-top: 1px solid var(--line); }
.prices li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; font-size: 16px; border-bottom: 1px solid var(--line); }

/* Cronologia */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; }
.timeline li { display: grid; grid-template-columns: 120px 1fr; column-gap: 24px; padding: 24px 0; border-top: 1px solid var(--line); color: var(--muted); }
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline__y { grid-row: span 2; font-family: var(--mono); font-size: 13px; color: var(--accent-bright); padding-top: 4px; }
.timeline strong { display: block; color: var(--ink); font-weight: 500; font-size: 18px; margin-bottom: 6px; }

/* Pagine legali */
.legal { padding: calc(var(--nav) + 96px) 0 120px; }
.legal .wrap > * { max-width: 72ch; margin: 16px 0 0; }
.legal .wrap > .wp-block-table { max-width: none; }
.legal h1 { font-size: var(--wp--preset--font-size--title); margin: 0; }
.legal .byline { margin: 16px 0 40px; }
.legal h2 { font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1.25; margin-top: 56px; }
.legal h3 { margin-top: 40px; }
.legal p, .legal li { color: #cfcfd4; }
.legal ul { padding-left: 1.25em; }
.legal a { color: var(--ink); }
.legal .wp-block-table { margin-top: 24px; overflow-x: auto; }
.legal table { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 14px; line-height: 1.5; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 12px 16px 12px 0; border: 0; border-bottom: 1px solid var(--line); }
.legal th { color: var(--ink); font-weight: 500; }
.legal td { color: #cfcfd4; }
.legal__todo { font-family: var(--mono); font-size: .85em; color: var(--accent-bright); }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Tablet */
@media (max-width: 1023px) {
	.hero__grid, .split { grid-template-columns: 1fr; row-gap: 48px; }
	.hero__text, .flow, .hero__side, .split__text, .split > :last-child:not(.split__text) { grid-column: 1 / -1; }
	.cards--3 { grid-template-columns: repeat(2, 1fr); }
	.cards--3:has(> :nth-child(5):last-child) { grid-template-columns: repeat(4, 1fr); }
	.cards--3:has(> :nth-child(5):last-child) > :nth-child(4) { grid-column: span 2; }
	.cards--3:has(> :nth-child(5):last-child) > :nth-child(5) { grid-column: 2 / span 2; }
	.hero--page { padding: calc(var(--nav) + 80px) 0 96px; }
	.flow { max-width: 560px; }
	.cards--4, .process { grid-template-columns: repeat(2, 1fr); }
	.nav__burger { display: block; width: 40px; height: 40px; position: relative; cursor: pointer; }
	.nav__burger span:last-child, .nav__burger span:last-child::before, .nav__burger span:last-child::after { position: absolute; left: 9px; width: 22px; height: 2px; background: var(--ink); transition: transform .25s; }
	.nav__burger span:last-child { top: 19px; }
	.nav__burger span:last-child::before, .nav__burger span:last-child::after { content: ""; left: 0; }
	.nav__burger span:last-child::before { top: -7px; }
	.nav__burger span:last-child::after { top: 7px; }
	.nav__menu { position: fixed; inset: var(--nav-h) 0 0; background: var(--ground); flex-direction: column; align-items: flex-start; padding: 32px var(--gut); gap: 24px; font-size: 22px; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity var(--does-dur-fast), transform var(--does-dur-fast), visibility 0s var(--does-dur-fast); }
	.nav__toggle:checked ~ .nav__menu { opacity: 1; transform: none; visibility: visible; transition: opacity var(--does-dur-fast), transform var(--does-dur-fast); }
	.nav__toggle:checked + .nav__burger span:last-child { background: transparent; }
	.nav__toggle:checked + .nav__burger span:last-child::before { transform: translateY(7px) rotate(45deg); }
	.nav__toggle:checked + .nav__burger span:last-child::after { transform: translateY(-7px) rotate(-45deg); }
	.nav__cta { font-size: 16px; padding: 14px 22px; }
	.nav__panel { position: static; min-width: 0; padding: 8px 0 0 16px; background: none; border: 0; box-shadow: none; font-size: 18px; }
	.nav__panel a { padding: 8px 0; }
	.nav__panel a:hover { background: none; color: var(--accent-bright); }
	.site-header:has(.nav__toggle:checked) .secnav { visibility: hidden; }
}

/* Telefono */
@media (max-width: 639px) {
	.bot { aspect-ratio: auto; grid-template-columns: 1fr; gap: 16px; padding: 20px 20px 60px; }
	.bot__robot { width: 64%; }
	.bot__chips { gap: 8px; }
	.bot__chip { height: 38px; padding: 0 10px 0 16px; font-size: 13px; }
	.bot__chip svg { width: 18px; height: 18px; }
	.screen { padding: 96px 0; }
	.hero { padding: calc(var(--nav) + 32px) 0 48px; }
	.close { padding: 120px 0; }
	.cards--4, .cards--3, .cards--3:has(> :nth-child(5):last-child), .cards--2, .process, .foot__cols { grid-template-columns: 1fr; }
	.cards--3:has(> :nth-child(5):last-child) > * { grid-column: auto !important; }
	.hero--page { padding: calc(var(--nav) + 48px) 0 72px; }
	.timeline li { grid-template-columns: 1fr; }
	.timeline__y { grid-row: auto; margin-bottom: 8px; }
	.stack { grid-template-columns: 1fr 1fr; }
	.stack li { padding: 14px; font-size: 13px; }
	.wp-block-buttons { flex-direction: column; align-items: stretch; }
	.wp-block-button { width: 100%; }
	.wp-block-button__link { width: 100%; box-sizing: border-box; text-align: center; }
	.flow__row code { white-space: normal; }
	.foot__langs { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.bot__chip { opacity: 1; transform: none; }
}

/* Schermate nelle schede dei servizi: pannello, palco e posizioni dal kit tasteskill (assets/ui/cards.css, ridotto) */
.card:has(> .panel) {
	--card: var(--raised); --font-text: var(--wp--preset--font-family--sans); --font-mono: var(--mono); --accent-ink: #fff;
	position: relative; overflow: clip;
}
.card > .panel {
	--p-h: 352px;
	position: relative; isolation: isolate; overflow: clip; flex: 1 0 auto; min-height: var(--p-h);
	margin: 32px 0 -33px; border-radius: 12px 12px 0 0;
	background-color: var(--g-bg);
	background-image:
		radial-gradient(70% 90% at 12% 0%, color-mix(in oklab, var(--g-s) 92%, white), transparent 70%),
		radial-gradient(60% 80% at 100% 100%, color-mix(in oklab, var(--g-a) 34%, var(--g-bg)), transparent 72%),
		radial-gradient(50% 60% at 85% 10%, color-mix(in oklab, var(--g-s) 60%, transparent), transparent 70%);
}
.panel--sand { --g-bg: #d9ccb7; --g-s: #e9e0d2; --g-a: #a8794a; }
.panel--sky { --g-bg: #c6d3df; --g-s: #d6e0e9; --g-a: #3f6a92; }
.panel--sage { --g-bg: #cdd6c6; --g-s: #dce3d6; --g-a: #6c8e63; }
.card > .panel::after {
	content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none; border-radius: inherit;
	box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ink) 7%, transparent), inset 0 1px 0 color-mix(in oklab, var(--ink) 4%, transparent);
}
.card .card__link { padding-top: 24px; }
/* righe allineate fra le schede: numero, titolo, testo, link e pannello partono alla stessa altezza */
.cards:has(.panel) { grid-auto-rows: auto; }
.card:has(> .panel) { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; }
.card:has(> .panel) h3 { margin-top: 12px; }
.cards:has(.panel) { margin-top: 48px; }
.card:has(> .panel) .card__link { padding-top: 20px; }

.panel > .stage {
	position: absolute; inset: 0; z-index: 1; --fade-h: 64px;
	--ui-font: var(--font-text); --ui-mono: var(--font-mono); --ui-radius: 12px;
	--fx-bg: oklch(from var(--card) clamp(calc(l + 0.05), calc((l - 0.5) * 1000), 1) calc(c * 0.5) h);
	--fx-surface: var(--card); --fx-ink: var(--ink); --fx-muted: var(--muted);
	--fx-accent: var(--accent-bright); --fx-accent-ink: var(--accent-ink);
}
/* il font del sito con le cifre tabellari allarga virgole e punti */
.panel > .stage .ui { font-feature-settings: normal; }
/* fattura: la nota sta sotto le righe, non sopra */
.schermata-doc { --fade-h: 44px; }
.schermata-doc .ui-doc { width: 100%; padding-right: 0; }
.schermata-doc .ui-doc__note { top: 176px !important; right: 20px; width: auto; left: 20px; }

.stage > * { position: absolute; max-width: none; }
@media (min-width: 640px) { .stage > * > [data-ui] { max-width: none; } }
.stage--fade-b { -webkit-mask: linear-gradient(to bottom, #000 calc(100% - var(--fade-h)), transparent calc(100% - 4px)); mask: linear-gradient(to bottom, #000 calc(100% - var(--fade-h)), transparent calc(100% - 4px)); }
.stage--fade-br {
	-webkit-mask: linear-gradient(to bottom, #000 calc(100% - var(--fade-h)), transparent calc(100% - 4px)), linear-gradient(to right, #000 calc(100% - 72px), transparent calc(100% - 4px));
	-webkit-mask-composite: source-in;
	mask: linear-gradient(to bottom, #000 calc(100% - var(--fade-h)), transparent calc(100% - 4px)), linear-gradient(to right, #000 calc(100% - 72px), transparent calc(100% - 4px));
	mask-composite: intersect;
}
.at-corner { left: var(--ax, 32px); top: var(--ay, 32px); }
.at-rise { left: var(--ax, 18%); top: var(--ay, 48px); }
.stage > .to-edge { bottom: -72px; }
.stage > .to-edge > [data-ui] { height: 100%; }
.stage > .fit { right: var(--ax, 32px); }
.stage > .fit > [data-ui] { width: 100%; max-width: var(--fit-max, 100%); margin-inline: auto; }
.stage > .wide { width: max(var(--w, 680px), 100% - var(--ax, 32px) + 64px); }
.stage > .wide > [data-ui] { width: 100%; max-width: none; }
@media (max-width: 639px) {
	.stage > :is(.at-corner, .at-rise) { left: 16px; right: 16px; top: 24px; max-width: none; }
	.stage > :is(.at-corner, .at-rise) > [data-ui] { max-width: 100%; }
	.stage > .wide { width: auto; }
	.stage--fade-br { -webkit-mask: linear-gradient(to bottom, #000 calc(100% - 56px), transparent calc(100% - 4px)); mask: linear-gradient(to bottom, #000 calc(100% - 56px), transparent calc(100% - 4px)); }
}

/* Pagina Flechas: screenshot del telefono e lista con le spunte */
.phone { margin: 0; justify-self: center; }
.phone img { display: block; margin-inline: auto; width: min(100%, 300px); height: auto; border-radius: 36px; border: 1px solid var(--line); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7); }
.ticks { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 14px; max-width: 46ch; }
.ticks li { position: relative; padding-left: 30px; font-size: 18px; line-height: 1.5; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .45em; width: 14px; height: 8px; border-left: 2px solid var(--accent-bright); border-bottom: 2px solid var(--accent-bright); transform: rotate(-45deg); }
.split__text > p + .stack, .split__text > .stack { margin-top: 32px; }
.split__text > .wp-block-buttons { margin-top: 32px; }

/* Video di presentazione: finestra sopra la pagina, aperta dal pulsante della home */
.wp-block-button__link[data-video]::before {
	content: ""; display: inline-block; width: 0; height: 0; margin-right: 10px; vertical-align: -1px;
	border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor;
}
.video {
	width: min(1100px, 100vw - 32px); max-width: none; max-height: none; padding: 0; border: 0; overflow: visible;
	background: transparent; color: var(--ink);
}
.video::backdrop { background: rgb(5 5 7 / .86); }
.video video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; background: #000; }
.video__voz { margin: 12px 0 0; font-size: .875rem; color: var(--muted); text-align: center; }
.video__close {
	position: absolute; top: -48px; right: 0; width: 40px; height: 40px; padding: 0; border: 1px solid #3a3a42; border-radius: 50%;
	background: var(--surface); color: var(--ink); cursor: pointer; display: grid; place-items: center;
	transition: border-color var(--does-dur-fast), transform var(--does-dur-fast) var(--ease);
}
.video__close:hover { border-color: var(--ink); transform: translateY(-1px); }
.video__close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* Sobre mí: escena del taller, imagen generada con IA */
.taller { padding-top: 0; }
.scene { margin: 0 0 96px; }
.scene img { display: block; box-sizing: border-box; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.scene figcaption { margin-top: 12px; font-size: .875rem; color: var(--muted); }
.taller__text p { margin: 0; max-width: 62ch; font-size: 18px; line-height: 1.6; }
.taller__text p + p { margin-top: 20px; }
@media (max-width: 639px) { .scene { margin-bottom: 56px; } }
