/* ============================================================
   Smart Value — 共通スタイル（デザイントークン / ナビ / フッター / アニメ基盤）
   ============================================================ */

:root {
  /* colors */
  --white: #ffffff;
  --bg-alt: #f7f8fa;
  --ink: #111827;
  --ink-soft: #4b5563;
  --ink-faint: #9ca3af;
  --green: #16a34a;
  --green-deep: #15803d;   /* テキスト/塗り用（AAコントラスト） */
  --green-soft: #dcfce7;
  --emerald: #10b981;
  --teal: #06b6d4;
  --orange: #f97316;
  --orange-deep: #c2410c;  /* テキスト用（AAコントラスト） */
  --orange-soft: #ffedd5;
  --dark: #0f172a;
  --grad: linear-gradient(135deg, #10b981, #06b6d4);
  --grad-orange: linear-gradient(135deg, #f97316, #fb923c);

  /* type */
  --font-jp: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  --font-en: "Outfit", "Noto Sans JP", sans-serif;

  /* motion */
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* layout */
  --nav-h: 76px;
  --radius: 20px;
  --shadow-sm: 0 2px 10px rgba(17, 24, 39, 0.06);
  --shadow-md: 0 10px 30px rgba(17, 24, 39, 0.10);
  --shadow-lg: 0 24px 60px rgba(17, 24, 39, 0.16);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: clip;
  font-family: var(--font-jp);
  font-feature-settings: "palt";
  color: var(--ink);
  background: var(--white);
  line-height: 1.8;
  letter-spacing: 0.02em;
  /* 日本語の泣き別れ（単語の途中改行）防止。
     keep-all: 日本語のフレーズを途中で切らず、句読点・空白で改行。
     overflow-wrap: anywhere: それでも収まらない長い連続文字だけは折り返して横はみ出しを防ぐ。 */
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-break: strict;
}

/* 見出し・本文も同じ改行ルールを明示（念のため個別指定） */
.sec-title, .sec-lead, .hero-title, .hero-lead, .hero-en,
.page-hero-en, .page-hero-jp, .page-hero-note, .svc-hero-catch,
.prose, .mission-copy, .philosophy-copy, .feature-title, .feature-text,
.why-title, .why-text, .value-title, .value-text, .num-label,
.culture-title, .culture-text, .effect-title, .effect-text,
.work-title, .position-name, .position-desc, .recruit-hero-title,
.recruit-hero-lead, .recruit-lead, .cta-jp, .page-cta-title, .page-cta-text {
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-break: strict;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--green-soft); color: var(--green-deep); }

/* ---------- utilities ---------- */
.container {
  width: min(100% - 48px, 1160px);
  margin-inline: auto;
}
@media (max-width: 767px) {
  .container { width: min(100% - 40px, 1160px); }
}

.section { padding: clamp(80px, 12vw, 140px) 0; position: relative; }
.section--alt { background: var(--bg-alt); }

/* 途中で改行させたくない語（長いカタカナ複合語など）を囲むためのクラス。
   語まるごと次行へ送り、単語の途中改行を確実に防ぐ */
.nw { white-space: nowrap; }

.en { font-family: var(--font-en); letter-spacing: 0.04em; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 3000;
  padding: 10px 18px; background: var(--dark); color: #fff;
  border-radius: 999px; font-size: 14px;
  transform: translateY(-220%); transition: transform 0.3s;
}
.skip-link:focus { transform: translateY(0); }

/* ---------- section header（カテゴリラベル + 座布団見出し） ---------- */
.sec-head { margin-bottom: clamp(40px, 6vw, 64px); }
.sec-head--center { text-align: center; }

.cat-label {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; margin-bottom: 18px;
  font-family: var(--font-en); font-weight: 700; font-size: 13px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--green-deep);
  background: var(--green-soft);
  border-radius: 999px;
  transform: scale(0.8); opacity: 0;
  transition: transform 0.55s var(--ease-back), opacity 0.4s ease;
}
.cat-label--orange { color: var(--orange-deep); background: var(--orange-soft); }
.cat-label--white { color: #fff; background: rgba(255, 255, 255, 0.16); }
.cat-label .cat-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--grad); flex: none;
}
.cat-label--orange .cat-dot { background: var(--grad-orange); }
.is-inview .cat-label, .cat-label.is-inview { transform: scale(1); opacity: 1; }

