/* ============================================
   Strategic Advisory — Design System v2 (Step A)
   Dual theme: PUBLIC (default in :root) + APP (.theme-app)
   Soft Elevation + Depth (style "A + tocco D")
   Updated 2026-05-09
   ============================================ */

/* ---------- SHARED TOKENS (theme-agnostic) ---------- */
:root {
  /* Font stacks */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* Font weights */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* Line heights */
  --lh-tight: 1.2;
  --lh-snug: 1.35;
  --lh-base: 1.6;
  --lh-loose: 1.75;

  /* Spacing scale (4/8-based) */
  --space-1: 0.25rem;   /* 4 */
  --space-2: 0.5rem;    /* 8 */
  --space-3: 0.75rem;   /* 12 */
  --space-4: 1rem;      /* 16 */
  --space-5: 1.25rem;   /* 20 */
  --space-6: 1.5rem;    /* 24 */
  --space-8: 2rem;      /* 32 */
  --space-10: 2.5rem;   /* 40 */
  --space-12: 3rem;     /* 48 */
  --space-16: 4rem;     /* 64 */
  --space-24: 6rem;     /* 96 */

  /* Radii */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  --radius-circle: 50%;

  /* Transitions */
  --t-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition: var(--t-base);                /* retrocompat con regole esistenti */

  /* Z-index layers */
  --z-base: 1;
  --z-content: 10;
  --z-sticky: 100;
  --z-header: 1000;
  --z-dropdown: 1100;
  --z-overlay: 1200;
  --z-modal: 1300;
  --z-toast: 1400;
  --z-cookie: 9000;

  /* Layout */
  --max-width: 1200px;
  --header-height: 80px;
  --header-height-mobile: 70px;

  /* Status semantic (uguali in entrambi i theme — semaforo coerente) */
  --status-success: #1f7a4d;
  --status-success-soft: #e3f3ea;
  --status-warning: #8a5a00;
  --status-warning-soft: #fdf3d8;
  --status-danger: #a3261a;
  --status-danger-soft: #fbe4e1;
  --status-info: #0b5e8e;
  --status-info-soft: #e1eef8;

  /* ---------- THEME PUBLIC (default, no body class needed) ---------- */
  /* Strategic Advisory brand: teal + oro + Playfair heading */

  --primary: #1a5266;
  --primary-dark: #0f3a4a;
  --primary-light: #2a7a99;
  --primary-rgb: 26, 82, 102;
  --accent: #c4a35a;
  --accent-light: #d4b86a;
  --accent-dark: #a8893e;
  --accent-rgb: 196, 163, 90;

  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --bg-dark: #0c2d3a;
  --surface: #ffffff;
  --surface-alt: #f5f7fa;

  --text: #2d3436;
  --text-light: #4b5358;          /* era #636e72 → bumped per AA 7.4:1 */
  --text-muted: #6b7280;          /* era #b2bec3 (2.85:1 FAIL) → ora 4.83:1 ✓ AA */
  --text-on-primary: #ffffff;
  --text-on-dark: rgba(255, 255, 255, 0.85);
  --text-on-dark-soft: rgba(255, 255, 255, 0.65);

  --border: #dfe6e9;
  --border-strong: #c9d1d4;

  /* Shadows — basate su --primary-rgb (cambia il primary, propaga ovunque) */
  --shadow: 0 2px 15px rgba(var(--primary-rgb), 0.08);
  --shadow-md: 0 6px 25px rgba(var(--primary-rgb), 0.10);
  --shadow-lg: 0 10px 40px rgba(var(--primary-rgb), 0.12);
  --shadow-hover: 0 15px 50px rgba(var(--primary-rgb), 0.18);
  --shadow-focus: 0 0 0 3px rgba(var(--primary-rgb), 0.18);

  /* Elevation system (style "A: Soft Elevation + Depth Layers") */
  /* Ogni livello combina 2 ombre: una "vicina" (1-3px) + una "lontana" (10-36px) per dare profondità reale */
  --elevation-1: 0 1px 2px rgba(var(--primary-rgb), 0.06), 0 1px 1px rgba(var(--primary-rgb), 0.08);
  --elevation-2: 0 3px 6px rgba(var(--primary-rgb), 0.07), 0 2px 4px rgba(var(--primary-rgb), 0.06);
  --elevation-3: 0 10px 20px rgba(var(--primary-rgb), 0.10), 0 6px 8px rgba(var(--primary-rgb), 0.08);
  --elevation-4: 0 18px 36px rgba(var(--primary-rgb), 0.12), 0 12px 18px rgba(var(--primary-rgb), 0.08);

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  --gradient-brand: linear-gradient(135deg, var(--primary), var(--primary-light));
  --gradient-accent: linear-gradient(135deg, var(--accent-dark), var(--accent));

  /* Fonts (semantic) */
  --font-heading: var(--font-serif);
  --font-body: var(--font-sans);

  /* Typography scale */
  --fs-base: 1rem;
  --fs-h1: 3.2rem;
  --fs-h2: 2.4rem;
  --fs-h3: 1.8rem;
  --fs-h4: 1.4rem;
  --fs-h5: 1.2rem;
  --fs-body: 1rem;
  --fs-sm: 0.9rem;
  --fs-xs: 0.8rem;

  color-scheme: light;
}

