/* Home — page-specific styles (RD2 · Figma frame 1:531)
   Column spans follow the 12-col system in main.css (1344 artboard: 432→4, 545→5, 660→6, 774→7). */

/* 01 · Hero: navy band ends halfway down the full-width image */
.home-hero {
  --img-ratio: 0.4643;                                  /* 624 / 1344 */
  --img-w: min(100vw - 2 * var(--gutter), var(--content));
  --white-under: calc(var(--img-w) * var(--img-ratio) / 2);
  padding-top: min(clamp(160px, 21vw, 305px), max(160px, 30.2svh));
  background: linear-gradient(to bottom, var(--navy) calc(100% - var(--white-under)), var(--white) 0);
  color: var(--cream);
}
.home-hero__intro { margin-bottom: clamp(32px, 3.4vw, 64px); }
.home-hero__lede { color: var(--cream); line-height: var(--lh-ui); }
.home-hero__image { aspect-ratio: 1344 / 624; }
@media (max-width: 640px) {
  .home-hero { --img-ratio: 0.75; padding-top: calc(var(--header-h) + 40px); }
  .home-hero__image { aspect-ratio: 4 / 3; }
}

/* Card rows on this page: 1-up <640, 2-up 640–1279, 3-up ≥1280 */
@media (max-width: 1279px) {
  .home-audiences__cards, .home-impact__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .home-audiences__cards, .home-impact__list { grid-template-columns: minmax(0, 1fr); }
}

/* 02 · Who we work with — three photo cards (432×483) with a white panel filling the lower part */
.home-audiences__cards { margin-top: clamp(32px, 3.9vw, 72px); }
.home-audiences__card {
  aspect-ratio: 432 / 483; min-height: auto;
  padding: min(clamp(96px, 8.33vw, 160px), max(96px, 12.0svh)) clamp(18px, 4.17vw, 80px) 18px 18px;   /* 120 / 60 / 18 / 18 @1440 */
}
.home-audiences__panel {
  flex: 1 1 auto; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 32px;
  padding: 24px 30px 24px 24px;
}
.home-audiences__panel h3 { margin-bottom: 12px; }
.home-audiences__partners {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px;
  margin-top: clamp(32px, 3.9vw, 72px); padding-top: 18px; color: var(--slate); font-size: 0.9375rem; line-height: 1.3;
}
.home-audiences__links { display: inline-flex; align-items: baseline; gap: 12px; }
.home-audiences__dot { color: var(--dot); }
@media (max-width: 1279px) {
  .home-audiences__card { aspect-ratio: auto; min-height: min(clamp(420px, 50vw, 560px), max(420px, 72.0svh)); }
}
@media (max-width: 640px) {
  .home-audiences__card { min-height: 0; padding: 160px 12px 12px; }
}

/* 03 · The Gap — full-bleed photo band (791 tall @1440), never wider than ~2.5:1 */
.home-gap {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(clamp(560px, 54.9vw, 1050px), max(560px, 79.1svh)); padding-block: min(clamp(64px, 6.25vw, 120px), max(64px, 9.0svh));
}
.home-gap__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; z-index: -2; }
.home-gap::before { /* legibility scrim for white text on the bright sky */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(16, 34, 57, .45) 0%, rgba(16, 34, 57, .2) 55%, rgba(16, 34, 57, 0) 80%);
}
.home-gap__split { --a-span: 4; --b-start: 7; --b-span: 6; margin-top: 24px; }
.home-gap__split .text-lg { max-width: var(--measure); }
@media (max-width: 1279px) {
  .home-gap__split { --a-span: 5; }
}
@media (max-width: 900px) {
  .home-gap { min-height: 0; padding-block: 72px 320px; }
  .home-gap::before { background: linear-gradient(to bottom, rgba(16, 34, 57, .7) 0%, rgba(16, 34, 57, .45) 60%, rgba(16, 34, 57, 0) 100%); }
}

/* 04 · What We Build — rows: photo (4 cols) | title, copy and link (4 cols from col 9) */
.home-build__list { margin-top: calc(var(--space-block) + 12px); }
.home-build__item {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); row-gap: 24px; align-items: center;
  padding-block: clamp(24px, 2.5vw, 48px); border-top: 1px solid var(--line);
}
.home-build__image { grid-column: 1 / span 4; aspect-ratio: 431 / 198; }
.home-build__image img { transition: transform .6s ease; }
.home-build__item:hover .home-build__image img { transform: scale(1.03); }
.home-build__body { grid-column: 9 / span 4; display: flex; flex-direction: column; align-items: flex-start; }
.home-build__body .text-lg { margin-top: 12px; max-width: var(--measure); }
.home-build__body .link-arrow { margin-top: 36px; }
@media (max-width: 1279px) {
  .home-build__image { grid-column: 1 / span 5; }
  .home-build__body { grid-column: 7 / span 6; }
}
@media (max-width: 1023px) {
  .home-build__image { grid-column: 1 / span 6; aspect-ratio: 3 / 2; }
  .home-build__body { grid-column: 7 / span 6; }
}
@media (max-width: 640px) {
  .home-build__item { grid-template-columns: minmax(0, 1fr); padding-block: 28px; }
  .home-build__image, .home-build__body { grid-column: 1 / -1; }
  .home-build__body .text-lg { font-size: var(--fs-md); }
  .home-build__body .link-arrow { margin-top: 24px; }
}

