/* Base comune a landing e demo privata: token delle varianti, vetro, controlli, cornice dell'iPhone, sezione migrazione.
   Stesso design dell'app di Vesica (code/vesica-replica/web/src/liquid-glass.css) con i colori di Architect Flow. */

/* 1. Token per variante ---------------------------------------------------- */
[data-variant="a"] .af-app {
  --lg-ink: #14213D; --lg-deep: #1F55C7; --lg-violet: #2F6FED; --lg-accent: #F5F3EE;
  --foreground: #14213D; --muted: #EEF1F7; --muted-foreground: #5B6170; --border: #E1E5EE;
  --c-ing: #2F6FED; --c-egr: #DC2626; --c-prev: #BCC2CF;
  --t-obra: #14213D; --t-ante: #2F6FED; --t-doc: #7FA6F5; --t-reb: #C8CCD6;
  --soft-deep: rgba(31, 85, 199, .10); --glass-shadow: #14213D17;
  --sidebar: linear-gradient(150deg, #14213Df5, #1F3F8Ce6 68%, #2F6FEDeb);
  --lg-backdrop:
    radial-gradient(ellipse at 88% 2%, #ffffffb3, transparent 42%),
    radial-gradient(ellipse at 6% 96%, #7FA6F566, transparent 46%),
    radial-gradient(ellipse at 28% 8%, #C9D6F25c, transparent 40%),
    radial-gradient(ellipse at 70% 75%, #2F6FED29, transparent 45%),
    #F5F3EE;
}
[data-variant="b"] .af-app {
  --lg-ink: #2E2E2B; --lg-deep: #9A4322; --lg-violet: #B4532A; --lg-accent: #F2EEE6;
  --foreground: #3A3A37; --muted: #EDE6DA; --muted-foreground: #5F5D57; --border: #E3DACB;
  --c-ing: #B4532A; --c-egr: #8C8577; --c-prev: #D2C9B9;
  --t-obra: #3A3A37; --t-ante: #B4532A; --t-doc: #E08A63; --t-reb: #D9CBB3;
  --soft-deep: rgba(154, 67, 34, .10); --glass-shadow: #3A3A3717;
  --sidebar: linear-gradient(150deg, #2E2E2Bf5, #3A3A37e6 58%, #9A4322eb);
  --lg-backdrop:
    radial-gradient(ellipse at 88% 2%, #ffffffb3, transparent 42%),
    radial-gradient(ellipse at 6% 96%, #E08A6359, transparent 46%),
    radial-gradient(ellipse at 28% 8%, #D9CBB370, transparent 40%),
    radial-gradient(ellipse at 70% 75%, #B4532A24, transparent 45%),
    #F2EEE6;
}
.af-app {
  --glass-surface: linear-gradient(145deg, #ffffffd4, #ffffff8f);
  --glass-edge: #ffffffeb; --glass-highlight: #ffffffcc; --radius-card: 23px; --rojo: #DC2626;
  color: var(--foreground); font-family: var(--f-body); font-size: 14px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; text-align: left;
}
.af-app *, .af-app *::before, .af-app *::after { box-sizing: border-box; }
:where(.af-app) button { font: inherit; color: inherit; }
.af-app :focus-visible { outline: 2px solid var(--lg-deep); outline-offset: 2px; }

/* 2. Superfici e controlli (come .lg-glass, .lg-field, Button, Kpi, Badge) */
.af-glass {
  border: 1px solid var(--glass-edge); border-radius: var(--radius-card);
  background: var(--glass-surface);
  box-shadow: inset 0 1px 0 var(--glass-highlight), 0 8px 28px var(--glass-shadow);
  backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%);
}
.af-lift { transition: transform .3s ease; }
.af-lift:hover { transform: translateY(-4px); }
.af-data { background: #fff; border-radius: 14px; }
.af-field {
  border: 1px solid #ffffffd9; border-radius: 13px; padding: 7px 11px; font-size: 14px;
  background: linear-gradient(180deg, #ffffffc7, #ffffff5c);
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px #ffffff4d, 0 6px 18px var(--glass-shadow);
}
.af-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 16px;
  border-radius: 999px; border: 0; cursor: pointer; font-weight: 500; font-size: 13px; white-space: nowrap;
  background: var(--lg-deep); color: var(--lg-accent); box-shadow: inset 0 1px 0 #ffffff33;
}
.af-btn.outline { background: #ffffffb3; color: var(--foreground); border: 1px solid var(--border); box-shadow: none; }
.af-btn.ghost { background: transparent; color: var(--foreground); box-shadow: none; }
.af-btn.sm { height: 30px; padding: 0 12px; font-size: 12px; }
.af-label { font-size: 10px; line-height: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-foreground); }
.af-kpi b { display: block; margin-top: 2px; font-size: 16px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.af-kpi small { display: block; font-size: 12px; color: var(--muted-foreground); }
.af-title { font-size: 14px; font-weight: 600; }
.af-h1 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.af-muted { color: var(--muted-foreground); }
.af-pos { color: #047857; } .af-neg { color: var(--rojo); }
.af-bar { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.af-bar.thin { height: 6px; }
.af-bar > i { display: block; height: 100%; border-radius: 999px; transform-origin: left; background: var(--c-ing); }
.af-badge { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--border); font-size: 12px; font-weight: 600; white-space: nowrap; }
.af-badge.ejec { background: var(--lg-deep); border-color: var(--lg-deep); color: var(--lg-accent); }
.af-badge.term { background: var(--lg-ink); border-color: var(--lg-ink); color: var(--lg-accent); }
.af-badge.ante { background: var(--soft-deep); border-color: transparent; }
.af-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.af-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
/* prima che la demo entri nello schermo: quello che si anima parte nascosto (lo toglie demo.js) */
.af-pre [data-reveal], .af-pre [data-bar], .af-pre [data-grow], .af-pre [data-dot], .af-pre [data-line] { opacity: 0; }
.af-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; }
.af-legend span { display: inline-flex; align-items: center; gap: 6px; }
.af-av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--lg-accent); color: var(--lg-deep); flex-shrink: 0; }
.af-mano { display: inline-block; transform-origin: 70% 80%; animation: af-saludo 1.6s ease-in-out .5s both; }
@keyframes af-saludo { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(16deg); } 20%, 40% { transform: rotate(-10deg); } 50% { transform: rotate(10deg); } }

.af-hero { padding: 18px; border-radius: 34px; background: var(--lg-backdrop); box-shadow: 0 30px 70px -30px rgba(20, 20, 30, .35); }

/* 6. Telefoni ---------------------------------------------------------------- */
.af-phones { display: grid; gap: 40px 28px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 40px; justify-items: center; }
.af-phone-col { width: 100%; max-width: 330px; }
.af-phone-col > h3 { margin-bottom: 6px; }
.af-phone-col > p { color: var(--muted); font-size: 16px; min-height: 3.2em; }
.af-iphone { position: relative; width: 292px; height: 600px; margin: 18px auto 0; padding: 11px; border-radius: 54px;
  background: linear-gradient(145deg, #4a4a4e, #1f1f22 30%, #3b3b3f 70%, #18181a);
  box-shadow: inset 0 0 0 1.5px #6d6d72, inset 0 0 0 4px #0d0d0f, 0 40px 70px -20px rgba(0, 0, 0, .45); }
.af-iphone::before, .af-iphone::after { content: ''; position: absolute; width: 3px; border-radius: 2px; background: #2a2a2d; }
.af-iphone::before { left: -3px; top: 116px; height: 30px; box-shadow: 0 50px 0 0 #2a2a2d, 0 100px 0 0 #2a2a2d; }
.af-iphone::after { right: -3px; top: 168px; height: 64px; }
.af-screen { position: relative; height: 100%; overflow: hidden; border-radius: 44px; background: var(--lg-backdrop); }

/* 9. Migrazione dei dati (sezione «Traemos todo lo que tenés hoy») ---------- */
.af-migra-src { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.af-migra-src > div { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 16px; font-size: 13px; }
.af-migra-src i { font-size: 18px; color: var(--muted-foreground); }
.af-migra-flecha { display: flex; flex-direction: column; align-items: center; margin: 4px 0; color: var(--lg-deep); }
.af-migra-flecha span { display: block; width: 2px; height: 22px; background: var(--lg-deep); transform-origin: top; }
.af-migra-flecha i { font-size: 20px; margin-top: -6px; }
.af-migra-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; font-size: 13px; }
.af-migra-rows > div { display: flex; justify-content: space-between; gap: 8px; }
.af-migra-rows b { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  .af-app *, .af-app *::before, .af-app *::after { transition: none !important; animation: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .af-glass, .af-field, .af-menu { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
