/* ============================================================
   DCX — common.css
   Shared tokens, base reset, typography, buttons,
   section spacing, header, footer.
   Load before any page-specific CSS.
   ============================================================ */

/* ---- design tokens ---- */
:root {
  --navy:      #363f75;
  --navy-deep: #2b2b68;
  --ink:       #1A005D;
  --green:     #8EC300;
  --accent:    #5a64ad;
  --tint:      #F6F7FB;
  --rail:      #E3E6F2;
  --text:      #2a2e3f;
  --muted:     #8a90ab;
  --radius:    16px;
  --shadow-sm: 0 1px 2px rgba(20,24,50,.05), 0 6px 16px rgba(20,24,50,.07);
  --shadow-md: 0 2px 4px rgba(20,24,50,.06), 0 14px 32px rgba(20,24,50,.13);
  --font-body: "Noto Sans JP","Hiragino Kaku Gothic ProN","ヒラギノ角ゴ ProN",sans-serif;
  --font-mono: "IBM Plex Mono",ui-monospace,monospace;
}

/* ---- reset ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(90,100,173,.12); scrollbar-gutter: stable; }
body {
  margin: 0; overflow-x: hidden;
  color: var(--text); font-family: var(--font-body);
  line-height: 1.9; background: #fff;
}
img { max-width: 100%; height: auto; display: block; }
a   { text-decoration: none; color: inherit; }
.container { width: min(1140px,92%); margin-inline: auto; }
/* Locked: header width never inherits page .container overrides.
   Specificity 0,2,1 beats any page-level header .container (0,1,1) or .container (0,1,0). */
header .container.header-in { width: min(1140px,92%); max-width: none; margin: 0 auto; padding: 12px 0; }

