/*
Theme Name: RL-4-Child
Version: 1.02
Template: rl-4
*/



/* html, body {
  background: transparent;
}


body {
  margin: 0;
 min-height: 100lvh;
  padding-bottom: env(safe-area-inset-bottom); 
  padding-top: env(safe-area-inset-top);
  background-color: transparent;
  position: relative;
  overflow-x: hidden;
}
body > #wrapper {
  min-height: 100vh;
  background: linear-gradient(to bottom, #ef6fb430, #fd5e5e30);
} */

/* --- canvas 背景 ---js/script.jsに記述 */
/* #meshCanvas {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
	min-height: 100vh;
  z-index: -1;
  pointer-events: none;
  background-color: transparent;
} */

/* HTML / BODY の背景をサイト背景に設定 */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
/*   background: linear-gradient(to bottom, #123456, #654321); /* サイト背景 */ 
background: #f5f0f0;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

/* wrapper は透明に */
#wrapper {
  position: relative;
  min-height: 100%;
  background: transparent;
  z-index: 1;
}

/* canvas は透明背景で body 背景を透かす */
#meshCanvas {
  display: block;
  position: absolute; /* 必要に応じて */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: -1; /* wrapper の下に */
}  





h2,
h3 {
    font-family: "Zen Kaku Gothic New", sans-serif;
    font-weight: 700;
    font-style: normal;
}

h4 {
    font-family: 'Urbanist', sans-serif;
    font-weight: 700;
    font-style: normal;
}

h5 {
    font-family: "Roboto", sans-serif;
}


p,
span {
    font-family: "Zen Kaku Gothic New", sans-serif;
    font-weight: 400;
    line-height: 1.5;
}

button {
    font-family: "Zen Kaku Gothic New", sans-serif;
}

/*     wrapper ---------------/*/

/* #wrapper {
    --hue: 0;
    background: radial-gradient(
      circle at center,
      hsl(var(--hue), 80%, 70%),
      hsl(calc(var(--hue) + 60), 80%, 80%)
    );
    background-attachment: fixed;
    animation: hueShift 40s linear infinite;
  }
  
  @keyframes hueShift {
    0%   { --hue: 0; }
    100% { --hue: 360; }
  } */
/*     header ---------------/*/

#intro {
    max-width: 980px;
    padding: 20px;
    margin: 0 auto;
}

#intro h1 {
    display: flex;
    align-items: center;
    width: auto;
    height: 80px;
}


#intro .header-logo {
    height: 4em;
    display: inline-block;
}

#intro span {
    font-family: 'Urbanist', sans-serif;
    font-size: 5rem;
    /* お好みで調整 */
    font-weight: 100;
    /* Ultra Light */
    letter-spacing: 0.05em;
    /* 文字間 */
    line-height: normal;
    margin-left: 10px;
    color: #fff;
}

#intro p {
    font-size: 1em;
    color: #fff;
}

#intro .intro-p {
    font-family: "Roboto", sans-serif;
    font-size: 1em;
    font-weight: 200;
    color: #fff;
    letter-spacing: 0.2em;
    margin-left: 0;
}

#intro .intro-p-animation {
    display: inline-block;
  animation: slideInRight 1s ease-out 0s 1 forwards;
}
#intro .intro-p-animation:nth-child(1) {
  animation-delay: 0s;
}
#intro .intro-p-animation:nth-child(2) {
  animation-delay: 0.2s;
}
#intro .intro-p-animation:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}


/* モバイル表示（728px以下）で2段表示に切り替え---------------- */
@media screen and (max-width: 728px) {
    #intro h1 {
        flex-direction: column;
        align-items: flex-start;
        height: 140px;
        margin-bottom: 3px;
    }

    #intro .header-logo {
        width: auto;
        max-width: 100%;
        height: auto;
    }

    #intro span {
        font-family: 'Urbanist', sans-serif;
        font-size: 5rem;
        /* お好みで調整 */
        font-weight: 100;
        /* Ultra Light */
        letter-spacing: 0.05em;
        /* 文字間 */
        line-height: normal;
        margin-left: 0px;
        color: #fff;
    }


    #intro p {
        font-size: 1em;
        color: #fff;
    }

    #intro .intro-p {
    font-size: 1em;
    color: #fff;
}

}

