/* ============================================================================
   LLM Wiki & LSC — design system standard (SITE_STANDARD.md §3)
   Token ambra, tema scuro/chiaro, componenti §6.
   ---------------------------------------------------------------------------- */
:root {
  color-scheme: dark;
  --bg: #0a0810;
  --bg-2: #0f0c18;
  --surface: #15121f;
  --surface-2: #1c1829;
  --surface-3: #241f35;
  --line: #272136; --line-2: #332b4a; --line-3: #413760;
  --text: #ece9f5; --text-2: #bdb6d0; --text-dim: #8b81a3; --faint: #5c5478;
  --accent: #ffa940; --accent-dim: #d98a1f; --accent-ink: #1c1206;
  --accent-soft: rgba(255,169,64,.10); --accent-glow: rgba(255,169,64,.25);
  --teal: #37d4a0; --red: #ff5a45; --amber: #ffcf3f;
  --radius: 14px; --radius-sm: 10px; --radius-lg: 24px;
  --shadow: 0 2px 4px rgba(0,0,0,.4), 0 12px 40px rgba(0,0,0,.3);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --mono: "Cascadia Mono", "JetBrains Mono", ui-monospace, Consolas, monospace;
  --max: 1200px;
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #faf7f2; --bg-2: #f3efe7;
  --surface: #ffffff; --surface-2: #f6f2ea; --surface-3: #efe9dd;
  --line: #e5ded0; --line-2: #d8cfc0; --line-3: #c4b8a4;
  --text: #221c14; --text-2: #4c4234; --text-dim: #7a6f5e; --faint: #a79a86;
  --accent: #c2410c; --accent-dim: #9a3412; --accent-ink: #fff7ed;
  --accent-soft: rgba(194,65,12,.10); --accent-glow: rgba(194,65,12,.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--bg); font: 16px/1.65 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; min-height: 100vh; }
a { color: var(--accent); transition: opacity .15s; }
a:hover { opacity: .85; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
h2 { font-size: clamp(22px, 3.2vw, 32px); margin: 0 0 10px; letter-spacing: -.02em; }
h3 { margin: 0 0 8px; font-size: 15px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent-soft); color: var(--text); }
code { font-family: var(--mono); font-size: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; color: var(--accent); overflow-wrap: anywhere; }
pre { font-family: var(--mono); font-size: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow-x: auto; margin: 12px 0 0; line-height: 1.55; color: var(--text-2); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---- Header / nav (§5) ---- */
.top { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(18px) saturate(1.4); border-bottom: 1px solid var(--line); }
.nav { min-height: 68px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; }
.brand { font-weight: 800; letter-spacing: -.03em; color: var(--text); white-space: nowrap; font-size: 17px; display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line-3); border-radius: 9px; background: linear-gradient(145deg, var(--surface-3), var(--bg-2)); box-shadow: inset 0 0 12px var(--accent-soft); }
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent), 0 0 24px var(--accent-soft); animation: pulse 3s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 12px var(--accent), 0 0 24px var(--accent-soft); } 50% { box-shadow: 0 0 18px var(--accent), 0 0 36px var(--accent-glow); } }
.nav-links { min-width: 0; display: flex; justify-content: flex-end; align-items: center; gap: 2px; }
.nav-link { position: relative; color: var(--text-dim); font-size: 13.5px; padding: 8px 10px; border-radius: 8px; white-space: nowrap; text-decoration: none; transition: background .15s, color .15s; }
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.active { color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.nav-link.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.nav-actions { display: flex; align-items: center; justify-self: end; gap: 7px; }
.ctrl-btn { min-height: 36px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); border-radius: 9px; padding: 6px 11px; font-size: 12.5px; white-space: nowrap; transition: border-color .15s, background .15s, transform .15s; }
.ctrl-btn:hover { border-color: var(--line-3); background: var(--surface-2); transform: translateY(-1px); }
.lang-btn { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-weight: 700; }
.lang-btn [data-lang-code] { color: var(--faint); }
.lang-btn [data-lang-code].is-current { color: var(--accent); }
.lang-divider { color: var(--line-3); }
.theme-btn { display: inline-flex; align-items: center; gap: 7px; }
.theme-icon { width: 13px; height: 13px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); outline: 1px solid var(--accent-dim); box-shadow: 0 0 12px var(--accent-soft); }
.theme-btn[data-theme="light"] .theme-icon { background: var(--text-2); outline-color: var(--text-dim); box-shadow: none; }
/* menu mobile: bottone etichettato, 44×44, accento (§5.2) */
.menu-toggle { display: none; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--accent-dim); background: var(--surface); color: var(--accent); border-radius: 9px; padding: 0 12px; font-size: 13.5px; font-weight: 700; box-shadow: 0 0 0 rgba(0,0,0,0); transition: background .15s, box-shadow .15s; }
.menu-toggle:hover { background: var(--accent-soft); box-shadow: 0 0 14px var(--accent-glow); }
.menu-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; transform: translateY(-150%); padding: 9px 14px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; }
.skip-link:focus { transform: translateY(0); }

