:root {
    --text-color: #333;
    --bg-gradient: linear-gradient(135deg, #ffffff 0%, #e6e6e6 100%);
    --accent-color: #5ec4d4;
    --header-bg: rgba(255, 255, 255, 0.8);
    --border-color: #ddd;
    --font-family: 'Inter', sans-serif;
  }
  
  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  body {
    font-family: "DotGothic16", serif;
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
    color: var(--text-color);
    background: var(--bg-gradient);
    overflow-x: hidden;
  }
  
  
  body::-webkit-scrollbar {
    display: none; /* スクロールバーを非表示にする */
  }
  
  .hero {
    position: relative;
    width: 100%;
    height: 200vh;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: opacity 0.7s ease, transform 0.7s ease;
    box-sizing: border-box;
  }
  
  .hero.fade-out {
    opacity: 0;
  }
  
  
  .hero-content {
    position: absolute; /* ヒーロー内で固定的な配置 */
    top: 25%; /* ビューポートの中央に配置 */
    left: 50%;
    text-align: center;
    color: #fff;
    z-index: 2;
    transform: translate(-50%, -50%) translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    width: 80%; /* 変更：幅を60%に縮小 */
    max-width: 600px; /* 追加：最大幅を制限 */
  }
  
  .hero-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
  }
    
  .hero-content p {
    font-size: 1.2rem;
    font-weight: 300;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  }
  
  .hero-content.appear {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0);
  }
  
  .hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 110px);
    height: calc(100% - 110px);
    background: url('../images/img/background.jpg') center center no-repeat;
    background-size: cover;
    z-index: -1;
  }
  
  .hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0),
      rgba(255, 255, 255, 0.5) 40%,
      white
    );
    z-index: 1;
  }
  
  .hero-diamonds {
    content: '◇◇◇◇◇◇◇';
    position: fixed;
    right: -15px;
    bottom: 50%;
    transform: rotate(90deg) translateX(-50%);
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    letter-spacing: 0.5em;
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    z-index: 2;
    opacity: 1;
    transition: opacity 0.7s ease;
  }
  
  @keyframes ripple {
    0% {
      transform: scale(1);
    }
    50% {
      transform: scale(1.05);
    }
    100% {
      transform: scale(1);
    }
  }
    
  .hamburger {
    position: fixed; /* 常に画面に表示 */
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 30px;
    height: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
  }
  
  .hamburger span {
    display: block;
    width: 30px;
    height: 2px;
    background-color: #5ec4d4;
    transition: transform 0.3s ease;
  }
  
  .hamburger.open span {
    background-color: #5ec4d4;
  }
  
  .hamburger.open span:first-child {
    transform: translateY(8px) rotate(45deg);
  }
  
  .hamburger.open span:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.open span:last-child {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px; /* 希望の幅に設定 */
    height: 100vh;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    overflow: hidden;
    transition: transform 0.4s ease, opacity 0.4s ease;
    transform: scaleX(0);
    transform-origin: right center; /* 右端を基準にスケール */
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 998;
  }
  
  .main-nav.open {
    transform: scaleX(1);
    opacity: 1;
  }
  
  .main-nav a {
    display: block;
    margin: 15px 0;
    color: var(--text-color);
    text-decoration: none;
    font-family: "Doto", serif;
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
    font-variation-settings:
      "ROND" 100;
    font-size: 1.1rem;
    font-weight: 400;
    transition: color 0.3s ease;
  }
  
  .main-nav a:hover {
    color: var(--accent-color);
  }
  
  .social-links {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 0px;
    align-items: center;
    width: 200px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .social-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 16px;
    padding: 8px 15px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    width: 100%;
    text-align: center;
  }
  
  .social-links a:hover {
    color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
  }
  
  main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
  }
  
  section {
    margin: 300px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
  
  section:first-of-type {
    margin-top: 50px;
  }
  
  section.appear {
    opacity: 1;
    transform: translateY(0);
  }
  
  h2 {
    margin-bottom: 30px;
    font-family: "Doto", serif;
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
    font-variation-settings:
      "ROND" 100;
    font-weight: 600;
    font-size: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    letter-spacing: 0.02rem;
    color: var(--text-color);
  }
  
  .gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }
  
  .gallery-item {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 4px;
  }
  
  .square-container {
    width: 100%;
    padding-bottom: 100%;
    position: relative;
    overflow: hidden;
  }
  
  .square-container img {
    position: absolute;
    inset: 0;
    margin: auto;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: none;
    transition: transform 0.3s ease;
  }
  
  .square-container:hover img {
    transform: scale(1.1);
  }
  
  
  
  .gallery-item img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  
  .news-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .news-list li {
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #444;
  }
  
  .achievements-list ul {
    list-style: disc inside;
    padding-left: 10px;
    line-height: 1.7;
    font-size: 0.95rem;
    color: #555;
  }
  
  .contact-form iframe {
    width: 100%;
    height: 500px;
    border: none;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  }

  .site-footer {
    text-align: center;
    padding: 20px;
    background-color: #f9f9f9;
    color: #555;
    font-size: 0.9rem;
    border-top: 1px solid #ddd;
  }  
  
  .progress-container {
    position: fixed;
    top: 0;
    right: 0;
    width: 5px; /* 横幅 */
    height: 100%;
    background: #ddd;
    z-index: 999; /* 他の要素の上に表示 */
  }
  .progress-bar {
    width: 100%;
    height: 0;
    background: #76c7c0; /* プログレスバーの色 */
    transition: height 0.3s ease;
  }
  
  @media screen and (max-width: 1024px) {
    .gallery {
      grid-template-columns: repeat(2, 1fr);
    }
    .hero::before {
      width: 90%;
      height: 90%;
    }
  }
  
  @media screen and (max-width: 600px) {
    .gallery {
      grid-template-columns: 1fr;
    }
  
    .hero-content h1 {
      font-size: 2rem;
    }
  
    .hero-content p {
      font-size: 1rem;
    }
  }
  
  @media screen and (max-width: 768px) {
    .hero {
      background-attachment: scroll;
      background-size: cover;
      height: 150vh;
      border-width: 10px;
    }
    .hero::before {
      width: calc(100% - 20px);
      height: calc(100% - 20px);
    }
    .hero-content {
      width: 70%; /* スマホではやや大きめに */
      max-width: 400px;
    }
    .hero::after {
      font-size: 0.9rem;
      right: -10px;
    }
  }
  
  .modal {
    display: none; /* 初期状態では非表示 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
  }
  
  .modal-content {
    position: relative;
    max-width: 90%; /* ビューポート幅の90%を上限に設定 */
    max-height: 90%; /* ビューポート高さの90%を上限に設定 */
    background: white;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    overflow: hidden; /* コンテンツがはみ出さないように設定 */
  }
  
  .modal img {
    max-width: 100%; /* モーダル内で幅を制限 */
    max-height: calc(90vh - 40px); /* モーダル高さ内に収まるように設定 (40pxはpadding分を考慮) */
    object-fit: contain; /* 画像がモーダル内に収まるように調整 */
    border-radius: 8px;
  }
  
  
  
  .modal p {
    margin-top: 15px;
    font-size: 1rem;
    color: #333;
  }
  
  .close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
  }
  
  .close-button:hover {
    color: #333;
  }
  
  /* 問い合わせフォーム*/
  #contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
  }
  
  #contact-form label {
    font-size: 1rem;
    color: var(--text-color);
  }
  
  #contact-form input, #contact-form textarea, #contact-form button {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }
  
  #contact-form textarea {
    resize: vertical;
    min-height: 150px;
  }
  
  #contact-form button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  #contact-form button:hover {
    background-color: darken(var(--accent-color), 10%);
  }
  
  .hero-bottom-image {
    position: fixed;
    bottom: 50px;
    right: 50px;
    width: 200px;
    height: auto;
    z-index: 2;
    opacity: 1;
    transition: opacity 0.7s ease;
  }

  @media screen and (max-width: 768px) {
    .hero-bottom-image {
      width: 150px;
      bottom: 30px;
      right: 30px;
    }
  }
  
  .hero-title {
    position: fixed;
    top: 50px;
    left: 50px;
    font-family: "Doto", serif;
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
    font-variation-settings:
      "ROND" 100;
    font-size: 8rem;
    color: white;
    z-index: 2;
    opacity: 1;
    transition: opacity 0.7s ease;
  }

  @media screen and (max-width: 768px) {
    .hero-title {
      font-size: 4rem;
      top: 30px;
      left: 30px;
    }
  }
  
  .gallery-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    loading: lazy;
  }
  
  main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
    position: relative; /* 追加 */
  }
  
  .doodles-link {
    position: absolute;
    right: 20px; /* 右からの距離を調整 */
    bottom: -6px; /* 下からの距離を調整、フッターとの隙間をなくす */
    z-index: 10; /* 他の要素より前面に表示 */
  }
  
  @media screen and (max-width: 768px) {
    .doodles-link {
      right: 10px;
      bottom: -6px;
    }
  }

  .back-to-home {
    text-align: center;
    padding: 40px 0;
  }

  .back-to-home a {
    display: inline-block;
    padding: 15px 40px;
    color: #000;
    text-decoration: none;
    font-size: 1.2rem;
    transition: opacity 0.3s ease;
  }

  .back-to-home a:hover {
    opacity: 0.7;
  }