/* ==========================================================================
   FinanceFlow — Landing · Fondazione
   Token derivati da src/theme/tokens.ts (sistema "Aurora"), proiettati sul web.
   Vincolo del repo: nessun esadecimale fuori dalla palette Aurora.
   ========================================================================== */

/* ---- Font (stessi dell'app: Hanken Grotesk display, Inter testo) ---- */
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('../assets/fonts/HankenGrotesk_300Light.ttf') format('truetype');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('../assets/fonts/HankenGrotesk_600SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/Inter_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/Inter_500Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/Inter_700Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

/* ---- Token Aurora ---- */
:root {
  /* Superfici (dark — l'app è dark-only) */
  --canvas: #00042B;
  --background: #01031C;
  --surface: #071440;
  --surface-low: #02123C;
  --surface-high: #091642;
  --surface-highest: #132353;
  --nav-surface: #000C32;
  --nav-border: #384179;
  --aurora-base: #021242;

  /* Testo */
  --text-1: #EFEFF8;
  --text-2: #A7B1D9;
  --text-3: #949DC7;

  /* Contorni e vetro */
  --outline: #565A7A;
  --outline-variant: #2F375E;
  --glass-border: rgba(255, 255, 255, 0.105);
  --glass-fill: rgba(255, 255, 255, 0.05);

  /* Accenti */
  --teal: #21E4DF;
  --cyan: #00FBFF;
  --sky: #0198FF;
  --purple: #8B5CF6;
  --purple-acceso: #9E39F4;
  --blue: #3B82F6;
  --pink: #F06A97;
  --magenta: #B84ABD;
  --magenta-chiaro: #EC64D4;
  --periwinkle: #96ACEE;
  --link: #92BFFB;
  --on-secondary: #000529;

  /* Semantici finanziari (solo per valori finanziari) */
  --positive: #5BF7AF;
  --negative: #FF8B94;
  --warning: #F59E0B;

  /* Gradienti firma */
  --grad-wordmark: linear-gradient(180deg, var(--cyan) 0%, var(--sky) 100%);
  --grad-budget: linear-gradient(135deg, var(--cyan) 0%, var(--purple-acceso) 100%);

  /* Tipografia */
  --font-display: 'Hanken Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Raggi (scala dell'app) */
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-device: 28px;
  --r-pill: 9999px;

  /* Ritmo */
  --content-max: 1200px;
  --pad-x: 24px;
  --section-y: 112px;

  /* Glow firma (unica ombra del sistema Aurora: quella del FAB).
     Deliberato, non decorativo: ha offset e resta solo sul bottone primario. */
  --glow-teal: 0 6px 18px rgba(33, 228, 223, 0.28);
}

/* ---- Reset minimo ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
/* Lo sfondo anche sulla radice: Chrome riempie col colore di html le zone non
   ancora dipinte (resize della finestra, overscroll elastico) — senza questo
   apparirebbero bianche. */
html { scroll-behavior: smooth; background: var(--canvas); }
body {
  background: var(--canvas);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: var(--link); text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ---- Tipografia ---- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; text-wrap: balance; }
.h1 {
  font-size: clamp(40px, 6.5vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.03em;
}
.h2 {
  font-size: clamp(30px, 4.2vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.h3 { font-size: 21px; line-height: 1.3; }
.lead {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--text-2);
  line-height: 1.6;
  text-wrap: pretty;
}
.accento { color: var(--teal); }
/* Numeri finanziari: peso 300 display, tabular — identità dell'app */
.importo {
  font-family: var(--font-display);
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.grad-text {
  background: var(--grad-wordmark);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- Layout ---- */
.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
section { padding-block: var(--section-y); }

/* ---- Primitive vetro ---- */
.glass {
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ---- Bottoni ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding-inline: 28px;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn-primary {
  background: var(--teal);
  color: var(--on-secondary);
  box-shadow: var(--glow-teal);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(33, 228, 223, 0.38); }
.btn-ghost {
  border: 1px solid var(--glass-border);
  background: var(--glass-fill);
  color: var(--text-1);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); }

/* ---- Reveal (progressive enhancement, JS aggiunge .visible) ----
   Un solo momento d'ingresso autoriale: hero e card del recap. Le altre
   sezioni si presentano già visibili: l'entrata identica ovunque è rumore. */
.hero .reveal,
.recap-inner .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.hero .reveal.visible,
.recap-inner .reveal.visible { opacity: 1; transform: none; }

/* ---- Icone (SVG a tratto coerente, mai emoji) ---- */
.icona {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icona-sm { width: 17px; height: 17px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
