/* ===== EUREON site - shared stylesheet ===== */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f3;
  --text: #14171c;
  --text-dim: #5a5f68;
  --accent: #0f766e;
  --accent-text: #ffffff;
  --border: rgba(0, 0, 0, 0.1);
  --max-width: 1100px;
  --header-h: 116px; /* sticky ヘッダーの高さ（ロゴ80px + 上下padding） */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  /* スクロールで次のセクションに吸い付く（snap）
     ピタッと必ず飛ばしたい場合は proximity → mandatory に変更 */
  /* mandatory だと一瞬で次のセクションに飛ぶため、
     出現アニメーションが見えないまま終わってしまう。
     アニメーションを見せたいので proximity に戻している。 */
  scroll-snap-type: y proximity;
}

/* 各セクションをスナップ位置に。sticky ヘッダー分だけ余白を確保 */
section,
.hero,
footer.site-footer {
  scroll-snap-align: start;
  scroll-margin-top: var(--header-h);
}

/* 横スクロールを止める。
   body だけに指定しても html 側がスクロールしてしまうため、
   html と body の両方に指定するのが確実。
   clip は position:sticky を壊さないので、対応ブラウザではこちらが適用される。 */
html, body {
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* height:auto を必ず添える。これが無いと HTML の height 属性が効いてしまい、
   CSS 側の aspect-ratio や本来の縦横比が無視されて画像が伸び縮みする。 */
img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header --- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
}

.brand-logo {
  height: 80px;
  width: auto;
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
}

nav.main-nav a {
  font-size: 0.92rem;
  color: var(--text-dim);
  transition: color 0.2s ease;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  color: var(--text);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

/* 背景ラッパー（パララックス用） */
.hero-bg-wrap {
  position: absolute;
  inset: -10% 0 0 0;
  height: 120%;
  z-index: 0;
  overflow: hidden;
  will-change: transform;
}

.hero img.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.42) saturate(1.1);
  transform: scale(1.25);
  transition: transform 2.4s cubic-bezier(0.16, 1, 0.3, 1),
              filter 1.6s ease;
}

/* 読み込み後、ゆっくり寄りが戻る（ケンバーンズ） */
.hero.hero-in img.hero-bg {
  transform: scale(1.06);
  animation: kenburns 24s ease-in-out 2.4s infinite alternate;
}

@keyframes kenburns {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to   { transform: scale(1.16) translate3d(-1.5%, -1.5%, 0); }
}

/* 上から下への暗幕。読み込み時に開く */
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.15) 40%,
    rgba(0, 0, 0, 0.75) 100%);
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 斜めに走る光のスイープ */
.hero-sweep {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.18) 48%,
    rgba(255, 255, 255, 0.05) 55%,
    transparent 65%);
  transform: translateX(-120%);
  opacity: 0;
}

.hero.hero-in .hero-sweep {
  animation: sweep 2.2s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

@keyframes sweep {
  0%   { transform: translateX(-120%); opacity: 0; }
  15%  { opacity: 1; }
  100% { transform: translateX(120%); opacity: 0; }
}

/* 見出しの1文字ずつマスク表示 */
.hero-title.is-split { overflow: visible; }

.hero-title .ch {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}

.hero-title .ch-in {
  display: inline-block;
  transform: translateY(115%) rotate(6deg);
  opacity: 0;
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.6s ease;
}

.hero.hero-in .hero-title .ch-in {
  transform: none;
  opacity: 1;
}

/* スクロール誘導 */
.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  opacity: 0;
  transition: opacity 0.8s ease 1.8s;
}

.hero.hero-in .hero-scroll { opacity: 1; }

.hero-scroll i {
  display: block;
  width: 1px;
  height: 48px;
  background: rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.hero-scroll i::after {
  content: "";
  position: absolute;
  left: 0;
  top: -48px;
  width: 1px;
  height: 48px;
  background: #fff;
  animation: scrollLine 2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes scrollLine {
  0%   { transform: translateY(0); }
  70%  { transform: translateY(96px); }
  100% { transform: translateY(96px); }
}

.hero-content {
  position: relative;
  z-index: 3;
  will-change: transform, opacity;
  padding: 80px 24px 64px;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  color: #ffffff;
}

.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 24px;
  color: #ffffff;
}

.hero p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 560px;
  margin-bottom: 32px;
  font-size: 0.98rem;
}

