/**
 * 招待状ページ専用スタイル
 * 一般社団法人日本語学校経営者協会
 * 
 * 和モダン・上品なデザイン
 * カラーパレット：紺色 #0B1C2C / えんじ #7A2E2E / 金色 #C9A74A
 */

/* ========================================
   グローバル設定
   ======================================== */

body[data-page="bounenkai"] {
  /* 金箔風テクスチャ背景 */
  background: 
    /* うっすら金箔が透ける半透明レイヤー */
    linear-gradient(
      135deg,
      rgba(255, 253, 248, 0.85) 0%,
      rgba(255, 250, 240, 0.9) 50%,
      rgba(255, 253, 248, 0.85) 100%
    ),
    /* 金箔風のムラ表現（ノイズ風グラデーション） */
    repeating-linear-gradient(
      45deg,
      #C9A74A 0px,
      #D4B878 2px,
      #C9A74A 4px,
      #B8965A 6px,
      #C9A74A 8px
    ),
    /* ベース色 */
    #E8D7B8;
  background-attachment: fixed;
}

/* ========================================
   ヒーローセクション
   ======================================== */

.bounenkai-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    to bottom,
    #0B1C2C 0%,
    #1A2540 100%
  );
  color: white;
  padding: var(--space-7) var(--space-4);
  overflow: hidden;
}

/* 装飾的なパターン（疑似要素で追加） */
.bounenkai-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(
      circle at 20% 30%,
      rgba(201, 167, 74, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(122, 46, 46, 0.06) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.bounenkai-hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
}

.bounenkai-hero__title {
  /* 明朝体風の雰囲気を出す */
  font-family: "Noto Serif JP", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "HG Mincho E", "MS PMincho", serif;
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  color: white;
  margin-bottom: var(--space-4);
  line-height: 1.5;
  letter-spacing: 0.05em;
  text-shadow: 
    0 2px 12px rgba(0, 0, 0, 0.4),
    0 4px 24px rgba(201, 167, 74, 0.2);
}

.bounenkai-hero__subtitle {
  font-size: clamp(16px, 2.5vw, 22px);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-6);
  letter-spacing: 0.08em;
}

/* ========================================
   言語切り替えボタン
   ======================================== */

.lang-switcher {
  display: inline-flex;
  gap: var(--space-2);
  background: rgba(255, 255, 255, 0.1);
  padding: var(--space-1);
  border-radius: var(--radius-m);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-switcher__btn {
  padding: var(--space-2) var(--space-4);
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--font-size-0);
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-s);
  transition: all var(--dur-2) var(--easing);
  font-family: var(--font-sans);
}

.lang-switcher__btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.lang-switcher__btn.active {
  background: #C9A74A;
  color: #0B1C2C;
  font-weight: 700;
}

.lang-switcher__btn:focus-visible {
  outline: 2px solid #C9A74A;
  outline-offset: 2px;
}

/* ========================================
   招待状画像セクション
   ======================================== */

.invitation-section {
  position: relative;
  background: transparent;
}

.invitation-card-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

.invitation-card {
  max-width: 800px;
  width: 100%;
  background: white;
  border-radius: var(--radius-l);
  padding: var(--space-5);
  box-shadow: 
    0 10px 40px rgba(11, 28, 44, 0.15),
    0 4px 12px rgba(11, 28, 44, 0.1);
  cursor: pointer;
  transition: transform var(--dur-2) var(--easing), box-shadow var(--dur-2) var(--easing);
  /* 左右にゆっくり揺れるアニメーション */
  animation: gentle-sway 10s ease-in-out infinite;
}

.invitation-card:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 20px 60px rgba(11, 28, 44, 0.2),
    0 8px 20px rgba(11, 28, 44, 0.15);
}

@keyframes gentle-sway {
  0%, 100% {
    transform: translateX(-6px);
  }
  50% {
    transform: translateX(6px);
  }
}

.invitation-card__image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-s);
}

/* ========================================
   重要情報セクション（和紙の繊維演出付き）
   ======================================== */

.info-section {
  position: relative;
  background: white;
  padding: var(--space-7) 0;
  overflow: hidden;
}

/* 和紙テクスチャ背景（スクロールで浮かび上がる演出） */
.info-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* 和紙の繊維を表現するテクスチャ（CSSで疑似表現） */
  /* 実際の画像を使う場合はこちらに差し替え: background-image: url('/img/washi-texture.png'); */
  background: 
    repeating-linear-gradient(
      0deg,
      transparent 0px,
      rgba(201, 167, 74, 0.03) 1px,
      transparent 2px,
      transparent 4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      rgba(201, 167, 74, 0.02) 1px,
      transparent 2px,
      transparent 5px
    ),
    repeating-linear-gradient(
      45deg,
      transparent 0px,
      rgba(122, 46, 46, 0.015) 1px,
      transparent 3px,
      transparent 6px
    );
  opacity: 0;
  filter: blur(0.5px);
  transition: opacity 1.2s ease-out, filter 1.2s ease-out;
  pointer-events: none;
  z-index: 0;
}

/* IntersectionObserverでこのクラスが付与される */
.info-section.is-visible::before {
  opacity: 0.4;
  filter: blur(0px);
}

.info-section .container {
  position: relative;
  z-index: 1;
}