/* ---------- THEME APP (attivato con <body class="theme-app">) ---------- */
/* FH Network area + dashboard cliente: viola + Inter + no-shadow flat */
/* Inattivo finché Step F non aggiungerà la classe sui <body> di dashboard/profile/messages/notifications */
.theme-app {
  --primary: #5022B2;
  --primary-dark: #1A0A6B;
  --primary-light: #705CC3;
  --primary-rgb: 80, 34, 178;
  --primary-soft: #EDE9F7;

  --bg: #F8F9FA;
  --bg-alt: #FFFFFF;
  --surface: #FFFFFF;
  --surface-alt: #F8F9FA;

  --text: #1A1C1E;
  --text-light: #484A4B;
  --text-muted: #6C757D;

  --border: #DEE2E6;
  --border-strong: #C5CBD1;

  /* Theme APP: separazione per bordo, non per ombra */
  --shadow: 0 0 0 1px var(--border);
  --shadow-md: 0 0 0 1px var(--border);
  --shadow-lg: 0 0 0 1px var(--border);
  --shadow-hover: 0 0 0 1px var(--primary);
  --shadow-focus: 0 0 0 3px rgba(var(--primary-rgb), 0.25);
  --elevation-1: none;
  --elevation-2: none;
  --elevation-3: none;
  --elevation-4: none;

  --gradient-hero: linear-gradient(270deg, #705CC3 0%, #39197C 100%);
  --gradient-brand: linear-gradient(135deg, var(--primary-dark), var(--primary));

  --font-heading: var(--font-sans);
  --font-body: var(--font-sans);

  /* Scala compatta SaaS (base 14) */
  --fs-base: 0.875rem;
  --fs-h1: 1.75rem;
  --fs-h2: 1.375rem;
  --fs-h3: 1.125rem;
  --fs-h4: 1rem;
  --fs-h5: 0.9375rem;
  --fs-body: 0.875rem;
  --fs-sm: 0.8125rem;
  --fs-xs: 0.75rem;
}

/* ---------- ACCESSIBILITÀ GLOBALE (Step A) ---------- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.theme-app :focus-visible { outline-color: var(--primary); }

/* Skip link — primo elemento del <body>, va aggiunto in step di markup */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #ffffff;
  padding: var(--space-3) var(--space-4);
  z-index: var(--z-toast);
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 var(--radius) var(--radius);
}
.skip-link:focus,
.skip-link:focus-visible {
  left: var(--space-3);
  top: var(--space-3);
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Tap target mobile: 44px minimo (WCAG 2.5.5) */
@media (max-width: 768px) {
  .btn,
  .nav-links a,
  .lang-switch button,
  .menu-toggle,
  .footer-social a,
  .auth-logged-in,
  .auth-logged-out {
    min-height: 44px;
  }
  .btn,
  .lang-switch button,
  .menu-toggle,
  .footer-social a {
    min-width: 44px;
  }
}

/* Riduci motion per chi lo preferisce (a11y + risparmio batteria) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent);
}

ul, ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--primary-dark);
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: 3.2rem; }
h2 { font-size: 2.4rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

.accent-text {
  color: var(--accent);
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 6rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-dark {
  background: var(--bg-dark);
  color: #fff;
}

.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: #fff;
}

.section-dark p {
  color: rgba(255, 255, 255, 0.8);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 1rem auto 0;
}

.section-header p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* --- Grid System --- */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* --- Buttons (Step B: rimosso text-transform uppercase, era pattern dated 2014-2018) --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.1px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  text-decoration: none;
  line-height: 1.35;
  user-select: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-accent:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.btn-outline-white {
  background: transparent;
  color: #fff;
  border-color: #fff;
}

.btn-outline-white:hover {
  background: #fff;
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1.1rem 2.5rem;
  font-size: 1.05rem;
}

.btn-sm {
  padding: 0.6rem 1.4rem;
  font-size: 0.85rem;
}

/* --- Header / Navbar --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: var(--transition);
}

.header.scrolled {
  box-shadow: var(--shadow);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  max-width: 220px;
}

.logo img {
  height: 38px;
  width: auto;
}

.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  color: var(--primary-dark);
  font-weight: 700;
  line-height: 1.2;
}

.logo-text span {
  display: block;
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  gap: 1.2rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: var(--fw-medium);
  color: var(--text);
  letter-spacing: 0;
  position: relative;
  padding: 0.4rem 0;
  text-decoration: none;
  transition: color var(--t-fast);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--bg-alt);
  border-radius: 20px;
  padding: 0.25rem;
}

.lang-switch button {
  background: none;
  border: none;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 16px;
  color: var(--text-light);
  transition: var(--transition);
}

.lang-switch button.active {
  background: var(--primary);
  color: #fff;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--primary-dark);
  transition: var(--transition);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  overflow: hidden;
  margin-top: var(--header-height);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.hero h1 {
  color: #fff;
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.15;
}

.hero h1 .highlight {
  color: var(--accent);
}

.hero p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-stat {
  text-align: center;
}

.hero-stat .number {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
}

.hero-stat .label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-image {
  position: absolute;
  right: -5%;
  top: 50%;
  transform: translateY(-50%);
  width: 45%;
  opacity: 0.1;
}

/* --- Cards --- */
.card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: #fff;
}

