/*
 * Shared type scale
 *
 * The reference site keeps Japanese body copy around 15px and reserves
 * oversized type for a small number of decorative English elements. This
 * layer is loaded after page-specific CSS so headings keep one clear scale
 * across the recruitment site without changing any page content.
 */

:root {
    --recruit-type-body: clamp(0.94rem, 0.18vw + 0.9rem, 1rem);
    --recruit-type-display: clamp(2.35rem, 3.7vw, 3.1rem);
    --recruit-type-page-title: clamp(2.15rem, 3.2vw, 2.8rem);
    --recruit-type-section: clamp(1.9rem, 2.8vw, 2.25rem);
    --recruit-type-subsection: clamp(1.25rem, 1.8vw, 1.55rem);
    --recruit-type-card: clamp(1.1rem, 1.6vw, 1.25rem);
}

body.antialiased {
    font-size: var(--recruit-type-body);
    line-height: 1.8;
}

/* Headings use normal wrapping by default. Apply balancing only to short, intentional display headings. */
main h1,
main h2,
main h3,
main h4 {
    letter-spacing: 0;
    overflow-wrap: normal;
    text-wrap: wrap;
}

main p,
main li,
main dd {
    text-wrap: pretty;
}

/*
 * Pretty wrapping balances lines for editorial copy, but at phone widths it
 * deliberately leaves a different amount of open space on each line. Keep
 * mobile body text flowing naturally across the available measure instead.
 */
@media (max-width: 767px) {
    main p,
    main li,
    main dd {
        text-wrap: wrap;
    }

    .nursing-policy-page-title {
        font-size: clamp(1.55rem, 7.3vw, 1.875rem) !important;
        line-height: 1.28 !important;
        text-wrap: wrap;
    }

    .nursing-policy-title-first,
    .nursing-policy-title-second {
        display: block;
        white-space: nowrap;
    }
}

/* Shared lower-page hero */
.recruit-page-hero h1 {
    margin-bottom: 1rem !important;
    font-size: var(--recruit-type-page-title) !important;
    line-height: 1.28 !important;
}

.recruit-page-hero__lead {
    max-width: 36rem;
    font-size: 0.98rem;
    line-height: 1.85;
}

@media (min-width: 1024px) {
    .recruit-page-hero + section {
        padding-top: clamp(5.5rem, 7.5vw, 7rem) !important;
        padding-bottom: clamp(5.5rem, 7.5vw, 7rem) !important;
    }
}

/* Home hero: prominent, but no longer larger than the photography. */
#home-hero .home-hero-content h2 {
    font-size: var(--recruit-type-display) !important;
    line-height: 1.24 !important;
    letter-spacing: -0.025em;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

#home-hero .home-hero-content > div > p {
    font-size: clamp(0.96rem, 1.25vw, 1.08rem) !important;
    line-height: 1.9 !important;
}

/* Home page section rhythm */
.home-atmosphere-showcase,
#about.home-sanda-story,
.home-data-section,
.home-support-section,
.home-tour-section,
#jobs {
    padding-top: clamp(5rem, 7.5vw, 7rem) !important;
    padding-bottom: clamp(5rem, 7.5vw, 7rem) !important;
}

.home-atmosphere-wordmark {
    --home-atmosphere-logo-size: clamp(4.6rem, 8vw, 7.2rem);
}

.home-atmosphere-wordmark span {
    font-size: clamp(4rem, 8vw, 7.5rem);
    line-height: 0.86;
}

.home-atmosphere-wordmark strong {
    font-size: clamp(1.2rem, 2.4vw, 2.3rem);
}

.home-atmosphere-marquee {
    margin-top: clamp(2.75rem, 4.5vw, 4.25rem);
}

.home-feature-block {
    padding-top: clamp(4.5rem, 5.8vw, 5.75rem);
    padding-bottom: clamp(4.5rem, 5.8vw, 5.75rem);
}

.home-feature-head h3,
.home-recruit-guide__head h3,
.home-section-intro h3,
#news .max-w-7xl > .flex h3,
.home-jobs-head h3,
.home-faq-block > h3,
#entry h2 {
    font-size: var(--recruit-type-section) !important;
    line-height: 1.35 !important;
}

.home-feature-head .home-section-eyebrow,
.home-recruit-guide__head .home-section-eyebrow,
.home-tour-copy .home-section-eyebrow,
.home-faq-block .home-section-eyebrow {
    margin: 0 0 1rem !important;
    color: var(--recruit-aqua) !important;
    font-size: 0.72rem !important;
    font-weight: 800;
    line-height: 1.2 !important;
    letter-spacing: 0.4em !important;
}

.home-feature-head .home-section-heading,
.home-recruit-guide__head .home-section-heading,
.home-tour-copy .home-section-heading,
.home-faq-block .home-section-heading {
    margin: 0 !important;
    font-size: var(--recruit-type-section) !important;
    font-weight: 800;
    line-height: 1.35 !important;
    letter-spacing: 0 !important;
}

.home-feature-side-label span {
    font-size: 0.68rem;
}

.home-feature-head .home-section-heading {
    font-size: clamp(2.4rem, 4.2vw, 4.25rem) !important;
    line-height: 1.1 !important;
    letter-spacing: -0.04em !important;
}

