/* Hikari Link v1.0.246 — approved title-area height alignment only.
 * /first/ is the reference; visual/photo assets and A/B/C washes stay unchanged.
 * Intentionally scoped to each page's opening title and homepage hero.
 */

/* Homepage: keep the approved image, masks, copy and square CTA intact. */
@media (min-width: 1021px) {
  body.home #main-content > .hl-hero .hl-hero__grid {
    min-height: 730px;
  }
  body.home #main-content > .hl-hero .hl-hero__copy {
    padding-block: 72px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  body.home #main-content > .hl-hero h1 {
    font-size: clamp(70px, 5.1vw, 76px);
    line-height: 1.38;
  }
  body.home #main-content > .hl-hero .hl-hero__lead { margin-top: 29px; }
  body.home #main-content > .hl-hero .hl-actions { margin-top: 26px; }
  body.home #main-content > .hl-hero .hl-hero__visual,
  body.home #main-content > .hl-hero .hl-hero__visual img { min-height: 730px; }
}
@media (min-width: 761px) and (max-width: 1020px) {
  body.home #main-content > .hl-hero .hl-hero__grid { min-height: 648px; }
  body.home #main-content > .hl-hero .hl-hero__copy { padding-block: 60px; }
  body.home #main-content > .hl-hero .hl-hero__visual,
  body.home #main-content > .hl-hero .hl-hero__visual img { min-height: 648px; }
}
@media (max-width: 760px) {
  body.home #main-content > .hl-hero .hl-hero__copy { padding-block: 32px 44px; }
  body.home #main-content > .hl-hero .hl-hero__visual { max-height: none; }
  body.home #main-content > .hl-hero .hl-hero__lead { margin-top: 19px; }
  body.home #main-content > .hl-hero .hl-actions { margin-top: 22px; }
}

/* Desktop titles — the current /first/ opening section is 430px.
 * Avoid editing shared .hl-hero, .hl-section, and body-level styles. */
@media (min-width: 761px) {
  :is(#main-content,#main) > :is(
    .hl-first-hero,.hl-ah-hero,.hl-flow-hero,.hl-reasons-hero,.hl-choose-hero,
    .hl-issues-hero,.hl-young-hero,.hl-private-hero,.hl-branding-hero,.hl-workplace-hero,
    .hl-services-hero,.hl-website-hero,.hl-seoai-hero,.hl-sns-hero,.hl-meo-hero,
    .hl-spt-hero,.hl-rec-hero,.hl-profile-hero,
    .hl-works-hero,.hl-voice-hero,.hl-faq-page-hero,.hl-c-blog-hero,
    .hl-pricing-page .hl-page-hero
  ) {
    min-height: 430px;
    padding-block: 0;
  }
  :is(#main-content,#main) > :is(
    .hl-first-hero,.hl-ah-hero,.hl-flow-hero,.hl-reasons-hero,.hl-choose-hero,
    .hl-issues-hero,.hl-young-hero,.hl-private-hero,.hl-branding-hero,.hl-workplace-hero,
    .hl-services-hero,.hl-website-hero,.hl-seoai-hero,.hl-sns-hero,.hl-meo-hero,
    .hl-spt-hero,.hl-rec-hero,.hl-profile-hero,
    .hl-works-hero,.hl-voice-hero,.hl-faq-page-hero
  ) > .hl-container {
    min-height: 430px;
    height: auto;
    align-items: stretch;
  }
  :is(#main-content,#main) > :is(
    .hl-first-hero,.hl-ah-hero,.hl-flow-hero,.hl-reasons-hero,.hl-choose-hero,
    .hl-issues-hero,.hl-young-hero,.hl-private-hero,.hl-branding-hero,.hl-workplace-hero,
    .hl-services-hero,.hl-website-hero,.hl-seoai-hero,.hl-sns-hero,.hl-meo-hero,
    .hl-spt-hero,.hl-rec-hero,.hl-profile-hero,
    .hl-works-hero,.hl-voice-hero,.hl-faq-page-hero
  ) > .hl-container > [class*="__copy"] {
    align-self: center;
    padding-block: 30px;
  }
  :is(#main-content,#main) > :is(
    .hl-first-hero,.hl-ah-hero,.hl-flow-hero,.hl-reasons-hero,.hl-choose-hero,
    .hl-issues-hero,.hl-young-hero,.hl-private-hero,.hl-branding-hero,.hl-workplace-hero,
    .hl-services-hero,.hl-website-hero,.hl-seoai-hero,.hl-sns-hero,.hl-meo-hero,
    .hl-spt-hero,.hl-rec-hero,.hl-profile-hero,
    .hl-works-hero,.hl-voice-hero,.hl-faq-page-hero
  ) > .hl-container > [class*="__visual"] {
    min-height: 430px;
    height: 430px;
    align-self: stretch;
  }
  :is(#main-content,#main) > :is(
    .hl-flow-hero,.hl-reasons-hero,.hl-choose-hero,.hl-young-hero,
    .hl-private-hero,.hl-branding-hero,.hl-workplace-hero,.hl-profile-hero,
    .hl-works-hero,.hl-voice-hero,.hl-faq-page-hero
  ) > .hl-container > [class*="__visual"] > img {
    min-height: 0;
    height: 100%;
    object-fit: cover;
  }
  #main-content.hl-blog-page > .hl-c-blog-hero,
  #main-content.hl-pricing-page > .hl-page-hero {
    min-height: 430px;
    display: grid;
    align-items: center;
  }
  #main-content.hl-contact-page .hl-contact-page__intro {
    min-height: 430px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 33px;
  }
  #main-content.hl-privacy-page .hl-privacy__hero {
    min-height: 430px;
    display: grid;
    align-items: center;
  }
}