.card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.3rem;
}

.card p {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.card-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.card-link:hover {
  color: var(--accent-dark);
  gap: 0.75rem;
}

/* --- Deal Cards --- */
.deal-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
}

.deal-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.deal-card-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  padding: 1.5rem;
  color: #fff;
  position: relative;
}

.deal-card-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--accent);
  color: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.deal-card-header h4 {
  color: #fff;
  margin-bottom: 0.3rem;
}

.deal-card-header .deal-sector {
  font-size: 0.85rem;
  opacity: 0.8;
}

.deal-card-body {
  padding: 1.5rem;
}

.deal-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.deal-meta-item {
  display: flex;
  flex-direction: column;
}

.deal-meta-item .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.deal-meta-item .value {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

.deal-card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* --- Stats Section --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item {
  padding: 2rem;
}

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- Book Section --- */
.book-showcase {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: center;
}

.book-cover {
  position: relative;
  perspective: 1000px;
}

.book-cover-img {
  width: 100%;
  max-width: 350px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  transform: rotateY(-5deg);
  transition: var(--transition);
}

.book-cover:hover .book-cover-img {
  transform: rotateY(0deg);
}

.book-info h2 {
  margin-bottom: 0.5rem;
}

.book-info .book-subtitle {
  font-size: 1.1rem;
  color: var(--accent);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.book-info .book-author {
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.book-chapters {
  margin: 2rem 0;
}

.book-chapters h4 {
  margin-bottom: 1rem;
}

.book-chapters ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.book-chapters li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.95rem;
  color: var(--text-light);
}

.book-chapters li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  transform: translateY(-50%);
}

/* --- Testimonials --- */
.testimonial-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  position: relative;
}

.testimonial-card::before {
  content: '\201C';
  font-family: 'Playfair Display', serif;
  font-size: 5rem;
  color: var(--accent);
  opacity: 0.2;
  position: absolute;
  top: 0.5rem;
  left: 1.5rem;
  line-height: 1;
}

.testimonial-text {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
}

.testimonial-name {
  font-weight: 600;
  color: var(--text);
}

.testimonial-role {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Forms --- */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: 0.85rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  transition: var(--transition);
}

.form-control:focus,
.form-control:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
}

.form-control::placeholder {
  color: var(--text-muted);
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23636e72' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* --- Footer --- */
.footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand {
  max-width: 300px;
}

.footer-brand .logo {
  margin-bottom: 1rem;
}

.footer-brand .logo img {
  filter: brightness(10);
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.footer h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 1.5rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
  padding-left: 5px;
}

.footer-newsletter .form-control {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  margin-bottom: 0.75rem;
}

.footer-newsletter .form-control::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--accent);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a:hover {
  color: var(--accent);
}

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(196, 163, 90, 0.1);
}

.cta-banner h2 {
  color: #fff;
  margin-bottom: 1rem;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --- Cookie Banner --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 1.5rem 2rem;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
}

.cookie-banner.show {
  display: flex;
}

.cookie-banner p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  margin: 0;
}

.cookie-banner .cookie-buttons {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* --- Filter Bar (Deals) --- */
.filter-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  padding: 1.5rem;
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.filter-bar .form-control {
  flex: 1;
  min-width: 180px;
}

/* --- About / Team --- */
.team-card {
  text-align: center;
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.team-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2.5rem;
  font-family: 'Playfair Display', serif;
}

.team-card h4 {
  margin-bottom: 0.3rem;
}

.team-card .role {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.team-card p {
  font-size: 0.9rem;
}

/* --- Values Section --- */
.value-item {
  display: flex;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}

.value-item:last-child {
  border-bottom: none;
}

.value-number {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.5;
  min-width: 50px;
}

/* --- Services Detail --- */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}

.service-detail:nth-child(even) {
  direction: rtl;
}

.service-detail:nth-child(even) > * {
  direction: ltr;
}

.service-detail:last-child {
  border-bottom: none;
}

.service-icon-lg {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  margin-bottom: 1.5rem;
}

.service-visual {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.service-visual i {
  font-size: 6rem;
  color: var(--primary);
  opacity: 0.15;
}

.service-features {
  margin: 1.5rem 0;
}

.service-features li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-light);
  font-size: 0.95rem;
}

.service-features li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.8rem;
}

/* --- Contact Page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
}

.contact-info-card {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.contact-info-card i {
  font-size: 1.3rem;
  color: var(--primary);
  margin-top: 0.2rem;
}

.contact-info-card h4 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
  font-family: 'Inter', sans-serif;
}

.contact-info-card p {
  font-size: 0.9rem;
  margin: 0;
}

.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 2rem;
  box-shadow: var(--shadow);
}

.map-container iframe {
  width: 100%;
  height: 300px;
  border: none;
}

/* --- Page Header --- */
.page-header {
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary) 100%);
  padding: 8rem 0 4rem;
  margin-top: var(--header-height);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-header h1 {
  color: #fff;
  font-size: 2.8rem;
  position: relative;
  z-index: 1;
}

