/* Homepage refinements: scale, air, scroll arrival, one slow scene. */

body.home .hero {
  min-height: 0;
  padding: 64px 0 88px;
}

body.home .hero-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 400px);
  grid-template-areas:
    "title photo"
    "copy photo";
  column-gap: 72px;
  row-gap: 0;
  align-items: center;
}

body.home .hero-title-row { grid-area: title; }
body.home .hero-portrait-wrap { grid-area: photo; align-self: center; }
body.home .hero-copy { grid-area: copy; min-width: 0; }

body.home .hero .hero-title-row h1,
body.home .hero h1 {
  font-size: clamp(30px, 4.6vw, 58px) !important;
  line-height: 1.06 !important;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
}

body.home .hero-spine-subs {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.35;
  color: var(--ink);
  font-weight: 500;
  gap: 4px;
}

body.home .hero-portrait {
  max-width: 400px;
}

body.home .hero-category-line {
  text-align: left !important;
  margin-left: 0 !important;
  max-width: 340px !important;
}

body.home h2 {
  font-size: clamp(34px, 4vw, 56px) !important;
  letter-spacing: -0.03em;
  line-height: 1.06;
}

body.home #services .card h3 {
  font-size: 25px !important;
  line-height: 1.2 !important;
  letter-spacing: -0.02em;
}

body.home #services .problem-grid {
  gap: 22px !important;
}

body.home .testimonial-quote {
  font-size: clamp(22px, 2.1vw, 30px);
  line-height: 1.38;
}

body.home .trust-marquee img {
  max-height: 40px;
  opacity: 0.78;
}

body.home .trust-marquee img[src*="standard-life"] { max-height: 46px; }
body.home .trust-marquee img[src*="africa-tech-summit"] { max-height: 52px; }
body.home .trust-marquee img[src*="fihri-foundation"] { max-height: 50px; }

body.home .customer-system {
  padding: 104px 0;
}

#outcomes-strip .outcomes-row {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 40px !important;
}

#outcomes-strip .outcomes-row > div {
  min-width: 0 !important;
  max-width: none !important;
  flex: none !important;
  padding: 0 !important;
  border-right: none !important;
}


@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .reveal {
    opacity: 0;
    transform: translateY(18px);
  }
  .reveal-ready .reveal.in {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(.2, .7, .2, 1), transform 0.7s cubic-bezier(.2, .7, .2, 1);
    transition-delay: var(--d, 0ms);
  }
}

@media (max-width: 820px) {
  body.home .hero {
    padding: 36px 0 64px;
  }
  body.home .hero-grid {
    gap: 36px;
  }
  body.home .customer-system {
    padding: 72px 0;
  }
  #outcomes-strip .outcomes-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 16px !important;
  }
  #outcomes-strip .outcomes-row > div > div:first-child {
    font-size: 17px !important;
    line-height: 1.15 !important;
  }
  #outcomes-strip .outcomes-row > div > div:last-child {
    font-size: 12px !important;
    line-height: 1.35 !important;
  }
}

/* Phones: title and photo share the top row (about 60/40). The questions
   and the rest of the introduction run full width underneath. */
@media (max-width: 430px) {
  body.home .hero {
    min-height: 0;
    padding: 28px 0 56px;
    align-items: flex-start;
  }
  body.home .hero-grid {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    grid-template-areas:
      "title photo"
      "caption caption"
      "copy copy";
    column-gap: 12px;
    row-gap: 16px;
    width: 100%;
    align-items: start;
  }
  body.home .hero-grid > * {
    min-width: 0;
  }
  body.home .hero-title-row {
    max-width: none;
    width: 100%;
  }
  body.home .hero .hero-title-row h1,
  body.home .hero h1 {
    max-width: 100%;
    width: 100%;
    margin-bottom: 0;
    font-size: clamp(16px, 5vw, 22px) !important;
    line-height: 1.18 !important;
    letter-spacing: -0.02em;
    text-wrap: pretty;
    overflow-wrap: normal;
    word-break: normal;
  }
  body.home .hero-portrait-wrap {
    display: contents;
  }
  body.home .hero-portrait {
    grid-area: photo;
    width: 100%;
    max-width: none;
    margin: 0;
    align-self: start;
  }
  body.home .hero-category-line {
    grid-area: caption;
    max-width: none !important;
    width: 100%;
    margin: 0 !important;
  }
  body.home .hero-spine-row {
    display: block;
    width: 100%;
  }
  body.home .hero-spine-subs {
    width: 100%;
  }
  body.home .hero-mini-portrait {
    display: none;
  }
  .nav,
  .nav-inner {
    opacity: 1;
    visibility: visible;
    width: 100%;
    max-width: 100%;
  }
}

/* Three columns are about 110-140px here, so the figures and captions
   break into fragments. Two columns keep the same six items in three rows. */
@media (max-width: 560px) {
  #outcomes-strip .outcomes-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 16px !important;
  }
  #outcomes-strip .outcomes-row > div > div:first-child {
    font-size: 20px !important;
    line-height: 1.15 !important;
  }
  #outcomes-strip .outcomes-row > div > div:last-child {
    font-size: 12px !important;
    line-height: 1.35 !important;
  }
}

/* Scroll arrival never hides the header or anything already on screen. */
.reveal-ready .nav,
.reveal-ready .nav .reveal,
.reveal-ready .hero,
.reveal-ready .hero .reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .work-image img,
  .card,
  .btn {
    transition: none;
  }
  .work-card:hover .work-image img {
    transform: none;
  }
}