/* モバイル表示（400px以下）で2段表示に切り替え---------------- */
@media screen and (max-width: 400px) {
    #intro h1 {
        flex-direction: column;
        align-items: flex-start;
        height: 140px;
    }

    #intro .header-logo {
        width: auto;
        max-width: 100%;
        height: auto;
    }

    #intro span {
        font-family: 'Urbanist', sans-serif;
        font-size: 5rem;
        /* お好みで調整 */
        font-weight: 100;
        /* Ultra Light */
        letter-spacing: 0.05em;
        /* 文字間 */
        line-height: normal;
        margin-left: 0px;
        color: #fff;
    }


    #intro p {
        font-size: 1em;
        color: #fff;
    }

    #intro .intro-p {
    font-size: 1em;
    color: #fff;
}

}

/* ----------------モバイル表示（600px以下）ここまで */

.yohaku {
    width: 100%;
    height: 120px;
}
.juku {
	color: transparent;
	padding: 20px;
}
/* nav---------------- */
#nav {
    display: none;
    padding: 10px;
}

/* main---------------- */

#main {
  max-width: 980px;
  padding: 10px;
  margin: 0 auto;
  z-index: -2;
}


/* section profile---------------- */
#profile {
    padding: 10px;
}

section h2 {
    color: #fff;
    font-size: 25px;
    letter-spacing: 0.2em;
}


#profile article {
    display: flex;
    align-items: end;
    padding: 20px 0;
}

#profile .character {
    text-align: center;
}

#profile img {
    width: 20vw;
}

#profile .profile-name {
    display: flex;
    align-items: end;
}

#profile h3 {
    font-size: 1.5em;
    color: #fff;
    letter-spacing: 0.3em;
}

#profile h5 {
    font-size: 1.6em;
    color: #fff;
    letter-spacing: 0.1em;
    font-weight: 100;
    flex: 1;
}

#profile span {
    color: #fff;
    margin-left: 20px;
    font-size: 0.8em;
    letter-spacing: 0.3em;
}

#profile .profile-p {
    padding: 20px 0;
    flex: 6;
}

#profile .pro-p {
    padding: 0 0 0 10px;
    line-height: 1.5;
    font-size: 0.9em;
    color: #fff;
}

#profile .profile-1 {
    display: flex;
    padding: 10px 0;
}

#profile .profile-1 .current {
    font-size: 1.2em;
}

/* モバイル表示（600px以下）で2段表示に切り替え---------------- */
@media screen and (max-width: 600px) {
    #profile article {
        display: block;
    }

    #profile img {
        width: 40vw;
    }

    #profile .profile-name {
        display: block;
    }

    #profile h3 {
        font-size: 1.2em;
        color: #fff;
        letter-spacing: 0.3em;
    }

    #profile h5 {
        font-size: 1.6em;
        color: #fff;
        letter-spacing: 0.1em;
        font-weight: 100;
    }

    #profile span {
        color: #fff;
        margin-left: 0;
        font-size: 0.8em;
        letter-spacing: 0.3em;
    }

}

/* tools---------------- */
#tools {
    padding: 10px;
}

#tools article {
    padding: 10px;
}

#tools .tools-icon {
    display: flex;
    gap: 25px;
    padding: 0 25px;
    margin: 10px 0;
}

#tools li {
    list-style: none;
}

#tools img {
    width: 40px;
	border-radius: 5px;
}


#tools p {
	text-align:center;
	color: #fff;
	font-family: "Roboto", sans-serif;
	font-weight: 100;
}

#tools h5 {
	text-align:left;
	color: #fff;
	padding: 5px;
	background: transparent;/*背景透明に*/
	border-left: solid 5px #46b2b8;/*左線*/
}

#tools p.tools-pp {
	font-family: "Zen Kaku Gothic New", sans-serif;
	text-align:left;
	color: #fff;
}

.tools-description{
	padding: 10px;
}

/* works---------------- */
#works {
    position: relative;
    overflow: hidden;
    padding: 10px;
}

.works-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    /* works css 最下部に幅可変時のグリッドの安定用のcss記載 */
}




.thumb-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    /* これで img を中央寄せ（もしくは左寄せなら left） */
    z-index: 5;
}


