.home--v2 {
  /* background: #000; */
  background: var(--Colors-Stone-900, #1c1917);
}

/* убираем стеклянный blur на хедере в v2 */
.home--v2 .site-header,
.home--v2 .site-header * {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* .home--v2 .hero {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
} */

/* Typography colors for v2 hero */
.home--v2 .hero__greeting,
.home--v2 .hero__title,
.home--v2 .hero__description,
.home--v2 .hero__info-text {
  color: #fff;
}

/* Full-bleed hero (escapes .container constraints) */
.home--v2 .hero {
  /* position: sticky; */
  /* height: 100svh; */
  /* top: 0; */
  /* overflow: hidden; */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-top: 88px;
  position: relative;
  top: auto;
  height: auto;
  top: 0;
  overflow: visible;
  background: #000; /* fallback */
}

/* Background image */
.home--v2 .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../assets/images/home-hero-bg.jpg") center / cover no-repeat;
  z-index: 0;
}

/* Figma overlay: #00000099 (60% black) */
/* .home--v2 .hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #00000099;
  z-index: 0;
} */

.home--v2 .hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;

  background:
    /* bottom fade into next section */
    linear-gradient(
      to bottom,
      rgba(28, 25, 23, 0) 65%,
      var(--Colors-Stone-900, #1c1917) 100%
    ),
    /* global darkening overlay */ rgba(0, 0, 0, 0.7);
}

/* Ensure hero content is above overlays */
.home--v2 .hero .container,
.home--v2 .hero__content {
  position: relative;
  z-index: 1;
}
.home--v2 .hero__content {
  padding-top: 20px;
}
.home--v2 .selected-work {
  background-color: var(--Colors-Stone-900, #1c1917);
}
.home--v2 .selected-work__title {
  color: #fff;
}

/* 🍒Cards */
.home--v2 .case-card .case-card__inner {
  position: relative;
  overflow: hidden;
  border-radius: 16px; /* adjust to match screenshot */
  height: 520px;
  height: 650px;
  /* background: transparent !important; */
  background: var(--Colors-Stone-900, #1c1917) !important;
}
.home--v2 .case-card .case-card__inner-interviewr {
  position: relative;
  overflow: hidden;
  border-radius: 16px; /* adjust to match screenshot */
  height: 520px;
  /* background: var(--Colors-Stone-900, #1c1917) !important; */
}

/* 2) Force the background wrapper to be a true full-card layer (not a flex item) */
.home--v2 .case-card .case-card__visual {
  pointer-events: none;
  display: block !important; /* important: removes flex sizing behavior */
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

/* Make the image cover the card */
.home--v2 .case-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  object-position: 70% 50%; /* key: move focal point right */
}
/* .home--v2 .case-card__visual img {
  object-position: 75% 45%;
} */
.home--v2 .case-card__visual.case-card__visual-scale img {
  object-position: 75% 45%;
  scale: 1.6;
}
.home--v2 .case-card__visual picture img {
  /* scale: 1.6; */
  object-position: 75% 57%;
}
.home--v2 .case-card__visual.case-card__visual-adjust picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 100% 45% !important;
  /* object-position: 75% 45% !important; */
  display: block;
}

/* v2 cards: do NOT use the old "animate-in" hiding */
/* .home--v2 .case-card__visual img,
.home--v2 .case-card__visual picture img {
  opacity: 1 !important;
  transform: none !important;
} */

/* 🦊 New hover with the bg images scaling up*/
.home--v2 .case-card__image {
  opacity: 1;
  transform: none;
}

@media (hover: hover) and (pointer: fine) {
  .home--v2 .case-card__visual img,
  .home--v2 .case-card__visual picture img {
    transition: scale 300ms ease;
  }

  .home--v2 .case-card__link:hover .case-card__visual img,
  .home--v2 .case-card__link:hover .case-card__visual picture img {
    scale: 1.04;
  }

  /* if you have cards that start at scale: 1.6 */
  .home--v2
    .case-card__link:hover
    .case-card__visual.case-card__visual-scale
    img {
    scale: 1.66;
  }
}

/* 🐞Prevent old hover “blue border” from triggering on touch devices */
@media (hover: none) and (pointer: coarse) {
  .home--v2 .case-card__link,
  .home--v2 .case-card__link:hover,
  .home--v2 .case-card__link:active {
    transform: none !important;
    box-shadow: none !important;
  }

  .home--v2 .case-card__link::after,
  .home--v2 .case-card__link:hover::after,
  .home--v2 .case-card__link:active::after {
    opacity: 0 !important;
    box-shadow: none !important;
  }
}

/* Make picture behave like a full-cover background layer */
.home--v2 .case-card .case-card__visual picture {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

/* Now 100% height works reliably */
.home--v2 .case-card__visual picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* 4) Force img to fill picture */
.home--v2 .case-card .case-card__visual img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
}

.home--v2 .case-card__visual,
.home--v2 .case-card__image {
  position: absolute;
  inset: 0;
}
.home--v2 .case-card__visual img,
.home--v2 .case-card__visual picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* .home--v2 .case-card__link {
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transform: translateY(0);
}
@media (hover: hover) and (pointer: fine) {
  .home--v2 .case-card__link:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  }
}
.home--v2 .case-card__link::after {
  opacity: 0 !important;
  box-shadow: none !important;
}
.home--v2 .case-card__inner {
  background-clip: padding-box;
} */
.home--v2 .case-card__link::after {
  content: none !important;
}

