/* =========================================
   株式会社ULU デザイン案（A案 Editorial）
   ルールは docs/04_design-guide.md を参照
   ========================================= */

/* ---------- 1. 変数（色・書体） ---------- */
:root {
  --white: #ffffff;
  --kinari: #f4f1ec;
  --ink: #1f2a2e;
  --teal: #2f8f8b;
  --teal-dark: #24706d;
  --gray: #6b7478;
  --line: #d9d4cc;

  --serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --en: "Cormorant Garamond", "Times New Roman", serif;

  --header-h: 80px;
}

/* ---------- 2. 基本 ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
em { font-style: italic; }
.sp { display: none; }
.pc { display: inline; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 40px; }
.section { padding: 120px 0; }
.section--kinari { background: var(--kinari); }
.more { margin-top: 56px; text-align: right; }

/* ---------- 3. 部品 ---------- */
/* ボタン */
.btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 14px;
  letter-spacing: .08em;
  transition: background .3s;
}
.btn--teal { background: var(--teal); color: var(--white); }
.btn--teal:hover { background: var(--teal-dark); }
.btn--lg { padding: 20px 56px; font-size: 16px; }

/* 矢印つきリンク */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  letter-spacing: .1em;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 6px;
}
.link-arrow::after {
  content: "";
  width: 32px; height: 1px;
  background: currentColor;
  transition: width .3s;
}
.link-arrow:hover::after { width: 48px; }

/* セクション見出し：番号・英字・和文 */
.sec-head { margin-bottom: 64px; }
.sec-head__num {
  font-family: var(--en);
  font-size: 15px;
  color: var(--teal);
  display: flex; align-items: center; gap: 12px;
}
.sec-head__num::after { content: ""; width: 40px; height: 1px; background: var(--teal); }
.sec-head__en {
  font-family: var(--en);
  font-style: italic;
  font-size: 18px;
  color: var(--gray);
  letter-spacing: .05em;
  margin-top: 8px;
}
.sec-head__ja {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 36px;
  line-height: 1.5;
  letter-spacing: .05em;
}

/* 確認用の帯（本番では削除） */
.proposal-bar {
  background: var(--ink); color: var(--white);
  font-size: 12px; letter-spacing: .08em; text-align: center;
  padding: 6px 16px; line-height: 1.6;
}

/* ---------- 4. ヘッダー ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  height: var(--header-h);
  max-width: 1360px; margin: 0 auto; padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.logo {
  font-family: var(--en);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--ink);
}
/* ヘッダーのロゴ画像 */
.logo--img { display: block; line-height: 0; }
.logo--img img { height: 40px; width: auto; }
.logo span { font-size: 13px; font-style: italic; letter-spacing: .05em; margin-left: 6px; color: var(--gray); }
.nav ul { display: flex; gap: 40px; }
.nav a {
  font-family: var(--en);
  font-size: 18px;
  letter-spacing: .06em;
  position: relative;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 2px;
  width: 0; height: 1px; background: var(--teal); transition: width .3s;
}
.nav a:hover::after { width: 100%; }
.header__cta { display: flex; align-items: center; gap: 24px; }
.header__tel { font-family: var(--en); font-size: 20px; letter-spacing: .06em; }
.menu-btn { display: none; }

/* ---------- 5. ファーストビュー ---------- */
/* 背景：生成りから淡いティールへのグラデーション。
   イラストの後ろに、ほのかな光（円形グラデーション）を重ねる */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 72% 50%, rgba(255,255,255,.9) 0%, rgba(255,255,255,0) 38%),
    linear-gradient(135deg, var(--kinari) 0%, #eef4f1 50%, #d8ebe8 100%);
}
.hero__text { max-width: 600px; }

