/* Stile del Blog EBVision: base e nav copiati da EBVision_Site.html, poi componenti blog. */
:root {
  --bg: #000;
  --bg-1: #0a0a0c;
  --bg-2: #111114;
  --surface: rgba(255,255,255,0.04);
  --surface-2: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.12);
  --border-2: rgba(255,255,255,0.18);
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #6e6e73;
  --accent: #ff3b30;
  --accent-2: #ff5c54;
  --accent-glow: rgba(255,59,48,0.35);
  --gold: #d4a24c;
  --radius: 20px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text); overflow-x: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  font-weight: 400; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .wrap { padding: 0 20px; } }

/* Typography */
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-2); font-family: 'JetBrains Mono', monospace; }
.display { font-weight: 800; letter-spacing: -0.04em; line-height: 0.95;
  background: linear-gradient(180deg, #fff 0%, #bdbdc4 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
h1.display { font-size: clamp(52px, 9.5vw, 148px); }
h2.display { font-size: clamp(40px, 6vw, 92px); }
h3.display { font-size: clamp(30px, 4vw, 52px); }
.muted { color: var(--text-2); }
.lead { font-size: clamp(17px, 1.4vw, 22px); color: var(--text-2); line-height: 1.55; font-weight: 400; }
.lead b { color: var(--text); font-weight: 500; }
.accent { color: var(--accent); }
.gold { color: var(--gold); }

/* Noise overlay */
.noise { position: fixed; inset: 0; pointer-events: none; z-index: 9999; opacity: .035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay; }

section { position: relative; padding: 140px 0; }
@media (max-width: 640px) { section { padding: 88px 0; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  font-size: 15px; font-weight: 500; letter-spacing: -0.01em;
  transition: all .25s cubic-bezier(.2,.9,.3,1);
  border: 1px solid var(--border); background: var(--surface);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  cursor: pointer; font-family: inherit; }
.btn:hover { background: var(--surface-2); border-color: var(--border-2); transform: translateY(-1px); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent);
  box-shadow: 0 10px 40px -10px var(--accent-glow); }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn svg { width: 16px; height: 16px; }

/* Glass card */
.glass { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(24px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(20px);
  transition: all .7s cubic-bezier(.2,.7,.3,1); }
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: .08s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: .16s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: .24s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: .32s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: .40s; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: .48s; }
.reveal-stagger.in > *:nth-child(8) { transition-delay: .56s; }

/* ═══ Top nav — glass pill ═══ */
nav.top {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%); z-index: 100;
  padding: 10px 14px 10px 22px;
  display: flex; justify-content: space-between; align-items: center; gap: 28px;
  background: rgba(15,15,18,0.65);
  backdrop-filter: saturate(180%) blur(28px); -webkit-backdrop-filter: saturate(180%) blur(28px);
  border: 1px solid var(--border); border-radius: 999px;
  box-shadow: 0 12px 40px rgba(0,0,0,.55);
  width: calc(100% - 48px); max-width: 1240px;
}
nav.top .brand-block { display: flex; align-items: center; }
nav.top .brand-block img { height: 76px; width: auto; display: block; flex: none;
  filter: drop-shadow(0 0 10px rgba(255,255,255,.35)); }
nav.top ul { list-style: none; display: flex; gap: 28px; flex: 1; justify-content: center; }
nav.top ul a { font-size: 14px; color: var(--text-2); transition: color .2s;
  letter-spacing: -0.005em; font-weight: 400; }
nav.top ul a:hover { color: var(--text); }
nav.top .cta { background: var(--accent); color: #fff; padding: 10px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  box-shadow: 0 8px 30px -6px var(--accent-glow); transition: all .2s;
  display: inline-flex; align-items: center; gap: 8px; }
nav.top .cta:hover { background: var(--accent-2); transform: scale(1.03); }
nav.top .cta svg { width: 14px; height: 14px; }
@media (max-width: 1100px) {
  nav.top .brand-tag { display: none; }
  nav.top ul { gap: 18px; }
}
@media (max-width: 880px) {
  nav.top { padding: 10px 10px 10px 16px; gap: 12px; }
  nav.top ul { display: none; }
  nav.top .cta { padding: 9px 16px; font-size: 13px; }
}
footer { background: var(--bg); padding: 48px 32px; border-top: 1px solid var(--border); }
.footer-row { max-width: 1280px; margin: 0 auto; display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 18px; }
footer .brand img { height: 26px; opacity: 0.85; }
footer p { font-size: 12px; color: var(--text-3); letter-spacing: 0.08em; }
.footer-legal { max-width: 1280px; margin: 24px auto 0; padding-top: 24px;
  border-top: 1px solid var(--border); font-size: 11px; color: var(--text-3);
  letter-spacing: 0.04em; line-height: 1.7; }
.footer-legal a { color: var(--text-3); text-decoration: underline; }
.footer-row a { color: inherit; text-decoration: none; }
.footer-row a:hover { color: var(--text); }
.footer-legal .legal-links { margin-top: 10px; }
.footer-legal .legal-links a { margin-right: 16px; }

nav.top ul a.current { color: var(--text); }
.breadcrumb { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 26px; }
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { margin: 0 10px; color: var(--accent); }

/* Testata del blog */
.bl-top { position: relative; padding: 190px 0 70px; overflow: hidden; border-bottom: 1px solid var(--border); }
.bl-top .hero-bg-glow { position: absolute; inset: -20% -10% auto auto; width: 70%; height: 140%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255,59,48,.22), transparent 70%); }
.bl-top .wrap { position: relative; }
.bl-top .eyebrow { display: block; margin-bottom: 20px; color: var(--accent); }
.bl-top h1.display { font-size: clamp(46px, 7vw, 104px); max-width: 1100px; }
.bl-top-article h1.display { font-size: clamp(34px, 4.8vw, 66px); line-height: 1.04; }
.bl-top .lead { max-width: 680px; margin-top: 26px; }
.display .accent, h2.display .accent { color: var(--accent); -webkit-text-fill-color: var(--accent); }
.bl-cta-band { text-align: center; border-top: 1px solid var(--border); padding: 110px 0;
  background: radial-gradient(60% 80% at 50% 100%, rgba(255,59,48,.16), transparent 70%); }