.home-feature-card__number {
    font-size: clamp(3.3rem, 5.4vw, 5rem);
}

.home-feature-card strong {
    font-size: var(--recruit-type-card);
    line-height: 1.5;
}

.home-data-card strong {
    font-size: clamp(3rem, 5vw, 4.75rem);
    line-height: 0.95;
}

#nurse-age-chart h4,
.nurse-week-heading h4,
.home-career-card h4 {
    font-size: var(--recruit-type-subsection) !important;
    line-height: 1.4 !important;
}

.home-workstyle-copy h4,
.home-team-copy h3,
.home-education-copy h3 {
    font-size: var(--recruit-type-section) !important;
    line-height: 1.35 !important;
    letter-spacing: 0;
}

.home-tour-copy h3 {
    font-size: clamp(1.75rem, 2.5vw, 2.1rem) !important;
    line-height: 1.4 !important;
}

#jobs .home-jobs-grid h4 {
    font-size: 1.1rem !important;
    line-height: 1.5 !important;
}

#entry {
    margin-top: 0 !important;
    padding-top: clamp(5rem, 7.5vw, 7rem) !important;
    padding-bottom: clamp(5rem, 7.5vw, 7rem) !important;
}

/* About */
.about-page > section h2 {
    font-size: var(--recruit-type-section) !important;
    line-height: 1.42 !important;
}

.about-page > section h3 {
    font-size: var(--recruit-type-card) !important;
    line-height: 1.55 !important;
}

.about-page .about-feature-movie__body h3 {
    font-size: var(--recruit-type-subsection) !important;
}

/* Education */
.education-page .education-section-head h2,
.education-page .education-preceptor__copy h2,
.education-page .education-voices__head h2,
.education-page .education-learning__copy h2 {
    font-size: var(--recruit-type-section) !important;
    line-height: 1.42 !important;
}

.education-page h3 {
    font-size: var(--recruit-type-card) !important;
    line-height: 1.55 !important;
}

/* Staff voices */
.message-page .message-hero h1 {
    font-size: var(--recruit-type-page-title) !important;
    line-height: 1.25 !important;
}

.message-page section h2 {
    font-size: var(--recruit-type-section) !important;
    line-height: 1.42 !important;
}

.message-page section h3 {
    font-size: var(--recruit-type-card) !important;
    line-height: 1.55 !important;
}

/* A day at work */
.schedule-page .schedule-intro h2,
.schedule-page .schedule-day h2,
.schedule-page .schedule-support h2,
.schedule-page .schedule-cta h2 {
    font-size: var(--recruit-type-section) !important;
    line-height: 1.42 !important;
}

@media (max-width: 720px) {
    .schedule-page .schedule-intro h2 {
        font-size: clamp(1.43rem, calc(7.7vw - 0.11rem), 1.77rem) !important;
        letter-spacing: -0.055em;
        text-wrap: wrap;
        white-space: nowrap;
    }

    .schedule-page .schedule-intro__lead--night h2 {
        font-size: clamp(1.32rem, calc(7.77vw - 0.235rem), 1.66rem) !important;
    }
}

.schedule-page .schedule-timeline h3 {
    font-size: 1.08rem !important;
    line-height: 1.55 !important;
}

/* Job listings: preserve compact category and accordion labels. */
.jobs-page .jobs-intro-card h2 {
    font-size: var(--recruit-type-section) !important;
    line-height: 1.42 !important;
}

.jobs-page .jobs-detail-head h3 {
    font-size: var(--recruit-type-subsection) !important;
    line-height: 1.48 !important;
}

.jobs-page .jobs-flow-card h2 {
    font-size: var(--recruit-type-subsection) !important;
    line-height: 1.4 !important;
}

/* News article titles are not inside the shared photo hero. */
main article > header h1 {
    font-size: var(--recruit-type-page-title) !important;
    line-height: 1.35 !important;
}

@media (max-width: 767px) {
    :root {
        --recruit-type-display: clamp(2.25rem, 10vw, 2.7rem);
        --recruit-type-page-title: clamp(2rem, 8.6vw, 2.35rem);
        --recruit-type-section: clamp(1.7rem, 7.4vw, 2rem);
        --recruit-type-subsection: clamp(1.2rem, 5.6vw, 1.4rem);
    }

    #home-hero .home-hero-content h2 {
        line-height: 1.32 !important;
    }

    .home-atmosphere-showcase,
    #about.home-sanda-story,
    .home-data-section,
    .home-support-section,
    .home-tour-section,
    #jobs,
    #entry {
        padding-top: 4.5rem !important;
        padding-bottom: 4.5rem !important;
    }

    .home-atmosphere-wordmark {
        --home-atmosphere-logo-size: clamp(3.4rem, 15vw, 4.4rem);
        margin-left: 1.25rem;
    }

    .home-atmosphere-wordmark span {
        font-size: clamp(3.5rem, 17vw, 4.8rem);
    }

    .home-atmosphere-wordmark strong {
        font-size: clamp(0.88rem, 4.2vw, 1.1rem);
        letter-spacing: 0.09em;
    }

    .home-feature-block {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .home-feature-card__number {
        font-size: clamp(3rem, 14vw, 3.8rem);
    }

    .home-data-card strong {
        font-size: clamp(2.65rem, 13vw, 3.6rem);
    }
}
