/*
Theme Name: Dekkosoft
Theme URI: https://dekkosoft.it
Author: Dekkosoft di Michele Laccone
Description: Tema a blocchi del sito Dekkosoft. I contenuti (Prodotti, Lavori) stanno nel plugin Dekkosoft Core.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: dekkosoft
*/

/* Modalità scura automatica: rimappa i colori della palette. */
@media (prefers-color-scheme: dark) {
	:root:root {
		--wp--preset--color--sfondo: #121214;
		--wp--preset--color--superficie: #1c1c20;
		--wp--preset--color--bordo: #2f2f36;
		--wp--preset--color--testo: #f1f0ed;
		--wp--preset--color--tenue: #a9a9b2;
		--wp--preset--color--grafite: #d8d8dc;
		--wp--preset--color--rosso: #e8483f;
		--wp--preset--color--rosso-scuro: #c8302b;
		--wp--preset--color--notte: #0b0b0d;
		--wp--preset--color--su-notte: #f1f0ed;
		color-scheme: dark;
	}
	.dk-stato--disponibile { color: #5fd08f !important; }
	.dk-store { border-color: #3a3a40 !important; }
}

::selection { background: color-mix(in srgb, var(--wp--preset--color--rosso) 25%, transparent); }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { text-decoration-thickness: 1.5px; text-underline-offset: 0.18em; text-decoration-color: color-mix(in srgb, var(--wp--preset--color--rosso) 60%, transparent); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--wp--preset--color--rosso); outline-offset: 3px; border-radius: 4px; }

/* Logo */
.dk-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.dk-logo svg { width: 34px; height: auto; flex: none; }
.dk-logo__nome { font-weight: 950; font-size: 1.35rem; letter-spacing: 0.01em; line-height: 1; }
.dk-logo__nome b { color: var(--wp--preset--color--rosso); font-weight: inherit; }
.dk-logo__nome span { color: var(--wp--preset--color--grafite); }
.dk-mascotte .grafite { fill: var(--wp--preset--color--grafite); }
.dk-mascotte .rosso { fill: var(--wp--preset--color--rosso); }
.dk-mascotte .raggi { stroke: var(--wp--preset--color--rosso); }
.dk-mascotte .bianco { fill: #fff; }
.dk-logo:hover .raggi path { animation: dk-lampo 0.6s ease; }
@keyframes dk-lampo { 50% { opacity: 0.2; } }

/* Intestazione */
.dk-header { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); background: color-mix(in srgb, var(--wp--preset--color--sfondo) 82%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--bordo) 70%, transparent); }
.admin-bar .dk-header { top: var(--wp-admin--admin-bar--height, 32px); }
.dk-header .wp-block-navigation a { text-decoration: none; }
.dk-header .wp-block-navigation-item.current-menu-item > a,
.dk-header .wp-block-navigation a[aria-current="page"] { color: var(--wp--preset--color--rosso); }
.dk-header .dk-nav-cta a { background: var(--wp--preset--color--testo); color: var(--wp--preset--color--sfondo) !important; padding: 0.5em 1.1em !important; border-radius: 999px; }
.dk-header .dk-nav-cta a:hover { background: var(--wp--preset--color--rosso); }
.wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--sfondo) !important; color: var(--wp--preset--color--testo) !important; }

/* Hero della home */
.dk-hero { position: relative; overflow: hidden; }
.dk-hero::before {
	content: ""; position: absolute; inset: -30% -10% auto auto; width: 60vw; height: 60vw; max-width: 760px; max-height: 760px;
	background: radial-gradient(closest-side, color-mix(in srgb, var(--wp--preset--color--rosso) 16%, transparent), transparent 70%);
	pointer-events: none;
}
.dk-hero h1 { max-width: 14ch; }
.dk-hero h1 em { font-style: normal; color: var(--wp--preset--color--rosso); }
.dk-hero__mascotte { display: grid; place-items: center; }
.dk-hero__mascotte svg { width: min(100%, 320px); height: auto; animation: dk-galleggia 6s ease-in-out infinite; filter: drop-shadow(0 30px 30px rgb(0 0 0 / 0.12)); }
@keyframes dk-galleggia { 50% { transform: translateY(-12px) rotate(-1.5deg); } }
@media (prefers-reduced-motion: reduce) { .dk-hero__mascotte svg { animation: none; } }
.dk-sopratitolo-blocco { font-size: 0.8rem; font-weight: 850; letter-spacing: 0.1em; text-transform: uppercase; color: var(--wp--preset--color--rosso); }
.dk-numeri { display: flex; flex-wrap: wrap; gap: 12px 36px; }
.dk-numeri strong { display: block; font-size: 1.8rem; font-weight: 900; line-height: 1; }
.dk-numeri span { color: var(--wp--preset--color--tenue); font-size: 0.9rem; }

/* Schede servizi */
.dk-servizio { border-radius: 18px; border: 1px solid var(--wp--preset--color--bordo); background: var(--wp--preset--color--sfondo); height: 100%; box-sizing: border-box; }
.dk-servizio h3 { display: flex; align-items: center; gap: 10px; }
.dk-servizio h3::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--wp--preset--color--rosso); flex: none; }
.dk-servizio p { color: var(--wp--preset--color--tenue); }

/* Fascia finale */
.dk-fascia { border-radius: 28px; position: relative; overflow: hidden; }
.dk-fascia::after {
	content: ""; position: absolute; right: -60px; bottom: -80px; width: 280px; height: 280px; border-radius: 60px;
	border: 34px solid color-mix(in srgb, var(--wp--preset--color--rosso) 55%, transparent); transform: rotate(12deg); pointer-events: none;
}
.dk-fascia .wp-block-button__link { background: #fff; color: #1e1e21; }
.dk-fascia .wp-block-button__link:hover { background: var(--wp--preset--color--rosso); color: #fff; }

/* Footer */
.dk-footer a { color: inherit; text-decoration: none; }
.dk-footer a:hover { color: var(--wp--preset--color--rosso); text-decoration: underline; }
.dk-footer .dk-varianti a { background: #fff; border-color: transparent; }
.dk-footer ul.dk-link-footer { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.dk-footer .dk-legale a { text-decoration: underline; }

/* Chi sono */
.dk-ritratto img { border-radius: 50%; aspect-ratio: 1; object-fit: cover; box-shadow: 0 0 0 6px var(--wp--preset--color--sfondo), 0 0 0 8px var(--wp--preset--color--rosso); }
.dk-lista-spunte { list-style: none; padding: 0; }
.dk-lista-spunte li { padding-left: 1.8em; position: relative; margin-bottom: 0.6em; }
.dk-lista-spunte li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 0.8em; height: 0.45em; border-left: 3px solid var(--wp--preset--color--rosso); border-bottom: 3px solid var(--wp--preset--color--rosso); transform: rotate(-45deg); }

/* Titoli di archivio */
.dk-intro { color: var(--wp--preset--color--tenue); font-size: var(--wp--preset--font-size--medio); max-width: 60ch; }

/* Logo su fondo scuro */
.dk-footer .dk-mascotte .grafite { fill: #d8d8dc; }
.dk-footer .dk-logo__nome span { color: #d8d8dc; }
.dk-footer .dk-logo__nome b { color: #ef5b52; }
/* L'intro è più stretta della colonna ma parte dal suo bordo sinistro, come il titolo. */
.dk-intro { margin-left: calc((100% - min(100%, var(--dk-colonna, 1200px))) / 2) !important; margin-right: auto !important; }
.dk-colonna-stretta { --dk-colonna: 760px; }