.bl-cta-band h2.display { font-size: clamp(36px, 5vw, 72px); margin: 18px auto; max-width: 900px; }
.bl-cta-band .lead { max-width: 640px; margin: 0 auto 30px; }
.bl-cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 640px) {
  .bl-top { padding: 150px 0 48px; }
  nav.top .brand-block img { height: 56px; }
  footer { padding: 40px 20px; }
}

/* ═══════════════════ BLOG ═══════════════════ */
.bl-section { padding: 72px 0; }
.bl-k { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent-2); font-weight: 500; }
.bl-layout { display: grid; grid-template-columns: 260px minmax(0, 760px); gap: 64px; justify-content: center; align-items: start; }
.bl-toc { position: sticky; top: 130px; }
.bl-toc-in { border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; background: var(--surface); }
.bl-toc ol { list-style: none; counter-reset: t; margin: 14px 0 18px; display: grid; gap: 10px; }
.bl-toc li { counter-increment: t; font-size: 13.5px; line-height: 1.4; display: flex; gap: 10px; }
.bl-toc li::before { content: counter(t, decimal-leading-zero); font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-3); padding-top: 2px; }
.bl-toc a { color: var(--text-2); transition: color .2s; }
.bl-toc a:hover { color: var(--text); }
.bl-toc-btn { width: 100%; justify-content: center; font-size: 14px; padding: 12px 16px; }