.page-hero {
  padding: 140px 24px 60px;
  border-bottom: 1px solid var(--border);
}

.page-hero .eyebrow { color: var(--accent); font-size: 0.8rem; letter-spacing: 0.15em; margin-bottom: 16px; display:block; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 12px; }
.page-hero p { color: var(--text-dim); }

/* --- Buttons --- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 0.9rem;
  transition: opacity 0.2s ease;
}

.btn:hover { opacity: 0.85; }

.btn-outline {
  display: inline-block;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 0.9rem;
}

/* --- Sections --- */
section {
  padding: 96px 0;
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  font-weight: 700;
  margin-bottom: 16px;
  display: block;
}

/* 英語ラベルの下に置く日本語のセクション見出し（大きく・太く） */
h2.section-label {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-bottom: 3px;
  margin-left: -0.15em;
}

/* 英語ラベルとはひとかたまりに見えるよう間隔を詰める */
.eyebrow + .section-label {
  margin-top: -20px;
}

/* 見出しに添えるキャッチコピー */
.section-lead {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 48px;
  max-width: 640px;
}

h2.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 48px;
  max-width: 640px;
}

/* --- Business cards grid --- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}

.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

.card-body { padding: 24px; }

.card-num { color: var(--accent); font-weight: 700; font-size: 0.85rem; margin-bottom: 12px; display: block; }

.card h3 { font-size: 1.1rem; margin-bottom: 12px; }

.card p { color: var(--text-dim); font-size: 0.92rem; }

/* --- About numbered list --- */
.about-list { max-width: 640px; }

.about-list li {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
}

.about-list li:last-child { border-bottom: 1px solid var(--border); }

.about-list span.num { color: var(--accent); font-weight: 700; flex-shrink: 0; }

/* --- Initiatives --- */
.initiative {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 64px;
}

.initiative:last-child { margin-bottom: 0; }

.initiative img { border-radius: 16px; aspect-ratio: 3/2; object-fit: cover; }

.initiative .eyebrow { margin-bottom: 12px; }

.initiative h3 { font-size: 1.3rem; margin-bottom: 12px; }

.initiative p { color: var(--text-dim); }

/* --- Contact CTA --- */
.cta { text-align: center; }
.cta h2 { max-width: 100%; margin: 0 auto 14px; }
.cta .section-lead { max-width: 100%; margin: 0 auto 24px; }
.cta p { color: var(--text-dim); max-width: 560px; margin: 0 auto 32px; }

/* --- Footer --- */
footer.site-footer {
  padding: 48px 24px;
  text-align: center;
}

footer.site-footer img { max-width: 200px; margin: 0 auto 16px; border-radius: 8px; }

footer.site-footer p { color: var(--text-dim); font-size: 0.85rem; }

/* --- Company page --- */
.profile-table { width: 100%; max-width: 640px; border-collapse: collapse; }
.profile-table tr { border-top: 1px solid var(--border); }
.profile-table tr:last-child { border-bottom: 1px solid var(--border); }
.profile-table th, .profile-table td { text-align: left; padding: 16px 0; font-weight: 400; }
.profile-table th { color: var(--text-dim); width: 160px; font-size: 0.9rem; }

.greeting-block { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.greeting-block h3 { font-size: 1.3rem; margin-bottom: 16px; }
.greeting-block p { color: var(--text-dim); margin-bottom: 20px; }
.greeting-block .signature { color: var(--text); font-size: 0.9rem; }

.map-frame { border-radius: 16px; overflow: hidden; border: 1px solid var(--border); }
.map-frame iframe { width: 100%; height: 360px; border: 0; }

/* --- Work page --- */
.work-list { display: block; }

.work-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  padding: 72px 0;
  border-top: 1px solid var(--border);
}
.work-card:first-child { border-top: none; padding-top: 8px; }
.work-card:last-child { padding-bottom: 16px; }

/* 偶数番は画像を右側へ。左右交互になりリズムが出る */
.work-card:nth-child(even) .work-visual { order: 2; }

/* --- ビジュアル枠 ---
   チラシ・バナー・ロゴと縦横比がばらばらなため、切り取らず
   （object-fit: contain）枠の中に収める。枠側で見た目を揃える。 */
