/* ============================================
   TOPページ専用スタイル
   ============================================ */

/* ── reveal アニメーション ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.revealed {
  opacity: 1;
  transform: none;
}
.greeting-sign__name--fluid {
  font-size: clamp(18px, 5.5vw, 24px);
}

/* ── ファーストビュー ── */
.fv {
  position: relative;
  overflow: hidden;
  background: var(--color-primary-light);
}
.fv__img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* ── TOPセクションの冒頭プレビュー ── */
.top-section {
  padding: var(--sp-5) 0;
}
.top-section + .top-section {
  border-top: none;
}

/* ヘッダー固定時のアンカースクロール位置調整 */
#news,
#greeting,
#profile {
  scroll-margin-top: 90px;
}

/* ── 波形区切り 共通（下部） ── */
.greeting-section::after,
.profile-section::after,
.sns-section::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 1;
}

/* ごあいさつ（クリーム）→ プロフィール（ライトブルー #e9f3ff） */
.greeting-section::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0,46 C80,46 140,10 260,10 C380,10 460,66 620,66 C760,66 860,18 980,18 C1100,18 1200,62 1320,62 C1380,62 1420,56 1440,54 L1440,100 L0,100 Z' fill='%23e9f3ff'/%3E%3C/svg%3E");
}

/* プロフィール（ライトブルー #e9f3ff）→ リーフレット（ミント #edf8ee） */
.profile-section::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0,46 C80,46 140,10 260,10 C380,10 460,66 620,66 C760,66 860,18 980,18 C1100,18 1200,62 1320,62 C1380,62 1420,56 1440,54 L1440,100 L0,100 Z' fill='%23edf8ee'/%3E%3C/svg%3E");
}

/* SNS（#fff1dc）→ フッター（#20A737）: フッター緑波形 */
.sns-section::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0,46 C80,46 140,10 260,10 C380,10 460,66 620,66 C760,66 860,18 980,18 C1100,18 1200,62 1320,62 C1380,62 1420,56 1440,54 L1440,100 L0,100 Z' fill='%2320A737'/%3E%3C/svg%3E");
}

