/* ============================================================
   CIRCL SRL — style.css
   Foglio di stile globale. Tutti i valori cromatici e tipografici
   sono definiti come variabili CSS nel :root. Mai usare valori
   hardcoded al di fuori di questa sezione.
   ============================================================ */

/* ------------------------------------------------------------
   1. GOOGLE FONTS
   ------------------------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ------------------------------------------------------------
   2. CSS CUSTOM PROPERTIES
   ------------------------------------------------------------ */
:root {
  /* Palette */
  --color-teal-dark:   #0D3D50;
  --color-teal-mid:    #197A9F;
  --color-teal-light:  #30C1EB;
  --color-white:       #FFFFFF;
  --color-text:        #333333;
  --color-bg-light:    #F5F7F9;
  --color-text-muted:  rgba(255, 255, 255, 0.70);

  /* Tipografia */
  --font-primary: 'Raleway', sans-serif;
  --font-size-base:   1rem;        /* 16px */
  --font-size-sm:     0.875rem;    /* 14px */
  --font-size-lg:     1.125rem;    /* 18px */
  --font-size-xl:     1.375rem;    /* 22px */
  --font-size-2xl:    1.75rem;     /* 28px */
  --font-size-3xl:    2.25rem;     /* 36px */
  --font-size-4xl:    3rem;        /* 48px */
  --font-size-hero:   3.5rem;      /* 56px */

  /* Spaziature */
  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   1.5rem;
  --space-lg:   2.5rem;
  --space-xl:   4rem;
  --space-2xl:  6rem;

  /* Layout */
  --container-max: 1200px;
  --nav-height: 72px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Ombre */
  --shadow-sm: 0 2px 8px rgba(13, 61, 80, 0.08);
  --shadow-md: 0 4px 20px rgba(13, 61, 80, 0.12);
  --shadow-lg: 0 8px 32px rgba(13, 61, 80, 0.16);

  /* Transizioni */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
}

/* ------------------------------------------------------------
   3. RESET & BASE
   ------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  color: var(--color-text);
  background-color: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  font-family: var(--font-primary);
  cursor: pointer;
  border: none;
  background: none;
}

/* ------------------------------------------------------------
   4. TIPOGRAFIA
   ------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: var(--font-size-hero); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }

p {
  line-height: 1.7;
}

.text-sm   { font-size: var(--font-size-sm); }
.text-lg   { font-size: var(--font-size-lg); }
.text-xl   { font-size: var(--font-size-xl); }
.text-muted { color: var(--color-text-muted); }
.text-teal  { color: var(--color-teal-light); }
.text-center { text-align: center; }
.font-bold  { font-weight: 700; }
.font-800   { font-weight: 800; }

/* ------------------------------------------------------------
   5. LAYOUT UTILITIES
   ------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.section {
  padding-block: var(--space-2xl);
}

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

.section--dark {
  background-color: var(--color-teal-dark);
  color: var(--color-white);
}

.section--mid {
  background-color: var(--color-teal-mid);
  color: var(--color-white);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ------------------------------------------------------------
   6. BOTTONI
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  font-weight: 600;
  transition: all var(--transition-base);
  white-space: nowrap;
  cursor: pointer;
}

.btn--primary {
  background-color: var(--color-teal-light);
  color: var(--color-teal-dark);
  border: 2px solid var(--color-teal-light);
}
.btn--primary:hover {
  background-color: var(--color-teal-mid);
  border-color: var(--color-teal-mid);
  color: var(--color-white);
}

.btn--outline {
  background-color: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
}
.btn--outline:hover {
  background-color: var(--color-white);
  color: var(--color-teal-dark);
}

.btn--outline-teal {
  background-color: transparent;
  color: var(--color-teal-mid);
  border: 2px solid var(--color-teal-mid);
}
.btn--outline-teal:hover {
  background-color: var(--color-teal-mid);
  color: var(--color-white);
}

.btn--white {
  background-color: var(--color-white);
  color: var(--color-teal-dark);
  border: 2px solid var(--color-white);
}
.btn--white:hover {
  background-color: transparent;
  color: var(--color-white);
}

.btn-group {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* ------------------------------------------------------------
   7. BADGE
   ------------------------------------------------------------ */