/* ---- typography ---- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 14px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: .28em; text-transform: uppercase; color: var(--accent);
}
.eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); flex-shrink: 0;
}
h2.sec-title {
  margin: 0 0 22px;
  font-size: clamp(22px,3.4vw,36px); font-weight: 900;
  letter-spacing: .04em; line-height: 1.5; color: var(--navy);
  text-wrap: balance;
}
h3.sub-title {
  margin: 0 0 14px;
  font-size: clamp(18px,2vw,24px); font-weight: 900;
  color: var(--navy); line-height: 1.5; text-wrap: balance;
}
.lead {
  max-width: 38em;
  font-size: clamp(16px,1.35vw,17px); line-height: 1.9;
  margin: 0 0 1em;
}
.lead:last-of-type { margin-bottom: 0; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* ---- section spacing ---- */
section.stage { position: relative; padding: clamp(56px,9vw,110px) 0; }
section.stage.tinted { background: var(--tint); }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 30px; min-height: 44px;
  font-weight: 700; font-size: 15px; letter-spacing: .05em;
  color: #fff; background: var(--navy-deep);
  border-radius: 999px; box-shadow: var(--shadow-sm);
  transition: background .2s, transform .2s, box-shadow .2s;
}
/* support both .arr (standard) and .arrow (legacy outsourcing-jp) */
.btn .arr, .btn .arrow { color: var(--green); letter-spacing: 0; transition: transform .2s; }
.btn:hover { background: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:hover .arr, .btn:hover .arrow { transform: translateX(4px); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.btn.ghost {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.5);
}
.btn.ghost:hover { background: rgba(255,255,255,.22); }

/* ---- external link icon (target="_blank" links) ---- */
.ext-icon { flex-shrink: 0; opacity: .85; transition: transform .2s; margin-left: 4px; vertical-align: -2px; }
.btn .ext-icon, .shopify-btn .ext-icon { margin-left: 0; vertical-align: middle; }
.btn:hover .ext-icon { transform: translateX(4px); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---- header ---- */
header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 3px solid var(--ink);
  box-shadow: 0 3px 0 var(--green);
}
.header-in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 12px 0;
}
.brand { display: flex; flex-direction: column; line-height: 1.2; flex-shrink: 0; }
.brand img { width: 112px; }
.brand small { font-size: 10px; color: var(--navy); margin-top: 4px; }
nav.gnav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
nav.gnav a {
  font-size: 13px; font-weight: 700; color: var(--text);
  position: relative; padding: 6px 0; min-height: 44px;
  display: inline-flex; align-items: center;
}
nav.gnav a.active { color: var(--navy); }
nav.gnav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px; background: var(--green);
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
nav.gnav a.active:not(.btn)::after,
nav.gnav a:not(.btn):hover::after { transform: scaleX(1); }
nav.gnav .btn { padding: 10px 20px; font-size: 13px; color: #fff; }

@media (max-width: 860px) { nav.gnav a:not(.btn) { display: none; } }
/* Group the CTA button with the hamburger on the right, instead of
   space-between spreading them apart once the regular nav links hide. */
@media (max-width: 860px) {
  .header-in { justify-content: flex-start; }
  nav.gnav { margin-left: auto; }
}
/* Inter Bold reads visually thinner than Noto Sans JP Bold at the same weight;
   bump EN buttons on mobile so they match the JP version's boldness. */
@media (max-width: 860px) {
  html[lang="en"] .btn,
  html[lang="en"] .mob-cta,
  html[lang="en"] .shopify-btn { font-weight: 900; }
}
@media (max-width: 480px) {
  .header-in { gap: 12px; }
  .brand img { width: 90px; }
  .brand small { display: none; }
  nav.gnav .btn { padding: 8px 16px; font-size: 13px; }
}

/* ---- hamburger button ---- */
.menu-btn {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 44px; height: 44px;
  background: none; border: none; cursor: pointer; padding: 0;
  flex-shrink: 0;
}
.menu-btn span {
  display: block; width: 22px; height: 2px;
  background: var(--navy); border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 860px) { .menu-btn { display: flex; } }

/* ---- mobile nav ---- */
.mobile-nav {
  display: none;
  position: absolute; top: 100%; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--rail);
  border-bottom: 3px solid var(--ink);
  box-shadow: 0 3px 0 var(--green), 0 12px 32px rgba(20,24,50,.14);
  z-index: 99;
}
.mobile-nav.open { display: block; animation: menuSlide .22s ease; }
@keyframes menuSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}
.mobile-nav a {
  display: flex; align-items: center;
  padding: 0 24px; min-height: 52px;
  font-size: 15px; font-weight: 700; color: var(--text);
  border-bottom: 1px solid var(--rail);
  transition: background .15s, color .15s;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { background: var(--tint); color: var(--navy); }
.mobile-nav a.active { color: var(--navy); border-left: 3px solid var(--green); padding-left: 21px; }
.mobile-nav .mob-cta {
  display: flex; margin: 14px 24px 20px;
  justify-content: center; border-radius: 999px;
  background: var(--navy-deep); color: #fff;
  padding: 13px 28px; font-weight: 700; font-size: 15px;
  min-height: 48px; align-items: center; gap: 8px;
}
.mobile-nav .mob-cta .arr { color: var(--green); transition: transform .2s; }
.mobile-nav .mob-cta:hover { background: var(--accent); }
.mobile-nav .mob-cta:hover .arr { transform: translateX(4px); }
@media (min-width: 861px) { .mobile-nav { display: none !important; } }

/* ---- footer ---- */
footer {
  position: relative;
  z-index: 1;
  padding: 36px 0 44px;
  text-align: center;
  border-top: 3px solid var(--ink);
  box-shadow: 0 -3px 0 var(--green);
  font-size: 13px;
}
footer a { color: var(--text); border-bottom: 1px solid var(--rail); padding-bottom: 1px; }
footer img { width: 190px; margin: 22px auto 14px; }
footer small { color: var(--muted); display: block; margin-top: 6px; }
@media (max-width: 600px) {
  footer { padding: 28px 0 36px; font-size: 12px; }
  footer img { width: 150px; }
}

/* ---- reduced motion (common) ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal], .js [data-reveal] { opacity: 1; transform: none; transition: none; animation: none; }
  .btn { transition: none; }
}