.sec-title {
  font-size: clamp(28px, 4.6vw, 46px);
  font-weight: 900; line-height: 1.4; letter-spacing: 0.03em;
}
.sec-title--xl { font-size: clamp(32px, 6vw, 60px); }

/* 狭い画面では見出しを少しだけ小さく・字間を詰め、長い見出しの末尾の句点が
   単独で次行に落ちるのを防ぐ（横はみ出しも回避） */
@media (max-width: 430px) {
  .sec-title { font-size: 25px; letter-spacing: 0.01em; }
  .sec-title--xl { font-size: 29px; letter-spacing: 0.01em; }
}

/* 座布団（見出し下の色帯ワイプ）*/
.zab {
  background-image: linear-gradient(rgba(22, 163, 74, 0.22), rgba(22, 163, 74, 0.22));
  background-repeat: no-repeat;
  background-position: left 88%;
  background-size: 0% 0.42em;
  transition: background-size 0.7s var(--ease-expo) 0.25s;
  padding: 0 0.08em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.zab--orange {
  background-image: linear-gradient(rgba(249, 115, 22, 0.26), rgba(249, 115, 22, 0.26));
}
.zab--grad {
  background-image: linear-gradient(90deg, rgba(16, 185, 129, 0.3), rgba(6, 182, 212, 0.3));
}
.is-inview .zab, .is-inview.zab { background-size: 100% 0.42em; }

.sec-lead {
  margin-top: 22px; max-width: 640px;
  color: var(--ink-soft); font-size: clamp(15px, 1.6vw, 17px);
}
.sec-head--center .sec-lead { margin-inline: auto; }

/* ---------- 出現アニメーション基盤 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s ease, transform 0.9s var(--ease-expo);
  transition-delay: var(--d, 0s);
}
.reveal.is-inview { opacity: 1; transform: none; }

/* 手書きSVG（stroke描画）: pathLength="1" 前提 */
.draw path, .draw circle, .draw line, .draw polyline {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.1s ease-out 0.3s;
}
.is-inview .draw path, .is-inview .draw circle,
.is-inview .draw line, .is-inview .draw polyline { stroke-dashoffset: 0; }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 34px; border-radius: 999px;
  font-weight: 700; font-size: 15px; letter-spacing: 0.04em;
  transition: transform 0.35s var(--ease-expo), box-shadow 0.35s ease, background-color 0.3s, color 0.3s;
  overflow: hidden;
}
.btn:hover { transform: translateY(-4px); }
.btn .btn-arrow { transition: transform 0.35s var(--ease-expo); }
.btn:hover .btn-arrow { transform: translateX(5px); }

