/**
 * ことばゲート - TOPページ専用
 * 既存の base / components / header / footer と統一
 */

.page-top main { flex: 1; }

/* ファーストビュー */
.top-hero {
  position: relative;
  padding: 64px 20px 80px;
  text-align: center;
  background: var(--bg);
  overflow: hidden;
}
.top-hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.top-hero__bg::before,
.top-hero__bg::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
}
.top-hero__bg::before {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, transparent 70%);
  top: -100px;
  right: -60px;
}
.top-hero__bg::after {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
  bottom: -80px;
  left: -40px;
}
.top-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
}
.top-hero__title {
  font-size: clamp(28px, 3.8vw, 36px);
  font-weight: 900;
  line-height: 1.32;
  margin: 0 0 24px;
  letter-spacing: .02em;
}
.top-hero__title-accent {
  color: var(--accent2);
  position: relative;
}
.top-hero__desc {
  font-size: clamp(15px, 1.9vw, 17px);
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 40px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}
.top-hero__cta {
  padding: 14px 24px;
  font-size: 14px;
  border-radius: 10px;
}
.top-hero__demo {
  margin-top: 44px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  padding: 0;
}
.top-hero__demo-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 12px;
}
.top-hero__demo-form textarea {
  width: 100%;
  padding: 18px 20px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 16px;
  resize: none;
  min-height: 140px;
}
.top-hero__demo-form textarea:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.top-hero__demo-form textarea::placeholder {
  color: var(--muted);
}
.top-hero__demo-form .btn {
  margin-top: 8px;
  padding: 12px 20px;
  border-radius: 14px;
  margin-left: auto;
  display: block;
}
@media (max-width: 640px) {
  .top-hero__title-comma { display: none; }
  .top-hero { padding: 50px 20px 64px; }
  .top-hero__demo {
    margin-top: 36px;
    padding: 0;
  }
  .top-hero__demo-form textarea {
    font-size: 16px;
  }
  .top-hero__title { font-size: 24px; }
  .top-hero__desc {
    font-size: 14px;
    line-height: 1.6;
  }
  .top-hero__bg::before { width: 240px; height: 240px; top: -60px; }
  .top-hero__bg::after { width: 180px; height: 180px; bottom: -50px; }
}

/* セクション共通 */
.top-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 60px 20px;
}
.top-section__title {
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 900;
  text-align: center;
  margin: 0 0 24px;
  letter-spacing: .02em;
  line-height: 1.3;
}
.top-section__sub {
  font-size: 17px;
  color: var(--muted);
  text-align: center;
  margin: 0 0 36px;
  line-height: 1.6;
}

/* ことばゲートとは */
#about {
  background: var(--panel);
  padding: 80px 0;
}
.top-about__text {
  font-size: 16px;
  line-height: 2.0;
  color: var(--text);
  margin: 0 auto;
  max-width: 760px;
  text-align: center;
}
.br {
  display: block;
  line-height: 0;
  height: 0;
  overflow: hidden;
}
.br-pc {
  display: block;
  line-height: 0;
  height: 0;
  overflow: hidden;
}

/* 使い方・お知らせ（背景を横全体に） */
.top-section--full {
  max-width: none;
  width: 100%;
}
.top-section--full .top-section__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}
.top-section--full {
  padding: 100px 0;
}

/* 使い方 3ステップ */
#howto { background: var(--bg); }
#howto .top-section__title { margin-bottom: 32px; }
#howto .top-section__sub {
  font-size: 18px;
  margin: 0 0 44px;
}
.top-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}
@media (max-width: 768px) {
  .top-steps { grid-template-columns: 1fr; gap: 24px; }
}
.top-step {
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  padding: 0 28px 28px 28px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "img img"
    "num title"
    "desc desc";
  column-gap: 12px;
  row-gap: 10px;
  align-items: center;
  align-content: start;
  overflow: hidden;
}
.top-step__num {
  grid-area: num;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 30px;
  padding: 0 10px;
  font-size: 20px;
  font-weight: 900;
  color: var(--accent2);
  margin: 0;
  letter-spacing: 0.01em;
  line-height: 1;
  border: 1px solid rgba(37, 99, 235, 0.25);
  background: rgba(37, 99, 235, 0.08);
  border-radius: 9px;
}
.top-step__img {
  grid-area: img;
  aspect-ratio: 16/9;
  margin: -1px -28px 20px -28px;
  width: calc(100% + 56px);
  background: var(--bg);
  overflow: hidden;
  line-height: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18), 0 1px 0 0 rgba(0, 0, 0, 0.1);
}
.top-step__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0;
}
.top-step__title {
  grid-area: title;
  font-size: 16px;
  font-weight: 800;
  margin: 0;
  line-height: 1.35;
}
.top-step__desc {
  grid-area: desc;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin: 2px 0 0;
}

