/* Andrea Michielan | home/hero | original component stylesheet */
/* =====================================================
       BASE
    ===================================================== */

    .am-home-hero-v3{
      position:relative;
      width:100%;
      min-height:100vh;
      min-height:100svh;
      overflow:hidden;
      background:var(--am-ds-ink);
      color:var(--am-ds-ivory);
      isolation:isolate;
    }

    .am-home-hero-v3,
    .am-home-hero-v3 *{
      box-sizing:border-box;
    }

    /* =====================================================
       BACKGROUND IMAGE
    ===================================================== */

    .am-home-hero-v3__bg{
      position:absolute;
      inset:0;
      z-index:-4;
      overflow:hidden;
    }

    .am-home-hero-v3__bg picture,
    .am-home-hero-v3__bg img{
      display:block;
      width:100%;
      height:100%;
    }

    .am-home-hero-v3__bg img{
      width:100%;
      height:100%;
      object-fit:cover;

      /*
       * DESKTOP FOCAL POINT
       *
       * Andrea viene portato maggiormente
       * verso la parte destra della hero.
       *
       * Se vuoi spostarlo:
       * 68% = più verso sinistra
       * 72% = attuale
       * 78% = più verso destra
       */
      object-position:72% center;

      transform:scale(1.015);
      transform-origin:72% center;

      animation:
        amHomeHeroV3Image
        18s
        ease-in-out
        infinite
        alternate;

      will-change:transform;
    }

    /* =====================================================
       LOCALIZED OVERLAY
    ===================================================== */

    .am-home-hero-v3__overlay{
      position:absolute;
      inset:0;
      z-index:-3;
      pointer-events:none;

      background:
        linear-gradient(
          90deg,
          rgba(6,22,22,.86) 0%,
          rgba(6,22,22,.76) 19%,
          rgba(6,22,22,.58) 34%,
          rgba(6,22,22,.30) 48%,
          rgba(6,22,22,.10) 61%,
          rgba(6,22,22,.02) 76%,
          transparent 100%
        );
    }

    /* Ombra superiore / inferiore molto leggera */

    .am-home-hero-v3__atmosphere{
      position:absolute;
      inset:0;
      z-index:-2;
      pointer-events:none;

      background:
        linear-gradient(
          180deg,
          rgba(6,22,22,.22) 0%,
          transparent 23%,
          transparent 68%,
          rgba(6,22,22,.38) 100%
        );
    }

    /* =====================================================
       LAYOUT
    ===================================================== */

    .am-home-hero-v3__inner{
      position:relative;
      z-index:3;

      display:flex;
      align-items:center;

      width:100%;
      max-width:1440px;
      min-height:100vh;
      min-height:100svh;

      margin:0 auto;

      padding:
        150px
        7vw
        125px;
    }

    /* =====================================================
       CONTENT
    ===================================================== */

    .am-home-hero-v3__content{
      width:100%;
      max-width:520px;
    }

    .am-home-hero-v3__eyebrow{
      display:flex;
      align-items:center;
      gap:13px;

      margin:0 0 22px;

      color:rgba(249,249,246,.72);

      font-family:var(--am-ds-font-body), Arial, sans-serif;
      font-size:10px;
      font-weight:700;
      line-height:1.4;

      letter-spacing:.22em;
      text-transform:uppercase;
    }

    .am-home-hero-v3__eyebrow::before{
      content:"";

      display:block;
      width:30px;
      height:1px;

      background:#B8DDD7;
    }

    /* =====================================================
       HEADING
    ===================================================== */

    .am-home-hero-v3__title{
      max-width:520px;

      margin:0 0 28px;

      color:var(--am-ds-ivory);

      font-family:
        var(--am-ds-font-display),
        Georgia,
        serif;

      font-size:clamp(60px,5.5vw,82px);
      font-weight:500;
      line-height:.96;

      letter-spacing:-.045em;

      text-shadow:
        0 3px 24px rgba(6,22,22,.28);

      text-wrap:balance;
    }

    .am-home-hero-v3__title-line{
      display:block;
    }

    .am-home-hero-v3__title-accent{
      display:block;

      color:#DCEDEA;

      font-style:italic;
      font-weight:400;
    }

    /* =====================================================
       SUBTITLE
    ===================================================== */

    .am-home-hero-v3__subtitle{
      max-width:455px;

      margin:0 0 36px;

      color:rgba(249,249,246,.80);

      font-family:var(--am-ds-font-body), Arial, sans-serif;
      font-size:14px;
      font-weight:400;
      line-height:1.85;

      letter-spacing:.08em;
    }

    /* =====================================================
       CTA
    ===================================================== */

    .am-home-hero-v3__btn{
      display:inline-flex;
      align-items:center;
      justify-content:center;
      gap:17px;

      min-height:54px;

      padding:
        16px
        30px;

      border-radius:999px;

      background:var(--am-ds-brand);
      color:var(--am-ds-white);

      font-family:var(--am-ds-font-body), Arial, sans-serif;
      font-size:11px;
      font-weight:700;
      line-height:1.3;

      letter-spacing:.15em;
      text-transform:uppercase;

      text-decoration:none;

      transition:
        transform .25s ease,
        background-color .25s ease,
        box-shadow .25s ease;
    }

    .am-home-hero-v3__btn:hover,
    .am-home-hero-v3__btn:focus-visible{
      background:var(--am-ds-primary);
      color:var(--am-ds-white);

      transform:translateY(-2px);

      box-shadow:
        0 16px 40px
        rgba(0,0,0,.18);

      text-decoration:none;
      outline:none;
    }

    /* =====================================================
       CSS ARROW
    ===================================================== */

    .am-home-hero-v3__arrow{
      position:relative;

      display:block;

      width:22px;
      height:12px;

      flex:0 0 auto;

      transition:transform .25s ease;
    }

    .am-home-hero-v3__arrow::before{
      content:"";

      position:absolute;

      top:50%;
      right:0;

      width:20px;
      height:1px;

      background:currentColor;

      transform:translateY(-50%);
    }

    .am-home-hero-v3__arrow::after{
      content:"";

      position:absolute;

      top:50%;
      right:0;

      width:6px;
      height:6px;

      border-top:1px solid currentColor;
      border-right:1px solid currentColor;

      transform:
        translateY(-50%)
        rotate(45deg);
    }

    .am-home-hero-v3__btn:hover
    .am-home-hero-v3__arrow,

    .am-home-hero-v3__btn:focus-visible
    .am-home-hero-v3__arrow{
      transform:translateX(4px);
    }

    /* =====================================================
       BREATH LINE
       Più discreta rispetto alla versione precedente
    ===================================================== */

    .am-home-hero-v3__breath{
      position:absolute;

      left:0;
      right:0;
      bottom:10%;

      z-index:2;

      width:100%;
      height:120px;

      opacity:.48;

      pointer-events:none;
    }

    .am-home-hero-v3__breath svg{
      display:block;

      width:100%;
      height:100%;

      overflow:visible;
    }

    .am-home-hero-v3__breath-base{
      fill:none;

      stroke:
        rgba(223,255,255,.28);

      stroke-width:1;

      stroke-linecap:round;
    }

    .am-home-hero-v3__breath-active{
      fill:none;

      stroke:#DFFFFF;

      stroke-width:1.2;

      stroke-linecap:round;

      stroke-dasharray:1550;
      stroke-dashoffset:1550;

      filter:
        drop-shadow(
          0 0 5px
          rgba(223,255,255,.40)
        );

      animation:
        amHomeHeroV3Breath
        8s
        ease-in-out
        infinite;
    }

    /* =====================================================
       SCROLL INDICATOR
    ===================================================== */

    .am-home-hero-v3__scroll{
      position:absolute;

      left:50%;
      bottom:22px;

      z-index:5;

      transform:translateX(-50%);

      color:
        rgba(249,249,246,.62);

      font-family:var(--am-ds-font-body), Arial, sans-serif;
      font-size:9px;
      font-weight:600;
      line-height:1.4;

      letter-spacing:.20em;
      text-transform:uppercase;

      text-align:center;
      white-space:nowrap;
    }

    .am-home-hero-v3__scroll-line{
      position:relative;

      width:1px;
      height:35px;

      margin:10px auto 0;

      overflow:hidden;

      background:
        rgba(249,249,246,.20);
    }

    .am-home-hero-v3__scroll-line::after{
      content:"";

      position:absolute;

      left:0;
      top:-100%;

      width:1px;
      height:100%;

      background:#DFFFFF;

      animation:
        amHomeHeroV3Scroll
        2.3s
        ease-in-out
        infinite;
    }

    /* =====================================================
       ANIMATIONS
    ===================================================== */

    @keyframes amHomeHeroV3Image{

      from{
        transform:scale(1.015);
      }

      to{
        transform:scale(1.055);
      }

    }

    @keyframes amHomeHeroV3Breath{

      0%{
        stroke-dashoffset:1550;
        opacity:.12;
      }

      43%{
        stroke-dashoffset:0;
        opacity:.9;
      }

      100%{
        stroke-dashoffset:-1550;
        opacity:.12;
      }

    }

    @keyframes amHomeHeroV3Scroll{

      0%{
        top:-100%;
        opacity:0;
      }

      25%{
        opacity:1;
      }

      100%{
        top:100%;
        opacity:0;
      }

    }

    /* =====================================================
       LARGE DESKTOP
    ===================================================== */

    @media(min-width:1500px){

      .am-home-hero-v3__inner{
        max-width:1520px;

        padding-left:90px;
        padding-right:90px;
      }

      .am-home-hero-v3__content{
        max-width:540px;
      }

      .am-home-hero-v3__title{
        max-width:540px;
      }

    }

    /* =====================================================
       TABLET
    ===================================================== */

    @media(max-width:1024px){

      .am-home-hero-v3__inner{
        padding:
          140px
          48px
          115px;
      }

      .am-home-hero-v3__content{
        max-width:470px;
      }

      .am-home-hero-v3__title{
        max-width:470px;

        font-size:
          clamp(54px,7vw,68px);
      }

      .am-home-hero-v3__subtitle{
        max-width:420px;
      }

      .am-home-hero-v3__bg img{
        object-position:70% center;
        transform-origin:70% center;
      }

      .am-home-hero-v3__overlay{
        background:
          linear-gradient(
            90deg,
            rgba(6,22,22,.88) 0%,
            rgba(6,22,22,.72) 30%,
            rgba(6,22,22,.43) 49%,
            rgba(6,22,22,.13) 68%,
            transparent 100%
          );
      }

    }

    /* =====================================================
       MOBILE
    ===================================================== */

    @media(max-width:767px){

      .am-home-hero-v3{
        min-height:100svh;
      }

      /*
       * Su mobile cambiamo logica:
       * testo in alto,
       * Andrea nella zona centrale/inferiore.
       */

      .am-home-hero-v3__inner{
        min-height:100svh;

        align-items:flex-start;

        padding:
          106px
          20px
          116px;
      }

      .am-home-hero-v3__content{
        max-width:100%;
      }

      /* =========================
         MOBILE IMAGE
      ========================= */

      .am-home-hero-v3__bg img{
        /*
         * Versione mobile dedicata.
         *
         * Horizontal:
         * 50% = più sinistra
         * 58% = attuale
         * 65% = più destra
         */
        object-position:58% bottom;
        transform-origin:58% bottom;
      }

      /*
       * Il gradient su mobile protegge il testo
       * principalmente nella parte superiore.
       */

      .am-home-hero-v3__overlay{
        background:
          linear-gradient(
            180deg,
            rgba(6,22,22,.90) 0%,
            rgba(6,22,22,.77) 22%,
            rgba(6,22,22,.48) 42%,
            rgba(6,22,22,.17) 61%,
            rgba(6,22,22,.10) 72%,
            rgba(6,22,22,.48) 100%
          );
      }

      .am-home-hero-v3__atmosphere{
        background:
          linear-gradient(
            180deg,
            rgba(6,22,22,.12),
            transparent 60%,
            rgba(6,22,22,.38)
          );
      }

      /* =========================
         MOBILE CONTENT
      ========================= */

      .am-home-hero-v3__eyebrow{
        margin-bottom:16px;

        font-size:9px;
        letter-spacing:.18em;
      }

      .am-home-hero-v3__eyebrow::before{
        width:24px;
      }

      .am-home-hero-v3__title{
        max-width:360px;

        margin-bottom:20px;

        font-size:44px;
        line-height:.98;

        letter-spacing:-.035em;
      }

      .am-home-hero-v3__subtitle{
        max-width:340px;

        margin-bottom:26px;

        font-size:12px;
        line-height:1.7;

        letter-spacing:.04em;
      }

      .am-home-hero-v3__btn{
        width:auto;

        min-height:50px;

        padding:
          14px
          24px;

        font-size:10px;
        letter-spacing:.13em;
      }

      /* =========================
         MOBILE BREATH
      ========================= */

      .am-home-hero-v3__breath{
        bottom:11%;

        height:80px;

        opacity:.32;
      }

      /* =========================
         MOBILE SCROLL
      ========================= */

      .am-home-hero-v3__scroll{
        bottom:15px;

        font-size:8px;

        letter-spacing:.15em;
      }

      .am-home-hero-v3__scroll-line{
        height:27px;
        margin-top:7px;
      }

    }

    /* =====================================================
       SMALL MOBILE
    ===================================================== */

    @media(max-width:390px){

      .am-home-hero-v3__inner{
        padding-left:17px;
        padding-right:17px;
      }

      .am-home-hero-v3__title{
        max-width:320px;

        font-size:40px;
      }

      .am-home-hero-v3__subtitle{
        max-width:310px;

        font-size:11.5px;
      }

      .am-home-hero-v3__bg img{
        object-position:56% bottom;
        transform-origin:56% bottom;
      }

    }

    /* =====================================================
       REDUCED MOTION
    ===================================================== */

    @media(prefers-reduced-motion:reduce){

      .am-home-hero-v3 *,
      .am-home-hero-v3 *::before,
      .am-home-hero-v3 *::after{
        animation:none !important;
        transition:none !important;
      }

      .am-home-hero-v3__bg img{
        transform:scale(1.015);
      }

    }
