:root {
  --bg-color: #0f1115;
  --card-bg: #181b20;
  --card-hover: #20242b;
  --accent-copper: #c87d55;
  --accent-gold: #e0a96d;
  --accent-copper-alpha: rgba(200, 125, 85, 0.15);
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --border-color: #2a2e37;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, sans-serif;
  --font-read: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-ui); background: var(--bg-color); color: var(--text-main); line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { color: var(--accent-gold); }
:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 3px; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent-copper); color: #fff; padding: .6rem 1rem; z-index: 200; }
.skip-link:focus { left: 0; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .6rem 1.5rem;
  position: sticky; top: 0; z-index: 100;
  background: rgba(15, 17, 21, .92); backdrop-filter: blur(10px);
}
.logo { font-weight: 800; font-size: 1.2rem; letter-spacing: -.5px; color: var(--text-main); text-decoration: none; }
.logo span { color: var(--accent-copper); }
.site-header nav { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.4rem; }
.site-header nav a { color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: .95rem; transition: color .2s; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--accent-gold); }
.site-header nav .nav-cta { color: var(--accent-gold); border: 1px solid rgba(200,125,85,.5); padding: .3rem .9rem; border-radius: 50px; }
.site-header nav .nav-cta:hover { background: var(--accent-copper-alpha); }

/* Layout */
.wrap { max-width: 1050px; margin: 0 auto; padding: 0 1.5rem; }
.narrow { max-width: 760px; }
.page-title { font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.2; font-weight: 800; margin: 2.5rem 0 1rem; }
.lead { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 2rem; }
.crumbs { margin-top: 2rem; font-size: .88rem; color: var(--text-muted); }
.crumbs a { color: var(--text-muted); }

.band { padding: 4.5rem 0; border-top: 1px solid var(--border-color); }
.band h2 { font-size: 2rem; margin-bottom: .6rem; text-align: center; }
.section-desc { text-align: center; color: var(--text-muted); max-width: 620px; margin: 0 auto 2.5rem; }

/* Hero */
.hero { padding: 4rem 0 3rem; text-align: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 2.9rem); line-height: 1.15; font-weight: 800; margin-bottom: 1.2rem; }
.hero p { font-size: 1.2rem; color: var(--text-muted); max-width: 720px; margin: 0 auto 2rem; }
.badge { display: inline-block; background: var(--accent-copper-alpha); color: var(--accent-gold); padding: .4rem 1.1rem; border-radius: 50px; font-size: .9rem; font-weight: 600; margin-bottom: 1.5rem; border: 1px solid rgba(200,125,85,.3); }
.banner { margin: 2rem 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-color); box-shadow: 0 10px 30px rgba(0,0,0,.6); background: var(--card-bg); }
.banner img { display: block; width: 100%; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.6rem; margin: 2rem 0; }
.card { background: var(--card-bg); border: 1px solid var(--border-color); padding: 1.8rem; border-radius: 10px; text-decoration: none; color: inherit; display: flex; flex-direction: column; justify-content: space-between; gap: 1rem; transition: transform .2s, border-color .2s, background-color .2s; }
a.card:hover { transform: translateY(-3px); border-color: var(--accent-copper); background: var(--card-hover); }
.card h3 { font-size: 1.25rem; margin-bottom: .6rem; line-height: 1.3; }
.card p { color: var(--text-muted); font-size: .96rem; }
.card .card-cat { color: var(--accent-gold); font-size: .85rem; font-weight: 600; margin-bottom: .4rem; }
.card-action { font-size: .88rem; font-weight: 700; color: var(--accent-gold); }

