/* spade3-base.css — layout, typography, components (no color values) */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans",
               "Yu Gothic", "游ゴシック", sans-serif;
  background-color: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  min-height: 100dvh;
}

/* ── Typography ── */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); font-weight: 600; line-height: 1.25; }
h3 { font-size: clamp(1.125rem, 2vw, 1.5rem); font-weight: 600; line-height: 1.3; }
p  { font-size: 1rem; line-height: 1.75; color: var(--muted); }

/* ── Layout ── */
.container { max-width: 1080px; margin-inline: auto; padding-inline: 24px; }
.section { padding-block: 80px; }
.section--sm { padding-block: 48px; }
.hub-hero__title { text-align: center; margin-bottom: 16px; }
.section--bordered-top { border-top: 1px solid var(--border); }
.section__heading { margin-bottom: 32px; }
.section__cta { text-align: center; margin-top: 32px; }

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.nav__logo {
  font-size: 1.125rem; font-weight: 700; color: var(--fg); text-decoration: none;
  display: flex; align-items: center; gap: 8px;
}
.nav__logo-icon { width: 24px; height: 24px; object-fit: contain; }
.nav__links { display: flex; gap: 28px; list-style: none; }
.nav__links a { font-size: 0.875rem; color: var(--muted); text-decoration: none; }
.nav__links a:hover { color: var(--fg); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px; border-radius: 980px;
  font-size: 0.875rem; font-weight: 600; text-decoration: none;
  border: none; cursor: pointer; transition: opacity 0.15s;
}
.btn:hover { opacity: 0.85; }
.btn--primary { background-color: var(--accent); color: var(--accent-fg); }
.btn--secondary {
  background-color: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}

/* ── Platform Showcase Section ── */
.showcase-platform { padding-block: 48px; }
.showcase-platform__title {
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  font-weight: 600;
  color: var(--muted);
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}

/* ── App Cards (ハブショーケース) ── */
.showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 360px));
  gap: 24px;
  justify-content: start;
}
.app-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 24px;
  display: flex; flex-direction: column; gap: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.app-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px var(--shadow); }
.app-card__icon { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; }
.app-card__name { font-size: 1.125rem; font-weight: 700; color: var(--fg); }
.app-card__tagline { font-size: 0.875rem; color: var(--muted); }
.app-card__cta { margin-top: auto; }

/* ── Blog Post Card ── */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.post-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 24px;
  display: flex; flex-direction: column; gap: 8px;
  text-decoration: none; color: inherit;
  transition: transform 0.2s;
}
.post-card:hover { transform: translateY(-2px); }
.post-card__tag { font-size: 0.75rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; }
.post-card__title { font-size: 1rem; font-weight: 600; color: var(--fg); line-height: 1.4; }
.post-card__date { font-size: 0.8rem; color: var(--muted); margin-top: auto; }

/* ── Article Layout ── */
.article { max-width: 720px; margin-inline: auto; padding-block: 60px; }
.article__header { margin-bottom: 40px; display: flex; flex-direction: column; gap: 12px; }
.article__tag { font-size: 0.75rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; }
.article__title { font-size: clamp(1.5rem, 4vw, 2.5rem); font-weight: 700; line-height: 1.2; }
.article__meta { font-size: 0.875rem; color: var(--muted); }
.article__body { font-size: 1.0625rem; line-height: 1.8; }
.article__body h2 { margin-block: 40px 16px; }
.article__body h3 { margin-block: 28px 12px; }
.article__body p  { margin-bottom: 20px; }
.article__body img { max-width: 100%; border-radius: 8px; margin-block: 24px; }
.article__body pre { background: var(--code-bg); border-radius: 8px; padding: 20px; overflow-x: auto; margin-block: 20px; }
.article__body code { font-family: "SF Mono", "Menlo", monospace; font-size: 0.9em; background: var(--code-bg); padding: 2px 5px; border-radius: 4px; }
.article__body pre code { background: none; padding: 0; }
.article__body ul, .article__body ol { padding-left: 24px; margin-bottom: 20px; }
.article__body li { margin-bottom: 6px; }
.article__body blockquote { border-left: 3px solid var(--accent); padding-left: 16px; margin-block: 24px; color: var(--muted); font-style: italic; }

/* ── FAQ (アコーディオン) ── */
.faq { display: flex; flex-direction: column; gap: 1px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.faq__item { background-color: var(--card-bg); }
.faq__question {
  width: 100%; background: none; border: none;
  padding: 18px 20px; text-align: left; cursor: pointer;
  font-size: 0.9375rem; font-weight: 600; color: var(--fg);
  display: flex; justify-content: space-between; align-items: center;
}
.faq__question::after { content: "+"; font-size: 1.25rem; color: var(--muted); transition: transform 0.2s; }
.faq__item.open .faq__question::after { transform: rotate(45deg); }
.faq__answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq__answer p { padding: 0 20px 18px; color: var(--muted); }

/* ── Footer ── */
.footer { border-top: 1px solid var(--border); padding-block: 40px; }
.footer__inner { display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.footer__about { font-size: 0.875rem; color: var(--muted); max-width: 560px; }
.footer__links { display: flex; gap: 20px; }
.footer__links a { font-size: 0.8125rem; color: var(--muted); text-decoration: none; }
.footer__links a:hover { color: var(--fg); }
.footer__copy { font-size: 0.75rem; color: var(--muted); opacity: 0.6; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .nav__links { gap: 16px; }
  .showcase { grid-template-columns: 1fr; }
  .showcase-platform { padding-block: 32px; }
}
