/* ==========================================================================
   Chiedi al Tipografo – stile magazine
   Si carica dopo main.css e ne aggiorna l'aspetto: carta calda, copertine
   nei colori di processo, schede arrotondate, testate grandi.
   ========================================================================== */

:root {
	--paper: #f7f4ee;
	--sheet: #ffffff;
	--ink: #121829;
	--ink-soft: #353c52;
	--muted: #676d80;
	--rule: #e5dfd3;

	--cyan: #00a3e0;
	--cyan-ink: #0070a0;
	--cyan-btn: #0070a0;
	--magenta: #e6007e;
	--yellow: #ffd500;
	--key: #121829;

	--wrap: 76rem;
	--measure: 44rem;
	--radius: 14px;
	--radius-s: 8px;
	--shadow: 0 1px 2px rgba(18, 24, 41, 0.06), 0 10px 28px -14px rgba(18, 24, 41, 0.28);
}

/* Colori degli argomenti: --c sfondo, --c-ink testo sopra, --c-soft tinta chiara */
.c-preparare-file       { --c: #0091d1; --c-ink: #ffffff; --c-soft: #e2f3fb; }
.c-carte-materiali      { --c: #f5c400; --c-ink: #121829; --c-soft: #fff5cf; }
.c-prodotti             { --c: #e6007e; --c-ink: #ffffff; --c-soft: #fde3f0; }
.c-formati              { --c: #109f7a; --c-ink: #ffffff; --c-soft: #dcf3eb; }
.c-finiture             { --c: #6a4bd6; --c-ink: #ffffff; --c-soft: #ebe6fb; }
.c-scegliere-tipografia { --c: #ff6b2c; --c-ink: #ffffff; --c-soft: #ffe8dd; }
.c-storia-tecniche      { --c: #1c2340; --c-ink: #f4e7c8; --c-soft: #efe7d6; }
.c-generale             { --c: #121829; --c-ink: #ffffff; --c-soft: #ecebe7; }

body { background: var(--paper); }

.btn { border-radius: 999px; }
.btn--primary { background: var(--ink); }
.btn--primary:hover { background: var(--magenta); }

.section--tight { padding-block: clamp(1.75rem, 4vw, 3rem); }
.section__title { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 850; font-stretch: 110%; letter-spacing: -0.02em; }
.section__more { color: var(--ink); text-decoration: none; font-weight: 700; border-bottom: 2px solid var(--magenta); padding-bottom: 2px; }
.section__more:hover { color: var(--magenta); }

.kicker {
	display: inline-flex; align-items: center; gap: 0.6em;
	margin: 0 0 0.9rem; color: var(--magenta);
	font-size: 0.78rem; font-weight: 750; letter-spacing: 0.14em; text-transform: uppercase;
}
.kicker::before { content: ""; width: 1.6em; height: 3px; background: currentColor; border-radius: 2px; }
.kicker--light { color: var(--yellow); }

/* ---------- Header ---------- */

.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(247, 244, 238, 0.88);
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
	backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--rule);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.brand__name { font-weight: 850; font-stretch: 115%; }
.site-nav a { border-radius: 999px; font-weight: 600; }
.site-nav a:hover, .site-nav .current-menu-item > a { background: rgba(18, 24, 41, 0.06); }
.site-nav li:last-child > a { background: var(--ink); color: #fff; padding-inline: 1.1rem; }
.site-nav li:last-child > a:hover { background: var(--magenta); color: #fff; }

/* ---------- Etichette argomento ---------- */

.chip {
	display: inline-flex; align-items: center; gap: 0.45em;
	padding: 0.28em 0.75em; margin: 0;
	border-radius: 999px; background: var(--c-soft, #ecebe7); color: var(--ink);
	font-size: 0.8rem; font-weight: 700; line-height: 1.3; text-decoration: none;
}
.chip::before { content: ""; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--c, var(--ink)); }
a.chip:hover { color: var(--ink); filter: brightness(0.96); }

/* ---------- Copertine ---------- */

.cover {
	position: relative; isolation: isolate; overflow: hidden;
	aspect-ratio: 4 / 3; border-radius: var(--radius);
	background: var(--c, var(--ink)); color: var(--c-ink, #fff);
	container-type: inline-size;
}
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .cover img { transform: scale(1.04); }

.cover--art::before {
	content: ""; position: absolute; z-index: -1;
	width: 75%; aspect-ratio: 1; border-radius: 50%;
	right: -18%; top: -28%;
	background: rgba(255, 255, 255, 0.16);
	transition: transform 0.6s ease;
}
.cover--art::after {
	content: ""; position: absolute; z-index: -1;
	width: 38%; aspect-ratio: 1; border-radius: 50%;
	right: 20%; bottom: -12%;
	background: rgba(0, 0, 0, 0.1);
	transition: transform 0.6s ease;
}
.card:hover .cover--art::before { transform: translate(-6%, 6%); }
.card:hover .cover--art::after { transform: translate(8%, -6%); }

.cover__dots {
	position: absolute; inset: -20%; z-index: -1;
	background-image: radial-gradient(circle, rgba(255, 255, 255, 0.32) 1.5px, transparent 1.8px);
	background-size: 13px 13px;
	-webkit-mask-image: linear-gradient(135deg, transparent 30%, #000 85%);
	mask-image: linear-gradient(135deg, transparent 30%, #000 85%);
	transform: rotate(15deg);
}
.c-carte-materiali .cover__dots { background-image: radial-gradient(circle, rgba(18, 24, 41, 0.2) 1.5px, transparent 1.8px); }
.c-storia-tecniche .cover__dots { background-image: radial-gradient(circle, rgba(244, 231, 200, 0.22) 1.5px, transparent 1.8px); }

.cover--v1::before { left: -20%; right: auto; top: auto; bottom: -35%; }
.cover--v1 .cover__dots { -webkit-mask-image: linear-gradient(45deg, #000 10%, transparent 70%); mask-image: linear-gradient(45deg, #000 10%, transparent 70%); }
.cover--v2::before { width: 55%; right: 8%; top: 10%; }
.cover--v2 .cover__dots { transform: rotate(-15deg); }
.cover--v3::after { right: auto; left: -8%; bottom: auto; top: -10%; }

.cover__reg {
	position: absolute; width: 22px; height: 22px;
	border: 1.5px solid currentColor; border-radius: 50%; opacity: 0.75;
}
.cover__reg::before, .cover__reg::after { content: ""; position: absolute; background: currentColor; }
.cover__reg::before { left: 50%; top: -6px; bottom: -6px; width: 1.5px; transform: translateX(-50%); }
.cover__reg::after { top: 50%; left: -6px; right: -6px; height: 1.5px; transform: translateY(-50%); }
.cover__reg--tl { top: 7%; left: 6%; }
.cover__reg--br { bottom: 7%; right: 6%; }

.cover__label {
	position: absolute; left: 7%; bottom: 9%; right: 16%;
	font-weight: 900; font-stretch: 125%; line-height: 0.9; letter-spacing: -0.035em;
	font-size: 21cqi; white-space: nowrap;
}
.cover__label--long { font-size: 15cqi; }

/* ---------- Schede guida ---------- */

.cards {
	display: grid; gap: 2.5rem 1.75rem;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
}
.card { position: relative; display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.card__media { display: block; border-radius: var(--radius); }
.card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 0.55rem; }
.card__title { margin: 0; font-size: 1.3rem; line-height: 1.22; font-weight: 750; letter-spacing: -0.01em; }
.card__title a {
	color: var(--ink); text-decoration: none;
	background-image: linear-gradient(var(--magenta), var(--magenta));
	background-size: 0 2px; background-repeat: no-repeat; background-position: 0 100%;
	transition: background-size 0.25s ease;
}
.card:hover .card__title a, .card__title a:focus-visible { background-size: 100% 2px; }
.card__text {
	margin: 0; color: var(--ink-soft);
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card__meta { margin: 0; font-size: 0.85rem; color: var(--muted); }

.card--big .cover { aspect-ratio: 16 / 10; }
.card--big .cover__label { font-size: 17cqi; }
.card--big .cover__label--long { font-size: 12cqi; }
.card--big .card__title { font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 850; font-stretch: 106%; line-height: 1.08; letter-spacing: -0.02em; }
.card--big .card__text { -webkit-line-clamp: 4; font-size: 1.1rem; }

.card--row {
	display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); align-items: center; gap: 1rem;
	padding: 1rem 0; border-top: 1px solid var(--rule);
}
.card--row .cover { aspect-ratio: 1; border-radius: var(--radius-s); }
.card--row .cover__label, .card--row .cover__label--long { font-size: 24cqi; left: 10%; right: 10%; bottom: 12%; white-space: normal; }
.card--row .cover__label--long { font-size: 19cqi; }
.card--row .cover__reg { display: none; }
.card--row .card__body { gap: 0.35rem; }
.card--row .card__title { font-size: 1.05rem; }

.card--plain { background: var(--sheet); padding: 1.25rem; border-radius: var(--radius); box-shadow: 0 0 0 1px var(--rule); }

/* ---------- Apertura della home ---------- */

.mag-hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 4vw, 3rem); overflow: hidden; }
.mag-hero__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.mag-hero__title {
	margin: 0 0 1.4rem;
	font-size: clamp(3rem, 8.2vw, 6.6rem); font-weight: 900; font-stretch: 118%;
	line-height: 0.92; letter-spacing: -0.035em;
}
.mag-hero__lead { max-width: 34rem; margin-bottom: 1.75rem; font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: var(--ink-soft); }

.search-pill {
	display: flex; max-width: 34rem; padding: 0.35rem;
	background: var(--sheet); border: 1.5px solid var(--ink); border-radius: 999px;
	box-shadow: var(--shadow);
}
.search-pill:focus-within { outline: 3px solid var(--cyan); outline-offset: 2px; }
.search-pill input { flex: 1; min-width: 0; padding: 0.7rem 1rem; border: 0; background: transparent; font: inherit; color: var(--ink); }
.search-pill input:focus-visible { outline: none; }
.search-pill button {
	padding: 0.7rem 1.4rem; border: 0; border-radius: 999px;
	background: var(--ink); color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
.search-pill button:hover { background: var(--magenta); }

.mag-hero__art { position: relative; justify-self: center; width: 100%; max-width: 30rem; aspect-ratio: 1; }
.cmyk { width: 100%; height: 100%; overflow: visible; }
.cmyk circle { mix-blend-mode: multiply; transform-box: fill-box; transform-origin: center; animation: drift 9s ease-in-out infinite alternate; }
.cmyk circle:nth-child(2) { animation-delay: -3s; }
.cmyk circle:nth-child(3) { animation-delay: -6s; }
@keyframes drift {
	from { transform: translate(0, 0); }
	to { transform: translate(4%, -3%); }
}
.tag {
	position: absolute; padding: 0.35rem 0.9rem;
	background: var(--sheet); border: 1.5px solid var(--ink); border-radius: 999px;
	box-shadow: var(--shadow); white-space: nowrap;
	font-size: clamp(0.85rem, 1.4vw, 1.05rem); font-weight: 800; font-stretch: 110%;
}
.tag--1 { top: 6%; left: 0; transform: rotate(-6deg); }
.tag--2 { top: 22%; right: -2%; transform: rotate(5deg); }
.tag--3 { bottom: 16%; left: 4%; transform: rotate(4deg); }
.tag--4 { bottom: 4%; right: 10%; transform: rotate(-4deg); }

/* ---------- In evidenza ---------- */

.featured { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.side-title { margin: 0 0 0.4rem; font-size: 0.78rem; font-weight: 750; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* ---------- Argomenti ---------- */

.topics { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.topic {
	position: relative; isolation: isolate; overflow: hidden;
	display: flex; flex-direction: column; gap: 0.4rem; height: 100%; min-height: 9.5rem;
	padding: 1.25rem 1.25rem 1.1rem; border-radius: var(--radius);
	background: var(--c); color: var(--c-ink); text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.topic::after {
	content: ""; position: absolute; inset: 40% -10% -20% 40%; z-index: -1;
	background-image: radial-gradient(circle, currentColor 1.4px, transparent 1.7px);
	background-size: 12px 12px; opacity: 0.22;
	-webkit-mask-image: linear-gradient(135deg, transparent 10%, #000 80%);
	mask-image: linear-gradient(135deg, transparent 10%, #000 80%);
}
.topic:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--c-ink); }
.topic__name { font-size: 1.2rem; font-weight: 800; font-stretch: 108%; line-height: 1.1; }
.topic__desc { font-size: 0.9rem; line-height: 1.4; opacity: 0.88; }
.topic__count { margin-top: auto; font-size: 0.8rem; font-weight: 750; opacity: 0.9; }

/* ---------- Sezione scura (storia) ---------- */

.dark { background: #121829; color: #f4efe4; }
.dark .section__title { color: #fff; }
.dark .section__more { color: #fff; border-color: var(--yellow); }
.dark .section__more:hover { color: var(--yellow); }
.dark .card__title a { color: #fff; }
.dark .card__text { color: #c9cbd6; }
.dark .card__meta { color: #9aa0b4; }
.dark .chip { background: rgba(255, 255, 255, 0.1); color: #fff; }
.dark .chip::before { background: var(--yellow); }

/* ---------- Strumenti ---------- */

.tools2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1.25rem; }
.tool2 {
	position: relative; isolation: isolate; overflow: hidden;
	display: flex; flex-direction: column; gap: 0.6rem; min-height: 14rem;
	padding: clamp(1.5rem, 3vw, 2.25rem); border-radius: var(--radius);
	color: var(--ink); text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tool2:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.tool2--modelli { background: var(--yellow); }
.tool2--glossario { background: #d6effa; }
.tool2::after {
	position: absolute; right: -0.05em; bottom: -0.2em; z-index: -1;
	font-size: clamp(7rem, 14vw, 11rem); font-weight: 900; font-stretch: 125%; line-height: 1; opacity: 0.12;
}
.tool2--modelli::after { content: "A4"; }
.tool2--glossario::after { content: "Aa"; }
.tool2__badge {
	align-self: flex-start; padding: 0.25rem 0.7rem; border-radius: 999px;
	background: var(--ink); color: #fff;
	font-size: 0.72rem; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase;
}
.tool2__title { margin: 0; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 850; font-stretch: 112%; letter-spacing: -0.02em; }
.tool2 p { margin: 0; max-width: 28rem; color: var(--ink-soft); }
.tool2__go { margin-top: auto; font-weight: 750; }

/* ---------- Fascia tipografie ---------- */

.band {
	background:
		radial-gradient(circle at 85% 20%, rgba(230, 0, 126, 0.35), transparent 40%),
		radial-gradient(circle at 10% 90%, rgba(0, 163, 224, 0.35), transparent 45%),
		#121829;
}
.band .btn--primary { background: var(--yellow); color: var(--ink); }
.band .btn--primary:hover { background: #fff; color: var(--ink); }

/* ---------- Testata degli elenchi ---------- */

.archive-head { padding-bottom: 0.5rem; }
.archive-head[class*=" c-"] { background: linear-gradient(180deg, var(--c-soft), var(--paper)); }
.page-title { font-weight: 850; font-stretch: 112%; letter-spacing: -0.025em; }
.chips a { border-radius: 999px; background: var(--sheet); }

/* ---------- Articolo ---------- */

.progress { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 4px; pointer-events: none; }
.admin-bar .progress { top: 32px; }
@media (max-width: 782px) { .admin-bar .progress { top: 46px; } }
.progress span {
	display: block; height: 100%; transform: scaleX(0); transform-origin: 0 50%;
	background: linear-gradient(90deg, var(--cyan), var(--magenta), var(--yellow));
}

.article-head { padding-block: clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.5rem); background: linear-gradient(180deg, var(--c-soft), var(--paper)); }
.article-head__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.article-title {
	margin: 0.9rem 0 1.25rem;
	font-size: clamp(2.1rem, 4.6vw, 3.5rem); font-weight: 850; font-stretch: 108%;
	line-height: 1.04; letter-spacing: -0.025em;
}
.byline { display: flex; align-items: center; gap: 0.75rem; }
.byline__avatar {
	display: grid; place-items: center; flex: none;
	width: 2.6rem; height: 2.6rem; border-radius: 50%;
	background: var(--ink); color: #fff; font-weight: 800;
}
.byline .guide__meta { margin: 0; }
.byline .guide__meta a { color: var(--ink); font-weight: 700; }
.cover--hero { aspect-ratio: 16 / 10; box-shadow: var(--shadow); }
.cover--hero .cover__label { font-size: 17cqi; }
.cover--hero .cover__label--long { font-size: 12cqi; }
.cover-caption { margin: 0.5rem 0 0; font-size: 0.8rem; color: var(--muted); }

.guide__layout { margin-top: clamp(1.5rem, 4vw, 3rem); grid-template-columns: minmax(0, var(--measure)) minmax(0, 18rem); }
.guide__aside { top: 5.5rem; }
.admin-bar .guide__aside { top: calc(5.5rem + 32px); }

.prose { font-size: 1.125rem; line-height: 1.75; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); font-weight: 800; font-stretch: 105%; letter-spacing: -0.015em; scroll-margin-top: 6rem; }
.prose strong { font-weight: 700; color: var(--ink); }
.prose img { border-radius: var(--radius); }
.prose figcaption, .prose .wp-element-caption { margin-top: 0.5rem; font-size: 0.85rem; color: var(--muted); text-align: left; }
.prose table { border-radius: var(--radius-s); overflow: hidden; box-shadow: 0 0 0 1px var(--rule); font-size: 0.95rem; }
.prose thead th { background: var(--ink); color: #fff; border: 0; font-weight: 700; }
.prose tbody tr:nth-child(even) td { background: #faf8f4; }
.prose .wp-block-table { overflow-x: auto; }
.prose ul li::marker { color: var(--magenta); }
.prose blockquote { border-left: 4px solid var(--magenta); padding: 0.25rem 0 0.25rem 1.25rem; font-size: 1.2rem; font-style: italic; }

.in-breve {
	padding: 1.4rem 1.6rem; border: 0; border-radius: var(--radius);
	background: var(--sheet); box-shadow: var(--shadow);
	border-left: 6px solid var(--magenta);
}
.in-breve .crop__marks { display: none; }
.in-breve__title { color: var(--magenta); font-size: 0.78rem; font-weight: 750; letter-spacing: 0.14em; text-transform: uppercase; }

.toc { margin-bottom: 1.25rem; padding: 1.25rem 1.25rem 1rem; border-radius: var(--radius); background: var(--sheet); box-shadow: 0 0 0 1px var(--rule); }
.toc__title { margin-bottom: 0.6rem; font-size: 0.78rem; font-weight: 750; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 0.6rem; padding: 0.4rem 0; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.35; text-decoration: none; }
.toc a::before { content: counter(toc, decimal-leading-zero); padding-top: 0.12rem; color: var(--muted); font-size: 0.78rem; font-weight: 800; }
.toc a:hover, .toc a.is-active { color: var(--ink); }
.toc a.is-active { font-weight: 700; }
.toc a.is-active::before { color: var(--magenta); }

.find-box { border-radius: var(--radius); }
.find-box .btn--primary { background: var(--yellow); color: var(--ink); }
.find-box .btn--primary:hover { background: #fff; }

.faq details { margin-bottom: 0.6rem; padding: 0 1.1rem; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--sheet); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary::after { color: var(--magenta); }
.linked ul { border-top: 0; }
.linked li { border: 0; margin-bottom: 0.6rem; }
.linked a {
	display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem;
	border-radius: var(--radius-s); background: var(--sheet); box-shadow: 0 0 0 1px var(--rule);
	color: var(--ink); text-decoration: none;
}
.linked a::after { content: "→"; color: var(--magenta); }
.linked a:hover { box-shadow: 0 0 0 2px var(--ink); }
.author-box { border-radius: var(--radius); }

/* ---------- Telefono e tablet ---------- */

@media (max-width: 900px) {
	.mag-hero__grid, .featured, .article-head__grid { grid-template-columns: 1fr; }
	.mag-hero__art { max-width: 20rem; order: -1; margin-bottom: -1rem; }
	.featured__side { margin-top: 0.5rem; }
}
@media (max-width: 860px) {
	.site-nav li:last-child > a { display: inline-flex; margin-top: 0.5rem; }
}
@media (max-width: 520px) {
	.brand__name { font-size: 1.1rem; font-stretch: 105%; }
	.mag-hero__art { max-width: 14rem; }
	.tag { font-size: 0.8rem; padding: 0.25rem 0.7rem; }
}

@media (prefers-reduced-motion: reduce) {
	.cmyk circle { animation: none; }
	.card, .topic, .tool2, .cover img, .cover--art::before, .cover--art::after { transition: none; }
}
