/* ============================================================
   SAMPLES PAGE (samples.html)
   works made with the app / the demo game for game developers / before-after audio samples
   ============================================================ */

/* ===== PAGE HEADER + TABLE OF CONTENTS (same look as the other sub-pages) ===== */
.page-hero {
  background: var(--bg);
  padding: 60px 24px 52px; text-align: center;
  border-bottom: var(--line);
}
.page-hero h1 { font-size: clamp(28px, 5vw, 42px); font-weight: 900; margin-bottom: 10px; }
.page-hero p { color: var(--text-mid); font-size: 15px; max-width: 560px; margin: 0 auto; text-wrap: balance; }

.toc {
  max-width: 1008px; margin: 36px auto 0; padding: 0 24px;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.toc a {
  background: white; border: var(--line);
  color: var(--text-mid); font-size: 13px; font-weight: 700;
  padding: 8px 18px; border-radius: 20px; transition: all 0.2s;
}
.toc a:hover {
  border-color: var(--pink); color: var(--pink);
  background: var(--pink-pale); text-decoration: none;
}

/* ===== LAYOUT ===== */
.samples-body { max-width: 1008px; margin: 52px auto 80px; padding: 0 24px; }   /* 960px of content, like the top page */
.samples-section { margin-bottom: 64px; scroll-margin-top: 84px; }               /* (the nav is sticky) */
.samples-section:last-child { margin-bottom: 0; }
.samples-lead { font-size: 14px; color: var(--text-mid); margin: -8px 0 20px; }
.samples-load-note { font-size: 11px; color: var(--text-light); margin: -14px 0 20px; }
.samples-foot { font-size: 11px; color: var(--text-light); margin-top: 16px; }
.sp-only { display: none; }

/* ===== SAMPLE CARDS (moved here from the top page, unchanged) ===== */
.samples-category { margin-bottom: 28px; }
.samples-category:last-child { margin-bottom: 0; }
.samples-category-heading {
  font-size: 13px; font-weight: 800; letter-spacing: .04em;
  color: var(--text-mid); text-transform: uppercase;
  margin-bottom: 12px; padding-left: 2px;
}
.sample-meta {
  margin-bottom: 12px; display: flex; flex-direction: column; gap: 3px;
}
.meta-label { font-size: 11px; font-weight: 700; color: var(--text-light); }
.meta-value { font-size: 11px; color: var(--text-mid); margin-left: 4px; }
.samples-lang-heading {
  font-size: 18px; font-weight: 900; color: var(--text);
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px;
}
.samples-lang-heading::after {
  content: ''; flex: 1;
  border-top: 3px dotted var(--ink);
}
.samples-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.sample-card {
  background: white; border: var(--line);
  border-radius: 16px; padding: 20px;
  transition: all 0.2s;
}
.sample-card:hover { box-shadow: var(--shadow);  }
.sample-card-title {
  font-size: 14px; font-weight: 800; color: var(--text);
  margin-bottom: 14px;
}
.sample-card-sub {
  font-size: 12px; font-weight: 600; color: var(--text-mid);
}
.ba-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.ba-tab {
  flex: 1; padding: 7px 4px; border-radius: 8px;
  font-size: 12px; font-weight: 700;
  border: var(--line);
  background: white; color: var(--text-mid);
  cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.ba-tab.active { background: var(--accent); color: var(--ink); border-color: var(--ink); }
.sample-audio {
  width: 100%; accent-color: var(--pink);
  display: none; margin-top: 4px;
}
.sample-audio.visible { display: block; }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .sp-only { display: inline; }
  .page-hero { padding: 36px 16px 28px; }
  .page-hero h1 { font-size: 24px; }
  .toc { padding: 0 16px; margin-top: 24px; gap: 8px; }
  .toc a { font-size: 12px; padding: 6px 14px; }
  .samples-body { padding: 0 16px; margin-top: 32px; margin-bottom: 56px; }
  .samples-section { margin-bottom: 44px; }
  .samples-lead { font-size: 12.5px; margin-bottom: 14px; }

  /* Samples */
  .samples-grid { grid-template-columns: 1fr; }
  .samples-lang-heading { font-size: 15px; margin-bottom: 14px; }
  .samples-category { margin-bottom: 20px; }

  /* Sample card — 圧縮レイアウト */
  .sample-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 8px;
    padding: 14px;
  }
  .sample-card-title {
    grid-column: 1; grid-row: 1;
    align-self: center;
    font-size: 13px; margin-bottom: 0;
  }
  .sample-meta {
    grid-column: 1 / -1; grid-row: 2;
    flex-direction: row; gap: 10px;
    padding: 6px 0 8px; margin-bottom: 0;
  }
  .ba-tabs { grid-column: 1 / -1; grid-row: 3; }
  .sample-audio { grid-column: 1 / -1; }
}

/* works: two cards per row (the same cards as the top page's #samples, see index.css) */
.works-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.work-card { overflow: hidden; background: var(--white); border: var(--line); border-radius: var(--radius); transition: box-shadow 0.12s; }
.work-card:hover { box-shadow: var(--shadow); }
.work-card-media { aspect-ratio: 16/9; background: #000; border-bottom: var(--line); }
.work-card-media iframe { display: block; }
.work-card-body { padding: 14px 20px 18px; }
.work-card-body h3 { font-size: 15px; font-weight: 900; line-height: 1.5; margin-bottom: 2px; }
.work-card-body p { font-size: 12px; color: var(--text-mid); }
@media (max-width: 640px) {
  .works-grid { grid-template-columns: 1fr; gap: 14px; }
  .work-card-body { padding: 12px 16px 14px; }
}

/* user cases: a sideways row of cards (two and a bit visible on PC, one and a bit on phones) */
.cases { position: relative; }
.cases-track {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 4px;
  padding: 4px 4px 14px; margin: 0 -4px; scrollbar-width: thin;
}
.case-card { flex: 0 0 calc((100% - 40px) / 2.3); scroll-snap-align: start; }
.case-by { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 2px; }
.case-by a { color: var(--pink); font-weight: 900; text-decoration: none; }
.case-by a:hover { text-decoration: underline; }
.case-platform {
  font-size: 11px; font-weight: 900; color: var(--ink); background: var(--white);
  border: 2px solid var(--ink); border-radius: 999px; padding: 0 8px; line-height: 1.6;
}
.cases-btn {
  position: absolute; top: calc(50% - 30px); z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: var(--ink); border: var(--line); box-shadow: var(--shadow);
  font: 900 24px/1 var(--font); cursor: pointer; display: flex; align-items: center; justify-content: center; padding-bottom: 3px;
}
.cases-btn[hidden] { display: none; }
.cases-btn.is-prev { left: -18px; }
.cases-btn.is-next { right: -18px; }
.cases-btn:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
@media (max-width: 640px) {
  .cases-track { gap: 14px; }
  .case-card { flex-basis: 84%; }
  .cases-btn { display: none; }   /* phones: swipe */
}