/* 揺れるグラデーション：ぼかした3つの円を、ゆっくり別々に動かす */
.hero__glow { position: absolute; inset: 0; pointer-events: none; }
.hero__glow span {
  position: absolute;
  width: 55vw; height: 55vw; max-width: 820px; max-height: 820px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .85;
  animation: drift-a 12s ease-in-out infinite alternate;
}
.hero__glow span:nth-child(1) { background: #c6e5e0; top: -20%; right: -10%; }
.hero__glow span:nth-child(2) { background: #dff0e6; bottom: -30%; left: -15%; animation-name: drift-b; }
.hero__glow span:nth-child(3) { background: #fbf3e2; top: 30%; left: 30%; width: 40vw; height: 40vw; animation-name: drift-c; }
.hero__glow span:nth-child(4) { background: #d8edf2; bottom: -25%; right: 15%; width: 35vw; height: 35vw; animation-name: drift-d; }
@keyframes drift-a {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(-25vw, 15vh) scale(1.3); }
  66%  { transform: translate(-10vw, 35vh) scale(.85); }
  100% { transform: translate(-30vw, 5vh) scale(1.15); }
}
@keyframes drift-b {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(30vw, -20vh) scale(1.25); }
  66%  { transform: translate(15vw, -35vh) scale(.9); }
  100% { transform: translate(35vw, -5vh) scale(1.3); }
}
@keyframes drift-c {
  0%   { transform: translate(0, 0) scale(.8); }
  33%  { transform: translate(20vw, -25vh) scale(1.3); }
  66%  { transform: translate(-20vw, 10vh) scale(1); }
  100% { transform: translate(-5vw, -15vh) scale(1.2); }
}
@keyframes drift-d {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(-30vw, -20vh) scale(.8); }
  66%  { transform: translate(10vw, -40vh) scale(1.3); }
  100% { transform: translate(-15vw, -10vh) scale(1); }
}
/* 「視差効果を減らす」設定の人には動かさない */
@media (prefers-reduced-motion: reduce) {
  .hero__glow span { animation: none; }
}
.hero__inner {
  position: relative; /* 揺れる円より手前に出す */
  max-width: 1360px; margin: 0 auto; padding: 72px 40px 96px;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center;
  min-height: calc(100vh - var(--header-h));
}
.hero__issue {
  font-family: var(--en);
  font-size: 16px;
  letter-spacing: .1em;
  color: var(--gray);
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px; margin-bottom: 40px;
  display: inline-block;
}
.hero__issue em { color: var(--teal); }
.hero__copy {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(36px, 4.4vw, 60px);
  line-height: 1.55;
  letter-spacing: .06em;
}
.hero__copy span { color: var(--teal); }
.hero__lead { margin: 40px 0 48px; color: var(--gray); }

/* パンの木のイラスト（背景が透明な画像） */
.hero__visual { display: flex; justify-content: center; }
.hero__visual img {
  width: auto; max-width: 100%;
  max-height: min(57.6vh, 512px); /* 以前（72vh / 640px）の80% */
  height: auto;
  filter: drop-shadow(0 24px 32px rgba(31, 42, 46, .08));
}
.hero__vertical {
  position: absolute; right: 16px; top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--en);
  font-size: 12px; letter-spacing: .4em; color: var(--gray);
}

/* ---------- 境目を横切る女性のイラスト ----------
   .walker は高さ0の目印。中の .walker__track を境目の上下にまたがって置き、
   はみ出た部分を隠して、横スクロールが出ないようにする */
.walker { position: relative; height: 0; z-index: 5; }
.walker__track {
  position: absolute; left: 0; right: 0;
  top: -190px; height: 380px;
  overflow: hidden; pointer-events: none;
}
.walker__body {
  position: absolute; left: 0; top: 0;
  width: 380px; height: 380px;
  will-change: transform;
  /* 右の画面外から左の画面外まで、一定の速さで歩き続ける。
     秒数を大きくするほど、ゆっくり歩く */
  animation: walk-across 26s linear infinite;
}
@keyframes walk-across {
  from { transform: translateX(100vw); }
  to   { transform: translateX(-100%); }
}
/* コマ送り：4枚を同じ場所に重ね、--step の秒数ずつ順番に表示する。
   1周（4コマ）の長さ = --step × 4 */
