/* v3 hero_home (bento). Figma: Hero section 11827:33540 (1440, 712 high incl. the 62px header), mobile 12192:31569 (430).
   --u = 1 design px of the 1316px content width: the bento scales as one piece between 1025 and 1440 (clamped to 1440).
   <= 1024 the layout switches to the mobile composition (button below the teal card, 2-column small cards, wide referral card).
   The frame (dashed lines, partners row + marquee) is shared with hero_courier: css/v3/parts/hero-shell.css. */
/* ---- bento ---- */
.v3-hero-home__bento {
  display: grid;
  grid-template-columns: 652fr 320fr 320fr;
  grid-template-areas:
    "main courier referral"
    "main rent referral";
  column-gap: 12px;
  row-gap: 11px;
}

.v3-hero-home__main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: max(24px, calc(42 * var(--u)));
  border-radius: var(--v3-radius-lg);
  background: linear-gradient(255.785deg, #4aefee 20.394%, #15c0bf 66.645%), var(--v3-primary);
  color: #f4f6f6;
}
.v3-hero-home__copy { margin-bottom: 24px; }
.v3-hero-home__title {
  max-width: calc(404 * var(--u));
  font-size: max(32px, calc(58 * var(--u)));
  font-weight: 600;
  line-height: 0.983;
}
.v3-hero-home__subtitle {
  margin-top: calc(3 * var(--u));
  font-size: max(20px, calc(30 * var(--u)));
  font-weight: 700;
  line-height: 1.77;
}
.v3-hero-home__text {
  max-width: calc(409 * var(--u));
  margin-top: calc(36 * var(--u));
  font-size: max(13px, calc(16 * var(--u)));
  font-weight: 500;
  line-height: 1.4;
}
.v3-hero-home__cta { margin-top: auto; }   /* at 1440 the button sits at the bottom of the 501px card; a taller copy pushes it down instead of overlapping */

/* ---- link cards ---- */
.v3-hero-home__card {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #efefef;
  border-radius: var(--v3-radius-lg);
  background: var(--v3-white);
  color: var(--v3-dark);
}
.v3-hero-home__card:focus-visible { outline: 2px solid var(--v3-primary); outline-offset: 3px; }
.v3-hero-home__card--courier { grid-area: courier; }
.v3-hero-home__card--rent { grid-area: rent; }
/* 320:245 minimum shape through a spacer (not aspect-ratio): a taller teal card stretches the small cards instead of leaving a gap or widening them */
.v3-hero-home__card--courier::before,
.v3-hero-home__card--rent::before { content: ""; display: block; padding-top: calc(76.5625% - 0.5px); }   /* -0.5px: the 1px border keeps the 501px Figma height */
.v3-hero-home__card--referral { grid-area: referral; }
.v3-hero-home__card-title {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 1;
  font-size: max(16px, calc(20 * var(--u)));
  font-weight: 500;
  line-height: 1.3;
}
.v3-hero-home__card--courier .v3-hero-home__card-title { width: 4.8em; }
.v3-hero-home__card--rent .v3-hero-home__card-title { width: 7.15em; }

.v3-hero-home__art { position: absolute; display: block; max-width: none; height: auto; }
/* courier: bag, burger, pizza (percent of the 320x245 card) */
.v3-hero-home__bag { left: 36.25%; top: 0; width: 63.75%; }
.v3-hero-home__burger { left: 19.06%; top: 46.5%; width: 23.33%; }
.v3-hero-home__pizza { left: 76.25%; top: 9.4%; width: 23.75%; }
/* rent: car */
.v3-hero-home__car { left: 0.94%; top: 35.3%; width: 99.06%; }
/* referral: city background + man (320x501 card) */
.v3-hero-home__ref-bg { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.v3-hero-home__man { left: 0; bottom: 0; width: 100%; }

.v3-hero-home__arrow {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 1;
  width: max(38px, calc(46 * var(--u)));
  aspect-ratio: 46 / 46;
  background: url("../../../images/v3/hero_home/arrow-light.svg") center / 100% 100% no-repeat;
  transition: transform 0.2s ease;
}
.v3-hero-home__arrow--teal { background-image: url("../../../images/v3/hero_home/arrow-teal.svg"); }
.v3-hero-home__card:hover .v3-hero-home__arrow { transform: translateX(4px); }

.v3-hero-home__ref-text {
  position: absolute;
  top: 24px;
  left: 24px;
  right: 24px;
  z-index: 1;
  display: block;
  max-width: 273px;
}
.v3-hero-home__badge {
  display: inline-block;
  padding: 8px;
  border-radius: 4px;
  background: var(--v3-white);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--v3-primary);
  font-size: max(12px, calc(18 * var(--u)));
  white-space: nowrap;
  font-weight: 600;
  line-height: 1.3;
}
.v3-hero-home__ref-desc {
  display: block;
  margin-top: 8px;
  font-size: max(11px, calc(16 * var(--u)));
  font-weight: 500;
  line-height: 1.4;
}

