/* ==========================================================================
   LANDING — hero, avatar, presentazione, richiesta colloquio
   ========================================================================== */
:root {
  --av0: 136px;      /* avatar a cavallo della linea del video */
  --peek: 150px;     /* quanto resta visibile sotto il video al primo sguardo */
}
@media (max-width: 760px) {
  :root { --av0: 108px; --peek: 138px; }
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  height: calc(100vh - var(--peek));
  height: calc(100svh - var(--peek));
  min-height: 440px;
  background: #e9b9c6; /* rosa del set mentre il video si carica */
  overflow: hidden;
}
.hero__stage {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--white);
}
.hero__video {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  background: #e9b9c6;
}
.hero__video:not(.hero__video--main) { display: none; }

/* Trittico: su schermi orizzontali il video verticale resta a risoluzione
   nativa e a figura intera, ripetuto con uno sfasamento temporale. */
@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .hero__stage { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .hero__video:not(.hero__video--main) { display: block; }
}

.hero__toggle {
  min-height: 44px;
  position: absolute;
  left: var(--gutter);
  bottom: 18px;
  z-index: 2;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 13px 9px 11px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(19, 19, 19, 0.28);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-weight: var(--w-bold);
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  opacity: 0.85;
  transition: opacity 0.2s, background 0.2s;
}
.hero__toggle:hover { opacity: 1; background: rgba(19, 19, 19, 0.45); }
.hero__toggle-icon {
  width: 9px; height: 10px;
  border-left: 3px solid currentColor;
  border-right: 3px solid currentColor;
}
.hero__toggle[aria-pressed="true"] .hero__toggle-icon {
  border: 0;
  width: 0; height: 0;
  border-left: 9px solid currentColor;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

/* ---------- AVATAR ---------- */
.avatar {
  position: absolute;
  left: 50%;
  top: calc(100svh - var(--peek));
  z-index: 60;
  width: var(--av0); height: var(--av0);
  margin: calc(var(--av0) / -2) 0 0 calc(var(--av0) / -2);
  border-radius: 50%;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 0 0 4px var(--white), 0 18px 40px -16px rgba(19, 19, 19, 0.45);
  transform-origin: 50% 50%;
  -webkit-tap-highlight-color: transparent;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform 0.6s var(--ease-out); }
.avatar:hover img { transform: scale(1.08); }
.avatar.is-live {
  position: fixed;
  left: 0; top: 0;
  margin: 0;
  will-change: transform;
}
.avatar.is-docked { box-shadow: 0 0 0 6px var(--white), 0 6px 18px -6px rgba(19, 19, 19, 0.35); }
.avatar:focus-visible { outline: 3px solid var(--blue); outline-offset: 6px; }

/* ---------- IDENTITÀ ---------- */
.identity {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-top: calc(var(--av0) / 2 + 16px);
  will-change: opacity, transform;
}
.identity__name {
  font-weight: var(--w-bold);
  font-size: 18px;
  letter-spacing: -0.012em;
  line-height: 1.25;
}
.identity__role {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px;
  line-height: 1.4;
  margin-top: 2px;
}
.identity__role .dot { width: 9px; height: 9px; }

/* ---------- PRESENTAZIONE ---------- */
.intro {
  padding: clamp(150px, 22vh, 260px) var(--gutter) clamp(90px, 13vh, 150px);
}
.intro__copy {
  max-width: var(--read);
  margin: 0 auto;
  text-align: center;
  display: grid;
  gap: 1.15em;
  font-size: clamp(19px, 1.2vw + 7px, 26px);
  line-height: 1.52;
  letter-spacing: -0.014em;
  text-wrap: pretty;
}
.intro__copy p:last-child { margin-top: 1.9em; }
.intro .w { transition: opacity 0.6s var(--ease-out), color 0.6s; opacity: 0.24; }
.intro .w.is-lit { opacity: 1; }
.no-js .intro .w { opacity: 1; }

/* scarabocchi esterni alla colonna di lettura */
.intro__s1 { width: min(280px, calc((100vw - var(--read)) / 2 - 70px)); left: calc(50% - var(--read) / 2 - 36px); top: 11%; transform: translateX(-100%) rotate(-8deg); }
.intro__s2 { width: min(380px, calc((100vw - var(--read)) / 2 - 40px)); left: calc(50% + var(--read) / 2 + 24px); bottom: 12%; transform: rotate(-14deg); }
.intro__s3 { width: 92px; left: calc(50% + var(--read) / 2 + 60px); top: 9%; }
.intro__s4 { width: min(300px, calc((100vw - var(--read)) / 2 - 60px)); left: calc(50% - var(--read) / 2 - 30px); bottom: 6%; transform: translateX(-100%) rotate(9deg); }
.intro__s5 { width: 118px; left: calc(50% + var(--read) / 2 + 110px); top: 44%; transform: rotate(18deg); }

/* ---------- RICHIESTA COLLOQUIO ---------- */
.request {
  padding: clamp(8px, 2vh, 28px) var(--gutter) clamp(40px, 8vh, 100px);
}
.request__inner { max-width: 640px; margin: 0 auto; }
.request__eyebrow {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 4px;
}
/* «Come funziona?»: poco più piccolo del titolo, apre la finestra col metodo */
.request__how { text-align: center; margin-bottom: clamp(24px, 4.5vh, 44px); }
.request__how-btn {
  min-height: 44px; padding: 0 8px;
  font-weight: var(--w-bold); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--blue);               /* azzurro come il pallino accanto al nome (20/11) */
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
  transition: color 0.2s;
}
.request__how-btn:hover { color: var(--ink); }
.request__eyebrow .dot { width: 8px; height: 8px; min-width: 8px; min-height: 8px; }
.request__form .field:first-of-type { border-top: 1px solid var(--line-strong); }
.request__actions {
  margin-top: 44px;
  display: grid; justify-items: center; gap: 18px;
  text-align: center;
}
.request__submit { max-width: 380px; }
.request__submit.is-busy { pointer-events: none; }
.request__submit.is-busy span { opacity: 0.4; }
.request__submit.is-busy::after {
  content: ""; position: absolute;
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff;
  animation: eg-spin 0.8s linear infinite;
}
.request__submit { position: relative; }
@keyframes eg-spin { to { transform: rotate(360deg); } }
.request__status { color: var(--danger); font-size: 14px; min-height: 0; }
.request__status:empty { display: none; }
.request__note {
  max-width: 500px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  text-wrap: balance;
}
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.request__s1 { width: min(360px, calc((100vw - 640px) / 2 - 60px)); right: calc(50% + 320px + 40px); top: 18%; transform: rotate(12deg); }
.request__s2 { width: min(250px, calc((100vw - 640px) / 2 - 80px)); left: calc(50% + 320px + 56px); top: 46%; transform: rotate(-6deg); }
.request__s3 { width: min(190px, calc((100vw - 640px) / 2 - 90px)); right: calc(50% + 320px + 70px); bottom: 16%; transform: rotate(-20deg); }
.request__s4 { width: min(320px, calc((100vw - 640px) / 2 - 60px)); left: calc(50% + 320px + 40px); top: 2%; transform: rotate(7deg); }

