/*
 * Motitown Story — トップページのブランドストーリー部
 *
 * ヒーロー（hub.css）の下に続く「モチタウンとは何か」を語るセクション群。
 * デザイントークンは hub.css の --hub-* を継承。
 * SPファースト、PC は @media (min-width: 734px)。
 */

/* ============================================
   共通レイアウト
   ============================================ */
.st {
  position: relative;
  padding: 64px var(--hub-space-page-x);
  background: var(--hub-color-cream);
}

.st__inner {
  max-width: 980px;
  margin-inline: auto;
}

.st__eyebrow {
  font-family: var(--hub-font-script);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--hub-color-blue);
  transform: rotate(-2deg);
  display: inline-block;
}

.st__title {
  margin-top: 10px;
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: 0.03em;
  color: var(--hub-color-deep);
}

.st__lead {
  margin-top: 16px;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 2;
  color: var(--hub-color-text-sub);
}

.st__lead strong {
  color: var(--hub-color-deep);
}

/* ヒーロー下端の「つづきがある」合図 */
.hub__scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 28px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--hub-color-white);
  text-shadow: 0 1px 6px rgba(15, 40, 64, 0.6);
}

.hub__scroll-cue::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg);
  animation: st-cue-bob 1.6s ease-in-out infinite;
}

@keyframes st-cue-bob {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 1; }
  50%      { transform: rotate(45deg) translate(4px, 4px); opacity: 0.55; }
}

/* ============================================
   stats — 数字で見るモチタウン（ヒーロー直下の帯）
   街の写真の上に「シート」がせり上がるように重ねる
   ============================================ */
.st-stats {
  margin-top: -28px;
  border-radius: 28px 28px 0 0;
  padding-top: 40px;
  padding-bottom: 36px;
  box-shadow: 0 -12px 32px rgba(15, 40, 64, 0.18);
}

.st-stats__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 12px;
  text-align: center;
}

.st-stat__value {
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1.1;
  color: var(--hub-color-deep-blue);
  letter-spacing: 0.01em;
}

.st-stat__value small {
  font-size: 0.95rem;
  font-weight: 900;
}

.st-stat__label {
  margin-top: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--hub-color-text-sub);
}

.st-stats__note {
  margin-top: 18px;
  text-align: center;
  font-size: 0.66rem;
  color: rgba(59, 90, 110, 0.75);
}

/* ============================================
   manifest — 宣言（完結する街）
   ============================================ */
.st-manifest {
  background: var(--hub-color-white);
  text-align: center;
}

.st-manifest .st__lead {
  text-align: left;
  max-width: 640px;
  margin-inline: auto;
}

/* ============================================
   connect — 「覚える」と「話す」がつながる図
   ============================================ */
.st-connect {
  background: var(--hub-color-cream);
}

.st-connect__diagram {
  margin-top: 32px;
  padding: 24px 18px;
  background: var(--hub-color-white);
  border-radius: var(--hub-radius-card);
  box-shadow: var(--hub-shadow-card);
}

.st-connect__row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.st-connect__app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.st-connect__app img {
  width: 72px;
  height: 72px;
  border-radius: 22.5%;
  box-shadow: 0 4px 12px rgba(15, 40, 64, 0.18);
}

.st-connect__app span {
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--hub-color-deep);
}

.st-connect__app small {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--hub-color-text-sub);
  margin-top: -6px;
}

.st-connect__arrows {
  flex: 1 1 auto;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.st-connect__arrow {
  position: relative;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--hub-color-deep-blue);
  text-align: center;
  padding-bottom: 12px;
}

.st-connect__arrow::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--hub-color-orange), var(--hub-color-blue));
}

.st-connect__arrow--back::after {
  background: linear-gradient(90deg, var(--hub-color-blue), var(--hub-color-orange));
}

/* 矢印の先端 */
.st-connect__arrow::before {
  content: "";
  position: absolute;
  bottom: -1.5px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-top: 3px solid var(--hub-color-blue);
  border-right: 3px solid var(--hub-color-blue);
  border-radius: 2px;
  transform: rotate(45deg);
}

