/* Login / registrazione: scheda con il modulo a sinistra, pannello "seta" con grafico dorato a destra. Tema chiaro e scuro. */
:root,
:root[data-theme="light"] {
  --bg: #e8e9ec;
  --glow: rgba(214, 190, 130, 0.55);
  --card: linear-gradient(155deg, #f6f6f7 0%, #ebebed 48%, #e3d9bd 135%);
  --ink: #0f0f10;
  --mut: #707078;
  --line: rgba(0, 0, 0, 0.09);
  --field: #ffffff;
  --field-line: rgba(0, 0, 0, 0.06);
  --btn: #0b0b0c;
  --btn-ink: #ffffff;
  --btn-hover: #000000;
  --ghost: #ffffff;
  --pill: #f3f3f4;
  --shadow: 0 30px 70px -30px rgba(40, 40, 50, 0.35);
  --err-bg: #fdecec;
  --err-line: #f6c9c9;
  --err: #c62828;
  --logo-filter: none;
  --silk-a: #fdfdfd;
  --silk-b: #8e8e95;
  --silk-c: #ffffff;
  --silk-d: #55555b;
  --silk-e: #e9e9ec;
  --silk-base: #d9d9de;
  --band: rgba(255, 255, 255, 0.55);
  --band-ink: #35353a;
  --glass: rgba(255, 255, 255, 0.5);
  --glass-line: rgba(255, 255, 255, 0.85);
  --gold-1: #f3dc9b;
  --gold-2: #c9973f;
  --gold-3: #8a5f1c;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #08080a;
  --glow: rgba(201, 160, 82, 0.28);
  --card: linear-gradient(155deg, #1c1c1f 0%, #131315 52%, #3a2f19 150%);
  --ink: #f4f4f5;
  --mut: #9a9aa3;
  --line: rgba(255, 255, 255, 0.09);
  --field: #26262b;
  --field-line: rgba(255, 255, 255, 0.05);
  --btn: #f4f4f5;
  --btn-ink: #0b0b0c;
  --btn-hover: #ffffff;
  --ghost: #26262b;
  --pill: #17171a;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  --err-bg: #2a1517;
  --err-line: #5a2a2e;
  --err: #ff8a8a;
  --logo-filter: invert(1);
  --silk-a: #3b3b40;
  --silk-b: #08080a;
  --silk-c: #6b5530;
  --silk-d: #0d0d0f;
  --silk-e: #4a3d22;
  --silk-base: #0e0e10;
  --band: rgba(255, 255, 255, 0.08);
  --band-ink: #d9d9de;
  --glass: rgba(24, 24, 27, 0.55);
  --glass-line: rgba(255, 255, 255, 0.14);
  color-scheme: dark;
}

body.lx {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(380px, 0.92fr) minmax(0, 1.08fr);
  gap: 20px;
  padding: 20px;
  background: radial-gradient(900px 520px at 100% 0%, var(--glow), transparent 70%), var(--bg);
  color: var(--ink);
  font: 14px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s;
}
body.lx a { color: inherit; text-decoration: none; }

/* ---------- colonna sinistra ---------- */
.lx-left { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.lx-card { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px clamp(22px, 5vw, 64px) 56px; border-radius: 28px; background: var(--card); box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35); border: 1px solid var(--line); }
.lx-form { width: 100%; max-width: 380px; text-align: center; }
.lx-brand { display: inline-flex; margin-bottom: 26px; }
.lx-brand img { display: block; width: auto; height: 22px; filter: var(--logo-filter); }
.lx-form h1 { margin: 0 0 10px; font-size: clamp(28px, 3vw, 36px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 600; }
.lx-sub { margin: 0 auto 30px; max-width: 320px; font-size: 13.5px; line-height: 1.6; color: var(--mut); }
.lx-form form { text-align: left; }

.lx-field { margin-bottom: 12px; }
.lx-field > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lx-f { position: relative; display: block; border-radius: 999px; background: var(--field); border: 1px solid var(--field-line); box-shadow: 0 6px 18px -10px rgba(0, 0, 0, 0.25); transition: border-color 0.15s, box-shadow 0.15s; }
.lx-f::before { content: ""; position: absolute; left: 50px; top: 12px; bottom: 12px; width: 1px; background: var(--line); }
.lx-f:hover { border-color: var(--line); }
.lx-f:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 10%, transparent); }
.lx-f input { display: block; width: 100%; height: 48px; padding: 0 48px 0 64px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; box-shadow: none; }
.lx-f input:focus { outline: none; border: 0; box-shadow: none; }
.lx-f input::placeholder { color: var(--mut); opacity: 0.8; }
.lx-f input:-webkit-autofill { -webkit-text-fill-color: var(--ink); box-shadow: 0 0 0 60px var(--field) inset; }
.lx-ico { position: absolute; left: 17px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--ink); pointer-events: none; }
.lx-tail { position: absolute; right: 10px; top: 50%; width: 30px; height: 30px; margin-top: -15px; display: grid; place-items: center; }
.lx-ok { color: var(--ink); opacity: 0; transform: scale(0.6); transition: 0.2s; pointer-events: none; }
.lx-ok svg { width: 17px; height: 17px; }
.lx-f.valid .lx-ok { opacity: 1; transform: none; }
.lx-eye { border: 0; background: transparent; color: var(--mut); cursor: pointer; border-radius: 50%; padding: 0; }
.lx-eye:hover { color: var(--ink); }
.lx-eye svg { width: 17px; height: 17px; }
.lx-eye .off { display: none; }
.lx-eye.show .on { display: none; }
.lx-eye.show .off { display: inline; }