.home--v2 .case-card__visual img {
  backface-visibility: hidden;
}
/* Put text above */
.home--v2 .case-card__text {
  position: relative;
  z-index: 2;
  max-width: 560px; /* helps match your layout */
}

.home--v2 .case-card {
  --card-text-color: #fff;
}
/* White text on image cards (adjust per card if needed) */
.home--v2 .case-card__company,
.home--v2 .case-card__title,
.home--v2 .case-card__description,
.home--v2 .case-stat__text,
.home--v2 .case-stat__text p {
  color: #fff;
}
.home--v2 .case-card__company,
.home--v2 .case-card__title,
.home--v2 .case-card__description,
.home--v2 .case-stat__text,
.home--v2 .case-stat__text p {
  color: var(--card-text-color);
}

.home--v2 .case-card {
  max-width: 1080px;
  margin: 0 auto 28px;
}

/* Content layer: THIS is where flex belongs */
.home--v2 .case-card__content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  justify-content: space-between;
  gap: 54px;
  padding: 40px;
  align-items: flex-start;
}
.home--v2 .case-card__text {
  /* max-width: 520px; */
  /* max-width: 560px; */
  max-width: 500px;
}
.home--v2 .case-card {
  --card-text-color: var(--color-text);
}
/* 🧮The little tags in top */
.case-card__tags {
  display: flex;
  flex-wrap: wrap;
  row-gap: 12px; /* space between pills */
  column-gap: 8px;
  align-items: center;
}

.case-card__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 14px 16px; /* inside the pill */
  border-radius: 999px;
  background: #ffffffb2;

  color: var(--Components-Badge-Soft-Gray-Placeholder-Color, #1f2937);

  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  white-space: nowrap;
}

/* 🧮END: The little tags in top */
/* .case-card__inner {
  padding-top: 122px;
  padding-bottom: 122px;
} */

.home--v2 .case-card--overlay-strong {
  --card-text-color: #ffffff;
}

/* .home--v2 .case-card--overlay-strong .case-card__inner::after {
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.4) 52%,
    rgba(0, 0, 0, 0.15) 100%
  );
} */
.home--v2 .case-card--overlay-strong .case-card__inner::after {
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.45) 52%,
    rgba(0, 0, 0, 0.3) 100%
  );
}

/* .home--v2 .case-card--overlay-thrifthie .case-card__inner::after {
  background: linear-gradient(
    268.98deg,
    rgba(251, 223, 212, 0.55) 0%,
    rgba(251, 223, 212, 0.3) 30%,
    rgba(251, 223, 212, 0.12) 50%,
    rgba(251, 223, 212, 0) 70%
  );
} */

/* Readability overlay (per-card) */
/* overlay stays above image, below content */
.home--v2 .case-card__inner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: transparent;
}

.home--v2 .case-card--overlay-light .case-card__inner::after {
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.2) 52%,
    rgba(0, 0, 0, 0.05) 100%
  );
}

/* light wash overlay */
/* .home--v2 .case-card--overlay-wash .case-card__inner::after {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(255, 255, 255, 0.35) 52%,
    rgba(255, 255, 255, 0.1) 100%
  );
} */

