:root{
  --bg:#0b0b0d;
  --panel:#121216;
  --panel2:#0f0f13;
  --text:#e9e2d6;
  --muted:rgba(233,226,214,.68);
  --gold:#c8a86a;
  --line:rgba(200,168,106,.18);
  --shadow: 0 18px 60px rgba(0,0,0,.55);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(200,168,106,.16), transparent 60%),
    radial-gradient(900px 500px at 20% 20%, rgba(200,168,106,.08), transparent 60%),
    radial-gradient(900px 500px at 80% 30%, rgba(200,168,106,.06), transparent 60%),
    var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

a{color:rgba(233,226,214,.86);text-decoration:none;border-bottom:1px solid rgba(200,168,106,.18)}
a:hover{opacity:.92}

.container{
  max-width: 1020px;
  margin: 56px auto 70px;
  padding: 0 18px;
}

.nav{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  margin-bottom: 18px;
}
.brand{display:flex;flex-direction:column;gap:4px}
.brand-row{display:flex;flex-direction:row;align-items:center;gap:12px}
.brand-logo{height:42px;opacity:.9}
.brand-txt{display:flex;flex-direction:column;gap:4px}
.logo{
  font-weight:650;
  letter-spacing:.08em;
  font-size:.92rem;
  color: rgba(233,226,214,.92);
  text-shadow: 0 0 18px rgba(200,168,106,.25);
}
.tag{font-size:.86rem;color:rgba(233,226,214,.55)}
.navlinks{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}

.pill{
  padding: 10px 12px;border-radius:999px;
  border: 1px solid rgba(200,168,106,.16);
  background: rgba(255,255,255,.03);
  color: rgba(233,226,214,.85);
  font-size: .92rem;
  user-select:none;
  transition: transform .12s ease, opacity .12s ease, background .12s ease;
}
.pill:hover{transform: translateY(-1px)}

.article{max-width: 900px;margin:0 auto}

.hero{
  background: linear-gradient(180deg, rgba(18,18,22,.98), rgba(15,15,19,.98));
  border: 1px solid rgba(200,168,106,.14);
  border-radius: 18px;
  padding: 22px 20px;
  box-shadow: var(--shadow);
  position:relative;overflow:hidden;
}
.hero::before{
  content:"";position:absolute;inset:-1px;
  background:
    radial-gradient(520px 220px at 20% 0%, rgba(200,168,106,.15), transparent 60%),
    radial-gradient(520px 220px at 80% 100%, rgba(200,168,106,.08), transparent 60%);
  pointer-events:none;opacity:.72;
}
.hero{
  position: relative;
  overflow: hidden;
}

.hero::after{
  content:"";
  position:absolute;
  inset:-40px;
  background: radial-gradient(520px 220px at 20% 0%, rgba(200,168,106,.10), transparent 60%),
              radial-gradient(520px 220px at 80% 100%, rgba(200,168,106,.06), transparent 60%);
  pointer-events:none;
  opacity:.9;
}
.hero > *{position:relative}

.kicker{
  font-size:.88rem;
  color: rgba(233,226,214,.58);
  letter-spacing:.06em;
  text-transform:uppercase;
  margin-bottom:8px;
}
h1{
  margin:0 0 10px;
  font-size:2.05rem;
  letter-spacing:.02em;
  font-weight:650;
  text-shadow: 0 2px 18px rgba(200,168,106,.18);
}
.lead{
  margin:0;
  color: var(--muted);
  line-height:1.6;
  font-size:1.02rem;
}

