:root {
  --primary-bg: #001742;
  --secondary-bg: #0a2846;
  --accent-gold: #c5a059;
  --accent-gold-light: #e0c58e;
  --text-white: #ffffff;
  --text-gray: #e9f1ff;
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(197, 160, 89, 0.2);
  --serif-font: 'Shippori Mincho', serif;
  --sans-font: 'Zen Kaku Gothic New', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  width: 100%;
  position: relative; /* スクロールバー制御の安定化 */
}

body {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0;
  background-color: var(--primary-bg);
  font-family: var(--serif-font);
  line-height: 1.8;
  color: var(--text-white);
  min-height: 100vh;
  letter-spacing: 0.05em;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

img, video, canvas, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Hero Section --- */
.hero-image {
  width: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  animation: fadeIn 2.5s ease-out forwards;
  position: relative;
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 151px;
  background: linear-gradient(to top, var(--primary-bg), transparent);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Container & Layout --- */
.container {
  padding: 40px 80px 100px 80px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.header {
  text-align: center;
  margin-bottom: 30px;
}

h1 {
  font-family: var(--serif-font);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--text-white);
  margin: 50px 0 40px 0;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.subtitle {
  font-family: var(--serif-font);
  font-size: 1.1rem;
  color: var(--accent-gold);
  letter-spacing: 0.2em;
  margin-top: 10px;
}

.subtitle a {
  color: var(--accent-gold);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.subtitle a:hover {
  border-color: var(--accent-gold);
}

/* --- Dividers --- */
.wing-divider {
        width: 100%;
        height: 50px;
        position: relative;
        margin: 50px 0 80px 0;
        overflow: hidden;
      }

      .wing-divider::before {
        content: '';
        position: absolute;
        top: 80%;
        left: 0;
        width: 100%;
        height: 50px;
        background: linear-gradient(90deg, #1e3c72 0%, #2a5298 25%, #4a90e2 50%, #87ceeb 75%, #ffffff 100%);
        transform: translateY(-50%);
        clip-path: polygon(0% 0%, 15% 80%, 100% 80%);
        animation: waveFlow 3s ease-in-out infinite;
      }

      .wing-divider::after {
        content: '';
        position: absolute;
        top: 80%;
        left: 0;
        width: 100%;
        height: 50px;
        background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%);
        transform: translateY(-50%);
        clip-path: polygon(0% 30%, 15% 80%, 70% 40%, 100% 30%, 100% 70%, 70% 20%, 15% 60%, 0% 70%);
        animation: waveShine 2s ease-in-out infinite;
      }

      @keyframes waveFlow {
        0% {
          transform: translateY(-50%);
          opacity: 0.8;
        }
        50% {
          transform: translateY(-50%);
          opacity: 1;
        }
        100% {
          transform: translateY(-50%);
          opacity: 0.8;
        }
      }

      @keyframes waveShine {
        0% {
          transform: translateY(-50%) scaleX(0.8);
          opacity: 0;
        }
        50% {
          transform: translateY(-50%) scaleX(1.2);
          opacity: 1;
        }
        100% {
          transform: translateY(-50%) scaleX(0.8);
          opacity: 0;
        }
      }

      @keyframes slideInFromLeft {
        0% {
          transform: translateX(-50px);
          opacity: 0;
        }
        100% {
          transform: translateX(0px);
          opacity: 1;
        }
      }

      .wing-divider img {
        display: block;
        margin-left: auto;
        animation: slideInFromLeft 2s ease-out;
      }

/* --- Notice Section --- */
.notice-section {
  background: #130b5a; /* 濃いブルー */
  /*background: var(--card-bg);*/
  border: 1px solid var(--card-border);
  padding: 30px;
  margin-bottom: 80px;
  border-radius: 2px;
}

.notice-section h2 {
  color: var(--accent-gold);
  font-family: var(--serif-font);
  font-size: 1.4rem;
  text-align: left;
  margin-bottom: 30px;
  letter-spacing: 0.2em;
  display: flex;
  align-items: center;
}

.notice-section h2::before {
  content: '✨';
  margin-right: 12px;
  font-size: 1.2rem;
  animation: twinkle 4s infinite;
  display: inline-block;
}

.notice-item {
  font-size: 0.95rem;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 10px;
  color: var(--text-gray);
}

.notice-item:last-child {
  border-bottom: none;
}

.notice-item strong {
  color: var(--accent-gold-light);
}

.notice-item a {
  color: var(--text-white);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* --- Course Grid --- */
h2 {
  font-family: var(--serif-font);
  font-size: 1.4rem;
  color: var(--text-white);
  margin-bottom: 50px;
  text-align: left;
  letter-spacing: 0.2em;
  position: relative;
  display: block;
}

h2::after {
  content: '';
  display: block;
  /*width: 40px;*/ /*バーの長さ*/
  height: 1px;
  background-color: var(--accent-gold);
  margin: 15px 0 0;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 100px;
}

.course-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 0;
  transition: all 0.4s ease;
  overflow: hidden;
  position: relative;
}

.course-item:hover {
  transform: translateY(-5px);
  border-color: var(--accent-gold);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.course-icon {
  font-size: 1.5rem;
  padding: 20px 20px 10px;
  color: var(--accent-gold);
  display: flex;
  justify-content: center;
  align-items: center;
}

.course-icon img {
  margin: 0 auto;
}

.course-title {
  font-family: var(--serif-font);
  font-size: 1.1rem;
  padding: 0 20px 15px;
  text-align: center;
  letter-spacing: 0.05em;
}

.course-title a {
  color: var(--text-white);
  text-decoration: none;
  transition: color 0.3s;
}

.course-item:hover .course-title a {
  color: var(--accent-gold-light);
}

.course-description {
  font-size: 0.85rem;
  padding: 0 25px 20px;
  color: var(--text-gray);
  line-height: 1.6;
}

.course-description p {
  margin: 15px 0 0;
}

.course-description img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Profile Section --- */
.profile-section {
  background: var(--secondary-bg);
  padding: 80px 100px;
  margin: 0 -80px 0 -80px; /* 上マージンを0に */
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

.profile-section h2 {
  color: var(--accent-gold);
  margin-bottom: 40px;
}

.profile-image {
  width: 50%;
  height: auto;
  margin-bottom: 30px;
  border: 1px solid var(--card-border);
  padding: 10px;
  display: block;
}

.profile-name {
  font-family: var(--serif-font);
  font-size: 1.4rem;
  color: var(--text-white);
  margin-bottom: 30px;
  letter-spacing: 0.1em;
}

.profile-text {
  font-size: 0.8rem;
  color: var(--text-gray);
  margin-bottom: 20px;
  max-width: 800px;
}

.profile-text a {
  color: var(--accent-gold-light);
  text-decoration: none;
  border-bottom: 1px solid rgba(197, 160, 89, 0.3);
}

/* --- Features Section --- */
.features-section {
  padding: 40px 80px;
  background: #f4f6f8; /* 淡いブルー */
  color: #333333;
  margin: 60px -80px 0 -80px; /* 下マージンを0に */
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

.features-section h2 {
  color: var(--secondary-bg);
  margin-bottom: 30px;
}

.features-section h2::after {
  background-color: var(--accent-gold);
}

.feature-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px; /* 行間を若干詰める */
  max-width: 800px;
  margin: 0 auto;
}

.feature-list li {
  padding: 4px 0; /* 行間を若干詰める */
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.95rem;
  color: #1b0c54;
  display: flex;
  align-items: center;
}

.feature-list li:last-child {
  border-bottom: none;
}

.feature-list li::before {
  content: "✧";
  color: var(--accent-gold);
  margin-right: 20px;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* --- Mobile Menu --- */
.hamburger-btn {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 1000;
  background: rgba(3, 23, 66, 0.4);
  border: none;
  color: var(--accent-gold);
  padding: 4px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: 6px;
  backdrop-filter: blur(8px);
  transition: all 0.3s;
}

.hamburger-icon {
  font-size: 1.6rem;
  margin-bottom: 0;
}

.hamburger-label {
  font-size: 0.6rem;
  font-family: var(--serif-font);
  letter-spacing: 0.05em;
  font-weight: 600;
}

.hamburger-btn:hover {
  background: var(--accent-gold);
  color: var(--primary-bg);
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100vh;
  background: rgba(3, 10, 22, 0.98);
  z-index: 999;
  padding: 100px 40px;
  transition: right 0.5s ease;
  border-left: 1px solid var(--card-border);
}

.mobile-menu.show {
  right: 0;
}

.mobile-nav-links {
  list-style: none;
  padding: 0;
}

.mobile-nav-links li {
  margin-bottom: 30px;
}

.mobile-nav-links .nav-link {
  color: var(--text-white);
  text-decoration: none;
  font-family: var(--serif-font);
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  transition: color 0.3s;
}

.mobile-nav-links .nav-link:hover {
  color: var(--accent-gold);
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 80px 0 60px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.social-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 50px;
  padding: 0 40px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  color: var(--accent-gold);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 15px 10px;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
  border-radius: 4px;
}

.social-link:hover {
  background: var(--accent-gold);
  color: var(--primary-bg);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.social-icon {
  margin-right: 12px;
  font-size: 1.1rem;
}

.footer-text {
  font-size: 0.8rem;
  color: var(--text-gray);
  margin-bottom: 50px;
}

/* --- Sparkle & Animations --- */
@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.2); }
}

.title-animated {
  font-family: 'Kaisei Tokumin', serif;
  font-weight: 200;
  display: inline-block; /* transformを有効にするため */
  background: linear-gradient(90deg, #fff, #c5a059, #fff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: 
    shine 5s linear infinite,
    fadeDropDown 3.5s ease-out forwards;
}

@keyframes shine {
  to { background-position: 200% center; }
}

@keyframes fadeDropDown {
  0% {
    opacity: 0;
    transform: translateY(-80px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .container {
    padding: 20px 20px 60px 20px;
    width: 100%;
    overflow-x: hidden;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .profile-section {
    padding: 60px 20px;
    margin-left: -20px;
    margin-right: -20px;
    width: auto;
  }

  .features-section {
    padding: 40px 20px;
    margin-left: -20px;
    margin-right: -20px;
    width: auto;
  }

  .subtitle {
    font-size: 1rem;
    letter-spacing: 0.15em;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 20px 15px 40px 15px;
    width: 100%;
    overflow-x: hidden;
  }

  h1 {
    font-size: 1.6rem;
    letter-spacing: 0.2em;
  }

  .subtitle {
    font-size: 0.85rem;
    letter-spacing: 0.1em;
  }

  .course-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .profile-section {
    padding: 40px 15px;
    margin-left: -15px;
    margin-right: -15px;
    width: auto;
  }

  .features-section {
    padding: 30px 15px;
    margin-left: -15px;
    margin-right: -15px;
    width: auto;
  }

  .social-links {
    padding: 0;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .profile-image {
    width: 100% !important;
    padding: 5px;
  }
}