.bl-article { font-size: 17.5px; line-height: 1.75; color: var(--text-2); min-width: 0; }
.bl-article > p, .bl-article > ul, .bl-article > ol { margin-bottom: 22px; }
.bl-article strong { color: var(--text); font-weight: 600; }
.bl-article a:not(.btn):not(.bl-card) { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.bl-article h2 { color: var(--text); font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; letter-spacing: -0.025em;
  font-weight: 700; margin: 56px 0 18px; scroll-margin-top: 120px; }
.bl-article h3 { color: var(--text); font-size: 21px; margin: 32px 0 12px; }
.bl-article ul, .bl-article ol { padding-left: 22px; }
.bl-article li { margin-bottom: 8px; }
.bl-article li::marker { color: var(--accent-2); }
.bl-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; font-size: 13px; color: var(--text-3); margin-bottom: 26px;
  font-family: 'JetBrains Mono', monospace; }
.bl-tag { background: var(--accent); color: #fff; border-radius: 999px; padding: 4px 12px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.bl-lead { font-size: clamp(19px, 1.6vw, 23px); line-height: 1.55; color: var(--text); margin-bottom: 30px; }

.bl-fig { margin: 34px 0; }
.bl-fig img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); aspect-ratio: 16/9; object-fit: cover; }
.bl-fig figcaption, .bl-table figcaption { font-size: 13px; color: var(--text-3); margin-top: 10px; line-height: 1.5; }

.bl-callout { border: 1px solid var(--border); border-left: 3px solid var(--accent); background: var(--surface);
  border-radius: 14px; padding: 20px 24px; margin: 30px 0; }
.bl-callout p { margin-top: 6px; color: var(--text); font-size: 16.5px; line-height: 1.65; }

.bl-check { list-style: none; padding-left: 0 !important; display: grid; gap: 12px; }
.bl-check li { position: relative; padding-left: 34px; margin: 0; }
.bl-check li::before { content: ""; position: absolute; left: 0; top: 5px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'><path d='M6 12l4 4 8-8'/></svg>") center/14px no-repeat; }

.bl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 34px 0; }
.bl-stat { border: 1px solid var(--border); border-radius: 16px; padding: 22px 18px; background: linear-gradient(160deg, var(--surface-2), transparent); }
.bl-stat b { display: block; font-size: clamp(28px, 3vw, 38px); letter-spacing: -0.03em; color: var(--text); line-height: 1; margin-bottom: 10px; }
.bl-stat span { font-size: 13.5px; line-height: 1.4; color: var(--text-2); display: block; }

.bl-bars { border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; margin: 34px 0; background: var(--surface); }
.bl-bars-t { font-size: 15px; color: var(--text); font-weight: 600; margin-bottom: 18px; }
.bl-bar { margin-bottom: 16px; }
.bl-bar-l { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; color: var(--text); margin-bottom: 6px; }
.bl-bar-l b { font-family: 'JetBrains Mono', monospace; font-weight: 500; }
.bl-bar-track { height: 10px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.bl-bar-track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.bl-bar small { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 5px; line-height: 1.4; }
.bl-src { display: block; font-size: 12px; color: var(--text-3); margin-top: 6px; }

.bl-steps { list-style: none; padding-left: 0 !important; margin: 30px 0; position: relative; }
.bl-steps::before { content: ""; position: absolute; left: 21px; top: 10px; bottom: 10px; width: 1px; background: var(--border-2); }
.bl-steps li { display: flex; gap: 20px; margin-bottom: 22px; position: relative; }
.bl-n { flex: none; width: 43px; height: 43px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2);
  border: 1px solid var(--accent); color: var(--text); font-family: 'JetBrains Mono', monospace; font-size: 13px; z-index: 1; }
.bl-steps h4 { color: var(--text); font-size: 17px; margin: 8px 0 4px; }
.bl-steps p { font-size: 16px; line-height: 1.65; }

.bl-table { margin: 34px 0; }
.bl-table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 16px; }
.bl-table table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; min-width: 520px; }
.bl-table th, .bl-table td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.bl-table thead th { color: var(--text); background: var(--surface-2); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.bl-table tbody th { color: var(--text); font-weight: 600; }
.bl-table tbody tr:last-child th, .bl-table tbody tr:last-child td { border-bottom: 0; }

.bl-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 30px 0; }
.bl-card { border: 1px solid var(--border); border-radius: 16px; padding: 20px; background: var(--surface); display: flex; flex-direction: column; gap: 8px;
  text-decoration: none !important; transition: border-color .2s, transform .2s; }
