:root {
  --bg: #ffffff;
  --surface: rgba(0, 0, 0, 0.04);
  --text: #333333;
  --text-heading: #111111;
  --muted: rgba(0, 0, 0, 0.6);
  --brand: #daff00;
  --brand-dark: #c8ed00;
  --border: rgba(0, 0, 0, 0.1);
  --max: 1200px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: degular, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.3px;
}

body {
  padding-top: 80px;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3 {
  color: var(--text-heading);
  line-height: 1.15;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-top: 1rem;
  letter-spacing: -2px;
}

h2 {
  letter-spacing: -1px;
}

.container {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

/* ─── Background Glow ─── */

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.bg-glow::before,
.bg-glow::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: var(--brand);
  filter: blur(120px);
}

.bg-glow::before {
  width: 280px;
  height: 220px;
  top: -60px;
  right: -40px;
  opacity: 0.06;
  animation: float-gentle-1 18s ease-in-out infinite;
}

.bg-glow::after {
  width: 590px;
  height: 610px;
  bottom: -100px;
  left: -80px;
  opacity: 0.04;
  animation: float-gentle-2 22s ease-in-out infinite;
}

@keyframes float-gentle-1 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.06; }
  50% { transform: translate(-20px, 30px) scale(1.05); opacity: 0.08; }
}

@keyframes float-gentle-2 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.04; }
  50% { transform: translate(30px, -20px) scale(1.03); opacity: 0.05; }
}

/* ─── Header ─── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom-width: 0;
  border-bottom-style: none;
  border-bottom-color: rgba(0, 0, 0, 0);
  border-image: none;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1rem;
}

.brand {
  display: flex;
  align-items: center;
}

.brand img, .footer-brand img {
  height: 36px;
  width: auto;
}

.nav {
  display: flex;
  gap: 40px;
  align-items: center;
}

.nav-link {
  color: var(--text);
  font-size: 16px;
  line-height: 24px;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-heading);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: 9999px;
  background: var(--brand);
  color: #191916;
  font-weight: 600;
  font-size: 16px;
  transition: background 0.2s ease;
}

.nav-cta:hover {
  background: var(--brand-dark);
}

/* ─── Hero ─── */

.hero {
  padding: 5rem 0 2.5rem;
}

.badge {
  display: inline-block;
  background: rgba(218, 255, 0, 0.3);
  border: 1px solid rgba(218, 255, 0, 0.5);
  color: #111111;
  font-size: 0.85rem;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
}

.lead {
  color: var(--muted);
  font-size: 1.1rem;
  margin-top: 1.1rem;
  max-width: 760px;
  line-height: 1.65;
}

/* ─── Grid & Cards ─── */

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2rem;
  row-gap: 50px;
  margin: 3rem 0 5rem;
}

.card {
  grid-column: span 4;
  background: none;
  border: none;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.card-hit {
  display: block;
  height: 100%;
  border-radius: 18px;
  padding: 0.6rem;
  color: inherit;
  transition: background-color 0.2s ease, transform 0.22s ease;
}

.card-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 16px;
}

.card-body {
  padding: 1.1rem 0.25rem 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0px;
  height: 100%;
}

.meta {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-top: 5px;
  margin-bottom: 5px;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.8px;
  line-height: 1.3;
  transition: color 0.2s ease;
}

@media (hover: hover) {
  .card-hit:hover {
    transform: translateY(-4px);
    background-color: rgba(0, 0, 0, 0.06);
  }

  .card-hit:hover .card-title {
    color: #000000;
  }
}

.card-excerpt {
  color: rgba(115, 115, 115, 1);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-top: 5px;
  margin-bottom: 5px;
}

.card-link {
  margin-top: 20px;
  padding-top: 0px;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.card-link::after {
  content: '[ → ]';
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.card-hit:hover .card-link {
  color: var(--text-heading);
}

/* ─── Listing Header ─── */

.listing-header {
  padding: 3.5rem 0 1rem;
}

/* ─── Article Page ─── */

.article-hero {
  position: relative;
  min-height: min(52vh, 520px);
  display: flex;
  align-items: flex-end;
  margin-top: 0;
  overflow: hidden;
}

.article-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.01);
}

.article-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.08) 0%,
      rgba(0, 0, 0, 0.14) 22%,
      rgba(255, 255, 255, 0.08) 42%,
      rgba(255, 255, 255, 0.4) 62%,
      rgba(255, 255, 255, 0.82) 82%,
      rgba(255, 255, 255, 1) 100%
    );
}

.article-hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-bottom: clamp(2rem, 6vw, 4.5rem);
}

.article-hero .breadcrumb,
.article-hero .meta {
  color: rgba(255, 255, 255, 0.9);
}

.article-hero .breadcrumb a {
  color: #ffffff;
}

.article-hero .breadcrumb a:hover {
  color: rgba(255, 255, 255, 0.85);
}

.article-hero .inline-link {
  color: #ffffff;
}

.article-hero h1 {
  color: #ffffff;
  max-width: 980px;
  margin-top: 0.8rem;
}

.article-wrap {
  padding: 1.5rem 0 4rem;
  position: relative;
  z-index: 3;
}

.article-title-overlap-wrap {
  margin-top: -8rem;
  position: relative;
  z-index: 2;
}

.article-title-overlap {
  margin: 0;
}

.article {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  max-width: 660px;
  margin: 0 auto;
  position: relative;
  z-index: 3;
}

