/* ============================================================
   FLWLESS — Design System
   ============================================================ */

:root {
  /* Palette */
  --bg:           #0A0A0B;   /* nero profondo */
  --bg-alt:       #0E0E10;   /* sezioni alternate */
  --surface:      #141416;   /* card */
  --surface-2:    #1A1A1D;   /* card hover / nested */
  --border:       rgba(255,255,255,0.08);
  --border-soft:  rgba(255,255,255,0.05);

  --text:         #F4F3F1;   /* off-white */
  --text-muted:   #9A9A9F;   /* grigio */
  --text-dim:     #6A6A70;   /* grigio scuro */

  /* Accento arancione premium */
  --accent:       #FF7A1A;
  --accent-soft:  #FFA45C;
  --accent-deep:  #D45E00;
  --accent-glow:  rgba(255,122,26,0.16);

  /* Tipografia */
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Inter Tight', 'Inter', sans-serif;

  /* Layout */
  --maxw: 1040px;
  --gap: clamp(1rem, 3vw, 2rem);
  --radius: 18px;
  --radius-sm: 12px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }

html { background: var(--bg); }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ---------- Sfondo globale: gradiente + grana (sotto a tutto) ---------- */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(120% 75% at 50% -8%, rgba(255,122,26,0.07), transparent 55%),
    radial-gradient(90% 60% at 100% 102%, rgba(255,122,26,0.05), transparent 55%),
    linear-gradient(180deg, #0C0C0E 0%, #0A0A0B 45%, #08080A 100%);
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.25rem, 5vw, 2.5rem); }
.container--narrow { max-width: 820px; }

.section { padding: clamp(2.8rem, 6vw, 5rem) 0; position: relative; }
.section--alt { background: var(--bg-alt); }

.section__head { max-width: 720px; margin: 0 auto clamp(1.6rem, 3vw, 2.6rem); text-align: center; }
.section__head--left { max-width: 720px; margin-inline: 0; text-align: left; }
.section__lead { color: var(--text-muted); font-size: 1.1rem; margin-top: 1rem; }

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; }

h1 { font-size: clamp(2.4rem, 6.5vw, 4.6rem); }
h2 { font-size: clamp(2rem, 5vw, 3.4rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); font-weight: 700; }

.eyebrow {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 1.1rem;
}

.accent { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; font-weight: 600; font-size: 0.95rem;
  padding: 0.8rem 1.5rem; border-radius: 12px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}
.btn--lg { padding: 1rem 1.9rem; font-size: 1rem; }

