/* Shared Japanese typography */
:root {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic",
    YuGothic, "Noto Sans JP", Meiryo, "Noto Sans CJK JP", sans-serif;
  line-break: strict;
}

body {
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0.025em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
.hero h1,
.catalog-hero h1,
.catalog-listing h2,
.catalog-inquiry h2,
.catalog-card h3 {
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.045em;
  font-feature-settings: "palt";
}

h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.04em;
}

.hero h1,
.catalog-hero h1 {
  font-size: clamp(1.75rem, 3.25vw, 2.625rem);
}

.eyebrow,
.president-message .eyebrow,
.email-card span,
.article-date,
.catalog-page .catalog-kicker,
.hero-company {
  font-weight: 500;
  letter-spacing: 0.04em;
}

.button,
.home-button,
button,
.catalog-button,
.back-link,
.article a,
.skip-link {
  font-weight: 500;
  letter-spacing: 0.04em;
}

.button,
.home-button,
.catalog-button {
  padding: 9px 22px;
  border-radius: 3px;
}

/* Header */
.site-header,
.catalog-page .site-header {
  padding-block: 12px;
  gap: 8px 16px;
}

.site-header > .header-inner {
  gap: 8px 16px;
}

.site-header .logo img {
  width: clamp(142px, 19vw, 200px);
}

.site-header nav:not(.language-switch) a,
.catalog-page .catalog-nav a,
.site-header .language-switch > span,
.site-header .language-switch > a {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.035em;
}

.site-header .language-switch > span,
.site-header .language-switch > a {
  font-family: inherit;
}

.site-header--home > nav:not(.language-switch) {
  gap: 4px clamp(10px, 1.6vw, 22px);
}

.site-header--home > nav:not(.language-switch) a {
  margin: 0;
}

@media (min-width: 701px) {
  .site-header--home {
    display: flex;
    flex-wrap: nowrap;
    padding-inline: 6%;
  }

  .site-header--home > nav:not(.language-switch) {
    justify-content: flex-end;
    margin-inline-start: auto;
  }
}

@media (max-width: 700px) {
  .site-header--home > nav:not(.language-switch) a {
    font-size: 0.8125rem;
  }
}

/* Homepage */
.site-header--home ~ main {
  --home-section-space: clamp(36px, 5vw, 68px);
}

.site-header--home ~ main > section:not(.hero) {
  padding-block: var(--home-section-space);
}

.site-header--home ~ main .hero {
  min-height: clamp(340px, 50vh, 540px);
}

.site-header--home ~ main .hero-inner {
  padding-block: clamp(24px, 4vw, 44px);
}

.site-header--home ~ main .hero h1 {
  font-size: clamp(1.5rem, 3.45vw, 2.75rem);
  line-height: 1.55;
}

.site-header--home ~ main h2 {
  font-size: clamp(1.5rem, 2.7vw, 2.125rem);
}

.site-header--home ~ main :is(.lede, .section-intro p) {
  font-size: 1rem;
}

:where(.section-intro, .split, .contact-panel, .intro, .catalog-hero) p {
  max-inline-size: 42em;
}

.site-header--home ~ main .cards {
  gap: 18px;
  margin-top: 26px;
}

.site-header--home ~ main .card {
  border: 1px solid #e5e9e3;
  box-shadow: none;
}

.site-header--home ~ main .card img {
  height: auto;
  aspect-ratio: 16 / 10;
}

/* Underline homepage card titles without decorating the full link. */
#products .product-link {
  text-decoration: none;
}

#products .product-link h3 {
  text-decoration: underline;
}

#products .product-link:focus-visible {
  outline: 2px solid #205b43;
  outline-offset: -3px;
}

.card .card-body {
  padding: 16px 18px 20px;
}

.card .card-body h3,
.site-header--home ~ main .reason h3 {
  font-size: clamp(1.125rem, 1.9vw, 1.375rem);
}

.site-header--home ~ main :is(.split, .contact-panel) {
  gap: clamp(20px, 4vw, 44px);
}

.site-header--home ~ main .reasons {
  gap: 16px;
  margin-top: 26px;
}

.site-header--home ~ main .reason {
  padding: 16px clamp(16px, 3vw, 26px) 20px;
  border-top-width: 1px;
}

.site-header--home ~ main .reason-num {
  font-size: 1rem;
  font-weight: 500;
}

.site-header--home ~ main .reason p + p {
  margin-top: 0.5em;
}

.site-header--home ~ main .email-card {
  padding: 18px clamp(16px, 3vw, 26px);
}

.site-header--home ~ main .email-card > a {
  font-size: clamp(1rem, 2vw, 1.375rem);
  word-break: normal;
  overflow-wrap: anywhere;
}

@media (min-width: 641px) and (max-width: 980px) {
  .site-header--home ~ main .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Catalog */
.catalog-hero .catalog-wrap {
  padding-block: clamp(32px, 5vw, 64px);
}

.catalog-listing,
.catalog-inquiry {
  padding-block: clamp(28px, 4.5vw, 54px);
}

.catalog-listing h2,
.catalog-inquiry h2 {
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
}

.catalog-hero-photo,
.catalog-card {
  border-radius: 4px;
}

.catalog-card-copy {
  gap: 7px;
  padding: 13px 16px 16px;
}

/* Company, inquiry and news */
.hero:not(.site-header--home ~ main .hero),
.president-message,
.cta {
  padding-block: clamp(32px, 5vw, 64px);
}

main.container,
.site-header + .hero + main:has(.article-list, .article-content) {
  padding-block: clamp(30px, 5vw, 58px);
}

.president-message h2,
.article-content h2 {
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  margin-bottom: 18px;
}

.company-info {
  margin-block: 18px 8px;
}

.company-info-row {
  grid-template-columns: minmax(8em, 1fr) minmax(0, 3fr);
  gap: 12px;
  padding: 13px 12px;
}

.company-info-label,
#inquiry-form :is(label, .field-label) {
  font-weight: 500;
}

.company-info-value {
  overflow-wrap: anywhere;
}

@media (max-width: 600px) {
  .company-info-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }

  .company-info-value:empty {
    display: none;
  }
}

main:has(> #inquiry-form) {
  margin-block: clamp(24px, 4vw, 42px);
}

#inquiry-form,
.thank-you-card {
  padding: clamp(18px, 4vw, 34px);
  border-radius: 4px;
}

#inquiry-form .field {
  margin-bottom: 19px;
}

#inquiry-form .category-option {
  font-weight: 400;
}

input,
textarea,
select,
button {
  font-family: inherit;
  letter-spacing: inherit;
}

#inquiry-form :is(input:not([type="checkbox"]), textarea) {
  padding: 9px 11px;
  border-radius: 3px;
}

#inquiry-form button {
  padding-block: 10px;
  border-radius: 3px;
  font-weight: 500;
}

.thank-you-card h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.thank-you-card .checkmark {
  font-size: 2rem;
}
