html {
  scroll-behavior: smooth;
}

/* ====== ローディング画面全体 ====== */
#loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3000;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  animation: gradientMove 8s ease infinite;
  background: linear-gradient(-45deg, #6eb2bc, #c5ce68, #61c7bb, #d3eef5);
  background-size: 400% 400%;
}

/* ノイズ重ね */
#loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("https://www.transparenttextures.com/patterns/noise.png");
  opacity: 0.08;
  pointer-events: none;
}

/* ロゴ全体 */
.loading-logo {
  text-align: center;
  color: #ffffff;
  font-family: "Helvetica Neue", "Hiragino Sans", sans-serif;
  letter-spacing: 4px;
  animation: logoFade 2s ease-in-out infinite alternate;
  z-index: 2;
}

.loading-logo .logo-top,
.loading-logo .logo-bottom {
  display: block;
  font-size: 24px;
  font-weight: 600;
}

.loading-logo hr {
  width: 40px;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  margin: 10px auto;
}

/* ロゴフェードアニメーション */
@keyframes logoFade {
  0% {
    opacity: 0.6;
    transform: scale(1);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
  }
  100% {
    opacity: 1;
    transform: scale(1.05);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
  }
}

/* 背景グラデーションアニメーション */
@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* フェードアウト */
#loading.fadeout {
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease, visibility 1s ease;
}

/* 背景全体 */
body {
  margin: 0;
  font-family: "Hiragino Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #fff;
  overflow-x: hidden;
}

/* アニメーションするグラデーション背景 */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(-45deg, #5c9aa4, #b1b85a, #56b0a5, #c7e2e9);
  background-size: 400% 400%;
  animation: gradient 12s ease infinite;
  z-index: -2;
}

/* ノイズ効果を重ねる */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("https://www.transparenttextures.com/patterns/noise.png");

  opacity: 0.1; /* ノイズの強さ調整 */
  z-index: -1;
  pointer-events: none;
}

/* グラデーションアニメーション */
@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ▼ サイド固定ナビゲーション */
.sidebar {
  height: 0;
}

.global-navi {
  position: fixed;
  top: 0;
  left: 0;
  width: 140px;
  height: 100%;
  background: linear-gradient(180deg, #294952 0%, #5aa6b1 100%);
  backdrop-filter: blur(10px);
  color: #f4f4f4;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  font-family: "Helvetica Neue", sans-serif;
}

.global-navi .link:hover {
  color: #c5ce68; /* 背景のアクセントを拾う */
}

/* ロゴ */
.logo-area {
  text-align: center;
  margin-bottom: 40px;
}
.logo-area .logo-top,
.logo-area .logo-bottom {
  font-size: 14px;
  letter-spacing: 2px;
  font-weight: 600;
  color: #5aa6b1;
}
.logo-area hr {
  width: 40px;
  border: 0;
  border-top: 1px solid #52737c;
  margin: 8px auto;
  opacity: 0.6;
}

/* ナビゲーションリスト */
.list-navi {
  list-style: none;
  padding: 0;
  margin: 0;
}
.list-navi .item {
  margin: 60px 0;
}

/* ▼ 文字回転アニメーション */
.list-navi .link {
  display: inline-block;
  perspective: 600px; /* 奥行き */
  text-decoration: none;
}

.list-navi .link span {
  display: inline-block;
  position: relative;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 1px;
  transition: transform 0.5s ease;
  transform-style: preserve-3d;
}

.list-navi .link span::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  transform: rotateX(90deg); /* 裏側に隠す */
  transform-origin: bottom;
  color: #5c9aa4; /* ホバー後の文字色（濃い青） */
  backface-visibility: hidden;
}

.list-navi .link span::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  transform: rotateX(0deg);
  transform-origin: top;
  backface-visibility: hidden;
}

.list-navi .link:hover span {
  transform: rotateX(-90deg);
}

.vertical-text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 17px;
  margin: 0 25px;
  line-height: 1.8;
  letter-spacing: 2px;

}

