/* Home 6.17 — menu e hero sono un'unica superficie cinematografica. */
html,
body { max-width: 100%; }

body { overflow-x: clip; }

body.home { --hero-gutter: clamp(1.125rem, 4vw, 5rem); }

.home .portrait-hero {
  min-height: max(100svh, 45rem);
  padding-top: clamp(5rem, 7vw, 6rem);
  overflow: clip;
  container-type: inline-size;
}

.home .portrait-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 73% 58%, rgba(56, 111, 231, .2), transparent 22%),
    linear-gradient(115deg, transparent 0 48%, rgba(255, 255, 255, .025) 48% 48.08%, transparent 48.08%);
}

.home .portrait-hero__network {
  opacity: .25;
  animation: cinematic-network-drift 22s ease-in-out infinite alternate;
}

.home .site-header {
  top: 0;
  width: min(85rem, calc(100% - (2 * var(--hero-gutter))));
  height: clamp(5rem, 6vw, 5.75rem);
  color: #fff;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .13);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: opacity .7s ease, transform .8s cubic-bezier(.2,.75,.2,1), background-color .35s ease;
}

.home .site-header::after { display: none; }

.home .site-header #nav > ul > li > a {
  color: rgba(255, 255, 255, .84);
}

.home .site-header #nav > ul > li:is(:hover, :focus-within, .current-menu-item) > a {
  color: #fff;
}

.home .site-header #nav > ul > li.nav-cta > a {
  color: #020817;
  background: var(--modern-orange);
}

.home .site-header #nav > ul > li.nav-cta > a:is(:hover, :focus-visible) {
  color: #020817;
  background: #fff;
}

.home .site-header nav ul ul {
  color: #fff;
  background: #07142d;
  border-color: rgba(255, 255, 255, .18);
  border-top-color: var(--modern-orange);
}

