/* ==========================================================================
   CozyStay V62 - Homepage typography + spacing + equal card rhythm
   Goal:
   - Prevent text shrinking toward lower homepage sections
   - Use one predictable type scale across the home page
   - Keep vertical rhythm and card heights consistent
   ========================================================================== */

body.v62-home main {
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17324d;
}

/* ---------- Section rhythm ---------- */
body.v62-home main > section:not(:first-child),
body.v62-home main > .section:not(:first-child) {
  padding-top: 76px !important;
  padding-bottom: 76px !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* ---------- Section headings ---------- */
body.v62-home main section h2,
body.v62-home main .section h2 {
  font-size: clamp(32px, 3.4vw, 42px) !important;
  line-height: 1.18 !important;
  letter-spacing: -0.04em !important;
  font-weight: 800 !important;
  margin-top: 0 !important;
  margin-bottom: 14px !important;
}

body.v62-home main section h3,
body.v62-home main .section h3 {
  font-size: 22px !important;
  line-height: 1.35 !important;
  letter-spacing: -0.025em !important;
  font-weight: 750 !important;
}

/* ---------- Main body text ---------- */
body.v62-home main section p,
body.v62-home main .section p,
body.v62-home main section li,
body.v62-home main .section li {
  font-size: 15px !important;
  line-height: 1.75 !important;
}

/* Lead / intro copy */
body.v62-home main :is(
  .section-lead,
  .section-description,
  .section-desc,
  .lead,
  .intro,
  .subtitle,
  .subtext
) {
  font-size: 16px !important;
  line-height: 1.75 !important;
  color: #667789 !important;
}

/* ---------- Card typography ---------- */
body.v62-home main :is(
  .card,
  .meeting-card,
  .host-card,
  .profile-card,
  .news-card,
  .gallery-card,
  .program-card,
  .feature-card
) h3 {
  font-size: 21px !important;
  line-height: 1.35 !important;
  margin-bottom: 10px !important;
}

body.v62-home main :is(
  .card,
  .meeting-card,
  .host-card,
  .profile-card,
  .news-card,
  .gallery-card,
  .program-card,
  .feature-card
) p {
  font-size: 14.5px !important;
  line-height: 1.7 !important;
}

/* Small metadata should never become unreadably small */
body.v62-home main :is(
  small,
  .meta,
  .card-meta,
  .date,
  .time,
  .location,
  .caption,
  .eyebrow,
  .kicker,
  .label
) {
  font-size: 13px !important;
  line-height: 1.5 !important;
}

/* ---------- Buttons ---------- */
body.v62-home main :is(a,button).btn,
body.v62-home main :is(a,button)[class*="button"],
body.v62-home main :is(a,button)[class*="cta"] {
  font-size: 14.5px !important;
  font-weight: 800 !important;
  min-height: 44px;
}

/* ---------- Equal card heights ---------- */
body.v62-home main :is(
  .cards,
  .card-grid,
  .grid,
  .meeting-grid,
  .host-grid,
  .news-grid,
  .program-grid,
  .feature-grid
) {
  align-items: stretch !important;
  gap: 18px !important;
}

body.v62-home main :is(
  .cards,
  .card-grid,
  .grid,
  .meeting-grid,
  .host-grid,
  .news-grid,
  .program-grid,
  .feature-grid
) > * {
  height: 100% !important;
}

body.v62-home main :is(
  .card,
  .meeting-card,
  .host-card,
  .profile-card,
  .news-card,
  .program-card,
  .feature-card
) {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}

body.v62-home main :is(
  .card,
  .meeting-card,
  .host-card,
  .profile-card,
  .news-card,
  .program-card,
  .feature-card
) :is(
  .actions,
  .card-actions,
  .buttons,
  .cta-row,
  .card-footer
) {
  margin-top: auto !important;
}

/* ---------- Recent activity images ---------- */
body.v62-home main :is(.gallery-grid,.activity-grid,.recent-gallery) {
  gap: 16px !important;
}

body.v62-home main :is(.gallery-grid,.activity-grid,.recent-gallery) img {
  width: 100%;
  object-fit: cover;
}

/* ---------- Prevent legacy lower-page tiny fonts ---------- */
body.v62-home main section [style*="font-size: 12"],
body.v62-home main section [style*="font-size:12"],
body.v62-home main section [style*="font-size: 11"],
body.v62-home main section [style*="font-size:11"] {
  font-size: 13px !important;
}

/* ---------- Desktop ---------- */
@media (min-width: 1100px) {
  body.v62-home main > section:not(:first-child),
  body.v62-home main > .section:not(:first-child) {
    padding-top: 84px !important;
    padding-bottom: 84px !important;
  }

  body.v62-home main section h2,
  body.v62-home main .section h2 {
    font-size: 42px !important;
  }

  body.v62-home main section p,
  body.v62-home main .section p {
    font-size: 15.5px !important;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  body.v62-home main > section:not(:first-child),
  body.v62-home main > .section:not(:first-child) {
    padding-top: 54px !important;
    padding-bottom: 54px !important;
  }

  body.v62-home main section h2,
  body.v62-home main .section h2 {
    font-size: 30px !important;
    line-height: 1.22 !important;
  }

  body.v62-home main section h3,
  body.v62-home main .section h3 {
    font-size: 20px !important;
  }

  body.v62-home main section p,
  body.v62-home main .section p,
  body.v62-home main section li,
  body.v62-home main .section li {
    font-size: 15px !important;
  }

  body.v62-home main :is(
    small,
    .meta,
    .card-meta,
    .date,
    .time,
    .location,
    .caption,
    .eyebrow,
    .kicker,
    .label
  ) {
    font-size: 12.5px !important;
  }

  body.v62-home main :is(
    .cards,
    .card-grid,
    .grid,
    .meeting-grid,
    .host-grid,
    .news-grid,
    .program-grid,
    .feature-grid,
    .gallery-grid,
    .activity-grid
  ) {
    gap: 14px !important;
  }
}
