/* DISCOVERY — il sito dei clienti GDO.
   Stessa famiglia della console Price Blaster: il cartellino giallo del
   prezzo è l'oggetto di tutto il servizio, quindi è l'unico elemento forte;
   il resto resta sobrio. */

:root {
  --page: #f3f5f1;
  --surface: #ffffff;
  --ink: #18211e;
  --ink-soft: #24302b;
  --muted: #5f6964;
  --line: #d9dfd8;
  --green: #00a550;
  --green-dark: #008a43;
  --green-soft: #e1f4e8;
  --tag: #ffd23f;
  --tag-edge: #e9b800;
  --red: #d7263d;
  --red-soft: #fbe4e7;
  --amber: #a86400;
  --amber-soft: #fff2d6;
  --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-num: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font); font-size: 16px; line-height: 1.5;
  color: var(--ink); background: var(--page);
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
[hidden] { display: none !important; }
a { color: var(--green-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-num); line-height: 1.05; margin: 0; }
h1 { font-weight: 800; font-size: clamp(38px, 6vw, 64px); letter-spacing: -0.01em; }
h2 { font-weight: 800; font-size: clamp(28px, 4vw, 40px); }
h3 { font-weight: 700; font-size: 22px; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.wrap { width: min(1120px, 100%); margin: 0 auto; padding: 0 20px; }

/* ---------- testata ---------- */
.top { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 20; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit;
  font-family: var(--font-num); font-weight: 800; font-size: 26px; letter-spacing: 0.04em; line-height: 1;
}
.brand small { display: block; font-family: var(--font); font-weight: 500; font-size: 12px; letter-spacing: 0; color: #b9c3be; margin-top: 3px; }
.brand-tag {
  background: var(--tag); border: 2px solid var(--tag-edge); color: var(--ink);
  border-radius: 4px 4px 4px 14px; padding: 2px 7px; font-size: 0.75em; letter-spacing: 0.02em;
}
.top-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.top-nav a { color: #dfe6e2; text-decoration: none; padding: 8px 12px; border-radius: 7px; font-weight: 600; }
.top-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.top-nav .btn { margin-left: 4px; }

/* ---------- pulsanti e campi ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 9px; padding: 11px 18px; font-weight: 700; cursor: pointer; text-decoration: none;
}
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn.tag { background: var(--tag); border-color: var(--tag-edge); color: var(--ink); }
.btn.tag:hover { filter: brightness(0.97); border-color: var(--ink); }
.btn.big { padding: 15px 26px; font-size: 18px; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.small { padding: 6px 12px; font-size: 14px; }
.btn.danger { color: var(--red); }
.btn:disabled { opacity: 0.5; cursor: default; }
.link-btn { background: none; border: 0; padding: 0; color: var(--green-dark); text-decoration: underline; cursor: pointer; font-weight: 600; }

label.field, .field { display: grid; gap: 5px; font-weight: 600; font-size: 14px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number],
input[type=date], input[type=search], select, textarea {
  border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; background: #fff; width: 100%; font-weight: 400;
}
textarea { min-height: 84px; resize: vertical; }
.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 500; font-size: 14px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green); }
.hint { font-size: 13px; color: var(--muted); font-weight: 400; }
.error { color: var(--red); font-weight: 600; font-size: 14px; }
.ok { color: var(--green-dark); font-weight: 600; font-size: 14px; }

/* ---------- home ---------- */
.hero { background: var(--ink); color: #fff; padding: 64px 0 76px; overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; }
.eyebrow { font-family: var(--font-num); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tag); font-size: 15px; margin-bottom: 14px; }
.hero p.lead { font-size: 20px; color: #d3dbd7; margin: 18px 0 28px; max-width: 34em; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-cta .btn.ghost { color: #fff; }
.hero-tags { position: relative; height: 330px; }
.price-tag {
  position: absolute; background: var(--tag); border: 2px solid var(--tag-edge); color: var(--ink);
  border-radius: 5px 5px 5px 26px; padding: 14px 18px 12px 18px; width: 220px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.35);
}
.price-tag::before {
  content: ''; position: absolute; top: 10px; right: 12px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--ink); border: 2px solid var(--tag-edge);
}
.price-tag .pt-name { font-weight: 700; font-size: 14px; padding-right: 20px; }
.price-tag .pt-price { font-family: var(--font-num); font-weight: 800; font-size: 52px; line-height: 1; margin-top: 4px; }
.price-tag .pt-foot { font-size: 12px; opacity: 0.75; display: flex; justify-content: space-between; gap: 8px; }
.price-tag.offer { background: #fff; border-color: var(--red); }
.price-tag.offer .pt-flag { color: var(--red); font-weight: 800; font-size: 12px; letter-spacing: 0.08em; }
.price-tag.t1 { top: 0; left: 0; transform: rotate(-4deg); z-index: 1; }
.price-tag.t2 { top: 72px; right: 0; transform: rotate(3deg); z-index: 2; }
.price-tag.t3 { top: 196px; left: 4%; transform: rotate(-1deg); z-index: 1; }
.scan-line { position: absolute; left: -6%; right: -6%; top: 150px; height: 3px; background: var(--red); box-shadow: 0 0 12px var(--red); opacity: 0.85; z-index: 0; }

.section { padding: 72px 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 46em; margin-bottom: 34px; }
.section-head p { margin-top: 12px; color: var(--muted); font-size: 18px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.section.alt .step { background: var(--page); }
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--ink); color: #fff; font-family: var(--font-num); font-weight: 800; font-size: 22px; margin-bottom: 14px;
}
.step p { color: var(--muted); margin-top: 8px; }
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.feature { display: flex; gap: 16px; padding: 22px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.feature .ico { flex: none; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--green-soft); font-size: 24px; }
.feature p { color: var(--muted); margin-top: 6px; }
.feature .opt { display: inline-block; margin-left: 6px; font-family: var(--font); font-size: 12px; font-weight: 700; color: var(--amber); background: var(--amber-soft); border-radius: 99px; padding: 1px 8px; vertical-align: middle; }

.pricing { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: start; }
.example { background: var(--ink); color: #fff; border-radius: 16px; padding: 28px; }
.example .row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #36433e; }
.example .row:last-child { border-bottom: 0; }
.example .big-price { font-family: var(--font-num); font-weight: 800; font-size: 56px; color: var(--tag); line-height: 1; }
.list-check { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.list-check li { padding-left: 28px; position: relative; }
.list-check li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 800; }

.cta-band { background: var(--green); color: #fff; padding: 56px 0; }
.cta-band .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band p { color: #e1f4e8; margin-top: 8px; font-size: 18px; }

/* ---------- moduli di accesso ---------- */
.auth { padding: 56px 0 80px; }
.auth-box {
  width: min(560px, 100%); margin: 0 auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px; padding: 32px; display: grid; gap: 16px;
}
.auth-box.narrow { width: min(430px, 100%); }
.auth-box h1 { font-size: 40px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pw-rules { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; font-size: 13px; }
.pw-rules li { color: var(--muted); padding-left: 20px; position: relative; }
.pw-rules li::before { content: '○'; position: absolute; left: 0; }
.pw-rules li.met { color: var(--green-dark); font-weight: 600; }
.pw-rules li.met::before { content: '✓'; }
.meter { height: 6px; border-radius: 4px; background: #e7ebe6; overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--red); transition: width 0.2s, background 0.2s; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 76px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.notice { padding: 14px 16px; border-radius: 10px; background: var(--green-soft); color: #00562a; }
.notice.warn { background: var(--amber-soft); color: var(--amber); }

/* ---------- area cliente ---------- */
.area { padding: 36px 0 80px; }
.area-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.panel + .panel { margin-top: 18px; }
.req { display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.req:last-child { border-bottom: 0; }
.req .meta { color: var(--muted); font-size: 14px; }
.req .money { text-align: right; }
.req .money strong { font-family: var(--font-num); font-size: 28px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 13px; font-weight: 700; background: #eef0ee; }
.pill.green { background: var(--green-soft); color: #006b34; }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.empty { padding: 36px 12px; text-align: center; color: var(--muted); }

/* ---------- composizione della visita ---------- */
.quote-bar {
  position: sticky; top: 68px; z-index: 15; background: var(--ink); color: #fff;
  border-bottom: 4px solid var(--tag);
}
.quote-in { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 12px 20px; }
.quote-total { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.quote-total .label { color: #b9c3be; font-size: 14px; }
.quote-total .amount { font-family: var(--font-num); font-weight: 800; font-size: 44px; color: var(--tag); line-height: 1; }
.quote-total .sub { color: #dfe6e2; font-size: 14px; }
.quote-total .save { background: var(--green); color: #fff; border-radius: 99px; padding: 2px 10px; font-size: 13px; font-weight: 700; }
.compose { padding: 26px 0 80px; display: grid; gap: 18px; }
.block h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.block h3 .n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 17px; }
.block > p.hint { margin-bottom: 14px; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 16px; cursor: pointer;
  text-align: left; min-width: 150px; display: grid; gap: 2px;
}
.choice strong { font-size: 16px; }
.choice span { font-size: 13px; color: var(--muted); }
.choice:hover { border-color: var(--ink); }
.choice.on { border-color: var(--green); background: var(--green-soft); }
.choice.on span { color: #00562a; }
.choice .badge { justify-self: start; margin-top: 4px; background: var(--tag); border-radius: 99px; padding: 0 8px; font-size: 12px; font-weight: 800; color: var(--ink); }
.store-search { display: flex; gap: 10px; margin-bottom: 12px; }
.store-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; max-height: 340px; overflow: auto; padding: 2px; }
.store {
  display: flex; gap: 10px; align-items: flex-start; text-align: left; cursor: pointer;
  border: 2px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff;
}
.store.on { border-color: var(--green); background: var(--green-soft); }
.store .box { flex: none; width: 20px; height: 20px; border-radius: 5px; border: 2px solid var(--line); display: grid; place-items: center; font-size: 13px; color: #fff; margin-top: 1px; }
.store.on .box { background: var(--green); border-color: var(--green); }
.store small { display: block; color: var(--muted); }
.products { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.products input[type=range] { flex: 1; min-width: 220px; accent-color: var(--green); }
.products input[type=number] { width: 120px; }
.opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.opt-card { display: flex; gap: 12px; align-items: flex-start; border: 2px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; background: #fff; }
.opt-card.on { border-color: var(--green); background: var(--green-soft); }
.opt-card input { width: 20px; height: 20px; accent-color: var(--green); margin-top: 2px; }
.opt-card .price { font-weight: 700; color: var(--amber); font-size: 14px; }
.summary { display: grid; gap: 6px; }
.summary .line { display: flex; justify-content: space-between; gap: 16px; }
.summary .line.total { border-top: 2px solid var(--ink); padding-top: 10px; margin-top: 6px; font-weight: 800; font-size: 20px; }

/* ---------- finestra di conferma ---------- */
.modal { position: fixed; inset: 0; background: rgba(24,33,30,0.55); display: grid; place-items: center; padding: 20px; z-index: 50; }
.modal-box { background: #fff; border-radius: 16px; padding: 26px; width: min(560px, 100%); max-height: 90vh; overflow: auto; display: grid; gap: 14px; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 10px; z-index: 60; max-width: 90vw; }

.foot { background: var(--ink); color: #fff; padding: 22px 0; margin-top: auto; }
.foot-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.foot .muted { color: #9aa59f; font-size: 14px; }
.small-brand { font-size: 18px; }

@media (max-width: 860px) {
  .hero-in, .pricing { grid-template-columns: 1fr; }
  .hero-tags { height: 280px; }
  .steps, .features, .opts { grid-template-columns: 1fr; }
  .grid-2, .pw-rules { grid-template-columns: 1fr; }
  .quote-total .amount { font-size: 34px; }
  .quote-bar { top: 0; position: sticky; }
  .top { position: static; }
  .req { grid-template-columns: 1fr; }
  .req .money { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