.badge {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: 100px;
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge--teal {
  background-color: var(--color-teal-light);
  color: var(--color-teal-dark);
}

.badge--outline {
  border: 2px solid var(--color-teal-light);
  color: var(--color-teal-light);
  background: transparent;
}

/* ------------------------------------------------------------
   8. NAVIGAZIONE
   ------------------------------------------------------------ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background-color: var(--color-teal-dark);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

/* Logo SVG */
.nav__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav__logo-img {
  height: 42px;
  width: auto;
  display: block;
}

.nav__logo span {
  color: var(--color-teal-light);
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav__link {
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: var(--font-size-sm);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color var(--transition-fast);
}
.nav__link:hover,
.nav__link.active {
  color: var(--color-white);
}

/* Switch lingua */
.lang-switch {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  margin-left: var(--space-md);
}

.lang-switch__btn {
  padding: 0.2rem 0.5rem;
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.lang-switch__btn:hover,
.lang-switch__btn.active {
  color: var(--color-white);
  background-color: rgba(255,255,255,0.12);
}
.lang-switch__sep {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  cursor: pointer;
}
.nav__hamburger span {
  display: block;
  height: 2px;
  background-color: var(--color-white);
  border-radius: 2px;
  transition: all var(--transition-base);
}
.nav__hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__hamburger.open span:nth-child(2) {
  opacity: 0;
}
.nav__hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ------------------------------------------------------------
   9. FOOTER
   ------------------------------------------------------------ */
.footer {
  background-color: var(--color-teal-dark);
  color: var(--color-text-muted);
  padding-block: var(--space-xl);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer__logo {
  margin-bottom: var(--space-xs);
}

.footer__logo-img {
  height: 36px;
  width: auto;
  display: block;
}

.footer__tagline {
  font-size: var(--font-size-sm);
  color: var(--color-teal-light);
  font-style: italic;
  letter-spacing: 0.04em;
}

.footer__title {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer__link {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}
.footer__link:hover {
  color: var(--color-white);
}

.footer__contact {
  font-size: var(--font-size-sm);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-md);
  font-size: var(--font-size-sm);
  color: rgba(255,255,255,0.40);
  text-align: center;
}

/* ------------------------------------------------------------
   10. CARD
   ------------------------------------------------------------ */
.card {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.card__icon {
  width: 48px;
  height: 48px;
  color: var(--color-teal-mid);
  margin-bottom: var(--space-md);
}

.card__title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-teal-dark);
  margin-bottom: var(--space-xs);
}

.card__text {
  font-size: var(--font-size-base);
  color: var(--color-text);
  line-height: 1.65;
}

/* Card team */
.card--team {
  text-align: center;
  padding: var(--space-lg);
}

.card--team .team-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-inline: auto;
  margin-bottom: var(--space-md);
  border: 3px solid var(--color-teal-light);
  background-color: var(--color-bg-light);
}

.card--team .team-name {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-teal-dark);
  margin-bottom: 0.25rem;
}

.card--team .team-role {
  font-size: var(--font-size-sm);
  color: var(--color-teal-mid);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.card--team .team-bio {
  font-size: var(--font-size-sm);
  color: var(--color-text);
  line-height: 1.6;
}

/* ------------------------------------------------------------
   11. NUMERI / STATS
   ------------------------------------------------------------ */
.stats {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.stat__number {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  color: var(--color-teal-dark);
  line-height: 1;
}

.stat__label {
  font-size: var(--font-size-sm);
  color: var(--color-text);
  margin-top: 0.25rem;
}

.section--dark .stat__number {
  color: var(--color-teal-light);
}
.section--dark .stat__label {
  color: var(--color-text-muted);
}

/* ------------------------------------------------------------
   12. FORM (Netlify)
   ------------------------------------------------------------ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: var(--space-md);
}

.form-label {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-teal-dark);
}

.form-input,
.form-select,
.form-textarea {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  padding: 0.75rem 1rem;
  border: 2px solid #D0DDE4;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  background-color: var(--color-white);
  transition: border-color var(--transition-fast);
  width: 100%;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-teal-mid);
}

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

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-feedback {
  display: none;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-top: var(--space-sm);
}
.form-feedback--success {
  background-color: #E6F7EE;
  color: #1A7A45;
}
.form-feedback--error {
  background-color: #FDE8E8;
  color: #9B1C1C;
}

/* ------------------------------------------------------------
   13. SEZIONE STEP / FLUSSO
   ------------------------------------------------------------ */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  position: relative;
}

.step {
  text-align: center;
  position: relative;
}

.step__number {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  color: var(--color-teal-light);
  line-height: 1;
  margin-bottom: var(--space-sm);
}

.step__title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: var(--space-xs);
}

.step__text {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Arrow tra gli step */
.step::after {
  content: '';
  position: absolute;
  top: 1.5rem;
  right: -1.5rem;
  width: 1.5rem;
  height: 2px;
  background-color: var(--color-teal-light);
  opacity: 0.4;
}
.step:last-child::after {
  display: none;
}

/* ------------------------------------------------------------
   14. SECTION HEADER
   ------------------------------------------------------------ */
.section-header {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: var(--space-xl);
}

.section-header h2 {
  color: var(--color-teal-dark);
  margin-bottom: var(--space-sm);
}

.section--dark .section-header h2,
.section--mid .section-header h2 {
  color: var(--color-white);
}

.section-header p {
  font-size: var(--font-size-lg);
  color: var(--color-text);
}

.section--dark .section-header p,
.section--mid .section-header p {
  color: var(--color-text-muted);
}

/* ------------------------------------------------------------
   15. CORPO PRINCIPALE (offset nav)
   ------------------------------------------------------------ */
main {
  padding-top: var(--nav-height);
}

/* ------------------------------------------------------------
   16. RESPONSIVE — Mobile first (breakpoint 768px)
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  :root {
    --font-size-hero: 2.25rem;
    --space-2xl: 3.5rem;
    --space-xl: 2.5rem;
  }

  h2 { font-size: var(--font-size-2xl); }
  h3 { font-size: var(--font-size-xl); }

  /* Nav */
  .nav__menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background-color: var(--color-teal-dark);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: var(--space-md);
    transform: translateY(calc(-100% - var(--nav-height)));
    transition: transform var(--transition-base);
    box-shadow: var(--shadow-md);
  }
  .nav__menu.open {
    transform: translateY(0);
  }
  .nav__link {
    padding-block: 0.75rem;
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    font-size: var(--font-size-base);
  }
  .lang-switch {
    margin-left: 0;
    margin-top: var(--space-sm);
  }
  .nav__hamburger {
    display: flex;
  }

  /* Layout grid */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }
  .step::after {
    display: none;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  /* Stats */
  .stats {
    flex-direction: column;
    gap: var(--space-md);
  }

  .btn-group {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (min-width: 480px) and (max-width: 768px) {
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }
}
