.header-text h1 { text-transform: none; min-height: 1.2em; overflow-wrap: break-word; }
.header-text .brand-tagline { color: #fafafa; font-size: 22px; line-height: 1.5; margin-top: 20px; }
.logo a { font-family: Montserrat, sans-serif; font-weight: 700; font-size: 28px; }
@media (max-width: 767px) { .header-text .brand-tagline { font-size: 16px; } }

/* Keep each photograph aligned with its corresponding introduction. */
#about .about-image img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
}
#about .about-text { margin-top: 0; padding-top: 0; }
#about .about-text > h3:first-child { margin-top: 0; }
#about .profile-row { margin-top: 60px; }
#about .profile-image { width: 100%; max-width: 460px; margin: 0 auto; }
@media (max-width: 991px) {
    #about .about-image { max-width: 460px; margin: 0 auto 30px; }
    #about .profile-row { margin-top: 40px; }
}

/* Centered contact information, with local-language accents. */
#contact .contact-details { max-width: 1000px; margin: 0 auto; }
#contact .contact-location { padding: 0 15px; }
#contact .contact-location + .contact-location { margin-top: 45px; padding-top: 35px; border-top: 1px solid #e8e8e8; }
#contact .contact-location h3 { margin: 0 0 18px; font-size: 20px; font-weight: 600; }
#contact .contact-location h4 { margin: 0 0 12px; font-size: 16px; font-weight: 500; }
#contact .contact-location address { font-style: normal; line-height: 1.8; margin-bottom: 12px; }
#contact .contact-location p { margin-bottom: 12px; line-height: 1.9; }
#contact .contact-divider { display: inline-block; padding: 0 7px; color: #999; }
#contact a { color: inherit; text-decoration: none; overflow-wrap: anywhere; }
#contact a:hover, #contact a:focus { color: #555; }
@media (max-width: 767px) {
    #contact .contact-location { padding: 0; }
    #contact .contact-divider { padding: 0 3px; }
}

/* White/red logo with transparent background. */
.header-top-area .logo { padding-top: 14px; }
.header-top-area .logo a { display: inline-block; line-height: 0; background: transparent; }
.header-top-area .logo img { display: block; width: 132px; max-width: 100%; height: auto; }
.menu-bg .logo { padding-top: 8px; }
@media (max-width: 767px) {
    .header-top-area .logo { padding-top: 10px; padding-bottom: 10px; }
    .header-top-area .logo img { width: 100px; }
    .header-top-area .navbar-toggle { margin-top: -45px; }
}


/* Trial language switch for company, profile, and service descriptions. */
.language-switch { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 32px 15px 0; background: #fff; }
.language-switch button { font: inherit; background: transparent; color: #666; border: 1px solid #ddd; border-radius: 3px; padding: 9px 18px; cursor: pointer; }
.language-switch button[aria-pressed="true"] { background: #232323; color: #fff; border-color: #232323; box-shadow: inset 0 -3px #ed1230; }
.language-switch button:focus-visible { outline: 2px solid #ed1230; outline-offset: 3px; }
.language-panel[hidden] { display: none !important; }
.language-panel[lang="ja"] { font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif; }
#about .language-panel p { line-height: 1.95; }
#about .language-panel h3 { margin-top: 0; line-height: 1.55; }
#service .language-panel[lang="ja"] p { line-height: 1.9; }

/* Bold titles across all three description languages. */
#about .language-panel h3,
#service .language-panel h3 {
    font-weight: 700;
}

/* Inline brand mark in the first typewriter phrase. */
.header-text h1 .typewrite-logo {
    display: inline-block;
    width: auto;
    height: 1.12em;
    max-width: 46vw;
    margin-right: .22em;
    vertical-align: -.02em;
}

.header-text h1 .typewrite-initial {
    display: inline-block;
    height: 1.12em;
    width: auto;
    vertical-align: -.02em;
    margin-right: .015em;
}

.language-panel[lang="zh-Hant"] { font-family: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif; }
.language-panel[lang="zh-Hans"] { font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }


#contact a:hover, #contact a:focus { text-decoration: none; }

/* Keep the navigation in document flow so it cannot cover the introduction. */
.site-header { position: sticky; top: 0; z-index: 999; height: auto; background: #111; }
.site-header .header-top-area { position: relative; background: #111; }
.site-header .header-top-area > .container > .row { display: flex; align-items: center; margin: 0; }
.site-header .header-top-area > .container > .row::before,
.site-header .header-top-area > .container > .row::after { display: none; }
.site-header .header-brand { flex: 0 0 auto; padding-right: 24px; }
.site-header .header-navigation { flex: 1; min-width: 0; }
.site-header .logo, .site-header .menu-bg .logo { padding: 12px 0; }
.site-header .navbar { margin-bottom: 0; }
.site-header .mainmenu .navbar-nav li a { padding: 24px 12px; }
@media (max-width: 767px) {
    .site-header .header-top-area > .container > .row { display: block; position: relative; }
    .site-header .header-brand { padding-right: 60px; }
    .site-header .navbar-toggle { position: absolute; right: 0; top: -56px; margin: 0; }
    .site-header .mainmenu .navbar-nav li a { padding: 11px 15px; }
}

/* Match the portrait face scale to the opening street photograph. */
#about .about-image.profile-image {
    width: 65%;
    max-width: 320px;
    margin: 0 auto;
}
@media (max-width: 991px) {
    #about .about-image.profile-image { margin: 0 auto 30px; }
}