/* ---- <= 1024: mobile composition (Figma 430) ---- */
@media (max-width: 1024px) {
  .v3-hero-home__bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "main main"
      "cta cta"
      "courier rent"
      "referral referral";
    row-gap: 12px;
  }
  .v3-hero-home__main { display: contents; }
  .v3-hero-home__copy {
    grid-area: main;
    margin: 0;
    padding: 20px;
    border-radius: var(--v3-radius-md);
    background: linear-gradient(255.785deg, #4aefee 20.394%, #15c0bf 66.645%), var(--v3-primary);
    color: #f4f6f6;
  }
  .v3-hero-home__title { max-width: none; font-size: 32px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
  .v3-hero-home__br { display: none; }
  .v3-hero-home__subtitle { margin-top: 8px; font-size: 20px; line-height: 1.3; }
  .v3-hero-home__text { max-width: none; margin-top: 8px; font-size: 14px; font-weight: 400; line-height: 1.2; }
  .v3-hero-home__cta { grid-area: cta; }

  .v3-hero-home__card { border-radius: var(--v3-radius-md); background: #f8f8f8; }
  .v3-hero-home__card--courier::before,
  .v3-hero-home__card--rent::before { padding-top: calc(80.4233% - 0.5px); }   /* 189:152 */
  .v3-hero-home__card-title { top: 16px; left: 16px; font-size: clamp(14px, 2.2vw, 20px); font-weight: 600; line-height: 1.2; }
  .v3-hero-home__card--courier .v3-hero-home__card-title { width: 5.9em; }
  .v3-hero-home__card--rent .v3-hero-home__card-title { width: 7.1em; }
  .v3-hero-home__arrow { left: 16px; bottom: 16px; width: 46px; }
  .v3-hero-home__bag { left: 40.8%; top: 4.2%; width: 65.3%; }
  .v3-hero-home__burger { left: 24.9%; top: 31.3%; width: 29.9%; }
  .v3-hero-home__pizza { left: 73.8%; top: -2.9%; width: 30.2%; }
  .v3-hero-home__car { left: 9.6%; top: 28%; width: 108%; }

  .v3-hero-home__card--referral { height: 236px; background: var(--v3-white); }
  .v3-hero-home__ref-bg { object-position: center bottom; }
  .v3-hero-home__man { left: auto; right: -12px; bottom: auto; top: -1.3%; width: auto; height: 101%; }
  .v3-hero-home__ref-text { top: 16px; left: 16px; right: auto; max-width: 200px; }
  .v3-hero-home__badge { display: flex; flex-direction: column; white-space: normal; padding: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .v3-hero-home__amount { font-size: 30px; font-weight: 600; line-height: 1.08; }
  .v3-hero-home__badge-label { color: var(--v3-dark); font-size: 20px; font-weight: 700; line-height: 1.3; }
  .v3-hero-home__ref-desc { max-width: 190px; margin-top: 7px; color: var(--v3-gray-300); font-size: 14px; font-weight: 600; line-height: 1.2; }
  .v3-hero-home__card--referral .v3-hero-home__arrow { left: 16px; bottom: 16px; }
}

/* ---- <= 400: narrow cards (~154px wide at 360): keep the art off the title and the arrow button ---- */
@media (max-width: 400px) {
  .v3-hero-home__arrow { width: 36px; left: 12px; bottom: 12px; }
  .v3-hero-home__burger { left: 33%; top: 41%; width: 22%; }
}