/* 料金 */
#price { background: var(--panel); }
#price .top-section__title { margin-bottom: 32px; }
.top-price-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}
@media (max-width: 520px) {
  .top-price-grid { grid-template-columns: 1fr; }
}
.top-price-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow);
  min-height: 300px;
  display: flex;
  flex-direction: column;
}
.top-price-card__name {
  font-size: 18px;
  font-weight: 900;
  margin: 0 0 16px;
}
.top-price-card__price {
  font-size: 30px;
  font-weight: 900;
  color: var(--accent2);
  margin: 0 0 24px;
}
.top-price-card__price span { font-size: 14px; font-weight: 700; color: var(--muted); margin-left: 4px; }
.top-price-card__text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}
.top-price-card__list {
  margin: 0;
  padding-left: 1.25em;
  text-align: left;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.72;
}
.top-price-card__list li { margin: 0 0 4px; }
.top-price-card--soon .top-price-card__price { font-size: 14px; color: var(--muted); }
.top-price-card--soon {
  display: flex;
  flex-direction: column;
}
.top-price-card--soon .top-price-card__name {
  margin-bottom: 0;
}
.top-price-card--soon .top-price-card__price {
  flex: 1;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 900;
  color: var(--muted);
  line-height: 1.2;
  white-space: nowrap;
}
@media (max-width: 520px) {
  .top-price-card--soon .top-price-card__price {
    font-size: 28px;
    margin: 0 0 16px;
  }
  .top-price-card.top-price-card--soon {
    min-height: 220px;
  }
  .top-price-card--soon .top-price-card__name {
    margin-bottom: 12px;
  }
}
.top-price-card--soon .top-price-card__badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg);
  padding: 6px 12px;
  border-radius: 999px;
  margin-top: 8px;
}

/* お知らせ */
#news { background: var(--bg); }
#news .top-section__title { margin-bottom: 32px; }
.top-news-card {
  background: var(--panel);
  border-radius: 14px;
  padding: 16px 32px;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}
.top-news-list {
  margin: 0;
}
.top-news-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  line-height: 1.6;
}
.top-news-item:last-child { border-bottom: none; }
.top-news-item__date {
  color: var(--muted);
  flex-shrink: 0;
  min-width: 7.2em;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
}
.top-news-item__title {
  color: var(--text);
  line-height: 1.6;
}
.top-news-item__title a {
  color: inherit;
  text-decoration: none;
}
.top-news-item__title a:hover {
  text-decoration: underline;
}
@media (max-width: 640px) {
  .br { display: none; }
  .br-pc { display: none; }
  .br-sp {
    display: block;
    line-height: 0;
    height: 0;
    overflow: hidden;
  }
  #about .br-sp {
    margin-bottom: 8px;
  }
  #about .top-section__title { margin-bottom: 30px; }
  #about .top-about__text {
    font-size: 14px;
    line-height: 1.8;
  }
  #howto .top-section__sub {
    font-size: 16px;
    margin-bottom: 36px;
  }
  .top-step__num {
    min-width: 38px;
    height: 28px;
    font-size: 18px;
  }
  .top-step__title { font-size: 15px; }
  .top-step__desc { font-size: 13px; }
  .top-news-card { padding: 8px 20px; }
  .top-news-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
  }
  .top-news-item__date {
    min-width: auto;
    font-size: 14px;
  }
}

@media (max-width: 840px) {
  .top-section { padding: 52px 20px; }
  .top-section--full { padding: 52px 0; }
  #about { padding: 80px 0; }
  .top-section__sub { font-size: 16px; }
  #howto .top-section__sub {
    font-size: 17px;
    margin-bottom: 38px;
  }
  .top-step__title { font-size: 15px; }
  .top-step__desc { font-size: 13px; }
  .top-price-card__name { font-size: 17px; }
  .top-price-card__list { font-size: 13px; }
  .top-price-card { min-height: 0; }
}
@media (min-width: 641px) and (max-width: 840px) {
  .top-about__text {
    font-size: 15px;
    line-height: 1.85;
  }
  .top-news-item,
  .top-news-item__date { font-size: 15px; }
}
