/* ==========================================================
   Portfolio Alberto Davide Aramu – discesa nell'oceano digitale
   Palette: blu profondo, ciano dei dati, ambra della lampada
   ========================================================== */

@font-face { font-family: "Unbounded"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/unbounded-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Unbounded"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/unbounded-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --ink: #eaf6fa;
  --muted: #a5c3cf;
  --cyan: #7ff3ff;
  --cyan-soft: rgba(127, 243, 255, .22);
  --lamp: #f2a93b;
  --abyss: #010a12;
  --panel: rgba(3, 20, 33, .68);
  --f-display: "Unbounded", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wrap: 1180px;
  --gut: clamp(1.25rem, 4vw, 3rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font: 400 1.0625rem/1.65 var(--f-body);
  color: var(--ink);
  background: linear-gradient(180deg, #0a3550 0%, #082c48 10%, #061f3a 30%, #05142d 60%, #030b1e 85%, #02060f 100%);
  overflow-x: hidden;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
[hidden] { display: none !important; }

/* ---------- Scena ---------- */
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.no-webgl #scene { display: none; }
.surface-glow {
  position: fixed; top: 0; left: 0; right: 0; height: 46vh; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 55% 100% at 58% -22%, rgba(255, 244, 214, .30), rgba(150, 215, 255, .10) 45%, rgba(150, 215, 255, 0) 72%);
  mix-blend-mode: screen; opacity: var(--glow, 1);
}

/* ---------- Accessibilità ---------- */
.skip { position: fixed; left: 1rem; top: -4rem; z-index: 100; background: var(--lamp); color: #1a1002; padding: .6rem 1rem; font-weight: 600; transition: top .15s; }
.skip:focus { top: 1rem; }

/* ---------- Navigazione ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem var(--gut);
  /* --nav-a va da 0 a 1 mentre scorri: lo sfondo compare in modo graduale */
  background: rgba(2, 14, 24, calc(var(--nav-a, 0) * .74));
  backdrop-filter: blur(calc(var(--nav-a, 0) * 12px)); -webkit-backdrop-filter: blur(calc(var(--nav-a, 0) * 12px));
  border-bottom: 1px solid rgba(127, 243, 255, calc(var(--nav-a, 0) * .22));
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 46px; width: auto; display: block; opacity: .96; transition: opacity .2s, transform .2s; }
.brand:hover img { opacity: 1; transform: translateY(-1px); }
.links { display: flex; gap: 1.75rem; }
.links a { text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--ink); padding: .3rem 0; border-bottom: 1px solid transparent; transition: border-color .2s; }
.links a:hover { border-bottom-color: var(--cyan); }
.nav-end { display: flex; align-items: center; gap: .9rem; }
.nav-cta { text-decoration: none; font-weight: 600; font-size: .9rem; color: #1a1002; background: var(--lamp); padding: .45rem .95rem; border-radius: 2px; transition: box-shadow .2s; }
.nav-cta:hover { box-shadow: 0 0 22px rgba(242, 169, 59, .55); }
.lang { display: inline-flex; border: 1px solid var(--cyan-soft); border-radius: 2px; overflow: hidden; }
.lang button { font: 500 .78rem/1 var(--f-mono); color: var(--muted); background: transparent; border: 0; padding: .5rem .65rem; cursor: pointer; }
.lang button[aria-pressed="true"] { background: rgba(127, 243, 255, .18); color: var(--cyan); }

/* ---------- Strumenti di bordo ---------- */
.hud {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; gap: 1.8rem; pointer-events: none;
  padding: 1.9rem var(--gut) .6rem max(var(--gut), calc((100vw - var(--wrap)) / 2 + var(--gut)));
  font-family: var(--f-mono); font-size: .72rem; color: var(--muted);
  background: linear-gradient(to top, rgba(1, 10, 18, var(--hud, .9)) 62%, rgba(1, 10, 18, 0));
}
.hud b { display: block; font-weight: 500; font-size: .98rem; color: var(--ink); }
.gauge {
  position: fixed; right: clamp(.6rem, 1.6vw, 1.4rem); top: 20vh; height: 58vh; width: 16px; z-index: 25;
  border-left: 1px solid var(--cyan-soft);
  background: repeating-linear-gradient(to bottom, rgba(127, 243, 255, .45) 0 1px, transparent 1px 16px) left top / 8px 100% no-repeat;
}
.gauge-mark { position: absolute; left: -7px; width: 22px; height: 2px; top: 0; background: var(--lamp); box-shadow: 0 0 10px var(--lamp); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
main { position: relative; z-index: 5; }
.section { position: relative; padding-block: clamp(5.5rem, 14vh, 9.5rem); }

h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 500; line-height: 1.12; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: clamp(1.7rem, 3.8vw, 3rem); margin-bottom: 1.4rem; max-width: 20ch; }
h3 { font-size: 1.05rem; line-height: 1.3; }
h4 { font-size: .95rem; line-height: 1.3; }
p { max-width: 62ch; }
p + p { margin-top: 1rem; }
.intro { color: var(--muted); max-width: 52ch; margin-bottom: 2.6rem; }

.depth-mark {
  font: 400 .85rem/1 var(--f-mono); color: var(--cyan); margin-bottom: 1.25rem;
  display: inline-flex; align-items: center; gap: .6rem; max-width: none;
}
.depth-mark::before { content: "//"; color: var(--cyan); opacity: .75; }
.depth-mark .layer { color: var(--muted); }
.depth-mark .layer::before { content: "\00b7"; margin-right: .6rem; opacity: .6; }

/* ---------- Bottoni ---------- */
.actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  font: 600 .98rem/1 var(--f-body); padding: .95rem 1.6rem; border-radius: 2px; border: 1px solid transparent; cursor: pointer;
  transition: box-shadow .2s, transform .2s, border-color .2s, background .2s;
}
.btn-lamp { background: var(--lamp); color: #1a1002; }
.btn-lamp:hover { box-shadow: 0 0 30px rgba(242, 169, 59, .55); transform: translateY(-1px); }
.btn-line { border-color: var(--cyan-soft); color: var(--ink); background: rgba(2, 14, 24, .3); }
.btn-line:hover { border-color: var(--cyan); background: rgba(127, 243, 255, .1); }

/* ---------- Superficie ---------- */
.hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 6.5rem 0 5rem; position: relative; z-index: 5; }
.hero h1 { margin: 0 0 1.7rem; max-width: none; line-height: 0; }
.lead { font-size: clamp(1.15rem, 2.1vw, 1.5rem); line-height: 1.45; max-width: 30ch; font-weight: 500; }
.sub { color: #c4dde6; margin-top: 1rem; max-width: 36ch; font-size: 1.02rem; line-height: 1.55; }
.hint { position: absolute; left: 50%; bottom: 3.6rem; transform: translateX(-50%); font: 400 .78rem/1 var(--f-mono); color: var(--muted); text-align: center; max-width: none; }
.hint::after { content: ""; display: block; width: 1px; height: 34px; margin: .7rem auto 0; background: linear-gradient(var(--cyan), transparent); animation: cue 2.2s ease-in-out infinite; }
@keyframes cue { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Pannelli a mirino ---------- */
.panel {
  position: relative; background: var(--panel); border: 1px solid var(--cyan-soft); border-radius: 2px;
  padding: 1.4rem 1.4rem 1.5rem; backdrop-filter: blur(10px) saturate(1.15); -webkit-backdrop-filter: blur(10px) saturate(1.15);
  transition: border-color .25s;
}
.panel::before, .panel::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid var(--cyan); pointer-events: none; transition: width .25s, height .25s; }
.panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.panel::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.site:hover, .tool:hover { border-color: rgba(127, 243, 255, .5); }
.site:hover::before, .site:hover::after, .tool:hover::before, .tool:hover::after { width: 30px; height: 30px; }
.panel p { color: #d3e7ee; }

.grid { display: grid; gap: 1.25rem; }
.sites { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem; }
.sites > .site { flex: 0 0 calc((100% - 2.5rem) / 3); }
@media (max-width: 1000px) { .sites > .site { flex-basis: calc((100% - 1.25rem) / 2); } }
@media (max-width: 640px)  { .sites > .site { flex-basis: 100%; } }
.tools { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.brands { grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }

/* ---------- Chi sono ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.about-text { grid-column: 2; }
.portrait { grid-column: 1; grid-row: 1; align-self: end; justify-self: start; }
.portrait img { width: clamp(130px, 18vw, 210px); aspect-ratio: 1; object-fit: cover; border-radius: 50% 50% 18% 50%; border: 4px solid #4a9aa0; box-shadow: 0 0 40px rgba(74, 154, 160, .35); }
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1.25rem; margin-top: 4.5rem; }
.services h3 { margin-bottom: .6rem; }
.steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 1.5rem; margin-top: 3.5rem; }
.steps li { padding-top: 1.4rem; border-top: 1px solid var(--cyan-soft); position: relative; }
.step-ico { position: absolute; top: -1.7rem; left: 0; width: 3.4rem; height: 3.4rem; padding: .35rem; background: rgba(2, 14, 24, .88); border: 1px solid var(--cyan-soft); border-radius: 2px; }
.step-ico svg { width: 100%; height: 100%; display: block; overflow: visible; }
.step-ico .ln, .step-ico .rays path { fill: none; stroke: var(--cyan); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.step-ico .dot { fill: var(--cyan); }
.step-ico .flame { fill: var(--lamp); }
.steps h3 { margin-top: 1.6rem; }
/* disegno delle linee quando i passaggi entrano nello schermo, poi un movimento leggero */
.js .steps .ln { stroke-dasharray: 400; stroke-dashoffset: 400; }
.js .steps.in .ln { animation: draw 1.4s ease forwards; }
.js .steps.in li:nth-child(2) .ln { animation-delay: .25s; }
.js .steps.in li:nth-child(3) .ln { animation-delay: .5s; }
.js .steps.in li:nth-child(4) .ln { animation-delay: .75s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.steps.in .dot { animation: typing 1.4s ease-in-out infinite; }
.steps.in .d2 { animation-delay: .2s; } .steps.in .d3 { animation-delay: .4s; }
@keyframes typing { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-1.5px); } }
.steps.in .rays { animation: glow 2.4s ease-in-out infinite; transform-origin: 20px 19px; }
@keyframes glow { 0%, 100% { opacity: .2; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.04); } }
.steps.in .gear { animation: spin 7s linear infinite; transform-origin: 20px 20px; }
@keyframes spin { to { transform: rotate(360deg); } }
.steps.in .rocket { animation: bob 2.2s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.steps.in .flame { animation: flick .35s ease-in-out infinite alternate; transform-origin: 20px 29px; }
@keyframes flick { from { transform: scaleY(.7); opacity: .7; } to { transform: scaleY(1.15); opacity: 1; } }
.steps h3 { margin-bottom: .4rem; font-size: .98rem; margin-top: 1.6rem; }
.steps p { color: var(--muted); font-size: .98rem; }

/* ---------- Siti ---------- */
.shot { position: relative; aspect-ratio: 16 / 10; overflow: hidden; margin-bottom: 1.1rem; border: 1px solid rgba(127, 243, 255, .16); background: hsl(var(--h, 190) 50% 16%); }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.mock { position: absolute; inset: 0; display: grid; place-items: center; padding: 2rem 1.2rem 1rem; text-align: center; background: linear-gradient(140deg, hsl(var(--h, 190) 55% 24%), hsl(calc(var(--h, 190) + 35) 50% 11%)); }
.mock::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 22px; background: rgba(255, 255, 255, .09); }
.mock i { position: absolute; left: 10px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .45); box-shadow: 11px 0 0 rgba(255, 255, 255, .45), 22px 0 0 rgba(255, 255, 255, .45); }
.mock b { font: 500 clamp(.95rem, 1.6vw, 1.2rem)/1.25 var(--f-display); text-wrap: balance; }
.site { display: flex; flex-direction: column; }
.site h3 { margin-bottom: .35rem; }
.site .link, .site .offline { margin-top: auto; padding-top: 1rem; align-self: flex-start; }
.site .tags { margin-bottom: .4rem; }
.meta { color: var(--muted) !important; font-size: .96rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .85rem; max-width: none !important; }
.tags span { font-size: .8rem; font-weight: 500; padding: .18rem .55rem; border: 1px solid var(--cyan-soft); border-radius: 2px; color: #cfeaf1; }
.tags.big span { font-size: .9rem; padding: .3rem .7rem; }
.link, .link-inline { color: var(--cyan); font-weight: 500; text-decoration: none; border-bottom: 1px solid rgba(127, 243, 255, .4); transition: border-color .2s; }
.link:hover, .link-inline:hover { border-bottom-color: var(--cyan); }
.link { display: inline-block; margin-top: 1rem; }
.offline { color: var(--muted) !important; font-size: .92rem; font-style: italic; }
.sub-h { margin: 4rem 0 1.3rem; font-size: 1.2rem; }

/* ---------- Software ---------- */
.tool-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; margin-bottom: .7rem; }
.badge { flex: none; font-size: .75rem; font-weight: 600; padding: .22rem .6rem; border: 1px solid var(--cyan-soft); border-radius: 2px; color: var(--muted); }
.badge.live { border-color: var(--lamp); color: var(--lamp); }
.badge.live::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: .4rem; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 8px var(--lamp); vertical-align: 1px; }