.st-connect__arrow--back::before {
  right: auto;
  left: -2px;
  border-color: var(--hub-color-orange);
  transform: rotate(-135deg);
}

.st-connect__common {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.st-connect__common-label {
  width: 100%;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 900;
  color: var(--hub-color-deep);
  margin-bottom: 2px;
}

.st-chip {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(46, 134, 176, 0.1);
  border: 1.5px solid rgba(46, 134, 176, 0.25);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--hub-color-deep-blue);
}

/* ============================================
   memory — あなたを覚える街（夜のダークセクション）
   ============================================ */
.st-memory {
  background:
    radial-gradient(90% 55% at 50% 0%, rgba(46, 134, 176, 0.35) 0%, transparent 70%),
    linear-gradient(180deg, #12283E 0%, var(--hub-color-deep) 100%);
  color: var(--hub-color-white);
}

.st-memory .st__eyebrow {
  color: #7FC8EA;
}

.st-memory .st__title {
  color: var(--hub-color-white);
}

.st-memory .st__lead {
  color: rgba(255, 255, 255, 0.82);
}

.st-memory__grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.st-mem-card {
  padding: 20px 20px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(127, 200, 234, 0.25);
  backdrop-filter: blur(2px);
}

.st-mem-card__tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(127, 200, 234, 0.16);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #7FC8EA;
}

.st-mem-card__title {
  margin-top: 10px;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.st-mem-card__text {
  margin-top: 8px;
  font-size: 0.83rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.78);
}

.st-memory__closing {
  margin-top: 30px;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.9;
}

.st-memory__closing em {
  font-style: normal;
  color: #FFD98E;
}

.st-memory__bear {
  display: block;
  width: 120px;
  margin: 26px auto 0;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35));
}

/* ============================================
   depth — 辞書を凌駕する網羅性
   ============================================ */
.st-depth {
  background: var(--hub-color-white);
}

.st-depth__cols {
  margin-top: 8px;
}

.st-depth__num {
  margin-top: 20px;
  line-height: 1;
}

.st-depth__num-value {
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--hub-color-deep-blue);
  letter-spacing: 0.01em;
}

.st-depth__num-unit {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--hub-color-deep-blue);
}

.st-depth__num-label {
  display: block;
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--hub-color-text-sub);
}

.st-depth__chips {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.st-depth__chips .st-chip {
  background: rgba(242, 184, 75, 0.14);
  border-color: rgba(242, 184, 75, 0.45);
  color: #8A5A00;
}

.st-depth__visual {
  margin-top: 28px;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--hub-shadow-card);
  max-height: 420px;
  background: #fff;
}

.st-depth__visual img {
  width: 100%;
}

.st-depth__visual::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 120px;
  background: linear-gradient(0deg, #fff 8%, transparent);
}

.st-depth__link {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 1;
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--hub-color-amber);
  color: #4A3000;
  font-size: 0.82rem;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(242, 184, 75, 0.5);
  transition: transform 0.2s ease;
}

@media (hover: hover) {
  .st-depth__link:hover { transform: translateX(-50%) translateY(-2px); }
}

/* ============================================
   langs — 6ヶ国語・60コース
   ============================================ */
.st-langs {
  background: var(--hub-color-cream);
}

.st-langs__grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.st-lang-card {
  position: relative;
  padding: 16px 14px 14px;
  border-radius: 18px;
  background: var(--hub-color-white);
  box-shadow: 0 6px 18px rgba(15, 40, 64, 0.1);
  overflow: hidden;
}

.st-lang-card__bear {
  position: absolute;
  right: 6px;
  top: 8px;
  width: 44px;
  height: 44px;
  object-fit: contain;
  transform: rotate(6deg);
}

.st-lang-card__name {
  font-size: 1.02rem;
  font-weight: 900;
  color: var(--hub-color-deep);
}

.st-lang-card__native {
  display: block;
  font-family: var(--hub-font-script);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--hub-color-blue);
  line-height: 1.2;
}

