/* Site-wide type scale. All sizes follow content roles; mobile changes live here. */
:root {
    --font-body: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
    --type-h1: 2.75rem; /* 44px: page titles */
    --type-h2: 2rem; /* 32px: section headings */
    --type-h3: 1.5rem; /* 24px: item headings */
    --type-h4: 1.25rem; /* 20px: subheadings */
    --type-body: 1rem; /* 16px: body, descriptions, tables */
    --type-small: .8125rem; /* 13px: English labels, supporting text */
    --type-meta: .75rem; /* 12px: copyright, required badges */
    --type-ui: .9375rem; /* 15px: buttons and form labels */
    --type-nav: .875rem; /* 14px: desktop navigation */
    --type-input: 1rem; /* 16px: inputs, including mobile */
    --type-mobile-nav: 1.25rem; /* 20px: full-screen navigation */
    --type-hero: clamp(2.25rem, 4.3vw, 4.75rem);
    --leading-heading: 1.5;
    --leading-body: 1.9;
}
html { font-size: 100%; }
body { font-size: var(--type-body); line-height: var(--leading-body); }
h1 { font-size: var(--type-h1); }
h2 { font-size: var(--type-h2); }
h3 { font-size: var(--type-h3); }
h4 { font-size: var(--type-h4); }
h5, h6 { font-size: var(--type-body); }
h1, h2, h3, h4, h5, h6 { font-weight: 400; line-height: var(--leading-heading); }
p, li, dt, dd, td, th { overflow-wrap: break-word; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0 !important; margin: -1px !important; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Existing internal pages: replace their old independent heading scales. */
#GlobalContents .ContentsHeader h1 { font-family: inherit; font-size: var(--type-h1); font-weight: 400; line-height: var(--leading-heading); letter-spacing: .08em; }
#GlobalContents .ContentsHeaderInner { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; margin: 0; text-align: center; text-shadow: 0 2px 16px rgba(0, 0, 0, .3); }
#GlobalContents .ContentsHeaderInner::before, #GlobalContents .ContentsHeaderInner::after { content: none; }
#GlobalContents .ContentsHeaderInner h1 { float: none; margin: 0; }
#GlobalContents .ContentsHeaderDescription { float: none; padding: 0; }
#GlobalContents .ContentsHeaderDescription p { margin: 0; padding: 0; font-size: var(--type-small); font-weight: 400; line-height: 1.6; letter-spacing: .12em; }
#GlobalContents .ContentsHeaderDescription p::after { content: ""; display: block; position: static; width: 48px; height: 1px; margin: 24px auto 0; border: 0; background: #9f7a46; }
#GlobalContents .ContentsHeaderPosition { position: absolute; inset: 0; display: grid; place-items: center; width: auto; height: auto; padding: 24px; box-sizing: border-box; }
#GlobalContents .ContentsHeaderGradation { width: 100%; height: 100%; background: rgba(0, 0, 0, .28); }
#GlobalContents .ContentsArea h2 { font-size: var(--type-h2); }
#GlobalContents .ContentsArea h3 { font-size: var(--type-h3); }
#GlobalContents .ContentsArea h4 { font-size: var(--type-h4); }
#GlobalContents .ContentsArea h5, #GlobalContents .ContentsArea h6 { font-size: var(--type-body); }
#GlobalContents .ContentsArea :is(h2, h3, h4, h5, h6) { font-family: inherit; font-weight: 400; line-height: var(--leading-heading); letter-spacing: .06em; }
#GlobalContents .ContentsArea :is(p, td, th) { font-size: var(--type-body); line-height: var(--leading-body); }
#GlobalContents .ContentsArea :is(h2.SubtitleIntro, h3.project-title, .service-column h3, .privacy-content h3) { padding: 0; }
#GlobalContents .ContentsArea h2.SubtitleIntro { margin: 0 0 40px; }
#GlobalContents .ContentsArea h2.SubtitleIntro::after { bottom: -16px; }
#GlobalContents .ContentsArea h3.project-title { margin: 16px 0 24px; }
#GlobalContents .ContentsArea .service-column h3 { margin: 18px 0 12px; padding: 0; }
#GlobalContents .ContentsArea :is(h3.project-title, .service-column h3)::after { content: none; }
#GlobalContents .privacy-content h2 { margin: 0 0 32px; padding: 0; }
#GlobalContents .privacy-content h3 { margin: 40px 0 16px; padding: 0; }
#GlobalContents .privacy-content :is(h2, h3)::after { content: none; }
#GlobalContents .privacy-content p { margin-bottom: 24px; }
#GlobalContents .details-table { line-height: var(--leading-body); }
#GlobalContents .project-column .details-table td:first-child { white-space: nowrap; }

/* Labels and links are sized by their UI role, not by incidental heading tags. */
#FrontHeader .hero-copy h1 { font-size: var(--type-hero); }
:is(header, div):is(#FrontHeader, #GlobalHeader) nav ul:is(#NavFirstLevel, #GlobalNavFirstLevel) li:is(#NavFirstLevel > li, #GlobalNavFirstLevel > li) { font-size: var(--type-nav); }
#MobileMenu .mobile-menu-label { font-size: var(--type-small); }
#MobileMenu nav li a { font-size: var(--type-mobile-nav); }
#MobileMenu nav li:last-child a { font-size: var(--type-ui); }
#Philosophy .philosophy-description,
#FrontContact .contact-description,
.inquiry-heading > p:last-child { line-height: var(--leading-body); }
#SiteMenu .site-menu-heading { flex-wrap: wrap; }

@media (max-width: 768px) {
    :root {
        --type-h1: 2rem; /* 32px */
        --type-h2: 1.625rem; /* 26px */
        --type-h3: 1.3125rem; /* 21px */
        --type-h4: 1.125rem; /* 18px */
        --type-body: .9375rem; /* 15px */
        --type-small: .75rem; /* 12px */
        --type-hero: clamp(1.25rem, 5.6vw, 2.375rem);
    }
}

/* Japanese body copy and explanatory text share one sans-serif face. */
:is(#Contents, #GlobalContents, #ContactMain) p:not([lang="en"]):not(.inquiry-kicker):not(.header-brand),
#GlobalContents .ContentsArea :is(td, th, dt, dd),
#Philosophy .philosophy-description,
#FrontContact .contact-description,
#ContactMain .inquiry-form,
#ContactMain .inquiry-control :is(input, textarea),
#ContactMain :is(.inquiry-notice, .inquiry-errors, .inquiry-reference) {
    font-family: var(--font-body);
}
