:root {
  --bg: #07080a;
  --card: rgba(22, 23, 27, .62);
  --line: rgba(255, 255, 255, .08);
  --text: #f3f4f6;
  --muted: #8b8f98;
  --accent: #c8f169;
  --accent-2: #7c5cff;
  --cyan: #38e1ff;
  --danger: #ff5c6c;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }

/* Aloni di luce */
.glow { position: fixed; border-radius: 50%; filter: blur(110px); opacity: .5; z-index: 0; pointer-events: none; }
.g1 { width: 46vw; height: 46vw; left: -12vw; bottom: -18vw; background: radial-gradient(circle, #6d4dff 0%, transparent 70%); animation: drift 18s ease-in-out infinite alternate; }
.g2 { width: 38vw; height: 38vw; right: -10vw; top: -14vw; background: radial-gradient(circle, #1fb6ff 0%, transparent 70%); animation: drift 22s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(6vw, -4vw) scale(1.15); } }

/* Sfera luminosa (ispirata all'assistente vocale) */
.orb-wrap { position: fixed; left: 50%; top: 50%; width: min(70vmin, 720px); aspect-ratio: 1; transform: translate(-72%, -50%); z-index: 0; pointer-events: none; }
.orb {
  position: absolute; inset: 22%; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 18%, rgba(255,255,255,.95) 0%, rgba(200,241,105,.9) 9%, transparent 32%),
    radial-gradient(circle at 50% 50%, rgba(200,241,105,.55) 0%, rgba(120,170,40,.25) 40%, rgba(10,12,8,.9) 72%),
    #0b0d08;
  box-shadow: 0 0 80px 10px rgba(200,241,105,.28), inset 0 -30px 80px rgba(0,0,0,.8), inset 0 0 40px rgba(200,241,105,.3);
  animation: breathe 6s ease-in-out infinite;
}
.orb::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 20%, rgba(255,255,255,.18) 25%, transparent 32% 70%, rgba(56,225,255,.18) 76%, transparent 84%);
  animation: spin 14s linear infinite; mix-blend-mode: screen;
}
.ring { position: absolute; border-radius: 50%; border: 1px solid rgba(200,241,105,.12); }
.r1 { inset: 14%; animation: spin 40s linear infinite; border-top-color: rgba(200,241,105,.5); }
.r2 { inset: 6%; animation: spin 60s linear infinite reverse; border-right-color: rgba(56,225,255,.45); }
.r3 { inset: -2%; border-style: dashed; border-color: rgba(255,255,255,.05); animation: spin 120s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.04); box-shadow: 0 0 120px 20px rgba(200,241,105,.35), inset 0 -30px 80px rgba(0,0,0,.8), inset 0 0 50px rgba(200,241,105,.4); } }

/* Layout */
.shell {
  position: relative; z-index: 1; min-height: 100%;
  display: grid; grid-template-columns: 1.1fr minmax(340px, 440px); align-items: center;
  gap: 6vw; max-width: 1240px; margin: 0 auto; padding: 48px 32px;
}
.brand { padding-right: 2vw; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); font-weight: 700; font-size: 22px; letter-spacing: -.02em; margin-bottom: 48px; }
.logo span { color: var(--text); }
.logo b { color: var(--accent); }
h1 { font-size: clamp(38px, 5.4vw, 72px); line-height: 1.02; letter-spacing: -.04em; font-weight: 700; }
.accent { background: linear-gradient(90deg, var(--accent), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 17px; line-height: 1.6; max-width: 440px; margin: 22px 0 30px; }
.feats { list-style: none; display: grid; gap: 12px; color: #c9ccd2; font-size: 14px; }
.feats li { display: flex; align-items: center; gap: 12px; }
.feats i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }

.card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 32px;
  padding: 36px 32px 26px; backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%);
  box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06);
}
.card::before {
  content: ''; position: absolute; inset: -1px; border-radius: 32px; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(200,241,105,.5), transparent 35%, transparent 65%, rgba(124,92,255,.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.clock { font-size: 56px; font-weight: 300; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.date { color: var(--muted); font-size: 14px; margin: 8px 0 28px; text-transform: capitalize; }
h2 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.hint { color: var(--muted); font-size: 14px; margin: 6px 0 22px; line-height: 1.5; }
.hint b { color: var(--text); font-weight: 600; }

.step { display: none; }
.step.active { display: block; animation: rise .45s cubic-bezier(.2,.8,.2,1); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

.field {
  display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line);
  border-radius: 16px; padding: 0 16px; margin-bottom: 12px; transition: border-color .2s, background .2s, box-shadow .2s;
}
.field:focus-within { border-color: rgba(200,241,105,.6); background: rgba(200,241,105,.05); box-shadow: 0 0 0 4px rgba(200,241,105,.08); }
.field > svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.field input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 15px; padding: 17px 0; }
.field input::placeholder { color: #6b6f78; }
.eye { background: none; border: 0; color: var(--muted); cursor: pointer; display: grid; padding: 4px; }
.eye svg { width: 20px; height: 20px; }

.btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px;
  background: var(--accent); color: #0d1003; border: 0; border-radius: 16px; padding: 17px; font: inherit; font-weight: 700; font-size: 15px;
  cursor: pointer; transition: transform .15s, box-shadow .2s, filter .2s; box-shadow: 0 10px 30px rgba(200,241,105,.25);
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { filter: brightness(1.05); box-shadow: 0 14px 40px rgba(200,241,105,.35); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .6; cursor: progress; }
.link { display: block; margin: 16px auto 0; background: none; border: 0; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.link:hover { color: var(--text); }

.shield { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: rgba(200,241,105,.1); color: var(--accent); margin-bottom: 18px; }
.shield svg { width: 28px; height: 28px; }
.otp { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.otp input {
  width: 100%; min-width: 0; aspect-ratio: .85; max-width: 54px; text-align: center; font: inherit; font-size: 26px; font-weight: 600;
  color: var(--text); background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 14px; outline: 0; transition: all .15s;
}
.otp input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(200,241,105,.12); }
.otp input.filled { background: rgba(200,241,105,.08); border-color: rgba(200,241,105,.4); }
.otp .sep { width: 10px; height: 2px; background: var(--line); flex: none; }
.otp.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.timer { height: 3px; background: rgba(255,255,255,.06); border-radius: 3px; margin: 18px 0 6px; overflow: hidden; }
.timer .bar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--cyan)); width: 100%; transition: width 1s linear; }

.err { min-height: 20px; color: var(--danger); font-size: 14px; margin-top: 14px; text-align: center; }
.foot { display: flex; align-items: center; justify-content: center; gap: 8px; color: #61656d; font-size: 12px; margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.foot svg { width: 12px; height: 12px; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; gap: 28px; padding: 28px 16px 40px; }
  .brand { text-align: center; padding: 0; }
  .logo { margin-bottom: 20px; }
  .lead, .feats { display: none; }
  h1 { font-size: 34px; }
  .orb-wrap { width: 120vmin; transform: translate(-50%, -78%); opacity: .7; }
  .card { padding: 28px 20px 22px; border-radius: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
