/* ═══════════════════════════════════════════════════
   HACHIKO CONSULTANCY — brand: royal blue × white
   A SERVE INT Group program · hachiko.serveint.jp
   ═══════════════════════════════════════════════════ */

:root {
  --blue: #0033A0;
  --blue-deep: #002266;
  --blue-mid: #2B5BC7;
  --blue-pale: #E8EEFB;
  --ink: #17203A;
  --ink-soft: #4E5A78;
  --paper: #FAFBFE;
  --paper-warm: #F1F4FB;
  --white: #ffffff;
  --radius: 22px;
  --shadow-soft: 0 8px 30px rgba(0, 51, 160, .09);
  --shadow-lift: 0 18px 50px rgba(0, 51, 160, .16);
  --font-jp: 'Noto Sans JP', sans-serif;
  --font-en: 'Outfit', sans-serif;
  --nav-h: 76px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: var(--font-jp);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: calc(var(--nav-h) + 34px);
}
::selection { background: var(--blue); color: #fff; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
.container { width: min(1160px, 92%); margin-inline: auto; }

/* ─────────── Loader ─────────── */
.loader {
  position: fixed; inset: 0; z-index: 200;
  background: #fff;
  display: grid; place-items: center;
  transition: opacity .7s var(--ease-out), visibility .7s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader-inner { position: relative; display: grid; place-items: center; }
.loader-logo { width: clamp(150px, 26vw, 220px); animation: logoIn 1s var(--ease-out) both .15s; }
@keyframes logoIn { from { opacity: 0; transform: scale(.9) translateY(8px); } to { opacity: 1; transform: none; } }
.loader-ring {
  position: absolute; width: clamp(210px, 36vw, 310px); aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(0,51,160,.12);
  border-top-color: var(--blue);
  animation: spin 1.1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─────────── Top bar ─────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px clamp(16px, 4vw, 40px);
  transition: background .4s, box-shadow .4s, padding .4s;
}
.topbar.scrolled {
  background: rgba(250, 251, 254, .86);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 rgba(0,51,160,.1);
  padding-block: 8px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { height: 52px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-name { font-family: var(--font-en); font-weight: 800; font-size: 1.06rem; letter-spacing: .14em; color: var(--blue-deep); }
.brand-sub { font-size: .62rem; color: var(--ink-soft); letter-spacing: .2em; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-cta {
  font-size: .82rem; font-weight: 700; color: var(--blue-deep);
  padding: 9px 20px; border: 1.5px solid rgba(0,51,160,.3); border-radius: 999px;
  transition: all .3s;
}
.topbar-cta:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

/* Language switch */
.lang-switch {
  position: relative; display: flex; align-items: center;
  background: rgba(0,51,160,.08); border: 1px solid rgba(0,51,160,.15);
  border-radius: 999px; padding: 4px; cursor: pointer; font-family: inherit;
}
.lang-opt {
  position: relative; z-index: 2;
  font-size: .74rem; font-weight: 700; letter-spacing: .05em;
  padding: 5px 13px; border-radius: 999px; color: var(--ink-soft);
  transition: color .35s; white-space: nowrap;
}
.lang-opt.active { color: #fff; }
.lang-pill {
  position: absolute; z-index: 1; top: 4px; bottom: 4px;
  background: var(--blue); border-radius: 999px;
  transition: left .4s var(--ease-out), width .4s var(--ease-out);
  box-shadow: 0 3px 10px rgba(0,51,160,.4);
}

/* ─────────── Buttons ─────────── */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: inherit; font-weight: 700; font-size: .92rem;
  padding: 15px 30px; border-radius: 999px; cursor: pointer;
  transition: transform .35s var(--ease-out), box-shadow .35s, background .3s, color .3s;
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px) scale(.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%);
  color: #fff; box-shadow: 0 10px 26px rgba(0,51,160,.35);
}
.btn-primary:hover { box-shadow: 0 16px 36px rgba(0,51,160,.45); }
.btn-ghost { border: 1.6px solid rgba(0,51,160,.35); color: var(--blue-deep); background: rgba(255,255,255,.6); }
.btn-ghost:hover { background: #fff; border-color: var(--blue); }

/* ─────────── Hero ─────────── */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  padding: 120px 0 70px;
  overflow: hidden;
  background: linear-gradient(180deg, #fff 0%, var(--paper-warm) 100%);
}
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-dots { position: absolute; inset: 0; }
.hero-blob {
  position: absolute; right: -12%; top: 6%;
  width: clamp(420px, 52vw, 760px); aspect-ratio: 1;
  background: radial-gradient(circle at 35% 35%, var(--blue-mid), var(--blue) 70%);
  border-radius: 58% 42% 52% 48% / 55% 48% 52% 45%;
  opacity: .1;
  animation: blob 12s ease-in-out infinite alternate;
}
@keyframes blob {
  from { border-radius: 58% 42% 52% 48% / 55% 48% 52% 45%; transform: rotate(0deg); }
  to { border-radius: 46% 54% 44% 56% / 48% 56% 44% 52%; transform: rotate(6deg); }
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(30px, 5vw, 70px); align-items: center; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,.85); border: 1px solid rgba(0,51,160,.2);
  border-radius: 999px; padding: 8px 18px;
  font-size: .78rem; font-weight: 700; letter-spacing: .08em; color: var(--blue-deep);
  box-shadow: var(--shadow-soft);
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); animation: pulse 2.2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(0,51,160,.45);} 60% { box-shadow: 0 0 0 8px rgba(0,51,160,0);} }

.hero-title {
  font-weight: 900;
  font-size: clamp(2.2rem, 5.6vw, 3.9rem);
  line-height: 1.32;
  letter-spacing: .01em;
  color: var(--ink);
  margin: 24px 0 22px;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line > span { display: inline-block; transform: translateY(110%); animation: lineUp 1s var(--ease-out) forwards; }
.hero-title .line:nth-child(2) > span { animation-delay: .18s; }
@keyframes lineUp { to { transform: translateY(0); } }
.grad {
  background: linear-gradient(120deg, var(--blue) 20%, var(--blue-mid) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { max-width: 560px; color: var(--ink-soft); font-size: clamp(.94rem, 1.6vw, 1.03rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.hero-stats { display: flex; align-items: center; gap: clamp(14px, 3vw, 34px); margin-top: 46px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-num {
  font-family: var(--font-en); font-weight: 700;
  font-size: clamp(1.4rem, 2.8vw, 2rem); color: var(--blue-deep);
  line-height: 1.2; font-variant-numeric: tabular-nums;
}
.stat-label { font-size: .72rem; color: var(--ink-soft); letter-spacing: .1em; margin-top: 2px; }
.stat-sep { width: 1px; height: 40px; background: rgba(0,51,160,.18); }

.hero-visual { position: relative; }
.statue-wrap { position: relative; max-width: 460px; margin-inline: auto; }
.statue-img { width: 100%; height: auto; filter: drop-shadow(0 30px 50px rgba(0,34,102,.35)); }
.statue-card {
  position: absolute; bottom: 6%; left: -6%;
  background: rgba(255,255,255,.93);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-radius: 16px; padding: 14px 22px;
  box-shadow: var(--shadow-lift);
  display: flex; flex-direction: column;
  animation: floatY 5s ease-in-out infinite;
}
.sc-big { font-weight: 800; font-size: 1.05rem; color: var(--blue-deep); }
.sc-small { font-size: .72rem; color: var(--ink-soft); }
@keyframes floatY { 0%,100% { transform: translateY(0);} 50% { transform: translateY(-10px);} }

/* ─────────── Marquee ─────────── */
.marquee {
  background: linear-gradient(90deg, var(--blue-deep), var(--blue));
  color: rgba(255,255,255,.95);
  overflow: hidden; padding: 16px 0; white-space: nowrap;
  transform: rotate(-1deg) scale(1.02); margin-block: -8px 40px;
}
.marquee-track { display: inline-flex; align-items: center; gap: 38px; animation: marquee 28s linear infinite; }
.marquee-track span { font-family: var(--font-en); font-weight: 600; letter-spacing: .28em; font-size: .76rem; }
.marquee-track i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.7); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ─────────── Sections common ─────────── */
.section { padding: clamp(76px, 10vw, 130px) 0; position: relative; }
.section-head { margin-bottom: clamp(40px, 6vw, 60px); }
.section-head.center { text-align: center; }
.section-eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-en); font-weight: 600; letter-spacing: .34em;
  font-size: .72rem; color: var(--blue); text-transform: uppercase;
}
.section-eyebrow.center { justify-content: center; }
.eyebrow-bar { width: 34px; height: 1.5px; background: currentColor; }
.section-title {
  font-weight: 900;
  font-size: clamp(1.8rem, 4.2vw, 2.8rem); color: var(--ink);
  margin-top: 14px; letter-spacing: .01em;
}
.section-desc { color: var(--ink-soft); margin-top: 14px; max-width: 600px; }
.section-head.center .section-desc { margin-inline: auto; }

/* ─────────── About ─────────── */
.about { background: var(--paper); }
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.about-lead {
  font-weight: 800;
  font-size: clamp(1.25rem, 2.5vw, 1.7rem); color: var(--blue-deep);
  line-height: 1.6; margin-bottom: 22px;
}
.about-copy p { color: var(--ink-soft); font-size: .95rem; margin-bottom: 16px; }
.about-values { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.value-chip {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid rgba(0,51,160,.15);
  padding: 10px 18px 10px 10px; border-radius: 999px;
  font-size: .82rem; font-weight: 700; color: var(--blue-deep);
  box-shadow: var(--shadow-soft);
  transition: transform .3s var(--ease-out), box-shadow .3s;
}
.value-chip:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.value-kanji {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--blue-mid));
  color: #fff; border-radius: 50%;
  font-size: 1rem; font-weight: 800;
}
.about-logo-card {
  background: #fff; border: 1px solid rgba(0,51,160,.12);
  border-radius: calc(var(--radius) + 8px);
  box-shadow: var(--shadow-lift);
  padding: clamp(28px, 5vw, 52px);
  display: grid; place-items: center; gap: 6px;
}
.about-logo-card img { width: 78%; }
.alc-note { text-align: center; font-size: .82rem; font-weight: 600; color: var(--blue); letter-spacing: .04em; }

/* ─────────── Problems → Solutions ─────────── */
.support { background: var(--paper-warm); }
.support-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.sp-card {
  position: relative;
  background: #fff; border: 1px solid rgba(0,51,160,.1);
  border-radius: var(--radius); padding: 30px 26px 28px;
  transition: transform .45s var(--ease-out), box-shadow .45s, border-color .3s;
  transition-delay: 0s !important;
}
.sp-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lift); border-color: rgba(0,51,160,.35); }
.sp-icon {
  width: 56px; height: 56px; border-radius: 17px;
  background: var(--blue-pale);
  display: grid; place-items: center; color: var(--blue);
  margin-bottom: 18px;
  transition: background .35s, color .35s, transform .45s var(--ease-out);
}
.sp-icon svg { width: 28px; height: 28px; }
.sp-card:hover .sp-icon {
  background: linear-gradient(135deg, var(--blue), var(--blue-mid));
  color: #fff; transform: scale(1.06) rotate(-4deg);
}
.sp-problem {
  display: inline-block;
  font-size: .74rem; font-weight: 700; color: var(--ink-soft);
  background: rgba(23,32,58,.06); border-radius: 999px;
  padding: 3px 12px; letter-spacing: .05em;
}
.sp-arrow { margin: 0 6px; color: var(--blue); font-weight: 700; }
.sp-solution { display: block; font-size: 1.05rem; font-weight: 800; color: var(--blue-deep); margin: 10px 0 8px; }
.sp-text { font-size: .82rem; color: var(--ink-soft); line-height: 1.75; }

/* ─────────── Industries ─────────── */
.industries { background: var(--paper); }
.ind-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; max-width: 860px; margin-inline: auto;
}
.ind-chip {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid rgba(0,51,160,.12);
  border-radius: 16px; padding: 18px 22px;
  font-weight: 700; font-size: .92rem; color: var(--ink);
  box-shadow: var(--shadow-soft);
  transition: transform .35s var(--ease-out), box-shadow .35s, border-color .3s;
  transition-delay: 0s !important;
}
.ind-chip:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); border-color: rgba(0,51,160,.35); }
.ind-icon {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center;
  background: var(--blue-pale); border-radius: 13px; color: var(--blue);
}
.ind-icon svg { width: 23px; height: 23px; }
.ind-note { text-align: center; margin-top: 30px; font-size: .8rem; color: var(--ink-soft); }