/* お知らせ */
.notices-section { background: var(--color-white); }
.notices-section .news-item {
  --notice-accent: var(--color-border);
  position: relative;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  grid-template-areas:
    "date title"
    "platform title";
  column-gap: var(--sp-2);
  row-gap: 4px;
  align-items: start;
  padding-left: 14px;
}
.notices-section .news-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 5px;
  border-radius: 999px;
  background: var(--notice-accent);
}
.notices-section .news-item--instagram {
  --notice-accent: #c267b7;
}
.notices-section .news-item--line {
  --notice-accent: #22b94a;
}
.notices-section .news-item--facebook {
  --notice-accent: #1877f2;
}
.notices-section .news-item__title a {
  display: inline-block;
}
.notices-section .news-item__headline {
  display: block;
}
.notices-section .news-item__excerpt {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text-muted);
}
.notices-section .news-item__date {
  grid-area: date;
  padding-top: 0;
}
.notices-section .news-item__title {
  grid-area: title;
  min-width: 0;
}
.notices-section .news-item__platform {
  grid-area: platform;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.notices-section .news-item__platform--meta {
  margin-top: 2px;
}
.notices-section .news-item__platform img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ニュース（リーフレット） */
.news-section {
  background: #edf8ee;
  position: relative;
}
.leaflet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.leaflet-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-align: center;
  text-decoration: none;
  color: var(--color-text);
  transition: box-shadow var(--transition), transform var(--transition);
}
.leaflet-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--color-text);
}
.leaflet-card__thumb {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  background: var(--color-bg);
}
.leaflet-card__label {
  padding: var(--sp-1) var(--sp-2);
  font-size: var(--font-size-sm);
  font-weight: 500;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.leaflet-card__label::before {
  content: "📄";
  font-size: 14px;
}

/* ごあいさつプレビュー */
.greeting-section {
  background: #fff8eb;
  position: relative;
  padding-bottom: calc(var(--sp-5) + 100px);
}
.greeting-section .container {
  position: relative;
  z-index: 2;
}
.greeting-section .greeting-page {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 220px 176px;
}
.greeting-section .greeting-illus {
  position: absolute;
  inset: 0;
  margin: 0;
  pointer-events: none;
  z-index: 3;
}
.greeting-section .greeting-illus__img {
  position: absolute;
  display: block;
  height: auto;
}
.greeting-section .greeting-illus__img--top {
  width: 120px;
  top: 18px;
  right: 40px;
}
.greeting-section .greeting-illus__img--left {
  width: 160px;
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
}
.greeting-section .greeting-illus__img--bottom {
  width: 248px;
  right: 2px;
  bottom: -2px;
}
.greeting-section .greeting-lead,
.greeting-section .prose {
  text-align: center;
}
.greeting-preview {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.greeting-preview__text {
  font-size: var(--font-size-md);
  line-height: 1.9;
  color: var(--color-text);
}
.greeting-preview__text p + p { margin-top: var(--sp-2); }
.greeting-balloon {
  text-align: center;
  margin-bottom: var(--sp-2);
}
.greeting-balloon img {
  max-width: 280px;
  margin: 0 auto;
}

/* ごあいさつ強調ワード（緑 + 波打ち） */
.greeting-wave {
  color: var(--color-primary);
  font-weight: 700;
  display: inline-flex;
  gap: 0.02em;
  vertical-align: baseline;
}
.greeting-wave--future {
  color: var(--color-primary);
}
.greeting-pc-break {
  display: none;
}
.greeting-wave__char {
  display: inline-block;
  will-change: transform;
  animation: greeting-wave-text 2.4s linear infinite;
}
.greeting-wave__char:nth-child(9n + 1) { animation-delay: -0.96s; }
.greeting-wave__char:nth-child(9n + 2) { animation-delay: -0.84s; }
.greeting-wave__char:nth-child(9n + 3) { animation-delay: -0.72s; }
.greeting-wave__char:nth-child(9n + 4) { animation-delay: -0.60s; }
.greeting-wave__char:nth-child(9n + 5) { animation-delay: -0.48s; }
.greeting-wave__char:nth-child(9n + 6) { animation-delay: -0.36s; }
.greeting-wave__char:nth-child(9n + 7) { animation-delay: -0.24s; }
.greeting-wave__char:nth-child(9n + 8) { animation-delay: -0.12s; }
.greeting-wave__char:nth-child(9n + 9) { animation-delay: 0s; }

@keyframes greeting-wave-text {
  0%   { transform: translateY(0); }
  12.5% { transform: translateY(-0.052em); }
  25%  { transform: translateY(-0.104em); }
  37.5% { transform: translateY(-0.052em); }
  50%  { transform: translateY(0); }
  62.5% { transform: translateY(0.052em); }
  75%  { transform: translateY(0.104em); }
  87.5% { transform: translateY(0.052em); }
  100% { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .greeting-wave__char {
    animation: none;
    transform: none;
  }
}

/* プロフィールプレビュー */
.profile-section {
  background: #e9f3ff;
  position: relative;
  padding-top: var(--sp-5);
  padding-bottom: calc(var(--sp-4) + 100px);
}
.profile-preview {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.profile-section .profile-header {
  padding: var(--sp-3);
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.profile-section .profile-header__name {
  font-size: var(--font-size-xl);
  letter-spacing: 0.04em;
}
.profile-section .profile-header__name-kana {
  font-size: 12px;
}
.profile-detail-grid {
  display: grid;
  gap: var(--sp-3);
}
.profile-detail-block {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: var(--sp-2) var(--sp-3);
  box-shadow: var(--shadow-sm);
}
.profile-section .profile-section-title {
  margin: 0 0 var(--sp-1);
  font-size: var(--font-size-md);
  padding: 6px var(--sp-2);
}
.profile-section .profile-table th,
.profile-section .profile-table td {
  padding: 6px 10px;
}
.profile-section .profile-table th {
  width: 92px;
}
.timeline--compact {
  padding-left: var(--sp-3);
}
.timeline--compact::before {
  left: 8px;
}
.timeline--compact .timeline-item {
  margin-bottom: var(--sp-2);
}
.timeline--compact .timeline-item:last-child {
  margin-bottom: 0;
}
.timeline--compact .timeline-item::before {
  left: calc(-1 * var(--sp-3) + 4px);
  width: 8px;
  height: 8px;
  border-width: 1px;
  box-shadow: 0 0 0 1px var(--color-primary);
}
.timeline--compact .timeline-item__date {
  font-size: 12px;
  margin-bottom: 0;
}
.timeline--compact .timeline-item__text {
  font-size: var(--font-size-sm);
  line-height: 1.45;
}
.profile-deco {
  display: flex;
  gap: var(--sp-2);
  justify-content: flex-end;
  flex-wrap: wrap;
}
.profile-deco img {
  height: 80px;
  width: auto;
}

/* SNSセクション */
.sns-section {
  background: #fff1dc;
  padding: var(--sp-5) 0 calc(var(--sp-5) + 100px);
  text-align: center;
  position: relative;
}
.sns-section__lead {
  font-size: var(--font-size-md);
  margin-bottom: var(--sp-3);
  font-weight: 500;
}

/* SP: 波形を半分の高さに調整 */
@media (max-width: 767px) {
  .notices-section .news-item {
    grid-template-columns: 72px minmax(0, 1fr);
    column-gap: 6px;
    padding-left: 10px;
  }

  .greeting-section::after,
  .profile-section::after,
  .sns-section::after {
    height: 50px;
  }
  .greeting-section {
    padding-bottom: calc(var(--sp-5) + 20px);
  }
  .greeting-section .greeting-page {
    max-width: none;
    margin: 0;
    padding: 0 0 96px;
  }
  .greeting-section .greeting-illus {
    inset: auto;
    right: 8px;
    bottom: -66px;
  }
  .greeting-section .greeting-illus__img--top,
  .greeting-section .greeting-illus__img--left {
    display: none !important;
  }
  .greeting-section .greeting-illus__img--bottom {
    display: block !important;
    position: static;
    width: min(46vw, 180px);
    right: auto;
    bottom: auto;
    transform: none;
  }
  .greeting-section .greeting-lead,
  .greeting-section .prose {
    text-align: center;
  }
  .profile-section {
    padding-bottom: calc(var(--sp-4) + 50px);
  }
  .sns-section {
    padding: var(--sp-5) 0 calc(var(--sp-5) + 50px);
  }
}

/* PC */
@media (min-width: 768px) {
  .greeting-pc-break {
    display: inline;
  }
  .notices-section .news-list {
    width: min(100%, 480px);
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
  .notices-section .news-item {
    cursor: pointer;
  }
  .notices-section .news-item:hover .news-item__title a,
  .notices-section .news-item:focus-within .news-item__title a {
    color: var(--color-primary);
  }

  /* PC: 参照デザインに合わせた統一波形 */
  .greeting-section::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1920 100' preserveAspectRatio='none'%3E%3Cpath d='M0,16 C100,54 210,88 320,88 C440,88 530,48 640,48 C760,48 850,86 960,86 C1080,86 1170,44 1280,44 C1400,44 1490,76 1600,76 C1710,76 1830,54 1920,56 L1920,100 L0,100 Z' fill='%23e9f3ff'/%3E%3C/svg%3E");
  }
  .profile-section::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1920 100' preserveAspectRatio='none'%3E%3Cpath d='M0,16 C100,54 210,88 320,88 C440,88 530,48 640,48 C760,48 850,86 960,86 C1080,86 1170,44 1280,44 C1400,44 1490,76 1600,76 C1710,76 1830,54 1920,56 L1920,100 L0,100 Z' fill='%23edf8ee'/%3E%3C/svg%3E");
  }
  .sns-section::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1920 100' preserveAspectRatio='none'%3E%3Cpath d='M0,16 C100,54 210,88 320,88 C440,88 530,48 640,48 C760,48 850,86 960,86 C1080,86 1170,44 1280,44 C1400,44 1490,76 1600,76 C1710,76 1830,54 1920,56 L1920,100 L0,100 Z' fill='%2320A737'/%3E%3C/svg%3E");
  }

  .greeting-preview {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--sp-5);
  }
  .greeting-preview__text { flex: 1; }
  .greeting-balloon { flex: 0 0 200px; }

  .profile-preview {
    flex-direction: row-reverse;
    align-items: flex-start;
    gap: var(--sp-5);
  }
  .profile-deco {
    flex: 0 0 200px;
    justify-content: center;
  }
  .profile-section .profile-header {
    padding: var(--sp-3) var(--sp-4);
    margin-bottom: var(--sp-4);
  }
  .profile-section .profile-header__name {
    font-size: var(--font-size-2xl);
  }
  .profile-detail-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: var(--sp-3);
    align-items: start;
  }
  .profile-section .profile-table th {
    width: 104px;
  }
}

