/*
Theme Name: Luca Conversa
Theme URI: https://www.lucabaldisserotto.com/
Author: Evolution Travel
Description: Il blog che risponde. Tema per il blog di Luca Baldisserotto, con area chatbot in homepage, archivio articoli e pagina intervista.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: luca-conversa
*/

:root {
	--ink: #111111;
	--ink-2: #4D4845;
	--ink-3: #6B6460;
	--wine: #7A1F2B;
	--wine-dark: #5C1620;
	--gold: #B08D57;
	--gold-light: #C9A86A;
	--gold-num: #9A7743;
	--sky: #D4ECFB;
	--sky-light: #E6F4FD;
	--sky-line: #B3DBF4;
	--sky-btn: #94C9EC;
	--line: #E8E1DA;
	--line-2: #DCD4CC;
	--paper: #F7F4F1;
	--paper-2: #FBF9F7;
	--font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
	--display: "Space Grotesk", Inter, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--wine); }
a:hover { color: var(--wine-dark); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto; padding: 12px 16px; background: #fff; border: 2px solid var(--wine); border-radius: 8px; }
:focus-visible { outline: 3px solid var(--sky-btn); outline-offset: 2px; }

.wrap { max-width: 1280px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }

/* ---------- Header ---------- */
.site-header { padding-top: 24px; padding-bottom: 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.dot { color: var(--gold); }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.main-nav a { display: inline-block; padding: 12px 16px; font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none; border-radius: 999px; }
.main-nav a:hover { background: var(--paper); color: var(--ink); }
.main-nav .current-menu-item > a, .main-nav .is-current > a { background: var(--sky-light); color: var(--wine-dark); }

/* ---------- Shared bits ---------- */
.eyebrow { margin: 0; display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--wine); }
.eyebrow::before { content: ""; width: 40px; height: 2px; background: var(--gold); flex: none; }
.eyebrow.small { font-size: 13px; }
.eyebrow.small::before { width: 32px; }
.display { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -.02em; }
.lead { margin: 0; font-size: 19px; line-height: 1.55; color: var(--ink-2); max-width: 640px; }
.meta { font-size: 14px; color: var(--ink-3); }

.btn { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; padding: 0 24px; border-radius: 999px; font-size: 16px; font-weight: 600; text-decoration: none; border: 1px solid transparent; font-family: var(--font); cursor: pointer; }
.btn-wine { background: var(--wine); color: #fff; }
.btn-wine:hover { background: var(--wine-dark); color: #fff; }
.btn-white { background: #fff; color: var(--ink); border-color: var(--sky-btn); }
.btn-white:hover { color: var(--ink); background: var(--sky-light); }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--ink); }
.pill { min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 600; text-decoration: none; border: 1px solid var(--line-2); color: var(--ink); background: #fff; }
.pill:hover { color: var(--ink); border-color: var(--ink-3); }
.pill-sky { background: var(--sky-light); border-color: var(--sky-light); color: var(--wine-dark); }
.pill-sky:hover { color: var(--wine-dark); background: var(--sky); border-color: var(--sky); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Hero + chat ---------- */
.hero { padding-top: 24px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 40px; }
.hero-text { display: flex; flex-direction: column; gap: 16px; max-width: 820px; }
.hero h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1.02; }
.hero-grid { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }

.portrait { margin: 0; flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; border-radius: 28px; overflow: hidden; background: var(--ink); color: #fff; }
.portrait-img { position: relative; flex: 1 1 auto; min-height: 520px; background: #1C1A19; }
.portrait-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.status { position: absolute; top: 20px; left: 20px; display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 600; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #1F9D55; }
.portrait figcaption { padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 8px; }
.portrait .name { font-family: var(--display); font-size: 28px; font-weight: 700; }
.portrait .tag { font-family: var(--display); font-size: 18px; font-weight: 600; color: var(--gold-light); }

.chat { flex: 1.25 1 440px; min-width: 0; display: flex; flex-direction: column; border-radius: 28px; background: #fff; border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(17,17,17,.08); overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--sky-light); color: var(--wine); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 18px; flex: none; }
.chat-head strong { display: block; font-weight: 600; font-size: 16px; }
.chat-head span { font-size: 13px; color: var(--ink-3); }
.chat-frame { flex: 1 1 auto; min-height: 560px; border: 0; width: 100%; display: block; }
.chat-log { flex: 1 1 auto; min-height: 380px; max-height: 520px; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 14px; background: var(--paper-2); }
.msg { max-width: 82%; padding: 14px 18px; font-size: 16px; line-height: 1.5; }
.msg-bot { align-self: flex-start; border-radius: 20px 20px 20px 6px; background: #fff; border: 1px solid var(--line); }
.msg-user { align-self: flex-end; border-radius: 20px 20px 6px 20px; background: var(--wine); color: #fff; }
.chips { padding: 16px 24px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font: 500 14px var(--font); cursor: pointer; }
.chip:hover { border-color: var(--ink-3); }
.chat-form { padding: 16px 24px 24px; display: flex; gap: 10px; }
.chat-form input { flex: 1 1 auto; min-width: 0; min-height: 52px; padding: 0 18px; border-radius: 16px; border: 1px solid var(--line-2); background: #fff; font: 400 16px var(--font); color: var(--ink); }
.chat-form button { width: 52px; height: 52px; flex: none; border: 0; border-radius: 16px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* ---------- Latest + cards ---------- */
.latest-wrap { padding-bottom: 96px; display: flex; flex-direction: column; gap: 40px; }
.feature { display: flex; flex-wrap: wrap; gap: 40px; padding: 56px; border-radius: 28px; background: var(--sky); }
.feature-main { flex: 2 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.feature h2 { margin: 0; font-family: var(--display); font-size: clamp(32px, 4vw, 52px); line-height: 1.08; font-weight: 700; letter-spacing: -.015em; }
.feature h2 a { color: var(--ink); text-decoration: none; }
.feature h2 a:hover { color: var(--wine); }
.feature-excerpt { margin: 0; font-size: 18px; line-height: 1.6; color: var(--ink-2); max-width: 680px; }
.feature .actions { gap: 12px; padding-top: 8px; }
.feature-quote { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; padding-left: 32px; border-left: 1px solid var(--sky-line); }
.feature-quote .q { font-family: var(--display); font-size: 64px; line-height: .6; color: var(--wine); }
.feature-quote p { margin: 0; font-family: var(--display); font-size: 22px; line-height: 1.4; font-weight: 500; }

.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.section-head h2 { margin: 0; font-family: var(--display); font-size: 32px; line-height: 1.1; font-weight: 700; letter-spacing: -.01em; }
.section-head a { font-size: 16px; font-weight: 600; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; border-radius: 24px; background: #fff; overflow: hidden; border: 1px solid var(--line); }
.card-thumb img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.card-body { padding: 32px 28px 28px; display: flex; flex-direction: column; gap: 14px; flex: 1 1 auto; border-top: 3px solid var(--wine); }
.card .meta { font-size: 13px; }
.card h3 { margin: 0; font-family: var(--display); font-size: 24px; line-height: 1.25; font-weight: 600; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--wine); }
.card p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); flex: 1 1 auto; }
.card .actions { padding-top: 8px; }

/* ---------- Libri ---------- */
.band { border-top: 1px solid var(--line); }
.books { padding-top: 64px; padding-bottom: 64px; display: flex; flex-wrap: wrap; gap: 40px 64px; }
.books-intro { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.books-intro h2 { margin: 0; font-family: var(--display); font-size: 26px; line-height: 1.2; font-weight: 700; }
.books-links { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; }
.books-links a, .book a { min-height: 44px; display: inline-flex; align-items: center; font-size: 15px; font-weight: 600; text-decoration: none; }
.book-list { flex: 2 1 520px; min-width: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.book { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.book::before { content: ""; flex: none; width: 10px; height: 40px; border-radius: 2px; background: var(--wine); }
.book:nth-child(3n+2)::before { background: var(--ink); }
.book:nth-child(3n)::before { background: var(--gold); }
.book span { flex: 1 1 auto; min-width: 0; font-size: 16px; font-weight: 500; line-height: 1.4; }
.book a { flex: none; font-size: 14px; }

/* ---------- Come funziona ---------- */
.how { padding-top: 80px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 40px; }
.how > h2 { margin: 0; font-family: var(--display); font-size: 40px; line-height: 1.1; font-weight: 700; letter-spacing: -.01em; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.step { display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: 24px; background: var(--paper); }
.step .n { font-family: var(--display); font-size: 40px; font-weight: 700; color: var(--gold-num); }
.step h3 { margin: 0; font-size: 20px; font-weight: 600; }
.step p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); }

/* ---------- Archivio ---------- */
.page-intro { padding-top: 32px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 32px; }
.page-intro .text { display: flex; flex-direction: column; gap: 16px; max-width: 820px; }
.page-intro h1 { font-size: clamp(40px, 5vw, 64px); line-height: 1.04; }
.toolbar { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.search-form { flex: 0 1 420px; min-width: 240px; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 6px 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; }
.search-form input[type=search] { flex: 1 1 auto; min-width: 0; border: 0; outline: none; background: transparent; font: 400 15px var(--font); color: var(--ink); min-height: 44px; }
.search-form button { border: 0; background: var(--ink); color: #fff; border-radius: 999px; min-height: 36px; padding: 0 14px; font: 600 13px var(--font); cursor: pointer; }
.cats { display: flex; flex-wrap: wrap; gap: 8px; }
.cats a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; }
.cats a.on, .cats a:hover { background: var(--sky-light); border-color: var(--sky-light); color: var(--wine-dark); }

.post-list { padding-bottom: 48px; display: flex; flex-direction: column; }
.row { display: flex; flex-wrap: wrap; gap: 24px 48px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.row-date { flex: 0 0 160px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; }
.row-date .cat { font-weight: 500; color: var(--ink-3); font-size: 13px; }
.row-main { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.row-main h2 { margin: 0; font-family: var(--display); font-size: 26px; line-height: 1.25; font-weight: 600; }
.row-main h2 a { color: var(--ink); text-decoration: none; }
.row-main h2 a:hover { color: var(--wine); }
.row-main p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); max-width: 720px; }
.row-main .meta { font-size: 13px; }
.row .actions { flex: 0 0 auto; align-items: flex-start; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding-top: 40px; }
.pagination .page-numbers { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination .dots { border: 0; }
.empty { padding: 48px 0; font-size: 18px; color: var(--ink-2); }

.cta-wrap { padding-bottom: 96px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 40px 48px; border-radius: 28px; background: var(--sky); }
.cta .t { display: flex; flex-direction: column; gap: 8px; max-width: 620px; flex: 1 1 300px; min-width: 0; }
.cta h2 { margin: 0; font-family: var(--display); font-size: 30px; line-height: 1.15; font-weight: 700; }
.cta p { margin: 0; font-size: 17px; line-height: 1.55; color: var(--ink-2); }
.cta.narrow { max-width: 760px; margin: 0 auto; padding: 36px 40px; }
.cta.narrow h2, .cta-post h2 { font-size: 26px; }
.cta-post { padding: 32px 36px; }

/* ---------- Articolo / pagina ---------- */
.article { padding-top: 32px; padding-bottom: 96px; }
.article-head { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; padding-bottom: 40px; }
.article-head h1 { font-size: clamp(36px, 5vw, 60px); line-height: 1.06; }
.article-thumb { max-width: 1040px; margin: 0 auto 48px; }
.article-thumb img { display: block; width: 100%; border-radius: 28px; }
.prose { max-width: 720px; margin: 0 auto; font-size: 19px; line-height: 1.75; color: #2B2725; }
.prose > * { margin-top: 0; margin-bottom: 1.2em; }
.prose h2, .prose h3, .prose h4 { font-family: var(--display); color: var(--ink); line-height: 1.25; margin-top: 1.8em; margin-bottom: .6em; }
.prose h2 { font-size: 30px; }
.prose h3 { font-size: 24px; }
.prose blockquote { margin-left: 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--gold); font-family: var(--display); font-size: 22px; line-height: 1.45; color: var(--ink); }
.prose img, .prose figure { border-radius: 16px; }
.prose figure { margin-left: 0; margin-right: 0; }
.prose figcaption { font-size: 14px; color: var(--ink-3); text-align: center; padding-top: 8px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose .alignwide { max-width: 1040px; }
.prose .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.prose .alignleft { float: left; margin: .3em 1.5em 1em 0; }
.prose .alignright { float: right; margin: .3em 0 1em 1.5em; }
.prose::after { content: ""; display: table; clear: both; }
.article-foot { max-width: 720px; margin: 48px auto 0; display: flex; flex-direction: column; gap: 40px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { padding: 6px 12px; border-radius: 999px; background: var(--paper); color: var(--ink-2); font-size: 13px; text-decoration: none; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-top: 1px solid var(--line); padding-top: 24px; }
.post-nav a { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 600; font-size: 18px; line-height: 1.3; }
.post-nav a span { font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.post-nav .next { text-align: right; }

/* Intervista */
.interview-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 32px; padding-bottom: 40px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.interview-head .text { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.interview-head h1 { font-size: clamp(40px, 5vw, 64px); line-height: 1.04; }
.byline { flex: 0 0 auto; display: flex; align-items: center; gap: 16px; }
.byline img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; object-position: 50% 40%; }
.byline strong { display: block; font-family: var(--display); font-size: 18px; }
.prose.interview { max-width: 760px; counter-reset: q; }
.prose.interview h2, .prose.interview h3, .prose.interview p > strong:only-child { color: var(--wine); }
.prose.interview h2, .prose.interview h3 { font-size: 24px; font-weight: 600; padding-top: 36px; margin-top: 36px; border-top: 1px solid var(--line); display: flex; gap: 16px; align-items: baseline; }
.prose.interview h2::before, .prose.interview h3::before { counter-increment: q; content: counter(q, decimal-leading-zero); flex: none; font-size: 15px; font-weight: 700; color: var(--gold); }
.prose.interview > h2:first-child, .prose.interview > h3:first-child { border-top: 0; margin-top: 0; }
.interview-cta { padding-top: 56px; }

/* Commenti */
.comments { max-width: 720px; margin: 56px auto 0; }
.comments h2 { font-family: var(--display); font-size: 26px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { padding: 20px 0; border-bottom: 1px solid var(--line); }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-meta { font-size: 14px; color: var(--ink-3); }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); font: 400 16px var(--font); }
.comment-form .submit { min-height: 48px; padding: 0 24px; border-radius: 999px; border: 0; background: var(--wine); color: #fff; font: 600 15px var(--font); cursor: pointer; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #fff; }
.site-footer .wrap { padding-top: 64px; padding-bottom: 64px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.site-footer .about { display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.site-footer .brand-big { font-family: var(--display); font-size: 28px; font-weight: 700; }
.site-footer .brand-big .dot { color: var(--gold-light); }
.site-footer p { margin: 0; font-size: 14px; line-height: 1.6; color: #BDB5AD; }
.site-footer .links { display: flex; flex-direction: column; gap: 8px; }
.site-footer .links a { color: #fff; font-size: 16px; }
.site-footer .links a:hover { color: var(--gold-light); }
.site-footer .legal { font-size: 13px; color: #8E8781; }
.site-footer .legal a { color: #BDB5AD; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
	.wrap { padding-left: 20px; padding-right: 20px; }
	.site-header { padding-top: 16px; padding-bottom: 8px; }
	.main-nav ul { gap: 2px; }
	.main-nav a { padding: 10px 12px; font-size: 14px; }
	.portrait-img { min-height: 380px; }
	.chat-frame { min-height: 520px; }
	.chat-log { min-height: 220px; }
	.feature { padding: 32px 24px; }
	.feature-quote { padding-left: 0; border-left: 0; border-top: 1px solid var(--sky-line); padding-top: 24px; }
	.cta { padding: 32px 24px; }
	.row-date { flex-basis: 100%; flex-direction: row; gap: 12px; }
	.how > h2 { font-size: 30px; }
	.prose { font-size: 18px; }
	.post-nav { grid-template-columns: 1fr; }
	.post-nav .next { text-align: left; }
}