/* Mobile — independent safe sizing; /first/ is ~433px at 390px and
 * 400px at 320px. Text may grow taller on long-title pages. */
@media (max-width: 760px) {
  :is(#main-content,#main) > :is(
    .hl-first-hero,.hl-ah-hero,.hl-flow-hero,.hl-reasons-hero,.hl-choose-hero,
    .hl-issues-hero,.hl-young-hero,.hl-private-hero,.hl-branding-hero,.hl-workplace-hero,
    .hl-services-hero,.hl-website-hero,.hl-seoai-hero,.hl-sns-hero,.hl-meo-hero,
    .hl-spt-hero,.hl-rec-hero,.hl-profile-hero,
    .hl-works-hero,.hl-voice-hero,.hl-faq-page-hero,.hl-c-blog-hero
  ) {
    min-height: 430px;
  }
  #main-content.hl-contact-page .hl-contact-page__intro,
  #main-content.hl-privacy-page .hl-privacy__hero,
  #main-content.hl-pricing-page > .hl-page-hero,
  #main-content.hl-blog-page > .hl-c-blog-hero {
    min-height: 430px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  #main-content.hl-contact-page .hl-contact-page__intro { margin-bottom: 33px; }
}
@media (max-width: 360px) {
  :is(#main-content,#main) > :is(
    .hl-first-hero,.hl-ah-hero,.hl-flow-hero,.hl-reasons-hero,.hl-choose-hero,
    .hl-issues-hero,.hl-young-hero,.hl-private-hero,.hl-branding-hero,.hl-workplace-hero,
    .hl-services-hero,.hl-website-hero,.hl-seoai-hero,.hl-sns-hero,.hl-meo-hero,
    .hl-spt-hero,.hl-rec-hero,.hl-profile-hero,
    .hl-works-hero,.hl-voice-hero,.hl-faq-page-hero,.hl-c-blog-hero
  ) { min-height: 400px; }
  #main-content.hl-contact-page .hl-contact-page__intro,
  #main-content.hl-privacy-page .hl-privacy__hero,
  #main-content.hl-pricing-page > .hl-page-hero,
  #main-content.hl-blog-page > .hl-c-blog-hero { min-height: 400px; }
}

/* Reconcile the legacy strongly-scoped v224 hero minimums without touching
 * the approved page body or the per-page photo fade/color treatment. */
@media (min-width: 761px) {
  #main-content#main-content :is(.hl-v224-hero, .hl-seoai-approved-hero) {
    min-height: 430px !important;
  }
  #main-content#main-content :is(.hl-v224-hero, .hl-seoai-approved-hero) > .hl-v224-grid {
    min-height: 430px !important;
  }
  #main-content#main-content :is(.hl-v224-hero, .hl-seoai-approved-hero) .hl-v224-photo,
  #main-content#main-content.hl-seoai-page .hl-seoai-hero .hl-seoai-hero__visual,
  #main-content#main-content.hl-sns-page .hl-sns-hero .hl-sns-hero__visual,
  #main-content#main-content.hl-spt-page .hl-spt-hero .hl-spt-hero__visual {
    min-height: 430px !important;
  }
  #main-content#main-content :is(.hl-v224-hero, .hl-seoai-approved-hero) .hl-v224-photo img,
  #main-content#main-content.hl-seoai-page .hl-seoai-hero .hl-seoai-hero__visual img,
  #main-content#main-content.hl-sns-page .hl-sns-hero .hl-sns-hero__visual img {
    min-height: 430px !important;
  }
  /* The approved works H1 has an explicit line break; use the desktop text
     space rather than shrinking its type. Keep the unique C photo/fade. */
  #main.hl-works-page > .hl-works-hero.hl-c-hero .hl-works-hero__grid {
    grid-template-columns: minmax(0, 62%) minmax(0, 38%) !important;
    min-height: 430px !important;
  }
  #main.hl-works-page > .hl-works-hero.hl-c-hero .hl-works-hero__copy {
    padding: 22px 24px 22px 0 !important;
  }
  #main-content#main-content.hl-blog-page > .hl-c-blog-hero.hl-c-hero {
    min-height: 430px !important;
    padding-block: 0 !important;
  }
}
@media (min-width: 761px) and (max-width: 900px) {
  /* The legacy independent-menu titles switch to vertical at 900px;
     retain the aligned desktop title at tablet width, without cropping. */
  #main.hl-works-page > .hl-works-hero.hl-c-hero .hl-works-hero__grid,
  #main-content.hl-voice-page > .hl-voice-hero.hl-c-hero .hl-voice-hero__grid,
  #main-content.hl-faq-page > .hl-faq-page-hero.hl-c-hero .hl-faq-page-hero__grid {
    grid-template-columns: minmax(0, 58%) minmax(0, 42%) !important;
    min-height: 430px !important;
  }
  #main.hl-works-page > .hl-works-hero.hl-c-hero .hl-works-hero__visual,
  #main-content.hl-voice-page > .hl-voice-hero.hl-c-hero .hl-voice-hero__visual,
  #main-content.hl-faq-page > .hl-faq-page-hero.hl-c-hero .hl-faq-page-hero__visual {
    min-height: 430px !important;
    height: 430px;
    aspect-ratio: auto !important;
  }
  #main.hl-works-page > .hl-works-hero.hl-c-hero .hl-works-hero__copy,
  #main-content.hl-voice-page > .hl-voice-hero.hl-c-hero .hl-voice-hero__copy,
  #main-content.hl-faq-page > .hl-faq-page-hero.hl-c-hero .hl-faq-page-hero__copy {
    padding: 26px 12px 26px 0 !important;
  }
}
@media (max-width: 760px) {
  /* Avoid legacy extra 56px above and below the works title. */
  #main.hl-works-page > .hl-works-hero.hl-c-hero { padding-block: 0; }
  #main-content#main-content.hl-blog-page > .hl-c-blog-hero.hl-c-hero {
    min-height: 430px !important;
    padding-block: 0 !important;
  }
}
@media (max-width: 360px) {
  #main-content#main-content.hl-blog-page > .hl-c-blog-hero.hl-c-hero { min-height: 400px !important; }
}

