/*
Theme Name: fulcrum8 Base
Theme URI: https://www.fulcrum8.net/
Author: fulcrum8 Co., Ltd.
Description: A lightweight, photo-free corporate theme built for fulcrum8.
Version: 1.2.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: fulcrum8-base
*/

/* ================================================================
   Language typography
   Loaded after the component styles so these rules remain reliable.
================================================================ */

html:lang(en) body,
html:lang(es) body {
  font-family: "Poppins", sans-serif;
}

html:lang(en) h1,
html:lang(en) h2,
html:lang(es) h1,
html:lang(es) h2 {
  font-weight: 600;
  letter-spacing: -0.02em;
}

html:lang(ja) body {
  font-family: "Zen Maru Gothic", sans-serif;
  font-weight: 400;
}

html:lang(ja) h1,
html:lang(ja) h2 {
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.35;
}

/* English labels keep the geometric character inside Japanese pages. */
.f8-hero__kicker,
.f8-services__kicker,
.f8-service-card__verb,
.f8-about__kicker,
.f8-about__panel-title,
.f8-contact__kicker,
.f8-footer__name,
.f8-footer__label,
.f8-footer__languages {
  font-family: "Poppins", sans-serif;
}

/* Japanese component sizing: intentionally smaller than the Latin display type,
   but based on explicit clamp() values instead of a destructive 85% override. */
html:lang(ja) .f8-hero h1 {
  font-size: clamp(48px, 7.4vw, 102px);
  line-height: 1.14;
  letter-spacing: 0.025em;
}

html:lang(ja) .f8-services h2 {
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.25;
}

html:lang(ja) .f8-about h2 {
  font-size: clamp(40px, 5.5vw, 68px);
  line-height: 1.35;
}

html:lang(ja) .f8-contact h2 {
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1.25;
}

html:lang(ja) .f8-footer__message {
  font-size: clamp(36px, 4.5vw, 58px);
  line-height: 1.25;
  letter-spacing: 0.025em;
}

html:lang(ja) .f8-hero__lead,
html:lang(ja) .f8-services__intro,
html:lang(ja) .f8-about__lead,
html:lang(ja) .f8-about__text,
html:lang(ja) .f8-contact__lead,
html:lang(ja) .f8-service-card li,
html:lang(ja) .f8-footer__note,
html:lang(ja) .f8-footer__bottom p {
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: 0.02em;
}

html:lang(ja) .f8-hero__lead,
html:lang(ja) .f8-services__intro,
html:lang(ja) .f8-about__text,
html:lang(ja) .f8-contact__lead {
  font-size: clamp(14px, 1.2vw, 16px);
}

html:lang(ja) .f8-service-card h3 {
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.4;
  letter-spacing: 0.02em;
}

/* Phrase groups replace Japanese punctuation with controlled visual spacing. */
.f8-phrase-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2em 1.1em;
}

/* A linked but inactive language remains visible without competing with the
   current page. Unavailable languages should remain plain <span> elements. */
.f8-footer__languages a:not([aria-current="page"]) {
  color: rgba(255, 255, 255, 0.55) !important;
  border-color: rgba(255, 255, 255, 0.22);
  background: transparent;
}

.f8-footer__languages a:not([aria-current="page"]):hover {
  color: var(--f8-yellow, #ffcb00) !important;
  border-color: var(--f8-yellow, #ffcb00);
}

html:lang(en) .f8-footer__note {
  display: none;
}

/* Defensive fallback for older page markup or plugins that add a site footer. */
body:has(.f8-footer) > .f8-site-footer,
body:has(.f8-footer) > .site-footer,
body:has(.f8-footer) main + footer:not(.f8-footer) {
  display: none !important;
}

@media (max-width: 767px) {
  html:lang(ja) .f8-hero h1 {
    font-size: clamp(43px, 12.8vw, 62px);
  }

  html:lang(ja) .f8-services h2,
  html:lang(ja) .f8-about h2,
  html:lang(ja) .f8-contact h2 {
    font-size: clamp(36px, 10vw, 48px);
  }

  html:lang(ja) .f8-footer__message {
    font-size: clamp(34px, 9.5vw, 46px);
  }
}
