:root {
    --primary-blue: #4A7B9D;
    --secondary-blue: #7BA7BC;
    --background: #F5F5F5;
    --text: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: inherit;
}

@media (max-width: 767px) {
    .hero-bird {
        width: 100%; /* 125% → 100%へ */
    }
    .hero-penguin {
        left: 50%; /* calc(50% + XXpx)を避ける */
    }
    .il-A-image {
        left: 0; 
        transform: translateX(-50%); /* 必要に応じて調整 */
        width: 80%; /* 固定幅から%指定に変更 */
    }
    .il-B-image {
        right: 0;
        width: 80%; /* 同様に%で調整 */
    }
}

@keyframes float {
    0% {
        transform: translate(-50%, -50%);
    }
    50% {
        transform: translate(-50%, calc(-50% - 20px));
    }
    100% {
        transform: translate(-50%, -50%);
    }
}

body {
    font-family: "Hiragino Maru Gothic Pro", sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    -webkit-tap-highlight-color: transparent;
    touch-action: pan-y pinch-zoom;
    background-color: #F4F4F2;
}


/* SNSアイコン */
.social-icons {
    text-align: center;
    margin-bottom: 1rem;
}
.instagram-icon,
.youtube-icon {
    filter: invert(40%) sepia(20%) saturate(500%) hue-rotate(180deg) brightness(90%) contrast(90%);
    width: 30px;
    height: 30px;
    margin: 0 0.5rem;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-title-container {
    position: absolute;
    left: 5%;
    top: calc(50% - 70px);
    transform: translateY(-50%);
    z-index: 3;
    width: 220px;
}

.hero-title {
    width: 100%;
    height: auto;
    max-width: 500px;
}

@media (max-width: 767px) {
    .hero-title-container {
        left: 20px;
        top: 20px;
        transform: none;
    }
    .hero-title {
        width: 80%;
    }
}

.hero-shape {
    width: 70%;
    height: 70%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.hero-shape-image {
    width: 100%;
    height: 100%;
    background-image: url('images/bg.png');
    background-size: cover;
    background-position: center;
    position: absolute;
    top: 0;
    left: 0;
    mask: url('images/blob-mask.svg') center/contain no-repeat;
    -webkit-mask: url('images/blob-mask.svg') center/contain no-repeat;
}

@media (max-width: 767px) {
    .hero-shape {
        width: 100%;
        height: 100%;
    }
    .hero-shape-image {
        width: 100%;
        height: 100%;
        background-size: 110%;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

.hero-penguin {
    position: absolute;
    width: 50%;
    height: auto;
    top: calc(50% + 100px);
    left: calc(50% + 120px);
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
    animation: float 3s ease-in-out infinite;
    animation-delay: 1s; /* アニメーションの開始を遅らせる設定 */
}

.hero-bird {
    position: absolute;
    width: 125%;
    height: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
}


@media (max-width: 767px) {
    .hero-penguin {
        top: calc(50% + 50px);
        left: calc(50% - 10px);
        transform: translate(-50%, -50%);
        max-width: 150%;
        height: auto; /* Maintain aspect ratio */
    }
    .hero-bird {
        width: 125%;
        top: 45%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    .hero-title {
        width: 80%;
    }
    .hero-shape-image {
        width: 140%;
        height: 140%;
        background-size: 110%;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

/* Video Section */
.video-container {
    position: relative; /* Ensure positioning context for pseudo-element */
    aspect-ratio: 16/9;
    background-image: url('images/bg_movie.webp');
    background-size: cover; /* Ensures the image covers the entire container */
    background-position: center; /* Centers the image */
    margin: auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}


.video-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(178, 211, 236, 0.334); /* Blue semi-transparent overlay */
    z-index: 1; /* Ensure it is below the play-button */
}

/* YouTube動画用のサイズ指定 */
.youtube-video {
  aspect-ratio: 16/9; /* 通常動画の横長比率 */
  width: 800px;
  height: auto;
  margin: 0 auto;
  border: none;
  border-radius: 15px;
}
/*sp*/@media (max-width: 767px)  {
    .youtube-video {
      width: 100%;
    }
}

.play-button {
    position: relative; /* Ensure it is above the overlay */
    z-index: 2; /* Higher z-index to be above the overlay */
}


.play-button {
    width: 120px;
    height: 120px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.play-button:hover {
    transform: scale(1.1);
}


/* Carousel */
.carousel {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    padding: 2rem 0 0 0;
    touch-action: pan-y pinch-zoom;
}

.carousel-container {
    display: flex;
    justify-content: center; /* Center align the items horizontally */
    overflow-x: scroll;
    cursor: grab;
    transition: transform 0.3s ease-out;
    padding: 1rem 0;
    scroll-behavior: smooth; /* スムーズなスクロール */
    scrollbar-width: none; /* Firefox用のスクロールバー非表示 */
    white-space: nowrap;
    width: 100%;
}

@media screen and (max-width: 768px) {
    .carousel-container {
        justify-content: flex-start; /* 左寄せ */
    }
}

.carousel-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari用のスクロールバー非表示 */
}

.carousel-container:active {
    cursor: grabbing;
}



.carousel-slide {
    width: 60px;
    height: 200px;
    margin: 0 1rem;
    padding: 1.3rem;
    border-radius: 15px;
    writing-mode: vertical-rl;
    background-color: #fff;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    font-family: "Zen Maru Gothic", serif;
    font-weight: 500;
    font-style: normal;
    font-size: 0.7rem;
}
.carousel-slide {
    width: 60px;
    height: 200px;
    margin: 0 1rem;
    padding: 1.3rem;
    border-radius: 15px;
    writing-mode: vertical-rl;
    background-color: #fff;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    font-family: "Zen Maru Gothic", serif;
    font-weight: 500;
    font-style: normal;
    font-size: 0.7rem;
}
.carousel-slide {
    transition: transform 0.3s ease-in-out; /* Smooth transition for both scaling up and down */
}

.carousel-slide:hover {
    transform: scale(1.1); /* Scale up the slide on hover */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); /* Increased shadow size */
}
.tilted-box-l {
    transform: rotate(-15deg); /* Tilt the box 15 degrees to the left */
    margin-right: 3rem;
}
.tilted-box-r {
    transform: rotate(15deg); /* Tilt the box 15 degrees to the left */
    margin-left: 3rem;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 2;
}

.prev { left: -70px; }
.next { right: -70px; }


.bookshelf {
    list-style-type: none; /* Remove list markers */
    padding: 0; /* Remove default padding */
    display: flex; /* Display items in a row */
    margin: 0;
}


/* Character Section */
#chara, .character-slider {
  overflow-x: hidden;
}

#chara h2 {
    margin-bottom: 0; /* Adjust as needed */
}
/* スマホのときだけ、横スライド＋回転を無効化 */
@media (max-width: 767px) {
  .character-card,
  .character-card2 {
    /* 初期状態で画面内に表示 (transform を無効化) */
    transform: none !important;
    opacity: 1 !important;
    transition: none !important; 
    /* もしアニメーション自体を完全にオフにしたければ transition: none; */
  }

  .character-card.visible,
  .character-card2.visible {
    /* visible 時もアニメーションしない */
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
  }
}

/* Character Section (PC向け) */
.character-card {
    background: white;
    padding: 9rem;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    mask: url('images/egg.svg') center/600px no-repeat;
    -webkit-mask: url('images/egg.svg') center/600px no-repeat;
    position: relative;
    transform: translateX(-100%) rotate(0deg); /* ← 左外画面外 */
    opacity: 0; /* 初期は見えない */
    transition: opacity 1s ease-out; /* 不透明度のアニメーションのみ */
    transition-delay: 1.5s;
}

.character-card.visible {
    transform: translateX(0) rotate(360deg); /* ← 1回転しながら画面内へ */
    opacity: 1; 
    transition: transform 1s ease-out, opacity 1s ease-out; 
    transition-delay: 1.5s;
}

.character-card2 {
    background: white;
    padding: 9rem;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    mask: url('images/egg.svg') center/600px no-repeat;
    -webkit-mask: url('images/egg.svg') center/600px no-repeat;
    position: relative;
    transform: translateX(100%) rotate(0deg); /* ← 右外画面外 */
    opacity: 0; 
    transition: opacity 1s ease-out; 
    transition-delay: 1.5s; 
}

.character-card2.visible {
    transform: translateX(0) rotate(-360deg);
    opacity: 1; 
    transition: transform 1s ease-out, opacity 1s ease-out; 
    transition-delay: 1.5s;
}





.slide-in-right {
  transform: translateX(100%);
  opacity: 0;
  transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.visible.slide-in-right {
  transform: translateX(0);
  opacity: 1;
}

.slider-controls {
    text-align: center;
    margin-top: 0.5rem;
}
.slider-controls button {
    border: none;
    background-color: transparent;
}
.slider-controls img {
    width: 60px;
    transition: transform 0.3s ease-in-out;
}

.slider-controls img:hover {
    transform: scale(1.2);
}



.character-image img {
    width: 150px;
}


@media (max-width: 767px) {
    .character-card,
    .character-card2 {
        padding: 7rem;
        max-width: 500px;
        mask: url('images/egg.svg') center/500px no-repeat;
        -webkit-mask: url('images/egg.svg') center/500px no-repeat;
    }
    .character-image img {
        width: 120px;
    }
}

/* bg_リンク */
.bg-link-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    /* 必要に応じて中央寄せやパディングなど加えてもよい */
}

.bg-link-image {
    width: 100%;   /* 横幅いっぱいに表示 */
    height: auto;  /* 縦横比を保ったままリサイズ */
    display: block; /* 余計な隙間をなくすためにブロック要素化 */
    /* 必要に応じて他のスタイルを追加できます */
}

/* Footer */
.footer {
    background: linear-gradient(to bottom, var(--background), white);
    padding: 4rem 0 0;
    margin-top: 6rem;
}

.footer-content {
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    margin-bottom: 3rem;
}
.footer-logo p {
    font-size: 0.8rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--primary-blue);
}

.footer-logo-img {
    width: 60px;
    height: 60px;
    transition: transform 0.5s ease;
    transform-origin: center;
    transform-style: preserve-3d;
}

.footer-logo-img:hover {
    transform: rotateY(360deg);
}

.footer-container {
    perspective: 1000px;
}

.footer-bottom {
    margin-top: 3rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.copyright {
    font-size: 0.8rem;
    color: #666;
}

@media (max-width: 767px) {
    .hero-shape {
        width: 80%;
    }
    
    .hero-title-container {
        left: 5%;
        width: 200px;
    }
    
    .character-card {
        margin: 2rem 1rem;
    }

    .hero-penguin {
        width: 70%;
    }
}

/* Section Titles */
h2 {
    text-align: center;
    margin: 5rem 0 1rem;
    font-size: 1.8rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    line-height: 1.5rem;
    color: #3d6d85;
}
h2 span {
    font-family: "Zen Maru Gothic", serif;
    font-weight: 500;
    font-style: normal;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
}

/* 親要素を基準にする */
.insta,
.video {
    position: relative;
}

/* 画像のスタイル */

.il-A-image {
    position: relative; /* 親要素を基準に配置 */
    top: 2rem; /* 上からの位置をリセット */
    left: -170px; /* 左の画面の外からスタート */
    z-index: 10; /* 他の要素より前面に表示 */
    width: 250px; /* 必要に応じてサイズ調整 */
    height: auto; /* アスペクト比を維持 */
    animation: moveLeftToRightAndUpDown 5s ease-in-out infinite; /* 左から右 + 上下アニメーション */
}

@keyframes moveLeftToRightAndUpDown {
    0% {
        transform: translateX(-250px) translateY(0);
    }
    50% {
        /* 移動途中で上方向に浮かせる */
        transform: translateX(calc(50vw)) translateY(-20px);
    }
    100% {
        transform: translateX(calc(100vw + 250px)) translateY(0);
    }
}

@media (max-width: 767px) {
    .il-A-image {
        position: relative; /* 親要素を基準に配置 */
        top: 2rem; /* 上からの位置をリセット */
        left: -100px; /* 左から50%に配置 */
        transform: translateX(-50%); /* 水平方向に中央揃え */
        width: 35%; /* 幅を50%に設定 */
        height: auto; /* アスペクト比を維持 */
        z-index: 1; /* 他の要素より後面に表示 */
        margin: 0 auto; /* 左右中央揃え */
    }
}

.il-B-image {
    position: absolute;
    top: -100px; /* 上からの位置をリセット */
    right: 100px; /* 左の画面の外からスタート */
    z-index: 10; /* 他の要素より前面に表示 */
    width: 200px; /* 必要に応じてサイズ調整 */
    height: auto; /* アスペクト比を維持 */
}

@media (max-width: 767px) {
    .il-B-image {
        position: relative; /* 親要素を基準に配置 */
        top: 2rem; /* 上からの位置をリセット */
        right: auto; /* 右の位置をリセット */
        left: 50%; /* 左から50%に配置 */
        transform: translateX(-50%); /* 水平方向に中央揃え */
        width: 35%; /* 幅を35%に設定 */
        height: auto; /* アスペクト比を維持 */
        z-index: 1; /* 他の要素より後面に表示 */
        margin: 0 auto; /* 左右中央揃え */
    }
}

.instagram h2 {
    margin-bottom: 0.5rem;
}

.play {
    background: linear-gradient(to top, #ECECE9, #F5F5F5);
    border-bottom: 1px solid #ECECE9;
}

/* スクロールアニメーション */
.scroll-animation {
    opacity: 0;
    transform: translateY(100px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animation.visible {
    opacity: 1;
    transform: translateY(0);
}

/* モーダルウインドウのスタイル */
/* モーダル全体のオーバーレイ */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7); /* 背景を半透明に */
  z-index: 9999;
  display: flex;             /* 中央揃えのためflexboxを使用 */
  justify-content: center;   /* 水平方向中央揃え */
  align-items: center;       /* 垂直方向中央揃え */
}

/* 動画本体と閉じるボタンのコンテナ */
.modal-content {
  position: relative; /* 閉じるボタンを絶対配置するため */
  display: inline-block;
  background: transparent; /* 必要に応じて背景色を設定 */
}



/* 閉じるボタン（動画の外に正円で配置） */
.close-button {
  position: absolute;
  /* 以下で「動画の右上より外側」に配置 */
  top: -25px;    /* iframeの上端から -15px外に出す */
  right: -25px;  /* iframeの右端から -15px外に出す */

  /* 正円にするため固定のwidth/heightを指定 */
  width: 32px;   
  height: 32px;

  /* アイコン（×）を中央に置くため */
  line-height: 27px; 
  text-align: center;

  color: #fff;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 50%;  /* 正円 */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  z-index: 10; /* iframeより前面に */
}

.close-button:hover,
.close-button:focus {
  color: #333;
  background: rgba(255, 255, 255, 1);
}




/*　メニュー　*/
.menu-icon {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 1000;
}

.nav-menu {
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f4f4f2;
    color: #3d6d85;
    display: flex;
    transition: top 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    z-index: 999;
}

.nav-menu.open {
    top: 0;
    opacity: 1;
}

.nav-menu.open img,
.nav-menu.open ul,
.nav-menu.open li,
.nav-menu.open a {
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateY(0);
    opacity: 1;
}

.nav-menu img,
.nav-menu ul,
.nav-menu li,
.nav-menu a {
    transform: translateY(-20px);
    opacity: 0;
}

.nav-menu img {
    margin-bottom: 20px; /* Add some space below the image */
}

.nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.nav-menu li {
    padding: 15px 0;
    width: 100%;
    border-bottom: 1px solid #bfccd5;
    list-style-type: none;
    text-align: center; /* Center align text */
}

.nav-menu li a {
    display: block;
    padding: 15px 30px;
    color: #3d6d85;
    text-decoration: none;
}

.nav-menu ul {
    width: 100%; /* Make the ul take full width */
}

.menu-icon svg {
    transition: transform 0.3s ease;
}

.menu-icon.open .line1 {
    transform: rotate(45deg) translate(-1.5px, 1.5px);
    transform-origin: center;
}

.menu-icon.open .line2 {
    transform: rotate(-45deg) translate(1.5px, -1.5px);
    transform-origin: center;
}

.logo {
    width: 180px;
    height: auto;
}

.nav-menu .right-section {
    width: 33.33%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.nav-menu .left-section {
    width: 66.67%;
    background-image: url('images/bg_menu.png'); /* Example background image */
    background-size: cover;
    background-position: center;
}

/* ハンバーガーメニュー　Mobile */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
    }

    .nav-menu .left-section {
        display: none;
    }

    .nav-menu .right-section {
        width: 100%;
        height: 100vh; /* Set height to match the viewport height */
        background-image: url('images/bg_menu.png'); /* Background image for mobile */
        background-size: cover;
        background-position: center;
        justify-content: flex-start; /* Align items to the top */
    }
    .nav-menu ul {
        list-style: none;
        padding: 1.5rem 0 0 0;
    }
    .nav-menu li {
        padding: 4px 0;
        font-size: 0.9rem;
        border-bottom: 1px solid #ded3cf;
    }
    .logo {
        width: 140px;
    }
}