.thumb-wrapper img {
    transition: transform 0.3s;
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0px 4px 9px 1px rgba(0, 0, 0, 0.1);
}


.thumb-wrapper:hover img {
    transform: scale(1.05);
}

.thumb-wrapper.active {
    width: auto;
    background: #fff;
    transition: all 0.25s ease-out;
    padding: 15px;
    border-radius: 15px 15px 0 0;
    z-index: 11;
    position: relative;
}

/* 左側（デフォルト） */
.thumb-wrapper.active:not(.right-align) {
    left: 0px;
    right: auto;
}

/* 右側 */
.thumb-wrapper.active.right-align {
    left: auto;
    right: 0;
}



/* ドロップダウン */


.dropdown {
    position: absolute;
    width: 290%;
    max-width: 92vw;
    background: #fff;
    box-shadow: 1px 8px 8px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease;
    /* ← transformではなく opacityのほうが安全 */
    border-radius: 0 15px 15px 15px;
    display: none;
    box-sizing: border-box;
    overflow: hidden;
    z-index: 1000;
    /* これを削除！！ */
    /* transform: translateY(3%); */
}





/* 左端に表示されるとき（デフォルト）→ そのまま */
/* ベース（最小画面時） */


.dropdown.active {
    display: block;
    padding: 10px;
}

.work-item.active .dropdown {
    display: block;
}


.dropdown-close {
    font-family: "Zen Maru Gothic", sans-serif;
    font-weight: 900;
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    font-size: 20px;
    border: none;
    cursor: pointer;
    background-color: #2c2c2c;
    color: #fff;
    /* line-height: 1; */
    width: 7vw;
    height: 7vw;
    border-radius: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.details-in {
    padding: 10px;
}

.work-details {
    padding: 10px;
}

.work-details h4 {
    color: #333;
    font-size: larger;
	letter-spacing: 0.3em;
    padding: 5px 0;
}

.work-details p {
    padding: 0 0 10px;
    font-size: 0.8em;
}

/* カルーセル */
.carousel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}



.carousel {
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    display: flex;
    scrollbar-width: thin;
    /* Firefox用（細く） */
    scrollbar-color: #ff69b4 #f0f0f0;
    /* Firefox用（色） */
}

/* Webkit（Chrome/Safari）用 */
.carousel {
    -ms-overflow-style: none;
    /* IE & Edge */
    scrollbar-width: none;
    /* Firefox */
}

.carousel::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari */
}



.carousel-track {
    display: flex;
    gap: 10px;
    /* スライド間の余白 */
}

.carousel-img {
    flex: 0 0 auto;
    scroll-snap-align: center;
    width: 80vw;
    max-width: 150px;
    cursor: pointer;
    border-radius: 10px;
}

.dropdown-close {
    z-index: 20;
}

/* ドット部分は下に表示 */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    background: #07d4a24f;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-dot.active {
    background: #07d4a2;
}


/* .carousel-img:nth-child(2) {
    transform: scale(1.2);
  } */

/* モーダル */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    /* dropdown より上に */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    /* ← ★これが重要！基準をここにする */
    max-width: 80%;
    max-height: 80%;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 18px;
	font-weight: 700;
    color: #ffffff;
    background-color:#07d4a2;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    /* box-shadow: 0 0 8px rgba(0, 0, 0, 0.2); */
}


.modal-content img {
    max-width: 100%;
    max-height: 75vh;
    height: auto;
    width: auto;
    display: block;
    border-radius: 20px;
}



.modal-caption {
    color: #fff;
	margin: 10px 0;
}


/* 背景のループテキスト */
.works-header {
  position: relative;
  overflow: hidden; /* このままでOK */
  height: 8vh;       /* 高さは維持してOK */
  padding: 0;        /* padding-top はゼロでOK */
  z-index: 2;
}


.works-header h2 {
  position: relative;
  z-index: 3; /* ループより上に出すため */
}

/* 背景のループテキスト */
.works-bg-loop {
	position: absolute;
    top: 0; /* ここを0に */
    left: 0;
    width: 200%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.05;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(13%); /* テキストを少し下にずらす */
}


.loop-text {
    font-family: "Roboto", sans-serif;
	font-weight:400px;
  font-size: 6vw;
  font-weight: bold;
  animation: loopScroll 10s linear infinite;
  white-space: nowrap;
  line-height: 1;
}