.vertical-text-name {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  z-index: 10;
  color: #325a6375;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 250px;
  opacity: 0.2;
  pointer-events: none;
}

/* ---- メイン ---- */
.main {
  margin-left: 140px; /* サイドバーの幅 */
  padding: 0 20px; /* テキストが端に張り付き防止 */
}

/* ヒーローセクション */
#top.hero {
  height: 100vh;
  margin-top: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #dbf0f5;
  position: relative;
  opacity: 0;
  transform: scale(0.95);
  filter: brightness(0.8) blur(1px);
  transition: opacity 2s ease, transform 2s cubic-bezier(0.25, 1, 0.5, 1), filter 2s ease;
}

/* ▼ フェードイン時 */
#top.hero.show {
  opacity: 1;
  transform: scale(1);
  filter: brightness(1.3) blur(0);
}

/* ▼ 発光のハイライトアニメーション */
@keyframes glowPulse {
  0% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.5);
  }
  100% {
    filter: brightness(1);
  }
}

/* 表示後に発光をゆっくり1回だけ再生 */
#top.hero.show {
  animation: glowPulse 2.5s ease-out 0.8s 1;
}

@media (min-width: 600px) {
  .hero h1 .top-name {
    font-size: 180px;
    margin: 0;
    font-weight: 300;
    letter-spacing: 4px;
    text-shadow: 2px 3px 20px #acadbb;
  }
}
.hero h1 span {
  display: block;
  padding-right: 20%;
}

.hero h1 .sub1 {
  padding-left: 10%;
  font-size: 180px;
  margin: 0;
  font-weight: 300;
  letter-spacing: 4px;
  text-shadow: 2px 3px 20px #acadbb;
}

.text-wrap {
  position: relative;
  display: inline-block;
}

.hero .sub {
  font-size: 140px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.1);
  text-shadow: 3px 2px 20px #4e909b;
}
.hero .tagline {
  position: absolute;
  top: 60%;
  right: 2px;
  transform: translate(0%, -50%);
  font-size: 48px;
  font-weight: 400;
  color: #ffffff;
}

.circle-btn a {
  text-decoration: none;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  color: #2e535c;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 50px;
  position: relative; /* 擬似要素の基準 */
}

.circle-btn a::after {
  content: "↓";
  font-size: 18px;
  margin-top: 4px;
  display: inline-block;
  animation: bounce 1.5s infinite ease-in-out;
}

/* アニメーション */
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0); /* 元の位置 */
  }
  50% {
    transform: translateY(9px); /* 下に移動 */
  }
}

.right-vertical {
  position: absolute;
  right: 10px;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-size: 16px;
  font-weight: bold;
  color: #ffffff;
  opacity: 0.8;
  letter-spacing: 2px;
}
.left-vertical {
  position: absolute;
  left: 10px;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-size: 16px;
  font-weight: bold;
  color: #ffffff;
  opacity: 0.8;
  letter-spacing: 2px;
}

/* hero-subセクション */
#top-under {
  display: flex;
  justify-content: center;
  margin-top: 200px;
  padding-top: 20px;
  flex-direction: row-reverse;
  background: linear-gradient(to bottom, rgba(91, 139, 145, 0.2), rgba(91, 139, 145, 0));
}

/* ▼ 初期状態（非表示＆下にオフセット） */
#top-under .vertical-text {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* ▼ 表示時（スクロールで発火） */
#top-under .vertical-text.show {
  opacity: 1;
  transform: translateY(0);
}

/* ▼ 順番に少しずつ遅らせて出す */
#top-under .vertical-text:nth-child(1) {
  transition-delay: 0.2s;
}
#top-under .vertical-text:nth-child(2) {
  transition-delay: 0.4s;
}
#top-under .vertical-text:nth-child(3) {
  transition-delay: 0.6s;
}
#top-under .vertical-text:nth-child(4) {
  transition-delay: 0.8s;
}
#top-under .vertical-text:nth-child(5) {
  transition-delay: 1s;
}
#top-under .vertical-text:nth-child(6) {
  transition-delay: 1.2s;
}
#top-under .vertical-text:nth-child(7) {
  transition-delay: 1.4s;
}
#top-under .vertical-text:nth-child(8) {
  transition-delay: 1.6s;
}
#top-under .vertical-text:nth-child(9) {
  transition-delay: 1.8s;
}

