/**
 * DIGINETIC - MAIN CSS
 * Design System + Brand Colors (da manuale logo)
 * v1.0 - 2026-02-26
 */

/* ========================================
   FONT FACE - Helvetica Neue + Helvetica LT Std
   ======================================== */

@font-face {
  font-family: 'Helvetica Neue';
  src: url('../fonts/HelveticaNeue-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Helvetica Neue';
  src: url('../fonts/HelveticaNeue-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Helvetica LT Std';
  src: url('../fonts/HelveticaLTStd-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Helvetica LT Std';
  src: url('../fonts/HelveticaLTStd-BoldObl.otf') format('opentype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Titillium';
  src: url('../fonts/Titillium-Thin.woff2') format('woff2');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Titillium';
  src: url('../fonts/Titillium-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Titillium';
  src: url('../fonts/Titillium-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Titillium';
  src: url('../fonts/Titillium-Semibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}


/* ========================================
   DESIGN SYSTEM - CSS VARIABLES
   ======================================== */

:root {
  /* PRIMARY COLORS - Blu (Pantone 548) */
  --dg-primary: #003F5B;
  --dg-primary-rgb: 0, 63, 91;

  /* BLUE SCALE - Gradiente logo */
  --dg-blue-dark: #1C6786;      /* c80m14y0k44 */
  --dg-blue-medium: #5593B2;    /* c60m8y0k25 */
  --dg-blue-light: #8AB2C8;     /* c38m4y0k19 - Pantone 550 */

  /* ACCENT - Rosso (Pantone 485) */
  --dg-accent-red: #DF2D25;
  --dg-accent-red-rgb: 223, 45, 37;

  /* NEUTRAL - Grigio (Pantone 7544) */
  --dg-gray: #9BA1A4;
  --dg-gray-rgb: 155, 161, 164;

  /* DARK BACKGROUNDS */
  --dg-dark: #0A0E27;
  --dg-gray-900: #1A1F36;
  --dg-gray-700: #4A5568;
  --dg-gray-500: #718096;
  --dg-gray-300: #CBD5E0;
  --dg-gray-100: #F7FAFC;
  --dg-white: #FFFFFF;

  /* GRADIENTS */
  --gradient-logo: linear-gradient(135deg,
    #003F5B 0%,      /* blu scuro */
    #1C6786 30%,     /* blu medio-scuro */
    #5593B2 60%,     /* blu medio */
    #8AB2C8 100%);   /* azzurro chiaro */

  --gradient-hero: linear-gradient(135deg,
    #0A0E27 0%,
    #003F5B 50%,
    #1C6786 100%);

  --gradient-overlay: linear-gradient(180deg,
    rgba(0,63,91,0.9) 0%,
    rgba(0,63,91,0.7) 100%);

  --gradient-card: linear-gradient(145deg,
    rgba(255,255,255,0.05) 0%,
    rgba(255,255,255,0.02) 100%);

  /* TYPOGRAPHY */
  --font-primary: 'Helvetica Neue', 'Helvetica LT Std', Helvetica, Arial, sans-serif;
  --font-heading: 'Helvetica Neue', 'Helvetica LT Std', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* FONT SIZES */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: 1.5rem;     /* 24px */
  --text-3xl: 1.875rem;   /* 30px */
  --text-4xl: 2.25rem;    /* 36px */
  --text-5xl: 3rem;       /* 48px */
  --text-6xl: 3.75rem;    /* 60px */

  /* SPACING */
  --spacing-xs: 0.25rem;   /* 4px */
  --spacing-sm: 0.5rem;    /* 8px */
  --spacing-md: 1rem;      /* 16px */
  --spacing-lg: 1.5rem;    /* 24px */
  --spacing-xl: 2rem;      /* 32px */
  --spacing-2xl: 3rem;     /* 48px */
  --spacing-3xl: 4rem;     /* 64px */

  /* BORDER RADIUS */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* SHADOWS */
  --shadow-sm: 0 1px 2px 0 rgba(0,63,91,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,63,91,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,63,91,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,63,91,0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0,63,91,0.25);

  /* TRANSITIONS */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;

  /* Z-INDEX */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}


/* ========================================
   BASE STYLES
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  /* Tipografia fluida (2026-07-31). Quasi tutto il sito e' dimensionato in `rem`:
     con la radice fissa a 16px, testi e grafica restavano identici passando da un
     portatile a uno schermo grande, diventando piccoli e faticosi da leggere.
     Qui la radice cresce CON la finestra, in modo continuo e non a scatti.

     Sotto i 1440px il valore resta esattamente 16px — la parte centrale della
     clamp e' minore del minimo — quindi nulla cambia su cio' che era gia' tarato.
     Sopra, cresce fino a 17,6px a 2560px: **+10%** su tutta la corsa.
     Tentativi precedenti a +37% e +19% risultavano sgraziati a schermo pieno:
     ingrandire troppo non rende piu' leggibile, allunga soltanto le righe. */
  font-size: clamp(16px, calc(16px + (100vw - 1440px) * 0.00143), 17.6px);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--dg-gray-900);
  background-color: var(--dg-white);
  overflow-x: hidden;
}

/* Selection */
::selection {
  background-color: var(--dg-primary);
  color: var(--dg-white);
}

::-moz-selection {
  background-color: var(--dg-primary);
  color: var(--dg-white);
}


/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--dg-dark);
  margin-bottom: var(--spacing-lg);
}

h1, .h1 {
  font-size: var(--text-5xl);
  letter-spacing: -0.02em;
}

h2, .h2 {
  font-size: var(--text-4xl);
  letter-spacing: -0.01em;
}

h3, .h3 {
  font-size: var(--text-3xl);
}

h4, .h4 {
  font-size: var(--text-2xl);
}

h5, .h5 {
  font-size: var(--text-xl);
}

h6, .h6 {
  font-size: var(--text-lg);
}

p {
  margin-bottom: var(--spacing-md);
}

.lead {
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: 1.7;
  color: var(--dg-gray-700);
}

a {
  color: var(--dg-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--dg-blue-dark);
  text-decoration: underline;
}

strong, b {
  font-weight: 600;
}

small {
  font-size: var(--text-sm);
}

/* Responsive typography */
@media (max-width: 768px) {
  :root {
    --text-6xl: 2.5rem;    /* 40px */
    --text-5xl: 2rem;      /* 32px */
    --text-4xl: 1.75rem;   /* 28px */
    --text-3xl: 1.5rem;    /* 24px */
  }
}


/* ========================================
   BUTTONS
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md) var(--spacing-xl);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

.btn:active {
  transform: translateY(0);
}

/* Primary button */
.btn-dg-primary {
  background: var(--dg-primary);
  color: var(--dg-white);
  border-color: var(--dg-primary);
}

.btn-dg-primary:hover {
  background: var(--dg-blue-dark);
  border-color: var(--dg-blue-dark);
  color: var(--dg-white);
}

/* Primary gradient button */
.btn-dg-gradient {
  background: var(--gradient-logo);
  color: var(--dg-white);
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-dg-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(255,255,255,0.2),
    transparent);
  transition: left 0.5s;
}

.btn-dg-gradient:hover::before {
  left: 100%;
}

/* Outline button */
.btn-outline-primary {
  background: transparent;
  color: var(--dg-primary);
  border-color: var(--dg-primary);
}

.btn-outline-primary:hover {
  background: var(--dg-primary);
  color: var(--dg-white);
}

.btn-outline-light {
  background: transparent;
  color: var(--dg-white);
  border-color: var(--dg-white);
}

.btn-outline-light:hover {
  background: var(--dg-white);
  color: var(--dg-primary);
}

/* Button sizes */
.btn-sm {
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--text-sm);
}

.btn-lg {
  padding: var(--spacing-lg) var(--spacing-2xl);
  font-size: var(--text-lg);
}


/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Text colors */
.text-primary { color: var(--dg-primary); }
.text-accent { color: var(--dg-accent-red); }
.text-dark { color: var(--dg-dark); }
.text-light { color: var(--dg-gray-700); }
.text-muted { color: var(--dg-gray-500); }
.text-white { color: var(--dg-white); }

/* Background colors */
.bg-primary { background-color: var(--dg-primary); }
.bg-dark { background-color: var(--dg-dark); }
.bg-light { background-color: var(--dg-gray-100); }
.bg-white { background-color: var(--dg-white); }

/* Spacing utilities */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }
.mt-5 { margin-top: var(--spacing-2xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }
.mb-5 { margin-bottom: var(--spacing-2xl); }

.py-5 { padding-top: var(--spacing-2xl); padding-bottom: var(--spacing-2xl); }
.py-6 { padding-top: var(--spacing-3xl); padding-bottom: var(--spacing-3xl); }

/* Display */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-inline-block { display: inline-block; }

/* Flex utilities */
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: var(--spacing-sm); }
.gap-2 { gap: var(--spacing-md); }
.gap-3 { gap: var(--spacing-lg); }

/* Text align */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }


/* ========================================
   SECTION STYLES
   ======================================== */

section {
  padding: var(--spacing-3xl) 0;
}

.section-title {
  font-size: var(--text-4xl);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--spacing-2xl);
  color: var(--dg-dark);
}

.section-subtitle {
  font-size: var(--text-xl);
  text-align: center;
  color: var(--dg-gray-700);
  margin-bottom: var(--spacing-3xl);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}


/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 992px) {
  section {
    padding: var(--spacing-2xl) 0;
  }
}

@media (max-width: 768px) {
  .btn {
    width: 100%;
    padding: var(--spacing-md);
  }

  .btn-lg {
    padding: var(--spacing-md);
  }
}