/* ---------- ROV ---------- */
.rov-intro p { color: #d3e7ee; font-size: 1.1rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin: 2.6rem 0 3rem; border-top: 1px solid var(--cyan-soft); border-bottom: 1px solid var(--cyan-soft); max-width: 760px; }
.stats > div { padding: 1.15rem 1rem 1.2rem; border-left: 1px solid var(--cyan-soft); }
.stats > div:first-child { border-left: 0; padding-left: 0; }
.stats dd { font: 700 clamp(1.8rem, 3.6vw, 2.8rem)/1 var(--f-display); order: -1; margin-bottom: .45rem; }
.stats > div { display: flex; flex-direction: column; }
.stats dt { color: var(--muted); font-size: .9rem; }
.rov-more { max-width: 640px; }
.certs { list-style: none; margin: 0 0 .4rem; }
.certs li { padding: .55rem 0 .55rem 1.1rem; border-left: 2px solid var(--lamp); margin-bottom: .6rem; }

/* ---------- Titoli ---------- */
.cred-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; align-items: start; }
.cred-list > div { padding: 1rem 0; border-top: 1px solid var(--cyan-soft); }
.cred-list > div:last-child { border-bottom: 1px solid var(--cyan-soft); }
.cred-list dt { font-weight: 600; }
.cred-list dd { color: var(--muted); }
.toolbox h3 { margin-bottom: .4rem; }