/* Bottoni e CTA */
.btn { display: inline-block; background: var(--accent-copper); color: #fff; padding: .9rem 1.8rem; font-weight: 600; font-size: 1rem; border: none; border-radius: 6px; cursor: pointer; text-decoration: none; transition: background .2s; font-family: inherit; }
.btn:hover { background: #b36944; }
.cta-box { background: var(--card-bg); border: 1px solid var(--border-color); border-left: 3px solid var(--accent-copper); border-radius: 8px; padding: 1.6rem 1.8rem; margin: 3rem 0; }
.cta-box h2 { font-size: 1.3rem; margin-bottom: .4rem; }
.cta-box p { color: var(--text-muted); margin-bottom: 1rem; }

/* Testo lungo (pagine e articoli) */
.prose { font-size: 1.08rem; color: #e5e7eb; line-height: 1.75; }
.prose.article { font-family: var(--font-read); font-size: 1.17rem; line-height: 1.85; }
.prose h2 { clear: both; font-family: var(--font-ui); font-size: 1.55rem; color: var(--accent-gold); margin: 2.5rem 0 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border-color); line-height: 1.3; }
.prose h3 { font-family: var(--font-ui); font-size: 1.2rem; margin: 2rem 0 .6rem; }
.prose p { margin-bottom: 1.4rem; }
.prose ul, .prose ol { margin: 1rem 0 1.5rem 1.6rem; }
.prose li { margin-bottom: .5rem; }
.prose blockquote { border-left: 3px solid var(--accent-copper); background: var(--card-bg); padding: 1.1rem 1.4rem; margin: 2rem 0; border-radius: 0 8px 8px 0; font-style: italic; color: var(--text-muted); }
.prose img { border-radius: 8px; margin: 1.5rem 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-family: var(--font-ui); font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border-color); padding: .6rem .8rem; text-align: left; }
.prose th { background: var(--card-bg); color: var(--accent-gold); }
.prose code { background: var(--card-bg); padding: .1rem .35rem; border-radius: 4px; font-size: .92em; }

.post-head { border-bottom: 1px solid var(--border-color); padding-bottom: 1.6rem; margin-bottom: 2.2rem; }
.post-head .page-title { margin-top: .6rem; }
.post-cat { display: inline-block; background: var(--accent-copper-alpha); color: var(--accent-gold); padding: .25rem .8rem; border-radius: 50px; font-size: .85rem; font-weight: 600; border: 1px solid rgba(200,125,85,.3); margin-top: 1.5rem; }
.post-meta { color: var(--text-muted); font-size: .92rem; display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; }
.post-meta a { color: var(--text-muted); }
.post-cover { width: 100%; border-radius: 10px; margin-bottom: 2rem; border: 1px solid var(--border-color); }
.refs { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border-color); color: var(--text-muted); font-size: .95rem; }
.refs h2 { font-size: 1.2rem; color: var(--text-main); margin-bottom: .8rem; }
.refs ol { margin-left: 1.4rem; }
.refs li { margin-bottom: .5rem; }
.more h2 { font-size: 1.4rem; margin-top: 1rem; }

.prose .portrait { float: right; width: 250px; aspect-ratio: 4 / 5; object-fit: cover; margin: .3rem 0 1.2rem 1.8rem; border-radius: 12px; border: 1px solid var(--border-color); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
@media (max-width: 600px) { .prose .portrait { float: none; display: block; width: min(300px, 100%); margin: 0 auto 1.5rem; } }

/* Form contatti */
.contact-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 2.2rem; max-width: 650px; margin: 2rem auto 4rem; }
.contact-form { display: flex; flex-direction: column; gap: 1.3rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label { font-size: .9rem; font-weight: 600; }
.form-group input, .form-group textarea, .form-group select { background: var(--bg-color); border: 1px solid var(--border-color); padding: .85rem; border-radius: 6px; color: var(--text-main); font-family: inherit; font-size: 1rem; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--accent-copper); }
.consent { display: flex; gap: .7rem; align-items: flex-start; font-size: .88rem; color: var(--text-muted); }
.consent input { margin-top: .25rem; accent-color: var(--accent-copper); }
.email-box { margin-top: 1.8rem; text-align: center; color: var(--text-muted); font-size: .95rem; }

/* Footer */
.site-footer { text-align: center; padding: 2.5rem 1.5rem; color: var(--text-muted); border-top: 1px solid var(--border-color); font-size: .88rem; }
.site-footer p + p { margin-top: .4rem; }
.site-footer a { color: var(--text-muted); }

@media (max-width: 600px) {
  .site-header { padding: .8rem 1rem; }
  .site-header nav { gap: .3rem 1rem; }
  .band { padding: 3rem 0; }
  .contact-card { padding: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn { transition: none; }
}
