/* JWallet — base condivisa di tutto il sito.
   Un solo posto per font, palette, raggi, ombre e reset: la landing
   (/index.html), le pagine legali (/terms, /privacy, /delete-account) e l'app
   (/app/index.html) linkano tutte questo file. Prima ogni foglio aveva la sua
   copia di @font-face e di :root, e le tre copie divergevano.

   I valori della palette sono gli stessi di src/lib/design-tokens.ts, che
   alimenta il tema MUI: cambiando un colore vanno cambiati in entrambi i posti
   (il CSS non può leggere un modulo TS al build). */

@font-face {
  font-family: 'Poppins';
  src: url('/fonts/Poppins-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('/fonts/Poppins-Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('/fonts/Poppins-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('/fonts/Poppins-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('/fonts/Poppins-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-display: swap;
}

:root {
  /* palette (identica a src/lib/design-tokens.ts) */
  --primary: #453e80;
  --primary-light: #6e6699;
  --primary-dark: #2d3c9c;
  --secondary: #575e71;
  --secondary-light: #7c859b;
  --secondary-dark: #3f4555;
  --bg: #fefbff;
  --surface: #e1e2ec;
  --border: #c7c5d0;
  --text: #1b1b21;
  --text-secondary: #44464f;
  --error: #ba1a1a;

  /* forme e profondità */
  --radius: 24px;
  --radius-lg: 16px;
  --radius-sm: 8px;
  --shadow: 0 2px 8px rgba(27, 27, 33, 0.12);
  --shadow-screen: 0 2px 12px rgba(27, 27, 33, 0.25);

  /* tipografia e superfici condivise */
  --font-sans: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --page-gradient: linear-gradient(135deg, var(--bg) 0%, var(--surface) 100%);
  --page-max: 1100px;
  --page-padding: clamp(16px, 4vw, 48px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: var(--primary);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