/* The v224 family intentionally repeats its class three times for historical
 * specificity; match that existing boundary only where alignment requires it. */
@media (min-width: 761px) {
  #main-content#main-content .hl-v224-hero.hl-v224-hero.hl-v224-hero,
  #main-content#main-content .hl-v224-hero.hl-v224-hero.hl-v224-hero > .hl-v224-grid,
  #main-content#main-content .hl-v224-hero.hl-v224-hero.hl-v224-hero .hl-v224-photo {
    min-height: 430px !important;
  }
  #main-content#main-content.hl-spt-page .hl-spt-hero .hl-spt-hero__grid,
  #main-content#main-content.hl-spt-page .hl-spt-hero .hl-spt-hero__visual img {
    min-height: 430px !important;
  }
}

/* Standard WordPress pages with the generic title-only header (not articles). */
body.page:not(.home) #main-content.hl-main > .hl-page-hero:not(.hl-page-hero--article) {
  min-height: 430px;
  display: flex;
  align-items: center;
  padding-block: 0;
}
@media (max-width: 360px) {
  body.page:not(.home) #main-content.hl-main > .hl-page-hero:not(.hl-page-hero--article) {
    min-height: 400px;
  }
}
@media (min-width: 761px) and (max-width: 1020px) {
  body.home #main-content > .hl-hero h1 { font-size: clamp(44px, 5.9vw, 55px); }
}

/* Mobile-only normalization of old hero SECTION padding (not body-section
 * spacing): this recovers unnecessary 62–136px without cropping image/text. */
@media (max-width: 760px) {
  #main-content#main-content.hl-issues-page > .hl-issues-hero,
  #main-content#main-content.hl-services-page > .hl-services-hero,
  #main-content#main-content.hl-young-page > .hl-young-hero,
  #main-content#main-content.hl-branding-page > .hl-branding-hero,
  #main-content#main-content.hl-private-page > .hl-private-hero,
  #main-content#main-content.hl-profile-page > .hl-profile-hero,
  #main-content#main-content.hl-voice-page > .hl-voice-hero,
  #main.hl-works-page > .hl-works-hero {
    padding-block: 0 !important;
  }
  #main-content#main-content.hl-services-page .hl-services-hero__copy {
    padding-block: 30px 20px;
  }
  #main-content#main-content.hl-profile-page .hl-profile-hero__copy {
    padding-block: 26px 18px;
  }
  #main-content#main-content.hl-voice-page .hl-voice-hero__copy {
    padding-block: 18px 10px !important;
  }
  #main-content#main-content.hl-workplace-page .hl-workplace-hero__copy {
    padding-block: 26px 20px;
  }
  #main-content#main-content.hl-flow-page .hl-flow-hero > .hl-flow-hero__inner {
    min-height: 430px;
  }
  #main-content#main-content .hl-v224-hero.hl-v224-hero.hl-v224-hero {
    min-height: 430px !important;
  }
  #main-content#main-content .hl-v224-hero.hl-v224-hero.hl-v224-hero .hl-v224-copy {
    padding-block: 23px 12px !important;
  }
}
@media (max-width: 360px) {
  #main-content#main-content.hl-flow-page .hl-flow-hero > .hl-flow-hero__inner {
    min-height: 400px;
  }
  #main-content#main-content .hl-v224-hero.hl-v224-hero.hl-v224-hero {
    min-height: 400px !important;
  }
}
