/* Dany Group – stile della piattaforma: inchiostro, carta e un accento arancio */
:root {
  --ink: #0F0F0E; --ink-2: #161614; --ink-3: #1F1E1B; --line-d: #2A2926; --line-d2: #3A3935;
  --bone: #EDEAE3; --muted-d: #A19D94;
  --paper: #F3F1EC; --paper-2: #E9E5DD; --card: #FFFFFF; --line: #E3DFD6; --line-2: #EFECE6; --campo: #D9D4CA;
  --text: #141413; --muted: #6B675F;
  --acc: #FF5F2E;
  --ok: #1F7A4A; --ok-t: #1F6B43; --ok-bg: #E4F2EA; --ok-d: #7EE0A6;
  --err: #B42318; --err-d: #FF8A70;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: Geist, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.5; color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased; }
body.d { background: var(--ink); color: var(--bone); }
img, svg { display: block; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.em { font-style: italic; color: var(--acc); }

/* Marchio */
.logo { display: inline-flex; align-items: baseline; gap: 8px; min-height: 44px; align-items: center; text-decoration: none; }
.logo b { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1; }
.logo span { font-family: var(--mono); font-size: 10px; letter-spacing: .22em; color: var(--muted-d); }

/* Bottoni */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border: 1px solid transparent; border-radius: 999px;
  background: var(--ink); color: var(--bone); font-size: 15px; font-weight: 600;
  text-decoration: none; white-space: nowrap; transition: transform .15s, background .2s, opacity .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-acc { background: var(--acc); color: var(--ink); }
.btn-chiaro { background: var(--bone); color: var(--ink); }
.btn-out { background: var(--card); border-color: var(--campo); color: var(--text); }
.btn-out-d { background: transparent; border-color: var(--line-d2); color: var(--bone); }
.btn-scuro { background: #24221F; color: var(--bone); }
.btn-testo { background: transparent; border-color: transparent; color: inherit; padding: 0 6px; }
.btn-testo:hover { transform: none; text-decoration: underline; text-underline-offset: 4px; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 14px; }
.btn-grande { min-height: 54px; padding: 0 28px; font-size: 16px; }
.btn-pericolo { background: transparent; border-color: #E8C4BF; color: var(--err); }

/* Campi */
.campo { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 500; }
.campo small { font-weight: 400; color: var(--muted); }
.input {
  width: 100%; min-height: 50px; padding: 0 16px; border: 1px solid var(--campo); border-radius: 12px;
  background: var(--card); font-size: 16px; color: var(--text); transition: border-color .2s, box-shadow .2s;
}
textarea.input { min-height: 120px; padding: 14px 16px; line-height: 1.55; resize: vertical; }
select.input { padding-right: 40px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B675F' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(15, 15, 14, .08); }
.d .input { background: #151513; border-color: var(--line-d2); color: var(--bone); }
.d .input:focus { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(255, 95, 46, .15); }
.d .input::placeholder { color: #77736B; }
.campo-d { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted-d); }
.errore { margin: 0; color: var(--err); font-size: 14px; }
.d .errore { color: var(--err-d); }

/* Interruttore sì/no */
.switch { position: relative; flex: none; display: inline-flex; align-items: center; width: 52px; height: 44px; padding: 0; border: 0; background: transparent; }
.switch::before { content: ''; width: 46px; height: 28px; border-radius: 999px; background: #CFC9BE; transition: background .2s; }
.switch::after { content: ''; position: absolute; left: 3px; top: 11px; width: 22px; height: 22px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch[aria-checked="true"]::before { background: var(--ok); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }

/* Avvisi in basso */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 100; max-width: calc(100vw - 32px);
  padding: 14px 20px; border-radius: 999px; background: var(--ink); color: var(--bone);
  font-size: 14px; font-weight: 500; box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .45);
  opacity: 0; transform: translate(-50%, 16px); transition: opacity .25s, transform .25s; pointer-events: none;
}
.toast.visibile { opacity: 1; transform: translate(-50%, 0); }
.toast.toast-errore { background: var(--err); color: #FFFFFF; }

/* Caricamento */
.caricamento { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--paper); z-index: 50; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* Pagine scure: home della piattaforma e accesso */
.pagina-scura { min-height: 100vh; display: flex; flex-direction: column; padding: 24px clamp(20px, 5vw, 72px); }
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.top nav { display: flex; align-items: center; gap: 8px; }
.hero-p { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 28px; max-width: 1000px; padding: 72px 0; }
.hero-p h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(52px, 8vw, 124px); line-height: .95; letter-spacing: -0.02em; text-wrap: balance; }
.hero-p p { margin: 0; max-width: 560px; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--muted-d); }
.hero-p .mono { color: var(--muted-d); }
.azioni { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.passi-p { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 24px; padding: 32px 0; border-top: 1px solid var(--line-d); }
.passi-p div { display: flex; flex-direction: column; gap: 6px; }
.passi-p b { font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: .1em; color: var(--acc); }
.passi-p strong { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.1; }
.passi-p span { color: var(--muted-d); font-size: 15px; }
.pie { padding-top: 24px; border-top: 1px solid var(--line-d); color: var(--muted-d); font-size: 13px; }
.auth { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px 0; }
.auth-box { width: min(440px, 100%); display: flex; flex-direction: column; gap: 22px; }
.auth-box h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 5vw, 60px); line-height: 1; }
.auth-box p { margin: 0; color: var(--muted-d); }
.auth-box form { display: flex; flex-direction: column; gap: 16px; }
.auth-link { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--muted-d); }
.auth-link a, .auth-link button { min-height: 44px; display: inline-flex; align-items: center; padding: 0; border: 0; background: none; color: var(--bone); text-decoration: underline; text-underline-offset: 4px; }
.nota-ok { margin: 0; padding: 14px 16px; border-radius: 12px; background: #16241C; color: var(--ok-d); font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