.work-visual {
  position: relative;
  margin: 0;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.work-figure {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  padding: 20px;
  margin: 0;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
}
button.work-figure { cursor: zoom-in; }
.work-figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
  transition: transform 0.5s var(--ease-out-expo);
}
button.work-figure:hover img { transform: scale(1.03); }
button.work-figure:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: 16px; }

/* 文字の多いチラシは枠を縦長にして大きく表示する */
.work-visual.is-tall .work-figure { aspect-ratio: 4 / 3; padding: 16px; }

/* ロゴを置く枠は余白を多めに、背景を白く */
.work-visual.is-logo { background: #fff; }
.work-visual.is-logo .work-figure { padding: 15% 18%; }

.zoom-hint,
.visual-caption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  pointer-events: none;
}

/* --- 説明側 --- */
.work-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.work-tag {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  white-space: nowrap;
}
.work-tag.is-year {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}

.work-card h2 { font-size: 1.45rem; line-height: 1.55; margin-bottom: 10px; }

.work-client {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.work-desc { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 22px; }

.work-outcome {
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 18px 22px;
  margin-bottom: 26px;
}
.outcome-label {
  display: block;
  color: var(--accent);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  margin-bottom: 8px;
}
.outcome-figure {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 6px;
}
.outcome-figure b {
  color: var(--accent);
  font-size: 1.7rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.outcome-note { font-size: 0.88rem; color: var(--text-dim); margin: 0; }

.ext-mark { margin-left: 6px; font-size: 0.9em; }

/* --- 拡大表示（ライトボックス） --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 4vmin;
  background: rgba(10, 14, 13, 0.88);
  opacity: 0;
  visibility: hidden;
  /* visibility を遅延させると、開いた直後はまだ非表示扱いになり
     閉じるボタンにフォーカスを移せない。開くときは即時に切り替える。 */
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0s;
}
.lightbox img {
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  top: max(16px, 3vmin);
  right: max(16px, 3vmin);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-close:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.lightbox-caption {
  position: absolute;
  left: 0; right: 0;
  bottom: max(12px, 2vmin);
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.8rem;
  padding: 0 16px;
}
body.lightbox-open { overflow: hidden; }

/* --- Contact form --- */
form.contact-form { max-width: 560px; margin: 0 auto; }

.field { margin-bottom: 24px; }

.field label { display: block; font-size: 0.85rem; color: var(--text-dim); margin-bottom: 8px; }

.field input, .field select, .field textarea {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}

.field textarea { min-height: 140px; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.field input::placeholder,
.field textarea::placeholder { color: #aeb3ba; }

/* 必須ラベル */
.req {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

/* エラー表示 */
.field-error {
  color: #c0392b;
  font-size: 0.82rem;
  margin-top: 6px;
  min-height: 0;
}

.field input.has-error,
.field textarea.has-error {
  border-color: #c0392b;
  background: #fdf3f2;
}

/* 同意チェックボックス */
.field-consent { margin-bottom: 32px; }

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text);
}

.checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 4px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* 迷惑メール対策の隠しフィールド */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* 送信ボタン */
#submitBtn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  min-width: 180px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#submitBtn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-spinner { display: none; }

#submitBtn.is-loading .btn-spinner {
  display: block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* 送信結果メッセージ */
.form-status {
  margin-top: 24px;
  padding: 0;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.8;
}

.form-status.is-loading,
.form-status.is-success,
.form-status.is-error { padding: 16px 20px; }

.form-status.is-loading {
  background: var(--bg-alt);
  color: var(--text-dim);
}

.form-status.is-success {
  background: #eaf7f4;
  border-left: 3px solid var(--accent);
  color: #14514a;
}

.form-status.is-error {
  background: #fdf3f2;
  border-left: 3px solid #c0392b;
  color: #96281b;
}

.form-status a { color: inherit; text-decoration: underline; }
.form-status code {
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.85em;
}

.contact-alt { margin-top: 32px; color: var(--text-dim); font-size: 0.9rem; text-align: center; }
.contact-alt a { color: var(--accent); }

/* ===== Scroll reveal animation ===== */
:root {
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --rv-dur: 1s;
}

.rv {
  opacity: 0;
  filter: blur(10px);
  transition:
    opacity var(--rv-dur) var(--ease-out-expo),
    transform var(--rv-dur) var(--ease-out-expo),
    filter var(--rv-dur) var(--ease-out-expo),
    clip-path var(--rv-dur) var(--ease-out-expo);
  will-change: opacity, transform, filter;
}

.rv.is-in {
  opacity: 1;
  filter: blur(0);
  transform: none;
  clip-path: inset(0 0 -20% 0);
}

/* 出現パターン */
.rv-up        { transform: translateY(48px); }
.rv-up-big    { transform: translateY(90px) scale(0.92); }
.rv-left      { transform: translateX(-56px); }
.rv-right     { transform: translateX(56px); }
.rv-left-big  { transform: translateX(-110px) rotate(-2deg) scale(0.94); }
.rv-right-big { transform: translateX(110px) rotate(2deg) scale(0.94); }
.rv-pop       { transform: translateY(60px) scale(0.82); }
.rv-zoom      { transform: scale(1.18); filter: blur(16px); }

/* 見出しはマスクからせり上がる
   （clip-path が効かない環境でも消えないよう、
     is-in が付いていないときだけ適用する） */
.rv-clip:not(.is-in) {
  transform: translateY(70%);
  clip-path: inset(100% 0 -20% 0);
  filter: none;
}

.rv-clip.is-in {
  clip-path: none;
}

/* ホバー時の動き */
.card img,
.initiative img,
.greeting-block img {
  transition: transform 0.8s var(--ease-out-expo);
}

.card:hover img,
.initiative:hover img {
  transform: scale(1.08);
}

.card {
  transition: transform 0.5s var(--ease-out-expo),
              box-shadow 0.5s ease;
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.14);
}

.btn {
  transition: transform 0.4s var(--ease-out-expo),
              box-shadow 0.4s ease,
              opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.3);
}

.btn-outline {
  transition: transform 0.4s var(--ease-out-expo),
              background 0.3s ease;
}

.btn-outline:hover {
  transform: translateX(6px);
  background: var(--bg-alt);
}

/* 動きを減らす設定の場合はアニメーションを無効化 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; scroll-snap-type: none; }
  .rv, .card, .btn, .btn-outline,
  .card img, .initiative img, .work-figure img,
  .hero-bg, .hero-bg-wrap, .hero-content, .hero-title .ch-in {
    transition: none !important;
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
    clip-path: none !important;
  }
  .hero-bg { filter: brightness(0.42) !important; }
  .hero-sweep, .hero-scroll { display: none !important; }
}

/* --- Responsive --- */
/* ==========================================================
   ハンバーガーボタン（PCでは非表示）
   ========================================================== */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 120;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.35s var(--ease-out-expo), opacity 0.25s ease;
}

