/* Tiziana Caudullo — stile del sito
   Colori e font ripresi dal sito WordPress (tema Kubio): arancio #FCB24C, corallo #F15A61, verde acqua. */

@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Merriweather";
  src: url("../fonts/merriweather-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Merriweather";
  src: url("../fonts/merriweather-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --amber: #fcb24c;
  --amber-soft: #fff3e0;
  --coral: #f15a61;
  --coral-text: #b8323a;
  --coral-btn: #d63d46; /* corallo del brand scurito quanto basta per il testo bianco (4.5:1) */
  --teal: #13a89b;
  --teal-dark: #0d5c55;
  --ink: #17191c;
  --ink-soft: #3d4148;
  --muted: #5b616b;
  --line: #e4e1dc;
  --bg: #ffffff;
  --bg-tint: #f8f6f3;

  --font-body: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-head: "Merriweather", Georgia, "Times New Roman", serif;

  --radius: 12px;
  --radius-btn: 999px;
  --shadow: 0 1px 2px rgb(23 25 28 / 0.06), 0 8px 24px rgb(23 25 28 / 0.06);

  --container: 1200px;
  --gutter: 24px;
  --section-y: 96px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.25;
  text-wrap: balance;
}
h2 { font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.25rem); }
h3 { font-size: 1.1875rem; line-height: 1.35; }

p { margin: 0; }
strong { color: var(--ink); font-weight: 700; }

