/**
 * Tema CLOe – tema unico per l’intero sito
 * Azzurro CLOe, font elegante (Plus Jakarta Sans), componenti base
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* ==========================================================================
   Variabili CLOe – Tema
   ========================================================================== */

:root {
  /* Colori primari – azzurro CLOe */
  --cloe-primary: #24d2e5;
  --cloe-primary-dark: #1a9cad;
  --cloe-primary-glow: rgba(36, 210, 229, 0.5);

  /* Testo */
  --cloe-text: #363636;
  --cloe-text-light: #545454;

  /* Sfondi e superfici */
  --cloe-bg: #ededed;
  --cloe-bg-alt: #cccccc;
  --cloe-border: #cccccc;

  /* Bottoni / elementi secondari */
  --cloe-btn-dark: #545454;
  --cloe-btn-dark-border: #474747;

  /* Neutri */
  --cloe-white: #fff;
  --cloe-black: #000;

  /* Tipografia – Plus Jakarta Sans (elegante, moderno, leggibile) */
  --cloe-font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --cloe-font-size-base: 1rem;
  --cloe-line-height: 1.6;
  --cloe-font-weight-normal: 400;
  --cloe-font-weight-medium: 500;
  --cloe-font-weight-semibold: 600;
  --cloe-font-weight-bold: 700;

  /* Spazi e bordi */
  --cloe-radius: 4px;
  --cloe-transition: 0.2s ease;
}

/* ==========================================================================
   Base
   ========================================================================== */

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

body {
  margin: 0;
  font-family: var(--cloe-font);
  font-size: var(--cloe-font-size-base);
  line-height: var(--cloe-line-height);
  font-weight: var(--cloe-font-weight-normal);
  color: var(--cloe-text);
  background-color: var(--cloe-white);
}

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

a:hover {
  color: var(--cloe-primary-dark);
}

a:focus-visible {
  outline: 2px solid var(--cloe-primary);
  outline-offset: 2px;
}

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

/* ==========================================================================
   Tipografia
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  font-family: var(--cloe-font);
  font-weight: var(--cloe-font-weight-bold);
  color: var(--cloe-text);
  line-height: 1.25;
}

h1 { font-size: 2rem; font-weight: var(--cloe-font-weight-bold); }
h2 { font-size: 1.5rem; font-weight: var(--cloe-font-weight-semibold); }
h3 { font-size: 1.25rem; font-weight: var(--cloe-font-weight-semibold); }

p {
  margin: 0 0 1em;
}

/* ==========================================================================
   Componenti: bottoni
   ========================================================================== */

.btn {
  display: inline-block;
  padding: 0.6em 1.2em;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: var(--cloe-radius);
  cursor: pointer;
  transition: background-color var(--cloe-transition), color var(--cloe-transition);
}

.btn--primary {
  background-color: var(--cloe-primary);
  color: var(--cloe-white);
}

.btn--primary:hover {
  background-color: var(--cloe-primary-dark);
  color: var(--cloe-white);
  box-shadow: 0 0 24px var(--cloe-primary-glow);
}

.btn--secondary {
  background-color: var(--cloe-btn-dark);
  color: var(--cloe-white);
  border-bottom: 4px solid var(--cloe-btn-dark-border);
}

.btn--secondary:hover {
  background-color: var(--cloe-btn-dark-border);
  color: var(--cloe-white);
}

/* ==========================================================================
   Componenti: card / sezioni
   ========================================================================== */

.card {
  background-color: var(--cloe-bg);
  border: 1px solid var(--cloe-border);
  border-radius: var(--cloe-radius);
  padding: 1.5rem;
}

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

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

.section--dark a {
  color: var(--cloe-white);
  text-decoration: underline;
}

.section--dark a:hover {
  opacity: 0.9;
}

/* ==========================================================================
   Form
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid var(--cloe-border);
  border-radius: var(--cloe-radius);
  transition: border-color var(--cloe-transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--cloe-primary);
}

label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

/* ==========================================================================
   Responsive – base e form (mobile-first)
   ========================================================================== */

@media (max-width: 767px) {
  body {
    font-size: 0.9375rem;
  }

  h1 { font-size: 1.65rem; }
  h2 { font-size: 1.35rem; }
  h3 { font-size: 1.15rem; }

  .btn {
    padding: 0.65em 1.1em;
    font-size: 0.9375rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
}

/* Form: campi a larghezza piena su mobile */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  max-width: 100%;
}

@media (min-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"] {
    max-width: 20rem;
  }

  textarea {
    max-width: 32rem;
    min-height: 120px;
  }
}
