/* INDÖS – Wear the memory */
:root {
  /* Palette del brand: nero + lime */
  --ink: #111111;
  --lime: #C8E62E;
  --lime-deep: #6F8A00;      /* lime scurito: bordi e tratteggi su fondo chiaro */
  --ground: #F3F2EE;
  --stage: #E7E6E1;
  --surface: #FFFFFF;
  --muted: #5B5B57;
  --line: #DCDAD3;
  --line-soft: #ECEBE6;
  --field: #C4C2BA;
  --dark-2: #1E1E1E;         /* superfici dentro le card nere */
  --dark-line: #333333;
  --dark-muted: #B4B4AE;
  --danger: #B42318;         /* solo per errori */
  --danger-bg: #FBE4E1;
  --ok-bg: #EEF7C9;
  --ok-ink: #3D4F00;
  --display: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --body: 'DM Sans', system-ui, sans-serif;
  --script: 'Kaushan Script', 'Brush Script MT', cursive;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: var(--body); background: var(--ground); color: var(--ink); font-size: 16px; line-height: 1.45; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--lime-deep); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--ink); text-decoration-color: var(--ink); }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; }

/* Marchio */
.wordmark { display: inline-block; font-family: var(--display); color: inherit; line-height: 1; white-space: nowrap; }
.wordmark > span { vertical-align: baseline; }
/* la Ö è un SVG appoggiato sulla linea di base, alto quanto le maiuscole */
.wordmark__o { display: inline-block; vertical-align: baseline; }
.wordmark--minimal { font-weight: 400; letter-spacing: 0.32em; }
.wordmark--minimal .wordmark__o { height: 1.07em; width: 0.82em; margin-right: 0.32em; }
.wordmark--bold { font-weight: 800; letter-spacing: -0.02em; }
.wordmark--bold .wordmark__o { height: 1em; width: 0.77em; margin: 0 0.03em; }
.tagline { font-family: var(--display); font-weight: 500; font-size: 13px; letter-spacing: 0.35em; text-transform: uppercase; }
.script { font-family: var(--script); font-weight: 400; transform: rotate(-6deg); display: inline-block; line-height: 1.15; }
.script-underline { display: block; height: 6px; margin-top: 4px; background: var(--lime); border-radius: 6px 2px 8px 2px; transform: skewX(-20deg); }