.lx-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 2px 14px 0; }
.lx-meter i { height: 3px; border-radius: 3px; background: var(--line); transition: background 0.2s; }
.lx-meter[data-s="1"] i:nth-child(-n+1) { background: #c0846a; }
.lx-meter[data-s="2"] i:nth-child(-n+2) { background: #c9a24b; }
.lx-meter[data-s="3"] i:nth-child(-n+3) { background: #8aa86b; }
.lx-meter[data-s="4"] i { background: #5fae7a; }
.lx-meter-t { margin: 5px 14px 12px; font-size: 12px; color: var(--mut); min-height: 16px; }

.lx-go { display: block; width: 100%; height: 50px; margin-top: 16px; border: 0; border-radius: 999px; cursor: pointer; background: var(--btn); color: var(--btn-ink); font: inherit; font-size: 14.5px; font-weight: 600; transition: background 0.15s, transform 0.1s; }
.lx-go:hover { background: var(--btn-hover); }
.lx-go:active { transform: translateY(1px); }
.lx-go:disabled { opacity: 0.65; cursor: progress; }
.lx-form .err { min-height: 0; margin: 0; padding: 0; color: var(--err); font-size: 13px; text-align: center; }
.lx-form .err:not(:empty) { margin-top: 14px; padding: 10px 12px; border-radius: 14px; background: var(--err-bg); border: 1px solid var(--err-line); }

.lx-sep { height: 1px; margin: 20px 0 16px; background: var(--line); }
.lx-alt { display: flex; align-items: center; justify-content: center; width: 100%; height: 50px; border-radius: 999px; background: var(--ghost); border: 1px solid var(--field-line); font-size: 14px; font-weight: 550; box-shadow: 0 6px 18px -10px rgba(0, 0, 0, 0.25); transition: transform 0.15s; }
.lx-alt:hover { transform: translateY(-1px); }
.lx-links { margin-top: 18px; font-size: 13px; color: var(--mut); text-align: center; }
.lx-links a { color: var(--ink); font-weight: 650; }
.lx-links a:hover { text-decoration: underline; }
.lx-legal { margin: 16px 0 0; font-size: 11.5px; line-height: 1.55; color: var(--mut); text-align: center; }
.lx-legal a { text-decoration: underline; }
.lx-back { position: absolute; left: 24px; top: 20px; font-size: 12.5px; color: var(--mut); }
.lx-back:hover { color: var(--ink); }

/* scheda sotto il modulo */
.lx-join { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: 999px; background: var(--pill); border: 1px solid var(--line); box-shadow: var(--shadow); }
.lx-join b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.lx-join small { display: block; font-size: 12px; color: var(--mut); }
.lx-join .go { margin-left: auto; width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); transition: transform 0.2s, background 0.2s; }
.lx-join .go:hover { transform: rotate(45deg); background: var(--ghost); }

/* interruttore tema */
.lx-theme { position: fixed; z-index: 50; right: 36px; top: 34px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--glass-line); background: var(--glass); color: var(--ink); cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.lx-theme svg { width: 18px; height: 18px; }
.lx-theme .moon { display: none; }
:root[data-theme="dark"] .lx-theme .sun { display: none; }
:root[data-theme="dark"] .lx-theme .moon { display: block; }

/* ---------- pannello destro ---------- */
.lx-right { position: relative; display: flex; min-width: 0; }
.lx-hero { position: relative; flex: 1; min-height: calc(100vh - 40px); border-radius: 28px; overflow: hidden; background: var(--silk-base); box-shadow: var(--shadow); border: 1px solid var(--line); isolation: isolate; }
.lx-silk { position: absolute; inset: -20%; z-index: -1; background: conic-gradient(from 205deg at 38% 42%, var(--silk-a), var(--silk-b), var(--silk-c), var(--silk-d), var(--silk-e), var(--silk-b), var(--silk-a)); filter: blur(34px) saturate(1.05); animation: silk 28s ease-in-out infinite alternate; }
.lx-silk::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 46px, rgba(255, 255, 255, 0.07) 48px 50px, transparent 52px 96px); mix-blend-mode: overlay; }
@keyframes silk { from { transform: rotate(-4deg) scale(1.02); } to { transform: rotate(5deg) scale(1.1); } }

.lx-art { position: absolute; left: 50%; top: 3%; height: 74%; width: auto; max-width: 96%; object-fit: contain; transform: translateX(-50%); user-select: none; pointer-events: none; }
/* il file ha sfondo nero: in scuro si fonde con "screen", in chiaro si inverte e si fonde con "multiply" */
:root[data-theme="dark"] .lx-art { mix-blend-mode: screen; }
:root:not([data-theme="dark"]) .lx-art { mix-blend-mode: multiply; filter: invert(1) hue-rotate(180deg) contrast(1.05); }

.lx-band { position: absolute; left: -10%; right: -10%; height: 46px; display: flex; align-items: center; overflow: hidden; background: var(--band); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-block: 1px solid var(--glass-line); color: var(--band-ink); font-size: 14px; font-weight: 500; white-space: nowrap; }
.lx-band.a { top: 56%; transform: rotate(-6deg); }
.lx-band.b { top: 64%; transform: rotate(4deg); }
.lx-band span { display: inline-block; padding-right: 28px; animation: marq 26s linear infinite; }
.lx-band.b span { animation-direction: reverse; }
@keyframes marq { to { transform: translateX(-100%); } }

@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/instrument-serif.woff2) format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url(/assets/fonts/instrument-serif-italic.woff2) format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/assets/fonts/plus-jakarta-sans.woff2) format("woff2"); }
.lx-quote { position: absolute; left: 40px; right: 40px; bottom: 38px; margin: 0; font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif; font-weight: 500; font-size: clamp(30px, 3.2vw, 46px); line-height: 1.08; letter-spacing: -0.035em; color: var(--band-ink); text-wrap: balance; }
.lx-quote em { font-style: normal; background: linear-gradient(100deg, var(--gold-1), var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="dark"] .lx-quote { color: #f4f4f5; }

.lx-forgot { margin: -2px 0 0; text-align: right; }
.lx-forgot button { background: none; border: 0; padding: 4px 8px; color: var(--mut); font: inherit; font-size: 12.5px; cursor: pointer; }
.lx-forgot button:hover { color: var(--ink); text-decoration: underline; }
.lx-join .mk { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--gold-1), var(--gold-2)); color: #3a2706; }
.lx-join .mk svg { width: 19px; height: 19px; }

@media (max-width: 960px) {
  body.lx { grid-template-columns: 1fr; padding: 12px; }
  .lx-right { display: none; }
  .lx-card { padding: 64px 20px 40px; }
  .lx-theme { right: 16px; top: 14px; }
}
@media (prefers-reduced-motion: reduce) { .lx-silk, .lx-band span { animation: none; } .lx-f, .lx-go, .lx-alt, .lx-join .go { transition: none; } }
:root:not([data-theme="dark"]) .lx-quote em { background-image: linear-gradient(100deg, #b98a2e, #8a5f1c); }