/* アニメーション定義 */
@keyframes loopScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}


/* アニメーション定義 */
@keyframes loopScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* 375px以下の超小型スマホ向け微調整 */
@media screen and (max-width: 479px) {
  .works-bg-loop {
    transform: translateY(25%);
    font-size: 14vw;
  }

    .loop-text {
    font-size: 12vw;
  }
}

/* スマホ（480px以上） */
@media screen and (min-width: 480px) {

    /* 小さいスマホ用の調整 */
    .works-wrap {
        grid-template-columns: repeat(2, 1fr);
    }


    .modal-close {
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 28px;
        color: #333;
        background-color: #fff;
        cursor: pointer;
        border-radius: 50%;
        width: 50px;
        height: 50px;
    }

  .works-bg-loop {
    transform: translateY(25%);
    font-size: 14vw;
  }
      .loop-text {
    font-size: 12vw;
  }

}

/* タブレット縦（768px以上） */
@media screen and (min-width: 768px) {
    .works-wrap {
        grid-template-columns: repeat(2, 1fr);
    }


    .dropdown-close {
        width: 30px;
        height: 30px;
    }

    .modal-close {
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 28px;
        color: #333;
        background-color: #fff;
        cursor: pointer;
        border-radius: 50%;
        width: 50px;
        height: 50px;
    }

      .works-bg-loop {
    transform: translateY(-5%);
    font-size: 14vw;
  }
      .loop-text {
    font-size: 8vw;
  }

}

/* タブレット横～小型PC（1024px以上） */
@media screen and (min-width: 1024px) {
    .works-wrap {
        grid-template-columns: repeat(3, 1fr);
    }


    .dropdown-close {
        width: 30px;
        height: 30px;
    }

    .modal-close {
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 28px;
        color: #333;
        background-color: #fff;
        cursor: pointer;
        border-radius: 50%;
        width: 50px;
        height: 50px;
    }

      .works-bg-loop {
    transform: translateY(-5%);
    font-size: 14vw;
  }
      .loop-text {
    font-size: 4vw;
  }

}

/* ノートPC（1280px以上） */
@media screen and (min-width: 1280px) {
    .works-wrap {
        grid-template-columns: repeat(4, 1fr);
    }

    .dropdown-close {
        width: 30px;
        height: 30px;
    }

    .modal-close {
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 28px;
        color: #333;
        background-color: #fff;
        cursor: pointer;
        border-radius: 50%;
        width: 50px;
        height: 50px;
    }

          .works-bg-loop {
    transform: translateY(-5%);
    font-size: 14vw;
  }
      .loop-text {
    font-size: 4vw;
  }

}

/* 大画面（1440px以上） */
@media screen and (min-width: 1440px) {
    .works-wrap {
        grid-template-columns: repeat(5, 1fr);
    }


    .dropdown-close {
        width: 30px;
        height: 30px;
    }

    .modal-close {
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 28px;
        color: #333;
        background-color: #fff;
        cursor: pointer;
        border-radius: 50%;
        width: 50px;
        height: 50px;
    }

          .works-bg-loop {
    transform: translateY(-5%);
    font-size: 14vw;
  }
      .loop-text {
    font-size: 4vw;
  }

}


/* ====== #works レイアウト崩れ対応用（最終調整）====== */
/* works-grid安定用css---------------- */

.works-grid {
    position: relative;
    display: grid;
    /* grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); */
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    min-width: 260px;
    /* 150px × 2カラム */
    gap: 16px;
    padding: 30px 0;
    overflow: visible; /* ← これが必要！ */
}

.work-item {
    position: relative;
    z-index: 1
        /* min-height: 200px; ← 削除 */
}

.work-item.active {
    z-index: 10;
    /* 開いてるものは前に */
}

.thumb-wrapper {
    position: relative;
    width: 100%;
    z-index: 5;
}