/* ─────────── Contact ─────────── */
.contact { background: var(--paper-warm); }
.contact-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; max-width: 1020px; margin-inline: auto;
}
.contact-card {
  display: flex; align-items: center; gap: 17px;
  background: #fff; border-radius: var(--radius);
  border: 1px solid rgba(0,51,160,.1);
  padding: 26px 24px;
  box-shadow: var(--shadow-soft);
  transition: transform .4s var(--ease-out), box-shadow .4s;
  transition-delay: 0s !important;
}
.contact-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.cc-icon {
  width: 58px; height: 58px; flex: none; border-radius: 17px;
  display: grid; place-items: center; color: #fff;
}
.whatsapp .cc-icon { background: linear-gradient(135deg, #2BE07A, #17A94E); box-shadow: 0 8px 20px rgba(37,211,102,.35); }
.line .cc-icon { background: linear-gradient(135deg, #2ED96E, #05A648); box-shadow: 0 8px 20px rgba(6,199,85,.35); }
.mail .cc-icon { background: linear-gradient(135deg, var(--blue), var(--blue-mid)); box-shadow: 0 8px 20px rgba(0,51,160,.3); }
.cc-body { display: flex; flex-direction: column; min-width: 0; }
.cc-name { font-weight: 800; font-size: 1.02rem; color: var(--ink); }
.cc-desc { font-size: .76rem; color: var(--ink-soft); margin-top: 2px; overflow-wrap: anywhere; }
.cc-arrow { margin-left: auto; font-weight: 700; color: var(--blue); transition: transform .3s var(--ease-out); white-space: nowrap; font-size: .9rem; }
.contact-card:hover .cc-arrow { transform: translateX(5px); }
.contact-note { text-align: center; margin-top: 34px; font-size: .8rem; color: var(--ink-soft); letter-spacing: .04em; }

/* ─────────── Footer ─────────── */
.footer {
  background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue) 100%);
  color: rgba(255,255,255,.9);
  padding: 54px 0 46px; text-align: center;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.footer-logo { height: 74px; width: auto; }
.footer-tag { font-weight: 700; font-size: .95rem; color: #fff; letter-spacing: .08em; }
.footer-group {
  font-size: .8rem; color: rgba(255,255,255,.85);
  border-bottom: 1px dashed rgba(255,255,255,.5);
  transition: color .3s;
}
.footer-group:hover { color: #fff; }
.footer-copy { font-size: .7rem; color: rgba(255,255,255,.6); font-family: var(--font-en); letter-spacing: .08em; margin-top: 8px; }

/* ─────────── Quick contact FABs ─────────── */
.quick-contact {
  position: fixed; right: 18px; bottom: calc(var(--nav-h) + 46px);
  display: flex; flex-direction: column; gap: 12px; z-index: 90;
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
.quick-contact.show { opacity: 1; transform: none; pointer-events: auto; }
.qc-btn {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  transition: transform .3s var(--ease-out);
}
.qc-btn:hover { transform: scale(1.12); }
.qc-wa { background: linear-gradient(135deg, #2BE07A, #17A94E); box-shadow: 0 10px 24px rgba(37,211,102,.45); }
.qc-line { background: linear-gradient(135deg, #2ED96E, #05A648); box-shadow: 0 10px 24px rgba(6,199,85,.45); }

/* ─────────── Bottom navigation ─────────── */
.bottom-nav {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: max(14px, env(safe-area-inset-bottom, 14px));
  z-index: 110;
  width: min(520px, calc(100% - 24px));
}
.bn-inner {
  position: relative;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, .85);
  -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3);
  border: 1px solid rgba(0,51,160,.18);
  border-radius: 26px;
  padding: 8px;
  box-shadow: 0 22px 55px rgba(0,34,102,.28), inset 0 1px 0 rgba(255,255,255,.9);
}
.bn-indicator {
  position: absolute; top: 8px; bottom: 8px;
  border-radius: 19px;
  background: linear-gradient(135deg, var(--blue), var(--blue-mid));
  box-shadow: 0 6px 20px rgba(0,51,160,.45);
  transition: left .5s var(--ease-out), width .5s var(--ease-out);
  will-change: left;
}
.bn-item {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 4px 8px;
  border-radius: 19px;
  color: var(--ink-soft);
  transition: color .35s, transform .35s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.bn-item:active { transform: scale(.93); }
.bn-icon svg { width: 23px; height: 23px; transition: transform .4s var(--ease-out); }
.bn-item.is-active { color: #fff; }
.bn-item.is-active .bn-icon svg { transform: translateY(-1px) scale(1.08); }
.bn-label { font-size: .6rem; font-weight: 700; letter-spacing: .06em; line-height: 1; }

/* ─────────── Reveal / parallax / language ─────────── */
.reveal {
  opacity: 0; transform: translateY(34px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.reveal.visible { opacity: 1; transform: none; }
[data-parallax] { will-change: transform; }
.lang-fading [data-i18n] { transition: opacity .22s; opacity: 0; }
[data-i18n] { transition: opacity .25s; }

/* ═══════════ Responsive ═══════════ */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .statue-wrap { max-width: 320px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-visual { max-width: 440px; margin-inline: auto; }
  .support-grid { grid-template-columns: repeat(2, 1fr); }
  .ind-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; max-width: 560px; }
}

@media (max-width: 640px) {
  :root { --nav-h: 68px; }
  .topbar-cta { display: none; }
  .brand-sub { display: none; }
  .brand-mark { height: 44px; }
  .hero { padding-top: 96px; }
  .statue-wrap { max-width: 240px; }
  .statue-card { left: -4%; padding: 10px 16px; }
  .hero-stats { gap: 14px; }
  .stat-sep { display: none; }
  .stat { min-width: 70px; }
  .support-grid { grid-template-columns: 1fr; gap: 16px; }
  .ind-grid { grid-template-columns: 1fr; }
  .quick-contact { right: 12px; bottom: calc(var(--nav-h) + 40px); }
  .qc-btn { width: 47px; height: 47px; }
  .bottom-nav { width: calc(100% - 16px); }
  .bn-label { font-size: .56rem; }
  .marquee-track span { font-size: .66rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  [data-parallax] { transform: none !important; }
}
