/* AR Midi Patchbox · Help — stile comune a tutte le pagine (IT e EN), dalla guida di AR Sing Coach con i colori dell'icona. */

:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --text: #161c26;
  --muted: #5a6577;
  --line: #dce2ec;
  --brand: #1c3a6b;
  --brand-soft: #e3eaf6;
  --accent: #e8590c;          /* cerchi e frecce sugli screenshot */
  --accent-soft: rgba(232, 89, 12, 0.14);
  --link: #1f55a8;
  --shadow: 0 10px 30px rgba(15, 25, 45, 0.12), 0 2px 6px rgba(15, 25, 45, 0.08);
  --radius: 14px;
  --sidebar: 250px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e121a;
    --surface: #151b26;
    --text: #e5eaf3;
    --muted: #9aa6b8;
    --line: #263142;
    --brand: #8db4f0;
    --brand-soft: #1a2436;
    --accent: #ff8a3d;
    --accent-soft: rgba(255, 138, 61, 0.18);
    --link: #9cc0f5;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-underline-offset: 2px; }

/* ---------- Intestazione ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand img { width: 44px; height: auto; }
.brand .logo { width: 44px; height: 30px; color: var(--brand); }
.brand small { color: var(--muted); font-weight: 500; }

.lang {
  margin-left: auto;
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
}

.lang a, .lang span { padding: 4px 12px; text-decoration: none; color: var(--muted); }
.lang span { background: var(--brand); color: var(--surface); }

/* ---------- Struttura ---------- */

.layout {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  max-width: 1280px;
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 69px;
  align-self: start;
  height: calc(100vh - 69px);
  overflow-y: auto;
  padding: 28px 16px 28px 24px;
  border-right: 1px solid var(--line);
}

.sidebar h2 {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.sidebar ul { list-style: none; margin: 0 0 24px; padding: 0; }

.sidebar li a, .sidebar li span {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
}

.sidebar li a:hover { background: var(--brand-soft); }
.sidebar li a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); font-weight: 650; }
.sidebar li span { color: var(--muted); }
.sidebar li span em { font-size: 12px; font-style: normal; opacity: 0.8; }

main { padding: 36px 48px 80px; min-width: 0; }

.content { max-width: 920px; }

h1 { font-size: 38px; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 12px; }
h2 { font-size: 26px; letter-spacing: -0.01em; margin: 56px 0 12px; }
h3 { font-size: 19px; margin: 28px 0 8px; }

.lead { font-size: 19px; color: var(--muted); margin: 0 0 28px; }

kbd {
  font: 600 13px/1 ui-monospace, "SF Mono", Menlo, monospace;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface);
}

.ui { font-weight: 650; }          /* etichette dell'app, es. «Aggiungi a playlist» */

/* Tabelle (voci ed esercizi del Warm up). */
table { border-collapse: collapse; margin: 12px 0 20px; background: var(--surface); border-radius: var(--radius);
        overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
th, td { padding: 8px 16px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: var(--brand-soft); font-weight: 650; }
tr:last-child td { border-bottom: none; }
.ui-en { color: var(--muted); font-weight: 400; }

/* ---------- Screenshot annotati ---------- */

.shot { margin: 28px 0 8px; }

.shot-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
  line-height: 0;
}

.shot-frame img { width: 100%; height: auto; display: block; }

.shot-frame svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.shot.phone { max-width: 340px; }

.shot figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.mark rect {
  fill: var(--accent-soft);
  stroke: var(--accent);
  stroke-width: 5;
  transition: fill 0.15s;
}

.mark line { stroke: var(--accent); stroke-width: 5; stroke-linecap: round; }

.mark circle { fill: var(--accent); stroke: #fff; stroke-width: 5; }

.mark text {
  fill: #fff;
  font: 700 30px -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  text-anchor: middle;
  dominant-baseline: central;
}

.phone .mark rect, .phone .mark line, .phone .mark circle { stroke-width: 4; }

.mark { cursor: pointer; }
.mark.active rect { fill: rgba(232, 89, 12, 0.32); }
.mark.active circle { r: 34px; }

/* ---------- Elenco numerato accanto agli screenshot ---------- */

.callouts { list-style: none; margin: 18px 0 0; padding: 0; counter-reset: none; }

.callouts li {
  position: relative;
  padding: 12px 14px 12px 56px;
  border-radius: 12px;
  transition: background 0.15s;
}

.callouts li::before {
  content: attr(data-n);
  position: absolute;
  left: 12px;
  top: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  line-height: 30px;
  text-align: center;
}

.callouts li.active { background: var(--accent-soft); }
.callouts li strong { display: block; }

/* ---------- Riquadri ---------- */

.note, .device-box {
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 24px 0;
}

.note { background: var(--brand-soft); }
.note p:first-child { margin-top: 0; }
.note p:last-child { margin-bottom: 0; }

/* Avviso importante (brani non inclusi nell'app). */
.notice {
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent-soft);
  padding: 18px 22px;
  margin: 24px 0;
}
.notice h2, .notice h3 { margin-top: 0; }
.notice p:last-child, .notice ul:last-child { margin-bottom: 0; }

.device-box {
  border: 1px solid var(--line);
  background: var(--surface);
}

.device-box > h3:first-child { margin-top: 0; }

.device-grid {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.cards a, .cards span {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.cards a:hover { border-color: var(--brand); }
.cards strong { display: block; color: var(--brand); }
.cards small { color: var(--muted); }
.cards span { opacity: 0.6; }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.site-footer {
  padding: 28px 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* ---------- Schermi stretti ---------- */

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 16px;
  }
  .sidebar ul { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
  .sidebar h2 { display: none; }
  main { padding: 24px 16px 64px; }
  h1 { font-size: 30px; }
  .device-grid { grid-template-columns: minmax(0, 1fr); }
  .shot.phone { margin-left: auto; margin-right: auto; }
  .site-header { padding: 10px 16px; }
  .brand small { display: none; }
}

/* «Coming soon to the App Store» nell'introduzione. */
.badge {
  display: inline-block;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.badge-note { color: var(--muted); font-size: 0.95rem; margin-left: 6px; }