body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }


/* ==========================================================
   タブレット（〜900px）
   ========================================================== */
@media (max-width: 900px) {
  :root { --header-h: 84px; }

  .brand-logo { height: 48px; }

  .nav-inner { padding: 14px 20px; }

  nav.main-nav ul { gap: 20px; }
  nav.main-nav a { font-size: 0.85rem; }

  section { padding: 72px 0; }

  .initiative,
  .greeting-block { grid-template-columns: 1fr; gap: 28px; }

  /* 実績：1カラムに畳み、画像は必ず本文より上へ */
  .work-card { grid-template-columns: 1fr; gap: 26px; padding: 48px 0; }
  .work-card:nth-child(even) .work-visual { order: 0; }
}


/* ==========================================================
   スマートフォン（〜860px：メニューをハンバーガーに）
   ========================================================== */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  /* 重要: backdrop-filter があると子要素の position:fixed が
     ヘッダー基準になり、全画面メニューが正しく開かない。
     スマホでは不透明な背景にして backdrop-filter を外す。 */
  header.site-header {
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  /* メニューを全画面パネルに */
  nav.main-nav {
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
  }

  body.nav-open nav.main-nav {
    opacity: 1;
    visibility: visible;
  }

  nav.main-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 28px;
  }

  nav.main-nav a {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s var(--ease-out-expo);
  }

  body.nav-open nav.main-nav a { opacity: 1; transform: none; }
  body.nav-open nav.main-nav li:nth-child(1) a { transition-delay: 0.08s; }
  body.nav-open nav.main-nav li:nth-child(2) a { transition-delay: 0.14s; }
  body.nav-open nav.main-nav li:nth-child(3) a { transition-delay: 0.20s; }
  body.nav-open nav.main-nav li:nth-child(4) a { transition-delay: 0.26s; }
}


