:root {
  --bg: #fdf8f0;
  --bg-alt: #f8eddc;
  --text: #2f2a26;
  --muted: #5f574f;
  --accent: #1d6b66;
  --accent-text: #ffffff;
  --warm: #e0955f;
  --card: #fffdf9;
  --border: #eadfce;
  --pill: #fbe9d6;
  --hero-from: #fbe1c8;
  --hero-to: #fdf8f0;
  --shadow: 0 2px 10px rgba(120, 90, 50, .10);
  --focus: #b45309;
}

/* Tema scuro: caldo e morbido, in tonalità viola, non nero. Segue l'impostazione del sistema. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #2b2536;
    --bg-alt: #332c40;
    --text: #f6f1f8;
    --muted: #d3cbdd;
    --accent: #c9b6f5;
    --accent-text: #2a1f46;
    --warm: #f0a874;
    --card: #3a3248;
    --border: #51466a;
    --pill: #433a58;
    --hero-from: #4a3c6c;
    --hero-to: #2b2536;
    --shadow: 0 2px 10px rgba(0, 0, 0, .25);
    --focus: #f6ad55;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.65;
}

.wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1rem;
}

section { padding: 2.5rem 0; }
section.alt { background: var(--bg-alt); }
section.hero {
  padding: 3.5rem 0 2.5rem;
  background: linear-gradient(180deg, var(--hero-from) 0%, var(--hero-to) 100%);
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 1rem; }
h1 { font-size: clamp(1.75rem, 5vw, 2.4rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; margin-bottom: .4rem; }
p { margin: 0 0 1rem; }

.site-header { padding: 1.1rem 0; background: var(--bg); }
.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: .01em;
}
.brand::before {
  content: "";
  width: .9rem;
  height: .9rem;
  border-radius: 50%;
  background: var(--warm);
  box-shadow: .55rem .3rem 0 -.1rem var(--accent);
  margin-right: .5rem;
}

.status {
  display: inline-block;
  margin: 0 0 1rem;
  padding: .2rem .7rem;
  font-size: .95rem;
  color: var(--muted);
  background: var(--pill);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.lead { font-size: 1.2rem; color: var(--muted); }

ul { padding: 0; margin: 0; list-style: none; }

.cards { display: grid; gap: 1rem; }
.cards li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.4rem;
  box-shadow: var(--shadow);
}
.cards p { margin: 0; }

.plain li { margin: 0 0 1.1rem; padding-left: 1.1rem; border-left: 4px solid var(--warm); border-radius: 2px; }

.actions { display: grid; gap: .75rem; margin-top: 1.25rem; }

.button {
  display: block;
  padding: .9rem 1.1rem;
  background: var(--accent);
  color: var(--accent-text);
  border-radius: .85rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  box-shadow: var(--shadow);
}
.button:hover { filter: brightness(1.08); }
.button.disabled {
  background: transparent;
  color: var(--muted);
  border: 1px dashed var(--border);
  font-weight: 400;
  box-shadow: none;
}
.button small { font-size: .9em; }

button.button {
  width: 100%;
  border: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
button.button:disabled { opacity: .6; cursor: progress; }

#turnstile-box { margin-top: 1rem; }
#contatto-stato { margin: .75rem 0 0; color: var(--muted); }
[hidden] { display: none !important; }

#contatto-risultato { margin-top: 1rem; }

.contact-card {
  padding: 1.5rem 1.25rem;
  background: var(--card);
  border: 2px solid var(--accent);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  text-align: center;
}
.contact-card .label {
  margin: 0 0 .4rem;
  color: var(--muted);
  font-size: 1rem;
}
.contact-card .address {
  display: block;
  margin: 0 0 1rem;
  font-size: clamp(1.3rem, 5.5vw, 1.8rem);
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
  color: var(--accent);
}
.contact-card .copy {
  padding: .6rem 1.1rem;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: .6rem;
  font: inherit;
  cursor: pointer;
}
.contact-card .copy:hover { border-color: var(--accent); }

a:focus-visible, .skip:focus {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--card);
  color: var(--text);
  padding: .5rem 1rem;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 10; }

.site-footer {
  padding: 2rem 0;
  background: var(--bg-alt);
  color: var(--muted);
  font-size: .95rem;
}
.site-footer p { margin: 0 0 .4rem; }

@media (min-width: 40rem) {
  .cards { grid-template-columns: 1fr; }
  .actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