/* hero-sub2セクション */
#top-under2 {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  margin: 200px 0 80px 0;
}

#top-under2 .container {
  margin: 0;
}

#top-under2 .left-text,
#top-under2 .right-text {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}
#top-under2 .left-text.show,
#top-under2 .right-text.show {
  opacity: 1;
  transform: translateY(0);
}

#top-under2 .left-text {
  font-size: 40px;
  font-weight: bold;
  line-height: 1.3;
  color: #365657c9;
  white-space: pre-line;
  line-height: 1.2;
  text-shadow: 2px 1px 0 #f7f2f2;
}

.divider {
  width: 3px;
  height: 150px;
  margin: 30px 50px 0 50px;
  background-color: #5b8b91;
}

.right-text {
  max-width: 600px;
  letter-spacing: 3px;
}

.right-text h2 {
  font-size: 30px;
  font-weight: bold;
  margin-bottom: 15px;
}

.right-text p {
  font-size: 16px;
}

/* Worksセクション */
.section {
  padding: 80px 40px;
}

.works-t {
  font-size: 68px;
  margin-bottom: 20px;
  text-shadow: 4px 4px 0 #365657c9;
}

.works-s {
  padding-left: 10px;
}

.works-area hr {
  border-top: 1px solid #52737c;
  margin-bottom: 60px;
  opacity: 0.5;
}

.works-flex {
  display: flex;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  margin-bottom: 40px;
}

.work-card {
  flex-direction: column;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.15);
  font-size: 1.2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}

.work-card a {
  text-decoration: none;
}

.work-card:hover {
  transform: translateY(-8px);
  box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.25);
}

.work-card img {
  width: 100%;
  height: auto;
  display: block;
}

.work-info {
  padding: 20px;
}

.work-info h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: #fff;
}

.work-info p {
  font-size: 14px;
  margin: 4px 0;
  color: #d0e9ee;
}

.work-info .role {
  font-size: 12px;
  font-style: italic;
  color: #236b73;
}

@media (max-width: 599px) {
  .works-grid {
    grid-template-columns: 1fr;
  }
}

.other-works-slider {
  padding: 60px 0 100px;
  overflow: hidden;
}

.slider-title {
  text-align: center;
  font-size: 1.2rem;
  letter-spacing: 0.3em;
  color: #365657;
  margin-bottom: 30px;
  font-family: "Helvetica Neue", sans-serif;
  opacity: 0.8;
}

