/* Home da campanha: adapta os cards e a fotografia aos três breakpoints do Figma. */

.home-page { background: var(--purple); }

.home {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: var(--purple) url("assets/home/background-wide.png") center / cover no-repeat;
  color: var(--cream);
}

.home__portrait {
  --portrait-height: 1055px;
  --portrait-bottom: -75px;
  position: fixed;
  z-index: 1;
  /* Mantém a ancoragem pelo rodapé sem permitir corte ou colagem no topo. */
  bottom: clamp(
    calc(100svh - var(--portrait-height) - 80px),
    var(--portrait-bottom),
    calc(100svh - var(--portrait-height) - 32px)
  );
  right: -181px;
  display: block;
  width: 1121px;
  pointer-events: none;
}

.home__portrait img {
  display: block;
  width: 100%;
  height: auto;
}

.home__container {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  justify-content: space-between;
  padding: 64px;
}

.home__top {
  display: flex;
  flex-direction: column;
  gap: 56px;
  align-items: flex-start;
}

.home__header {
  display: flex;
  width: 100%;
  gap: 56px;
  align-items: center;
}

.home__logo {
  display: block;
  width: 480px;
  flex: 0 0 auto;
}

.home__logo img {
  display: block;
  width: 100%;
  height: auto;
}

.home__slogan {
  display: flex;
  flex-direction: column;
  margin: 0;
  color: var(--cream);
  font-size: 48px;
  font-weight: 200;
  line-height: 56px;
  white-space: nowrap;
}

.home__slogan strong,
.home__tools-heading strong,
.home-tool-card__content strong { font-weight: 700; }

.home__tools {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}

.home__tools-heading {
  margin: 0;
  color: var(--cream);
  font-size: 24px;
  font-weight: 200;
  line-height: 28px;
}

.home__tools-heading--mobile,
.home__slider-controls { display: none; }

.home__slider { position: relative; }

.home__tool-list {
  display: grid;
  grid-template-columns: repeat(3, 326px);
  gap: 24px;
}

.home-tool-card {
  display: flex;
  width: 326px;
  min-height: 346px;
  flex-direction: column;
  padding: 8px;
  overflow: hidden;
  border: 0.8px solid #8d5bbf;
  border-radius: 16px;
  background: rgba(141, 91, 191, 0.2);
  color: var(--cream);
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition: background-color 180ms ease;
}

.home-tool-card:hover { background-color: rgba(141, 91, 191, 0.5); }

.home-tool-card:focus-visible,
.home__slider-button:focus-visible,
.home__slider-dot:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }

.home-tool-card__media {
  display: grid;
  height: 240px;
  place-items: center;
  overflow: hidden;
  border: 0.8px solid #8d5bbf;
  border-radius: 10px;
  background: var(--purple-deep);
}

.home-tool-card__media picture,
.home-tool-card__media img {
  display: block;
  width: 100%;
  height: 100%;
}

.home-tool-card__media > picture > img { object-fit: cover; }

.home-tool-card__media--frame { position: relative; }

.home-tool-card__media--frame img {
  position: absolute;
  top: 7.27%;
  left: -4.38%;
  width: 108.68%;
  height: 85.75%;
  max-width: none;
  object-fit: contain;
}

.home-tool-card__media--blank {
  position: relative;
  background: var(--purple-deep);
}

.home-tool-card__media--blank img {
  position: absolute;
  top: 9.94%;
  left: 7.35%;
  width: 85.04%;
  height: 80.01%;
  max-width: none;
  object-fit: contain;
}

.home-tool-card__content {
  display: block;
  padding: 16px 24px;
  color: var(--cream);
  font-size: 24px;
  font-weight: 200;
  line-height: 28px;
  text-align: center;
}

.home__footer {
  color: var(--cream);
  font-size: 10px;
  font-weight: 200;
  line-height: normal;
}

.home__footer span + span::before { content: " - "; }

/* Faixa ampla intermediária: preserva a composição e reduz a foto para abrir respiro. */
@media (min-width: 1441px) and (max-width: 1680px) {
  .home__portrait {
    --portrait-height: 931px;
    right: -181px;
    width: 989px;
  }
}

@media (min-width: 1280px) and (max-width: 1440px) {
  .home { background-image: url("assets/home/background-medium.png"); }
  .home__container { padding: 40px; }
  .home__header { gap: 56px; }
  .home__logo { width: 360px; }
  .home__slogan { font-size: 32px; line-height: 40px; }
  .home__portrait {
    --portrait-height: 769px;
    --portrait-bottom: -41px;
    right: -216px;
    width: 817px;
  }
  .home__tool-list { grid-template-columns: repeat(3, 280px); }
  .home-tool-card { width: 280px; min-height: 300px; }
  .home-tool-card__media { height: 200px; }
  .home-tool-card__content { font-size: 20px; line-height: 24px; }
}

@media (max-width: 1279px) {
  .home { background-image: url("assets/home/background-mobile.png"); }
  .home__portrait,
  .home__slogan,
  .home__tools-heading--desktop { display: none; }
  .home__container {
    width: min(100%, 480px);
    min-height: 100svh;
    margin: 0 auto;
    padding: 32px;
  }
  .home__top { width: 100%; gap: 24px; align-items: center; }
  .home__header { justify-content: center; }
  .home__logo { width: 100%; }
  .home__tools { align-items: center; }
  .home__tools-heading--mobile {
    display: flex;
    flex-direction: column;
    color: var(--cream);
    font-size: 20px;
    font-weight: 200;
    line-height: 26px;
    text-align: center;
  }
  .home__slider { width: 100%; }
  .home__tool-list {
    display: flex;
    width: 100%;
    gap: 16px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .home__tool-list::-webkit-scrollbar { display: none; }
  .home-tool-card {
    width: 100%;
    min-height: 346px;
    flex: 0 0 100%;
    scroll-snap-align: start;
  }
  .home-tool-card__media {
    height: auto;
    aspect-ratio: 310 / 240;
  }
  .home__slider-controls {
    display: flex;
    margin-bottom: 16px;
    align-items: center;
    justify-content: space-between;
  }
  .home__slider-button {
    display: grid;
    width: 49.6px;
    height: 49.6px;
    padding: 12px;
    place-items: center;
    cursor: pointer;
    border: 0.8px solid #8d5bbf;
    border-radius: 999px;
    background: transparent;
  }
  .home__slider-button img { display: block; width: 24px; height: 24px; }
  .home__slider-dots { display: flex; gap: 6px; align-items: center; }
  .home__slider-dot {
    width: 4px;
    height: 4px;
    padding: 0;
    cursor: pointer;
    border: 0;
    border-radius: 50%;
    background: #8d5bbf;
  }
  .home__slider-dot.is-active {
    width: 8px;
    height: 8px;
    box-shadow: 0 4px 88px rgba(0, 0, 0, 0.52);
  }
  .home__footer {
    display: flex;
    width: 100%;
    flex-direction: column;
    text-align: center;
  }
  .home__footer span + span::before { content: none; }
}

@media (prefers-reduced-motion: reduce) {
  .home-tool-card,
  .home__tool-list { scroll-behavior: auto; transition: none; }
}
