/* ==========================================================================
   V1P3R Development — tema "terminale": nero, griglia tecnica, accenti verdi.
   Titoli: Space Grotesk. Etichette, pulsanti e dettagli: JetBrains Mono.
   ========================================================================== */

:root {
  --primary: #1ee07f;
  --primary-strong: #12c96c;
  --primary-soft: rgba(30, 224, 127, 0.09);
  --primary-line: rgba(30, 224, 127, 0.35);
  --bg: #050606;
  --surface: #0a0c0b;
  --surface-2: #0f1211;
  --text: #ecefed;
  --muted: #8b938f;
  --dim: #5d6561;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.13);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  --radius: 6px;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center top;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* Bagliore verde fisso in cima alla pagina */
body::before {
  content: '';
  position: fixed;
  inset: -30vh 0 auto 0;
  height: 70vh;
  background: radial-gradient(ellipse 60% 55% at 50% 0%, rgba(30,224,127,.13), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
main, footer { position: relative; z-index: 1; }
::selection { background: var(--primary); color: #000; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
img { max-width: 100%; height: auto; display: block; }
.icon { width: 1em; height: 1em; display: inline-block; flex: 0 0 auto; fill: currentColor; vertical-align: -.125em; overflow: visible; }
.container { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

/* ---------- Header: pillola sospesa ---------- */
header {
  position: fixed;
  inset: 16px 0 auto 0;
  z-index: 1000;
  pointer-events: none;
}
.nav-shell {
  position: relative;
  pointer-events: auto;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 10px 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(8, 10, 9, .62);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
header.sticky .nav-shell {
  background: rgba(8, 10, 9, .86);
  border-color: var(--line-strong);
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.2px;
}
.brand img { width: 36px; height: 36px; object-fit: contain; }
nav { flex: 0 0 auto; }
nav ul { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-link, .dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color .2s ease, background .2s ease;
}
.nav-link:hover, .dropdown-toggle:hover { color: var(--text); background: rgba(255,255,255,.04); }
.nav-link.active, .nav-dropdown.active > .dropdown-toggle { color: var(--primary); }
.nav-link.active::before, .nav-dropdown.active > .dropdown-toggle::before { content: '>'; margin-right: 2px; }
.dropdown-toggle .icon { font-size: 9px; transition: transform .2s ease; }
.nav-dropdown { position: relative; }
.nav-dropdown.open .dropdown-toggle .icon { transform: rotate(180deg); }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: 240px;
  padding: 6px;
  background: rgba(10, 12, 11, .96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: .18s ease;
}
.nav-dropdown.open .dropdown-menu { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.dropdown-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  transition: background .2s ease, color .2s ease;
}
.dropdown-menu a:hover { background: var(--primary-soft); color: var(--primary); }
.dropdown-menu .icon { font-size: 10px; opacity: .7; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.language-switcher select {
  height: 38px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  outline: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}
.language-switcher select:hover { color: var(--text); border-color: var(--line-strong); }
.language-switcher select option { color: #111; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--primary);
  color: #031109;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  transition: background .2s ease, box-shadow .2s ease;
}
.nav-cta:hover { background: #3ff096; box-shadow: 0 0 28px rgba(30,224,127,.35); }
.nav-cta.active { box-shadow: 0 0 0 1px var(--bg), 0 0 0 3px var(--primary-line); }
/* Il pulsante nel menu serve solo su mobile, dove quello nell'header è nascosto. */
.nav-mobile-cta { display: none; }
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.menu-toggle .icon { font-size: 15px; }
.menu-toggle .menu-icon-close,
.menu-toggle[aria-expanded="true"] .menu-icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-icon-close { display: inline-block; }

/* ---------- Elementi condivisi ---------- */
main { counter-reset: section; }
section { padding: 120px 0; }
section[id] { scroll-margin-top: 100px; }
.section-alt { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.012), transparent); }
.kicker, .eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
}
.kicker { margin-bottom: 14px; }
/* Numerazione automatica delle sezioni: 01 /, 02 /, ... */
.section-heading .kicker::before {
  counter-increment: section;
  content: counter(section, decimal-leading-zero) ' / ';
  color: var(--dim);
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px; padding: 6px 12px; border: 1px solid var(--primary-line); border-radius: 999px; background: var(--primary-soft); }
.eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 12px var(--primary); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn .icon { transition: transform .2s ease; }
.btn:hover .icon { transform: translateX(3px); }
.btn-primary { background: var(--primary); color: #031109; border-color: var(--primary); }
.btn-primary:hover { background: #3ff096; box-shadow: 0 0 34px rgba(30,224,127,.35); }
.btn-secondary { background: rgba(255,255,255,.02); color: var(--text); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 52px;
}
.section-heading h2 {
  font-size: clamp(34px, 4.4vw, 56px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -1.8px;
  max-width: 760px;
}
.section-heading > p { max-width: 520px; color: var(--muted); font-size: 17px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; color: var(--primary); font-family: var(--font-mono); font-size: 13px; font-weight: 700; text-transform: uppercase; }
.text-link .icon { transition: transform .2s ease; }
.text-link:hover .icon { transform: translateX(4px); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 9px;
  border-radius: 4px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255,255,255,.02);
}
.tags span::before { content: '#'; color: var(--primary); opacity: .7; margin-right: 1px; }

/* Angoli "a mirino" sulle card: compaiono al passaggio del mouse */
.project-showcase, .service-card-detailed, .features-grid article, .download-card, .contact-form-card, .cta-panel { position: relative; }
.project-showcase::before, .project-showcase::after,
.service-card-detailed::before, .service-card-detailed::after,
.features-grid article::before, .features-grid article::after,
.download-card::before, .download-card::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 0 solid var(--primary);
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
  z-index: 2;
}
.project-showcase::before, .service-card-detailed::before, .features-grid article::before, .download-card::before { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; transform: translate(4px, 4px); }
.project-showcase::after, .service-card-detailed::after, .features-grid article::after, .download-card::after { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; transform: translate(-4px, -4px); }
.project-showcase:hover::before, .project-showcase:hover::after,
.service-card-detailed:hover::before, .service-card-detailed:hover::after,
.features-grid article:hover::before, .features-grid article:hover::after,
.download-card:hover::before, .download-card:hover::after { opacity: 1; transform: none; }

/* ---------- Hero home ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 150px 0 100px;
  position: relative;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 64px; position: relative; z-index: 2; }
.hero h1, .page-hero h1, .product-hero h1 {
  font-size: clamp(48px, 6.2vw, 86px);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -3.5px;
}
.hero h1 span, .page-hero h1 span { display: block; color: transparent; -webkit-text-stroke: 1.5px var(--primary); }
.hero-copy > p { font-size: 19px; max-width: 560px; color: var(--muted); margin: 28px 0 36px; }
.hero-visual { position: relative; display: grid; place-items: center; }
.hero-glow { position: absolute; inset: 10% 5%; background: radial-gradient(circle, rgba(30,224,127,.16), transparent 65%); filter: blur(30px); }

.terminal {
  position: relative;
  width: 100%;
  max-width: 500px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(8, 10, 9, .9);
  box-shadow: var(--shadow), 0 0 0 1px rgba(30,224,127,.06);
  font-family: var(--font-mono);
  font-size: 14px;
}
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.terminal-bar span { width: 10px; height: 10px; border-radius: 50%; background: #2a2f2c; }
.terminal-bar span:first-child { background: var(--primary); box-shadow: 0 0 10px var(--primary); }
.terminal-bar em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--dim); }
.terminal-body { padding: 22px 22px 26px; min-height: 270px; }
.terminal-body p { color: var(--text); white-space: nowrap; overflow: hidden; opacity: 0; animation: termLine .01s forwards; }
.terminal-body p + p { margin-top: 6px; }
.terminal-body b { color: var(--primary); font-weight: 700; margin-right: 6px; }
.terminal-body .out { color: var(--muted); padding-left: 18px; }
.terminal-body .out i { font-style: normal; color: var(--primary); margin-right: 14px; }
.terminal-body p:nth-child(1) { animation-delay: .3s; }
.terminal-body p:nth-child(2) { animation-delay: .7s; }
.terminal-body p:nth-child(3) { animation-delay: 1.2s; }
.terminal-body p:nth-child(4) { animation-delay: 1.6s; }
.terminal-body p:nth-child(5) { animation-delay: 2.1s; }
.terminal-body p:nth-child(6) { animation-delay: 2.5s; }
.terminal-body p:nth-child(7) { animation-delay: 3s; }
@keyframes termLine { to { opacity: 1; } }
.cursor { display: inline-block; width: 9px; height: 17px; vertical-align: -3px; background: var(--primary); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.terminal-logo {
  position: absolute;
  right: -26px;
  bottom: -34px;
  width: 112px;
  height: 112px;
  object-fit: contain;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,.7));
  animation: floatLogo 6s ease-in-out infinite;
}
@keyframes floatLogo { 50% { transform: translateY(-8px); } }

/* ---------- Progetti in evidenza ---------- */
.project-stack { display: grid; gap: 22px; }
.project-showcase {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 44px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .25s ease;
}
.project-showcase:hover { border-color: var(--line-strong); }
.project-reverse { grid-template-columns: 1.05fr .95fr; }
.project-reverse .project-media { order: 2; }
.project-media {
  height: 330px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.project-showcase:hover .project-media img { transform: scale(1.03); }
.project-logo-media img { width: 68%; height: 68%; object-fit: contain; }
/* Loghi con sfondo nero pieno: il riquadro nero li fa sembrare senza bordo. */
.project-logo-dark { background: #000; }
.project-logo-dark img { width: 92%; height: 92%; }
.project-copy { padding: 8px 8px 8px 0; }
.project-reverse .project-copy { padding: 8px 0 8px 18px; }
.project-type { font-family: var(--font-mono); font-size: 12px; color: var(--primary); letter-spacing: 1px; text-transform: uppercase; }
.project-copy h3 { font-size: clamp(34px, 3.6vw, 46px); font-weight: 700; letter-spacing: -1.5px; line-height: 1.05; margin: 12px 0 16px; }
.project-copy p { color: var(--muted); font-size: 17px; margin-bottom: 20px; max-width: 520px; }
.project-copy .tags { margin-bottom: 28px; }

/* ---------- Servizi (home) ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.service-card {
  position: relative;
  min-height: 240px;
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  transition: background .25s ease;
}
.service-card + .service-card { border-left: 1px solid var(--line); }
.service-card::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--primary); transform: scaleX(0); transform-origin: left; transition: transform .35s ease; }
.service-card:hover { background: var(--surface-2); }
.service-card:hover::after { transform: scaleX(1); }
.service-card > span { font-family: var(--font-mono); font-size: 12px; color: var(--dim); margin-bottom: auto; }
.service-card > span::before { content: '['; color: var(--primary); }
.service-card > span::after { content: ']'; color: var(--primary); }
.service-card h3 { font-size: 21px; font-weight: 600; letter-spacing: -.4px; margin: 40px 0 8px; }
.service-card p { color: var(--muted); font-size: 14px; }
.section-link-row { margin-top: 28px; text-align: right; }

/* ---------- CTA ---------- */
.home-cta { padding: 60px 0 130px; }
.cta-panel {
  text-align: center;
  border: 1px solid var(--primary-line);
  border-radius: var(--radius);
  padding: 80px 28px;
  background:
    radial-gradient(ellipse 50% 80% at 50% 120%, rgba(30,224,127,.18), transparent 70%),
    var(--surface);
  overflow: hidden;
}
.cta-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(30,224,127,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,224,127,.06) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse 70% 90% at 50% 100%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 50% 100%, #000, transparent 75%);
  pointer-events: none;
}
.cta-panel > * { position: relative; }
.cta-panel h2 { font-size: clamp(36px, 5vw, 64px); font-weight: 700; letter-spacing: -2px; line-height: 1.02; margin-bottom: 18px; }
.cta-panel p { color: var(--muted); max-width: 560px; margin: 0 auto 32px; font-size: 17px; }

/* ---------- Intestazione pagine interne ---------- */
.page-hero, .product-hero { padding: 180px 0 90px; border-bottom: 1px solid var(--line); }
.page-hero h1 { margin: 6px 0 0; }
.page-hero p { max-width: 760px; color: var(--muted); font-size: 19px; margin-top: 20px; }

/* ---------- Servizi (pagina) ---------- */
.services-showcase { padding: 90px 0 110px; }
.services-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.service-card-detailed {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .25s ease;
}
.service-card-detailed:hover { border-color: var(--line-strong); }
.service-card-cover { position: relative; height: 210px; overflow: hidden; background: var(--surface-2); border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.service-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.service-card-detailed:hover .service-card-cover img { transform: scale(1.04); }
.service-cover-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(10,12,11,.95) 100%); pointer-events: none; }
.service-card-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.service-card-body h3 { font-size: 22px; font-weight: 600; letter-spacing: -.5px; margin-bottom: 10px; }
.service-card-body p { color: var(--muted); font-size: 15px; margin-bottom: 18px; flex: 1; }
.service-card-body .tags { margin-bottom: 22px; }
.service-card-actions { margin-top: auto; }
.service-card-actions .btn { width: 100%; }

/* ---------- Galleria ---------- */
.gallery-modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 3, 3, .9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 2000;
}
.gallery-modal.open { display: flex; }
.gallery-modal-content {
  position: relative;
  max-width: 1080px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0 24px 24px;
  box-shadow: var(--shadow);
}
.gallery-modal-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 -24px 20px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  z-index: 1;
}
.gallery-modal-header h3 { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 14px; font-weight: 500; color: var(--primary); text-transform: uppercase; letter-spacing: 1px; }
.gallery-close {
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  font-size: 20px;
  color: var(--text);
  cursor: pointer;
  line-height: 1;
  transition: all .2s ease;
}
.gallery-close:hover { border-color: var(--primary); color: var(--primary); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.gallery-grid a { display: block; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); transition: border-color .2s ease; }
.gallery-grid a:hover { border-color: var(--primary); }
.gallery-grid img { width: 100%; height: 220px; object-fit: cover; display: block; }

/* ---------- ViperDrop ---------- */
.product-hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
.product-hero h1 { margin: 6px 0 22px; }
.product-hero p { color: var(--muted); font-size: 19px; max-width: 600px; margin-bottom: 34px; }
.product-logo {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
  margin-left: auto;
  border-radius: 24px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow), 0 0 90px rgba(30,224,127,.12);
}
.product-logo img { width: 100%; height: 100%; object-fit: contain; }
.product-window {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 0 6px rgba(255,255,255,.015);
  background: var(--surface);
}
.product-window img { width: 100%; display: block; }
.product-window-wide { max-width: 1080px; margin: 0 auto; }
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.features-grid article {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .25s ease;
}
.features-grid article:hover { border-color: var(--line-strong); }
.features-grid h3 { font-size: 20px; font-weight: 600; letter-spacing: -.4px; margin-bottom: 8px; }
.features-grid h3::before { content: '→ '; color: var(--primary); font-family: var(--font-mono); }
.features-grid p { color: var(--muted); font-size: 15px; }
.download-section { padding-top: 70px; }
.download-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.download-card {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .25s ease;
}
.download-card:hover { border-color: var(--line-strong); }
.download-platform-icon {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid var(--primary-line);
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 24px;
}
.download-card-copy { min-width: 0; flex: 1; }
.download-card h3 { font-size: 24px; font-weight: 600; letter-spacing: -.5px; margin-bottom: 8px; }
.download-card p { color: var(--muted); font-size: 15px; margin-bottom: 16px; }
.download-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.download-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}
.linux-compat-note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 10px 12px;
  margin: -2px 0 16px;
  border-left: 2px solid #e4ad18;
  background: rgba(228,173,24,.06);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.linux-compat-note .icon { color: #e4ad18; margin-top: 3px; }
.btn-disabled { pointer-events: none; cursor: not-allowed; opacity: .45; filter: saturate(.4); }

/* ---------- Contatti ---------- */
.contact-page { padding: 170px 0 110px; }
.contact-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: start; }
.contact-copy h2 { font-size: clamp(38px, 4.6vw, 60px); font-weight: 700; letter-spacing: -2px; line-height: 1.02; margin-bottom: 20px; }
.contact-copy > p { color: var(--muted); font-size: 18px; max-width: 480px; }
.contact-details { display: grid; gap: 8px; margin-top: 34px; max-width: 420px; }
.contact-details a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.contact-details a::after { content: '↗'; margin-left: auto; color: var(--dim); transition: color .2s ease, transform .2s ease; }
.contact-details a:hover { border-color: var(--primary-line); background: var(--primary-soft); color: var(--primary); }
.contact-details a:hover::after { color: var(--primary); transform: translate(2px, -2px); }
.contact-details .icon { width: 16px; height: 16px; color: var(--primary); }
.contact-form-card { padding: 32px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.contact-form-card::before { content: 'new_message.form'; position: absolute; top: -11px; left: 22px; padding: 0 10px; background: var(--bg); font-family: var(--font-mono); font-size: 12px; color: var(--primary); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: grid; gap: 8px; margin-bottom: 16px; }
.form-group label { font-family: var(--font-mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.form-group input, .form-group textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  padding: 13px 14px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-group textarea { resize: vertical; min-height: 170px; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,224,127,.12); }
.captcha-wrap { margin: 6px 0 18px; overflow-x: auto; min-height: 78px; } /* spazio riservato: reCAPTCHA arriva dopo */
#invia-btn { width: 100%; }
#invia-btn:disabled { opacity: .55; cursor: not-allowed; }
.form-privacy-note { font-size: 13px; color: var(--dim); margin: 2px 0 16px; }
.form-response { margin-top: 15px; }
.form-response .success, .form-response .error { padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); font-family: var(--font-mono); font-size: 13px; }
.form-response .success { color: #7ff5b5; background: var(--primary-soft); border-color: var(--primary-line); }
.form-response .error { color: #ff8f9d; background: rgba(255,51,102,.08); border-color: rgba(255,51,102,.25); }

/* ---------- Privacy e 404 ---------- */
.legal-page { padding: 170px 0 110px; }
.legal-content { max-width: 800px; }
.legal-content h1, .error-page h1 { font-size: clamp(40px, 5vw, 64px); font-weight: 700; letter-spacing: -2px; line-height: 1.02; margin-bottom: 12px; }
.legal-content h2 { font-size: 20px; font-weight: 600; margin: 44px 0 12px; padding-top: 22px; border-top: 1px solid var(--line); }
.legal-content h2::before { content: '§ '; color: var(--primary); font-family: var(--font-mono); }
.legal-content p, .legal-content li { color: var(--muted); }
.legal-content p + p { margin-top: 10px; }
.legal-content ul { padding-left: 20px; margin: 10px 0; }
.legal-content a, .form-privacy-note a, .footer-bottom a { color: var(--primary); }
.legal-updated { font-family: var(--font-mono); font-size: 12px; color: var(--dim); margin-bottom: 26px; }
.error-page { min-height: 80vh; display: grid; place-items: center; text-align: center; padding-top: 140px; }
.error-page .kicker { font-size: clamp(80px, 14vw, 160px); line-height: 1; letter-spacing: -6px; color: transparent; -webkit-text-stroke: 1.5px var(--primary); margin-bottom: 10px; }
.error-page p { color: var(--muted); margin: 12px 0 30px; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); background: #030404; padding: 70px 0 30px; overflow: hidden; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .6fr .6fr .6fr; gap: 36px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 14px; font-weight: 700; }
.footer-brand img { width: 34px; height: 34px; object-fit: contain; }
.footer-intro::after { content: '// web · discord · desktop'; display: block; margin-top: 14px; font-family: var(--font-mono); font-size: 12px; color: var(--dim); }
.footer-column strong { display: block; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 1.5px; color: var(--primary); margin-bottom: 14px; }
.footer-column a { display: block; color: var(--muted); font-size: 15px; margin-top: 8px; transition: color .2s ease; }
.footer-column a:hover { color: var(--text); }
.footer-column a span { color: var(--dim); }
.footer-bottom { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--dim); font-family: var(--font-mono); font-size: 12px; text-align: left; }
/* Marchio gigante in fondo alla pagina */
footer::after {
  content: 'V1P3R';
  display: block;
  margin: 40px auto -0.18em;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(90px, 22vw, 320px);
  line-height: .8;
  letter-spacing: -.06em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(30,224,127,.16);
  pointer-events: none;
  user-select: none;
}

.hidden { display: none !important; }
.reveal-section { opacity: 1; transform: none; }

[dir='rtl'] .brand { margin-right: 0; margin-left: auto; }
[dir='rtl'] .dropdown-menu { text-align: right; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition-duration: .001ms !important; }
  .terminal-body p { opacity: 1; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1000px) {
  .menu-toggle { display: inline-grid; place-items: center; order: 2; }
  .nav-actions { order: 3; }
  .brand { order: 1; }
  /* .nav-shell ha backdrop-filter: il menu si posiziona rispetto alla pillola, non alla finestra. */
  nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    padding: 10px;
    background: rgba(8, 10, 9, .97);
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
  }
  nav.active { opacity: 1; visibility: visible; transform: none; }
  nav ul { align-items: stretch; flex-direction: column; gap: 2px; }
  .nav-link, .dropdown-toggle { display: flex; width: 100%; justify-content: flex-start; padding: 14px 12px; font-size: 14px; }
  .dropdown-toggle .icon { margin-left: auto; }
  .dropdown-menu {
    position: static;
    width: 100%;
    transform: none !important;
    margin: 2px 0 6px;
    display: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    box-shadow: none;
    background: rgba(255,255,255,.03);
    border-color: var(--line);
  }
  .nav-dropdown.open .dropdown-menu { display: block; }
  .hero-grid, .product-hero-grid, .contact-layout { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero-visual { margin-top: 10px; }
  .terminal { max-width: 560px; }
  .terminal-logo { right: -6px; }
  .product-logo { margin: 0 auto; max-width: 340px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 18px; }
  .project-showcase, .project-reverse { grid-template-columns: 1fr; gap: 28px; }
  .project-reverse .project-media { order: 0; }
  .project-copy, .project-reverse .project-copy { padding: 0 6px 8px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .service-card:nth-child(3) { border-left: 0; }
  .service-card:nth-child(n+3) { border-top: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; }
  .footer-intro { grid-column: 1 / -1; }
}

/* ---------- Telefono ---------- */
@media (max-width: 700px) {
  .container { width: calc(100% - 28px); }
  header { inset: 10px 0 auto 0; }
  .nav-shell { height: 58px; gap: 8px; padding: 0 8px 0 12px; }
  .brand { font-size: 12px; }
  .brand img { width: 32px; height: 32px; }
  .nav-actions .nav-cta { display: none; }
  .nav-mobile-cta { display: block; margin-top: 8px; }
  .nav-mobile-cta .nav-cta { display: flex; justify-content: center; height: 46px; }
  .language-switcher select { max-width: 60px; }
  section { padding: 84px 0; }
  .hero { padding: 120px 0 70px; }
  .hero h1, .page-hero h1, .product-hero h1 { font-size: clamp(42px, 12vw, 56px); letter-spacing: -2px; }
  .hero-copy > p, .page-hero p, .product-hero p { font-size: 17px; }
  .terminal { font-size: 12px; }
  .terminal-body { padding: 18px; min-height: 230px; }
  .terminal-logo { width: 80px; height: 80px; bottom: -26px; right: -4px; }
  .page-hero, .product-hero { padding: 130px 0 64px; }
  .project-showcase { padding: 12px; }
  .project-media { height: 240px; }
  .services-grid, .features-grid, .form-grid, .services-cards-grid, .gallery-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 0; }
  .service-card + .service-card { border-left: 0; border-top: 1px solid var(--line); }
  .service-card h3 { margin-top: 26px; }
  .cta-panel { padding: 56px 20px; }
  .download-grid { grid-template-columns: 1fr; }
  .download-card { padding: 22px; flex-direction: column; }
  .contact-page, .legal-page { padding: 130px 0 80px; }
  .contact-form-card { padding: 22px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { text-align: center; }
}

/* Nota "gratis" sotto i pulsanti di download di ViperDrop */
.product-hero .download-free-note { margin: 16px 0 0; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.product-hero .download-free-note::before { content: '✓ '; color: var(--primary); }
