/* Layout: pensato per smartphone, colonna unica che si apre a griglia da tablet in su.
   Tema chiaro e caldo: fondo rosa cipria, magenta e prugna come colori del marchio, giallo per le promozioni. */
:root {
  --bg: #fff5f8;
  --bg-2: #fde6ef;
  --surface: #ffffff;
  --ink: #2c0b27;
  --muted: #6e5068;
  --line: #f2cfdf;
  --primary: #d4146a;
  --primary-2: #8e1670;
  --plum: #3d0d3a;
  --sun: #ffd23a;
  --sun-ink: #3a1600;
  --ok: #0f9d58;
  --busy: #e0731a;
  --off: #8b7987;
  --booked: #2f62d6;
  --pause: #f2b500;
  --danger: #c62f2a;

  /* nomi usati anche dal pannello */
  --night: var(--bg);
  --surface-2: var(--bg-2);
  --line-soft: var(--line);
  --gold: var(--primary);
  --gold-strong: var(--primary-2);
  --on-gold: #ffffff;
  --text: var(--ink);

  --font-display: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;

  --radius: 18px;
  --shadow: 0 10px 30px -12px rgba(142, 22, 112, 0.25);
  --shadow-lg: 0 24px 60px -24px rgba(142, 22, 112, 0.45);
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-body);
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 900px) { body { padding-bottom: 0; } }

