/* ==========================================================================
   Home page (src/index.njk). Builds on styles.css; only page-specific layout
   lives here. Colours use the semantic tokens so light and dark themes work.
   ========================================================================== */

/* Short sections: a little less vertical space than inner pages */
.page-home .section {
  padding: clamp(56px, 7vw, 96px) 0;
}

/* Heading left, "All …" link right: line the link up with the heading block's last line
   (a bare h2 or the lead under it carries no bottom margin, so the link sits on its baseline) */
.page-home .section-head.split > h2,
.page-home .section-head.split .lead {
  margin-bottom: 0;
}
.page-home .section-head.split .lead {
  margin-top: 4px;
}

/* ---------- 1. Hero: the motto, one line on who we are, a photo of Mumbai ---------- */

.home-hero {
  padding: clamp(48px, 7vw, 96px) 0 clamp(48px, 6vw, 88px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.home-hero .container {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.home-hero h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.7rem);
  line-height: 1.08;
  max-width: 13em;
  margin-bottom: 0.55em;
}
/* The second sentence of the motto starts on its own line */
.home-hero h1 em {
  display: block;
  font-style: italic;
  color: var(--accent);
}
.home-hero .lead {
  font-size: 1.18rem;
  max-width: 30em;
  margin: 0;
}
.home-hero .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.home-hero-photo {
  margin: 0;
  width: 100%;
  max-width: 580px;
  justify-self: end;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg-alt);
}
.home-hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 2. Who we are + How we think ---------- */

/* Stacked: "Who we are", then "How we think" below it. On wide screens each block puts its
   heading on the left and the text on the right; on phones they stack (see the 680px rules). */
.home-pair {
  display: grid;
  grid-template-columns: 1fr;
}
.home-pair > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  column-gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.home-pair > div + div {
  margin-top: clamp(32px, 4vw, 48px);
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--line);
}
.home-pair h2 {
  grid-row: span 2;
  margin: 0;
  font-size: clamp(1.7rem, 2.8vw, 2.2rem);
}
.home-pair p,
.home-pair .link-arrow {
  grid-column: 2;
  justify-self: start;
}
.home-pair p {
  font-size: 1.06rem;
  max-width: 34em;
  margin: 0.2em 0 16px;
}

/* ---------- 3. The offering: one card, the four qualities as a teaser ---------- */

.home-offer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding: clamp(28px, 5vw, 56px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.home-offer h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
}
.home-offer-copy p:not(.eyebrow) {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 26em;
  margin-bottom: 28px;
}
.home-qualities {
  list-style: none;
  counter-reset: quality;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.home-qualities li {
  counter-increment: quality;
  padding: 20px 20px 22px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  font: 500 1.12rem/1.35 var(--font-serif);
  color: var(--heading);
}
.home-qualities li::before {
  content: counter(quality, decimal-leading-zero);
  display: block;
  margin-bottom: 10px;
  font: 500 0.85rem/1 var(--font-serif);
  color: var(--accent-text);
}

/* ---------- 4. Insights: the four sections, each with its latest item ---------- */

/* Each tile spans four rows of the grid (name, description, latest, link) through
   subgrid, so the "Latest" lines and links sit level across a row of tiles */
.home-sections > li,
.home-sections .home-section {
  grid-row: span 4;
  display: grid;
  grid-template-rows: subgrid;
  row-gap: 0;
}
.home-section h3 {
  font-size: 1.35rem;
  margin-bottom: 8px;
}
.home-section .link-arrow {
  align-self: end;
  justify-self: start;
}
.home-section > p:not(.home-latest) {
  font-size: 0.95rem;
}
.home-latest {
  margin: 4px 0 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  line-height: 1.45;
}
.home-latest-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.card .home-latest a {
  font: 500 1.02rem/1.35 var(--font-serif);
  color: var(--heading);
  text-decoration: none;
}
.card .home-latest a:hover {
  color: var(--accent-text);
  text-decoration: underline;
}

/* ---------- 6. Closing band ---------- */

.cta-band .home-careers {
  margin-top: 14px;
  font-size: 0.95rem;
}
.cta-band .home-careers a {
  color: var(--panel-accent);
}
.cta-band .home-careers a:hover {
  color: var(--on-panel);
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .home-hero .container {
    gap: 32px;
  }
  .home-offer {
    grid-template-columns: 1fr;
  }
}

/* The photo moves under the copy once the two columns get narrow */
@media (max-width: 760px) {
  .home-hero .container {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .home-hero-photo {
    justify-self: stretch;
    max-width: none;
  }
}

@media (max-width: 680px) {
  .home-hero .lead {
    font-size: 1.08rem;
  }
  .home-pair > div {
    grid-template-columns: 1fr;
  }
  .home-pair h2 {
    grid-row: auto;
    margin-bottom: 12px;
  }
  .home-pair p,
  .home-pair .link-arrow {
    grid-column: 1;
  }
  .home-pair > div + div {
    margin-top: 36px;
    padding-top: 36px;
  }
  .home-offer {
    padding: 28px 22px;
  }
  /* The four qualities as a short numbered list */
  .home-qualities {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .home-qualities li {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 12px 16px;
    font-size: 1.04rem;
  }
  .home-qualities li::before {
    margin: 0;
    flex: none;
  }
  /* One column of section tiles: keep each one compact */
  .home-section {
    padding: 20px 22px;
  }
  .home-section h3 {
    font-size: 1.25rem;
    margin-bottom: 4px;
  }
  .home-section > p:not(.home-latest) {
    margin-bottom: 12px;
  }
  .home-latest {
    margin-bottom: 14px;
    padding-top: 12px;
  }
}