a.bl-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.bl-card h4 { color: var(--text); font-size: 17px; line-height: 1.3; }
.bl-card p { font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.bl-go { margin-top: auto; padding-top: 6px; font-size: 13.5px; color: var(--accent-2); font-weight: 500; }

.bl-photos { margin: 34px 0; }
.bl-photos-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.bl-photos-3 .bl-photos-grid { grid-template-columns: repeat(3, 1fr); }
.bl-photo { position: relative; display: block; border-radius: 16px; overflow: hidden; border: 1px solid var(--border);
  aspect-ratio: 4/5; text-decoration: none !important; }
.bl-photos-2 .bl-photo { aspect-ratio: 4/3; }
.bl-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.bl-photo:hover img { transform: scale(1.05); }
.bl-photo-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 12px; font-size: 13px; line-height: 1.35; color: #fff; font-weight: 500;
  background: linear-gradient(transparent, rgba(0,0,0,.82)); }
.bl-photos-more { display: inline-block; margin-top: 12px; font-size: 14px; color: var(--accent-2) !important; text-decoration: none !important; font-weight: 500; }
.bl-photos-more:hover { color: var(--text) !important; }
@media (max-width: 640px) {
  .bl-photos-3 .bl-photos-grid { grid-template-columns: 1fr 1fr; }
  .bl-photos-3 .bl-photo:first-child { grid-column: span 2; aspect-ratio: 4/3; }
}

.bl-inline-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin: 48px 0 10px;
  border-radius: var(--radius); padding: 28px; border: 1px solid var(--accent);
  background: radial-gradient(120% 140% at 0% 0%, var(--accent-glow), transparent 60%), var(--surface); }
.bl-inline-cta h4 { color: var(--text); font-size: 21px; margin-bottom: 6px; }
.bl-inline-cta p { font-size: 15.5px; line-height: 1.55; }

.bl-faq { display: grid; gap: 10px; margin-top: 10px; }
.bl-faq details { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 0 20px; }
.bl-faq summary { cursor: pointer; padding: 17px 0; color: var(--text); font-weight: 600; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.bl-faq summary::-webkit-details-marker { display: none; }
.bl-faq summary::after { content: "+"; color: var(--accent-2); font-size: 22px; line-height: 1; }
.bl-faq details[open] summary::after { content: "–"; }
.bl-faq details p { padding-bottom: 18px; font-size: 15.5px; line-height: 1.65; }

.bl-author { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 15px; line-height: 1.6; }
.bl-author p { margin-top: 6px; }

.bl-related { border-top: 1px solid var(--border); background: var(--bg-1); }
.bl-related-t { color: var(--text); font-size: clamp(26px, 2.6vw, 36px); letter-spacing: -0.03em; margin-bottom: 30px; }
.bl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.bl-post { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); display: flex; flex-direction: column;
  transition: border-color .25s, transform .25s; }
.bl-post:hover { border-color: var(--accent); transform: translateY(-3px); }
.bl-post-img { aspect-ratio: 16/10; overflow: hidden; }
.bl-post-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.bl-post:hover .bl-post-img img { transform: scale(1.04); }
.bl-post-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.bl-post h3 { color: var(--text); font-size: 19px; line-height: 1.3; letter-spacing: -0.01em; }
.bl-post p { font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.bl-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.bl-cats span { border: 1px solid var(--border-2); border-radius: 999px; padding: 6px 14px; font-size: 13px; color: var(--text-2); }

@media (max-width: 1080px) {
  .bl-layout { grid-template-columns: minmax(0, 760px); gap: 0; }
  .bl-toc { position: static; margin-bottom: 36px; }
  .bl-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .bl-section { padding: 48px 0; }
  .bl-article { font-size: 16.5px; }
  .bl-grid { grid-template-columns: 1fr; }
  .bl-bars { padding: 18px; }
  .bl-steps li { gap: 14px; }
  .bl-inline-cta { padding: 22px; }
}