/* Layout */
.topbar { height: 72px; padding: 0 clamp(16px, 4vw, 48px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 16px; background: var(--ground); }
.brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); font-size: 22px; }
.brand:hover { color: var(--ink); }
.topbar nav { display: flex; align-items: center; gap: 16px; font-size: 15px; }
.topbar nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; }
.topbar nav a:not(.btn):hover { text-decoration: underline; text-decoration-color: var(--lime-deep); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--lime); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--display); }
.page { max-width: 1344px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 48px) 64px; }
.page--narrow { max-width: 560px; }
.stack { display: flex; flex-direction: column; gap: 22px; }
.row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: start; }
@media (max-width: 900px) { .split, .grid-2 { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 901px) { .sticky-md { position: sticky; top: 16px; } }
.footer { border-top: 1px solid var(--line); padding: 24px clamp(16px, 4vw, 48px); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }

/* Tipografia */
.title { font-family: var(--display); font-weight: 800; font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.8px; line-height: 1.08; }
.title-sm { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -0.4px; }
.lead { color: var(--muted); margin: 0; }
.label { font-family: var(--display); font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.mono { font-family: var(--mono); font-size: 14px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* Superfici */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.card--dark { background: var(--ink); color: #F5F5F2; border: 0; }
.card--dark .label, .card--dark .muted { color: var(--dark-muted); }
.card--dark a { color: #F5F5F2; text-decoration-color: var(--lime); }
.stage { background: var(--stage); border-radius: 24px; padding: 24px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.stage svg { width: min(48%, 260px); height: auto; }
.stage svg:only-child { width: 100%; }
.hero { background: var(--ink); color: #F5F5F2; border-radius: 28px; padding: clamp(28px, 6vw, 72px); display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 40px; align-items: center; }
@media (max-width: 900px) { .hero { grid-template-columns: minmax(0, 1fr); } }
.hero .lead { color: var(--dark-muted); font-size: 18px; }
.hero-symbol { width: min(100%, 280px); justify-self: center; }

/* Pulsanti */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; font: 700 15px var(--display); letter-spacing: 0.01em; text-decoration: none; cursor: pointer; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); }
.btn:hover { color: var(--ink); background: rgba(17,17,17,0.06); }
.btn--primary { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.btn--primary:hover { background: #B6D41C; border-color: #B6D41C; color: var(--ink); }
.btn--dark { background: var(--ink); color: #F5F5F2; }
.btn--dark:hover { background: #000; color: var(--lime); }
.btn--ghost-light { border-color: #555; color: #F5F5F2; }
.btn--ghost-light:hover { background: rgba(255,255,255,0.08); color: #F5F5F2; }
.btn--small { min-height: 40px; padding: 0 14px; font-size: 13px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--danger); text-decoration: underline; cursor: pointer; }

/* Focus visibile su fondo chiaro e scuro */
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible,
.swatch input:focus-visible + span, .pill input:focus-visible + span {
  outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 5px var(--lime);
}

/* Form */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field legend, .field .row > label { font-family: var(--display); font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 0; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--field); background: var(--surface); font: 16px var(--body); color: var(--ink);
}
textarea { resize: vertical; }
.help { font-size: 13px; color: var(--muted); }
.errors { list-style: none; margin: 0; padding: 0; color: var(--danger); font-size: 14px; font-weight: 600; }
.alert { padding: 14px 16px; border-radius: 14px; font-size: 15px; }
.alert--success { background: var(--ok-bg); color: var(--ok-ink); border-left: 0; }
.alert--error { background: var(--danger-bg); color: #7A1A10; }

/* Scelte: campioni colore e taglie */
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font-size: 12px; color: var(--muted); }
.swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch span.dot { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(17,17,17,0.25); display: block; }
.swatch input:checked + span.dot { box-shadow: 0 0 0 3px var(--ground), 0 0 0 6px var(--lime-deep); }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill span { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font: 700 15px var(--display); }
.pill input:checked + span { background: var(--ink); color: var(--lime); border-color: var(--ink); }
.toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.toggle input { width: 22px; height: 22px; accent-color: var(--ink); }

/* Aree di stampa */
.zone { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); flex-wrap: wrap; }
.zone__info { flex: 1 1 180px; display: flex; flex-direction: column; }
.zone__info strong { font-size: 16px; }
.zone__thumb { width: 52px; height: 52px; border-radius: 8px; background: var(--ground); object-fit: contain; }
.zone input[type=file] { font-size: 14px; max-width: 250px; }

/* Passaggi */
.steps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; font-size: 14px; }
.steps > * { display: inline-flex; gap: 8px; align-items: center; padding: 8px 16px; border-radius: 999px; color: var(--muted); text-decoration: none; }
.steps a:hover { color: var(--ink); }
.steps .is-active { background: var(--ink); color: #F5F5F2; font-weight: 600; }
.steps .is-active .mono { color: var(--lime); }
.steps .mono { font-size: 12px; }

/* Tabelle e dati */
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table .num { text-align: center; font-family: var(--mono); }
.table .zero { color: #B0AEA6; }
.table tfoot td { font-weight: 700; border-bottom: 0; }
.cdot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(17,17,17,0.3); vertical-align: -2px; margin-right: 8px; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; font-family: var(--display); letter-spacing: 0.04em; background: var(--lime); color: var(--ink); }
.badge--closed { background: var(--stage); color: var(--muted); }
.progress { height: 10px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.card--dark .progress { background: var(--dark-line); }
.progress > span { display: block; height: 100%; background: var(--lime); border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(17,17,17,0.08); }
.big-num { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1; }
.total-num { font-family: var(--display); font-weight: 800; font-size: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-family: var(--mono); font-size: 13px; }
.copybox { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.copybox input { flex: 1 1 260px; background: var(--dark-2); color: #F5F5F2; border-color: var(--dark-2); font-family: var(--mono); font-size: 14px; }
.divider-dark { height: 1px; background: var(--dark-line); }
.campaign-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.campaign-card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); }
.campaign-card:hover { color: var(--ink); border-color: var(--ink); }
.inline-form { display: inline; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 900px) { .hero-symbol { width: 150px; } }
.choices { padding: 6px 0 0 6px; }