@media (max-width: 1180px) {
  .nav { gap: 10px; }
  .nav-link { padding-inline: 7px; font-size: 12.5px; }
  .brand-name { font-size: 16px; }
}
@media (max-width: 980px) {
  html.js .menu-toggle { display: inline-flex; justify-self: end; }
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; padding: 12px 24px 16px; border-bottom: 1px solid var(--line-2); background: var(--bg); box-shadow: 0 18px 35px rgba(0,0,0,.24); }
  html.js .nav-links.open { display: grid; }
  html:not(.js) .nav-links { position: static; grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 2px 6px; padding: 8px 0 14px; border-bottom: 0; background: none; box-shadow: none; }
  html:not(.js) .nav-link { padding: 7px 9px; font-size: 13px; }
  .nav-link { padding: 10px 12px; font-size: 13.5px; }
  .nav-link.active::after { left: 12px; right: auto; bottom: 7px; width: 18px; }
}
@media (max-width: 560px) {
  .brand-name { display: none; }
  .nav-links { grid-template-columns: 1fr; padding-inline: 16px; }
  html:not(.js) .nav-links { display: flex; grid-template-columns: none; padding-inline: 0; }
  .theme-text { display: none; }
  .theme-btn { width: 44px; padding-inline: 0; justify-content: center; }
  .lang-btn { min-width: 58px; justify-content: center; }
}

/* ---- Hero (§6.1) ---- */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding: 80px 0 56px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; gap: 32px; padding: 48px 0 32px; } }
.hero h1 { font-size: clamp(34px, 5.5vw, 60px); line-height: 1.02; margin: 0 0 18px; letter-spacing: -.035em; background: linear-gradient(135deg, var(--text), var(--text-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero h1 .accent, .hero h1 .it, .hero h1 .en { background: linear-gradient(135deg, var(--accent), var(--teal)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero .lead { color: var(--text-2); font-size: clamp(15px, 1.8vw, 18px); max-width: 600px; margin: 0 0 28px; line-height: 1.7; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.badge { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: 12px; color: var(--text-dim); transition: border-color .15s, transform .15s; }
.badge:hover { border-color: var(--line-3); transform: translateY(-1px); }
.badge b { color: var(--text-2); font-weight: 700; }
.hero-face-wrap { display: grid; place-items: center; position: relative; }
.hero-face-frame { background: #000; border: 1px solid var(--line-2); border-radius: 28px; padding: 14px; box-shadow: var(--shadow), 0 0 60px var(--accent-soft); max-width: 460px; width: 100%; overflow: hidden; }
.hero-face-frame img { display: block; width: 100%; height: auto; border-radius: 16px; background: #000; }

/* ---- Sezioni (§6.2) ---- */
section { padding: 52px 0; }
main > section { border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent); }
main > section:last-of-type { border-bottom: 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .55fr); gap: 28px; align-items: end; margin-bottom: 28px; }
.section-head h2 { margin-bottom: 0; }
.section-head .section-lead { margin: 0; }
.section-lead { color: var(--text-dim); margin: 0 0 32px; max-width: 780px; font-size: 15px; line-height: 1.65; }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; gap: 12px; align-items: start; } }
.area { margin-top: 40px; }
.area h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); margin: 0 0 16px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.area h3::before { content: ""; display: inline-block; width: 24px; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); }

/* ---- Bottoni ---- */
.btn { display: inline-flex; align-items: center; gap: 7px; border-radius: 10px; padding: 11px 18px; font-weight: 600; font-size: 14px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); cursor: pointer; transition: background .15s, border-color .15s, transform .1s, box-shadow .15s; text-decoration: none; }
.btn:hover { background: var(--surface-2); transform: translateY(-1px); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-dim)); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 16px var(--accent-soft); }
.btn.primary:hover { filter: brightness(1.06); box-shadow: 0 6px 24px var(--accent-glow); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--line); }
.btn.sm { padding: 6px 12px; font-size: 13px; }

