/* FIR Officina e RENTRI per consulenti: stile dei mockup e delle schermate
   (partials/*.html). Si carica dopo style.css del motore (site.css in content.mjs).
   Lo stesso file sta in products/fir-officine e products/rentri-consulenti:
   se lo cambi in uno, copialo nell'altro. */

:root {
  --rr-green: #176857;      /* verde dell'app (tenant demo) */
  --rr-green-deep: #0e4d41;
  --rr-warn: #9a5b00;
  --rr-warn-bg: #fff4dc;
  --rr-danger: #b42318;
  --rr-danger-bg: #fdecea;
}

.mark { background: var(--rr-green); font-size: 10px; }
.ref-avatar { background: var(--rr-green); }
.ui-status .dot { background: var(--rr-green); }

/* ---------- Link alla procedura guidata, nella barra in fondo all'hero ---------- */
.hero-bar .bar-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 4px;
  color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-weight: 500;
}
.hero-bar .bar-link:hover { color: var(--accent-hover); }
.hero-bar .bar-link:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }

/* Nomi lunghi del prodotto in alcune lingue (es. fil, ha): il logo si accorcia, la barra non sborda */
.nav .brand { min-width: 0; }
.nav .brand span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Hero ---------- */
.rr-drop { width: 34px; height: 34px; border-radius: 9px; margin: 10px 0 6px; background: var(--accent-wash-strong); position: relative; }
.rr-drop::after { content: ""; position: absolute; left: 11px; top: 8px; width: 12px; height: 16px; background: #202020; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; }
.rr-state { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: #e7f0fb; color: #1f4f8f; }
.rr-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 12px; }
.rr-steps i { height: 4px; border-radius: 2px; background: #e6e6e8; }
.rr-steps i.on { background: var(--rr-green); }
.rr-line { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 12.5px; color: #4a4a4f; box-shadow: inset 0 -1px 0 #efeff1; }
.rr-line:last-child { box-shadow: none; }
.rr-due { flex: 0 0 auto; font-size: 11px; font-weight: 600; color: #1f4f8f; }
.rr-due.warn { color: var(--rr-warn); }
.rr-alert { background: var(--rr-danger-bg); box-shadow: inset 0 0 0 1px #f3c4bf, var(--shadow-float); }
.rr-alert .ui-meta { color: #7a2e26; }
.rr-ico-warn { background: var(--rr-danger); color: #fff; }

/* ---------- Pannelli delle sezioni split ---------- */
.rr-panel {
  display: grid; gap: 18px; justify-items: center; align-content: start;
  padding: 40px clamp(16px, 3vw, 40px); min-width: 0;
  background: var(--surface-raised); border-radius: var(--radius-lg); box-shadow: var(--stroke-hairline);
}
.rr-phones { display: flex; justify-content: center; gap: 20px; width: 100%; }
.rr-phone { margin: 0; flex: 0 1 280px; min-width: 0; }
.rr-phone .shot-phone { width: 100%; margin-inline: auto; }
.rr-shot { margin: 0; width: 100%; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 14px 36px rgba(0, 0, 0, .1), 0 1px 3px rgba(0, 0, 0, .06); }
.rr-shot img { display: block; width: 100%; height: auto; }
.rr-shot figcaption { font-size: 13px; color: #6b6b70; padding: 10px 14px; box-shadow: inset 0 1px 0 #efeff1; }
.rr-mail { width: 100%; max-width: 380px; justify-self: end; }
.rr-cta { justify-self: center; text-align: center; white-space: normal; }
.rr-note { font-size: 13px; line-height: 1.5; color: var(--content-muted); text-align: center; max-width: 34em; }

/* Stato del FIR lungo la filiera */
.rr-track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: 100%; max-width: 440px; counter-reset: rr; }
.rr-track li { position: relative; padding-top: 14px; font-size: 12.5px; text-align: center; color: var(--content-muted); }
.rr-track li::before { content: ""; position: absolute; top: 0; inset-inline: 0; height: 5px; border-radius: 3px; background: var(--surface-strong, #e2e2e4); }
.rr-track li.done::before { background: var(--rr-green); }
.rr-track li.now::before { background: var(--accent); }
.rr-track li.done, .rr-track li.now { color: var(--content-strong); font-weight: 500; }

/* Demo: schermata vera dentro la cornice del browser */
.rr-browser { max-width: 1040px; margin-inline: auto; }
.rr-browser > img { display: block; width: 100%; height: auto; }
.rr-browser figcaption { font-size: 14px; color: var(--content-muted); padding: 12px 16px; box-shadow: inset 0 1px 0 var(--divider); }

/* Bacheca dei clienti (RENTRI per consulenti) */
.rr-clients { width: 100%; max-width: 440px; }
.rr-clients .rr-line { align-items: center; font-size: 13px; padding: 9px 0; }
.rr-clients .rr-line strong { font-weight: 500; color: #202020; }
.rr-ok { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: #e3f4ea; color: #1d6b43; flex: 0 0 auto; }
.rr-ko { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--rr-warn-bg); color: var(--rr-warn); flex: 0 0 auto; }

/* White label: due studi inventati */
.rr-brands { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; width: 100%; }
.rr-brand { border-radius: 16px; overflow: hidden; background: #fff; color: #202020; box-shadow: 0 14px 36px rgba(0, 0, 0, .1), 0 1px 3px rgba(0, 0, 0, .06); min-width: 0; }
.rr-brand-top { display: flex; align-items: center; gap: 8px; padding: 12px 14px; color: #fff; font-weight: 500; font-size: 13px; }
.rr-brand-top .mark { background: rgba(255, 255, 255, .2); }
.rr-brand-a .rr-brand-top { background: #145b56; }
.rr-brand-b .rr-brand-top { background: #3b3f8c; }
.rr-brand-body { padding: 12px 14px 14px; display: grid; gap: 8px; font-size: 12.5px; }
.rr-brand-btn { border-radius: 8px; padding: 8px; text-align: center; color: #fff; font-weight: 500; }
.rr-brand-a .rr-brand-btn { background: #145b56; }
.rr-brand-b .rr-brand-btn { background: #3b3f8c; }
.rr-brand .ui-meta { overflow-wrap: anywhere; }

/* ---------- Prezzi ---------- */
@media (min-width: 961px) {
  /* due piani (FIR Officina) o uno solo (consulenti): niente colonna vuota */
  .plans:has(> .plan:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; margin-inline: auto; }
  .plans:has(> .plan:only-child) { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin-inline: auto; }
}

@media (max-width: 960px) {
  .rr-mail { justify-self: stretch; max-width: none; }
}
@media (max-width: 720px) {
  .rr-panel { padding: 24px 12px; }
  .rr-phones { gap: 12px; }
  .rr-brands { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Hero: carte e foto lontane da kicker, titolo e pulsanti ----------
   Su 2000x1000, 1440x900 e 1280x720 alcune carte del motore finivano sopra il
   kicker, il titolo o "Entra nella demo" e una foto copriva la lingua nella barra.
   Il nav resta sempre sopra lo stage (lo stage e' isolato nel suo livello). */
.hero-sticky { isolation: isolate; }
.stage { z-index: 0; }
.nav { z-index: 80; }
[data-hero="kicker"] { position: relative; z-index: 6; display: inline-block; padding: 5px 12px; border-radius: 999px; background: rgba(24, 24, 24, .86); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@media (min-width: 721px) {
  .c5  { --x: -30vw; --y: -35vh; }
  .c9  { --x: 30vw;  --y: -38vh; }
  .c6  { --x: 28vw;  --y: 43vh; }
  .c10 { --x: -33vw; --y: 42vh; }
  /* le carte lontane (z negativo) si avvicinano al centro per la prospettiva: x piu' ampie */
  .ph1 { --x: -37vw; --y: 4vh; }
  .ph2 { --x: 38vw;  --y: -2vh; }
  .ph3 { --x: 44vw;  --y: -26vh; }
}
/* Schermi bassi (1280x720 e simili): titolo e sottotitolo occupano quasi tutta
   l'altezza, le carte laterali si rimpiccioliscono e si allargano verso i bordi. */
@media (min-width: 721px) and (max-height: 800px) {
  .c1 { --x: -36vw; --sc: .8; }
  .c2 { --x: 37vw; --sc: .8; }
  .c3 { --x: -38vw; --sc: .8; }
  .c4 { --x: 37vw; --sc: .8; }
}
/* Sotto i 1600 px le due foto centrali toccano il titolo: si tolgono. */
@media (min-width: 721px) and (max-width: 1599px) {
  .ph1, .ph2 { display: none; }
}
@media (max-width: 720px) {
  .c5, .c6 { display: none; }
  .c1 { --y: -37vh; --sc: .5; }
  .c2 { --y: -37vh; --sc: .5; }
  .c3 { --y: 38vh; }
  .c4 { --y: 37vh; }
}