.btn--solid { background: var(--text); color: #0A0A0B; }
.btn--solid:hover { transform: translateY(-2px); background: #fff; }

.btn--ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s;
}
.nav.is-scrolled {
  background: rgba(10,10,11,0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: var(--border-soft);
}
.nav__inner {
  max-width: var(--maxw); margin-inline: auto;
  padding: 1rem clamp(1.25rem, 5vw, 2.5rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav__logo { display: flex; align-items: center; }
.nav__logo img { height: 24px; width: auto; display: block; }

.nav__links { display: flex; gap: 2rem; }
.nav__links a { font-size: 0.95rem; color: var(--text-muted); transition: color 0.2s; position: relative; white-space: nowrap; }
.nav__links a:hover { color: var(--text); }
.nav__links a::after {
  content: ''; position: absolute; left: 0; bottom: -4px; width: 0; height: 1px;
  background: var(--accent); transition: width 0.25s var(--ease);
}
.nav__links a:hover::after { width: 100%; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--text); transition: 0.3s var(--ease); }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile {
  display: none; flex-direction: column; gap: 1.2rem; padding: 1.5rem clamp(1.25rem, 5vw, 2.5rem) 2rem;
  background: rgba(10,10,11,0.96); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.nav__mobile a:not(.btn) { color: var(--text); font-size: 1.05rem; }
.nav__mobile .btn { margin-top: 0.4rem; }   /* il pulsante mantiene i suoi colori (pill bianco, testo nero) */
.nav__mobile.is-open { display: flex; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; padding: clamp(3.5rem, 9vw, 6rem) 0 clamp(2.4rem, 5vw, 4rem); text-align: center; overflow: hidden; }
.hero__glow {
  position: absolute; top: -10%; left: 50%; transform: translateX(-50%);
  width: min(900px, 110vw); height: 600px;
  background: radial-gradient(ellipse at center, var(--accent-glow), transparent 65%);
  filter: blur(20px); pointer-events: none; z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero__title { max-width: 20ch; margin-inline: auto; text-wrap: balance; }
.hero__title .accent { white-space: nowrap; }
.hero__sub { max-width: 60ch; margin: 1.8rem auto 0; color: var(--text-muted); font-size: clamp(1.02rem, 1.6vw, 1.18rem); }
.hero__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2.4rem; }
.hero__meta { margin-top: 2.2rem; color: var(--text-dim); font-size: 0.85rem; letter-spacing: 0.04em; }

/* ============================================================
   RISULTATI
   ============================================================ */
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  border: 1px solid var(--border); border-radius: var(--radius);
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(255,122,26,0.12), transparent 50%),
    linear-gradient(180deg, var(--surface), rgba(20,20,22,0.4));
  padding: clamp(1.5rem, 3vw, 2.5rem);
}
.stat { text-align: center; }
.stat__num { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 4.5vw, 3rem); color: var(--accent); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat__label { display: block; color: var(--text-muted); font-size: 0.85rem; margin-top: 0.4rem; }

.cases__intro { text-align: center; color: var(--text-muted); font-size: 1.1rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.case {
  background: linear-gradient(150deg, rgba(255,122,26,0.10), rgba(255,122,26,0.02) 45%, var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem; transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s;
}
.case:hover { transform: translateY(-4px); border-color: transparent; background: linear-gradient(150deg, rgba(255,122,26,0.16), rgba(255,122,26,0.04) 45%, var(--surface-2)); }
.case__head { display: flex; flex-direction: column; gap: 0.2rem; margin-bottom: 1.3rem; }
.case__name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.case__tag { color: var(--text-dim); font-size: 0.82rem; }
.case__numbers { display: flex; align-items: center; gap: 1rem; }
.case__numbers > div { display: flex; flex-direction: column; }
.case__before { color: var(--text-muted); font-size: 1.1rem; }
.case__after { color: var(--text); font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; }
.case__cap { font-size: 0.7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.1em; }
.case__arrow { color: var(--accent); font-size: 1.2rem; }
.case__foot { margin-top: 1.3rem; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.case__time { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.85rem; border-radius: 100px; font-weight: 600; font-size: 0.88rem; color: var(--text-muted); background: rgba(255,255,255,0.05); border: 1px solid var(--border); }
.case__time::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--text-dim); flex-shrink: 0; }

/* ============================================================
   IL PROBLEMA
   ============================================================ */
.problems { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.problem {
  background: linear-gradient(150deg, rgba(226,66,62,0.22), rgba(226,66,62,0.05) 45%, var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem 1.7rem; transition: transform 0.3s var(--ease), border-color 0.3s;
}
.problem:hover { transform: translateY(-4px); border-color: transparent; }
.problem__icon { display: inline-flex; color: var(--text); margin-bottom: 1rem; }
.problem__icon svg { width: 32px; height: 32px; opacity: 0.9; }
.problem h3 { margin-bottom: 0.8rem; }
.problem p { color: var(--text-muted); font-size: 0.98rem; }

/* ============================================================
   COME LAVORIAMO — WAYS
   ============================================================ */
.ways { display: flex; flex-direction: column; gap: 1.2rem; margin-bottom: clamp(2.4rem, 5vw, 4rem); }
.way {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(1.8rem, 3.5vw, 2.6rem); transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.way:hover { border-color: rgba(255,255,255,0.14); }
.way--featured { border-color: transparent; background: linear-gradient(180deg, rgba(255,122,26,0.06), var(--surface) 40%); }
.way__badge {
  position: absolute; top: -12px; left: clamp(1.8rem, 3.5vw, 2.6rem); z-index: 3;
  background: var(--accent); color: #0A0A0B; font-size: 0.74rem; font-weight: 700;
  padding: 0.3rem 0.85rem; border-radius: 100px; letter-spacing: 0.02em;
}
.way__idx { font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; color: var(--text-dim); line-height: 1; }
.way__name { margin: 0.85rem 0 0.3rem; }
.way__label { text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.72rem; color: var(--accent); margin: 0 0 1.15rem; font-weight: 600; }
.way__highlight {
  background: none; border-left: 0; padding: 0; border-radius: 0;
  font-weight: 600; color: var(--text); margin-bottom: 0.9rem; font-size: 1.05rem;
}
.way__desc { color: var(--text-muted); font-size: 0.98rem; }
.way__include { display: flex; flex-direction: column; gap: 1rem; }
.way__include li { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem; align-items: start; color: var(--text-muted); font-size: 0.95rem; }
.way__include li::before { content: none; }
.way__include li > div { min-width: 0; }
.way__include strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 0.15rem; }
.li-ico {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--text); margin-top: 0.15rem;
}
.li-ico svg { width: 19px; height: 19px; opacity: 0.85; }

/* ---------- Il processo ---------- */
.process__grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 1.5rem; margin-top: 1.6rem; }
.process__list { display: flex; flex-direction: column; gap: 0.4rem; border-left: 1px solid var(--border); }
.process__step {
  display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 1.2rem;
  cursor: pointer; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-left: -1px; border-left: 2px solid transparent; transition: 0.3s var(--ease);
}
.process__step:hover { background: rgba(255,122,26,0.05); }
.process__step.is-active { background: linear-gradient(90deg, rgba(255,122,26,0.16), rgba(255,122,26,0.03) 70%, transparent); border-left-color: var(--accent); }
.process__num { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--text-dim); transition: color 0.3s; }
.process__step.is-active .process__num { color: var(--accent); }
.process__step strong { display: block; font-size: 1.02rem; }
.process__step span { display: block; color: var(--text-muted); font-size: 0.9rem; }

.process__detail {
  background:
    radial-gradient(120% 130% at 0% 0%, rgba(255,122,26,0.14), transparent 48%),
    linear-gradient(160deg, var(--surface), rgba(20,20,22,0.3));
  border: 1px solid transparent; border-radius: var(--radius);
  padding: clamp(1.8rem, 3.5vw, 2.8rem); display: flex; flex-direction: column; justify-content: center;
}
.process__detail .pd__num { font-family: var(--font-display); font-weight: 800; font-size: 4rem; color: rgba(255,122,26,0.25); line-height: 1; }
.process__detail .pd__title { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; margin: 0.5rem 0 1rem; }
.process__detail .pd__text { color: var(--text-muted); font-size: 1.02rem; }
.process__detail .pd__meta { margin-top: 1.4rem; display: inline-block; align-self: flex-start; padding: 0.4rem 0.9rem; border-radius: var(--radius-sm); font-size: 0.82rem; font-weight: 600; color: var(--accent); background: rgba(255,122,26,0.12); border: 1px solid rgba(255,122,26,0.35); }
.pd-fade { animation: pdFade 0.4s var(--ease); }
@keyframes pdFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ============================================================
   PROBLEMA VS SOLUZIONE
   ============================================================ */
.vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.8rem 0.9rem; align-items: stretch; }
.vs__head { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; padding-bottom: 0.4rem; }
.vs__head--problem { color: #e8807d; }
.vs__head--solution { color: #45d39a; }
.vs__head--spacer { padding: 0; }
.vs__row { display: contents; }
.vs__cell {
  display: flex; gap: 0.8rem; align-items: center;
  padding: 1.1rem 1.3rem; border-radius: var(--radius-sm); font-size: 0.98rem;
}
.vs__cell--problem {
  background: linear-gradient(120deg, rgba(224,72,68,0.14), rgba(224,72,68,0.03) 70%, var(--surface));
  border: 1px solid rgba(224,72,68,0.22); color: var(--text-muted);
}
.vs__cell--solution {
  background: linear-gradient(120deg, rgba(38,200,138,0.14), rgba(38,200,138,0.03) 70%, var(--surface));
  border: 1px solid rgba(38,200,138,0.26); color: var(--text);
}
.vs__mark {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 1.4rem; font-size: 1.25rem; font-weight: 700; line-height: 1;
}
.vs__mark--x { color: #e8807d; }
.vs__mark--check { color: #45d39a; }
.vs__arrow {
  display: flex; align-items: center; justify-content: center;
  align-self: center; color: var(--text-muted); width: 26px;
}
.vs__arrow svg { width: 22px; height: 22px; animation: arrowNudge 1.8s var(--ease) infinite; }

/* ============================================================
   CLIENTE IDEALE
   ============================================================ */
.ideal {
  display: grid; grid-template-columns: 1fr 1fr;
  column-gap: clamp(2rem, 5vw, 4rem); row-gap: 1rem; position: relative;
  background: linear-gradient(135deg, rgba(255,122,26,0.09), rgba(255,122,26,0.02) 50%, var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(2rem, 4vw, 3.2rem);
}
.ideal::before {
  content: ''; position: absolute; left: 50%; width: 1px; background: var(--border);
  top: clamp(2rem, 4vw, 3.2rem); bottom: clamp(2rem, 4vw, 3.2rem);
}
.ideal__title { font-family: var(--font-display); margin-bottom: 0.4rem; }
.ideal__cell { color: var(--text-muted); padding-left: 1.6rem; position: relative; }
.ideal__cell::before { content: '›'; position: absolute; left: 0; top: 0; color: var(--accent-soft); font-weight: 700; font-size: 1.05em; }
.ideal__cell--want { color: var(--text); }
.ideal__cell--want::before { content: '✓'; color: var(--accent); font-size: 1em; }

/* ============================================================
   FAQ
   ============================================================ */
.faq { display: flex; flex-direction: column; gap: 0.8rem; }
.faq__item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; transition: border-color 0.3s; }
.faq__item[open] { border-color: transparent; }
.faq__item summary {
  list-style: none; cursor: pointer; padding: 1.3rem 1.5rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.08rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: '+'; font-size: 1.5rem; color: var(--accent); transition: transform 0.3s var(--ease); flex-shrink: 0; }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__body { padding: 0 1.5rem 1.4rem; color: var(--text-muted); }

/* ============================================================
   CTA FINALE
   ============================================================ */
.cta { position: relative; text-align: center; padding: clamp(3.4rem, 7vw, 5.5rem) 0; overflow: hidden; }
.cta__glow {
  position: absolute; bottom: -40%; left: 50%; transform: translateX(-50%);
  width: min(800px, 110vw); height: 600px;
  background: radial-gradient(ellipse at center, var(--accent-glow), transparent 65%); filter: blur(20px);
}
.cta .container { position: relative; z-index: 1; }
.cta__title { margin-bottom: 2.2rem; }
.cta__note { margin-top: 1.4rem; color: var(--text-dim); font-size: 0.9rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--border); padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; }
.footer__inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding-bottom: 2.5rem; }
.footer__logo { display: inline-block; }
.footer__logo img { height: 30px; width: auto; display: block; }
.footer__brand p { color: var(--text-muted); font-size: 0.92rem; margin-top: 0.6rem; }
.footer__nav { display: flex; gap: 1.8rem; flex-wrap: wrap; align-items: flex-start; }
.footer__nav a { color: var(--text-muted); font-size: 0.95rem; transition: color 0.2s; }
.footer__nav a:hover { color: var(--accent); }
.footer__bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1.8rem; border-top: 1px solid var(--border-soft); color: var(--text-dim); font-size: 0.82rem; }

/* ============================================================
   FLOWLINE — bordo con luce che scorre nel perimetro
   ============================================================ */
@property --flow-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.flowline { position: relative; isolation: isolate; }
.flowline::after {
  content: ''; position: absolute; inset: 0;
  border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from var(--flow-angle),
      rgba(255,122,26,0.10) 0deg,
      rgba(255,122,26,0.10) 200deg,
      rgba(255,164,92,0.40) 270deg,
      var(--accent) 318deg, var(--accent-soft) 344deg,
      rgba(255,122,26,0.10) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: flowRotate 5.5s linear infinite;
  pointer-events: none; z-index: 2;
}
@keyframes flowRotate { to { --flow-angle: 360deg; } }

/* le case card mostrano la linea SOLO all'hover */
.case.flowline::after { opacity: 0; animation-play-state: paused; transition: opacity 0.35s var(--ease); }
.case.flowline:hover::after { opacity: 1; animation-play-state: running; }

/* le FAQ mostrano la linea SOLO quando aperte */
.faq__item.flowline::after { opacity: 0; animation-play-state: paused; transition: opacity 0.35s var(--ease); }
.faq__item.flowline[open]::after { opacity: 1; animation-play-state: running; }

/* i box del problema mostrano la linea SOLO all'hover */
.problem.flowline::after { opacity: 0; animation-play-state: paused; transition: opacity 0.35s var(--ease); }
.problem.flowline:hover::after { opacity: 1; animation-play-state: running; }

/* Il problema — tinta rossa (stesso gradiente/stile dell'arancione) + titolo su una riga */
#problema .eyebrow { color: #ec5953; }
#problema .section__head { max-width: none; }
#problema .section__head h2 { white-space: nowrap; font-size: clamp(1.5rem, 4vw, 2.7rem); }
#problema .problem.flowline::after {
  background: conic-gradient(from var(--flow-angle),
      rgba(224,72,68,0.10) 0deg, rgba(224,72,68,0.10) 200deg,
      rgba(232,128,125,0.42) 270deg, #e04844 318deg, #e8807d 344deg,
      rgba(224,72,68,0.10) 360deg);
}

/* ============================================================
   PULSE — respiro leggero sui CTA di prenotazione
   ============================================================ */
@keyframes pulseBreathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,122,26,0.0); transform: scale(1); }
  50%      { box-shadow: 0 10px 36px -6px rgba(255,122,26,0.6); transform: scale(1.035); }
}
.pulse { animation: pulseBreathe 2.6s var(--ease) infinite; will-change: transform; }
.pulse:hover { animation-play-state: paused; }