.btn--green { background: var(--green-deep); color: #fff; box-shadow: 0 8px 20px rgba(21, 128, 61, 0.25); }
.btn--green:hover { background: #166534; box-shadow: 0 14px 30px rgba(21, 128, 61, 0.35); }
.btn--orange { background: var(--orange); color: #fff; box-shadow: 0 8px 20px rgba(249, 115, 22, 0.28); }
.btn--orange:hover { background: #ea580c; box-shadow: 0 14px 30px rgba(249, 115, 22, 0.38); }
.btn--ghost { background: #fff; color: var(--ink); border: 2px solid #e5e7eb; }
.btn--ghost:hover { border-color: var(--green); color: var(--green-deep); }
.btn--white { background: #fff; color: var(--ink); box-shadow: var(--shadow-md); }

/* ---------- global nav ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  height: var(--nav-h);
  transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  height: 100%; display: flex; align-items: center; justify-content: space-between;
  width: min(100% - 40px, 1280px); margin-inline: auto; gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-family: var(--font-en); font-size: 20px; font-weight: 800; letter-spacing: 0.02em; }
.brand-name small {
  display: block; font-size: 10px; font-weight: 600;
  letter-spacing: 0.22em; color: var(--ink-faint); line-height: 1.2;
}

.gnav { display: flex; align-items: center; gap: 4px; }
.gnav > li { position: relative; }
.gnav-link {
  display: inline-flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 10px 16px; border-radius: 12px; line-height: 1.3;
  transition: background-color 0.25s;
}
.gnav-link:hover { background: rgba(22, 163, 74, 0.08); }
.gnav-link .en-label { font-family: var(--font-en); font-weight: 700; font-size: 14.5px; }
.gnav-link .jp-label { font-size: 10.5px; color: var(--ink-faint); letter-spacing: 0.08em; }
.gnav-link .drop-caret { transition: transform 0.3s; margin-left: 2px; }

/* Service ドロップダウン */
.has-drop .drop-panel {
  position: absolute; top: calc(100% + 10px); left: 50%;
  translate: -50% 0;
  width: 560px; padding: 18px;
  background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg);
  border: 1px solid #f1f5f9;
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity 0.35s ease, transform 0.45s var(--ease-expo), visibility 0.35s;
}
.has-drop:hover .drop-panel,
.has-drop:focus-within .drop-panel,
.has-drop.is-open .drop-panel {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.has-drop:hover .drop-caret, .has-drop.is-open .drop-caret { transform: rotate(180deg); }
.drop-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 14px;
  transition: background-color 0.25s, transform 0.3s var(--ease-expo);
}
.drop-item:hover { background: var(--bg-alt); transform: translateX(4px); }
.drop-num {
  font-family: var(--font-en); font-weight: 800; font-size: 12px;
  color: #fff; background: var(--grad);
  width: 30px; height: 30px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
}
.drop-item:nth-child(even) .drop-num { background: var(--grad-orange); }
.drop-item b { display: block; font-size: 14px; line-height: 1.4; }
.drop-item span { display: block; font-family: var(--font-en); font-size: 10px; color: var(--ink-faint); letter-spacing: 0.1em; }

.nav-cta { flex: none; }
.nav-cta .btn { padding: 12px 24px; font-size: 14px; }

/* burger */
.burger {
  display: none; position: relative; z-index: 1101;
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--dark);
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.burger span {
  width: 20px; height: 2px; background: #fff; border-radius: 2px;
  transition: transform 0.35s var(--ease-expo), opacity 0.25s;
}
.menu-open .burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; }
.menu-open .burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 1100;
  background: linear-gradient(160deg, #052e16 0%, #0f172a 70%);
  color: #fff;
  display: flex; flex-direction: column; justify-content: center;
  padding: 90px 34px 40px;
  opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s;
  overflow-y: auto;
}
.menu-open .mobile-menu { opacity: 1; visibility: visible; }
.mobile-menu li { transform: translateY(24px); opacity: 0; transition: transform 0.6s var(--ease-expo), opacity 0.4s; }
.menu-open .mobile-menu li { transform: none; opacity: 1; }
.mobile-menu a { display: block; padding: 12px 0; }
.mobile-menu .m-en { font-family: var(--font-en); font-size: 30px; font-weight: 800; }
.mobile-menu .m-jp { font-size: 12px; color: rgba(255, 255, 255, 0.55); letter-spacing: 0.14em; }
.mobile-menu .m-sub { padding-left: 18px; border-left: 2px solid rgba(255, 255, 255, 0.18); margin: 6px 0 14px; }
.mobile-menu .m-sub a { padding: 7px 0; font-size: 14.5px; color: rgba(255, 255, 255, 0.85); }
.mobile-menu .m-cta { margin-top: 26px; }

@media (max-width: 1023px) {
  .gnav, .nav-cta { display: none; }
  .burger { display: flex; }
}
@media (min-width: 1024px) {
  .mobile-menu { display: none; }
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--dark); color: #e2e8f0;
  padding: 80px 0 36px; position: relative; overflow: clip;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px;
  padding-bottom: 56px; border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-brand .brand-name { color: #fff; }
.footer-tagline { margin-top: 16px; font-size: 14px; color: #94a3b8; max-width: 320px; }
.footer-sns { display: flex; gap: 12px; margin-top: 24px; }
.footer-sns a {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.08);
  transition: background-color 0.3s, transform 0.3s var(--ease-expo);
}
.footer-sns a:hover { background: var(--green); transform: translateY(-4px); }
.footer-sns svg { width: 18px; height: 18px; stroke: #fff; }
.footer-col h3 {
  font-family: var(--font-en); font-size: 13px; font-weight: 700;
  letter-spacing: 0.18em; color: #64748b; margin-bottom: 18px;
}
.footer-col a {
  display: inline-block; padding: 6px 0; font-size: 14.5px; color: #cbd5e1;
  transition: color 0.25s, transform 0.3s var(--ease-expo);
}
.footer-col a:hover { color: #fff; transform: translateX(4px); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding-top: 30px; font-size: 12.5px; color: #64748b; flex-wrap: wrap;
}
@media (max-width: 767px) {
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 5000;
  background: #fff;
  display: grid; place-items: center; place-content: center; gap: 18px;
  transition: opacity 0.6s ease, visibility 0.6s;
}
.loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-logo { width: 96px; height: 96px; }
.loader-logo .ld {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: loaderDraw 1.1s var(--ease-expo) forwards;
}
.loader-logo .ld2 { animation-delay: 0.35s; }
@keyframes loaderDraw { to { stroke-dashoffset: 0; } }
.loader-text {
  font-family: var(--font-en); font-weight: 700; font-size: 13px;
  letter-spacing: 0.42em; color: var(--ink-faint);
  animation: loaderFade 0.8s ease 0.5s both;
}
@keyframes loaderFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- custom cursor ---------- */
.cursor, .cursor-dot { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor {
    display: block; position: fixed; z-index: 4000; pointer-events: none;
    width: 40px; height: 40px; border-radius: 50%;
    border: 1.5px solid var(--green);
    left: 0; top: 0; translate: -50% -50%;
    transition: width 0.3s var(--ease-expo), height 0.3s var(--ease-expo),
                background-color 0.3s, opacity 0.3s, border-color 0.3s;
    display: grid; place-items: center;
  }
  .cursor-dot {
    display: block; position: fixed; z-index: 4001; pointer-events: none;
    width: 6px; height: 6px; border-radius: 50%; background: var(--green-deep);
    left: 0; top: 0; translate: -50% -50%;
  }
  .cursor-label {
    font-family: var(--font-en); font-size: 11px; font-weight: 700;
    color: #fff; opacity: 0; transition: opacity 0.25s; letter-spacing: 0.08em;
  }
  .cursor.is-hover {
    width: 74px; height: 74px;
    background: rgba(21, 128, 61, 0.9); border-color: transparent;
  }
  .cursor.is-hover .cursor-label { opacity: 1; }
  .cursor.is-down { width: 28px; height: 28px; }
  body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; }
}

/* ---------- marquee 基盤 ---------- */
.marquee { overflow: clip; display: flex; }
.marquee-track {
  display: flex; align-items: center; flex: none;
  gap: var(--mq-gap, 40px); padding-right: var(--mq-gap, 40px);
  width: max-content;
  animation: marqueeMove var(--mq-speed, 32s) linear infinite;
}
.marquee--reverse .marquee-track { animation-direction: reverse; }
@keyframes marqueeMove { to { transform: translateX(-100%); } }

/* ---------- 世界地図ドット風背景 ---------- */
.dot-field {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(21, 128, 61, 0.16) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 20%, transparent 72%);
  mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 20%, transparent 72%);
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .reveal { opacity: 1; transform: none; }
  .cat-label { opacity: 1; transform: none; }
  .zab { background-size: 100% 0.42em; }
  .draw path, .draw circle, .draw line, .draw polyline { stroke-dashoffset: 0; }
  .marquee-track { animation: none; }
  .cursor, .cursor-dot { display: none !important; }
  body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: auto; }
}