.cta{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.btn{
  display:inline-flex;align-items:center;justify-content:center;
  padding: 12px 16px;border-radius: 12px;
  border: 1px solid var(--line);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, opacity .12s ease;
  user-select:none;-webkit-tap-highlight-color: transparent;
}
.btn:hover{transform: translateY(-1px)}
.btn.primary{
  color:#0b0b0d;
  background: linear-gradient(135deg, rgba(200,168,106,1), rgba(200,168,106,.72));
  box-shadow: 0 10px 35px rgba(200,168,106,.14), var(--shadow);
  border-color: rgba(200,168,106,.25);
}
.btn.ghost{
  background: rgba(255,255,255,.03);
  color: var(--text);
}

.note{
  margin-top:14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(200,168,106,.16);
  background: rgba(0,0,0,.18);
  color: rgba(233,226,214,.72);
  line-height:1.55;
  font-size:.95rem;
}

.toc{
  margin: 16px 0 18px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(200,168,106,.14);
  background: rgba(255,255,255,.02);
}
.toc b{display:block;margin-bottom:8px;color:rgba(233,226,214,.88)}
.toc a{display:block;border-bottom:none;padding:6px 0;color:rgba(233,226,214,.78)}
.toc a:hover{opacity:.9}

h2{
  margin: 22px 0 10px;
  font-size: 1.38rem;
  letter-spacing:.01em;
}
h3{
  margin: 14px 0 8px;
  font-size: 1.08rem;
  color: rgba(233,226,214,.92);
}
p{color: rgba(233,226,214,.78);line-height:1.7;font-size:1.02rem}
ul{color: rgba(233,226,214,.78);line-height:1.7}

.hr{border:none;border-top:1px solid rgba(200,168,106,.14);margin:20px 0}

.small{font-size:.92rem;color: rgba(233,226,214,.62);line-height:1.55}
.footer{
  margin-top: 30px;
  font-size:.82rem;
  color: rgba(233,226,214,.45);
  text-align:center;
}

/* Home cards */
.grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 16px;
}
@media (max-width: 860px){
  .grid{grid-template-columns:1fr}
  h1{font-size:1.85rem}
}
/* Cards layout premium */
.card{
  display:flex;
  flex-direction:column;
  background: linear-gradient(180deg, rgba(18,18,22,.98), rgba(15,15,19,.98));
  border: 1px solid rgba(200,168,106,.14);
  border-radius: 16px;
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
  position:relative;
  overflow:hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  will-change: transform;
}
.card::before{
  content:"";
  position:absolute;
  inset:-1px;
  background:
    radial-gradient(520px 220px at 20% 0%, rgba(200,168,106,.15), transparent 60%),
    radial-gradient(520px 220px at 80% 100%, rgba(200,168,106,.08), transparent 60%);
  pointer-events:none;
  opacity:.72;
}
.card > *{position:relative}

.card .title{margin:0 0 6px;font-size:1.15rem;font-weight:650}
.card .desc{margin:0 0 12px;color: var(--muted);font-size:.98rem;line-height:1.55}
.card .meta{display:flex;justify-content:space-between;gap:10px;color: rgba(233,226,214,.62);font-size:.88rem}

.card .actions{
  margin-top:auto; /* allinea i bottoni in basso */
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

/* Hover soft */
@media (hover:hover) and (pointer:fine){
  .card:hover{
    transform: translateY(-1px);
    box-shadow: 0 16px 48px rgba(0,0,0,.50);
    border-color: rgba(200,168,106,.26);
  }
}

/* Mobile spacing */
@media (max-width: 520px){
  .grid{ gap: 14px; }
  .card{ padding: 16px 16px 14px; }
  .card .desc{ margin-bottom: 10px; }
  .card .actions .btn{ flex:1 1 48%; }
}

/* Hero typography mobile */
@media (max-width: 768px){
  .hero h1{
    line-height: 1.12;
    letter-spacing: -0.3px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .card{ transition:none; }
  .card:hover{ transform:none; }
}
.pill.active{
  border-color: rgba(200,168,106,.32);
  background: rgba(200,168,106,.08);
  box-shadow: 0 0 0 1px rgba(200,168,106,.10) inset;
}
.btn{ border-bottom:none; }
a:focus-visible, .btn:focus-visible, .pill:focus-visible{
  outline: 2px solid rgba(200,168,106,.55);
  outline-offset: 3px;
  border-radius: 14px;
}