@charset "UTF-8";

body {
  /* 英語用を先に、日本語用を後に記述 */
  font-family: "Caveat Brush", "Zen Kurenaido", sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.8;
}

:root {
  /* 背景色 */
  --bg-main: #fff;
  --bg-accent: #faf7f2;
  --bg-yellow: #f7e69a;
  --bg-brown:#c9b79a;

  /* 文字色・線 */
  --text-main: #333;
  --line-color: #d4d0c7;
}

:root {
  /* スマホ：横375px、pdding 16px */
  --content-width: 960px;
}

:root {
  --z-index-back: -1;
  --z-index-default: 1;
  --z-index-page-top: 50;
  --z-index-header: 100;
  --z-index-menu: 150;
  --z-index-modal: 200;
}

body {
  font-family: "Zen Kaku Gothic New", sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.8;
}


/* layout */
.l_container-sm,
.l_container,
.l_container-lg {
  width: 100%;
  padding: 0 16px;
  margin: 0 auto;
}

.l_contents {
  padding: 80px 0;
}

.l_header{
  top: 20px;
  left: 0;
  width: 100%;
  z-index: var(--z-index-header);
  display: flex;
  justify-content: center;
  margin: 0 auto;
  padding: 16px 0 8px 0;
}

.l_kv {
  display: flex;            /* Flexboxを有効にする */
  flex-direction: column;   /* 中身を縦に並べる */
  justify-content: center;  /* 上下の中央寄せ */
  align-items: center;      /* 左右の中央寄せ */
  min-height: 100vh;        /* 画面いっぱいの高さを確保 */
  background-color: var(--bg-accent); /* デザイン案の背景色 */
  position: relative;
}

.l_footer {
  background-color: var(--bg-accent);
  padding: 60px 0;
  text-align: center; /* 全体を中央寄せにする */
}

/* module */
/* .m_nav{
  margin: 0 auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s, visibility 0.5s;
} */

.m_nav_list{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 50px;
  margin: 0 auto;
}

.m_nav_item{
  position: relative;
  background-color: var(--bg-yellow);
  width: 125px;
  padding: 0 0 0 8px;
}

.m_nav_item::after{
  content: "";
  position: absolute;
  top: 0;
  left: -22px;
  width: 20px;
  height: 100%;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-right: 24px solid var(--bg-yellow);
}

.m_kv-ttl-wrapper {
  text-align: center; /* 文字を中央に */
  display: flex;
  flex-direction: column;
  gap: 20px; /* 「学びながら」と「つくる」の間の距離 */
}

.m_kv-ttl {
  font-size: 3rem;          /* 文字を大きく */
  margin: 0;
  line-height: 1.5;
  border-bottom: 1px solid #ccc; /* 文字の下の線 */
  padding-bottom: 10px;     /* 線と文字の間の余白 */
  display: inline-block;
}

.m_paper-torn {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%; /* 画面上部を覆うように */
  height: 150px;
  background-color: var(--bg-accent); /* ノートの紙と同じ色 */
  z-index: var(--z-index-page-top);
  clip-path: polygon(); 
  transform: none; 
}

.m_btn-arrow-box {
  display: flex;           /* 子要素を横並びにする */
  align-items: center;     /* 上下の中央を揃える */
  gap: 10px;               /* 矢印と文字の間の隙間 */
  cursor: pointer;         /* マウスを乗せた時に指の形にする */
  justify-content: center;
}

.m_btn-arrow {
  position: relative;      /* 擬似要素（三角形）の基準点 */
  width: 50px;             /* 線の長さ */
  height: 2px;             /* 線の太さ */
  background-color: #333;  /* 線の色 */
  margin: 20px;
}

.m_btn-arrow::before {
  content: "";
  position: absolute;
  top: 50%;                /* 線の高さの中央に配置 */
  left: -8px;              /* 線の左端から少し突き出させる */
  transform: translateY(-50%); /* 垂直方向のズレを補正 */
  
  /* 三角形を作る設定（左向き） */
  border-top: 6px solid transparent;    /* 上を透明に */
  border-bottom: 6px solid transparent; /* 下を透明に */
  border-right: 8px solid #333;         /* 右側に色をつけて左向きにする */
  
  width: 0;
  height: 0;
}

