/* Homepage styling. Loaded after the shared stylesheet so these
   adjustments do not change the layout of other pages. */
.home-reframe .join-banner {
  background: #0d253d;
  border-color: #0d253d;
}

.home-reframe .join-banner h2 {
  color: #fff;
}

.home-reframe .join-banner-copy p {
  color: #c5d1dd;
}

.home-reframe .join-btn-outline {
  border-color: #d4deea;
  color: #fff;
}

.home-reframe .join-btn-outline:hover,
.home-reframe .join-btn-outline:focus-visible {
  background: #fff;
  border-color: #fff;
  color: #0d253d;
}

.home-reframe .join-banner-link {
  color: #c5b9ff;
}

.home-reframe .join-banner a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

@media (max-width: 980px) {
  /* Clip inactive slides without creating a nested scroll container that
     focus can scroll when a shorter banner becomes active. */
  .new-hero,
  .home-hero-slides {
    overflow: clip;
  }

  .home-hero-slides,
  .new-hero-grid.is-copy-only,
  .home-past-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Only the visible slide sets the row height. Hidden content must not
     stretch the current campaign or force the grid beyond the viewport. */
  .home-hero-slide {
    position: absolute;
    inset: 0;
    min-width: 0;
    min-height: 0;
  }

  .home-hero-slide.is-active {
    position: relative;
    inset: auto;
  }

  .home-current-slide .new-hero-grid,
  .home-past-grid {
    min-width: 0;
    min-height: 0;
    padding-top: clamp(32px, 6vw, 56px);
    padding-bottom: 28px;
    gap: 28px;
  }

  .hero-copy {
    min-width: 0;
    padding-top: 0;
  }

  /* Shared fixed-size !important rules otherwise override the fluid type. */
  .home-reframe .hero-copy h1 {
    font-size: clamp(2rem, 9.5vw, 3.5rem) !important;
    line-height: 1.08 !important;
    overflow-wrap: anywhere !important;
    margin-top: 24px;
  }

  html[lang="ta"] .home-reframe .hero-copy h1 {
    font-size: clamp(1.8rem, 7.8vw, 3rem) !important;
    line-height: 1.35 !important;
  }

  .hero-copy > p {
    margin-top: 22px;
  }

  .home-reframe main :is(h2, h3) {
    overflow-wrap: anywhere !important;
  }

  .month-pill {
    max-width: 100%;
  }

  .month-pill .pulse-dot,
  .month-pill > span:last-child {
    flex-shrink: 0;
  }

  .month-pill > span:nth-child(2) {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  /* Keep every banner reachable with visible, touch-sized controls. */
  .home-hero-controls {
    position: relative;
    inset: auto;
    display: flex !important;
    justify-content: center;
    padding-block: 14px 20px;
    background: #faf9ff;
  }

  .home-hero-controls > button {
    width: 44px;
    height: 44px;
  }

  .home-hero-dots {
    height: 44px;
    gap: 0;
    padding-inline: 6px;
  }

  .home-hero-dots button,
  .home-hero-dots button[aria-pressed="true"] {
    position: relative;
    width: 32px;
    height: 44px;
    border-radius: 0;
    background: transparent;
  }

  .home-hero-dots button::after {
    content: "";
    position: absolute;
    top: 18px;
    left: 12px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #b8c2d0;
  }

  .home-hero-dots button[aria-pressed="true"]::after {
    background: #533afd;
  }

  /* Posters retain their own proportions instead of inheriting the height
     of the text/video slides. Tablet captions flow below the landscape art. */
  .home-hero-slide.home-kamarajar-slide {
    min-height: 0;
    aspect-ratio: auto;
    align-self: start;
  }

  .home-kamarajar-slide > picture {
    position: relative;
    inset: auto;
  }

  .home-kamarajar-slide > picture > img {
    display: block;
    height: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .home-kamarajar-caption {
    position: relative;
    inset: auto;
    padding: 28px var(--gutter);
  }

  .home-past-grid {
    display: grid;
  }

  .home-past-video {
    width: min(100%, 430px);
    transform: none;
  }

  /* Two half-width cards leave the tablet copy in a narrow strip. */
  .home-reframe .inst-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .inst-card {
    min-width: 0;
  }

  .home-reframe .inst-card h3,
  .home-reframe .inst-card p,
  .home-reframe .inst-kicker {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .inst-kicker {
    letter-spacing: .06em;
  }

  .inst-bar-in {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .inst-bar-label {
    text-align: left;
    white-space: normal;
  }

  .inst-pills {
    max-width: 100%;
    overflow-x: auto;
  }
}

@media (min-width: 721px) and (max-width: 980px) {
  .inst-card {
    min-height: 360px;
  }

  .home-reframe .inst-card h3,
  .home-reframe .inst-card p,
  .home-reframe .inst-kicker {
    max-width: 62%;
  }
}

@media (max-width: 640px) {
  .home-reframe .hero-copy h1 {
    font-size: clamp(2rem, 9.5vw, 3rem) !important;
  }

  .home-kamarajar-caption {
    display: none;
  }

  .hero-actions {
    flex-wrap: wrap;
    flex-direction: row;
    align-items: center;
    gap: 18px 22px;
    margin-top: 26px;
  }

  .hero-actions .btn,
  .home-past-grid .btn,
  .join-btn,
  .start-card-btn {
    max-width: 100%;
    white-space: normal;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .join-btn {
    padding: 12px 20px;
  }

  .start-card-btn {
    padding: 10px 16px;
  }

  .inst-wrap {
    width: calc(100% - var(--gutter) * 2);
  }

  .inst-card {
    padding: 24px;
  }

  .app-download-panel {
    min-width: 0;
    padding: 36px 0;
  }

  .app-download-panel h2 {
    max-width: none;
  }
}