.st-lang-card__exams {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.st-lang-card__exams span {
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(46, 134, 176, 0.09);
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--hub-color-deep-blue);
  white-space: nowrap;
}

.st-langs__common {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1.5px dashed rgba(0, 63, 92, 0.28);
  background: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.9;
  color: var(--hub-color-text-sub);
  text-align: center;
}

.st-langs__common strong {
  color: var(--hub-color-deep);
}

/* ============================================
   explore — さあ、街をあるいてみよう（ハブ再掲）
   ============================================ */
.st-explore {
  background:
    linear-gradient(0deg, rgba(15, 40, 64, 0.55) 0%, rgba(15, 40, 64, 0.2) 55%, rgba(255, 249, 238, 0.9) 100%),
    url("../assets/images/hub-bg.webp") center 70% / cover no-repeat;
  padding-bottom: 80px;
}

.st-explore .st__eyebrow {
  color: var(--hub-color-deep-blue);
  text-shadow: var(--hub-halo-light);
}

.st-explore .st__title {
  text-shadow: var(--hub-halo-light);
}

.st-explore__apps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
  max-width: 420px;
  margin: 28px auto 0;
}

/* ============================================
   footer（クリーム背景の上に置く最終フッター）
   ============================================ */
.st-footer {
  background: var(--hub-color-deep);
  color: rgba(255, 255, 255, 0.85);
  padding: 26px var(--hub-space-page-x) 30px;
  text-align: center;
}

.st-footer__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.st-footer__links a {
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.st-footer__copyright {
  margin-top: 10px;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   PC（≥734px）
   ============================================ */
@media (min-width: 734px) {
  .st {
    padding: 88px 40px;
  }

  .st__eyebrow { font-size: 1.9rem; }
  .st__title   { font-size: 2.3rem; }
  .st__lead    { font-size: 1.05rem; }

  .st-stats {
    margin-top: -32px;
    padding-top: 48px;
    padding-bottom: 44px;
  }

  .st-stats__grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
  }

  .st-stat__value { font-size: 2.2rem; }
  .st-stat__value small { font-size: 1.2rem; }
  .st-stat__label { font-size: 0.82rem; }

  .st-connect__diagram {
    padding: 40px 48px;
  }

  .st-connect__app img { width: 104px; height: 104px; }
  .st-connect__app span { font-size: 1.05rem; }
  .st-connect__app small { font-size: 0.78rem; }
  .st-connect__arrows { max-width: 460px; gap: 18px; }
  .st-connect__arrow { font-size: 0.88rem; }

  .st-memory__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-top: 36px;
  }

  .st-memory__closing { font-size: 1.35rem; margin-top: 40px; }
  .st-memory__bear { width: 150px; }

  /* depth: PC は左テキスト・右ビジュアルの2カラム */
  .st-depth__cols {
    display: flex;
    align-items: flex-start;
    gap: 48px;
  }

  .st-depth__copy { flex: 1 1 52%; }
  .st-depth__visual {
    flex: 1 1 48%;
    margin-top: 0;
    max-height: 520px;
  }

  .st-depth__num-value { font-size: 3.4rem; }

  .st-langs__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .st-lang-card { padding: 20px 18px 16px; }
  .st-lang-card__bear { width: 54px; height: 54px; }
  .st-lang-card__name { font-size: 1.15rem; }
  .st-lang-card__exams span { font-size: 0.72rem; }
  .st-langs__common { max-width: 720px; margin-inline: auto; margin-top: 24px; }

  .st-explore__apps {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 880px;
    margin-top: 40px;
  }

  .st-explore__apps .app-card--vocab { grid-column: 1 / -1; }
}

/* ============================================
   モーション配慮
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .hub__scroll-cue::after { animation: none; }
}


/* ============================================
   st-explore 用 旧アプリカード（2026-08-30 復元）
   ヒーローの旧カードCSSを hub.css から移設。
   「さあ、街をあるいてみよう」セクションだけが使う。
   ============================================ */
