/* =========================================================
   OFFICINA 4 — palette ricavata dal giornalino
   ========================================================= */
:root {
  --ink:        #141414;  /* nero testo            */
  --paper:      #ffffff;  /* fondo                 */
  --red:        #e2231a;  /* rosso "OFFICINA 4"    */
  --red-dark:   #b71c14;
  --green:      #7ab648;  /* verde PD Torino 4     */
  --green-dark: #5f9637;
  --salmon:     #f4a6a0;  /* riquadri rosa giornale*/
  --salmon-soft:#fbe6e4;
  --muted:      #6b6b6b;
  --line:       #e4e4e4;
  --radius:     14px;
  --maxw:       1080px;
  --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.accent { color: var(--red); }

/* Barra accento verde/rosso in cima a ogni pagina */
body::before {
  content: "";
  display: block;
  height: 6px;
  background: linear-gradient(90deg,
    var(--green) 0 33%,
    var(--green-dark) 33% 50%,
    var(--red) 50% 67%,
    var(--red-dark) 67% 100%);
}

/* =========================== HEADER =========================== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1.1rem, 4vw, 3rem);
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand { text-decoration: none; color: var(--ink); display: flex; flex-direction: row; align-items: center; gap: 0.6rem; }
.brand__logo { height: 42px; width: auto; display: block; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.brand__sub  { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.topnav { display: flex; gap: 1.4rem; }
.topnav a {
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.92rem;
  padding-bottom: 2px; border-bottom: 2px solid transparent; transition: border-color .15s;
}
.topnav a:hover { border-color: var(--green); }

/* =========================== HERO ============================ */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem) clamp(1.1rem, 4vw, 3rem) 2rem;
}
.hero__title {
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.92;
  font-size: clamp(3.2rem, 13vw, 8.5rem);
  margin: 0.2em 0 0.5em;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}

/* --- colonna info --- */
.info__lead { font-size: 1.05rem; margin-top: 0; }
.info__lead strong { color: var(--red); }
.info__block { margin-top: 1.4rem; font-size: 0.95rem; }
.info__block:not(:last-child) { padding-left: 0.85rem; border-left: 3px solid var(--green); }
.info__label {
  display: block; font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--green-dark); margin-bottom: 0.2rem; font-weight: 700;
}

/* =========================== FORM ============================ */
.form__required { font-size: 0.82rem; color: var(--muted); margin: 0 0 1.4rem; }
.field { margin-bottom: 1.5rem; }
.field label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.3rem; font-weight: 600; }

.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  border: none;
  border-bottom: 1.5px solid var(--ink);
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  padding: 0.45rem 0.1rem;
  border-radius: 0;
  transition: border-color .15s;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--red);
}
.field input::placeholder,
.field textarea::placeholder { color: #b0b0b0; }
.field__hint { display: block; font-size: 0.72rem; color: var(--muted); margin-top: 0.3rem; }

/* errore visivo sui campi non validi */
.field input.invalid,
.field textarea.invalid { border-bottom-color: var(--red); }

.field--check {
  display: flex; align-items: center; gap: 0.55rem;
}
.field--check input { width: auto; accent-color: var(--green); }
.field--check label { margin: 0; font-size: 0.88rem; color: var(--ink); }

/* honeypot: fuori schermo, non visibile */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}

.cf-turnstile { margin: 0.5rem 0 1.4rem; }

/* =========================== BOTTONI ========================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  border: none; cursor: pointer; text-decoration: none;
  font-family: inherit; font-weight: 600; font-size: 0.95rem;
  border-radius: 999px; padding: 0.8rem 1.6rem;
  transition: transform .08s, background .15s, opacity .15s;
}
.btn:active { transform: translateY(1px); }

.btn--submit { background: var(--ink); color: #fff; }
.btn--submit:hover { background: var(--red); }
.btn--submit:disabled { opacity: 0.6; cursor: progress; }

.btn--maps {
  background: var(--green); color: #fff; font-weight: 700;
  margin-top: 1.2rem; padding: 0.95rem 1.8rem;
}
.btn--maps:hover { background: var(--green-dark); }

/* spinner nel bottone */
.btn__spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff;
  display: none; animation: spin .7s linear infinite;
}
.btn--submit.loading .btn__spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================== STATUS ========================= */
.form__status { margin-top: 1.1rem; font-size: 0.95rem; display: none; }
.form__status.show { display: block; }
.form__status.ok {
  background: var(--salmon-soft); border-left: 4px solid var(--green);
  padding: 1rem 1.1rem; border-radius: 8px; color: var(--ink);
}
.form__status.err {
  background: var(--salmon-soft); border-left: 4px solid var(--red);
  padding: 1rem 1.1rem; border-radius: 8px; color: var(--red-dark);
}
.form__status.info {
  background: #f4f4f4; border-left: 4px solid var(--ink);
  padding: 1rem 1.1rem; border-radius: 8px; color: var(--ink);
}

/* ===================== CONTATTI GRANDI ====================== */
.bigcontact {
  max-width: var(--maxw); margin: 2.5rem auto;
  padding: 2.5rem clamp(1.1rem, 4vw, 3rem);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 1rem 3rem; justify-content: space-between;
}
.bigcontact__item {
  font-weight: 800; letter-spacing: -0.03em; text-decoration: none; color: var(--ink);
  font-size: clamp(1.5rem, 5vw, 2.6rem);
}
.bigcontact__item:hover { color: var(--red); }

/* =========================== MAPPA ========================== */
.mappa {
  max-width: var(--maxw); margin: 0 auto;
  padding: 1.5rem clamp(1.1rem, 4vw, 3rem) 3rem;
  text-align: center;
}
.mappa__title { font-weight: 800; letter-spacing: -0.03em; font-size: clamp(1.8rem, 6vw, 3rem); margin: 0; }
.mappa__title::after {
  content: ""; display: block; width: 72px; height: 4px; border-radius: 2px;
  margin: 0.7rem auto 0;
  background: linear-gradient(90deg, var(--green) 0 50%, var(--red) 50% 100%);
}
.mappa__sub { color: var(--muted); margin: 0.6rem 0 1.6rem; }
.mappa__video {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: #f0f0f0; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}
.mappa__video video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* =========================== FOOTER ========================= */
.footer {
  max-width: var(--maxw); margin: 0 auto;
  padding: 2rem clamp(1.1rem, 4vw, 3rem) 3rem;
  border-top: 3px solid var(--green);
  display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; align-items: center;
  font-size: 0.85rem; color: var(--muted);
}
.footer__brand { font-weight: 800; color: var(--ink); }
.footer__privacy { color: var(--muted); text-decoration: underline; margin-left: auto; }
.footer__privacy:hover { color: var(--red); }

/* =========================== MOBILE ========================= */
@media (max-width: 760px) {
  .hero__grid { grid-template-columns: 1fr; }
  .info { order: 2; }
  .formwrap { order: 1; }
  .topnav { display: none; }
}