/* 05 · The Agreement: 432 | 660 */
.home-agreement__split { --a-span: 4; --b-start: 7; --b-span: 6; }
.home-agreement__split .text-lg { max-width: var(--measure); }
@media (max-width: 1279px) {
  .home-agreement__split { --a-span: 5; }
}

/* 06 · Savings list: 774 | 433 */
.home-savings__grid { --a-span: 7; --b-start: 9; --b-span: 4; }
.home-savings__list { margin-top: 60px; }
.home-savings__item { padding: 24px 0; }
.home-savings__item + .home-savings__item { border-top: 1px solid var(--line); }
.home-savings__item p { margin-top: 9px; max-width: var(--measure); }
.home-savings__image { aspect-ratio: 433 / 562; }
@media (max-width: 1279px) {
  .home-savings__grid { --b-start: 8; --b-span: 5; }
}
@media (max-width: 900px) {
  .home-savings__list { margin-top: 32px; }
  .home-savings__image { aspect-ratio: 4 / 3; }
}

/* 07 · The team: 538 copy | 660 video */
.home-team__grid { --a-span: 5; --b-start: 7; --b-span: 6; }
.home-team__copy { display: grid; justify-items: start; gap: 30px; padding-bottom: 60px; }
.home-team__copy .text-lg { max-width: var(--measure); }
.home-team__copy .btn { margin-top: 6px; }
.home-team__video { --video-overlay: rgba(83, 85, 100, 0.4); aspect-ratio: 660 / 596; }
@media (max-width: 1279px) {
  .home-team__grid { --a-span: 6; }
}
@media (max-width: 900px) {
  .home-team__copy { padding-bottom: 0; }
  .home-team__video { aspect-ratio: 4 / 3; }
}

/* 08 · Impact — 432×410 photo cards, 318-wide white panel */
.home-impact { padding-block: clamp(48px, 4.2vw, 80px) min(clamp(72px, 7.1vw, 136px), max(72px, 10.2svh)); }
.home-impact__list { margin-top: 30px; }
.home-impact__card { aspect-ratio: 432 / 410; min-height: auto; padding: 24px 22.2% 18px 18px; }
.home-impact__panel { display: flex; flex-direction: column; justify-content: space-between; gap: 36px; min-height: min(clamp(200px, 15.35vw, 280px), max(200px, 22.1svh)); }
.home-impact__panel .text-lg { padding-right: 36px; }
@media (max-width: 1279px) {
  .home-impact__card { padding-right: 18%; }
}
@media (max-width: 640px) {
  .home-impact__card { aspect-ratio: auto; padding: 160px 12px 12px; }
  .home-impact__panel { min-height: 0; }
}

/* 09 · Our technology: 428 copy | 774 screen */
.home-tech { padding-block: calc(var(--section-pt) + 24px) var(--section-pb); }
.home-tech__grid { --a-span: 4; --b-start: 6; --b-span: 7; }
.home-tech__copy { display: grid; gap: 30px; padding-bottom: 60px; }
.home-tech__copy .text-lg { max-width: var(--measure); }
.home-tech .screen img { aspect-ratio: 742 / 441; object-fit: cover; object-position: top left; }
@media (max-width: 1279px) {
  .home-tech__grid { --a-span: 5; --b-start: 6; --b-span: 7; }
}
@media (max-width: 900px) {
  .home-tech__copy { padding-bottom: 16px; }
}

/* 10 · Marketplace */
.home-market { padding-block: calc(var(--section-pt) + 24px) var(--section-pb); }
.home-market__copy { display: grid; gap: 36px; max-width: max(660px, 50% - var(--grid-gap) / 2); }
.home-market__copy .text-lg { max-width: var(--measure); }
.home-market__buttons { margin-top: 24px; }
.home-market__buttons .btn { min-width: 224px; }
.home-market__links { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 24px; padding-block: 24px; font-size: var(--fs-md); letter-spacing: -0.01em; }
@media (max-width: 640px) {
  .home-market__buttons .btn { flex: 1 1 100%; }
}

@media (min-width: 901px) {
  /* Viewport fit: hero image and The Gap band stay within a laptop screen (see main.css) */
  .home-hero {
    --img-h: min(var(--img-w) * var(--img-ratio), max(340px, 100svh - 330px));
    --white-under: calc(var(--img-h) / 2);
    padding-top: min(clamp(160px, 21vw, 305px), max(160px, 27svh));
  }
  .home-hero__image { aspect-ratio: auto; height: var(--img-h); }
  .home-gap { min-height: min(clamp(560px, 54.9vw, 1050px), max(560px, 88svh)); }
}