.app-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: var(--hub-color-cream);
  border-radius: var(--hub-radius-card);
  box-shadow: var(--hub-shadow-card);
  text-align: left;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.app-card__icon {
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  border-radius: var(--hub-radius-icon);
  box-shadow: 0 4px 12px rgba(15, 40, 64, 0.18);
}

.app-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.app-card__name {
  display: block;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--hub-color-deep);
}

.app-card__tagline {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--hub-color-text-sub);
}

.app-card__arrow {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--hub-color-white);
  transition: transform 0.25s ease;
}

.app-card__arrow svg {
  width: 20px;
  height: 20px;
}

.app-card--motitan .app-card__arrow {
  background: var(--hub-color-orange);
}

.app-card--motispi .app-card__arrow {
  background: var(--hub-color-blue);
}

.app-card--vocab .app-card__arrow {
  background: var(--hub-color-amber);
}

/* 辞典アイコンは円形＋透過PNGのため、下地を敷いてアプリアイコンと揃える */
.app-card__icon--vocab {
  background: var(--hub-gradient-vocab-icon);
  padding: 4px;
}

@media (hover: hover) {
  .app-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hub-shadow-card-hover);
  }

  .app-card:hover .app-card__arrow {
    transform: translateX(4px);
  }
}


.app-card__pick {
  display: block;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--hub-color-blue);
  margin-bottom: 1px;
}

@media (min-width: 734px) {
  .app-card__pick {
    font-size: 0.76rem;
  }
}

@media (min-width: 734px) {
  .st-explore__apps .app-card {
    gap: 20px;
    padding: 24px 26px;
  }
  .st-explore__apps .app-card__icon {
    width: 84px;
    height: 84px;
  }
  .st-explore__apps .app-card__name {
    font-size: 1.5rem;
  }
  .st-explore__apps .app-card__tagline {
    font-size: 0.9rem;
  }
}

/* st-explore 用 旧 now-link（同上・復元） */
.now-link {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(255, 249, 238, 0.72);
  border: 1.5px dashed rgba(0, 63, 92, 0.28);
  border-radius: var(--hub-radius-card);
  backdrop-filter: blur(3px);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.now-link__bear {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(15, 40, 64, 0.2));
}

.now-link__body {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.now-link__eyebrow {
  display: block;
  font-family: var(--hub-font-script);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  color: var(--hub-color-blue);
}

.now-link__title {
  display: block;
  margin-top: 1px;
  font-size: 1.02rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--hub-color-deep);
}

.now-link__sub {
  display: block;
  margin-top: 1px;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--hub-color-text-sub);
}

.now-link__arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--hub-color-deep-blue);
  color: var(--hub-color-white);
  transition: transform 0.25s ease;
}

.now-link__arrow svg {
  width: 17px;
  height: 17px;
}

@media (hover: hover) {
  .now-link:hover {
    transform: translateY(-3px);
    background: rgba(255, 249, 238, 0.95);
    box-shadow: var(--hub-shadow-card);
  }

  .now-link:hover .now-link__arrow {
    transform: translateX(4px);
  }
}

/* ============================================
   文字ロゴをテキストの並びに置くときの共通ルール（2026-09-14）
   例: <span class="dcard__name"><img class="wordmark" src="/assets/brand/MotiTan-color.svg" alt="モチタン">辞典</span>
   文字サイズに追従（1.1em）しつつ 18px 未満にはしない（Town の w が潰れて読めなくなる）
   ============================================ */
img.wordmark {
  display: inline-block;
  height: max(1.1em, 18px);
  width: auto;
  vertical-align: -0.16em;
}

/* 「MotiTown Now」リンク（2026-09-15）: ロゴ＋Now を 1 行、日本語名を添える */
.now-link__title--now {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 8px;
}
.now-link__title--now .wordmark { height: 20px; }
.now-link__ja {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--hub-color-text-sub);
}

/* 日本語は英語表示で学ぶコースとして、既存のカードに揃えて紹介。 */
.st-lang-card--japanese { grid-column: 1 / -1; }
