/* ─── リセット & ベース ─────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.inter {
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  font-weight: 900;
  font-style: normal;
}
.inter-light {
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  font-weight: 700;
  font-style: normal;
}

:root {
  --yellow: #ffd736;
  --teal: #53a4b6;
  --coral: #e67d5f;
  --gray: #797676;
  --blue: #4575ba;
}
body {
  background: var(--gray);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ─── ページコンテナ ─────────────────────────────── */
.firstview {
  position: relative;
  width: 390px;
  min-height: 850px;
  background: var(--yellow);
  overflow: hidden;
}
.top_videos {
  display: flex;
  flex-direction: column;
}
.top_video1 {
  inset: 0;
  width: 100%;
  height: 280px;
  object-fit: cover;
  opacity: 0.3;
  z-index: 0;
}
.top_video2 {
  inset: 0;
  width: 100%;
  height: 280px;
  object-fit: cover;
  opacity: 0.3;
  z-index: 0;
}
.top_video3 {
  inset: 0;
  width: 100%;
  height: 280px;
  object-fit: cover;
  opacity: 0.3;
  z-index: 0;
}

/* ─── タイトル ───────────────────────────────────── */
.title {
  font-family: "";
  position: absolute;
  top: 40px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.title__bar {
  width: 15px;
  height: 145px;
  background: var(--teal);
  flex-shrink: 0;
  margin-top: 7px;
}

.title__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 145px;
}

.title__momong {
  font-size: 70px;
  font-weight: 800;
  line-height: 1;
  color: var(--teal);
  letter-spacing: -1px;
}

.title__illustration {
  font-size: 45px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--teal);
  letter-spacing: -0.5px;
}

/* ─── イラスト画像 ───────────────────────────────── */
.illust {
  position: absolute;
  overflow: hidden;
}

.illust img {
  width: 100%;
  height: 190%;
  object-fit: cover;
}

.illust--top {
  top: 230px;
  left: -71px;
  width: 279px;
  height: 180px;
}

.illust--middle {
  top: 430px;
  left: 79px;
  width: 319px;
  height: 180px;
}
.illust--bottom {
  top: 630px;
  left: 0px;
  width: 179px;
  height: 150px;
}
/* ─── ナビゲーション ─────────────────────────────── */
.nav {
  position: absolute;
  top: 240px;
  left: 245px;
}

.nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.nav__item {
  padding-bottom: 2px;
  margin-bottom: 4px;
}
.nav__item a:hover {
  color: var(--coral);
  border-bottom-color: var(--coral);
}
.nav__item a {
  display: inline-block;
  font-size: 24px;
  font-weight: 700;
  text-decoration: none;
  color: rgb(94, 94, 94);
  padding-bottom: 4px;
  border-bottom: 3px solid rgb(94, 94, 94);
  white-space: nowrap;
  transition: 0.3s;
}
.nav__item--active a {
  color: var(--coral);
  border-bottom-color: var(--coral);
}

.nav__item:nth-child(1) a {
  min-width: 55px;
}
.nav__item:nth-child(2) a {
  min-width: 96px;
}
.nav__item:nth-child(3) a {
  min-width: 96px;
}
.nav__item:nth-child(4) a {
  min-width: 117px;
}

/* ─── ページ番号 ─────────────────────────────────── */
.page_number {
  position: absolute;
  bottom: 0px;
  right: 10px;
  font-size: 150px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -4px;
}
.firstview .page_number {
  color: var(--teal);
}