.walker__body { --step: .8s; }
.walker__frame {
  position: absolute; inset: 0;
  width: 100%; height: auto;
  opacity: 0;
  animation: walk-frame calc(var(--step) * 4) steps(1, end) infinite;
}
.walker__frame:nth-child(2) { animation-delay: var(--step); }
.walker__frame:nth-child(3) { animation-delay: calc(var(--step) * 2); }
.walker__frame:nth-child(4) { animation-delay: calc(var(--step) * 3); }
/* 1周のうち、最初の4分の1だけ表示する */
@keyframes walk-frame {
  0%   { opacity: 1; }
  25%  { opacity: 0; }
  100% { opacity: 0; }
}
/* 歩いているように、上下に小さく弾ませる（コマ送りとは別の層で動かす） */
.walker__bob {
  position: absolute; inset: 0;
  animation: walk-bob .9s ease-in-out infinite alternate;
}
@keyframes walk-bob {
  from { transform: translateY(0) rotate(-1deg); }
  to   { transform: translateY(-8px) rotate(1deg); }
}
/* 吹き出し：顔の前（左側）に出す */
.walker__body { pointer-events: auto; cursor: pointer; } /* 女性の上だけマウスに反応させる */
.walker__bubble {
  position: absolute; z-index: 1;
  right: 72%; top: 6%;
  width: max-content; max-width: 220px;
  padding: 12px 18px;
  background: var(--white);
  border: 1px solid var(--teal);
  border-radius: 20px;
  font-family: var(--serif);
  font-size: 14px; line-height: 1.6; color: var(--ink);
  box-shadow: 0 8px 20px rgba(31, 42, 46, .12);
  opacity: 0; transform: translateY(8px) scale(.9);
  transform-origin: right bottom;
  transition: opacity .3s, transform .3s cubic-bezier(.22, 1, .36, 1);
}
/* 吹き出しのしっぽ（顔のほうを指す） */
.walker__bubble::after {
  content: ""; position: absolute;
  right: -7px; bottom: 14px;
  width: 12px; height: 12px;
  background: var(--white);
  border-right: 1px solid var(--teal); border-bottom: 1px solid var(--teal);
  transform: rotate(-45deg);
}
.walker__body:hover .walker__bubble,
.walker__body.is-talking .walker__bubble { opacity: 1; transform: none; }

/* 動きを減らす設定の人には、右寄りに立ち止まった状態で見せる */
@media (prefers-reduced-motion: reduce) {
  .walker__body { left: auto; right: 8%; animation: none; }
  .walker__frame, .walker__bob { animation: none; }
  .walker__frame:first-child { opacity: 1; }
}

/* ---------- 写真を背景に敷くセクション（共通） ----------
   写真は HTML の style="--bg: url(...)" で指定する。
   上に半透明の色を重ねて、文字を読みやすくする */
.section--photo {
  position: relative; isolation: isolate;
  background: var(--bg) center / cover no-repeat;
}
.section--photo::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(244, 241, 236, .88);
}

/* ---------- 6. 選ばれる理由 ---------- */
.strengths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px; }
.strength { border-top: 1px solid var(--ink); padding-top: 32px; }
.strength__num { font-family: var(--en); font-style: italic; font-size: 32px; color: var(--teal); line-height: 1; }
.strength h3 { font-family: var(--serif); font-weight: 500; font-size: 22px; margin: 20px 0 16px; }
.strength p { font-size: 15px; color: var(--gray); }