/* I CTA della chiamata: all'hover diventano "vuoti" (sfondo trasparente) con
   la linea dinamica arancione che scorre nel bordo + testo arancione */
.btn--solid.pulse { position: relative; isolation: isolate; }
.btn--solid.pulse::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.6px;
  background: conic-gradient(from var(--flow-angle),
      rgba(255,122,26,0.10) 0deg, rgba(255,122,26,0.10) 200deg,
      rgba(255,164,92,0.45) 270deg, var(--accent) 318deg, var(--accent-soft) 344deg,
      rgba(255,122,26,0.10) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.3s var(--ease);
  animation: flowRotate 4s linear infinite; animation-play-state: paused;
  pointer-events: none; z-index: 2;
}
.btn--solid.pulse:hover { background: transparent; color: var(--accent); }
.btn--solid.pulse:hover::after { opacity: 1; animation-play-state: running; }

/* ============================================================
   DIVIDER — linea + freccetta tra i capitoli
   ============================================================ */
.divider {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  padding: clamp(0.4rem, 1.2vw, 0.9rem) 0;
}
.divider::before {
  content: ''; width: min(var(--maxw), 88vw); height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.10) 12%, rgba(255,255,255,0.10) 88%, transparent);
}
.divider--inset { padding-top: clamp(1.6rem, 3.5vw, 3rem); }
.divider--inset::before { width: 100%; }
.divider__chev {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  color: var(--text-muted); transition: color 0.25s var(--ease), background 0.25s;
}
.divider__chev svg { width: 20px; height: 20px; animation: chevBounce 2s var(--ease) infinite; }
.divider__chev:hover { color: var(--accent); }
@keyframes chevBounce {
  0%, 100% { transform: translateY(-2px); opacity: 0.7; }
  50%      { transform: translateY(3px); opacity: 1; }
}
@keyframes arrowNudge {
  0%, 100% { transform: translateX(-2px); opacity: 0.75; }
  50%      { transform: translateX(3px); opacity: 1; }
}

