/* Base comune ai micrositi demo di Utopia.
   Ogni pagina imposta i suoi colori: --bg, --ink, --muted, --accent, --accent-ink, --card, --line */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Barra di Utopia in cima a ogni demo */
.demobar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 20px; min-height: 48px;
  background: rgba(10, 10, 11, 0.92); color: #f5f5f7;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
}
.demobar a { color: #ff9a5c; text-decoration: none; font-weight: 500; white-space: nowrap; }
.demobar a:hover { text-decoration: underline; text-underline-offset: 3px; }
.demobar__note { color: #a1a1a6; }
.demobar__cta { background: #f37021; color: #1a0c04 !important; padding: 7px 14px; border-radius: 999px; font-weight: 600 !important; }
.demobar__cta:hover { text-decoration: none !important; background: #ff9a5c; }
@media (max-width: 640px) { .demobar__note { display: none; } }

/* Elementi comuni */
.wrap { width: min(1080px, calc(100% - 40px)); margin: 0 auto; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 26px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; text-decoration: none;
  transition: transform 150ms cubic-bezier(0.23, 1, 0.32, 1), filter 200ms ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.field {
  width: 100%; min-height: 50px; padding: 0 14px;
  background: var(--card); border: 1px solid var(--line); color: var(--ink);
  font-size: 16px;
}
textarea.field { padding: 12px 14px; min-height: 80px; resize: vertical; }
.field:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.lbl { display: block; font-size: 14px; font-weight: 600; color: var(--muted); margin: 0 0 8px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; line-height: 1.45; }
.check input { width: 20px; height: 20px; margin: 0; flex: 0 0 20px; accent-color: var(--accent); }
.msg { font-size: 14px; color: var(--muted); min-height: 1.4em; }
.msg.is-warn { color: var(--warn, #b3261e); font-weight: 600; }

.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick label { cursor: pointer; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 46px; padding: 8px 16px;
  background: var(--card); border: 1px solid var(--line);
  font-variant-numeric: tabular-nums; font-size: 15px;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 140ms ease;
}
.pick label:active span { transform: scale(0.96); }
.pick input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.pick input:disabled + span { opacity: 0.35; text-decoration: line-through; cursor: not-allowed; }
.pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.pick small { font-size: 12px; opacity: 0.8; }

.done { animation: done-in 600ms cubic-bezier(0.23, 1, 0.32, 1) both; }
@keyframes done-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } }

.foot-demo { padding: 48px 0 56px; font-size: 14px; color: var(--muted); }
.foot-demo .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .done { animation: none; }
  * { transition-duration: 0ms !important; }
}

.brand-sub { font-weight: 400; opacity: 0.7; }

/* ---------- Elementi comuni aggiunti ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .rv { opacity: 0; transform: translateY(22px); transition: opacity 700ms cubic-bezier(0.23, 1, 0.32, 1), transform 700ms cubic-bezier(0.23, 1, 0.32, 1); }
  .js .rv.in { opacity: 1; transform: none; }
}
.bizbar { position: sticky; top: 48px; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.bizbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 60px; }
.bizbar__logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; }
.bizbar__links { display: flex; gap: 24px; font-size: 15px; }
.bizbar__links a { text-decoration: none; color: var(--muted); transition: color 200ms ease; }
.bizbar__links a:hover { color: var(--ink); }
.bizbar .btn { min-height: 40px; padding: 0 18px; font-size: 15px; }
@media (max-width: 820px) { .bizbar__links { display: none; } }

.open { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.open::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #c0574a; }
.open.is-open::before { background: #4caf6e; box-shadow: 0 0 0 4px rgba(76,175,110,0.2); animation: pulse-open 2s ease-in-out infinite; }
@keyframes pulse-open { 50% { box-shadow: 0 0 0 7px rgba(76,175,110,0.05); } }

.week { display: flex; flex-direction: column; }
.week li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 14px; border-radius: 10px; font-variant-numeric: tabular-nums; }
.week li.is-today { background: color-mix(in srgb, var(--accent) 16%, transparent); font-weight: 600; }
.week li.is-today::after { content: "oggi"; font-size: 12px; font-weight: 600; color: var(--accent); margin-left: 8px; }
.week li span:last-child { color: var(--muted); }
.week li.is-today span:last-child { color: var(--ink); }

.map { position: relative; min-height: 260px; border-radius: inherit; overflow: hidden; background-color: color-mix(in srgb, var(--card) 70%, var(--line)); background-image: linear-gradient(var(--line) 2px, transparent 2px), linear-gradient(90deg, var(--line) 2px, transparent 2px), linear-gradient(35deg, transparent 47%, color-mix(in srgb, var(--accent) 22%, transparent) 47% 53%, transparent 53%); background-size: 38px 38px, 38px 38px, 100% 100%; }
.map__pin { position: absolute; left: 50%; top: 45%; width: 26px; height: 26px; border-radius: 50% 50% 50% 0; background: var(--accent); transform: translate(-50%, -50%) rotate(-45deg); box-shadow: 0 8px 18px rgba(0,0,0,0.3); }
.map__pin::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--bg); }
.map__label { position: absolute; left: 50%; top: calc(45% + 26px); transform: translateX(-50%); font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--card); color: var(--ink); white-space: nowrap; box-shadow: 0 6px 16px rgba(0,0,0,0.15); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 26px; }
.steps span { font-size: 13px; color: var(--muted); padding-top: 9px; border-top: 3px solid var(--line); transition: border-color 300ms ease, color 300ms ease; }
.steps span.on { color: var(--ink); border-top-color: var(--accent); font-weight: 600; }

.mbook { display: none; }
@media (max-width: 820px) {
  .mbook { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 35; justify-content: center; box-shadow: 0 16px 40px -12px rgba(0,0,0,0.5); }
}
.ics { background: transparent; color: var(--ink); border: 1px solid var(--line); }
@media (max-width: 520px) {
  .week li { flex-wrap: wrap; gap: 2px 12px; }
  .week li span:first-child { flex: 1; }
  .week li.is-today::after { order: 1; }
  .week li span:last-child { order: 2; flex-basis: 100%; font-size: 14px; }
}