/* ==========================================================
   スマートフォン（〜600px）
   ========================================================== */
@media (max-width: 600px) {
  :root { --header-h: 84px; }

  /* スクロールスナップはスマホだと操作しづらいので無効化 */
  html { scroll-snap-type: none; }

  .brand-logo { height: 57px; } /* 38px の 1.5倍 */
  .nav-inner { padding: 12px 16px; }

  .container { padding: 0 18px; }

  section { padding: 56px 0; }

  /* --- ヒーロー --- */
  /* svh は「アドレスバーを除いた高さ」。非対応ブラウザ向けに vh も併記 */
  .hero { min-height: 84vh; min-height: 84svh; }
  .hero-content { padding: 100px 18px 72px; }
  .hero h1 { font-size: 1.45rem; line-height: 1.6; margin-bottom: 18px; }
  .hero p { font-size: 0.9rem; margin-bottom: 26px; }
  .hero-scroll { bottom: 16px; font-size: 0.6rem; }
  .hero-scroll i { height: 32px; }

  .page-hero { padding: 100px 18px 44px; }

  /* --- 見出し --- */
  h2.section-label {
    font-size: 1.85rem;
    margin-left: 0; /* 左端がはみ出さないよう調整をリセット */
  }
  .eyebrow + .section-label { margin-top: -6px; }
  .section-lead { font-size: 1rem; margin-bottom: 32px; }
  h2.section-title { font-size: 1.4rem; margin-bottom: 32px; }

  /* --- カード --- */
  .grid-3 { gap: 20px; }
  .card-body { padding: 20px; }
  .card h3 { font-size: 1.05rem; }

  /* --- 取り組み・実績 --- */
  .initiative { gap: 20px; margin-bottom: 40px; }
  .initiative h3 { font-size: 1.15rem; }
  .work-card { padding: 40px 0; gap: 20px; }
  .work-card h2 { font-size: 1.2rem; }
  .work-figure { padding: 12px; aspect-ratio: 4 / 3; }
  .work-visual.is-logo .work-figure { padding: 12% 14%; }
  .work-tag { font-size: 0.68rem; padding: 3px 9px; }
  .work-outcome { padding: 15px 17px; }
  .outcome-figure { font-size: 0.98rem; }
  .outcome-figure b { font-size: 1.45rem; }

  /* --- 会社概要テーブルを縦積みに --- */
  .profile-table th,
  .profile-table td { display: block; width: 100%; padding: 0; }
  .profile-table th { padding-top: 14px; font-size: 0.78rem; }
  .profile-table td { padding-bottom: 14px; }

  .map-frame iframe { height: 260px; }

  /* --- フォーム --- */
  /* iOSで入力時に画面が拡大されるのを防ぐため16px以上にする */
  .field input,
  .field select,
  .field textarea { font-size: 16px; padding: 13px 14px; }

  .field textarea { min-height: 120px; }

  #submitBtn { width: 100%; }

  .btn { padding: 14px 26px; }

  /* --- フッター --- */
  footer.site-footer { padding: 36px 18px; }
  footer.site-footer img { max-width: 150px; }

  /* --- アニメーションの移動量を控えめに（横はみ出し防止） --- */
  .rv-left-big  { transform: translateX(-40px) scale(0.96); }
  .rv-right-big { transform: translateX(40px) scale(0.96); }
  .rv-left      { transform: translateX(-24px); }
  .rv-up-big    { transform: translateY(48px) scale(0.96); }
  .rv-pop       { transform: translateY(32px) scale(0.92); }

  /* ホバー演出はタッチ端末では不要 */
  .card:hover { transform: none; box-shadow: none; }
  .card:hover img,
  .initiative:hover img,
  button.work-figure:hover img { transform: none; }
}


/* ==========================================================
   小型スマートフォン（〜380px）
   ========================================================== */
