/*
 * Socialfyy · stile comune dell'app, lo stesso della landing (socialfyy.com)
 * ----------------------------------------------------------------------------
 * Caricato su tutte le pagine: da app/views/fragments/topbar.fragment.php (dopo sfy-nav.css)
 * e dalle pagine senza barra in alto (piano nel popup, accesso e registrazione).
 * Qui stanno: il font Geist, i colori del marchio come variabili (--sfy-*) e le poche regole comuni.
 * I fogli delle singole pagine usano queste variabili (sfy-nav.css, sfy-dash.css, ...): per ritoccare
 * un colore del marchio basta cambiarlo qui.
 *
 * Regole della grafica (come nella landing):
 * - base neutra (bianco, grigi, quasi nero), arancione = colore del marchio (voce attiva, etichette, dettagli);
 * - blu = pulsanti più importanti; verde/rosso/ambra solo come colori di stato;
 * - colori di vivacità (viola, rosa, verde, giallo) per icone e riquadri, mai per i testi lunghi;
 * - pulsanti a pillola, riquadri con angoli grandi (28px, interni 20px);
 * - luci colorate con sfumature radiali, MAI con filter: blur dentro un riquadro arrotondato
 *   (su iPhone la sfocatura esce dagli angoli).
 */

@font-face {
	font-family: "Geist";
	src: url("../fonts/geist/geist-variable.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

:root {
	--sfy-font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";

	/* neutri */
	--sfy-ink: #1d1d1f;
	--sfy-ink-2: #5e5e63;
	--sfy-ink-3: #6e6e73;
	--sfy-page: #ffffff;
	--sfy-soft: #f5f5f7;
	--sfy-soft-2: #e8e8ed;
	--sfy-line: #e5e5ea;
	--sfy-line-2: #d2d2d7;

	/* arancione del marchio */
	--sfy-orange: #eb4a12;
	--sfy-orange-vivid: #f4511e;
	--sfy-orange-text: #d13f0a;
	--sfy-orange-soft: #fff1ea;

	/* blu dei pulsanti più importanti */
	--sfy-cta: #1668e3;
	--sfy-cta-hover: #0f58c9;
	--sfy-cta-soft: #eaf2ff;
	--sfy-cta-shadow: 0 8px 22px -6px rgba(22, 104, 227, .5);

	/* colori di vivacità (+ fondo tenue) */
	--sfy-violet: #7a4dff;
	--sfy-violet-soft: #f1ecff;
	--sfy-pink: #e11d6b;
	--sfy-pink-soft: #ffe9f1;
	--sfy-green: #0b9e62;
	--sfy-green-soft: #e2f7ec;
	--sfy-yellow: #ffb81f;
	--sfy-yellow-soft: #fff3cf;
	--sfy-blue-soft: #eaf2ff;

	/* sfumature */
	--sfy-grad: linear-gradient(115deg, #ff8a1f 0%, #ff4d6d 32%, #8b4dff 66%, #1668e3 100%);
	--sfy-grad-warm: linear-gradient(105deg, #eb4a12 0%, #e11d6b 52%, #7a4dff 100%);

	/* angoli */
	--sfy-r-card: 28px;
	--sfy-r-inner: 20px;
	--sfy-r-field: 14px;
}

body.darkside {
	--sfy-orange-text: #ff8a5c;
	--sfy-orange-soft: rgba(244, 81, 30, .16);
	--sfy-cta-soft: rgba(22, 104, 227, .18);
	--sfy-violet-soft: rgba(122, 77, 255, .18);
	--sfy-pink-soft: rgba(225, 29, 107, .18);
	--sfy-green-soft: rgba(11, 158, 98, .18);
	--sfy-yellow-soft: rgba(255, 184, 31, .16);
	--sfy-blue-soft: rgba(22, 104, 227, .18);
}

/* Font della landing su tutta l'app (i campi dei moduli non ereditano il font da soli) */
html body {
	font-family: var(--sfy-font);
}

html body button,
html body input,
html body select,
html body textarea,
html body optgroup {
	font-family: inherit;
}

/* testo selezionato nel colore del marchio */
::selection {
	background: rgba(244, 81, 30, .2);
}

/* ---------- Hamburger del marchio (uguale sul sito: src/components/sfy/Burger.tsx + globals.css) ----------
   Due linee arrotondate: lunga del colore del testo, corta arancione allineata a destra. Dentro un pulsante con
   aria-expanded="true" diventano una X (le due linee ruotano e si allungano); .sfy-burger--x = sempre X (pulsante «Chiudi»). Markup: <span class="sfy-burger"><i></i><i></i></span> */
.sfy-burger {
	position: relative;
	display: inline-block;
	flex: 0 0 auto;
	width: 18px;
	height: 12px;
}
.sfy-burger i {
	position: absolute;
	right: 0;
	height: 2.25px;
	border-radius: 2px;
	background: currentColor;
	transition: top .3s cubic-bezier(.32, .72, 0, 1), width .3s cubic-bezier(.32, .72, 0, 1), transform .3s cubic-bezier(.32, .72, 0, 1), background-color .3s;
}
.sfy-burger i:first-child { top: 1px; width: 18px; }
.sfy-burger i:last-child { top: 8.75px; width: 11px; background: #F4511E; }
:hover > .sfy-burger i:last-child { width: 18px; }
[aria-expanded="true"] > .sfy-burger i, .sfy-burger.sfy-burger--x i { top: 4.9px; width: 18px; }
[aria-expanded="true"] > .sfy-burger i:first-child, .sfy-burger.sfy-burger--x i:first-child { transform: rotate(45deg); }
[aria-expanded="true"] > .sfy-burger i:last-child, .sfy-burger.sfy-burger--x i:last-child { transform: rotate(-45deg); background: currentColor; }
/* Pulsante dell'hamburger: «adesivo» inclinato di −6° come le icone del sito, fondo arancione tenue, linee arancioni
   (le linee si raddrizzano dentro l'adesivo). Diventa una X arancione quando il menu è aperto. */
.sfy-burger-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 13px;
	background: #FFF1EA;
	color: #D13F0A;
	cursor: pointer;
	transform: rotate(-6deg);
	transition: transform .25s cubic-bezier(.32, .72, 0, 1), background-color .15s;
}
.sfy-burger-btn:hover { background: #FFE4D6; transform: rotate(0deg); }
.sfy-burger-btn:focus-visible { outline: 2px solid #F4511E; outline-offset: 2px; }
.sfy-burger-btn .sfy-burger { transform: rotate(6deg); transition: transform .25s cubic-bezier(.32, .72, 0, 1); }
.sfy-burger-btn:hover .sfy-burger { transform: none; }
.sfy-burger-btn .sfy-burger i:last-child { background: currentColor; }
body.darkside .sfy-burger-btn, .dark .sfy-burger-btn { background: rgba(244, 81, 30, .18); color: #FF9A6C; }
body.darkside .sfy-burger-btn:hover, .dark .sfy-burger-btn:hover { background: rgba(244, 81, 30, .26); }

@media (prefers-reduced-motion: reduce) {
	.sfy-burger i { transition: none; }
}