/* ---- Griglie e card (§6.3) ---- */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .g2,.g3,.g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .g2,.g3,.g4 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: border-color .2s, transform .2s, box-shadow .2s; position: relative; overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, var(--accent-soft), transparent 60%); opacity: 0; transition: opacity .2s; pointer-events: none; }
.card:hover { border-color: var(--line-3); transform: translateY(-2px); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card p { color: var(--text-dim); font-size: 14px; line-height: 1.6; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2); font-size: 12px; }

/* ---- Immagini (§6.4/§6.5) ---- */
.shot { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s, transform .2s, box-shadow .2s; }
.shot:hover { border-color: var(--line-3); transform: translateY(-2px); box-shadow: var(--shadow); }
.shot img { display: block; width: 100%; height: auto; background: #000; }
.card .shot img { aspect-ratio: 4 / 3; object-fit: cover; object-position: center; max-height: 340px; }
.shot figcaption { padding: 11px 14px; font-size: 12.5px; color: var(--text-dim); border-top: 1px solid var(--line); line-height: 1.55; }
.shot figcaption b { color: var(--text); font-size: 13px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 860px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } }

/* ---- Stats / KPI / panel / rows / link card ---- */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-top: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px; text-align: center; position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.stat b { display: block; font-size: clamp(26px, 4vw, 40px); line-height: 1; color: var(--accent); letter-spacing: -.03em; font-weight: 800; }
.stat span { display: block; margin-top: 8px; font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.kpi { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.kpi span { display: block; font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; }
.kpi b { display: block; margin-top: 6px; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.accent b { color: var(--accent); } .kpi.ok b { color: var(--teal); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.panel-h { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.panel-h h2 { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); margin: 0; }
.panel-b { padding: 20px; }
.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.r-label { flex: 1; min-width: 0; font-size: 13px; color: var(--text-2); }
.r-label small { display: block; color: var(--text-dim); font-size: 11.5px; }
.r-value { color: var(--text); font-size: 13px; white-space: nowrap; }
.r-value.mono { font-family: var(--mono); font-size: 12px; }
.link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .link-grid { grid-template-columns: 1fr; } }
.link-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 17px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s, background .15s; }
.link-card:hover { border-color: var(--accent-dim); background: var(--surface-2); transform: translateY(-1px); }
.link-card span { color: var(--text-dim); font-size: 13px; }
.prose { color: var(--text-2); max-width: 78ch; }
.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }
.prose-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(240px, .6fr); gap: 24px; align-items: start; }
@media (max-width: 860px) { .prose-grid { grid-template-columns: minmax(0, 1fr); } }
.prose-grid > *, .area, .reveal { min-width: 0; }
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.feature-list li { position: relative; padding: 12px 14px 12px 42px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-2); }
.feature-list li::before { content: ""; position: absolute; left: 16px; top: 19px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent-soft); }
.callout-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 820px) { .callout-grid { grid-template-columns: 1fr; } }
.callout { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 18px; }
.callout p { margin: 0; color: var(--text-dim); font-size: 13px; }
.note { border-left: 3px solid var(--accent); background: linear-gradient(90deg, var(--accent-soft), transparent); border-radius: 0 var(--radius) var(--radius) 0; padding: 14px 18px; color: var(--text-2); margin: 18px 0; font-size: 13.5px; }
.note.ok { border-left-color: var(--teal); background: linear-gradient(90deg, var(--teal-soft, rgba(55,212,160,.12)), transparent); }