/* .home--v2 .case-card--overlay-light-1 .case-card__inner::after {
  background-image:
    linear-gradient(0deg, rgba(253, 239, 234, 0.2), rgba(253, 239, 234, 0.2)),
    linear-gradient(268.98deg, #fdefea 14.35%, rgba(253, 239, 234, 0) 47.45%);
 
} */

.home--v2 .case-card--overlay-light-1 .case-card__inner::after {
  background: linear-gradient(
    268.98deg,
    rgba(244, 234, 253, 0.45) 0%,
    rgba(244, 234, 253, 0.25) 30%,
    rgba(244, 234, 253, 0.1) 50%,
    rgba(244, 234, 253, 0) 70%
  );
}

.home--v2 .case-card--overlay-light-2 .case-card__inner::after {
  background-image:
    linear-gradient(0deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.2)),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0) 43.89%,
      rgba(255, 255, 255, 0.5) 84.72%
    );
}

/* Контентный слой */
.home--v2 .case-card__content {
  position: relative;
  z-index: 2;
  height: 100%;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* gap: 48px; */
  /* padding: 48px; */
  padding: 30px;
}

/* Левая колонка */
.home--v2 .case-card__text {
  flex: 1 1 auto;
  min-width: 0;
}

/* right block */
.home--v2 .case-card__brand {
  flex: 0 1 500px;
  max-width: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home--v2 .case-card__brand-interviewr {
  display: flex;
  flex-direction: column;
  z-index: 10;
}

/* Типографика бренда (подгони по фигме) */
.case-card__brand-name {
  font-family: "Aoboshi One", serif;
  font-weight: 400;
  font-size: 86px;
  line-height: 1;
  letter-spacing: 0.005em;
  color: #fff;
}
.case-card__brand-sub {
  font-family: "Caveat", cursive;
  font-weight: 400;
  font-size: 38px;
  line-height: 1;
  letter-spacing: 0.005em;
  padding-top: 20px;
  color: #fff;
}
.case-card__brand-sub {
  max-width: 260px;
  color: #47364e;
  font-size: 24px;
  text-align: center;
}
.case-card__brand-sub-dark {
  color: var(--color-text);
}
.home--v2 .button--secondary-dark {
  border: 1px solid var(--color-text) !important;
  color: var(--color-text) !important;
}
.home--v2 .case-card--brand-horizon .case-card__brand-name {
  font-family: "Felt Tip Woman", "Caveat", "Comic Sans MS", cursive;
  font-weight: 400;
  font-size: 56px;
  line-height: 60px;
  letter-spacing: 0;
  color: var(--Colors-Fuchsia-800, #86198f);
  text-align: center;
}
.case-stat__icon-var {
  background: var(--Colors-Fuchsia-800, #86198f);
}
/* По умолчанию: текст слева, бренд справа */
.home--v2 .case-card__content {
  flex-direction: row;
}

/* Шахматка: бренд слева */
.home--v2 .case-card--brand-left .case-card__content {
  flex-direction: row-reverse;
}
.home--v2 .button--secondary {
  border: 1px solid white;
  color: white;
}
.home--v2 .case-card__inner {
  display: block !important;
}
/* The logo in Interviewr */
/* .home--v2 .case-card__brand {
  display: grid;
  place-items: center;
  text-align: center;
} */

/* Brand image fits inside the 500×500 (or shrinking) brand block */
.home--v2 .case-card__brand-image {
  max-width: 300px;
  /* max-height: 100%; */
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}
.case-card__brand-pic-hch {
  max-width: 398px;
}
@media (max-width: 510px) {
  .case-card__brand-pic-hch {
    max-width: 350px;
  }
}
@media (max-width: 460px) {
  .case-card__brand-pic-hch {
    max-width: 300px;
  }
}
@media (max-width: 400px) {
  .case-card__brand-pic-hch {
    max-width: 250px;
  }
}
@media (max-width: 350px) {
  .case-card__brand-pic-hch {
    max-width: 200px;
  }
}
.case-card__brand-pic-vivia {
  padding-top: 30px;
}
/* Footer background image */
@media (max-width: 1050px) {
  .case-card__brand-pic-vivia {
    padding-top: 0px;
  }
}
.site-footer {
  position: relative;
  overflow: hidden; /* keeps corners clean if you add radius later */
  background-color: transparent !important;
  background-image: url("../assets/images/footer-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* overlay for readability */
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;

  z-index: 0;
}

/* keep footer content above the overlay */
.site-footer__content {
  position: relative;
  z-index: 1;
}

.home.home--v2 .site-header {
  background: transparent;
  transition:
    transform 0.25s ease,
    background-color 0.25s ease;
}

/* home v2: dark bg when showing on scroll up */
.home.home--v2 .site-header.site-header--home-bg {
  background: var(--Colors-Stone-900, #1c1917);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.home--v2 .case-card__brand-sub-interviewr {
  padding-top: 10px;
}
/* 🍒Media */

@media (max-width: 1050px) {
  .home--v2 .case-card__brand-image {
    max-width: 7cm;
    /* max-height: 80%; */
  }
  .home--v2 .case-card .case-card__visual {
    max-height: none !important;
    height: 100% !important;
    padding: 0 !important;
  }

  .home--v2 .case-card__inner {
    height: auto !important; /* allow card to grow */
    min-height: 0;
  }

  .home--v2 .case-card__content {
    flex-direction: column !important;
    align-items: stretch; /* text becomes full width */
    height: auto;
    padding: 32px;
    /* gap: 24px; */
    gap: 56px;
  }

  .home--v2 .case-card__text {
    width: 100%;
  }

  /* BRAND FIRST */
  .home--v2 .case-card__brand {
    /* Next is the key line */
    order: -1;
    /* width: min(500px, 100%);
    max-width: 500px;
    margin: 0 auto; */
    /* aspect-ratio: 1 / 1; */
    flex: 0 0 auto;
    height: 140px !important;
    display: grid;
    place-content: center;
    text-align: center;

    aspect-ratio: auto;
    min-height: unset;
    /* padding: 24px 0; */
    max-width: none;
  }
  .home--v2 .case-card__brand-long {
    height: 230px !important;
  }
  /* TEXT SECOND */
  .home--v2 .case-card__text {
    order: 0;
    width: 100%;
    max-width: none;
  }
  .home--v2 .case-card__brand-name {
    font-size: clamp(42px, 6vw, 56px);
  }

  .home--v2 .case-card__brand-sub {
    font-size: clamp(18px, 3vw, 22px);
  }
}
@media (max-width: 635px) {
  .home--v2 .case-card__brand-sub {
    color: white;
    padding-top: 10px;
  }
}

/* ✅ Mobile: brand image goes AFTER text, and touches bottom edge */
@media (max-width: 1050px) {
  /* Put brand after the text (undo order:-1) */
  .home--v2 .case-card__brand {
    order: 2; /* after .case-card__text */
    height: auto !important;
    display: block; /* not a fixed “brand tile” anymore */
    place-content: initial;
    text-align: left;
  }

  /* Remove the “extra bottom padding” that creates a gap under the image */
  .home--v2 .case-card__content {
    padding-bottom: 0; /* your current block uses padding: 32px; */
  }

  /* Make the GIF full-bleed to the card edges and flush to the bottom */
  .home--v2 .case-card__brand .case-card__brand-pic {
    display: block;
    width: calc(100% + 64px); /* 32px left + 32px right (matches the padding) */
    /* margin-left: -32px;
    margin-right: -32px; */
    margin-bottom: 0;
    height: auto;
    object-fit: cover;
  }
  .home--v2 .case-card__brand-interviewr {
    padding-bottom: 50px;
  }
}

/* 🐣For additional cards */

.home--v2 .case-card__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.home--v2 .case-card--reverse .case-card__content {
  flex-direction: row-reverse;
}

/* .home--v2 .case-card--brand-horizon .case-card__brand-name {
  font-family: "Aoboshi One", serif; 
  font-size: 64px; 
} */

@media (max-width: 768px) {
  .case-card__text {
    padding: 0;
  }
  .home--v2 .case-card__content {
    padding-bottom: 0px;
    /* padding-bottom: 50px; */
  }
}
@media (max-width: 400px) {
  .home--v2 .case-card--brand-horizon .case-card__brand-name {
    font-size: 54px;
  }
}
@media (hover: hover) and (pointer: fine) {
  .home--v2 .case-card__link {
    transition:
      transform 200ms ease,
      box-shadow 200ms ease;
  }
  .home--v2 .case-card__link:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
  }
  .home--v2 .case-card__visual img {
    transition: transform 300ms ease;
  }
  .home--v2 .case-card__link:hover .case-card__visual img {
    transform: scale(1.04);
  }
}