.slider-container {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.slider-track {
  display: flex;
  width: max-content;
}

.slide {
  width: 320px;     /* PCでの画像の幅 */
  height: 400px;    /* PCでの画像の高さ */
  padding: 0 12px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.slide:nth-child(1),
.slide:nth-child(2),
.slide:nth-child(6),
.slide:nth-child(7),
.slide:nth-child(8),
.slide:nth-child(12) {
  width: 1000px;
}

.slide:first-child img {
  object-fit: cover; /* 横に広がっても画像が歪まないように調整 */
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 巨大化を防ぎ、枠に収める */
  border-radius: 8px;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease, filter 0.4s ease;
  filter: grayscale(30%);
  cursor: pointer;
}

.slide img:hover {
  transform: scale(1.15); /* 1.15倍に拡大（お好みで1.1〜1.2で調整） */
  filter: grayscale(0%);  /* 色を鮮明にする */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3); /* 浮き上がったような影をつける */
  z-index: 10; /* 他の画像より手前に表示 */
  position: relative;
}

.slider-track {
  display: flex;
  width: max-content;
}

@media (max-width: 599px) {
  .slide {
    width: 320px;
    height: 400px;
  }
  .slider-title {
    font-size: 1rem;
  }
}

/* Aboutセクション */
.about-t {
  font-size: 68px;
  margin-bottom: 20px;
  text-shadow: 4px 4px 0 #365657c9;
}

.about-s {
  padding-left: 10px;
}

.about-area hr {
  border-top: 1px solid #52737c;
  margin-bottom: 60px;
  opacity: 0.5;
}

.about-me {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-bottom: 10rem;
}

.about-text {
  flex-direction: column;
  justify-content: center;
}

.about-text p {
  margin-bottom: 30px;
  color: #fff;
  font-size: 17px;
  line-height: 1.8;
}

/* ボタンスタイル */
.btn-more {
  display: inline-block;
  padding: 20px 80px;
  border-radius: 30px;
  /* background: linear-gradient(135deg, #2aa5a0, #65c7c0); */
  color: #fff;
  font-weight: bold;
  font-size: 0.95rem;
  text-decoration: none;
  background: linear-gradient(135deg, #4ea199, #a9b14f);
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-more:hover {
  transform: translateY(-3px);
  /* background: linear-gradient(135deg, #24979d, #4bb8b0); */
  background: linear-gradient(135deg, #56b0a5, #b1b85a);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* Contactセクション */
.contact {
  position: relative;
  width: 100%;
  margin: 50px 0 0 0; /* 左余白なし */
  left: 0; /* 強制的に左端から */
  background: linear-gradient(317deg, #d0ecef, #236b73);
  color: #000;
  text-align: center;
  padding: 100px 20px;
  margin-top: 50px;
  opacity: 0.5;
  z-index: 0; /* サイドバーより 下に配置 */
  box-sizing: border-box;
}

.contact-inner {
  margin-left: 140px; /* サイドバー分 */
  padding: 0 20px;
  box-sizing: border-box;
}

.contact h2 {
  font-size: 48px;
  margin-bottom: 30px;
}
.contact p {
  font-size: 18px;
}
.footer {
  font-size: 12px;
  margin-top: 20px;
}

/* ==============================
  スマホ最適化
   ============================== */
@media (max-width: 599px) {
  /* ▼ 全体調整 */
  body {
    width: 100%;
    margin: 0;
    padding: 0;
    font-size: 14px;
    overflow-x: hidden;
    background: linear-gradient(-45deg, #6eb2bc, #c5ce68, #61c7bb, #d3eef5);
    background-size: 300% 300%;
    animation: bgFlow 12s ease infinite;
  }

  @keyframes bgFlow {
    0% {
      background-position: 0% 50%;
    }
    50% {
      background-position: 100% 50%;
    }
    100% {
      background-position: 0% 50%;
    }
  }

  /* ▼ サイドバー → ハンバーガーメニュー */
  .global-navi {
  position: fixed;
  top: 0;
  width: 100%;
  height: auto;
  padding-top: 24px;
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  }

  /* ロゴ部分 */
  .logo-area {
    margin: 0;
  }

  .logo-area .logo-top,
  .logo-area .logo-bottom {
    font-size: 13px;
    display: block;
    line-height: 1;
    color: #fff;
  }

  .logo-area hr {
    display: none;
  }

  /* ハンバーガーボタン */
  .hamburger {
    display: block;
    position: relative;
    width: 26px;
    height: 18px;
    cursor: pointer;
    margin-bottom: 10px;
    z-index: 2000;
  }

  .hamburger span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: #003d4d;
    border-radius: 3px;
    transition: all 0.3s ease;
  }
  .hamburger span:nth-child(1) {
    top: 0;
  }
  .hamburger span:nth-child(2) {
    top: 7px;
  }
  .hamburger span:nth-child(3) {
    bottom: 0;
  }

  /* 開閉アニメーション */
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 7px;
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg);
    bottom: 8px;
  }

  /* メニューリスト（スライドイン） */
  .list-navi {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 1s ease;
    z-index: 1500;
    background: linear-gradient(135deg, #6eb2bc, #c5ce68, #61c7bb, #d3eef5);
    background-size: 400% 400%;
    animation: menuGradient 8s ease infinite;
  }

  @keyframes menuGradient {
    0% {
      background-position: 0% 50%;
    }
    50% {
      background-position: 100% 50%;
    }
    100% {
      background-position: 0% 50%;
    }
  }


  .list-navi.active {
    right: 0;
  }

  .list-navi .item {
    margin: 24px 0px;
  }

  .list-navi .link span {
    color: #fff;
    font-size: 18px;
    letter-spacing: 2px;
    text-shadow: 3px 1px 2px rgba(0, 0, 0, 0.3);
  }

  .vertical-text-name {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    z-index: 10;
    color: #325a6375;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 105px;
    opacity: 0.2;
    pointer-events: none;
  }

  /* ▼ メイン領域調整 */
  .main {
    margin: 0 auto;
    padding: 80px 16px 0;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }

  /* ▼ Heroセクション */
#top.hero {
    justify-content: flex-start !important;
    padding-top: 10px !important;
    height: auto !important;
    min-height: 400px;
  }

  .hero h1 .top-name {
    font-size: 52px;
    line-height: 1.1;
    font-weight: 300;
    letter-spacing: 4px;
    text-shadow: 2px 3px 20px #0a154e;
  }

  .hero h1 span {
    display: block;
    padding-right: 20%;
  }

  .hero h1 .sub1 {
    padding-left: 10%;
    font-size: 52px;
    margin: 0;
    font-weight: 300;
    letter-spacing: 4px;
    text-shadow: 2px 3px 20px #0a154e;
  }

  .hero .sub {
    font-size: 36px;
  }

  .hero .tagline {
    font-size: 14px;
    margin-top: 12px;
  }

  .circle-btn a {
    width: 80px;
    height: 80px;
    font-size: 12px;
    margin-top: 40px;
  }

  .left-vertical,
  .right-vertical {
    display: none;
  }

.vertical-text-name {
    font-size: 60px !important;
    max-width: 100vw;
    overflow: hidden;
    top: 20px !important;
    left: 10px !important;
    opacity: 0.2;
  }

  /* ▼ hero-sub（縦書きの挨拶） */
  #top-under {
    display: flex;
    justify-content: center;
    margin-top: 50px;
    padding-top: 20px;
    flex-direction: row-reverse;
    /* background: linear-gradient(to bottom, rgba(91, 139, 145, 0.2), rgba(91, 139, 145, 0)); */
  }

  .hero-sub .vertical-text {
    font-size: 15px;
    margin: 0 12px;
    letter-spacing: 0.05em;
    white-space: nowrap;
    writing-mode: vertical-rl;
  }

  /* ▼ hero-sub2（2カラム→縦並び） */
  #top-under2 {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
    margin: 80px 0 60px;
  }

  .divider {
    height: 2px;
    width: 60%;
    background-color: #5b8b91;
    margin: 10px auto;
  }

  .left-text {
    font-size: 1.4rem;
    margin: auto;
  }

  .right-text {
    font-size: 14px;
    max-width: 90%;
  }

  /* ▼ Works */
  .section {
    padding: 40px 16px;
  }

  .works-flex {
    flex-direction: column;
    gap: 20px;
  }

  .work-card img {
    width: 100%;
    height: auto;
    border-radius: 10px;
  }

  /* ▼ About */
  .about-me {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .about-me img {
    width: 160px;
    border-radius: 50%;
  }
  .btn-more {
    padding: 8px 18px;
    font-size: 14px;
  }

  .contact {
    width: 100%;
    padding: 60px 20px;
    margin: 40px 0 0;
    background: linear-gradient(317deg, #d0ecef, #236b73);
    color: #fff;
    text-align: center;
    box-sizing: border-box;
  }

.contact-inner {
    margin-left: 0 !important;
  }

  .contact h2 {
    font-size: 28px;
    margin-bottom: 15px;
  }

  .contact p {
    font-size: 14px;
  }

  .footer {
    margin-top: 30px;
    font-size: 11px;
    color: #333;
  }

}