/* ---------- Contatti ---------- */
.contact { padding-bottom: clamp(7rem, 20vh, 12rem); }
.contact-grid { display: grid; grid-template-columns: 1fr minmax(300px, 470px); gap: 3.5rem; align-items: start; }
.small { margin-top: 1.8rem; font-size: .95rem; }
.form { display: grid; gap: 1rem; padding: 1.6rem; }
.form label { display: block; }
.form label > span { display: block; margin-bottom: .35rem; font-size: .9rem; color: var(--muted); }
.form input[type="text"], .form input[type="email"], .form select, .form textarea {
  width: 100%; font: 400 1rem/1.4 var(--f-body); color: var(--ink); background: rgba(1, 10, 18, .6); border: 1px solid var(--cyan-soft);
  border-radius: 2px; padding: .75rem .85rem;
}
.form select option { color: #0b1a24; }
.form textarea { resize: vertical; min-height: 7rem; }
.form .check { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start; }
.form .check input { margin-top: .3rem; accent-color: var(--lamp); width: 1rem; height: 1rem; }
.form .check span { margin: 0; font-size: .85rem; line-height: 1.45; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.form .btn { width: 100%; }
.form-status { min-height: 1.4em; font-size: .94rem; max-width: none; }
.form-status.ok { color: #9be8b0; }
.form-status.err { color: #ffb4a8; }

/* ---------- Footer ---------- */
.foot { position: relative; z-index: 6; padding: 1.4rem 0 5rem; background: linear-gradient(180deg, rgba(1, 10, 18, 0), rgba(1, 10, 18, .85)); color: var(--muted); font-size: .92rem; }
.credit { font-size: .78rem; opacity: .8; }
.credit a { color: var(--muted); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.surface-btn { font: 500 .92rem/1 var(--f-body); color: var(--ink); background: transparent; border: 1px solid var(--cyan-soft); border-radius: 2px; padding: .7rem 1.1rem; cursor: pointer; transition: border-color .2s, background .2s; }
.surface-btn:hover { border-color: var(--cyan); background: rgba(127, 243, 255, .1); }

/* ---------- Ingresso (una sola sequenza all'apertura) ---------- */
.js:not(.ready) .nav, .js:not(.ready) .hud, .js:not(.ready) .gauge, .js:not(.ready) .hero .wrap > *, .js:not(.ready) .hint { opacity: 0; }
.js.ready .nav, .js.ready .hud, .js.ready .gauge, .js.ready .hint { transition: opacity 1s ease 1.6s; }
.js.ready .hero .wrap > * { transition: opacity 1s ease, transform 1s ease; }
.js.ready .hero .wrap > :nth-child(1) { transition-delay: .5s; }
.js.ready .hero .wrap > :nth-child(2) { transition-delay: .7s; }
.js.ready .hero .wrap > :nth-child(3) { transition-delay: .95s; }
.js.ready .hero .wrap > :nth-child(4) { transition-delay: 1.1s; }
.js.ready .hero .wrap > :nth-child(5) { transition-delay: 1.3s; }

/* ---------- Schermi stretti ---------- */
@media (max-width: 900px) {
  .links { display: none; }
  .about-grid, .cred-grid, .contact-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .about-text { grid-column: 1; grid-row: 2; }
  .portrait { grid-column: 1; grid-row: 1; }
  .gauge { display: none; }
  h2 { max-width: none; }
}
@media (max-width: 640px) {
  .brand img { height: 36px; }
  .hud { gap: 1.1rem; font-size: .66rem; padding-top: 1.6rem; }
  .hud b { font-size: .88rem; }
  .hero { padding-top: 7rem; align-items: flex-start; }
  .hero .wrap { padding-top: 20vh; }
  .hint { display: none; }
  .panel { padding: 1.15rem 1.1rem 1.25rem; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .stats > div:nth-child(n+3) { border-top: 1px solid var(--cyan-soft); }
}

/* ---------- Movimento ridotto ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js:not(.ready) .nav, .js:not(.ready) .hud, .js:not(.ready) .gauge, .js:not(.ready) .hero .wrap > *, .js:not(.ready) .hint { opacity: 1; }
  .js .steps .ln { stroke-dasharray: none; stroke-dashoffset: 0; }
}

/* ---------- Anteprime ingrandibili ---------- */
.site .shot { cursor: zoom-in; }
.zoom-ico { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(2, 14, 24, .78); border: 1px solid var(--cyan-soft); opacity: 0; transform: scale(.85); transition: opacity .2s, transform .2s; pointer-events: none; }
.zoom-ico svg { width: 16px; height: 16px; fill: none; stroke: var(--cyan); stroke-width: 2; stroke-linecap: round; }
.site .shot:hover .zoom-ico, .site .shot:focus-visible .zoom-ico { opacity: 1; transform: scale(1); }
@media (hover: none) { .zoom-ico { opacity: .9; transform: none; } }
.lightbox { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 3.5rem 1rem 1.5rem; background: rgba(1, 8, 14, .9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); overflow: auto; }
.lightbox[hidden] { display: none; }
.lb-fig { width: min(1400px, 100%); }
.lb-fig img { width: 100%; height: auto; display: block; border: 1px solid var(--cyan-soft); background: #0a1a26; }
.lb-fig figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .9rem; font-size: 1rem; }
.lb-close { position: fixed; top: .8rem; right: 1rem; width: 44px; height: 44px; font-size: 2rem; line-height: 1; color: var(--ink); background: rgba(2, 14, 24, .7); border: 1px solid var(--cyan-soft); border-radius: 50%; cursor: pointer; }
.lb-close:hover { border-color: var(--cyan); }
.lb-link { margin-top: 0; }

/* ---------- Titolo con logo e firma ---------- */
.hero-logo img { width: clamp(270px, 38vw, 560px); height: auto; display: block; filter: drop-shadow(0 2px 26px rgba(0, 30, 50, .55)); }

/* ---------- Leggibilita' del testo sopra il mondo digitale ---------- */
.section h2, .section .intro, .about-text p, .rov-intro p, .contact-copy p, .lead, .sub {
  text-shadow: 0 1px 14px rgba(1, 10, 18, .92), 0 0 3px rgba(1, 10, 18, .55);
}

/* ---------- Zone di lettura: velo sfocato con i bordi che sfumano ---------- */
.read { position: relative; isolation: isolate; }
.read.head { width: fit-content; max-width: 100%; }
.read::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none; inset: -1.4rem -2rem;
  background: rgba(2, 12, 22, .62);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent), linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent), linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
  mask-composite: intersect;
}
@media (max-width: 640px) { .read::before { inset: -1rem -1.1rem; background: rgba(2, 12, 22, .7); } }

/* il velo non deve mai uscire dalla pagina: l'elenco dei passaggi occupa già tutta la larghezza */
.steps.read::before { inset: -1.4rem 0; }
html { overflow-x: clip; }