@media screen and (min-width: 768px) {
  .m_btn-arrow-box__works{
    display: none;
  }
}

/* フォーム全体のレイアウト */
.m_form {
  padding: 40px 20px; /* ノートの余白 */
}

/* 各入力項目のまとまり */
.m_form_item {
  margin-bottom: 24px; /* 項目間の垂直方向の余白 */
}

/* ラベル（お名前、ふりがな等） */
.m_form_label {
  display: block;          /* 1行を占有させる */
  margin-bottom: 8px;      /* 入力欄との隙間 */
  font-size: 14px;
  color: var(--color-text-main, #333);
  /* 罫線と合わせるための調整 */
  padding-left: 5px; 
}

/* 入力欄（input[type="text"], [type="email"]など） */
.m_form_input {
  width: 100%;             /* 横幅いっぱい */
  height: 48px;            /* 入力しやすい高さ */
  padding: 0 20px;         /* 内側の左右余白 */
  background-color: #fff;  /* デザイン案通り白く塗りつぶす */
  border: none;            /* 標準の枠線を消す */
  border-radius: 999px;    /* 完全に丸角にする（カプセル型） */
  box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* 軽い影で浮き立たせる */
  box-sizing: border-box;  /* paddingを含めて100%の幅にする */
  font-size: 16px;         /* スマホでズームされないための最小サイズ */
}

/* お問合わせ内容（textarea） */
.m_form_textarea {
  width: 100%;
  height: 160px;           /* 複数行なので高さを確保 */
  padding: 15px 20px;
  background-color: #fff;
  border: none;
  border-radius: 20px;     /* ここだけはカプセル型ではなく適度な丸角 */
  box-sizing: border-box;
  resize: vertical;        /* ユーザーが縦方向にのみサイズ調整可能にする */
  font-family: inherit;    /* 親要素のフォントを継承 */
}

/* 送信ボタンの配置 */
.m_form_btn-wrapper {
  text-align: center;      /* ボタンを中央寄せ */
  margin-top: 40px;
}

/* 送信ボタン（ヘッダーの矢印風デザインを応用） */
.m_form_btn {
  background-color: var(--bg-yellow, #f9e698);
  border: none;
  padding: 12px 60px;      /* 横に長いボタン */
  font-weight: bold;
  cursor: pointer;         /* マウスを乗せたら指の形に */
  transition: opacity 0.3s; /* ホバー時のアニメーション */
  clip-path: polygon(10% 50%, 0% 0%, 90% 0%, 100% 50%, 90% 100%, 0% 100%); /* 矢印形状 */
}

.m_form_btn:hover {
  opacity: 0.8;            /* ホバーした時に少し薄くする */
}

.m_footer_ttl {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 30px; /* ナビとの間隔 */
}

.m_nav_list__footer {
  flex-direction: column; /* 縦に並べる */
  align-items: center;    /* 左右中央に揃える */
  gap: 15px 0;            /* ボタン同士の上下の間隔 */
}

.m_nav_list__footer .m_nav_item {
  width: 180px;           /* フッター用に幅を少し広く調整 */
  padding: 10px 0;
  cursor: pointer;
}

/* top */
.top_about{
  margin-top: 40px;
}
.top_contents-box__about{
  position: relative;
  background: var(--bg-accent);
  z-index: var(--z-index-page-top);
  /* line-height: 2.5; */
  padding: 8px 10px 40px 10px;
}

.top_contents-box__about::before{
  content: "";
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  height: 100%;
  background-image: linear-gradient(
    transparent 96%,
    var(--line-color) 96%
  );
  background-size: 100% 2.5rem;
  pointer-events: none;
}

.top_main-nav-wrapper{
  position: relative;
  transform: rotate(-90deg);
  z-index: var(--z-index-default);
}

.m_main-nav{
  position: absolute;
  top: 30px;
  left: 40%;
}

@media screen and (min-width: 768px) {
  .m_main-nav{
    position: absolute;
    top: 200px;
    left: 45%;
  }

  .m_main-nav__works{
    position: absolute;
    top: 160%;
    left: 220px;
  }
}

.m_main-nav_list{
  display: flex;
  flex-direction: column;
  gap: 8px 0;
}

.m_main-nav_item{
  background-color: var(--bg-brown);
  width: 80px;
  height: 100%;
  text-align: right;
  padding: 0 16px 0 0;
}

.m_main-nav_item__active{
  background-color: var(--bg-yellow);
  transform: translateX(30px);
}

.top_txt_head__about{
  margin-top: 8px;
  font-size: 18px;
}

.top_txt_detail__about{
  margin-top: 8px;
  font-size: 18px;
}

.top_contents-box{
  position: relative;
  background: var(--bg-accent);
  z-index: var(--z-index-page-top);
  padding: 8px 10px 40px 10px;
}

.top_contents-detail{
  position: relative;
  background-color: var(--bg-main);
  line-height: 2;
  padding: 8px 10px 8px 10px;
}

.top_contents-detail::before{
  content: "";
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  height: 100%;
  background-image: linear-gradient(
    transparent 96%,
    var(--line-color) 96%
  );
  background-size: 100% 32px;
  pointer-events: none;
}

.top_img-wrapper_works{
  width: 100%;
  height: 292px;
}

.top_txt-wrapper_works{
  display: flex;
  justify-content: space-between;
}

.top_img-wrapper_skill{
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  margin: 0 auto;
}

.top_img_skill{
  width: 100%;
  height: 100%;
}

.top_skills_scroll-wrapper {
  display: grid;
  /* 縦に2行作る（1行の高さは自動調整） */
  grid-template-rows: repeat(2, auto); 
  /* 横方向に自動で要素を並べる */
  grid-auto-flow: column;
  /* 各列の幅を指定（デザインに合わせて280px〜320px程度） */
  grid-auto-columns: 280px; 
  
  gap: 20px;               /* ボックス間の隙間 */
  overflow-x: auto;        /* 横方向にスクロールを出す */
  padding: 20px 16px;      /* 左右の余白 */
  
  /* スクロールを滑らかにする設定 */
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

@media screen and (min-width: 769px) {

  /* 1. 全体コンテナの制限 */
  .l_container {
    max-width: 768px; /* ご指定の最大幅 */
    margin: 0 auto;
  }

  /* 2. Worksセクション：3つ並び・左詰め */
  .top_works .l_container {
    display: flex;
    flex-wrap: none;      /* 3枚を超えたら下に回る */
    justify-content: flex-start; /* 2枚以下の時も左に詰める */
    gap: 20px;            /* カード間の隙間 */
  }

  .top_works .top_contents-box {
    /* 3つ並ぶための幅計算 (100% - gap合計) / 3 */
    width: calc((100% - 40px) / 2); 
    box-sizing: border-box; /* paddingを含めたサイズ管理 */
  }

  /* 3. Skillsセクション：1段で3つ見える横スクロール */
  .top_skills_scroll-wrapper {
    display: flex;        /* 1段（1行）に固定 */
    flex-direction: row;
    overflow-x: auto;     /* はみ出た分をスクロール */
    gap: 20px;
    padding: 20px 0;
    scroll-snap-type: x mandatory; /* スクロールの停止位置を固定 */
  }

  .top_skills_scroll-wrapper .top_contents-box {
    /* 画面内に3つ見えるように幅を固定 */
    flex: 0 0 calc((100% - 40px) / 3); 
    scroll-snap-align: start;
  }

  /* 4. Aboutセクションなどの調整 */
  .top_contents-box__about {
    width: 100%;
    max-width: 100%; /* containerの幅いっぱいに広げる */
  }
}