/* ============================================================
   FLOATING CTA — sempre visibile in basso a destra
   ============================================================ */
.float-cta {
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem);
  z-index: 90; display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1.3rem; border-radius: 12px;
  background: var(--text); color: #0A0A0B; font-weight: 600; font-size: 0.92rem;
  box-shadow: 0 10px 30px -8px rgba(0,0,0,0.6);
  transform: translateY(18px); opacity: 0; pointer-events: none; isolation: isolate;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease), background 0.25s, color 0.25s, box-shadow 0.25s;
}
.float-cta.is-visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.float-cta::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.6px;
  background: conic-gradient(from var(--flow-angle),
      rgba(255,122,26,0.10) 0deg, rgba(255,122,26,0.10) 200deg,
      rgba(255,164,92,0.45) 270deg, var(--accent) 318deg, var(--accent-soft) 344deg,
      rgba(255,122,26,0.10) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.3s var(--ease);
  animation: flowRotate 4s linear infinite; animation-play-state: paused;
  pointer-events: none; z-index: 2;
}
.float-cta:hover { background: transparent; color: var(--accent); box-shadow: none; }
.float-cta:hover::after { opacity: 1; animation-play-state: running; }
.float-cta__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(255,122,26,0.5); animation: dotPing 2s var(--ease) infinite; }
@keyframes dotPing {
  0%   { box-shadow: 0 0 0 0 rgba(255,122,26,0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(255,122,26,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,122,26,0); }
}

/* ============================================================
   PROCESS — chip parole chiave nel dettaglio
   ============================================================ */
.pd__keys { display: flex; flex-direction: column; align-items: flex-start; gap: 0.45rem; margin-top: 1.4rem; }
.pd__key {
  display: inline-flex; align-items: center;
  font-size: 0.82rem; font-weight: 600; color: var(--accent);
  padding: 0.34rem 0.85rem; border-radius: 100px;
  border: 1px solid rgba(255,122,26,0.35); background: rgba(255,122,26,0.12);
}

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal.reveal--noanim { transition: none !important; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .pulse, .flowline::after, .btn--solid.pulse::after, .float-cta::after, .divider__chev svg, .vs__arrow svg, .float-cta__dot { animation: none !important; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .cases, .problems { grid-template-columns: repeat(2, 1fr); }
  .stats { gap: 1.5rem; }
  .way { grid-template-columns: 1fr; gap: 1.4rem; }
  .process__grid { grid-template-columns: 1fr; }
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: flex; }
}

@media (max-width: 680px) {
  .cases, .problems { grid-template-columns: 1fr; }
  .vs { grid-template-columns: 1fr; gap: 0.5rem; }
  .vs__head { display: none; }
  .vs__cell--problem { margin-top: 0.4rem; }
  .vs__arrow { width: auto; padding: 0.1rem 0; }
  .vs__arrow svg { transform: rotate(90deg); animation: arrowNudgeV 1.8s var(--ease) infinite; }
  .ideal { grid-template-columns: 1fr; }
  .ideal::before { display: none; }
  .ideal__title--who { order: 0; }
  .ideal__cell--who { order: 1; }
  .ideal__title--want { order: 2; margin-top: 1.5rem; }
  .ideal__cell--want { order: 3; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .hero__title { max-width: 16ch; }
  .hero__title .accent { white-space: normal; }
  .float-cta { right: 0.8rem; left: 0.8rem; bottom: 0.8rem; justify-content: center; }
  #problema .section__head h2 { white-space: normal; font-size: clamp(2rem, 7vw, 2.6rem); }
}

@keyframes arrowNudgeV {
  0%, 100% { transform: rotate(90deg) translateX(-2px); opacity: 0.75; }
  50%      { transform: rotate(90deg) translateX(3px); opacity: 1; }
}

/* ============================================================
   WALL RISULTATI — marquee di mockup profilo (prima → dopo)
   ============================================================ */
.cases-marquee {
  position: relative;
  width: min(1500px, calc(100% - 2 * clamp(1.25rem, 5vw, 2.5rem)));  /* più largo del corpo (1040) ma non full-bleed */
  margin: clamp(2rem, 4vw, 3rem) auto 0;
  padding-block: 1.6rem;            /* spazio per il pop all'hover senza tagli */
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  -webkit-user-select: none; user-select: none;
  scrollbar-width: none;            /* Firefox: barra nascosta */
  -ms-overflow-style: none;
  /* sfuma i bordi sinistro/destro */
  -webkit-mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.cases-marquee::-webkit-scrollbar { display: none; }   /* WebKit: barra nascosta */
.cases-marquee.is-grabbing { cursor: grabbing; }
.cases-marquee__track {
  display: flex;
  align-items: center;
  width: max-content;
}

/* coppia prima→dopo; il margine "appartiene" alla coppia per un loop senza stacchi */
.ig-pair { display: flex; align-items: center; gap: 0.9rem; margin-right: clamp(1.6rem, 3vw, 2.8rem); }
.ig-pair__arrow { color: var(--accent); font-size: 1.45rem; flex-shrink: 0; }

/* card = mockup di un profilo */
.ig {
  flex-shrink: 0;
  width: 312px;
  align-self: stretch;
  display: flex; flex-direction: column;
  background: linear-gradient(150deg, rgba(255,122,26,0.07), rgba(255,122,26,0.015) 45%, var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.05rem 1.15rem 0.95rem;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.cases-marquee .ig:hover { transform: scale(1.045); z-index: 3; border-color: transparent; }

.ig__bar { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 1.05rem; }
.ig__back { color: var(--text-muted); font-size: 1.15rem; line-height: 1; }
.ig__handle { display: inline-flex; align-items: center; gap: 0.32rem; min-width: 0; font-weight: 700; font-size: 0.95rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig__dots { color: var(--text-muted); letter-spacing: 0.04em; flex-shrink: 0; }
.ig__check { width: 14px; height: 14px; color: #1d9bf0; flex-shrink: 0; }

.ig__profile { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 0.85rem; }
.ig__avatar {
  position: relative; flex-shrink: 0;
  width: 56px; height: 56px; border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, color-mix(in srgb, var(--av) 78%, #fff), var(--av) 72%);
}
/* foto profilo reale (se presente); fallback = sfera-gradiente qui sopra */
.ig__pic { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; opacity: 0; transition: opacity 0.35s var(--ease); }
/* anello stile Instagram */
.ig--ig .ig__avatar::before {
  content: ''; position: absolute; inset: -5px; border-radius: 50%; z-index: -1;
  background: conic-gradient(from 220deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5, #feda75);
}
.ig--ig .ig__avatar::after {
  content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--surface);
}
/* avatar YouTube: anello rosso + badge play ad angolo (così resta visibile
   anche con la foto profilo reale, senza coprire il volto) */
.ig--yt .ig__avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px #ff0033; }
.ig--yt .ig__avatar::after {
  content: ''; position: absolute; right: -3px; bottom: -3px; z-index: 2;
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--surface);
  background: #ff0033 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 10px no-repeat;
}
.ig__meta { min-width: 0; display: flex; flex-direction: column; gap: 0.42rem; }
.ig__name { font-family: var(--font-display); font-weight: 700; font-size: 0.98rem; line-height: 1.12; }
.ig__stats { display: flex; gap: 0.9rem; font-size: 0.7rem; color: var(--text-muted); }
.ig__stats b { display: block; color: var(--text); font-size: 0.9rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.ig__bio { flex: 1; margin: 0 0 0.95rem; font-size: 0.78rem; line-height: 1.45; color: var(--text-muted); }

/* footer su due righe come nel riferimento: badge + nome sopra, numero grande + label sotto */
.ig__result { display: flex; flex-direction: column; gap: 0.65rem; padding-top: 0.85rem; border-top: 1px solid var(--border); }
.ig__result-row { display: flex; align-items: center; gap: 0.6rem; }
.ig__badge { flex-shrink: 0; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; padding: 0.32rem 0.8rem; border-radius: 100px; color: var(--text-dim); background: rgba(255,255,255,0.05); border: 1px solid var(--border); }
.ig__big { display: flex; align-items: baseline; gap: 0.4rem; white-space: nowrap; }
.ig__bignum { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; letter-spacing: -0.02em; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ig__biglabel { font-size: 0.85rem; color: var(--text-dim); }

/* variante DOPO: badge pieno + numero nel nostro arancione */
.ig--after .ig__badge { color: #0A0A0B; background: var(--accent); border-color: var(--accent); }
.ig--after .ig__bignum { color: var(--accent); }

/* flowline (la nostra linea dinamica): spenta, accesa SOLO sulla card sotto al cursore */
.ig.flowline::after { opacity: 0; animation-play-state: paused; transition: opacity 0.35s var(--ease); }
.cases-marquee .ig.flowline:hover::after { opacity: 1; animation-play-state: running; }

/* testo-hint sotto al wall: invita a scorrere tra le card */
.cases-hint {
  display: flex; align-items: center; justify-content: center; gap: 0.55rem;
  margin-top: 1.2rem;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-dim);
}
.cases-hint__ico { display: inline-flex; color: var(--accent); animation: hintNudge 2s var(--ease) infinite; }
.cases-hint__ico svg { width: 22px; height: 14px; }
@keyframes hintNudge {
  0%, 100% { opacity: 0.55; transform: scaleX(0.92); }
  50%      { opacity: 1; transform: scaleX(1.08); }
}

@media (max-width: 680px) {
  .ig { width: 270px; }
}

@media (prefers-reduced-motion: reduce) {
  .cases-marquee { -webkit-overflow-scrolling: touch; }
  .cases-hint__ico { animation: none; }
}