.page-header p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.15rem;
  max-width: 500px;
  margin: 1rem auto 0;
  position: relative;
  z-index: 1;
}

.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.6);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  color: var(--accent);
}

/* --- Utilities --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.hidden { display: none !important; }

/* ============================================================
   FH DESIGN SYSTEM v2 — STEP B COMPONENTS
   Componenti unificati: badge, notice, status, btn extra, card modifier, accent-card
   Aggiunti 2026-05-09
   ============================================================ */

/* ---------- BADGE (sostituisce le palette Bootstrap-like inline) ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  line-height: 1.4;
  letter-spacing: 0.2px;
  white-space: nowrap;
  border: 1px solid transparent;
  text-decoration: none;
}
.badge--primary { background: var(--primary); color: var(--text-on-primary); }
.badge--accent  { background: var(--accent); color: #1f1a0e; }
.badge--neutral { background: var(--bg-alt); color: var(--text); border-color: var(--border); }
.badge--outline { background: transparent; color: var(--primary); border-color: currentColor; }
.badge--success { background: var(--status-success-soft); color: var(--status-success); }
.badge--warning { background: var(--status-warning-soft); color: var(--status-warning); }
.badge--danger  { background: var(--status-danger-soft);  color: var(--status-danger); }
.badge--info    { background: var(--status-info-soft);    color: var(--status-info); }
.badge--muted   { background: #e9ecef; color: #6c757d; }

.badge--sm { padding: 2px var(--space-2); font-size: 0.6875rem; }
.badge--lg { padding: var(--space-2) var(--space-4); font-size: var(--fs-sm); }

/* Numeric count (notifiche / messaggi non letti) */
.badge--count {
  min-width: 18px; height: 18px; padding: 0 5px;
  justify-content: center;
  background: var(--status-danger); color: #fff;
  font-size: 0.6875rem; line-height: 1;
  border-radius: var(--radius-pill);
}

/* ---------- STATUS BADGE LEGACY ALIASES ---------- */
/* Mappa le classi esistenti (.status-active ecc. usate da JS in dashboard) ai nuovi token semantic */
.status-badge {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  border: 1px solid transparent;
  white-space: nowrap;
}
.status-active   { background: var(--status-success-soft); color: var(--status-success); }
.status-pending  { background: var(--status-warning-soft); color: var(--status-warning); }
.status-rejected { background: var(--status-danger-soft);  color: var(--status-danger); }
.status-expired  { background: var(--bg-alt); color: var(--text-muted); border-color: var(--border); }

/* ---------- NOTICE (banner compliance) ---------- */
/* Sostituisce gli inline style="background:#fdf6e7;border-bottom:..." sparsi su deals/pricing/dashboard/immobiliare */
.notice {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
  background: #fdf6e7;
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--text);
  margin-block: var(--space-4);
}
.notice__icon {
  flex-shrink: 0;
  font-size: 1.05rem;
  color: var(--accent-dark);
  margin-top: 2px;
}
.notice__body { flex: 1; }
.notice__body strong { font-weight: var(--fw-semibold); color: var(--text); }
.notice__body p { margin: 0; }
.notice__body p + p { margin-top: var(--space-2); }

.notice--info {
  background: var(--status-info-soft);
  border-left-color: var(--status-info);
}
.notice--info .notice__icon { color: var(--status-info); }
.notice--warning {
  background: var(--status-warning-soft);
  border-left-color: var(--status-warning);
}
.notice--warning .notice__icon { color: var(--status-warning); }
.notice--danger {
  background: var(--status-danger-soft);
  border-left-color: var(--status-danger);
}
.notice--danger .notice__icon { color: var(--status-danger); }

/* Variante "banner full-width" (per disclaimer compliance sopra le sezioni) */
.notice--banner {
  margin-block: 0;
  border-radius: 0;
  border-left: 0;
  border-bottom: 1px solid #e5d8b3;
  padding: var(--space-3) 0;
}
.notice--banner.notice .notice__icon { margin-top: 1px; }

/* ---------- BTN EXTRA — ghost + secondary + size lg/sm ---------- */
/* Aggiunte allo .btn esistente (no override delle vecchie .btn-primary/.btn-outline) */
.btn-ghost {
  background: transparent;
  color: var(--primary);
  border-color: transparent;
  padding-inline: var(--space-3);
}
.btn-ghost:hover {
  background: var(--bg-alt);
  color: var(--primary-dark);
  border-color: transparent;
}

.btn-secondary {
  background: var(--accent);
  color: #1f1a0e;
  border-color: var(--accent);
}
.btn-secondary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.btn-block { width: 100%; }

/* Stato hover: sostituisce gli effetti translateY+shadow esistenti rendendoli "elevation-aware" */
.btn-primary:focus-visible,
.btn-accent:focus-visible,
.btn-outline:focus-visible,
.btn-ghost:focus-visible,
.btn-secondary:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

