:root{
  --bg:#0b0f14;
  --bg2:#070a0f;

  --text:#e8eef7;
  --muted:#9fb0c3;

  --border: rgba(255,255,255,.08);

  --neon:#1f7bff;
  --neon2:#00d5ff;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg), var(--bg2));
}

/* sfondo statico elegante */
.bg{
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 50% 30%, rgba(31,123,255,.18), transparent 60%),
    radial-gradient(800px 500px at 50% 80%, rgba(0,213,255,.08), transparent 60%);
  opacity: .65;
}

.wrap{
  min-height: 100vh;
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 18px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.center{
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Logo: intro (prima) + fluttuazione + hover */
.logo-wrap{
  display: inline-block;
  padding: 6px;
  border-radius: 22px;
}

.logo{
  width: min(420px, 78vw);
  height: auto;

  filter:
    drop-shadow(0 20px 60px rgba(31,123,255,.25))
    drop-shadow(0 10px 40px rgba(0,213,255,.15));

  transform-origin: 50% 60%;
  opacity: 0;

  animation:
    logoIntro .9s ease forwards,
    float 6s ease-in-out infinite;
  animation-delay: 0s, .9s;

  transition: transform .18s ease, filter .18s ease;
}

@keyframes logoIntro{
  from{ opacity:0; transform: translateY(24px); }
  to{ opacity:1; transform: translateY(0); }
}

@keyframes float{
  0%,100%{ transform: translateY(0); }
  50%{ transform: translateY(-8px); }
}

.logo-wrap:hover .logo{
  transform: translateY(-4px) rotate(-0.6deg) scale(1.01);
  filter:
    drop-shadow(0 26px 80px rgba(31,123,255,.28))
    drop-shadow(0 12px 55px rgba(0,213,255,.22));
}

/* Contenuti: dopo il logo */
.reveal{
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp .9s ease forwards;
  animation-delay: .75s;
}

@keyframes fadeUp{
  to{ opacity:1; transform: translateY(0); }
}

/* testi */
.headline{
  margin-top: 18px;
  font-size: 15px;
  letter-spacing: .4px;
  color: #d7e6ff;
  opacity: .9;
}

.tagline{
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .3px;
}

.sub{
  margin-top: 12px;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.65;
}

/* CTA icone */
.cta{
  margin-top: 35px;
  display: flex;
  gap: 14px;
  justify-content: center;
}

/* Bottone icona */
.icon-btn{
  width: 60px;
  height: 60px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);

  position: relative;

  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.icon-btn svg{
  width: 26px;
  height: 26px;
  fill: #fff;
  opacity: .9;
  transition: opacity .18s ease, filter .18s ease;
}

.icon-btn:hover{
  background: rgba(31,123,255,.12);
  border-color: rgba(0,213,255,.35);
  box-shadow:
    0 0 14px rgba(0,213,255,.35),
    0 0 44px rgba(31,123,255,.22);
  transform: translateY(-2px);
}
.icon-btn:hover svg{
  opacity: 1;
  filter: drop-shadow(0 0 10px rgba(0,213,255,.35));
}

/* Tooltip */
.icon-btn::after{
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(6px);

  padding: 6px 10px;
  border-radius: 999px;

  font-size: 12px;
  color: var(--text);

  background: rgba(8, 12, 18, .92);
  border: 1px solid rgba(0,213,255,.18);

  box-shadow:
    0 0 14px rgba(0,213,255,.18),
    0 18px 60px rgba(0,0,0,.35);

  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  white-space: nowrap;
}

.icon-btn::before{
  content:"";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%) translateY(6px);

  width: 10px;
  height: 10px;

  background: rgba(8, 12, 18, .92);
  border-left: 1px solid rgba(0,213,255,.18);
  border-top: 1px solid rgba(0,213,255,.18);

  rotate: 45deg;

  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.icon-btn:hover::after,
.icon-btn:hover::before{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Footer */
.footer{
  display: flex;
  justify-content: space-between;
  align-items: center;

  border-top: 1px solid var(--border);
  padding-top: 16px;

  font-size: 13px;
  color: var(--muted);

  flex-wrap: wrap;
  gap: 10px;
}

.contact{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.link{
  color: #fff;
  text-decoration: none;
  opacity: .92;
}
.link:hover{ opacity: .8; }

.sep{
  opacity: .4;
  margin: 0 6px;
}

/* Accessibilità */
@media (prefers-reduced-motion: reduce){
  .logo{ animation: none; opacity: 1; transform: none; }
  .reveal{ animation: none; opacity: 1; transform: none; }
  .logo-wrap:hover .logo{ transform: none; }
  .icon-btn{ transition: none; }
  .icon-btn:hover{ transform: none; }
}

/* Mobile */
@media (max-width:520px){
  .logo{ width: min(360px, 86vw); }
  .icon-btn{ width:58px; height:58px; }
}

/* ===== Privacy ===== */
.privacy-wrap{ justify-content: flex-start; }

.privacy-head{ padding: 30px 0 10px; }

.privacy-head h1{
  margin: 10px 0 5px;
  font-size: 32px;
}

.privacy-sub{
  color: var(--muted);
  font-size: 14px;
}

.back-btn{
  display: inline-block;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  transition: .2s;
}
.back-btn:hover{
  box-shadow: 0 0 12px rgba(0,213,255,.25);
}

.privacy-card{
  margin-top: 16px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
}

.privacy-card h2{ margin-top: 0; font-size: 16px; }

.privacy-card p{
  color: var(--muted);
  line-height: 1.7;
}

.privacy-list{
  color: var(--muted);
  line-height: 1.7;
}

/* ===== 404 ===== */
.error-code{
  font-size: 110px;
  margin: 0;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
  text-shadow:
    0 0 20px rgba(31,123,255,.3),
    0 0 40px rgba(0,213,255,.15);
}

.error-title{
  font-size: 22px;
  margin-top: 10px;
}

.error-text{
  margin-top: 10px;
  color: var(--muted);
  max-width: 420px;
}

.home-btn{
  margin-top: 26px;
  display: inline-block;
  padding: 12px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  transition: .2s;
}

.home-btn:hover{
  background: rgba(31,123,255,.12);
  border-color: rgba(0,213,255,.35);
  box-shadow: 0 0 14px rgba(0,213,255,.25);
  transform: translateY(-2px);
}