/* ═══════════════════════════════════════════════════════════════
   Marketing Surfer - Japanese layer (v1.47)
   Loaded ONLY by /ja/ pages, after style.css. Adds the self-hosted
   Japanese font and Japanese-appropriate typography. Zero external requests.
   ═══════════════════════════════════════════════════════════════ */

/* ── Self-hosted M PLUS 1p, content-specific subset ──
   Two weights carry the whole site. Japanese at Barlow's 300 body weight is
   too light to read on a dark ground, so 100-400 all resolve to the 400 cut
   and 500-900 to the 700 cut. */
@font-face {
  font-family: 'MPLUS1p';
  font-style: normal;
  font-weight: 100 400;
  font-display: swap;
  src: url('fonts/mplus-1p-400-ja.woff2') format('woff2');
}
@font-face {
  font-family: 'MPLUS1p';
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
  src: url('fonts/mplus-1p-700-ja.woff2') format('woff2');
}

/* Latin stays on Barlow, Japanese falls through to MPLUS1p.
   Browsers fall back PER GLYPH, so one stack handles mixed text. */
:root {
  --ja-stack: 'Barlow', 'MPLUS1p', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN',
              'Yu Gothic', 'Meiryo', sans-serif;
}
body { font-family: var(--ja-stack); }
h1, h2, h3, h4, nav a, .ja-cta, button, input, textarea, label,
table, blockquote, cite, li, p, span, a { font-family: var(--ja-stack); }
/* the site sets body copy to 300; Japanese needs 400 minimum */
p, li, td, .ja-lede { font-weight: 400; }

/* ── Banner (identical to the English pages) ── */
.hero-banner-img { width:100%; height:208px; overflow:hidden; position:relative; margin-top:0; }
.hero-banner-img img.ocean-bg { width:100%; height:100%; object-fit:cover; object-position:center 55%; display:block; }
.hero-banner-img::after { content:''; position:absolute; inset:0;
  background:linear-gradient(to bottom, rgba(30,38,54,0.1) 0%, rgba(30,38,54,0.5) 100%); pointer-events:none; }
.banner-logo { position:absolute; bottom:12px;
  left:max(calc(2rem - 60px), calc((100% - 980px) / 2 + 2rem - 60px));
  height:120px; width:auto; z-index:10; filter:drop-shadow(0 2px 14px rgba(0,0,0,0.6)); }
@media (max-width:1020px) { .banner-logo { left:calc(2rem - 60px); } }
@media (max-width:640px)  { .hero-banner-img { height:150px; } .banner-logo { height:75px; left:0; bottom:10px; } }

/* ── Language switcher (Option A) ── */
.lang-switch { display:inline-flex; align-items:center; gap:0.55rem; white-space:nowrap; }
.lang-switch .sw-div { width:1px; height:15px; background:rgba(255,255,255,0.22); display:inline-block; }
nav:not(.footer-nav) .lang-switch a { font-size:0.8rem; color:rgba(234,239,247,0.66); letter-spacing:0.02em; }
nav:not(.footer-nav) .lang-switch a:hover { color:var(--gold); }
@media (max-width:768px) { .lang-switch .sw-div { display:none; } }

/* ── Layout ── */
.ja-wrap { max-width:820px; margin:0 auto; padding:0 2rem 4.5rem; }
.ja-kicker { display:block; font-size:0.78rem; font-weight:600; letter-spacing:0.06em;
  color:var(--text-dim); margin:2.6rem 0 0.7rem; }
.ja-h1 { font-size:clamp(1.5rem, 3.2vw, 2.05rem); line-height:1.5; color:var(--white);
  font-weight:700; margin:0 0 0.5rem; letter-spacing:0.01em; }
.ja-h1-sub { margin-top:2.6rem; font-size:clamp(1.35rem, 2.6vw, 1.7rem); }
.ja-mark { font-size:0.82rem; letter-spacing:0.09em; color:var(--gold); opacity:0.85;
  margin:0 0 1.8rem; font-weight:400; }
.ja-h2 { font-size:1.28rem; color:var(--white); font-weight:700; margin:3rem 0 0.9rem;
  line-height:1.6; letter-spacing:0.01em; }
.ja-lede { font-size:1.0rem; line-height:1.95; color:var(--text); margin:0 0 1.1rem; }
.ja-small { font-size:0.88rem; color:var(--text-dim); line-height:1.9; }

/* ── Stats ── */
.ja-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:0.8rem; margin:2rem 0 0; }
.ja-stat { background:var(--navy-light); border:1px solid var(--border); border-radius:6px;
  padding:1.1rem 0.75rem; text-align:center; }
.ja-stat b { display:block; font-size:1.55rem; color:var(--gold); line-height:1.15; font-weight:700; }
.ja-stat span { font-size:0.74rem; color:var(--text-dim); line-height:1.7; display:block; margin-top:0.45rem; }

/* ── Content blocks ── */
.ja-blocks { display:grid; gap:0.9rem; margin-top:1.4rem; }
.ja-block { background:var(--navy-light); border:1px solid var(--border);
  border-radius:6px; padding:1.15rem 1.35rem; transition:border-color 0.2s; }
.ja-block:hover { border-color:rgba(198,160,74,0.42); }
.ja-block h3 { font-size:1.0rem; margin:0 0 0.5rem; color:var(--white); font-weight:700; line-height:1.7; }
.ja-block h3 .ja-en { display:block; font-size:0.72rem; color:var(--gold); opacity:0.8;
  font-weight:400; letter-spacing:0.06em; margin-top:0.2rem; }