img { max-width: 100%; display: block; }
a { color: var(--primary); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 8px;
}
.wrap { width: 100%; max-width: 1160px; margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.1; text-wrap: balance; margin: 0; color: var(--plum); }
h1 { font-size: clamp(2.3rem, 10vw, 4.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 6vw, 2.6rem); letter-spacing: -0.01em; }
h3 { font-size: 1.3rem; }
p { margin: 0; }
.eyebrow { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--primary); font-weight: 800; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* ---------- barra superiore + header */
.topbar { background: linear-gradient(90deg, var(--primary-2), var(--primary)); color: #fff; font-size: 0.88rem; }
.topbar .wrap { display: flex; justify-content: center; align-items: center; gap: 6px 16px; flex-wrap: wrap; padding-block: 7px; text-align: center; }
.topbar a { color: #fff; font-weight: 800; text-decoration: none; white-space: nowrap; }
.topbar a:hover { text-decoration: underline; }

body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: #fff;
}
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); box-shadow: 0 6px 20px -16px rgba(142, 22, 112, 0.5);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--plum); text-decoration: none; min-width: 0; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center;
  color: #fff; font-size: 1.25rem; background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 6px 16px -6px rgba(212, 20, 106, 0.6);
}
.brand-name { font-family: var(--font-serif); font-style: italic; font-size: 1.3rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-name b { color: var(--primary); font-weight: 700; }
.site-nav { display: none; gap: 24px; }
.site-nav a { color: var(--plum); text-decoration: none; font-size: 0.95rem; font-weight: 600; }
.site-nav a:hover { color: var(--primary); }
@media (min-width: 960px) { .site-nav { display: flex; } }

/* ---------- pulsanti */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 24px; border-radius: 999px;
  font: 800 1.02rem/1.2 var(--font-body); text-decoration: none; text-align: center;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-call {
  background: linear-gradient(135deg, var(--primary), #b0105e); color: #fff;
  box-shadow: 0 10px 22px -10px rgba(212, 20, 106, 0.8);
}
.btn-call:hover { transform: translateY(-1px); box-shadow: 0 14px 26px -10px rgba(212, 20, 106, 0.9); }
.btn-ghost { background: var(--surface); color: var(--primary); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--primary); }
.btn-small { min-height: 44px; padding: 8px 18px; font-size: 0.95rem; }
.btn-xl { min-height: 60px; font-size: 1.15rem; padding-inline: 30px; }
.btn[aria-disabled="true"] { background: var(--bg-2); color: var(--muted); border-color: var(--line); box-shadow: none; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-number { display: grid; gap: 0; line-height: 1.15; }
.btn-number small { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.85; }
.header-call { display: none; }
@media (min-width: 560px) { .header-call { display: inline-flex; } }

/* ---------- sezioni */
section { padding-block: 52px; }
.section-head { display: grid; gap: 10px; margin: 0 auto 28px; max-width: 44rem; text-align: center; justify-items: center; }
.section-head p { color: var(--muted); }
.section-alt { background: linear-gradient(180deg, var(--bg-2), var(--bg)); }

/* ---------- apertura (i colori del fondo sono in fx.css) */
.hero-text { display: grid; gap: 16px; align-content: start; }
.hero-lead { font-size: 1.08rem; max-width: 34rem; }
.hero-actions { display: grid; gap: 12px; }
@media (min-width: 560px) { .hero-actions { grid-template-columns: auto auto; justify-content: start; } }
.live-pill {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 14px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.35); font-size: 0.95rem; width: fit-content; max-width: 100%;
}
.live-pill .dot { width: 10px; height: 10px; border-radius: 50%; background: #48e08e; flex: none; }
.live-pill.is-unknown .dot { background: var(--sun); }
.live-pill.is-none .dot { background: #d9c6d4; }
.live-pill .muted { color: inherit; opacity: 0.8; }

/* ---------- schede offerta */
.tcard {
  position: relative; background: var(--surface); border-radius: var(--radius); padding: 24px 22px;
  display: grid; gap: 14px; align-content: start; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.badge {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content;
  font-size: 0.76rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px; background: var(--sun); color: var(--sun-ink);
}
.badge-soft { background: var(--bg-2); color: var(--primary); }
.tcard h3 { font-size: 1.45rem; }
.price-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price { font-family: var(--font-display); font-weight: 900; font-size: 3.2rem; line-height: 1; color: var(--primary); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.price-tbd { font-size: 1.5rem; color: var(--muted); font-weight: 700; }
.duration { font-size: 1.1rem; font-weight: 700; color: var(--plum); }
.facts { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 0.96rem; }
.facts li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; color: var(--muted); }
.facts li strong { color: var(--ink); font-weight: 700; }
.facts svg { width: 18px; height: 18px; margin-top: 3px; color: var(--primary); }
.call-note { font-size: 0.92rem; color: var(--muted); }
.card-actions { display: grid; gap: 10px; }

/* promo in evidenza: grande banner a colori */
.tcard-featured {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 60%, var(--plum) 100%);
  color: #fff; border: 0; box-shadow: var(--shadow-lg); overflow: hidden; padding: 28px 24px;
}
.tcard-featured::after {
  content: "♥"; position: absolute; right: -18px; bottom: -60px; font-size: 220px; line-height: 1;
  color: rgba(255, 255, 255, 0.08); pointer-events: none;
}
.tcard-featured > * { position: relative; z-index: 1; }
.tcard-featured h3 { color: #fff; font-size: clamp(1.6rem, 6vw, 2.2rem); text-transform: uppercase; }
.tcard-featured .price { color: var(--sun); font-size: clamp(3.6rem, 16vw, 5rem); text-shadow: 0 4px 0 rgba(0, 0, 0, 0.15); }
.tcard-featured .duration { color: #fff; font-size: 1.3rem; }
.tcard-featured .facts li, .tcard-featured .call-note { color: rgba(255, 255, 255, 0.85); }
.tcard-featured .facts li strong { color: #fff; }
.tcard-featured .facts svg { color: var(--sun); }
.tcard-featured .btn-call { background: var(--sun); color: var(--sun-ink); box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.45); font-size: 1.12rem; min-height: 58px; }
.tcard-featured .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.5); }
@media (min-width: 820px) {
  .tcard-featured { grid-template-columns: 1fr 1fr; column-gap: 40px; padding: 36px 40px; }
  .tcard-featured .badge, .tcard-featured h3, .tcard-featured .price-row { grid-column: 1; }
  .tcard-featured .facts { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
  .tcard-featured .card-actions { grid-column: 1 / -1; grid-template-columns: minmax(0, 360px) auto; align-items: center; }
}

.offers { display: grid; gap: 20px; }
@media (min-width: 720px) { .offers:not(.single) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .offers.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.offers-more { display: flex; justify-content: center; margin-top: 22px; }

/* ---------- cartomanti */
.people-tools {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 6px 18px; box-shadow: var(--shadow);
}
.toggle { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 800; color: var(--plum); min-height: 44px; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .track { width: 50px; height: 30px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); position: relative; flex: none; transition: background-color .15s; }
.toggle .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); transition: transform .15s;
}
.toggle input:checked + .track { background: var(--ok); border-color: var(--ok); }
.toggle input:checked + .track::after { transform: translateX(20px); }
.toggle input:focus-visible + .track { outline: 3px solid var(--primary); outline-offset: 3px; }
.updated { font-size: 0.88rem; color: var(--muted); }

.people { display: grid; gap: 18px; }
@media (min-width: 640px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .people { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.person {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: grid; gap: 14px; align-content: start; box-shadow: var(--shadow);
}
.person.is-disponibile { border-color: rgba(15, 157, 88, 0.45); box-shadow: 0 12px 30px -14px rgba(15, 157, 88, 0.45); }
.person-top { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px; align-items: center; }
.portrait {
  width: 92px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--bg-2);
  border: 3px solid #fff; box-shadow: 0 0 0 3px var(--line);
}
.person.is-disponibile .portrait { box-shadow: 0 0 0 3px var(--ok); }
.person.is-in_consulto .portrait { box-shadow: 0 0 0 3px var(--busy); }
.person.is-prenotata .portrait { box-shadow: 0 0 0 3px var(--booked); }
.person.is-in_pausa .portrait { box-shadow: 0 0 0 3px var(--pause); }
.portrait img, .portrait svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.person-name { font-size: 1.5rem; }
.status {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 6px;
  padding: 5px 12px; border-radius: 999px; font-size: 0.82rem; font-weight: 800; width: fit-content;
  text-transform: uppercase; letter-spacing: 0.06em; color: #fff;
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.status-disponibile { background: var(--ok); }
.status-in_consulto { background: var(--busy); }
.status-in_consulto::before { border-radius: 2px; }
.status-prenotata { background: var(--booked); }
.status-prenotata::before { border-radius: 2px; transform: rotate(45deg); }
.status-in_pausa { background: var(--pause); color: var(--sun-ink); }
.status-in_pausa::before { content: "II"; width: auto; height: auto; background: none; font-size: 0.7rem; letter-spacing: -1px; }
.status-non_in_linea { background: var(--off); }
.status-non_in_linea::before { background: transparent; border: 2px solid #fff; box-sizing: border-box; }
.status-unknown { background: var(--sun); color: var(--sun-ink); }
.status-unknown::before { content: "?"; width: auto; height: auto; background: none; font-size: 0.85rem; }
.status-time { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.person-bio { color: var(--muted); font-size: 0.97rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.tags li { font-size: 0.82rem; font-weight: 700; padding: 3px 11px; border-radius: 999px; background: var(--bg-2); color: var(--primary-2); }
.hours { background: var(--bg); border-radius: 12px; padding: 10px 14px; font-size: 0.95rem; }
.hours strong { display: block; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary); margin-bottom: 2px; }
.empty {
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 24px; text-align: center; color: var(--muted);
  display: grid; gap: 12px; justify-items: center; background: var(--surface);
}
.notice { border: 1px solid #f5c26b; background: #fff6df; color: var(--ink); border-radius: 14px; padding: 12px 14px; font-size: 0.95rem; margin-bottom: 16px; }

/* ---------- come funziona */
.steps { display: grid; gap: 16px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.step {
  display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 16px; align-items: start; padding: 22px;
  border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line);
}
.step-num {
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-serif); font-weight: 700; font-size: 1.4rem; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 8px 18px -8px rgba(212, 20, 106, 0.8);
}
.step h3 { font-size: 1.18rem; margin-bottom: 4px; }
.step p { color: var(--muted); font-size: 0.97rem; }

/* ---------- pagamenti */
.pay-grid { display: grid; gap: 16px; margin-top: 26px; }
@media (min-width: 720px) { .pay-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pay-box { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 8px; box-shadow: var(--shadow); }
.pay-box h3 { font-size: 1.15rem; }

/* ---------- faq */
.faq { display: grid; gap: 10px; max-width: 50rem; margin-inline: auto; }
.faq details { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 4px 14px -10px rgba(142, 22, 112, 0.35); }
.faq summary { cursor: pointer; padding: 18px 20px; font-weight: 800; color: var(--plum); list-style: none; display: flex; justify-content: space-between; gap: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 20px 18px; color: var(--muted); }

/* ---------- barra di chiamata su smartphone */
.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  padding: 10px var(--gutter-r) calc(10px + env(safe-area-inset-bottom, 0px)) var(--gutter-l);
  background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -10px 30px -18px rgba(142, 22, 112, 0.6);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center;
}
.callbar .btn { min-height: 54px; }
.callbar strong { color: var(--plum); }
@media (min-width: 900px) { .callbar { display: none; } }

/* ---------- finestra di riepilogo */
dialog { border: 0; border-radius: 20px; background: var(--surface); color: var(--ink); padding: 0; width: min(440px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(44, 11, 39, 0.6); }
.dialog-body { padding: 24px; display: grid; gap: 14px; }
.summary-table { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.summary-table dt { color: var(--muted); }
.summary-table dd { margin: 0; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.pay-steps { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; }
.form-error { margin: 0; color: #b3123f; font-weight: 700; }
.form-error:empty { display: none; }

/* ---------- codice consulto dopo il pagamento */
.code-box {
  display: inline-grid; gap: 2px; margin: 18px 0 8px; padding: 16px 28px; border-radius: 18px;
  background: var(--surface); border: 2px dashed var(--primary); box-shadow: var(--shadow-lg);
}
.code-box small { text-transform: uppercase; letter-spacing: 0.12em; font-weight: 800; font-size: 0.75rem; color: var(--muted); }
.code-box strong { font-size: clamp(2.4rem, 9vw, 3.4rem); letter-spacing: 0.18em; color: var(--primary-2); font-variant-numeric: tabular-nums; line-height: 1.1; }
.esito-actions { max-width: 380px; margin-block: 16px; }

/* ---------- footer e pagine legali */
.site-footer { background: var(--plum); color: #f6e3ee; padding-block: 40px; margin-top: 24px; }
.site-footer .wrap { display: grid; gap: 18px; }
.site-footer .brand { color: #fff; }
.site-footer .muted { color: #d9bfd0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 0; }
.footer-links a { color: #fff; font-weight: 600; }
.legal { max-width: 46rem; display: grid; gap: 16px; }
.legal h1 { font-size: clamp(2rem, 7vw, 2.8rem); }
.legal h2 { font-size: 1.35rem; margin-top: 10px; }
.legal p, .legal li { color: var(--muted); }
.fill { background: #fff0c7; color: #8a4b00; padding: 0 6px; border-radius: 4px; font-weight: 700; }
.contact-list { display: grid; gap: 12px; list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.contact-list strong { display: block; font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary); }

/* schede più compatte: bio su tre righe, pulsanti affiancati */
.person-bio { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.person .card-actions { grid-template-columns: 1fr 1fr; }
.person .card-actions .call-note { grid-column: 1 / -1; }
.person .card-actions:not(:has(.btn + .btn)) .btn { grid-column: 1 / -1; }
.person .btn { min-height: 48px; padding-inline: 12px; font-size: 0.95rem; }

.person-code { display: block; font-size: 0.85rem; color: var(--muted); margin-top: 2px; letter-spacing: 0.02em; }
.person-code strong { color: var(--primary-2); font-variant-numeric: tabular-nums; }

/* medaglione con l'iniziale al posto della foto */
.portrait.is-medal { background: transparent; filter: drop-shadow(0 8px 14px rgba(61, 13, 58, 0.35)); }

/* menu: solo su schermi larghi, senza andare a capo */
.site-nav a { white-space: nowrap; }
@media (max-width: 1099px) { .site-nav { display: none; } }

/* più numeri per un'offerta, ognuno con la sua modalità */
.call-line { display: grid; gap: 4px; }
.btn-line { min-height: 60px; justify-content: flex-start; text-align: left; }
.btn-line span { display: grid; line-height: 1.15; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.btn-line small { font-size: 0.78rem; font-weight: 700; opacity: 0.9; letter-spacing: 0.01em; }
.call-line .call-note { margin: 0; }
@media (min-width: 900px) {
  .tcard-featured .card-actions { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; }
}