.thumb-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.thumb-title {
    text-align: left;
    font-size: 16px;
    margin-bottom: 8px;
    padding: 0 5px;
    color: #ffffff;
    font-weight: 100;
}
.thumb-wrapper.active {
padding: 15px 15px 30px 15px;
}
/* worksドロップダウン出現時に他のサムネ小さく---------------- */
/* サムネイルが dimmed のときは img自体を小さく＆ぼかす */
/* サムネイルがdimmedのとき、画像を小さく＋薄く＋ぼかす */
.work-item.dimmed .thumb-wrapper img,
.work-item.dimmed .thumb-wrapper .thumbnail {
    transform: scale(0.9) translateY(-2px);
    opacity: 0.8;
    transition: all 0.3s ease;
    /* filter: blur(1px); */
    pointer-events: none;
}

.dropdown-spacer {
    display: block;
    width: 100%;
    margin-bottom: clamp(10px, 1vw, 16px);
    /* 画面幅に応じて変化させることも可能 */
}

/* 右側に表示されるときの角丸 */
.dropdown.right-align {
    border-radius: 15px 0 15px 15px;
    /* 左上だけ角なしに変更 */
}




/* ----------------works-grid安定用css */
/* ====== ====== ====== ====== ====== ====== */


/* ---- 窪み角丸 ---------------- */
.bridge-svg {
	opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease-out;
    position: absolute;
    bottom: 5px;
    right: -12px;
    width: 12px;
    height: 12px;
    z-index: 10000;
    pointer-events: none;
    box-shadow: -13px 13px 5px -5px #ffffff;
  }
  
  .work-item.active .bridge-svg {
    opacity: 1;
    visibility: visible;
    transition-delay: 0.25s;
  }
  
  
  
  .bridge-svg svg {
    display: block;
    width: 105%;
    height: 105%;
  }

  /* ドロップダウンが右に出るとき用（例） */
.thumb-wrapper.active.right-align .bridge-svg {
    left: -12px;
    right: auto;
    transform: scaleX(-1);
  }
  

/* ====== ====== ====== ====== ====== ====== */
/* --- 塾のこと ----------------*/
.logi-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 0;
  }
  
  .logi-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    padding: 20px 5px;
    justify-content: center; /* ← グリッド全体を中央寄せ（OK） */
  }
  
  .logi-image-item {
    max-width: 300px;
    width: 100%;
    margin: 0 auto; /* ← 各アイテムを中央に寄せる（1列時に重要） */
  }
  
  .logi-image-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
  }

.page-title {
  display: none;
}

.logi-header {
	padding:10px;
}

.logi-p {
    color: #fff;
    letter-spacing: 0.2em;
}

.logi-p-big {
	font-size: 3em;
}

/* ====== ====== ====== ====== ====== ====== */
/* --- footer ----------------*/
footer {
  text-align: center;
  padding: 40px 20px 10px 20px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom)); /* ホームバー下の余白 */
  background-color: transparent;
}

.footer-wrapper {
  display: flex;
  justify-content: center; /* 子要素を中央に配置 */
  align-items: center;
  flex-direction: column; /* 上下に並べる場合 */
  gap: 16px; /* 要素間の余白（任意） */
}

#footer p {
  margin-top: 20px;
  font-size: 0.9rem;
  color: #fff;
  text-align: center; /* 念のため再指定 */
}

/* svgアニメーション---------- */
#maruco {
    width: 40vw;
    max-width: 150px;
    height: auto;
    display: block;
    margin: 0 auto;  /* 中央寄せしたい場合 */
}

#p-logo {
    width: 100%;
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;  /* 中央寄せしたい場合 */
}

/* slide-topアニメーション---------- */
@keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1.2s ease-out;
  }
  
  .fade-in-up.active {
    opacity: 1;
    transform: translateY(0);
  }

  .thumbnail.fade-in-up {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    transform-origin: center bottom;
    transition: opacity 1.8s cubic-bezier(0.25, 0.8, 0.25, 1),
                transform 1.8s cubic-bezier(0.25, 0.8, 0.25, 1);
  }
  
  .thumbnail.fade-in-up.active {
    opacity: 1;
    transform: translateY(0);
  }
  

/* 背景バンディング緩和処理 */
#meshCanvas {
  z-index: -999;
  position: fixed;
}

/* 背景ノイズ */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("noise_weak.png") repeat; /* やさしめに変更 */
  opacity: 0.05; /* 0.03〜0.08ぐらいで最適点探す */
  pointer-events: none;
  z-index: -998; /* Canvasより上、コンテンツより下 */
}