/* textarea a crescita automatica */
textarea[data-autogrow] { overflow: hidden; min-height: 34px; }

/* ---------- CAMPO DATA + CALENDARIO ---------- */
.date-trigger {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 6px 0 2px;
  font-size: 18px;
  text-align: left;
  border-radius: 6px;
}
.date-trigger__value.is-empty { color: var(--muted); }
.date-trigger__icon { width: 22px; height: 22px; flex: none; transition: transform 0.4s var(--ease-out); }
.date-trigger[aria-expanded="true"] .date-trigger__icon { transform: rotate(-8deg) scale(1.08); }

.cal {
  margin: 16px 0 6px;
  padding: 18px 16px 14px;
  max-width: 380px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 24px 60px -30px rgba(19, 19, 19, 0.35);
  animation: eg-cal-in 0.45s var(--ease-out) both;
}
@keyframes eg-cal-in { from { opacity: 0; transform: translateY(-8px) scale(0.98); } }
.cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding: 0 4px; }
.cal__title { font-weight: var(--w-bold); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
.cal__nav { display: flex; gap: 6px; }
.cal__nav button {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: background 0.2s, color 0.2s;
}
.cal__nav button:hover:not([disabled]) { background: var(--ink); color: var(--white); }
.cal__nav button[disabled] { opacity: 0.25; cursor: default; }
.cal__nav svg { width: 14px; height: 14px; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal__dow { text-align: center; font-size: 10px; font-weight: var(--w-bold); letter-spacing: 0.08em; color: var(--muted); padding: 6px 0 8px; text-transform: uppercase; }
.cal__day {
  position: relative;
  aspect-ratio: 1;
  max-width: 46px;
  width: 100%;
  justify-self: center;
  border-radius: 50%;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  transition: background 0.2s, color 0.2s, transform 0.3s var(--ease-spring);
}
.cal__day:hover:not([disabled]) { background: var(--paper); }
.cal__day[disabled] { color: var(--faint); cursor: default; }
.cal__day.is-today::after {
  content: ""; position: absolute; left: 50%; bottom: 5px;
  width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%;
  background: var(--blue);
}
.cal__day[aria-pressed="true"] { background: var(--ink); color: var(--white); transform: scale(1.04); }
.cal__day[aria-pressed="true"]::after { background: var(--white); }
.cal__foot { margin-top: 10px; padding: 10px 4px 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

/* ---------- CONFERMA ---------- */
.request__done {
  text-align: center;
  padding: 40px 0 10px;
  display: grid; justify-items: center; gap: 16px;
}
.request__done:not([hidden]) { animation: eg-done 0.9s var(--ease-out) both; }
@keyframes eg-done { from { opacity: 0; transform: translateY(20px); } }
.request__done-dot { width: 14px; height: 14px; }
.request__done-title {
  font-weight: var(--w-bold);
  font-size: clamp(36px, 6vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}
.request__done-text { font-size: 17px; max-width: 460px; text-wrap: balance; }

/* ---------- MOBILE / TABLET: scarabocchi fuori dal testo ---------- */
@media (max-width: 1180px) {
  .intro__s1 { width: 120px; left: var(--gutter); top: 34px; transform: rotate(-8deg); }
  .intro__s2 { width: 210px; left: auto; right: -34px; bottom: 26px; transform: rotate(-14deg); }
  .intro__s3 { width: 64px; left: auto; right: calc(var(--gutter) + 12px); top: 70px; }
  .request__s1 { display: none; }
  .request__s2 { width: 96px; left: auto; right: var(--gutter); top: -40px; }
  .intro__s4 { width: 130px; left: -24px; bottom: 34px; transform: rotate(9deg); }
  .intro__s5 { display: none; }
  .request__s3 { width: 74px; right: auto; left: var(--gutter); top: -52px; bottom: auto; }
  .request__s4 { display: none; }
}
@media (max-width: 760px) {
  .intro { padding-top: 170px; padding-bottom: 156px; }
  .intro__s1 { width: 104px; top: 46px; }
  .intro__s2 { width: 180px; bottom: 30px; }
  .field { grid-template-columns: 26px 1fr; column-gap: 8px; }
  .field input, .field textarea, .date-trigger { font-size: 17px; }
  .cal { padding: 14px 10px 12px; }
}

/* ---------- 08 · REFERENCE ---------- */
.field--refs { transition: background 0.2s; }
.field--refs.is-drop { background: var(--paper); }
.refs__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.refs__opt { color: var(--muted); }
.refs__add { position: relative; }
.refs__plus {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: background 0.2s, color 0.2s, transform 0.35s var(--ease-spring);
}
.refs__plus svg { width: 18px; height: 18px; }
.refs__plus:hover, .refs__plus[aria-expanded="true"] { background: var(--ink); color: var(--white); }
.refs__plus[aria-expanded="true"] { transform: rotate(45deg); }
.refs__menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 5;
  min-width: 210px; padding: 6px;
  background: var(--white); border-radius: 16px;
  box-shadow: 0 18px 50px -18px rgba(19, 19, 19, 0.35), 0 0 0 1px var(--line);
  animation: eg-cal-in 0.3s var(--ease-out) both;
}
.refs__menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border-radius: 10px; font-size: 15px; text-align: left; }
.refs__menu button:hover { background: var(--paper); }
.refs__hint { font-size: 13px; color: var(--muted); margin-top: 2px; }
.refs__list { display: grid; gap: 8px; margin-top: 10px; }
.refs__list:empty { display: none; }
.refs__item { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 10px; padding: 6px 0 8px; border-bottom: 1px dashed var(--line-strong); }
.refs__item--file { grid-template-columns: minmax(0, 1fr) auto auto; }
.refs__link { width: 100%; border: 0; outline: 0; background: transparent; font-size: 16px; padding: 6px 0; }
.refs__name { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.refs__meta { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.refs__item.is-error .refs__meta { color: var(--danger); }
.refs__bar { position: absolute; left: 0; bottom: -1px; height: 2px; width: calc(var(--p, 0) * 100%); background: var(--blue); transition: width 0.2s linear; }
.refs__item.is-error .refs__bar { display: none; }
.refs__rm { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--muted); }
.refs__rm:hover { color: var(--ink); background: var(--paper); }
.refs__rm svg { width: 16px; height: 16px; }

/* ---------- COME FUNZIONA? (finestra) ---------- */
.how-sheet .sheet { width: min(700px, 100%); max-height: calc(100svh - 48px); padding: 26px clamp(22px, 4vw, 44px) 36px; }
.how__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.how__eyebrow { display: inline-flex; align-items: center; gap: 10px; }
.how__eyebrow .dot { width: 8px; height: 8px; min-width: 8px; min-height: 8px; }
.how__close { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; margin-right: -10px; }
.how__close:hover { background: var(--paper); }
.how__close svg { width: 18px; height: 18px; }
.how__title { font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.035em; margin: 18px 0 22px; outline: none; }
.how__body { display: grid; gap: 1.05em; font-size: 16px; line-height: 1.62; text-wrap: pretty; }
.how__last { margin-top: 0.6em; font-weight: var(--w-bold); }
@media (max-width: 560px) { .how-sheet .sheet { max-height: 88svh; } }