/* ---------- 7. 事業内容 ---------- */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; }
/* カード：写真（::before）の上に、暗いグラデーション（::after）を重ねる */
.service {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 320px;
  padding: 48px;
  color: var(--white);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.service::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: var(--img) center / cover no-repeat;
  transition: transform 1s cubic-bezier(.22, 1, .36, 1);
}
.service::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(31, 42, 46, .45) 0%, rgba(31, 42, 46, .85) 100%);
  transition: background .5s;
}
.service__en { font-family: var(--en); font-style: italic; font-size: 40px; color: #a8dcd7; line-height: 1.2; }
.service h3 { font-family: var(--serif); font-weight: 500; font-size: 22px; margin: 8px 0; }
.service p { font-size: 15px; color: rgba(255, 255, 255, .85); }
.service__more { margin-top: 24px; font-size: 13px; letter-spacing: .1em; }
.service__more::after { content: " →"; }
/* ホバー：写真が少し寄り、色がティールに変わる */
.service:hover::before { transform: scale(1.06); }
.service:hover::after { background: linear-gradient(180deg, rgba(47, 143, 139, .45) 0%, rgba(31, 42, 46, .88) 100%); }

/* ---------- 8. 制作実績 ---------- */
.works {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  grid-template-rows: auto auto;
  gap: 48px 40px;
}
.work--main { grid-row: span 2; }
.work__img {
  aspect-ratio: 4 / 3;
  display: flex; align-items: flex-end; padding: 24px;
  font-family: var(--serif); font-size: 22px; color: var(--white);
  overflow: hidden;
  transition: transform .5s;
  /* 写真の下側だけ暗くして、ラベルの文字を読みやすくする */
  background: linear-gradient(0deg, rgba(31, 42, 46, .65) 0%, rgba(31, 42, 46, 0) 50%), var(--img) center / cover no-repeat;
}
.work--main .work__img { aspect-ratio: auto; height: calc(100% - 80px); min-height: 420px; }
.work:hover .work__img { transform: scale(.98); }
.work__cat { font-family: var(--en); font-style: italic; color: var(--teal); margin-top: 16px; }
.work h3 { font-family: var(--serif); font-weight: 500; font-size: 17px; }

/* ---------- 9. 制作の流れ ---------- */
.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }
.flow li { border-top: 1px solid var(--ink); padding-top: 24px; }
.flow span { font-family: var(--en); font-size: 40px; color: var(--teal); line-height: 1; }
.flow h3 { font-family: var(--serif); font-weight: 500; font-size: 19px; margin: 16px 0 8px; }
.flow p { font-size: 14px; color: var(--gray); line-height: 1.8; }

/* 制作の流れ：右上のイラスト（上の「制作実績」の余白に少しはみ出す） */
.flow-section { position: relative; }
.flow-illust {
  position: absolute; z-index: 2;
  right: 4%; top: -110px;
  width: 340px; aspect-ratio: 1;
  pointer-events: none;
}
.flow-illust img { width: 100%; height: auto; display: block; will-change: transform; }

/* ---------- 10. 会社について ---------- */
.about__inner { display: grid; grid-template-columns: auto 1fr; gap: 120px; align-items: start; }
.about__vertical {
  writing-mode: vertical-rl;
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1.8;
  letter-spacing: .2em;
  color: var(--teal);
  padding-left: 40px;
  border-left: 1px solid var(--line);
}
.about__text p { margin-bottom: 24px; max-width: 34em; }
.about__text .link-arrow { margin-top: 16px; }

.about.section--photo::before {
  background: linear-gradient(90deg, rgba(255, 255, 255, .94) 0%, rgba(255, 255, 255, .86) 55%, rgba(255, 255, 255, .45) 100%);
}