.home .site-header nav ul ul a { color: rgba(255, 255, 255, .86); }
.home .site-header nav ul ul a:hover { color: #fff; }
.home .site-header .submenu-toggle { color: #fff; }
.home .site-header .submenu-triangle { border-top-color: #fff; }

.home .site-header #menu {
  color: #fff;
  background: transparent;
  border-color: rgba(255, 255, 255, .38);
}

body.home.logo-intro-open .site-header {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -1rem);
}

.home .site-header > div,
.home .site-header nav { min-width: 0; }

.home .site-header .brand-wordmark {
  width: clamp(10.75rem, 17vw, 14.25rem);
  height: auto;
  max-width: 100%;
}

.home .portrait-hero__grid {
  width: min(85rem, calc(100% - (2 * var(--hero-gutter))));
  min-height: calc(max(100svh, 45rem) - clamp(5rem, 7vw, 6rem));
  grid-template-columns: minmax(0, 1.02fr) minmax(18rem, .98fr);
  gap: clamp(1.5rem, 5vw, 6rem);
}

.home .portrait-hero__copy,
.home .portrait-hero__portrait-stage { min-width: 0; }

.home .portrait-hero__copy {
  padding: clamp(5.5rem, 10vh, 8rem) 0 clamp(4.5rem, 8vh, 6.5rem);
}

.home .portrait-hero__location { margin-bottom: clamp(1rem, 2vh, 1.5rem); }

.home .portrait-hero__title {
  max-width: 100%;
  font-size: clamp(4.25rem, 7.1vw, 7rem);
  line-height: .83;
  text-wrap: balance;
}

.home .portrait-hero__title:focus { outline: 0; }

.home .portrait-hero__name-outline {
  width: min-content;
  max-width: 100%;
  overflow-wrap: normal;
  white-space: nowrap;
}

.home .portrait-hero__role {
  max-width: 25ch;
  margin-top: clamp(1.7rem, 4vh, 2.4rem);
  font-size: clamp(1.45rem, 2.1vw, 2.15rem);
  text-wrap: balance;
}

.home .portrait-hero__promise {
  max-width: 50ch;
  font-size: clamp(.9rem, 1.2vw, 1rem);
}

.home .portrait-hero__actions {
  flex-wrap: wrap;
  margin-top: clamp(1.4rem, 3vh, 2rem);
}

.home .portrait-hero__button { flex: 0 1 auto; }

.home .portrait-hero__portrait-stage {
  min-height: clamp(34rem, 69vh, 48rem);
  perspective: 75rem;
}

.home .portrait-hero__portrait-stage::before {
  right: 1%;
  bottom: 6%;
  width: min(86%, 34rem);
  height: 75%;
  transform: rotate(1.6deg) translateZ(0);
  clip-path: polygon(0 7%, 91% 0, 100% 94%, 9% 100%);
}

.home .portrait-hero__portrait-stage::after {
  content: "F / 01";
  position: absolute;
  z-index: 5;
  top: 21%;
  right: 5%;
  color: rgba(255, 255, 255, .68);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .18em;
}

.home .portrait-hero__portrait {
  left: 51%;
  width: min(37rem, 105%);
  transform-origin: 50% 100%;
}

.home .portrait-hero__halo {
  left: 12%;
  right: 2%;
  height: 70%;
}

.home .portrait-hero__foot {
  right: var(--hero-gutter);
  left: var(--hero-gutter);
}

/* L'introduzione vive dentro la hero: stesso sfondo, nessuna pagina bianca separata. */
.home .logo-intro {
  position: absolute;
  z-index: 20;
  inset: 0;
  width: 100%;
  min-height: 100%;
  color: #f7f9fd;
  background:
    radial-gradient(circle at 50% 48%, rgba(31, 85, 187, .24), transparent 30%),
    linear-gradient(118deg, rgba(3, 10, 24, .2), rgba(7, 20, 45, .08));
}

.home .logo-intro.is-leaving {
  transform: scale(1.055);
  filter: blur(.4rem);
}

.home .logo-intro__mark {
  top: 48%;
  width: clamp(18rem, 39vw, 34rem);
  filter: drop-shadow(0 2rem 3rem rgba(0, 0, 0, .24));
}

.home .logo-intro__mark .logo-intro__f { fill: #f7f9fd; }
.home .logo-intro__captions--human { color: var(--intro-orange); }
.home .logo-intro__captions--ai { color: #8eb7ff; }
.home .logo-intro__guide--ai { stroke: #8eb7ff; }
.home .logo-intro__identity { color: rgba(255,255,255,.45); }
.home .logo-intro__skip { color: #fff; border-color: rgba(255,255,255,.25); }
.home .logo-intro__skip:hover { color: var(--intro-orange); border-color: var(--intro-orange); }
.home .logo-intro__progress { background: rgba(255,255,255,.08); }

body.logo-intro-open .portrait-hero__grid,
body.logo-intro-open .portrait-hero__foot {
  opacity: 0;
  transform: scale(.975);
}

.portrait-hero__grid,
.portrait-hero__foot {
  transition: opacity .75s ease, transform 1s cubic-bezier(.16,.74,.19,1);
}

.portrait-hero[data-scene="profile"] .portrait-hero__grid,
.portrait-hero[data-scene="profile"] .portrait-hero__foot {
  opacity: 1;
  transform: none;
}

@keyframes cinematic-network-drift {
  from { translate: -1% -.5%; scale: 1.01; }
  to { translate: 1% .7%; scale: 1.035; }
}

@container (max-width: 68rem) {
  .home .portrait-hero__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(18rem, .95fr);
    gap: 1.5rem;
  }

  .home .portrait-hero__title { font-size: clamp(3.8rem, 8vw, 5.75rem); }
  .home .portrait-hero__role { font-size: clamp(1.35rem, 2.6vw, 1.8rem); }
  .home .portrait-hero__portrait { width: min(34rem, 112%); }
}

@media (max-width: 60rem) {
  .home .portrait-hero { min-height: auto; }

  .home .site-header {
    width: min(46rem, calc(100% - 2.25rem));
    height: 5rem;
  }

  .home .site-header #nav {
    color: #fff;
    background: rgba(3, 10, 24, .98);
    border-color: rgba(255, 255, 255, .18);
    box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, .3);
  }

  .home .site-header #nav > ul > li > a { color: rgba(255, 255, 255, .88); }

  .home .portrait-hero__grid {
    width: min(46rem, calc(100% - 2.25rem));
    min-height: auto;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .home .portrait-hero__copy {
    grid-column: 1;
    grid-row: 1;
    padding: clamp(4.5rem, 9vh, 6.5rem) 0 1rem;
  }

  .home .portrait-hero__portrait-stage {
    grid-column: 1;
    grid-row: 2;
    min-height: clamp(27rem, 64vh, 38rem);
  }

  .home .portrait-hero__title { font-size: clamp(4rem, 15vw, 6.4rem); }
  .home .portrait-hero__name-outline { white-space: normal; width: auto; }
  .home .portrait-hero__role { max-width: 24ch; }
  .home .portrait-hero__portrait { width: min(34rem, 100%); }
  .home .portrait-hero__foot { display: none; }

  .home .logo-intro__mark { width: min(25rem, 78vw); }
  .home .logo-intro__captions { width: min(17rem, 29vw); }
}

@media (max-width: 43.75rem) {
  .home .portrait-hero { padding-top: 5rem; }
  .home .site-header {
    top: 0;
    width: 100%;
    padding-inline: 1.125rem;
    background: linear-gradient(180deg, rgba(3, 10, 24, .78), rgba(3, 10, 24, .2));
    border-width: 0 0 1px;
  }
  .home .site-header .brand-wordmark { width: clamp(10.5rem, 52vw, 12rem); }
  .home .portrait-hero__copy { padding-top: 3.5rem; }
  .home .portrait-hero__title { font-size: clamp(3.7rem, 18vw, 5.2rem); }
  .home .portrait-hero__role { font-size: clamp(1.25rem, 6vw, 1.55rem); }
  .home .portrait-hero__actions { display: grid; grid-template-columns: 1fr; }
  .home .portrait-hero__button { width: 100%; min-width: 0; }
  .home .portrait-hero__portrait-stage { min-height: clamp(25rem, 61vh, 31rem); }

  .home .logo-intro__captions {
    right: 1rem;
    left: 1rem;
    width: auto;
  }

  .home .logo-intro__identity { left: 1.125rem; }
  .home .logo-intro__skip { right: 1.125rem; min-width: min(13rem, calc(100% - 2.25rem)); }
}

@media (max-width: 30rem) {
  .home .portrait-hero__grid { width: calc(100% - 1.5rem); }
  .home .portrait-hero__copy { padding-top: 2.75rem; }
  .home .portrait-hero__title { font-size: clamp(3.15rem, 17vw, 4.5rem); }
  .home .portrait-hero__role { font-size: clamp(1.15rem, 5.8vw, 1.4rem); }
  .home .portrait-hero__promise { font-size: .88rem; }
  .home .portrait-hero__portrait-stage { min-height: clamp(22rem, 58vh, 28rem); }
  .home .site-header { padding-inline: .75rem; }
  .home .site-header .brand-wordmark { width: min(10.75rem, 52vw); }
  .home .site-header #menu { padding: .65rem .75rem; }
  .home .logo-intro__mark { width: min(18rem, 76vw); }
}

@media (max-height: 42rem) and (min-width: 43.76rem) {
  .home .portrait-hero { min-height: 42rem; }
  .home .portrait-hero__grid { min-height: 36rem; }
  .home .portrait-hero__copy { padding-top: 4rem; padding-bottom: 3.5rem; }
  .home .portrait-hero__portrait-stage { min-height: 34rem; }
}

@media (prefers-reduced-motion: reduce) {
  .home .portrait-hero__network { animation: none; }
  .portrait-hero__grid,
  .portrait-hero__foot { transition: none; }
}

/* Protezione globale contro overflow a zoom elevato. */
img,
svg,
video,
iframe { max-width: 100%; }

main,
section,
article,
header,
footer,
nav,
div { min-width: 0; }

h1,
h2,
h3,
p,
a { overflow-wrap: break-word; }
