/* I love Venice — blog dai colori di Burano */

@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans.woff2") format("woff2"); font-weight: 100 1000; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("fonts/playfair-italic.woff2") format("woff2"); font-weight: 400 900; font-style: italic; font-display: swap; }

:root {
  --bg: #fff8ef;
  --surface: #ffffff;
  --soft: #fff0e0;
  --ink: #2b2440;
  --ink-soft: #5d5670;
  --line: #f1e2cf;
  --coral: #ff6b5b;
  --yellow: #ffc93c;
  --turq: #1fb5ac;
  --lilac: #a47cdb;
  --pink: #ff8fb1;
  --blue: #3d7dd8;
  --c: var(--coral);
  --radius: 22px;
  --shadow: 0 2px 0 rgb(43 36 64 / .05), 0 10px 30px rgb(43 36 64 / .08);
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --script: "Playfair Display", Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1726;
    --surface: #251f33;
    --soft: #2d2640;
    --ink: #f7efe6;
    --ink-soft: #c3b9d1;
    --line: #3a3150;
    --shadow: 0 2px 0 rgb(0 0 0 / .2), 0 10px 30px rgb(0 0 0 / .3);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.7 var(--sans); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); }
h1 em, .brand em { font-family: var(--script); font-style: italic; font-weight: 700; color: var(--coral); letter-spacing: 0; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1180px, 100%); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { width: min(740px, 100%); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Intestazione ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 3px dotted var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 1.45rem; font-weight: 800; color: var(--ink); text-decoration: none; white-space: nowrap; letter-spacing: -.02em; }
.brand-mark { color: var(--coral); display: inline-flex; animation: beat 2.4s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 10% { transform: scale(1.18); } 20% { transform: scale(1); } }
.menu-toggle { margin-left: auto; display: none; background: var(--soft); border: 0; color: var(--ink); padding: 10px; cursor: pointer; border-radius: 14px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav > a { color: var(--ink); text-decoration: none; padding: 8px 14px; border-radius: 999px; font-size: .95rem; font-weight: 700; transition: background .2s, color .2s; }
.nav > a:hover { background: color-mix(in srgb, var(--c, var(--coral)) 16%, transparent); }
.nav > a[aria-current="page"] { background: var(--c, var(--coral)); color: #fff; }
.nav-about { --c: var(--pink); }
.lang { display: flex; gap: 2px; margin-left: 8px; }
.lang a { font-size: .8rem; font-weight: 800; color: var(--ink-soft); text-decoration: none; padding: 6px 8px; border-radius: 8px; }
.lang a[aria-current] { color: var(--coral); }

@media (max-width: 980px) {
  .menu-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 6px; background: var(--bg); padding: 14px 16px 20px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav > a { padding: 12px 18px; font-size: 1.1rem; background: color-mix(in srgb, var(--c, var(--coral)) 12%, transparent); }
}

/* ---------- Bottoni e pillole ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--coral); color: #fff; text-decoration: none; font-weight: 800; padding: 14px 24px; border-radius: 999px; min-height: 52px; box-shadow: 0 5px 0 #d94c3d; transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(2px); box-shadow: 0 3px 0 #d94c3d; }
.btn-ghost { background: var(--surface); color: var(--ink); box-shadow: 0 5px 0 var(--line); }
.btn-ghost:hover { box-shadow: 0 3px 0 var(--line); }
.chip { display: inline-flex; align-items: center; gap: 6px; background: color-mix(in srgb, var(--c) 18%, transparent); color: color-mix(in srgb, var(--c) 70%, var(--ink)); font-weight: 800; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; padding: 5px 12px; border-radius: 999px; }
@media (prefers-color-scheme: dark) { .chip { color: color-mix(in srgb, var(--c) 70%, #fff); } }
.cat-pill { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800; color: var(--ink); background: var(--surface); padding: 12px 20px; border-radius: 999px; border: 3px solid var(--c); box-shadow: 0 4px 0 var(--c); transition: transform .15s, box-shadow .15s; }
.cat-pill:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--c); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--coral); text-decoration: none; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Home ---------- */
.hero { padding: clamp(36px, 7vw, 80px) 0 clamp(30px, 5vw, 50px); background:
  radial-gradient(circle at 8% 20%, color-mix(in srgb, var(--yellow) 35%, transparent) 0 120px, transparent 121px),
  radial-gradient(circle at 92% 85%, color-mix(in srgb, var(--pink) 30%, transparent) 0 160px, transparent 161px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 60px); align-items: center; }
.hello { display: inline-block; font-weight: 800; color: var(--turq); background: color-mix(in srgb, var(--turq) 14%, transparent); padding: 6px 16px; border-radius: 999px; margin-bottom: 18px; }
.lead { font-size: clamp(1.08rem, 2vw, 1.25rem); color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.hero-art { border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%; overflow: hidden; box-shadow: var(--shadow); border: 8px solid var(--surface); transform: rotate(2deg); }
.hero-art .cover { aspect-ratio: 1 / 1; width: 100%; height: auto; }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 420px; margin: 0 auto; width: 100%; }
}

.cat-strip { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; padding-top: 10px; padding-bottom: 10px; }
.featured { padding-top: 40px; }
.sec-kicker { font-weight: 800; color: var(--coral); text-transform: uppercase; letter-spacing: .1em; font-size: .85rem; margin-bottom: 12px; }
.block { padding-top: clamp(44px, 7vw, 72px); padding-bottom: clamp(44px, 7vw, 72px); }
.sec-title { text-align: center; }
.sec-intro { text-align: center; color: var(--ink-soft); max-width: 60ch; margin: 0 auto 30px; }

/* ---------- Schede articolo ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; margin-top: 26px; }
.post-card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .2s; border-bottom: 6px solid var(--c); }
.post-card:hover { transform: translateY(-4px) rotate(-.4deg); }
.post-cover .cover { width: 100%; height: auto; aspect-ratio: 16 / 10; }
.post-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-body .chip { align-self: flex-start; }
.post-body h3 { margin: 0; font-size: 1.3rem; }
.post-body h3 a { text-decoration: none; }
.post-body h3 a:hover { color: var(--c); }
.post-body p { margin: 0; color: var(--ink-soft); font-size: .98rem; }
.post-body .post-meta { margin-top: auto; padding-top: 6px; font-size: .85rem; font-weight: 600; }
.post-card-big { display: grid; grid-template-columns: 1.2fr 1fr; }
.post-card-big .post-cover .cover { height: 100%; aspect-ratio: auto; min-height: 320px; }
.post-card-big .post-body { padding: clamp(24px, 4vw, 44px); justify-content: center; }
.post-card-big h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.post-card-big .post-meta { margin-top: 8px; }
@media (max-width: 820px) {
  .post-card-big { grid-template-columns: 1fr; }
  .post-card-big .post-cover .cover { min-height: 0; aspect-ratio: 16 / 10; }
}

/* ---------- Promesse ---------- */
.promises { background: var(--turq); color: #fff; position: relative; }
.promises .sec-title { color: #fff; }
.promises .sec-intro { color: #e3fbf9; }
@media (prefers-color-scheme: dark) { .promises { background: #155e5a; } }
.promise-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.promise-list li { background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 6px 0 var(--c); }
.promise-list li:nth-child(odd) { transform: rotate(-1.2deg); }
.promise-list li:nth-child(even) { transform: rotate(1.2deg); }
.p-emoji { font-size: 2rem; line-height: 1; margin-bottom: 4px; }
.promise-list strong { font-size: 1.1rem; }
.promise-list span:last-child { color: var(--ink-soft); font-size: .95rem; }

/* ---------- Autore ---------- */
.author-card { display: flex; gap: 22px; align-items: center; background: var(--soft); border-radius: var(--radius); padding: clamp(22px, 4vw, 36px); border: 3px dashed color-mix(in srgb, var(--pink) 60%, transparent); }
.author-card h2 { font-size: 1.5rem; margin-bottom: .3em; }
.author-card p { color: var(--ink-soft); }
.avatar { flex: none; width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: conic-gradient(var(--coral), var(--yellow), var(--turq), var(--lilac), var(--pink), var(--coral)); box-shadow: inset 0 0 0 6px var(--surface); }
.avatar svg { width: 38px; height: 38px; filter: drop-shadow(0 2px 2px rgb(0 0 0 / .2)); }
.avatar-big { width: 120px; height: 120px; margin-bottom: 18px; }
.avatar-big svg { width: 52px; height: 52px; }
@media (max-width: 560px) { .author-card { flex-direction: column; text-align: center; } }

/* ---------- Categoria ---------- */
.cat-hero { background: color-mix(in srgb, var(--c) 18%, var(--bg)); padding: clamp(40px, 7vw, 76px) 0; text-align: center; border-bottom: 6px solid var(--c); }
.cat-hero .lead { max-width: 60ch; margin: 0 auto 10px; }
.cat-hero .avatar-big { margin-left: auto; margin-right: auto; }
.cat-emoji { font-size: 3.2rem; line-height: 1; margin-bottom: 10px; }
.other-cats { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 56px; }
.empty { text-align: center; color: var(--ink-soft); font-size: 1.1rem; }

/* ---------- Articolo ---------- */
.post-head { padding-top: clamp(36px, 6vw, 64px); text-align: center; }
.post-head h1 { font-size: clamp(2rem, 5.2vw, 3.2rem); margin-top: 16px; }
.post-lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--ink-soft); }
.post-head .post-meta { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .92rem; color: var(--ink-soft); flex-wrap: wrap; justify-content: center; }
.mini-avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; background: conic-gradient(var(--coral), var(--yellow), var(--turq), var(--lilac), var(--coral)); }
.mini-avatar svg { width: 14px; height: 14px; }
.post-hero { margin-top: 26px; margin-bottom: 40px; }
.post-hero .cover { width: 100%; height: auto; aspect-ratio: 16 / 8; border-radius: var(--radius); box-shadow: var(--shadow); }

.prose { font-size: 1.12rem; }
.prose > p:first-child::first-letter { float: left; font-size: 4.2em; line-height: .85; font-weight: 800; color: var(--c); margin: .06em .1em 0 0; }
.prose h2 { font-size: clamp(1.45rem, 3vw, 1.85rem); margin-top: 1.8em; position: relative; }
.prose h2::before { content: ""; display: block; width: 46px; height: 8px; border-radius: 8px; background: var(--c); margin-bottom: 12px; }
.prose ul { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .6em; }
.prose li::marker { color: var(--c); }
.prose strong { font-weight: 800; }
.prose a { color: var(--c); }
.pull { margin: 1.8em 0; padding: 26px 30px; font-family: var(--script); font-style: italic; font-size: clamp(1.3rem, 3vw, 1.65rem); line-height: 1.4; background: color-mix(in srgb, var(--c) 12%, var(--surface)); border-radius: var(--radius); position: relative; }
.pull::before { content: "“"; position: absolute; top: -26px; left: 18px; font-size: 5rem; line-height: 1; color: var(--c); }
.tip-box { margin: 1.6em 0; padding: 20px 24px; background: color-mix(in srgb, var(--yellow) 26%, var(--surface)); border-radius: var(--radius); border: 3px solid var(--yellow); font-size: 1.02rem; }
.tip-box strong { display: block; font-weight: 800; margin-bottom: 4px; }
.tip-box strong::before { content: "💡 "; }
.post aside { margin-top: 48px; }
.about-body { padding-top: 40px; }

/* ---------- Piè di pagina ---------- */
.site-footer { background: var(--ink); color: #d9d2e6; margin-top: 30px; padding-bottom: 32px; font-size: .95rem; position: relative; }
@media (prefers-color-scheme: dark) { .site-footer { background: #120f1a; } }
.foot-wave { position: absolute; top: -39px; left: 0; width: 100%; height: 40px; fill: var(--ink); }
@media (prefers-color-scheme: dark) { .foot-wave { fill: #120f1a; } }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 28px 40px; padding-top: 44px; }
.site-footer .brand { color: #fff; }
.foot-brand p { margin: 12px 0 0; max-width: 44ch; }
.foot-nav { display: flex; flex-direction: column; gap: 6px; }
.foot-nav a { color: #fff; text-decoration: none; font-weight: 700; }
.foot-nav a:hover { color: var(--yellow); }
.foot-note { grid-column: 1 / -1; margin: 0; padding-top: 20px; border-top: 2px dotted rgb(255 255 255 / .18); font-size: .85rem; color: #a99fbd; }
@media (max-width: 640px) {
  .foot-grid { grid-template-columns: 1fr; }
  .wrap, .wrap-narrow { padding: 0 16px; }
  .post-grid { grid-template-columns: 1fr; }
  body { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
