@font-face {
  font-family: "Poppins Hero";
  src: url("../fontes/Poppins-Black.ttf") format("truetype");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

@layer reset, base, components, utilities;

@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html,
  body {
    margin: 0;
    min-block-size: 100%;
  }
}

@layer base {
  :root {
    --surface: #12110f;
    --focus: #ffd36a;
    --hero-shift: 0px;
    color-scheme: dark;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  }

  html {
    background: var(--surface);
    scroll-behavior: smooth;
  }

  body {
    min-block-size: 100svh;
    overflow-x: clip;
    background: var(--surface);
  }

  :focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 4px;
  }
}

@layer components {
  .skip-link {
    position: fixed;
    inset: 1rem auto auto 1rem;
    z-index: 100;
    translate: 0 -200%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: #fff;
    color: #111;
    transition: translate 180ms ease;

    &:focus {
      translate: 0;
    }
  }

  .hero {
    position: relative;
    isolation: isolate;
    min-block-size: 100svh;
    overflow: clip;
    container: hero / inline-size;
    background: var(--surface);
  }

  .hero__viewport,
  .hero__slide,
  .hero__media,
  .hero__shade {
    position: absolute;
    inset: 0;
  }

  .hero__slide {
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.2s cubic-bezier(.22, 1, .36, 1), visibility 1.2s;

    &.is-active {
      z-index: 1;
      opacity: 1;
      visibility: visible;
    }
  }

  .hero__media {
    /* Sangria apenas vertical: evita frestas no parallax sem cortar as laterais. */
    inset: -3rem 0;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 50% calc(50% + 15px);
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    transform: translate3d(0, calc(15px + (var(--hero-shift) * -0.13)), 0);
    scale: 1.045;
    transition: transform 120ms linear, scale 1.8s cubic-bezier(.22, 1, .36, 1);
  }

  .hero__slide.is-active .hero__media {
    scale: 1;
  }

  .hero__media--staff {
    background-image: image-set(
      url("../imagens/staffhomehero.png") type("image/png") 1x
    );
  }

  .hero__media--segments {
    background-image: image-set(
      url("../imagens/staffhomehero2.png") type("image/png") 1x
    );
    background-position: 50% calc(50% - 12px);
  }

  .hero__shade {
    z-index: 1;
    pointer-events: none;
    background:
      linear-gradient(to top, rgb(0 0 0 / 34%), transparent 42%),
      linear-gradient(to right, rgb(0 0 0 / 40%), transparent 58%, transparent 76%, rgb(0 0 0 / 12%));
  }

  .hero__shade--segments {
    background:
      linear-gradient(to top, rgb(0 0 0 / 58%), transparent 57%),
      linear-gradient(to right, rgb(0 0 0 / 34%), transparent 68%);
  }

  .hero__content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-rows: auto 1fr;
    align-items: start;
    min-block-size: 100svh;
    inline-size: min(50rem, 100%);
    padding-block: max(0.35rem, env(safe-area-inset-top)) max(0.5rem, env(safe-area-inset-bottom));
    padding-inline-start: max(0px, env(safe-area-inset-left));
    pointer-events: none;
  }

  .hero__logo {
    display: block;
    inline-size: clamp(13rem, 22vw, 18.75rem);
    block-size: auto;
    object-fit: contain;
    object-position: left center;
    user-select: none;
    -webkit-user-drag: none;
  }

  .hero__message {
    align-self: end;
    padding-block-end: clamp(0.3rem, 1.5vh, 1rem);

    & :is(h1, h2) {
      max-inline-size: 50rem;
      margin: 0;
      color: #fff;
      font-family: "Poppins Hero", system-ui, sans-serif;
      font-size: clamp(2rem, 3.1vw, 2.68rem);
      font-weight: 900;
      line-height: 1.18;
      letter-spacing: -0.035em;
      text-shadow:
        -2px -2px 2px rgb(0 0 0 / 98%),
         2px -2px 2px rgb(0 0 0 / 98%),
        -2px  2px 2px rgb(0 0 0 / 98%),
         2px  2px 2px rgb(0 0 0 / 98%),
         0 0 8px rgb(0 0 0 / 100%),
         0 4px 14px rgb(0 0 0 / 96%);
    }

    & p {
      max-inline-size: 50rem;
      margin: clamp(0.55rem, 1.2vh, 0.9rem) 0 0;
      color: #44f4f0;
      font-family: "Poppins Hero", system-ui, sans-serif;
      font-size: clamp(1.00rem, 0.98vw, 0.88rem);
      font-weight: 800;
      line-height: 1.55;
      text-shadow:
        -2px -2px 2px rgb(0 0 0 / 100%),
         2px -2px 2px rgb(0 0 0 / 100%),
        -2px  2px 2px rgb(0 0 0 / 100%),
         2px  2px 2px rgb(0 0 0 / 100%),
         0 0 7px rgb(0 0 0 / 100%),
         0 3px 11px rgb(0 0 0 / 98%);
    }
  }

  .hero__message--segments {
    padding-block-end: clamp(0.2rem, 1vh, 0.6rem);

    & h2 {
      max-inline-size: 61rem;
      font-size: clamp(1.85rem, 2.85vw, 2.48rem);
      font-style: oblique 12deg;
      line-height: 1.08;
      letter-spacing: -0.04em;
    }

    & p {
      max-inline-size: 62rem;
      font-size: clamp(0.92rem, 1.34vw, 1.18rem);
      line-height: 1.08;
    }
  }

  .hero__content--segments {
    inline-size: min(64rem, 100%);
  }

  .hero__cta {
    position: relative;
    display: grid;
    place-items: center;
    inline-size: clamp(13rem, 24vw, 21.875rem);
    margin-block-start: clamp(0.7rem, 1.8vh, 1.25rem);
    padding: 0;
    border: 0;
    border-radius: 3.6rem;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
    isolation: isolate;
    translate: -3.5% 0;

    &::before {
      position: absolute;
      inset: 10% 5%;
      z-index: -1;
      border-radius: inherit;
      background: rgb(0 238 94 / 100%);
      box-shadow: 0 0 1rem 0.7rem rgb(0 238 94 / 100%);
      filter: blur(9px);
      content: "";
      opacity: 0;
      animation: cta-pulse 6s ease-out infinite;
      pointer-events: none;
      transform: scale(0.88);
      will-change: transform, opacity, filter;
    }

    & img {
      display: block;
      inline-size: 100%;
      block-size: auto;
      border-radius: inherit;
      user-select: none;
      -webkit-user-drag: none;
      filter: drop-shadow(0 0.45rem 0.7rem rgb(0 0 0 / 46%));
      transition: scale 180ms ease, filter 180ms ease;
    }

    &:hover img {
      scale: 1.025;
      filter: drop-shadow(0 0.6rem 0.9rem rgb(0 0 0 / 55%)) brightness(1.05);
    }

    &:active img {
      scale: 0.985;
    }
  }

  @container hero (width < 48rem) {
    .hero__media {
      /* Mantém o ASG de uniforme azul com a vassoura como ponto focal em telas estreitas. */
      background-position: 50% calc(50% + 15px);
      transform: translate3d(0, calc(15px + (var(--hero-shift) * -0.08)), 0);
    }

    .hero__slide--segments {
      background: #090b0a;

      & .hero__media--segments {
        inset: 0;
        background-color: #090b0a;
        background-position: 50% top;
        background-size: auto 42svh;
        transform: none;
      }

      & .hero__shade--segments {
        background:
          linear-gradient(to bottom, transparent 34svh, rgb(0 0 0 / 76%) 48svh, #090b0a 61svh),
          linear-gradient(to right, rgb(0 0 0 / 18%), transparent 72%);
      }
    }

    .hero__content {
      inline-size: 100%;
      padding-inline: max(0.75rem, env(safe-area-inset-left)) max(0.75rem, env(safe-area-inset-right));
    }

    .hero__logo {
      inline-size: clamp(10rem, 48vw, 15rem);
      margin-inline-start: -0.5rem;
    }

    .hero__message {
      padding-block-end: 0.5rem;

      & :is(h1, h2) {
        max-inline-size: 18ch;
        font-size: clamp(1.85rem, 8.3vw, 3rem);
        line-height: 1.08;
      }

      & p {
        max-inline-size: 42rem;
        font-size: clamp(0.88rem, 3.7vw, 1.08rem);
        line-height: 1.38;
      }
    }

    .hero__message--segments {
      & h2 {
        max-inline-size: 23ch;
        font-size: clamp(1.08rem, 5vw, 1.5rem);
        line-height: 1.03;
      }

      & p {
        margin-block-start: 0.45rem;
        font-size: clamp(0.68rem, 3vw, 0.82rem);
        line-height: 1.16;
      }

      & .hero__cta {
        inline-size: clamp(9.5rem, 47vw, 13rem);
        margin-block-start: 0.45rem;
      }
    }

    .hero__desktop-break {
      display: none;
    }

    .hero__cta {
      inline-size: clamp(12rem, 58vw, 17rem);
      translate: calc(-0.75rem - 3.5%) 0;
    }
  }
}

@keyframes cta-pulse {
  0% {
    opacity: 0;
    transform: scale(0.88);
    filter: blur(7px);
  }

  3% {
    opacity: 1.00;
  }

  28% {
    opacity: 0;
    transform: scale(1.48, 1.62);
    filter: blur(15px);
  }

  100% {
    opacity: 0;
    transform: scale(1.48, 1.62);
    filter: blur(15px);
  }
}

@layer utilities {
  .visually-hidden {
    position: absolute !important;
    inline-size: 1px !important;
    block-size: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero__slide,
  .hero__media,
  .skip-link,
  .hero__cta::before {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