.ja-block p { margin:0; font-size:0.94rem; line-height:1.95; color:var(--text-dim); }

/* ── Method steps ── */
.ja-steps { display:grid; grid-template-columns:repeat(4,1fr); gap:0.8rem; margin-top:1.3rem; }
.ja-step { background:var(--navy-light); border:1px solid var(--border); border-radius:6px;
  padding:1rem 0.95rem; position:relative; }
.ja-step-n { position:absolute; top:0.6rem; right:0.8rem; font-size:1.5rem;
  color:var(--gold); opacity:0.16; font-weight:700; line-height:1; }
.ja-step b { display:block; color:var(--white); font-size:0.98rem; margin-bottom:0.4rem;
  letter-spacing:0.03em; font-weight:700; }
.ja-step-ja { display:block; font-size:0.76rem; color:var(--gold); opacity:0.85;
  font-weight:400; letter-spacing:0.04em; margin-top:0.15rem; }
.ja-step span { font-size:0.82rem; color:var(--text-dim); line-height:1.85; }

/* ── Tables (会社概要 / 沿革 / 運営者情報) ── */
.ja-profile { width:100%; border-collapse:collapse; margin-top:1.2rem; font-size:0.94rem; }
.ja-profile th, .ja-profile td { text-align:left; vertical-align:top;
  padding:0.8rem 0.95rem; border-bottom:1px solid var(--border); line-height:1.9; }
.ja-profile th { width:30%; color:var(--gold); font-weight:600; white-space:nowrap; }
.ja-profile td { color:var(--text); font-weight:400; }
@media (max-width:640px) {
  .ja-profile th, .ja-profile td { display:block; width:auto; border-bottom:none; padding:0.35rem 0; }
  .ja-profile th { padding-top:0.9rem; white-space:normal; }
  .ja-profile td { border-bottom:1px solid var(--border); padding-bottom:0.9rem; }
}

/* ── 代表挨拶 ── */
.ja-greeting { display:grid; grid-template-columns:170px 1fr; gap:2rem;
  align-items:start; margin-top:1.4rem; }
.ja-portrait { width:100%; height:auto; border-radius:6px; display:block;
  border:1px solid var(--border); }
.ja-sign { margin-top:1.6rem; font-size:0.95rem; line-height:1.9; color:var(--text); }
.ja-sign span { font-size:0.85rem; color:var(--text-dim); }
@media (max-width:640px) {
  .ja-greeting { grid-template-columns:1fr; gap:1.2rem; }
  .ja-portrait { max-width:170px; }
}

/* ── 実績 list ── */
.ja-record { list-style:none; padding:0; margin:1rem 0 0; }
.ja-record li { padding:0.65rem 0 0.65rem 1.5rem; border-bottom:1px solid var(--border);
  position:relative; font-size:0.94rem; line-height:1.9; color:var(--text); }
.ja-record li::before { content:'\25B8'; position:absolute; left:0; color:var(--gold); }

/* ── Quote ── */
.ja-quote { border-left:3px solid var(--red-bright); padding:1rem 0 1rem 1.4rem;
  margin:1.4rem 0 0; color:var(--text); line-height:2.0; font-size:0.97rem; }
.ja-quote cite { display:block; font-style:normal; font-size:0.83rem;
  color:var(--text-dim); margin-top:0.9rem; letter-spacing:0.03em; }

/* ── Buttons ── */
.ja-ctarow { display:flex; gap:1.1rem; flex-wrap:wrap; margin-top:2.6rem; }
.ja-cta { display:inline-block; border:2px solid var(--red-bright); border-radius:30px;
  padding:0.95rem 2.1rem; font-size:0.98rem; font-weight:600; text-decoration:none;
  transition:all 0.2s; text-align:center; cursor:pointer; }
.ja-cta-dark { background:var(--navy-dark); color:#fff; }
.ja-cta-dark:hover { background:var(--red); color:#fff; }
.ja-cta-outline { background:transparent; color:#fff; }
.ja-cta-outline:hover { background:var(--red); color:#fff; }
.ja-cta:disabled { opacity:0.5; cursor:default; }

/* ── Contact form ── */
.ja-form { display:grid; grid-template-columns:1fr 1fr; gap:1rem; margin-top:1.8rem; }
.ja-form .ja-full { grid-column:1 / -1; }
.ja-form label { display:block; font-size:0.84rem; color:var(--text-dim); margin-bottom:0.35rem; }
.ja-req { color:var(--red-bright); }
.ja-form input, .ja-form textarea { width:100%; box-sizing:border-box; padding:0.65rem 0.75rem;
  background:var(--navy-dark); border:1px solid var(--border); border-radius:4px;
  color:var(--text); font-size:0.95rem; line-height:1.7; }
.ja-form input:focus, .ja-form textarea:focus { outline:2px solid var(--gold); outline-offset:1px; }
.ja-hp { position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.ja-purpose { font-size:0.83rem; color:var(--text-dim); line-height:1.9; margin:0.4rem 0 1.4rem; }
.ja-purpose b { color:var(--gold); font-weight:600; }
.ja-formmsg { margin:1rem 0 0; font-size:0.9rem; line-height:1.8; min-height:1.4em; }
.ja-formmsg.ok  { color:#8FCF8F; }
.ja-formmsg.err { color:#E8A0A0; }

@media (max-width:760px) {
  .ja-stats, .ja-steps { grid-template-columns:repeat(2,1fr); }
  .ja-form { grid-template-columns:1fr; }
  .ja-wrap { padding:0 1.4rem 3.5rem; }
}

/* ── Footer ── */
footer .footer-nav a[hreflang="en"] { color:var(--gold); }
