/* ==========================================================================
   Home page — Figma "Homepage v3" 47:3 (desktop 1440) / "Homepage (Mobile) (Final)" 84:33 (390)
   Partners directory styles: partners-directory.css (shared with the partners archive).
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero slider (47:5 / 84:41) — slides stack in one grid cell so the hero grows with its text
   -------------------------------------------------------------------------- */
.home-hero {
  display: block; height: auto; padding: 0;
  min-height: clamp(560px, 52.8vw, 760px);
}
.home-hero .hero-slider__slides { position: relative; inset: auto; display: grid; min-height: inherit; }
.home-hero .hero-slider__slide {
  position: relative; inset: auto; grid-area: 1 / 1;
  display: flex; flex-direction: column; justify-content: flex-start;
  padding: 96px var(--section-x) 120px;
  visibility: hidden; transition: opacity .8s ease, visibility .8s;
}
.home-hero .hero-slider__slide.is-active { visibility: visible; }
.home-hero .hero-slider__slide .home-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.home-hero .hero-slider__slide::after { z-index: 0; }
.home-hero__content { gap: var(--spacing-lg); }
.home-hero__content .label { color: #fff; }
.home-hero__ctas { display: flex; gap: var(--spacing-md); flex-wrap: wrap; }
.home-hero .hero-slider__dots { position: absolute; left: var(--section-x); bottom: 56px; margin: 0; z-index: 2; }
.home-hero .hero-slider__dots button[aria-current="true"] { width: 28px; }
@media (prefers-reduced-motion: reduce) { .home-hero .hero-slider__slide { transition: none; } }

/* --------------------------------------------------------------------------
   What is IPAM (47:17 / 84:254)
   -------------------------------------------------------------------------- */
.home-intro.section { padding: var(--spacing-3xl) var(--section-x-tight); }
.home-intro__inner { display: flex; gap: var(--spacing-2xl); align-items: flex-start; }
.home-intro__text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.home-intro__stats { margin: 0; flex-wrap: nowrap; }
.home-intro__stats .stat { margin: 0; }
.home-intro__stats dd { margin: 0; order: -1; }
.home-intro__stats dt { white-space: nowrap; }
@media (max-width: 1100px) {
  .home-intro__inner { flex-direction: column; }
  .home-intro__stats { flex-wrap: wrap; }
}

/* --------------------------------------------------------------------------
   What we do (47:27 / 84:268)
   -------------------------------------------------------------------------- */
.home-wwd .section-head { margin-bottom: 40px; }
.home-wwd__cards { align-items: stretch; }
.home-wwd__card .card__icon { margin-top: 20px; }
.home-wwd__card .card__icon img { width: 24px; height: 24px; object-fit: contain; }
.home-wwd__card .card__icon:empty { display: block; }
.home-wwd__card .lede { color: var(--color-text-body); }
.card__bar--navy { background: var(--navy-900); }
.link-more--olive { color: var(--olive-700); }
.link-more--green { color: var(--green-700); }
.link-more--amber { color: var(--amber-600); }
.home-wwd .link-more--sage { color: var(--sage-700); }
.home-wwd__card .link-more:hover { color: var(--navy-900); }

/* --------------------------------------------------------------------------
   Core focus / AMME (47:60 / 84:291)
   -------------------------------------------------------------------------- */
.home-focus.section {
  padding: var(--spacing-3xl) var(--section-x-tight);
  display: grid; column-gap: var(--spacing-3xl); row-gap: var(--spacing-md);
  grid-template-columns: 420px minmax(0, 1fr);
  grid-template-rows: 1fr auto auto 1fr;
  grid-template-areas: "media ." "media text" "media link" "media .";
}
.home-focus__media {
  grid-area: media; height: 300px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2); border-radius: var(--radius-lg);
}
.home-focus__media img { width: 100%; height: 100%; object-fit: cover; }
.home-focus__text { grid-area: text; display: flex; flex-direction: column; gap: var(--spacing-md); }
.home-focus__text .lede { color: rgba(255, 255, 255, 0.8); }
.home-focus__link { grid-area: link; }
.home-focus .link-more--sage { color: var(--sage-500); }
.home-focus .link-more--sage:hover { color: #fff; }
.home-focus .glow--bl { bottom: auto; top: -170px; left: -440px; }
@media (max-width: 960px) {
  .home-focus.section { grid-template-columns: 320px minmax(0, 1fr); column-gap: var(--spacing-2xl); }
  .home-focus__media { height: 240px; }
}

/* --------------------------------------------------------------------------
   News & events (47:67 / 85:2)
   -------------------------------------------------------------------------- */
.home-news .section-head { margin-bottom: 32px; }
.home-news__grid { display: grid; grid-template-columns: minmax(0, 760fr) minmax(0, 464fr); gap: var(--spacing-lg); align-items: stretch; }
.home-news__grid--no-featured { grid-template-columns: 1fr; }
.home-news__grid--no-featured .home-news__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-news__featured .media-card__body .card-title { font-size: 22px; line-height: 28px; }
.home-news__featured .media-card__body .lede { color: var(--color-text-body); }
.home-news__featured .card-title a:hover, .home-news__item .card-title a:hover { color: var(--green-700); }
.home-news__featured .media-card__img img { transition: transform .4s ease; }
.home-news__featured:hover .media-card__img img { transform: scale(1.03); }
.home-news__list { display: flex; flex-direction: column; gap: var(--spacing-lg); }
.home-news__item { position: relative; transition: box-shadow .2s; }
.home-news__item:hover { box-shadow: var(--shadow-card); }
.home-news__item .card-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.home-news__ribbon { margin-top: 32px; }
.home-news__ribbon .label { color: var(--amber-500); }
.home-news__ribbon p { color: #fff; }
.home-news__empty { padding: 24px 0; }
@media (max-width: 1100px) {
  .home-news__grid { grid-template-columns: 1fr; }
  .home-news__grid--no-featured .home-news__list { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Flagship resources (47:108 / 85:30)
   -------------------------------------------------------------------------- */
.home-resources .section-head { margin-bottom: 40px; }
.home-resources__grid { align-items: stretch; }
.home-doc { border-color: var(--color-text-muted); align-items: flex-start; }
.home-doc .home-doc__btn { margin-top: auto; }
.doc-icon--corner { flex-shrink: 0; overflow: hidden; }
.doc-icon--corner::after {
  left: auto; right: 0; top: 0; width: 14px; height: 14px; border-radius: 0;
  background: rgba(255, 255, 255, 0.35); box-shadow: none;
}
.home-resources .glow--bl { bottom: auto; top: -46px; left: -440px; }

/* --------------------------------------------------------------------------
   Our journey (47:145 / 86:2)
   -------------------------------------------------------------------------- */
.home-journey .section-head { gap: 10px; }
.home-journey .section-head .lede { max-width: 720px; }
.home-journey__list { outline-offset: 4px; }
.home-journey .timeline__entry { min-height: 88px; }
.home-journey .timeline__entry:nth-child(4n+1)::before { background: var(--navy-900); }
.home-journey .timeline__entry:nth-child(4n+2)::before { background: var(--sage-700); }
.home-journey .timeline__entry:nth-child(4n+3)::before { background: var(--green-600); }
.home-journey .timeline__entry:nth-child(4n)::before { background: var(--amber-500); }
.home-journey .timeline__entry:nth-child(4n+2) .card-title { color: var(--sage-700); }
.home-journey .timeline__entry:nth-child(4n+3) .card-title { color: var(--green-600); }
.home-journey .timeline__entry:nth-child(4n) .card-title { color: var(--amber-500); }
.home-journey .timeline__entry p { color: var(--color-text-body); }
.home-journey .timeline--scroll::-webkit-scrollbar { width: 3px; }
.home-journey .timeline--scroll::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.08); border-radius: 2px; }
.home-journey .timeline--scroll::-webkit-scrollbar-thumb { background: var(--navy-900); border-radius: 2px; }
.home-journey__hint { margin-top: 14px; }

/* --------------------------------------------------------------------------
   Mobile — Figma 84:33 (single column, 24px gutters, stacked cards)
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .home .section:not(.section--band) { padding: 48px 24px; }
  .home .section-head { margin-bottom: 20px; }
  .home .h2 { font-size: 24px; line-height: 1.15; }
  .home .glow { display: none; }

  /* Hero */
  .home-hero { min-height: 560px; }
  .home-hero .hero-slider__slide { justify-content: flex-end; padding: 40px 24px 56px; }
  .home-hero .hero-slider__slide::after {
    background: linear-gradient(180deg, rgba(0, 0, 13, 0.75) 0%, rgba(0, 0, 13, 0.35) 55%, rgba(0, 0, 13, 0.05) 100%);
  }
  .home-hero__content { gap: var(--spacing-md); }
  .home-hero__content .label { font-size: 11px; line-height: 15px; letter-spacing: .22px; color: rgba(255, 255, 255, 0.85); }
  .home-hero .h-hero { font-size: 32px; }
  .home-hero__content .lede { font-size: 15px; line-height: 1.5; }
  .home-hero__ctas { flex-direction: column; gap: 10px; }
  .home-hero__ctas .btn { width: 100%; }
  .home-hero .hero-slider__dots { left: 24px; bottom: 32px; gap: 6px; }
  .home-hero .hero-slider__dots button { width: 6px; height: 6px; }
  .home-hero .hero-slider__dots button[aria-current="true"] { width: 18px; }

  /* What is IPAM */
  .home-intro__inner { gap: 16px; }
  .home-intro__text .lede { font-size: 16px; line-height: 1.5; }
  .home-intro__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; width: 100%; }
  .home-intro__stats .stat { gap: 4px; }
  .home-intro__stats .stat-value { font-size: 28px; line-height: 32px; }
  .home-intro__stats dt { white-space: normal; font-size: 10px; line-height: 12px; letter-spacing: .5px; }

  /* What we do — flat bordered cards, short accent bar, no icon */
  .home-wwd__cards { gap: 20px; }
  .home-wwd__card {
    box-shadow: none; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
    padding: 20px; gap: 8px;
  }
  .home-wwd__card .card__bar { width: 32px; height: 4px; border-radius: 2px; margin: 0 0 4px; }
  .home-wwd__card .card__icon { display: none !important; }
  .home-wwd__card .card-title { font-size: 18px; line-height: 1.12; }
  .home-wwd__card .lede { font-size: 14px; line-height: 1.5; }

  /* Core focus: text, image, link */
  .home-focus.section {
    grid-template-columns: 1fr; grid-template-rows: none;
    grid-template-areas: "text" "media" "link";
  }
  .home-focus__media { height: 220px; }
  .home-focus__text .lede { font-size: 15px; line-height: 1.5; }

  /* News & events */
  .home-news .section-head--row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .home-news__grid, .home-news__list { gap: 20px; }
  .home-news__featured .media-card__img { aspect-ratio: 342 / 180; }
  .home-news__featured .media-card__body { padding: 20px; gap: 10px; }
  .home-news__featured .media-card__body .card-title { font-size: 20px; line-height: 1.2; }
  .home-news__featured .media-card__body .lede { font-size: 15px; line-height: 1.45; }
  .home-news__item { padding: 18px 20px; gap: 8px; }
  .home-news__item .card-title { font-size: 16px; line-height: 1.2; }
  .home-news__ribbon { flex-direction: column; align-items: flex-start; gap: 8px; padding: 24px; margin-top: 20px; }
  .home-news__ribbon p { min-width: 0; font-size: 15px; line-height: 1.5; }

  /* Resources — 2-column tiles */
  .home-resources__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .home-doc { padding: 18px 16px; gap: 10px; border-color: var(--color-border); border-radius: 6px; }
  .home-doc .doc-icon { width: 24px; height: 28px; }
  .home-doc .doc-icon--corner::after { width: 8px; height: 8px; }
  .home-doc .card-title { font-size: 15px; line-height: 1.18; }
  .home-doc .label { font-size: 10px; line-height: 12px; letter-spacing: .2px; }
  .home-doc .home-doc__btn { padding: 0; border: 0; font-size: 12px; letter-spacing: .5px; }
  .home-doc .home-doc__btn:hover { background: none; }

  /* Journey */
  .home-journey .timeline--scroll { max-height: 400px; padding-right: 16px; }
  .home-journey .timeline { padding-left: 30px; }
  .home-journey .timeline::before { left: 6px; }
  .home-journey .timeline__entry { min-height: 94px; }
  .home-journey .timeline__entry::before { left: -30px; top: 4px; width: 13px; height: 13px; }
  .home-journey .timeline__entry .card-title { font-size: 16px; line-height: 22px; }
  .home-journey .timeline__entry p { font-size: 13px; line-height: 1.38; }
  .home-journey .timeline-wrap::after { height: 64px; }
  .home-journey__hint { font-size: 11px; line-height: 14px; letter-spacing: .5px; }
}

/* Equal heights: the compact list matches the featured event, each item shares the height. */
@media (min-width: 1101px) {
  .home-news__grid:not(.home-news__grid--no-featured) .home-news__list > .home-news__item { flex: 1; display: flex; flex-direction: column; justify-content: center; }
}
.home-news__grid--no-featured .home-news__list { align-items: stretch; }