a { color: var(--coral-text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

::selection { background: var(--amber); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

.icon { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 8px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
}
.skip-link:focus { top: 16px; }

.br-desktop { display: none; }
@media (min-width: 900px) { .br-desktop { display: inline; } }

/* ---------- Pulsanti ---------- */

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions-center { justify-content: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-primary { background: var(--amber); color: var(--ink); }
.btn-ghost-light { border-color: rgb(255 255 255 / 0.85); color: #fff; }
.btn-coral { background: var(--coral-btn); color: #fff; }
.btn-white { background: #fff; color: var(--ink); }

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: #ffc370; }
  .btn-ghost-light:hover { background: #fff; color: var(--ink); }
  .btn-coral:hover { background: var(--coral-text); }
  .btn-white:hover { background: var(--amber-soft); }
}

/* ---------- Header e hero ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  color: #fff;
  background:
    linear-gradient(rgb(15 20 22 / 0.5), rgb(15 20 22 / 0.5)),
    linear-gradient(180deg, #06b2a5 0%, #f9b04b 32%, #f7894f 62%, #f05a61 100%);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 24px;
}
.brand { display: inline-flex; align-items: center; min-height: 48px; }
.brand img { width: 200px; }

.nav ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav a {
  display: block;
  padding: 12px 16px;
  border-radius: 8px;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
}
.nav a[aria-current="true"] { background: rgb(255 255 255 / 0.16); }
@media (hover: hover) and (pointer: fine) {
  .nav a:not([aria-current="true"]):hover { background: rgb(255 255 255 / 0.1); }
}

.menu-toggle,
.menu-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: 1.25rem;
  cursor: pointer;
}

.hero-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding-block: 64px 96px;
  text-align: center;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.125rem, 1.4rem + 3.2vw, 3.75rem);
  line-height: 1.2;
}
.hero-lead {
  max-width: 52ch;
  margin: 24px auto 48px;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  line-height: 1.5;
}

@media (max-width: 899px) {
  .brand img { width: 160px; }
  .site-header { flex-wrap: wrap; }
  .nav ul { flex-wrap: wrap; }

  /* Il menu a scomparsa si attiva solo se JavaScript è disponibile */
  .js .site-header { flex-wrap: nowrap; }
  .js .menu-toggle,
  .js .menu-close { display: inline-flex; }

  .js .nav {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 50;
    width: min(320px, 85vw);
    padding: 16px 24px 32px;
    background: var(--teal-dark);
    box-shadow: -8px 0 32px rgb(0 0 0 / 0.25);
    overscroll-behavior: contain;
    overflow-y: auto;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.25s ease-out, visibility 0s linear 0.25s;
  }
  .js .nav.is-open {
    transform: none;
    visibility: visible;
    transition: transform 0.25s ease-out;
  }
  .js .menu-close { margin: 0 0 16px auto; color: #fff; }
  .js .nav ul { flex-direction: column; gap: 4px; }
  .js .nav a { padding: 12px 16px; font-size: 1.0625rem; }

  .hero-body { padding-block: 48px 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .nav, .js .nav.is-open { transition: none; }
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgb(0 0 0 / 0.4);
}

/* ---------- Sezioni ---------- */

.section { padding-block: var(--section-y); scroll-margin-top: 0; }
.section-tint { background: var(--bg-tint); }
.section-title { margin-bottom: 64px; text-align: center; }
.section-title::after {
  content: "";
  display: block;
  width: 96px;
  height: 2px;
  margin: 24px auto 0;
  background: var(--coral);
}

.prose p + p { margin-top: 1em; }
.prose h2 + p { margin-top: 24px; }

/* Chi sono */
.about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 64px;
  align-items: center;
}
.about-photo img {
  width: 100%;
  max-width: 460px;
  margin-inline: auto;
  border-radius: var(--radius);
  background: var(--bg-tint);
}
.about-text { max-width: 64ch; }

/* Servizi */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.card {
  padding: 32px;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow);
}
.card-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 16px;
  fill: var(--amber);
}
.card h3 { margin-bottom: 12px; }
.card p { font-size: 1rem; }

/* Fasce call to action */
.cta-band { background: linear-gradient(90deg, #0b8a80 0%, #fcb24c 100%); }
.cta-band h2 { color: #fff; }
@media (max-width: 899px) {
  .cta-band { background: linear-gradient(180deg, #0b8a80 0%, #fcb24c 100%); }
}
.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 64px;
}

/* Perché lavorare con me */
.intro {
  max-width: 72ch;
  margin: 0 auto 64px;
  text-align: center;
}
.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.features li {
  padding-top: 24px;
  border-top: 3px solid var(--amber);
}
.features h3 { margin-bottom: 12px; }
.features p { font-size: 1rem; }
.features p + p { margin-top: 0.75em; }

/* Come lavoro */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin-bottom: 32px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 12px 32px rgb(23 25 28 / 0.12);
  color: var(--amber);
  font-size: 1.5rem;
}
.step h3 { margin-bottom: 12px; }
.step p { font-size: 1rem; }


/* Clienti: fascia compatta subito dopo la hero */
.section-compact { padding-block: 64px; }
.section-compact .section-title { margin-bottom: 32px; font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem); }
/* Due righe di loghi che scorrono da destra a sinistra.
   Ogni riga contiene due copie identiche della lista: quando la prima è uscita, la seconda è al suo posto e il ciclo riparte senza salti. */
.marquee {
  --logo-w: 208px;
  --logo-h: 128px;
  --gap: 16px;
  position: relative;
  display: grid;
  gap: var(--gap);
}
.marquee-row {
  display: flex;
  gap: var(--gap);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee-track {
  display: flex;
  flex: none;
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
  animation: marquee 48s linear infinite;
}
.marquee-row-2 .marquee-track { animation-duration: 56s; }
.marquee-track li {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: var(--logo-w);
  height: var(--logo-h);
  padding: 16px 24px;
  border-radius: var(--radius);
  background: var(--bg);
}
.marquee-track img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
@keyframes marquee {
  to { transform: translateX(calc(-100% - var(--gap))); }
}

/* Si ferma col mouse sopra, con il focus da tastiera o con il pulsante pausa */
.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track,
.marquee.is-paused .marquee-track { animation-play-state: paused; }

.marquee-toggle {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}
.marquee-toggle .icon { width: 0.875rem; height: 0.875rem; }
.marquee-toggle .icon-play,
.marquee.is-paused .marquee-toggle .icon-pause { display: none; }
.marquee.is-paused .marquee-toggle .icon-play { display: block; }
@media (hover: hover) and (pointer: fine) {
  .marquee-toggle:hover { background: var(--amber-soft); }
}

/* Movimento ridotto: niente scorrimento, i loghi restano fermi in griglia */
@media (prefers-reduced-motion: reduce) {
  .marquee-row {
    flex-wrap: wrap;
    justify-content: center;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .marquee-track { flex: 1 1 100%; flex-wrap: wrap; justify-content: center; animation: none; }
  .marquee-track[aria-hidden="true"],
  .marquee-toggle { display: none; }
}
/* Contatti */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: 0 2px 4px rgb(23 25 28 / 0.05), 0 16px 48px rgb(23 25 28 / 0.1);
}
.contact-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.contact-body { padding: 48px; }
.contact-body h2 { margin-bottom: 12px; }
.contact-intro { margin-bottom: 32px; }

.form { display: grid; gap: 24px; }
.field { display: grid; gap: 8px; }
.field label {
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 700;
}
.req { color: var(--coral-text); }
.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid #b9b5ae;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.field textarea { resize: vertical; min-height: 140px; }
@supports (field-sizing: content) {
  .field textarea { field-sizing: content; max-height: 20lh; }
}
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 0;
  border-color: var(--teal);
}
.field [aria-invalid="true"] { border-color: var(--coral-text); }
.field-error {
  color: var(--coral-text);
  font-size: 0.875rem;
  font-weight: 700;
}
.field-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 48px;
  padding-block: 12px;
  margin-block: -12px;
  font-weight: 400 !important;
  cursor: pointer;
}
.check input {
  width: 24px;
  height: 24px;
  min-height: 0;
  margin: 0;
  flex: none;
  accent-color: var(--teal-dark);
}

.btn-submit { justify-self: start; }
.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-submit[disabled] { cursor: progress; }
.btn-submit[disabled] .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2s; }
}

.form-status {
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 700;
}
.form-status.is-ok { background: #e3f4f1; color: #0b4d47; }
.form-status.is-error { background: #fde8e9; color: #8f222a; }

.contact-list {
  display: grid;
  gap: 4px;
  margin: 48px 0 0;
  padding: 32px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}
.contact-list li { display: flex; align-items: flex-start; gap: 12px; padding-block: 8px; }
.contact-list .icon { margin-top: 0.2em; color: var(--ink); }
.contact-list a { display: inline-block; margin-block: -8px; padding-block: 8px; color: var(--ink); text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
  .contact-list a:hover { text-decoration: underline; }
}

/* ---------- Torna su ---------- */

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--coral-btn);
  box-shadow: 0 8px 24px rgb(23 25 28 / 0.2);
  color: #fff;
  font-size: 1.125rem;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}
.to-top[hidden] { display: none; }
.to-top.is-visible { opacity: 1; transform: none; }
@media (hover: hover) and (pointer: fine) {
  .to-top:hover { background: var(--coral-text); }
}
@media (prefers-reduced-motion: reduce) {
  .to-top { transition: none; transform: none; }
}
@media (max-width: 599px) {
  .to-top { right: 16px; bottom: 16px; width: 48px; height: 48px; }
}

/* ---------- Footer ---------- */

.footer { background: var(--amber); color: var(--ink); }
.footer-inner {
  display: grid;
  justify-items: center;
  gap: 24px;
  padding-block: 64px 48px;
  text-align: center;
}
.footer-logo { width: 240px; }
.footer address { font-style: normal; line-height: 1.8; }
.footer a { color: var(--ink); }
.footer address a { display: inline-block; margin-block: -8px; padding-block: 8px; }
.legal-links a { display: inline-block; padding-block: 12px; }
.social {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.25rem;
}
@media (hover: hover) and (pointer: fine) {
  .social a:hover { background: rgb(23 25 28 / 0.1); }
}
.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}
.footer-bottom {
  padding-block: 16px;
  background: var(--ink);
  color: #d6d8dc;
  font-size: 0.9375rem;
  text-align: center;
}

/* ---------- Responsive ---------- */

@media (max-width: 1099px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 32px; }
}

@media (max-width: 899px) {
  :root { --section-y: 64px; }
  .about { grid-template-columns: 1fr; gap: 48px; }
  .about-photo img { max-width: 360px; }
  .cards,
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact { grid-template-columns: 1fr; }
  .contact-photo { max-height: 420px; overflow: hidden; }
}

@media (max-width: 599px) {
  :root { --gutter: 16px; --section-y: 48px; }
  .cards,
  .features,
  .steps { grid-template-columns: 1fr; }
  .card { padding: 24px; }
  .marquee { --logo-w: 152px; --logo-h: 96px; --gap: 12px; }
  .marquee-track li { padding: 12px 16px; }
  .section-compact { padding-block: 48px; }
  .section-title { margin-bottom: 32px; }
  .cta-inner { padding-block: 48px; }
  .contact-body { padding: 32px 24px; }
  .hero .actions .btn,
  .cta-inner .actions,
  .cta-inner .actions .btn { width: 100%; }
}