/* ---- Process steps ---- */
.process { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.process-step { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 16px; padding: 18px; border-bottom: 1px solid var(--line); }
.process-step:last-child { border-bottom: 0; }
.process-step::before { counter-increment: step; content: counter(step, decimal-leading-zero); color: var(--accent); font: 700 12px/1.7 var(--mono); }
.process { counter-reset: step; }
.step-body { min-width: 0; display: grid; gap: 8px; align-content: start; }
.step-body p { margin: 0; color: var(--text-dim); font-size: 13px; }
@media (max-width: 560px) { .process-step { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 14px; } }

/* ---- Tabelle / API ---- */
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.table-wrap table { width: 100%; border-collapse: collapse; min-width: 0; font-size: 13px; }
.table-wrap th, .table-wrap td { padding: 11px 13px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.table-wrap th { color: var(--text-dim); background: var(--surface-2); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; }
.table-wrap tr:last-child td { border-bottom: 0; }
.api-grp { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 14px; margin: 14px 0; overflow: hidden; }
.api-grp summary { cursor: pointer; font-weight: 700; padding: 12px 0; list-style: none; display: flex; align-items: center; gap: 10px; }
.api-grp summary::before { content: "▸"; color: var(--accent); transition: transform .15s; display: inline-block; }
.api-grp[open] summary::before { transform: rotate(90deg); }
.api-grp table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 4px 0 8px; min-width: 0; }
.api-grp th, .api-grp td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.api-grp th { color: var(--text-dim); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.method { display: inline-block; border-radius: 5px; padding: 1px 7px; font-size: 10.5px; font-weight: 800; }
.method.get { background: rgba(55,212,160,.12); color: var(--teal); }
.method.post { background: var(--accent-soft); color: var(--accent); }
.method.del { background: rgba(255,90,69,.12); color: var(--red); }

/* ---- Tab (§6.6) ---- */
.tab-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tab-btn { border: 1px solid var(--accent-soft); background: var(--surface); color: var(--accent); border-radius: 999px; padding: 8px 16px; font-weight: 600; cursor: pointer; transition: background .15s, box-shadow .15s; }
.tab-btn:hover { background: var(--accent-soft); box-shadow: 0 0 14px var(--accent-glow); }
.tab-btn.active { background: linear-gradient(135deg, var(--accent), var(--accent-dim)); color: var(--accent-ink); border-color: var(--accent); }
html.js .tab-panel { display: none; }
html.js .tab-panel.active { display: block; }

/* ---- Footer ---- */
footer { border-top: 1px solid var(--line); padding: 36px 0 64px; color: var(--text-dim); font-size: 13px; background: linear-gradient(180deg, transparent, var(--bg-2)); }
footer .row { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.footer-meta { display: flex; gap: 8px 20px; flex-wrap: wrap; }
.footer-meta a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 3px; }
.footer-meta a:hover { color: var(--accent); }
.footer-general { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.footer-general:hover { color: var(--text); opacity: .9; }

/* ---- Lightbox ---- */
.is-zoomable { cursor: zoom-in; transition: filter .2s, box-shadow .2s; }
.is-zoomable:hover, .is-zoomable:focus-visible { filter: brightness(1.06); }
.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(5,3,10,.9); backdrop-filter: blur(10px); animation: lb-fade .2s ease; }
.lightbox-image { position: relative; z-index: 1; max-width: 100%; max-height: 86vh; border-radius: var(--radius); border: 1px solid var(--line-2); box-shadow: var(--shadow); background: #000; }
.lightbox-caption { position: relative; z-index: 1; max-width: 880px; margin-top: 12px; color: var(--text-2); font-size: 13.5px; text-align: center; }
.lightbox-close { position: absolute; top: 18px; right: 18px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: 22px; line-height: 1; display: grid; place-items: center; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; }
.lightbox-close:hover { background: var(--surface-2); border-color: var(--line-3); transform: translateY(-1px); }
body.lightbox-open { overflow: hidden; }
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---- Bilingual spans (§4.1) ---- */
html[lang="en"] .it { display: none !important; }
html[lang="it"] .en { display: none !important; }

/* ---- Reveal ---- */
html.js .reveal { transition: opacity .6s cubic-bezier(.22,.61,.36,1), transform .6s cubic-bezier(.22,.61,.36,1); }
html.js .reveal.pending { opacity: 0; transform: translateY(14px); }
html.js .reveal.visible { opacity: 1; transform: none; }
html.js .reveal-stagger > * { transition: opacity .5s ease, transform .5s ease; }
html.js .reveal-stagger.pending > * { opacity: 0; transform: translateY(12px); }
html.js .reveal-stagger.visible > * { opacity: 1; transform: none; }
.reveal-stagger.visible > :nth-child(1) { transition-delay: .05s; }
.reveal-stagger.visible > :nth-child(2) { transition-delay: .1s; }
.reveal-stagger.visible > :nth-child(3) { transition-delay: .15s; }
.reveal-stagger.visible > :nth-child(4) { transition-delay: .2s; }
.reveal-stagger.visible > :nth-child(5) { transition-delay: .25s; }
.reveal-stagger.visible > :nth-child(6) { transition-delay: .3s; }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal, .reveal > *, .reveal-stagger, .reveal-stagger > * { opacity: 1; transform: none; }
  .brand .dot { animation: none; }
}