/* ─── WORKSエリア ─────────────────────────────── */
* {
  box-sizing: border-box;
}
.works {
  position: relative;
  width: 390px;
  height: 850px;
  background-image: url(images/graphpaper.jpg);
  background-size: cover;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.headline {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.headline_bar {
  /*再利用*/
  width: 15px;
  height: 80px;
  flex-shrink: 0;
  margin-top: 7px;
}
.works .headline_bar {
  background: var(--blue);
}
.headline_text {
  /*再利用*/
  font-size: 45px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.works .headline_text {
  color: var(--blue);
}

/*カード*/
.cards {
  display: flex;
  flex-direction: column;
  gap: 8px; /*上下段の隙間*/
  flex: 1;
  margin-top: 120px;
}
.cards_track {
  display: flex;
  gap: 19px;
  flex-wrap: nowrap;
  padding: 15px 0 12px; /* 上下に余白を確保してホバーのはみ出しを吸収 */
}
.cards_upper,
.cards_lower {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
}
.cards_upper::-webkit-scrollbar,
.cards_lower::-webkit-scrollbar {
  height: 5px; /*スクロールバーの高さ*/
}
.cards_upper::-webkit-scrollbar-thumb,
.cards_lower::-webkit-scrollbar-thumb {
  background: var(--blue);
  border-radius: 10px;
}
.card {
  width: 175px;
  height: 240px;
  padding: 10px; /*カードの縁*/
  margin-bottom: 10px; /*スクロールバーとの間*/
  background: var(--blue);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
/*カードホバー*/
.card {
  width: 175px;
  height: 240px;
  padding: 10px;
  margin-bottom: 10px;
  background: var(--blue);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition:
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.25s ease;
}

.card:hover {
  transform: scale(1.08) rotate(2deg);
  box-shadow: 6px 8px 20px rgba(0, 0, 0, 0.35);
}
.card-illust {
  width: 155px;
  height: 183px;
  object-fit: cover;
}
.captions {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.caption--tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.caption {
  font-family: "Meiryo";
  font-size: 8px;
  font-weight: lighter;
  color: white;
}
.works .page_number {
  color: var(--blue);
}
/*----モーダル-------------------------------------*/
.modal {
  font-family: "メイリオ";
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(30, 60, 100, 0.55);
  backdrop-filter: blur(4px);
  z-index: 100;
  align-items: flex-start;
  justify-content: center;
  padding-top: 40px;
  overflow-y: auto;
}
.modal.open {
  display: flex;
}
.modal_inner {
  border: none;
  border-radius: 12px;
  padding: 24px 20px;
  width: 320px;
  max-height: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.modal_close {
  position: absolute;
  top: 5px;
  right: 14px;
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
}
.modal_content {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10%;
}
.modal_img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.2);
}
.modal_tags {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.modal_tag {
  font-size: 13px;
  color: white;
  font-weight: 700;
}
.modal_video {
  display: none;
  width: 100%;
  border-radius: 8px;
  margin-top: 12px;
}
.modal_video_close_btn {
  display: none;
}
.modal_video_btn,
.modal_video_close_btn {
  margin-top: 15px;
  width: 60%;
  padding: 10px 14px;
  border: none;
  border-radius: 50px;
  background: white;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.modal_video_btn:hover,
.modal_video_close_btn:hover {
  transform: scale(1.08);
  background: var(--blue);
  color: white;
}

/* 押した瞬間 */
.modal_video_btn:active,
.modal_video_close_btn:active {
  transform: scale(0.5);
}

/* 消えるアニメ */
.modal_video_btn.hide,
.modal_video_close_btn.hide {
  transform: scale(0.3);
  opacity: 0;
  pointer-events: none;
}

.modal_desc {
  margin-top: 15px;
  font-size: 13px;
  font-weight: 600;
  color: white;
  line-height: 1.7;
}
/*－－about Meエリアーーーーーーーーーーーーーーー*/
.about {
  font-family: "メイリオ";
  position: relative;
  width: 390px;
  height: auto;
  min-height: 850px;
  justify-content: center;
  padding: 28px 28px 0 28px;
  display: flex;
  flex-direction: column;
}
.about .page_number {
  position: static;
  text-align: right;
  font-size: 150px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -4px;
  color: white;
  margin-top: auto;
}
.about_me {
  display: flex; /*追加*/
  background: var(--coral);
}

.about_works {
  background: var(--teal);
}
.paper_content {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 100%;
  /*height: 100%;*/
  min-height: 670px;
  background-image: url(images/graphpaper.jpg);
  background-size: cover;
  border-top-right-radius: 50px;
  border-bottom-left-radius: 50px;
}
.about .headline {
  position: absolute;
  top: 15px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.about .headline_bar {
  background: var(--teal);
}
.about .headline_text {
  color: var(--teal);
}
.about .page_number {
  color: white;
}

/*トグル*/
.about_me .toggle-me-works {
  position: relative;
  width: 150px;
  height: 55px;
  margin-top: 35%;
  background: var(--teal);
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  cursor: pointer;
}
.about_works .toggle-me-works {
  position: relative;
  width: 150px;
  height: 55px;
  margin-top: 35%;
  background: var(--coral);
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  cursor: pointer;
}

.knob {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 52px;
  height: 45px;
  border-radius: 50px;
  background: white;
  z-index: 1;
  transition:
    left 0.4s ease,
    width 0.4s ease;
}
/* WORKS選択時 */
.toggle-me-works.is-works .knob {
  left: 55px;
  width: 90px;
}

.toggle-me-works button {
  position: relative;
  z-index: 2;
  background: none;
  border: none;
  font-weight: 800;
  padding: 5px;
}
.about_me .meBtn {
  color: var(--teal);
}
.about_works .meBtn {
  color: white;
}

.about_me .worksBtn {
  color: white;
}
.about_works .worksBtn {
  color: var(--coral);
}
/*質問コーナー------------------------------------*/
.QA_container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  padding: 10% 20px 15% 20px;
  gap: 27px;
}
.QAbox {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.Qbox {
  width: 100%;
  display: flex;
  color: white;
  background: var(--gray);
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0.8rem 0.8rem 1.3rem;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  font-family: inherit;
}
.icon {
  font-weight: 1000;
}
.Abox {
  display: none;
  width: 80%;
  color: white;
  background: var(--gray);
  justify-content: space-between;
  align-items: center;
  margin-left: auto;
  padding: 0.8rem 0.8rem 0.8rem 1.3rem;
  border: none;
  border-radius: 15px;
  cursor: pointer;
}
.Abox.open {
  display: block;
}
.answer {
  font-size: 13px;
}
.answer {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
}

.a_label {
  flex-shrink: 0;
  font-weight: 800;
}

.answer_text {
  flex: 1;
}
.q_label {
  font-size: 18px;
  color: var(--yellow);
  font-weight: 700;
}

.a_label {
  font-size: 18px;
  color: var(--coral);
  font-weight: 800;
}

/*about Wowksエリア---------------------*/
.about_works {
  display: none;
  position: relative;
  width: 390px;
  min-height: 850px;
  justify-content: center;
  padding: 28px 28px 160px 28px;
  background: var(--teal);
}
.about_works .page_number {
  position: absolute;
  bottom: 10px;
  right: 20px;
  font-size: 150px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -4px;
  color: white;
}
/*footerエリア*/
.footer {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 390px;
  height: 850px;
  background: white;
}

.canvas_container {
  position: relative;
  width: 100%;
  height: 50%;
  background: url(images/note.jpg);
  background-size: cover;
  overflow: hidden;
}

.canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  background: transparent;
}

.canvas_toggle {
  position: absolute;
  top: 25px;
  left: 25px;
  z-index: 10;
  display: flex;
  align-items: center;
}

.toggle_checkbox {
  display: none;
}

.toggle_label {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 110px;
  height: 44px;
  background-color: #555;
  border-radius: 50px;
  cursor: pointer;
  padding: 0 14px;
  transition: background-color 0.3s;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.toggle_button {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 51px;
  height: 36px;
  background-color: #fff;
  border-radius: 40px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  z-index: 0;
}

.toggle_icon_left,
.toggle_icon_right {
  font-size: 16px;
  pointer-events: none;
  user-select: none;
  transition: color 0.3s;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 31px;
  height: 31px;
}

.toggle_icon_left {
  color: var(--teal);
}
.toggle_icon_right {
  color: #bbb;
}

.toggle_checkbox:checked + .toggle_label .toggle_button {
  transform: translateX(47px);
}
.toggle_checkbox:checked + .toggle_label .toggle_icon_left {
  color: #bbb;
}
.toggle_checkbox:checked + .toggle_label .toggle_icon_right {
  color: var(--teal);
}

/* --- 下半分: CONTACTエリア --- */
.contact {
  position: absolute;
  width: 100%;
  height: 50%;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: -1px; /* 隙間防止用の微調整 */
}
.undo_btn {
  margin-left: 10px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background-color: #555;
  color: white;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.undo_btn i {
  display: inline-block;
}
.undo_btn.spin i {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  transform: rotate(-360deg);
}

.contact {
  position: absolute;
  width: 100%;
  height: 50%;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: -1px; /* 隙間防止用の微調整 */
}
.contact_arch {
  position: absolute;
  top: 0;
  left: -30%; /* 左右に30%ずつはみ出し配置 */
  width: 160%;
  height: 100%;
  background-color: #323232;
  border-radius: 50% 50% 0 0; /* 綺麗なドーム型 */
  z-index: 1;
}
.contact_headline {
  text-align: center;
  color: white;
  font-size: 35px;
  font-weight: 800;
}
.contact_content {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

.icons {
  display: flex;
  flex-direction: row;
  justify-content: center;
  margin: 10%;
  gap: 30px;
}

/* 
   ベースのアイコンスタイル 
   ※.contact i となっていた部分を .icons a i に変更、
   または必要に応じてクラス名を調整してください
*/
.icons a i {
  color: white;
  font-size: 1.5rem; /* サイズはお好みで調整してください */
  transition: transform 0.4s ease; /* アニメーションはtransformだけ残します */
}

/* --- ホバー時の演出 --- */

/* 全体共通：ホバー時に1.2倍に拡大 */
.icons a:hover i {
  transform: scale(1.3);
}

/* 
   インスタ：ホバー時にインスタっぽいグラデーションを適用 
   ※FontAwesomeの仕様上、CSSのbackground-imageと
   -webkit-background-clip: text; を使って、
   背景のグラデーションを文字（アイコン）で切り抜く方法を使います
*/
.icons a:hover .fa-instagram {
  /* インスタ公式のグラデーション（近似色） */
  background-image: linear-gradient(
    45deg,
    #f8d06b 0%,
    #f19e31 25%,
    #dc2743 40%,
    #b00dbe 75%
  );

  /* グラデーションを文字（アイコン）の形に切り抜く */
  -webkit-background-clip: text;
  background-clip: text;

  /* 元の色を透明にしないと、背景のグラデーションが見えません */
  color: transparent !important; /* !importantを使って、ベースのcolor: white;を上書きします */
}

/* Facebook：ホバー時に公式のブルー */
.icons a:hover .fa-facebook-f {
  color: #1877f2; /* Facebook公式のブルー */
}
.submit,
.message_btn {
  font-family: "メイリオ";
  font-size: 15px;
  font-weight: 700;
  color: #323232;
  margin: 0 auto;
  padding: 0.7rem 2rem;
  border: none;
  border-radius: 50px;
  background: var(--yellow);
  cursor: pointer;
  transition: transform 0.2s ease;
}

/* ホバーでボタン拡大 */
.submit:hover,
.message_btn:hover {
  transform: scale(1.08);
}

/* アイコンの基本設定 */
.submit:hover,
.message_btn i {
  color: #323232;
  display: inline-block; /* ← これ重要（アニメさせるため） */
}

/* ホバー時にアイコン振動 */
.submit:hover i,
.message_btn:hover i {
  animation: shake 0.6s linear;
}

/* 振動アニメーション */
@keyframes shake {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(2px, 0px) rotate(-10deg);
  }
  50% {
    transform: translate(-2px, 0px) rotate(10deg);
  }
  75% {
    transform: translate(2px, 0px) rotate(-5deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}
.hidden {
  display: none;
}
form {
  font-family: "メイリオ";
  width: 250px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: -20px;
  margin-bottom: 30px;
}

form div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

form label {
  font-size: 14px;
  color: white;
  margin-right: 10px;
}
form span {
  color: white;
  background: var(--coral);
  padding: 2px;
  font-size: 10px;
  border-radius: 3px;
}
.submit {
  font-size: 15px;
  font-weight: 700;
  color: #323232;
  margin: 0 auto;
  margin-top: 10px;
  padding: 0.7rem 2rem;
  border: none;
  border-radius: 50px;
  background: var(--yellow);
  cursor: pointer;
}
.submit i {
  color: #323232;
  margin-left: 5px;
}