/* ---------- CARD MODIFIERS ---------- */
/* La .card esistente resta; aggiungo modifier per riusare il pattern accent-left */
.card--accent {
  border-left: 4px solid var(--accent);
}
.card--accent-primary {
  border-left: 4px solid var(--primary);
}
.card--compact { padding: var(--space-5); }
.card--dense   { padding: var(--space-4); border-radius: var(--radius); }
.card--flat    { box-shadow: none; }
.card--elevated { box-shadow: var(--elevation-2); }
.card--elevated:hover { box-shadow: var(--elevation-3); }

/* ---------- ACCENT CARD (chapter / sub-card / notif unread) ---------- */
/* Unifica il pattern border-left 4px duplicato in book/dashboard/notifications */
.accent-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.accent-card:hover { background: var(--bg-alt); }
.accent-card--primary { border-left-color: var(--primary); }
.accent-card--success { border-left-color: var(--status-success); }
.accent-card--warning { border-left-color: var(--status-warning); }
.accent-card--danger  { border-left-color: var(--status-danger); }

/* ---------- DASH-CARD ICONS via classi (sostituisce inline gradient su dashboard) ---------- */
/* Le classi qui sotto vengono usate al posto di style="background: linear-gradient(...)" inline */
.icon-tile {
  width: 45px;
  height: 45px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.icon-tile--primary { background: var(--gradient-brand); }
.icon-tile--accent  { background: var(--gradient-accent); }
.icon-tile--success { background: linear-gradient(135deg, #1f7a4d, #2c9c66); }
.icon-tile--warning { background: linear-gradient(135deg, #8a5a00, #b87800); }
.icon-tile--danger  { background: linear-gradient(135deg, #a3261a, #c93b2d); }
.icon-tile--info    { background: linear-gradient(135deg, #0b5e8e, #1c7eb4); }
.icon-tile--neutral { background: linear-gradient(135deg, #2c3e50, #34495e); }
.icon-tile--gold    { background: linear-gradient(135deg, var(--accent-dark), var(--accent-light)); }

.icon-tile--lg { width: 56px; height: 56px; font-size: 1.5rem; }
.icon-tile--sm { width: 36px; height: 36px; font-size: 1rem; }

/* ---------- NAV BADGE POSITIONING (per link con badge sovrapposto) ---------- */
.has-nav-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-badge {
  position: absolute;
  top: 4px;
  right: 8px;
}

/* ---------- TEXT UTILITIES ---------- */
.text-muted    { color: var(--text-muted); }
.text-light    { color: var(--text-light); }
.text-primary  { color: var(--primary); }
.text-accent   { color: var(--accent); }
.text-success  { color: var(--status-success); }
.text-warning  { color: var(--status-warning); }
.text-danger   { color: var(--status-danger); }
.text-info     { color: var(--status-info); }
.text-bold     { font-weight: var(--fw-bold); }
.text-semibold { font-weight: var(--fw-semibold); }
.text-sm       { font-size: var(--fs-sm); }
.text-xs       { font-size: var(--fs-xs); }

/* ---------- STEP PROGRESS (wizard multi-step, sostituisce steps-indicator inline) ---------- */
.step-progress {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
  width: 100%;
}
.step-progress__step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  position: relative;
  min-width: 0;
}
.step-progress__dot {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-circle);
  background: var(--surface);
  color: var(--text-muted);
  border: 2px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  z-index: 2;
  transition: background var(--t-base), color var(--t-base), border-color var(--t-base), transform var(--t-base);
  position: relative;
}
.step-progress__step.is-active .step-progress__dot {
  background: var(--primary);
  color: var(--text-on-primary);
  border-color: var(--primary);
  transform: scale(1.08);
  box-shadow: var(--shadow-focus);
}
.step-progress__step.is-done .step-progress__dot {
  background: var(--primary);
  color: var(--text-on-primary);
  border-color: var(--primary);
}
.step-progress__step.is-done .step-progress__dot::before {
  content: '\f00c'; /* Font Awesome check */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.85rem;
}
.step-progress__step.is-done .step-progress__num { display: none; }

.step-progress__label {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-align: center;
  font-weight: var(--fw-medium);
  line-height: 1.3;
  max-width: 14ch;
}
.step-progress__step.is-active .step-progress__label {
  color: var(--text);
  font-weight: var(--fw-semibold);
}

/* connector line between steps */
.step-progress__step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 17px;
  left: calc(50% + 22px);
  right: calc(-50% + 22px);
  height: 2px;
  background: var(--border);
  z-index: 1;
}
.step-progress__step.is-done:not(:last-child)::after {
  background: var(--primary);
}

@media (max-width: 600px) {
  .step-progress__label { font-size: 0.7rem; max-width: 10ch; }
  .step-progress__dot { width: 30px; height: 30px; font-size: var(--fs-xs); }
  .step-progress__step:not(:last-child)::after { top: 14px; left: calc(50% + 18px); right: calc(-50% + 18px); }
}

/* ---------- REVEAL ON SCROLL (Step E — initial state per .is-revealed via JS) ---------- */
/* Stato iniziale: elementi sotto la fold partono invisibili e leggermente spostati. */
/* Il JS effects.js aggiunge .is-revealed quando entrano in viewport. */
.section .animate:not(.is-revealed),
.animate-stagger > *:not(.is-revealed),
.section .card:not(.is-revealed),
.section .deal-card:not(.is-revealed),
.section .price-card:not(.is-revealed),
.section .pro-card:not(.is-revealed),
.section .team-card:not(.is-revealed),
.section .testimonial-card:not(.is-revealed),
.section .post-card:not(.is-revealed) {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.23, 0.86, 0.39, 0.96), transform 0.7s cubic-bezier(0.23, 0.86, 0.39, 0.96);
}
.is-revealed {
  opacity: 1 !important;
  transform: translateY(0) !important;
}
.animate-stagger > *.is-revealed:nth-child(1)  { transition-delay: 0s; }
.animate-stagger > *.is-revealed:nth-child(2)  { transition-delay: 0.08s; }
.animate-stagger > *.is-revealed:nth-child(3)  { transition-delay: 0.16s; }
.animate-stagger > *.is-revealed:nth-child(4)  { transition-delay: 0.24s; }
.animate-stagger > *.is-revealed:nth-child(5)  { transition-delay: 0.32s; }
.animate-stagger > *.is-revealed:nth-child(6)  { transition-delay: 0.40s; }
.animate-stagger > *.is-revealed:nth-child(7)  { transition-delay: 0.48s; }
.animate-stagger > *.is-revealed:nth-child(8)  { transition-delay: 0.56s; }
.animate-stagger > *.is-revealed:nth-child(9)  { transition-delay: 0.64s; }
.animate-stagger > *.is-revealed:nth-child(10) { transition-delay: 0.72s; }
.animate-stagger > *.is-revealed:nth-child(11) { transition-delay: 0.80s; }
.animate-stagger > *.is-revealed:nth-child(12) { transition-delay: 0.88s; }

@media (prefers-reduced-motion: reduce) {
  .section .animate,
  .animate-stagger > *,
  .section .card,
  .section .deal-card,
  .section .price-card,
  .section .pro-card,
  .section .team-card,
  .section .testimonial-card,
  .section .post-card {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---------- VISUALLY HIDDEN (a11y label-only) ---------- */
.visually-hidden,
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ============================================================
   ==== STEP D: 3D DEPTH + MICRO-ANIMATIONS                ====
   Hero v2 (mesh + floating depth) — Page header mesh —
   Card elevation upgrade — Editorial title settle —
   Icon pulse-on-hover.
   Tutto override additivo: nessuna regola precedente rimossa.
   ============================================================ */

/* ---------- HERO v2: gradient mesh + floating depth ---------- */
.hero {
  /* potenzia il gradient con mesh sottile sovrapposto al base */
  background:
    radial-gradient(ellipse at 18% 12%, rgba(196, 163, 90, 0.18) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 80%, rgba(26, 82, 102, 0.45) 0%, transparent 55%),
    radial-gradient(circle at 55% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 60%),
    linear-gradient(135deg, var(--bg-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  isolation: isolate;
}

/* Pattern SVG resta come ::before; aggiungiamo floating depth via ::after wrapper */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle 240px at 12% 28%, rgba(196, 163, 90, 0.10), transparent 70%),
    radial-gradient(circle 320px at 92% 78%, rgba(255, 255, 255, 0.05), transparent 75%);
  animation: hero-mesh-drift 18s ease-in-out infinite alternate;
}

@keyframes hero-mesh-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(2%, -1.5%, 0) scale(1.04); }
}

/* Floating depth shapes: aggiungere <span class="hero-depth"></span> x 3 nel markup,
   ma anche se non presenti il layout non cambia. */
.hero-depth {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle, rgba(196, 163, 90, 0.18), transparent 70%);
  filter: blur(1px);
  animation: float-slow 14s ease-in-out infinite;
  opacity: 0.55;
}
.hero-depth--1 { width: 280px; height: 280px; top: 8%;  right: 8%;  animation-delay: 0s; }
.hero-depth--2 { width: 180px; height: 180px; bottom: 12%; left: 6%; background: radial-gradient(circle, rgba(255,255,255,0.12), transparent 70%); animation-delay: -5s; animation-duration: 18s; }
.hero-depth--3 {
  width: 120px; height: 120px;
  top: 55%; left: 48%;
  background: radial-gradient(circle, rgba(196, 163, 90, 0.22), transparent 65%);
  animation-delay: -9s;
  animation-duration: 22s;
}

/* Hero content layer above mesh + svg pattern */
.hero-content { z-index: 3; }

/* Hero entrance choreography: title kinetic settle, subtitle/buttons fade-up, stats stagger */
.hero h1 {
  transform-origin: 0% 50%;
  animation: settle-in 0.85s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.hero-content > p,
.hero p {
  animation: fade-up-on-load 0.7s ease-out 0.15s both;
}
.hero-buttons {
  animation: fade-up-on-load 0.7s ease-out 0.30s both;
}
.hero-stats {
  animation: fade-up-on-load 0.7s ease-out 0.45s both;
}
.hero-stats .hero-stat:nth-child(1) { animation: fade-up-on-load 0.6s ease-out 0.55s both; }
.hero-stats .hero-stat:nth-child(2) { animation: fade-up-on-load 0.6s ease-out 0.65s both; }
.hero-stats .hero-stat:nth-child(3) { animation: fade-up-on-load 0.6s ease-out 0.75s both; }
.hero-stats .hero-stat:nth-child(4) { animation: fade-up-on-load 0.6s ease-out 0.85s both; }

@keyframes settle-in {
  0%   { opacity: 0; transform: scale(1.02) translateY(8px); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes fade-up-on-load {
  0%   { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ---------- PAGE-HEADER: mesh sottile compatto, niente floating ---------- */
.page-header {
  background:
    radial-gradient(ellipse at 20% 10%, rgba(196, 163, 90, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(26, 82, 102, 0.35) 0%, transparent 60%),
    linear-gradient(135deg, var(--bg-dark) 0%, var(--primary) 100%);
}
.page-header h1 {
  animation: fade-up-on-load 0.55s ease-out both;
}
.page-header p,
.page-header .breadcrumb {
  animation: fade-up-on-load 0.55s ease-out 0.12s both;
}

/* ---------- CARD ELEVATION UPGRADE (Step D) ---------- */
/* Base .card: passa a elevation-2 con hover elevation-3 (preserva translateY) */
.card {
  box-shadow: var(--elevation-2);
  transition:
    transform var(--t-base) cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow var(--t-base) ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--elevation-3);
}

/* Domain cards: elevation-1 → elevation-3 con lift piu marcato */
.deal-card,
.prop-card,
.pro-card,
.price-card,
.post-card,
.team-card,
.testimonial-card {
  box-shadow: var(--elevation-1);
  transition:
    transform var(--t-base) cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow var(--t-base) ease,
    border-color var(--t-base) ease;
  will-change: transform;
}
.deal-card:hover,
.prop-card:hover,
.pro-card:hover,
.price-card:hover,
.post-card:hover,
.team-card:hover,
.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--elevation-3);
}

/* Accent card: piu sottile, elevation-1 base */
.accent-card {
  box-shadow: var(--elevation-1);
  transition:
    background var(--t-fast) ease,
    border-color var(--t-fast) ease,
    box-shadow var(--t-base) ease,
    transform var(--t-base) ease;
}
.accent-card:hover {
  box-shadow: var(--elevation-2);
  transform: translateY(-2px);
}

/* ---------- ICON PULSE-ON-HOVER ---------- */
.icon-tile,
.card-icon,
.service-icon-lg {
  transition: transform 200ms cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow var(--t-base) ease;
  will-change: transform;
}
.icon-tile:hover,
.card:hover .card-icon,
.service-icon-lg:hover {
  transform: scale(1.08);
}

/* ---------- NAV MOBILE TRANSITION (smooth open) ---------- */
@media (max-width: 900px) {
  .nav-links {
    transition: transform var(--t-slow) cubic-bezier(0.22, 0.61, 0.36, 1),
                opacity var(--t-base) ease;
    will-change: transform;
  }
  .nav-links:not(.open) {
    /* solo se il framework non lo gestisce gia: non rompiamo nulla, additivo */
    opacity: 0.98;
  }
  .nav-links.open {
    opacity: 1;
  }
}

/* ---------- REDUCED MOTION ESPLICITO PER STEP D ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero::after,
  .hero-depth { animation: none !important; }
  .hero h1,
  .hero p,
  .hero-buttons,
  .hero-stats,
  .hero-stats .hero-stat,
  .page-header h1,
  .page-header p,
  .page-header .breadcrumb {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .card:hover,
  .deal-card:hover,
  .prop-card:hover,
  .pro-card:hover,
  .price-card:hover,
  .post-card:hover,
  .team-card:hover,
  .testimonial-card:hover,
  .accent-card:hover,
  .icon-tile:hover,
  .service-icon-lg:hover {
    transform: none !important;
  }
}
/* ==== END STEP D ==== */

/* ============================================================
   STEP E DRAMATIC — visibility amplification
   Obiettivo: rendere visibili a colpo d'occhio le animazioni
   gia introdotte negli step precedenti, senza scroll/hover.
   Tono: boutique advisory professional (no startup-pop).
   Additivo: nessuna sovrascrittura strutturale.
   ============================================================ */

/* 1) HERO GRADIENT ANIMATO (drift lento, visibile al load) */
.hero {
  background-size: 200% 200%;
  animation: hero-gradient-drift 18s ease-in-out infinite;
}
@keyframes hero-gradient-drift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* 2) HERO-DEPTH SHAPES — opacity ALTA + border visibile + glow */
.hero-depth {
  opacity: 1;
  mix-blend-mode: screen;
}
.hero-depth--1 {
  background: radial-gradient(circle, rgba(196,163,90,0.55), transparent 65%);
  border: 2px solid rgba(196,163,90,0.40);
  box-shadow: 0 0 80px rgba(196,163,90,0.25);
}
.hero-depth--2 {
  background: radial-gradient(circle, rgba(255,255,255,0.35), transparent 70%);
  border: 2px solid rgba(255,255,255,0.20);
}
.hero-depth--3 {
  background: radial-gradient(circle, rgba(196,163,90,0.50), transparent 60%);
  border: 2px solid rgba(196,163,90,0.35);
  box-shadow: 0 0 60px rgba(196,163,90,0.30);
}

/* 3) GLOW PULSANTE SUI BOTTONI PRIMARI (visibile a riposo) */
.btn-primary,
.btn-accent {
  position: relative;
}
.btn-primary {
  box-shadow: 0 6px 20px rgba(26,82,102,0.30), 0 0 0 0 rgba(196,163,90,0.4);
  animation: btn-glow-pulse 3s ease-in-out infinite;
}
.btn-accent {
  box-shadow: 0 6px 20px rgba(196,163,90,0.35);
  animation: btn-glow-pulse-accent 3s ease-in-out infinite;
}
@keyframes btn-glow-pulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(26,82,102,0.30), 0 0 0 0 rgba(196,163,90,0.4); }
  50%      { box-shadow: 0 8px 28px rgba(26,82,102,0.40), 0 0 0 8px rgba(196,163,90,0); }
}
@keyframes btn-glow-pulse-accent {
  0%, 100% { box-shadow: 0 6px 20px rgba(196,163,90,0.35); transform: translateY(0); }
  50%      { box-shadow: 0 10px 32px rgba(196,163,90,0.55); transform: translateY(-1px); }
}

/* 4) REVEAL-ON-LOAD CASCADE (no JS, no IntersectionObserver) */
.hero h1 {
  animation: fade-up-instant 0.9s cubic-bezier(0.23,0.86,0.39,0.96) 0.2s both;
}
.hero p {
  animation: fade-up-instant 0.9s cubic-bezier(0.23,0.86,0.39,0.96) 0.4s both;
}
.hero-buttons {
  animation: fade-up-instant 0.9s cubic-bezier(0.23,0.86,0.39,0.96) 0.6s both;
}
.hero-stats .hero-stat:nth-child(1) { animation: fade-up-instant 0.7s ease-out 0.8s both; }
.hero-stats .hero-stat:nth-child(2) { animation: fade-up-instant 0.7s ease-out 0.9s both; }
.hero-stats .hero-stat:nth-child(3) { animation: fade-up-instant 0.7s ease-out 1.0s both; }
.hero-stats .hero-stat:nth-child(4) { animation: fade-up-instant 0.7s ease-out 1.1s both; }
@keyframes fade-up-instant {
  from { opacity: 0; transform: translateY(30px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}

/* 5) CARD HOVER 3D TILT SUBTLE (CSS-only fallback) */
.card,
.deal-card,
.price-card,
.pro-card,
.team-card {
  transition:
    transform 0.4s cubic-bezier(0.23,0.86,0.39,0.96),
    box-shadow 0.4s ease,
    border-color 0.3s ease;
  transform-style: preserve-3d;
}
.card:hover,
.deal-card:hover,
.price-card:hover {
  transform: translateY(-8px) scale(1.015);
  border-color: rgba(196,163,90,0.40);
}

/* 6) SECTION HEADER COUNTER PREP (gradient text per i numeri) */
.hero-stat .number,
.stat-number {
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-feature-settings: "tnum";
  will-change: contents;
}

/* 7) SECTION DIVIDERS ANIMATED (linea oro tra sezioni) */
.section + .section::before {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 0 auto var(--space-12);
  animation: divider-enter 1.2s ease-out 0.3s both;
}
@keyframes divider-enter {
  from { width: 0;  opacity: 0; }
  to   { width: 60px; opacity: 1; }
}

/* 8) SERVICE CARD ICON TILT AL HOVER (subtle, no JS) */
.card:hover .card-icon,
.deal-card:hover .deal-card-header {
  transform: rotate(3deg) scale(1.08);
  transition: transform 0.4s cubic-bezier(0.23,0.86,0.39,0.96);
}

/* ---------- REDUCED MOTION (Step E) ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero,
  .hero h1,
  .hero p,
  .hero-buttons,
  .hero-stats .hero-stat,
  .btn-primary,
  .btn-accent,
  .section + .section::before {
    animation: none !important;
  }
  .hero h1,
  .hero p,
  .hero-buttons,
  .hero-stats .hero-stat {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .btn-primary,
  .btn-accent {
    box-shadow: 0 6px 20px rgba(26,82,102,0.30) !important;
    transform: none !important;
  }
  .card:hover,
  .deal-card:hover,
  .price-card:hover,
  .pro-card:hover,
  .team-card:hover {
    transform: none !important;
  }
  .card:hover .card-icon,
  .deal-card:hover .deal-card-header {
    transform: none !important;
  }
  .section + .section::before {
    width: 60px;
    opacity: 1;
  }
}
/* ==== END STEP E ==== */