.article h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.article h2 {
  margin-top: 2.2rem;
  font-size: 1.45rem;
  color: var(--text-heading);
}

.article p,
.article li {
  color: var(--text);
  line-height: 1.5;
  font-size: 16.9px;
}

.article p {
  margin-bottom: 1.5rem;
}

.article ul {
  padding-left: 1.25rem;
}

.article .lead {
  margin-top: 0.6rem;
}

.article h3 {
  margin-top: 1.8rem;
  font-size: 1.2rem;
  color: var(--text-heading);
  letter-spacing: -0.5px;
}

.article .inline-link {
  color: var(--text-heading);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article .inline-link:hover {
  opacity: 0.8;
}

.article-update {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.author-card {
  margin-top: 1rem;
  margin-bottom: 1.4rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.02);
  padding: 0.95rem 1rem;
}

.author-card p {
  margin: 0;
}

.author-card-title {
  font-size: 0.95rem;
  color: var(--text-heading);
  font-weight: 600;
}

.author-card-subtitle {
  margin-top: 0.35rem !important;
  font-size: 0.9rem;
  color: var(--muted);
}

.author-card a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.toc {
  margin-top: 1rem;
  margin-bottom: 2rem;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.02);
}

.toc-title {
  font-size: 0.9rem;
  margin: 0 0 0.55rem 0 !important;
  font-weight: 600;
  color: var(--text-heading);
}

.toc ol {
  margin: 0;
  padding-left: 1.1rem;
}

.toc li {
  margin: 0.25rem 0;
  line-height: 1.5;
}

.toc a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.faq-list {
  margin-top: 1rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.02);
  padding: 0.95rem 1rem;
  margin-bottom: 0.9rem;
}

.faq-item h3 {
  margin-top: 0;
}

.faq-item p {
  margin: 0.55rem 0 0;
}

.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
}

.article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.5;
}

.article th,
.article td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.article th {
  color: var(--text-heading);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.article td {
  color: var(--text);
}

.article tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0.6rem;
}

.breadcrumb a:hover {
  color: var(--text-heading);
}

.cta-box {
  margin-top: 2rem;
  border-radius: 16px;
  border: 1px solid rgba(218, 255, 0, 0.5);
  background: rgba(218, 255, 0, 0.15);
  padding: 1.25rem;
}

/* ─── Footer ─── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 60px 0;
  color: var(--text);
  background: var(--bg);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.footer-brand {
  display: flex;
  align-items: center;
}

.footer-col-title {
  font-size: 17.9px;
  color: var(--text-heading);
  letter-spacing: -0.5px;
  margin-bottom: 1.25rem;
  line-height: 27px;
}

.footer-col-links {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-col-links a {
  font-size: 15px;
  color: var(--text);
  letter-spacing: -0.3px;
  line-height: 22.5px;
  transition: color 0.2s ease;
}

.footer-col-links a:hover {
  color: var(--text-heading);
}

.footer-copyright {
  padding-top: 1.5rem;
  text-align: center;
  font-size: 14px;
  color: var(--text);
  letter-spacing: -0.3px;
  line-height: 21px;
}

.footer-copyright a {
  transition: color 0.2s ease;
}

.footer-copyright a:hover {
  color: var(--text-heading);
}

/* ─── Legacy utility-links (article footers) ─── */

.utility-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.8rem;
}

/* ─── Responsive ─── */

@media (min-width: 769px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
  }

  .site-footer {
    padding: 80px 0 30px;
  }
}

@media (max-width: 920px) {
  .card {
    grid-column: span 6;
  }
}

@media (max-width: 640px) {
  body {
    padding-top: 72px;
  }

  .site-header {
    background-color: rgba(255, 255, 255, 0.94);
  }

  .site-header-inner {
    flex-wrap: nowrap;
    justify-content: space-between;
    height: 72px;
    padding: 0 1rem;
  }

  .brand img {
    height: 30px;
  }

  .nav {
    width: auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 0.55rem;
  }

  .nav-link {
    display: none;
  }

  .nav-cta {
    padding: 8px 14px;
    font-size: 14px;
    line-height: 1;
  }

  .hero {
    padding-top: 3rem;
  }

  .article-hero {
    min-height: 42vh;
  }

  .article-title-overlap-wrap {
    margin-top: -5.2rem;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .card {
    grid-column: span 1;
  }

  .site-footer {
    padding: 72px 0 30px;
    background: #ffffff;
  }

  .site-footer .container {
    width: 100%;
    margin: 0 auto;
    padding: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      'brand brand'
      'prodotti legale'
      'risorse .';
    gap: 1.8rem 2rem;
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: 2rem;
  }

  .footer-grid > div:nth-child(1) {
    grid-area: brand;
  }

  .footer-grid > div:nth-child(2) {
    grid-area: prodotti;
  }

  .footer-grid > div:nth-child(3) {
    grid-area: legale;
  }

  .footer-grid > div:nth-child(4) {
    grid-area: risorse;
  }

  .footer-brand {
    justify-content: flex-start;
  }

  .footer-brand img {
    height: 30px;
  }

  .footer-col-title {
    margin-bottom: 0.85rem;
    font-size: 1.15rem;
    line-height: 1.25;
  }

  .footer-col-links {
    gap: 0.75rem;
  }

  .footer-col-links a {
    font-size: 1.04rem;
    line-height: 1.35;
  }

  .footer-copyright {
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.45;
    padding-top: 1.35rem;
  }
}

footer-grid {
  padding-left: 16px!important;
  padding-right: 16px!important;
}
