/* Guide e presentazione di AR Maker: stile condiviso da tutte le pagine di docs/ */

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --text: #161a26;
  --muted: #5b6275;
  --border: #dde2ee;
  --brand: #2f6bff;
  --brand-ink: #ffffff;
  --brand-soft: #e5edff;
  --tour: #0f9d7a;
  --tour-soft: #ddf5ee;
  --shop: #c2416b;
  --shop-soft: #fbe4ec;
  --home: #b4641e;
  --home-soft: #fbeedf;
  --accent: #ffb020;
  --shadow: 0 10px 30px rgba(22, 26, 38, .08);
  --radius: 18px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f121a;
    --surface: #171b26;
    --surface-2: #1f2433;
    --text: #eef1f8;
    --muted: #a1a8bb;
    --border: #2b3144;
    --brand: #6b95ff;
    --brand-ink: #0f121a;
    --brand-soft: #1d2a4d;
    --tour: #3cc9a2;
    --tour-soft: #143a31;
    --shop: #f0739b;
    --shop-soft: #43192a;
    --home: #f0a35c;
    --home-soft: #3d2614;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f121a;
  --surface: #171b26;
  --surface-2: #1f2433;
  --text: #eef1f8;
  --muted: #a1a8bb;
  --border: #2b3144;
  --brand: #6b95ff;
  --brand-ink: #0f121a;
  --brand-soft: #1d2a4d;
  --tour: #3cc9a2;
  --tour-soft: #143a31;
  --shop: #f0739b;
  --shop-soft: #43192a;
  --home: #f0a35c;
  --home-soft: #3d2614;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- barra in alto ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), #8a5cff); color: #fff; font-size: .85rem; font-weight: 800;
}
.topnav { margin-left: auto; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.topnav a { text-decoration: none; color: var(--muted); padding: 6px 10px; border-radius: 8px; font-size: .95rem; }
.topnav a:hover, .topnav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
@media (max-width: 720px) { .topnav a.hide-sm { display: none; } .ui { white-space: normal; } }

/* ---------- pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  background: var(--brand); color: var(--brand-ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.tour { background: var(--tour); color: #fff; }
.btn.shop { background: var(--shop); color: #fff; }
.btn.home { background: var(--home); color: #fff; }
.btn.small { padding: 8px 16px; font-size: .92rem; }
.topnav .btn { color: var(--brand-ink); }
.topnav .btn:hover { background: var(--brand); color: var(--brand-ink); }

/* ---------- hero ---------- */
.hero { padding: 64px 0 40px; }
.hero.center p { margin-left: auto; margin-right: auto; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 680px; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand); background: var(--brand-soft); padding: 4px 12px; border-radius: 999px; margin-bottom: 16px;
}
.eyebrow.tour { color: var(--tour); background: var(--tour-soft); }
.eyebrow.shop { color: var(--shop); background: var(--shop-soft); }
.eyebrow.home { color: var(--home); background: var(--home-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero.center .hero-actions { justify-content: center; }

/* ---------- presentazione: le due aree cliccabili ---------- */
.areas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; padding-bottom: 48px; }
@media (max-width: 820px) { .areas { grid-template-columns: minmax(0, 1fr); } }
.area {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: 24px;
  text-decoration: none; color: var(--text); box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease;
}
.area:hover, .area:focus-visible { transform: translateY(-4px); }
.area.tour:hover, .area.tour:focus-visible { border-color: var(--tour); }
.area.shop:hover, .area.shop:focus-visible { border-color: var(--shop); }
.area.home:hover, .area.home:focus-visible { border-color: var(--home); }
.area-visual { height: 260px; display: flex; align-items: flex-end; justify-content: center; gap: 14px; padding: 24px 24px 0; }
.area.tour .area-visual { background: linear-gradient(160deg, var(--tour-soft), transparent); }
.area.shop .area-visual { background: linear-gradient(160deg, var(--shop-soft), transparent); }
.area.home .area-visual { background: linear-gradient(160deg, var(--home-soft), transparent); }
.area-visual img { height: 236px; width: auto; border-radius: 16px 16px 0 0; box-shadow: var(--shadow); object-fit: cover; }
.area-visual img.tilt-l { transform: rotate(-4deg) translateY(10px); height: 200px; }
.area-visual img.tilt-r { transform: rotate(4deg) translateY(10px); height: 200px; }
.area-visual img.photo { width: 58%; min-width: 0; object-position: 28% 40%; }
.area-body { padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.area-body h2 { margin: 0; }
.area-body .eyebrow { align-self: flex-start; margin-bottom: 0; }
.area-body p { color: var(--muted); margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .82rem; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.area-cta { margin-top: auto; padding-top: 10px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.area.tour .area-cta { color: var(--tour); }
.area.shop .area-cta { color: var(--shop); }
.area.home .area-cta { color: var(--home); }
.area-cta span { transition: transform .2s ease; }
.area:hover .area-cta span { transform: translateX(4px); }

/* ---------- sezioni ---------- */
section.block { padding: 56px 0; }
section.block.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 720px; margin-bottom: 32px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

.grid { display: grid; gap: 20px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid.c4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 820px) { .grid.c3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .grid.c2, .grid.c4 { grid-template-columns: minmax(0, 1fr); } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
section.block.alt .card { background: var(--bg); box-shadow: none; }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.4rem;
  background: var(--brand-soft); margin-bottom: 14px;
}
.icon.tour { background: var(--tour-soft); }
.icon.shop { background: var(--shop-soft); }
.icon.home { background: var(--home-soft); }

/* ---------- vetrina con immagini ---------- */
.showcase { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; margin-bottom: 56px; }
.showcase:last-child { margin-bottom: 0; }
.showcase.flip .showcase-media { order: 2; }
@media (max-width: 820px) {
  .showcase { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .showcase.flip .showcase-media { order: 0; }
}
.showcase-media { display: flex; justify-content: center; gap: 16px; }
.showcase ul { padding-left: 1.2em; margin: 0 0 1em; }
.showcase li { margin-bottom: .35em; }

/* cornice da smartphone per gli screenshot del viewer */
.phone {
  width: 230px; max-width: 46%; aspect-ratio: 780 / 1688; border-radius: 30px; padding: 8px;
  background: #11131a; box-shadow: var(--shadow); flex-shrink: 0;
}
.phone > img, .phone > svg { width: 100%; height: 100%; border-radius: 23px; object-fit: cover; display: block; }
.phone.lg { width: 270px; }

/* cornice da browser per gli screenshot del backend */
.browser {
  border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--surface);
  box-shadow: var(--shadow); width: 100%;
}
.browser::before {
  content: ""; display: block; height: 28px; background: var(--surface-2);
  background-image: radial-gradient(circle, #ff5f57 5px, transparent 6px), radial-gradient(circle, #febc2e 5px, transparent 6px), radial-gradient(circle, #28c840 5px, transparent 6px);
  background-size: 18px 28px; background-repeat: no-repeat; background-position: 10px 0, 28px 0, 46px 0;
  border-bottom: 1px solid var(--border);
}
.browser img { width: 100%; }

/* foto reale a tutta larghezza (es. prova dal vivo) */
.photo-frame { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.photo-frame img { width: 100%; }
.showcase-media > .photo-frame { flex: 1 1 0; max-width: 380px; }

figure { margin: 0; }
figcaption { font-size: .88rem; color: var(--muted); margin-top: 10px; text-align: center; }
figure.wide { margin: 24px 0; }

/* ---------- numeri / punti di forza ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 820px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.stat strong { display: block; font-size: 1.6rem; line-height: 1.1; margin-bottom: 4px; }
.stat span { color: var(--muted); font-size: .92rem; }

/* ---------- banda contatti (ripetuta nella presentazione) ---------- */
.cta-band {
  margin: 0 auto; border-radius: 24px; padding: 32px; display: flex; flex-wrap: wrap; gap: 20px;
  align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, var(--brand), #8a5cff); color: #fff;
}
.cta-band.tour { background: linear-gradient(135deg, #0f9d7a, #2f6bff); }
.cta-band.shop { background: linear-gradient(135deg, #c2416b, #8a5cff); }
.cta-band.home { background: linear-gradient(135deg, #b4641e, #c2416b); }
.cta-band h2 { margin: 0 0 4px; font-size: 1.5rem; }
.cta-band p { margin: 0; opacity: .92; }
.cta-band .btn { background: #fff; color: #161a26; }
.cta-band .btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
.cta-band .cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.inline-cta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 28px; padding: 16px 20px; border-radius: 14px;
  background: var(--brand-soft); border: 1px dashed color-mix(in srgb, var(--brand) 50%, transparent);
}
.inline-cta p { margin: 0; flex: 1; min-width: 220px; }

/* pulsante contatti sempre visibile */
.float-cta {
  position: fixed; right: 16px; bottom: 16px; z-index: 30;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
@media (max-width: 520px) { .float-cta { left: 16px; } }

/* ---------- FAQ ---------- */
details {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; margin-bottom: 10px;
}
details summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: 8px; }
details p:last-child { margin-bottom: 0; }

/* ---------- guide passo passo ---------- */
.guide-layout { display: grid; grid-template-columns: 240px 1fr; gap: 40px; padding: 40px 0 80px; }
@media (max-width: 900px) { .guide-layout { grid-template-columns: minmax(0, 1fr); gap: 0; } }
.toc { position: sticky; top: 80px; align-self: start; font-size: .92rem; }
@media (max-width: 900px) {
  .toc { position: static; margin-bottom: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
}
.toc strong { display: block; margin-bottom: 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a {
  display: flex; gap: 8px; padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--muted);
}
.toc a::before { content: counter(toc); font-weight: 700; color: var(--brand); min-width: 1.2em; }
.toc a:hover { background: var(--surface-2); color: var(--text); }

.guide-content { min-width: 0; }
.step { padding-bottom: 48px; margin-bottom: 48px; border-bottom: 1px solid var(--border); scroll-margin-top: 80px; }
.step:last-child { border-bottom: 0; }
.step-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.step-num {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: var(--brand); color: var(--brand-ink); font-weight: 800;
}
.step-head h2 { margin: 0; font-size: 1.55rem; }
.step ol, .step ul { padding-left: 1.3em; }
.step li { margin-bottom: .45em; }
.step .media-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin: 24px 0; }

.ui { /* etichetta di un pulsante/menu del software */
  display: inline-block; padding: 0 7px; border-radius: 6px; font-weight: 600; font-size: .92em;
  background: var(--surface-2); border: 1px solid var(--border); white-space: nowrap;
}
.tip, .warn {
  padding: 14px 18px; border-radius: 12px; margin: 18px 0; border-left: 4px solid var(--brand); background: var(--brand-soft);
}
.tip strong, .warn strong { display: block; margin-bottom: 2px; }
.warn { border-left-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.tip p:last-child, .warn p:last-child { margin: 0; }

table.ref { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .95rem; background: var(--surface); border-radius: 12px; overflow: hidden; }
table.ref th, table.ref td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.ref th { background: var(--surface-2); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table-scroll { overflow-x: auto; }

.types { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 16px 0; }
.types div { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; font-size: .9rem; }
.types small { display: block; color: var(--muted); }

/* ---------- form contatti ---------- */
.form-card { max-width: 760px; margin: 0 auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .full { grid-column: 1 / -1; }
label.lbl { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
input[type=text], input[type=email], input[type=tel], select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
textarea { min-height: 130px; resize: vertical; }
.choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 640px) { .choice { grid-template-columns: 1fr; } }
.choice label {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg); font-size: .95rem;
}
.choice label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.choice input { margin-top: 4px; accent-color: var(--brand); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--muted); }
.check input { margin-top: 5px; accent-color: var(--brand); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 14px 18px; border-radius: 12px; margin-bottom: 18px; }
.alert.ok { background: var(--tour-soft); color: var(--text); border: 1px solid var(--tour); }
.alert.err { background: var(--shop-soft); color: var(--text); border: 1px solid var(--shop); }

/* ---------- footer ---------- */
footer.site { padding: 32px 0 96px; border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; }
footer.site a { color: var(--muted); }