.info-section__title {
  font-family: "Noto Serif JP", "Yu Mincho", serif;
  font-size: var(--font-size-5);
  font-weight: 700;
  color: #0B1C2C;
  text-align: center;
  margin-bottom: var(--space-6);
  letter-spacing: 0.08em;
}

/* ========================================
   情報グリッド
   ======================================== */

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-5);
  max-width: 1000px;
  margin: 0 auto var(--space-6);
}

.info-item {
  background: white;
  border: 2px solid #E8D7B8;
  border-radius: var(--radius-m);
  padding: var(--space-4);
  box-shadow: var(--shadow-1);
  transition: transform var(--dur-2) var(--easing), box-shadow var(--dur-2) var(--easing);
}

.info-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
}

.info-item--full {
  grid-column: 1 / -1;
}

.info-item__label {
  font-family: "Noto Serif JP", "Yu Mincho", serif;
  font-size: var(--font-size-2);
  font-weight: 700;
  color: #7A2E2E;
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid #C9A74A;
  letter-spacing: 0.05em;
}

.info-item__content {
  font-size: var(--font-size-1);
  line-height: 1.8;
  color: var(--fg);
}

/* ========================================
   CTAセクション
   ======================================== */

.cta-section {
  text-align: center;
  margin-top: var(--space-6);
}

.btn-cta {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-4) var(--space-6);
  background: linear-gradient(135deg, #C9A74A 0%, #D4B878 100%);
  color: #0B1C2C;
  border: none;
  border-radius: var(--radius-m);
  box-shadow: 
    0 8px 24px rgba(201, 167, 74, 0.3),
    0 4px 8px rgba(11, 28, 44, 0.1);
  transition: all var(--dur-2) var(--easing);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  font-family: var(--font-sans);
}

.btn-cta__main {
  font-size: var(--font-size-2);
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

.btn-cta__sub {
  font-size: var(--font-size-0);
  font-weight: 500;
  opacity: 0.85;
  letter-spacing: 0.02em;
}

.btn-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 100%
  );
  transition: left 0.6s ease;
  z-index: 0;
}

.btn-cta__main,
.btn-cta__sub {
  position: relative;
  z-index: 1;
}

.btn-cta:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 12px 32px rgba(201, 167, 74, 0.4),
    0 6px 12px rgba(11, 28, 44, 0.15);
  background: linear-gradient(135deg, #D4B878 0%, #E0C896 100%);
}

.btn-cta:hover::before {
  left: 100%;
}

.btn-cta:active {
  transform: translateY(-2px);
}

.btn-cta:focus-visible {
  outline: 3px solid #C9A74A;
  outline-offset: 4px;
}

/* コピー成功メッセージ */
.copy-success-message {
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-4);
  background: #2E9E6F;
  color: white;
  border-radius: var(--radius-s);
  font-size: var(--font-size-1);
  font-weight: 600;
  opacity: 0;
  transform: translateY(-10px);
  transition: all var(--dur-2) var(--easing);
  pointer-events: none;
  display: inline-block;
}

.copy-success-message.show {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   ライトボックス（画像拡大表示）
   ======================================== */

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.is-open {
  display: flex;
}

.lightbox__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 28, 44, 0.95);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.lightbox__content {
  position: relative;
  z-index: 1;
  max-width: 95%;
  max-height: 95%;
  animation: lightbox-zoom-in 0.3s ease-out;
}

@keyframes lightbox-zoom-in {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lightbox__image {
  max-width: 100%;
  max-height: 90vh;
  height: auto;
  border-radius: var(--radius-m);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox__close {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid white;
  border-radius: 50%;
  color: white;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: all var(--dur-2) var(--easing);
  backdrop-filter: blur(4px);
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.lightbox__close:focus-visible {
  outline: 2px solid white;
  outline-offset: 4px;
}

/* ========================================
   レスポンシブ対応
   ======================================== */

@media (max-width: 768px) {
  .bounenkai-hero {
    min-height: 40vh;
    padding: var(--space-6) var(--space-3);
  }

  .bounenkai-hero__title {
    font-size: clamp(22px, 6vw, 32px);
    margin-bottom: var(--space-3);
  }

  .bounenkai-hero__subtitle {
    font-size: clamp(14px, 3.5vw, 18px);
    margin-bottom: var(--space-5);
  }

  .lang-switcher {
    flex-wrap: wrap;
  }

  .lang-switcher__btn {
    padding: var(--space-1) var(--space-3);
    font-size: var(--font-size-00);
  }

  .invitation-card {
    padding: var(--space-3);
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .info-section__title {
    font-size: var(--font-size-4);
  }

  .btn-cta {
    padding: var(--space-3) var(--space-5);
    width: 100%;
    max-width: 400px;
  }

  .btn-cta__main {
    font-size: var(--font-size-1);
  }

  .btn-cta__sub {
    font-size: var(--font-size-00);
  }

  .lightbox__close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .info-item__label {
    font-size: var(--font-size-1);
  }

  .info-item__content {
    font-size: var(--font-size-0);
  }
}

/* ========================================
   アクセシビリティ
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  .invitation-card {
    animation: none;
  }

  .lightbox__content {
    animation: none;
  }

  .info-section::before {
    transition: none;
  }
}

