/* ARCHICONTRACTOR · Intro hero "Dalla pianta all'opera"
   Origine: archicontractor-hero-anteprima(1).html (CSS invariato). */
.ac-intro{
  --ac-pad: clamp(16px, 3.2vw, 44px);
  --ac-header: 72px;
  --ac-dim: rgba(255,255,255,.58);
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: 380vh; /* era 560vh: stessa sequenza, più rapida (feedback del 13/10) */
  background: #000;
  color: #fff;
  font-family: 'Satoshi', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
.ac-intro *, .ac-intro *::before, .ac-intro *::after{ box-sizing: border-box; margin: 0; padding: 0; }
.ac-stage{
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  background: #000;
}
.ac-stage::before{
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.075) 1px, transparent 1.2px);
  background-size: 24px 24px; background-position: center center;
  opacity: var(--g, 1);
}
@media (pointer: fine){ .ac-stage{ cursor: none; } }
.ac-canvas{ position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ---- logo finale ---- */
.ac-logo{ position: absolute; left: 0; top: 0; width: 300px; height: auto; overflow: visible; fill: #fff; pointer-events: none; }
.ac-logo .ac-mark{ opacity: 0; }
.ac-logo .ac-l{ opacity: 0; transform-box: fill-box; }

/* ---- HUD tipo CAD ---- */
.ac-hud{ position: absolute; inset: 0; pointer-events: none; font-size: 12px; line-height: 1.4; color: var(--ac-dim); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.ac-hud > div{ position: absolute; display: flex; flex-direction: column; gap: 2px; }
.ac-hud-bl{ top: 50%; left: var(--ac-pad); transform: translateY(-50%); flex-direction: row !important; gap: 6px !important; }
.ac-hud-bl span{ writing-mode: vertical-rl; transform: rotate(180deg); }
.ac-hud-br{ top: 50%; right: var(--ac-pad); transform: translateY(-50%); flex-direction: row !important; align-items: center; gap: 10px !important; }
.ac-hud-br span{ writing-mode: vertical-rl; }
.ac-bar{ position: relative; width: 9px; height: 160px; border-left: 1px solid rgba(255,255,255,.3); }
.ac-bar::before, .ac-bar::after{ content: ""; position: absolute; left: -1px; width: 9px; height: 1px; background: rgba(255,255,255,.3); }
.ac-bar::before{ top: 0; } .ac-bar::after{ bottom: 0; }
.ac-bar i{ position: absolute; left: -1px; top: 0; width: 1px; height: 0; background: #fff; }
.ac-bar s{ position: absolute; left: -1px; width: 5px; height: 1px; background: rgba(255,255,255,.3); }

/* ---- fasi ---- */
.ac-phase{ position: absolute; left: var(--ac-pad); right: var(--ac-pad); bottom: var(--ac-pad); display: flex; flex-direction: column-reverse; align-items: stretch; gap: 14px; pointer-events: none; }
.ac-phase-l{ max-width: 34ch; }
.ac-phase-n{ display: block; font-size: 13px; font-weight: 500; color: var(--ac-dim); font-variant-numeric: tabular-nums; margin-bottom: .5em; }
.ac-phase-w{ display: block; overflow: hidden; text-align: right; font-size: clamp(2.6rem, 10vw, 110px); line-height: 1.02; letter-spacing: -.035em; padding: .06em 0 .34em; margin: -.06em 0 -.34em; white-space: nowrap; }
.ac-phase-w > span{ display: block; will-change: transform; }
.ac-phase p{ font-size: 17px; line-height: 1.4; color: rgba(255,255,255,.78); }
@media (min-width: 1024px){ .ac-phase p{ font-size: 24px; } }
@media (min-width: 1200px){
  .ac-phase{ flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 40px; }
  .ac-phase-w{ font-size: min(128px, 9.2vw); line-height: 1; }
  .ac-phase-l{ padding-bottom: .15em; }
}
.ac-w-idea{ font-family: 'Nothing You Could Do', 'Bradley Hand', 'Segoe Print', cursive; font-weight: 400; font-style: normal; letter-spacing: .02em; }
.ac-w-idea > span{ font-size: .9em; line-height: 1.1; }
.ac-w-prog{ font-weight: 500; color: transparent; -webkit-text-stroke: 1px #fff; }
.ac-w-real{ font-weight: 900; }
/* "Ideazione" si scrive da sinistra a destra, come a mano */
.ac-phase[data-i="0"] .ac-phase-w > span{ animation: ac-write 1.5s .3s cubic-bezier(.45,.05,.55,.95) both; }
@keyframes ac-write{ from{ clip-path: polygon(-5% -60%, -5% -60%, -5% 160%, -5% 160%); } to{ clip-path: polygon(-5% -60%, 105% -60%, 105% 160%, -5% 160%); } }

/* ---- chiusura ---- */

/* Invito a scorrere: grande e al centro, sotto il punto di partenza (top lo fissa ac-intro.js) */
.ac-hint{ position: absolute; left: 50%; top: 58%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 14px; font-size: clamp(16px, 1.39vw, 24px); font-weight: 500; letter-spacing: .02em; color: #fff; white-space: nowrap; pointer-events: none; }
.ac-hint::after{ content: ""; width: 1px; height: 56px; background: linear-gradient(#fff, transparent); transform-origin: top; animation: ac-hint 1.8s ease-in-out infinite; }
@keyframes ac-hint{ 0%{ transform: scaleY(0); } 50%{ transform: scaleY(1); } 100%{ transform: scaleY(1); opacity: 0; } }


@media (max-width: 700px){
  .ac-intro{ height: 330vh; } /* era 470vh */
  .ac-hud-bl{ display: none; }
}

/* Stato statico: prefers-reduced-motion */
.ac-intro.ac-static{ height: auto; }
.ac-intro.ac-static .ac-stage{ position: relative; }
.ac-intro.ac-static .ac-canvas, .ac-intro.ac-static .ac-phase, .ac-intro.ac-static .ac-hint, .ac-intro.ac-static .ac-hud{ display: none; }
.ac-intro.ac-static .ac-mark, .ac-intro.ac-static .ac-l{ opacity: 1; }
