/* ─── Mobile Overrides ─── */

/* ── Nav: hide lang-switcher in top bar on mobile (it's in mobile menu) ── */
@media (max-width: 900px) {
  #nav .lang-switcher { display: none; }

  #nav {
    background: rgba(253, 250, 244, .97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--border);
  }

  .mobile-menu a {
    min-height: 52px;
    display: flex;
    align-items: center;
  }

  .hamburger {
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }
}

/* ── Nav: shorten logo text on small screens ── */
@media (max-width: 480px) {
  .nav-logo-text {
    font-size: 11px;
    letter-spacing: 0;
  }
  .nav-logo-text span { display: none; }
}

/* ── Hero: override inline font-size, improve layout ── */
@media (max-width: 600px) {
  .hero-title { font-size: 28px !important; line-height: 1.4 !important; }

  #hero { padding: 84px 0 56px; }

  .hero-body { font-size: 13.5px; margin-bottom: 32px; }

  .hero-cta-btn {
    display: flex;
    justify-content: center;
    width: 100%;
    text-align: center;
  }

  .hero-badges { display: flex; }

  .hero-scroll { display: none; }
}

/* ── About: remove border-left from stats on mobile ── */
@media (max-width: 900px) {
  .about-stats {
    border-left: none !important;
    padding-left: 0 !important;
    border-top: 1px solid var(--border);
    padding-top: 24px;
  }
}

/* ── Tab nav: horizontal scroll instead of wrapping ── */
@media (max-width: 600px) {
  .tab-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    gap: 6px;
    /* hide scrollbar but keep functionality */
    scrollbar-width: none;
  }
  .tab-nav::-webkit-scrollbar { display: none; }

  .tab-btn {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 12px;
    padding: 8px 14px;
  }
}

/* ── News header: stack on mobile ── */
@media (max-width: 600px) {
  .news-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 28px;
  }
}

/* ── FAQ: bigger touch target ── */
@media (max-width: 900px) {
  .faq-q { min-height: 56px; padding: 18px 20px; }
  .faq-a { padding: 0 20px 20px; }
}

/* ── Service cards: better padding on mobile ── */
@media (max-width: 600px) {
  .service-card { padding: 28px 24px; }
}

/* ── Flow steps: better padding on mobile ── */
@media (max-width: 600px) {
  .flow-step { padding: 28px 22px; }
}

/* ── Contact form: full-width submit on mobile ── */
@media (max-width: 600px) {
  .contact-inner { gap: 32px; }
  .form-submit { padding: 15px; }
}

/* ── Footer: tighter on mobile ── */
@media (max-width: 600px) {
  footer { padding: 32px var(--pad); gap: 12px; }
  .footer-nav { gap: 16px; }
}

/* ── Page hero banner (subpages) ── */
@media (max-width: 600px) {
  .page-hero { padding: 60px 0 40px; }
  .page-hero-title { font-size: 28px !important; }
}

/* ── CSS変数: モバイルで --pad / --section を縮小 ── */
@media (max-width: 600px) {
  :root {
    --pad: 20px;
    --section: 64px;
  }
}

/* ── info-table: モバイルでブロック化（access.html） ── */
@media (max-width: 600px) {
  .info-table { display: block; }
  .info-table tbody { display: block; }
  .info-table tr {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }
  .info-table th {
    display: block;
    width: 100%;
    padding: 0 0 4px;
    border: none;
    font-size: 10px;
  }
  .info-table td {
    display: block;
    width: 100%;
    padding: 0 0 4px;
    border: none;
    font-size: 13.5px;
  }
}

/* ── iOS ズーム防止: フォーム要素を 16px 以上に ── */
@media (max-width: 600px) {
  input, textarea, select { font-size: 16px !important; }
}

/* ── sys-visual: モバイル調整 ── */
@media (max-width: 600px) {
  .sys-period { font-size: 28px; }
  .sys-body { font-size: 13px; }
  .sys-note { font-size: 12px; }
}

/* Home redesign */
@media (max-width: 900px) {
  body.home .hero-right {
    padding-top: 16px;
  }

  body.home .hero-composition {
    display: grid;
    gap: 14px;
  }

  body.home .hero-feature-card {
    width: 100%;
    padding: 28px 24px;
  }

  body.home .hero-side-stack {
    position: static;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .process-timeline {
    grid-template-columns: 1fr;
  }

  .home-cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-cta-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  body.home #hero {
    padding-top: 92px;
    padding-bottom: 28px;
  }

  body.home .hero-kicker {
    font-size: 12px;
    margin-bottom: 14px;
  }

  body.home .hero-body {
    font-size: 14px;
    margin-bottom: 24px;
  }

  body.home .hero-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  body.home .hero-cta-btn,
  body.home .hero-secondary-btn {
    width: 100%;
    justify-content: center;
  }

  body.home .hero-badges {
    display: flex;
  }

  body.home .hero-feature-card {
    border-radius: 22px;
  }

  body.home .hero-card-title {
    font-size: 24px;
  }

  body.home .hero-side-stack {
    grid-template-columns: 1fr;
  }

  body.home .hero-stat-card {
    padding: 16px 18px;
  }

  .overview-quote,
  .pillar-card,
  .system-preview-card,
  .process-step,
  .home-cta-inner {
    border-radius: 22px;
  }

  .pillar-card h3,
  .process-step h3 {
    font-size: 20px;
  }

  .system-preview-card h3 {
    font-size: 22px;
  }

  body.home .news-item {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 18px 20px;
  }

  .home-cta-actions {
    width: 100%;
  }

  .home-cta-actions a {
    width: 100%;
    justify-content: center;
  }
}