/* ---------- 11. お知らせ（掲示板） ---------- */
.board [hidden] { display: none !important; }
.board__list { border-top: 1px solid var(--line); }
.board__item { border-bottom: 1px solid var(--line); }
.board__item summary {
  display: grid; grid-template-columns: 120px 1fr 24px; align-items: center; gap: 24px;
  padding: 28px 8px; cursor: pointer; list-style: none;
  transition: background .3s, padding .3s;
}
.board__item summary::-webkit-details-marker { display: none; }
.board__item summary:hover { background: var(--white); padding-left: 20px; }
.board__item summary::after { /* 開閉の「＋」 */
  content: ""; width: 14px; height: 14px; justify-self: end;
  background: linear-gradient(var(--teal), var(--teal)) center / 100% 1px no-repeat,
              linear-gradient(var(--teal), var(--teal)) center / 1px 100% no-repeat;
  transition: transform .3s;
}
.board__item[open] summary::after { transform: rotate(45deg); }
.board__item[open] summary { background: var(--white); }
.board__item time { font-family: var(--en); font-size: 17px; color: var(--gray); }
.board__item h3 { font-size: 16px; font-weight: 500; line-height: 1.7; }
.board__body {
  background: var(--white); padding: 4px 64px 36px calc(120px + 24px + 8px);
  font-size: 15px; line-height: 1.9; color: var(--ink);
  animation: board-open .45s ease;
}
.board__body p + p { margin-top: 1em; }
.board__body img { max-width: 100%; height: auto; margin-top: 1em; }
@keyframes board-open { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.board__more {
  display: block; margin: 40px auto 0; padding: 12px 48px;
  font-family: var(--sans); font-size: 14px; letter-spacing: .1em;
  border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer;
  transition: background .3s, color .3s;
}
.board__more:hover { background: var(--ink); color: var(--white); }

/* ---------- 12. 相談 ---------- */
.cta { background: var(--ink); color: var(--white); text-align: center; padding: 120px 0; }
.cta__en { font-family: var(--en); font-style: italic; font-size: 22px; color: #7fc4c0; }
.cta__title { font-family: var(--serif); font-weight: 500; font-size: 36px; line-height: 1.6; margin: 16px 0 24px; }
.cta p { color: #c9d0d2; }
.cta__btns { display: flex; justify-content: center; align-items: center; gap: 48px; margin-top: 56px; flex-wrap: wrap; }
.cta__tel { font-family: var(--en); font-size: 32px; letter-spacing: .06em; display: flex; flex-direction: column; line-height: 1.3; }
.cta__tel small { font-family: var(--sans); font-size: 12px; color: #c9d0d2; letter-spacing: .1em; }

/* ---------- 13. フッター ---------- */
.footer { padding: 80px 0 32px; border-top: 1px solid var(--line); }
.footer__inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer__addr { font-size: 13px; color: var(--gray); margin-top: 16px; }
.footer__nav { display: flex; gap: 32px; flex-wrap: wrap; font-family: var(--en); font-size: 17px; }
.footer__nav a:hover { color: var(--teal); }
.footer__copy { text-align: center; font-family: var(--en); font-size: 13px; color: var(--gray); margin-top: 64px; }

/* =========================================
   タブレット（1024px以下）
   ========================================= */
/* ---------- 13. お問い合わせフォーム ---------- */
.container--narrow { max-width: 920px; }
.form-lead { margin-bottom: 56px; color: var(--gray); }
.contact-form { border-top: 1px solid var(--line); }
.field {
  display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start;
  padding: 28px 0; border-bottom: 1px solid var(--line);
}
.field > label { display: flex; align-items: flex-start; gap: 12px; font-weight: 500; padding-top: 12px; line-height: 1.6; }
.badge {
  flex-shrink: 0; font-size: 11px; letter-spacing: .1em; line-height: 1;
  padding: 5px 8px; margin-top: 2px; border: 1px solid var(--line); color: var(--gray);
}
.badge--must { background: var(--teal); border-color: var(--teal); color: var(--white); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  padding: 12px 16px; background: var(--white);
  border: 1px solid var(--line); border-radius: 0; appearance: none;
  transition: border-color .3s, box-shadow .3s;
}
.field textarea { resize: vertical; min-height: 200px; line-height: 1.8; }
.field input::placeholder, .field textarea::placeholder { color: #a9aeb0; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(47, 143, 139, .15); }
.field [aria-invalid="true"] { border-color: #c0504d; background: #fdf6f5; }
.field__note { font-size: 13px; color: var(--gray); margin-top: 8px; }
.field__error { font-size: 13px; color: #c0504d; margin-top: 8px; }
.field > .field__error { grid-column: 2; margin-top: -12px; }

.form-agree { text-align: center; margin-top: 48px; }
.checkbox { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.checkbox input { width: 20px; height: 20px; accent-color: var(--teal); cursor: pointer; }
.text-link { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.form-agree .field__error { margin-top: 8px; }
.form-error { text-align: center; color: #c0504d; margin-top: 24px; }
.form-submit {
  display: block; margin: 40px auto 0; min-width: 320px;
  border: none; cursor: pointer; font-family: inherit; letter-spacing: .2em;
}

.form-thanks {
  text-align: center; padding: 72px 40px; background: var(--kinari);
  border-top: 2px solid var(--teal); outline: none;
}
.form-thanks__en { font-family: var(--en); font-style: italic; font-size: 22px; color: var(--teal); }
.form-thanks__title { font-family: var(--serif); font-size: 26px; font-weight: 500; margin: 8px 0 24px; }
.form-thanks__demo { margin-top: 24px; font-size: 13px; color: var(--gray); }

@media (max-width: 1024px) {
  .nav ul { gap: 24px; }
  .header__tel { display: none; }
  .flow { grid-template-columns: repeat(3, 1fr); row-gap: 48px; }
  .about__inner { gap: 64px; }
}

/* =========================================
   スマホ（768px以下）
   ========================================= */
@media (max-width: 768px) {
  :root { --header-h: 64px; }
  .sp { display: inline; }
  .pc { display: none; }
  .form-lead { margin-bottom: 40px; font-size: 14px; }
  .field { grid-template-columns: 1fr; gap: 10px; padding: 20px 0; }
  .field > label { padding-top: 0; }
  .field > .field__error { grid-column: 1; margin-top: 0; }
  .form-submit { width: 100%; min-width: 0; }
  .form-thanks { padding: 48px 20px; }
  .form-thanks__title { font-size: 20px; }
  .proposal-bar { font-size: 11px; letter-spacing: 0; padding: 6px 8px; }
  .container { padding: 0 20px; }
  .section { padding: 72px 0; }
  .sec-head { margin-bottom: 40px; }
  .sec-head__ja { font-size: 26px; }
  .more { margin-top: 40px; }

  /* ヘッダー：メニューボタン */
  /* backdrop-filter があると、中の position: fixed がヘッダー基準になり
     メニューが画面全体を覆わなくなるため、スマホでは外す */
  .header { backdrop-filter: none; background: var(--white); }
  .header__inner { padding: 0 20px; }
  .logo { font-size: 26px; }
  .logo--img img { height: 32px; }
  .header__cta .btn { display: none; }
  .menu-btn {
    display: flex; flex-direction: column; justify-content: center; gap: 8px;
    width: 44px; height: 44px; padding: 0 8px;
    background: none; border: none; cursor: pointer;
  }
  .menu-btn span { display: block; height: 1px; background: var(--ink); transition: transform .3s; }
  .is-menu-open .menu-btn span:first-child { transform: translateY(4.5px) rotate(20deg); }
  .is-menu-open .menu-btn span:last-child { transform: translateY(-4.5px) rotate(-20deg); }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0;
    background: var(--white);
    padding: 48px 20px;
    opacity: 0; visibility: hidden; transition: opacity .3s;
  }
  .is-menu-open .nav { opacity: 1; visibility: visible; }
  .nav ul { flex-direction: column; gap: 8px; }
  .nav a { font-size: 32px; }

  /* ファーストビュー */
  .hero__inner { grid-template-columns: 1fr; gap: 32px; padding: 32px 20px 64px; min-height: auto; }
  .hero__issue { font-size: 14px; margin-bottom: 28px; }
  .hero__lead { margin: 28px 0 36px; font-size: 15px; }
  /* スマホではイラストを文字の上に出す */
  .hero__visual { order: -1; }
  .walker__track { top: -110px; height: 220px; }
  .walker__body { width: 220px; height: 220px; animation-duration: 16s; }
  .walker__bubble { font-size: 12px; max-width: 160px; padding: 8px 12px; }
  .hero {
    background:
      radial-gradient(circle at 50% 22%, rgba(255,255,255,.9) 0%, rgba(255,255,255,0) 45%),
      linear-gradient(160deg, var(--kinari) 0%, #eef4f1 50%, #d8ebe8 100%);
  }
  .hero__visual img { max-height: 272px; } /* 以前（340px）の80% */
  .hero__vertical { display: none; }

  .strengths { grid-template-columns: 1fr; gap: 40px; }
  .services { grid-template-columns: 1fr; }
  .service { padding: 32px 24px; min-height: 240px; }
  .about.section--photo::before { background: rgba(255, 255, 255, .86); }
  .service__en { font-size: 32px; }

  .works { grid-template-columns: 1fr; gap: 40px; }
  .work--main { grid-row: auto; }
  .work--main .work__img { height: auto; min-height: 0; aspect-ratio: 4 / 3; }

  .flow-illust { width: 150px; right: 12px; top: -40px; }
  .flow { grid-template-columns: 1fr; row-gap: 0; }
  .flow li { display: grid; grid-template-columns: 56px 1fr; column-gap: 8px; padding: 20px 0; }
  .flow span { font-size: 32px; grid-row: span 2; }
  .flow h3 { margin: 0 0 4px; font-size: 17px; }

  .about__inner { grid-template-columns: 1fr; gap: 40px; }
  .about__vertical {
    writing-mode: horizontal-tb; font-size: 28px; letter-spacing: .1em;
    padding: 0 0 24px; border-left: none; border-bottom: 1px solid var(--line);
  }

  .board__item summary { grid-template-columns: 1fr 20px; gap: 4px 16px; padding: 20px 4px; }
  .board__item summary:hover { padding-left: 4px; }
  .board__item h3 { grid-column: 1; grid-row: 2; font-size: 15px; }
  .board__item summary::after { grid-column: 2; grid-row: 1 / 3; }
  .board__body { padding: 0 16px 28px; font-size: 14px; }

  .cta { padding: 80px 0; }
  .cta__title { font-size: 26px; }
  .cta__btns { flex-direction: column; gap: 32px; }
  .cta__tel { font-size: 28px; }

  .footer__nav { gap: 16px 24px; }
}

/* =========================================
   スクロールで現れる動き
   JavaScript が data-reveal を付けた要素だけが対象。
   JavaScript が動かない環境では、最初から全部見える
   ========================================= */
[data-reveal] {
  transition:
    opacity 1s cubic-bezier(.22, 1, .36, 1),
    transform 1s cubic-bezier(.22, 1, .36, 1),
    clip-path 1.2s cubic-bezier(.77, 0, .18, 1),
    background .4s, color .4s; /* 事業内容カードのホバーの色変化を残す */
}
/* 下からふわっと */
[data-reveal="up"]   { opacity: 0; transform: translateY(40px); }
/* その場でふわっと */
[data-reveal="fade"] { opacity: 0; }
/* 少し小さい状態から */
[data-reveal="zoom"] { opacity: 0; transform: scale(.92); transition-duration: 1.6s; }
/* 左からすべり込む */
[data-reveal="side"] { opacity: 0; transform: translateX(-32px); }
/* 写真：幕が上がるように下から見えてくる */
[data-reveal="mask"] { clip-path: inset(100% 0 0 0); }
/* 縦書きのコピー：上から書かれるように見えてくる */
[data-reveal="line"] { clip-path: inset(0 0 100% 0); transition-duration: 1.8s; }

[data-reveal].is-shown {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 0 0);
}

/* 「視差効果を減らす」設定の人には、動かさずに最初から見せる */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; clip-path: none; transition: none; }
}
