/* Barberia Mirenda — sito di supporto.
   Stessa identità dell'app: nero profondo, superfici neutre, oro per i richiami. */

:root {
  --bg: #000000;
  --surface: #0e0e0f;
  --surface-2: #141416;
  --raised: #18181a;
  --ink: #f5f5f7;
  --muted: #a1a1a6;
  --faint: #6e6e73;
  --line: #1f1f22;
  --line-strong: #2e2e32;
  --gold: #d4a84b;
  --gold-bright: #f1d3b3;
  --gold-pressed: #b8913e;
  --gold-soft: #15110a;
  --gold-line: #6b5524;
  --ok: #4ade80;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --max: 760px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue",
    "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.1px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Bagliore caldo in alto, come nelle slide dello store. */
body::before {
  content: "";
  position: fixed;
  inset: -30vh 0 auto 0;
  height: 80vh;
  pointer-events: none;
  background:
    radial-gradient(60% 60% at 50% 20%, rgba(212, 168, 75, 0.16), transparent 70%),
    radial-gradient(40% 40% at 80% 0%, rgba(212, 168, 75, 0.07), transparent 70%);
  z-index: -1;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--gold-bright);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--gold);
  color: #000;
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  left: 16px;
}

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

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  padding: 22px 0 6px;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 8px 24px rgba(0, 0, 0, 0.6);
}

.brand-name {
  display: block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--faint);
}

.header-link {
  margin-left: auto;
  flex: none;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.header-link:hover {
  border-color: var(--gold-line);
  background: var(--gold-soft);
  color: var(--ink);
}

/* ---------- Hero ---------- */

main {
  padding-bottom: 8px;
}

.hero {
  margin-bottom: 34px;
  padding: 46px 0 0;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 7.4vw, 50px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -1.8px;
  text-wrap: balance;
}

.hero p {
  margin: 18px 0 0;
  max-width: 54ch;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: -0.2px;
}

.hero .app-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.7);
}

/* ---------- Aiuto ---------- */

.help {
  margin: 0 0 56px;
}

.help-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(110% 150% at 100% 0%, rgba(212, 168, 75, 0.09), transparent 60%),
    var(--gold-soft);
}

.help-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(212, 168, 75, 0.14);
  color: var(--gold);
}

.help-icon svg {
  width: 20px;
  height: 20px;
}

.help-body h2 {
  margin: 1px 0 5px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.help-body p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.help-body a {
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Sezioni ---------- */
/* ---------- Sezioni ---------- */

section {
  margin: 0 0 56px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-bottom: 18px;
}

.section-head span {
  white-space: nowrap;
}

@media (max-width: 379px) {
  .section-head span {
    display: none;
  }
}

h2.section-title {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.7px;
}

.section-head span {
  color: var(--faint);
  font-size: 13px;
  font-weight: 600;
}

/* ---------- FAQ ---------- */

.faq {
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 19px 44px 19px 2px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
  list-style: none;
  transition: color 0.15s ease;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary:hover {
  color: var(--gold-bright);
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 11px;
  height: 11px;
  margin-top: -7px;
  border-right: 2px solid var(--faint);
  border-bottom: 2px solid var(--faint);
  transform: rotate(45deg);
  transform-origin: 60% 60%;
  transition: transform 0.18s ease, border-color 0.15s ease;
}

.faq details[open] summary::after {
  transform: rotate(-135deg);
  margin-top: -2px;
  border-color: var(--gold);
}

.faq .answer {
  padding: 0 44px 22px 2px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.faq .answer p {
  margin: 0 0 12px;
}

.faq .answer p:last-child {
  margin-bottom: 0;
}

.faq .answer ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.faq .answer li {
  margin: 0 0 6px;
}

.faq .answer strong {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Card link ---------- */

.cards {
  display: grid;
  gap: 12px;
}

@media (min-width: 620px) {
  .cards.two {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

a.card:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
  transform: translateY(-1px);
}

a.card:active {
  transform: none;
}

.card-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--raised);
  color: var(--gold);
}

.card-icon svg {
  width: 19px;
  height: 19px;
}

.card h3 {
  margin: 1px 0 3px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

/* ---------- Info app ---------- */

.meta {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

.meta div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.meta div:last-child {
  border-bottom: 0;
}

.meta dt {
  color: var(--muted);
}

.meta dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

/* ---------- Piè di pagina ---------- */

.site-footer {
  margin-top: 24px;
  padding: 30px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 13px;
  line-height: 1.6;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
}

.site-footer nav {
  display: flex;
  gap: 18px;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* ---------- Pagina informativa ---------- */

.doc-hero {
  padding: 48px 0 26px;
}

.doc-hero h1 {
  font-size: clamp(30px, 6.6vw, 42px);
}

.doc-hero p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.error-actions {
  margin-top: 26px;
}

.error-actions .header-link {
  display: inline-block;
}

.doc {
  max-width: 68ch;
}

.doc h2 {
  margin: 40px 0 10px;
  font-size: 21px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.doc h3 {
  margin: 24px 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.doc p,
.doc li {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.doc p {
  margin: 0 0 14px;
}

.doc ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

.doc li {
  margin: 0 0 7px;
}

.doc strong {
  color: var(--ink);
  font-weight: 600;
}

.doc a {
  overflow-wrap: anywhere;
}

.callout {
  margin: 24px 0;
  padding: 18px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.callout p {
  margin: 0;
  font-size: 15px;
}

.toc {
  margin: 26px 0 8px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.toc p {
  margin: 0 0 8px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.toc ol {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.toc a {
  color: var(--muted);
  text-decoration: none;
}

.toc a:hover {
  color: var(--gold);
  text-decoration: underline;
}

.updated {
  margin-top: 4px;
  color: var(--faint);
  font-size: 13px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.back:hover {
  color: var(--ink);
}

/* ---------- Movimento ridotto ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------- Stampa (informativa) ---------- */

@media print {
  :root {
    color-scheme: light;
  }
  body {
    background: #fff;
    color: #111;
  }
  body::before,
  .site-header .header-link,
  .back,
  .toc,
  .site-footer nav {
    display: none;
  }
  .doc p,
  .doc li,
  .doc-hero p,
  .updated {
    color: #333;
  }
  .doc strong {
    color: #000;
  }
  .callout {
    background: #f6f6f6;
    border-color: #ccc;
  }
  a {
    color: #000;
  }
}