@media (max-width: 380px) {
  :root { --header-h: 76px; }
  h2.section-label { font-size: 1.6rem; }
  .hero h1 { font-size: 1.3rem; }
  .brand-logo { height: 48px; } /* 32px の 1.5倍 */
  .container { padding: 0 14px; }
}


/* ==========================================================
   タッチ端末：hover演出を無効化
   ========================================================== */
@media (hover: none) {
  .card:hover { transform: none; box-shadow: none; }
  .btn:hover { transform: none; box-shadow: none; }
  .btn-outline:hover { transform: none; }
  .card:hover img,
  .initiative:hover img,
  button.work-figure:hover img { transform: none; }
}
/* ==========================================================
   追補（公開前改善）
   - キーボード操作の可視化
   - 本文へスキップ
   - フッターナビ / 住所
   ========================================================== */

/* --- 本文へスキップ（キーボード利用者向け・通常は非表示） --- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 999;
  background: var(--accent);
  color: var(--accent-text);
  padding: 12px 20px;
  border-radius: 0 0 8px 8px;
  font-size: 0.9rem;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; }

/* --- フォーカスリング（Tabキー操作時のみ表示される） --- */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* ハンバーガーは丸く囲む */
.nav-toggle:focus-visible { outline-offset: 6px; border-radius: 8px; }

/* --- フッターナビ --- */
.footer-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  margin: 0 0 20px;
  padding: 0;
  font-size: 0.85rem;
}
.footer-nav a { color: var(--text-dim); transition: color 0.2s ease; }
.footer-nav a:hover { color: var(--accent); }

/* --- 住所（address要素の斜体を解除） --- */
.access-address {
  font-style: normal;
  font-size: 1.05rem;
  margin-bottom: 8px;
}

/* --- 汎用：視覚的に隠すが読み上げには残す --- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --- 汎用ページ（プライバシーポリシー / 完了 / 404） --- */
.doc-body { max-width: var(--max-width); }
.doc-body > p,
.doc-body > ul,
.doc-body > ol,
.doc-body > h2 { max-width: 760px; }
.doc-body h2 {
  font-size: 1.15rem;
  margin: 44px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.doc-body h2:first-child { margin-top: 0; }
.doc-body p { color: var(--text-dim); margin-bottom: 16px; }
.doc-body ul, .doc-body ol { color: var(--text-dim); margin: 0 0 16px 1.4em; }
.doc-body li { margin-bottom: 8px; }
.doc-body .updated { font-size: 0.85rem; color: var(--text-dim); margin-top: 40px; }
.doc-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* --- 中央寄せの結果ページ（完了 / 404） --- */
.result-page {
  min-height: 60vh;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 80px 24px;
}
.result-page .result-code {
  font-size: clamp(3rem, 12vw, 5.5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}
.result-page h1 { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: 16px; }
.result-page p { color: var(--text-dim); margin-bottom: 12px; }
.result-page .actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

@media (max-width: 600px) {
  .footer-nav { gap: 6px 18px; font-size: 0.8rem; }
  .doc-body h2 { font-size: 1.05rem; margin-top: 36px; }
}

/* --- お問い合わせフォーム：個人情報の取り扱い要約 --- */
.privacy-note {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-alt);
  margin-bottom: 24px;
  overflow: hidden;
}
.privacy-note > summary {
  cursor: pointer;
  padding: 14px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.privacy-note > summary::-webkit-details-marker { display: none; }
.privacy-note > summary::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
  flex: none;
}
.privacy-note[open] > summary::before { transform: rotate(45deg); }
.privacy-note > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.privacy-note > summary:hover { color: var(--accent); }

.privacy-note-body {
  padding: 0 18px 16px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.privacy-note-body dl { margin: 0; font-size: 0.86rem; }
.privacy-note-body dt {
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  margin-top: 14px;
}
.privacy-note-body dt:first-child { margin-top: 0; }
.privacy-note-body dd { margin: 4px 0 0; color: var(--text-dim); line-height: 1.7; }
.privacy-note-body dd a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.privacy-note-link {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}
.privacy-note-link a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 600px) {
  .privacy-note > summary { padding: 12px 14px; font-size: 0.85rem; }
  .privacy-note-body { padding: 14px 14px 14px; }
}
