/* Probono Works — responsive
   メディアクエリはすべてこのファイルに集約する。読み込み順は最後。 */

/* ---------- PC 拡張 ---------- */

@media (min-width: 640px) {
  .hero {
    padding: 150px 0 160px;
  }
  .section {
    padding: 120px 0;
  }
  .cards {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  .concepts {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .plugin-list {
    grid-template-columns: 1fr 1fr;
  }
  .section-lead {
    font-size: 18px;
  }
}

@media (min-width: 960px) {
  .concepts {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- モバイル: ハンバーガードロワー ---------- */

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.10);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease), opacity 0.2s var(--ease);
    opacity: 0;
    pointer-events: none;
  }
  .nav.is-open {
    max-height: 80vh;
    overflow-y: auto;
    opacity: 1;
    pointer-events: auto;
  }
  .nav a {
    display: block;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    letter-spacing: 0.08em;
  }
  .nav a:last-child {
    border-bottom: none;
  }
  .nav a:hover,
  .nav a:focus-visible {
    background: var(--bg-card);
  }
  /* ドロワー内では X リンクもテキスト付きの行として表示する */
  .nav-x {
    width: auto;
    height: auto;
    border: none;
    border-radius: 0;
    justify-content: flex-start;
    gap: 10px;
  }
  .nav-x:hover,
  .nav-x:focus-visible {
    background: var(--bg-card);
  }
  .nav-x-label {
    display: inline;
  }
}

/* ---------- タブレット以下 ---------- */

@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px 24px;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* ---------- スマートフォン ---------- */

@media (max-width: 520px) {
  body {
    font-size: 16px;
  }
  .container {
    padding: 0 18px;
  }
  .logo {
    font-size: 16px;
  }
  .logo-mark {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
  .header-inner {
    height: 62px;
  }
  .hero {
    padding: 84px 0 92px;
  }
  .hero-kicker {
    letter-spacing: 0.28em;
    font-size: 12px;
    margin-bottom: 20px;
  }
  .hero-platforms {
    gap: 8px;
    margin-bottom: 30px;
  }
  .hero-platforms li {
    font-size: 12px;
    padding: 5px 11px;
    letter-spacing: 0.04em;
  }
  .hero-actions {
    gap: 14px;
  }
  .feature-banner {
    padding: 44px 0;
  }
  .card {
    padding: 28px 20px;
  }
  .card-desc {
    font-size: 16px;
  }
  .card-meta li {
    flex-direction: column;
    gap: 4px;
    padding: 12px 0;
  }
  .plan-label {
    flex: 0 0 auto;
  }
  .card-actions {
    gap: 10px;
  }
  .card-actions .btn {
    width: 100%;
    padding: 13px 18px;
  }
  .section-lead {
    font-size: 16px;
    margin-bottom: 44px;
  }
  .sister {
    padding: 32px 20px;
  }
  .plugin-list li {
    padding: 13px 14px;
  }
  .contact-form {
    padding: 26px 18px 22px;
  }
  .btn-lg {
    padding: 14px 32px;
    font-size: 15px;
    max-width: 100%;
  }
  .faq-q {
    padding: 16px 18px;
    font-size: 15px;
    gap: 10px;
  }
  .faq-q-mark {
    font-size: 16px;
  }
  .faq-a {
    padding: 0 18px 18px 44px;
    font-size: 15px;
  }
  .back-to-top {
    width: 44px;
    height: 44px;
    right: 14px;
    bottom: 14px;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ---------- 極小幅（320px 前後）での横あふれ防止 ---------- */

@media (max-width: 360px) {
  .container {
    padding: 0 14px;
  }
  .hero-title {
    letter-spacing: 0.02em;
  }
  .card-title {
    letter-spacing: 0.02em;
  }
  .faq-a {
    padding-left: 18px;
  }
}

/* ---------- アニメーション抑制 ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
