/*
 Theme Name: tokei-theme
 Description: 腕時計メンテナンスナビ用オリジナルテーマ
 Version: 1.0
*/

/* ========================================
   ベースリセット
======================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111827;
  background: #e5edf9;
  line-height: 1.7;
  font-size: 16px;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

main,
.tm-main {
  display: block;
}

/* ========================================
   タイポグラフィ
======================================== */

h1,
h2,
h3,
h4 {
  font-weight: 600;
  color: #0f172a;
  margin-top: 0;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* ========================================
   共通ボタン
======================================== */

.tm-button-primary,
.tm-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  text-decoration: none;
  transition:
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease,
    opacity 0.18s ease;
}

.tm-button-primary {
  background: linear-gradient(135deg, #22c1c3 0%, #0f766e 45%, #4f46e5 100%);
  color: #f9fafb;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.55);
}

.tm-button-primary:hover {
  opacity: 0.96;
  transform: translateY(-1px);
}

.tm-button-secondary {
  background: #ffffff;
  color: #111827;
  border: 1px solid #d1d5db;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
}

.tm-button-secondary:hover {
  background: #f3f4f6;
  transform: translateY(-1px);
}

/* ========================================
   ヘッダー / ナビ
======================================== */

.tm-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.tm-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* ロゴ */

.tm-header-logo-link {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
}

.tm-header-logo-main {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e5e7eb;
}

.tm-header-logo-sub {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* ナビ */

.tm-header-nav-list {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tm-header-nav-item {
  margin: 0;
}

.tm-header-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 0.92rem;
  color: #e5e7eb;
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color 0.18s ease, opacity 0.18s ease;
}

.tm-header-nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #22c1c3, #4f46e5);
  border-radius: 999px;
  transition: width 0.18s ease;
}

.tm-header-nav-link:hover {
  color: #ffffff;
}

.tm-header-nav-link:hover::after {
  width: 100%;
}

/* CTAナビ */

.tm-header-nav-link-primary {
  padding: 0.4rem 1.2rem;
  margin-left: 0.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c1c3 0%, #0f766e 50%, #4f46e5 100%);
  color: #f9fafb;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(15, 23, 42, 0.7);
  white-space: nowrap;
}

.tm-header-nav-link-primary::after {
  display: none;
}

.tm-header-nav-link-primary:hover {
  opacity: 0.97;
  transform: translateY(-1px);
}

/* ========================================
   メインレイアウト
======================================== */

.tm-main {
  padding-top: 4rem; /* stickyヘッダー分 */
}

.tm-main > section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3.5rem;
}

/* ========================================
   TOP：ヒーロー
======================================== */

.tm-hero {
  margin-top: 1.2rem;
  border-radius: 2rem;
  background: radial-gradient(circle at top left, #f0f4ff 0%, #e5edf9 35%, #e5edf9 100%);
  box-shadow: 0 32px 90px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.tm-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.3fr);
  align-items: center;
  gap: 2.4rem;
  padding: 2.6rem 2.8rem 1.8rem; /* 下はバッジ用に少し抑える */
}

.tm-hero-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #a1a1aa;
  margin-bottom: 0.9rem;
}

.tm-hero-title {
  font-size: 2.35rem;
  line-height: 1.25;
  letter-spacing: 0.03em;
  margin: 0 0 1.1rem;
  color: #020617;
}

.tm-hero-lead {
  font-size: 0.97rem;
  line-height: 1.9;
  color: #4b5563;
  margin-bottom: 1.7rem;
}

.tm-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 0.2rem;
}

/* 画像 */

.tm-hero-visual {
  display: flex;
  justify-content: flex-end;
}

.tm-hero-visual-inner {
  width: 100%;
  max-width: 360px;
  border-radius: 1.7rem;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.55);
}

.tm-hero-visual img {
  width: 100%;
  height: auto;
}

/* ヒーロー下バッジ（3つ横並び・写真の少し下） */

.tm-hero-badges-row {
  display: flex;
  gap: 1rem;
  padding: 0 2.8rem 2.4rem;
  margin-top: -0.2rem;
  justify-content: space-between;
  align-items: stretch;
}

.tm-hero-badge {
  flex: 1 1 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.16);
  padding: 0.7rem 1.4rem;
}

.tm-hero-badge-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 0.15rem;
}

.tm-hero-badge-text {
  font-size: 0.8rem;
  color: #111827;
}

/* ========================================
   共通セクションヘッダー
======================================== */

.tm-section-header {
  margin-bottom: 1.6rem;
}

.tm-section-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 0.4rem;
}

.tm-section-title {
  font-size: 1.4rem;
  margin: 0 0 0.5rem;
}

.tm-section-desc {
  font-size: 0.94rem;
  color: #4b5563;
}

/* ========================================
   見積もり依頼カテゴリ（カード）
======================================== */

.tm-top-estimate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem 1.4rem;
}

.tm-top-estimate-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 1.4rem;
  padding: 1.2rem 1.4rem 1.1rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.tm-top-estimate-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.16);
  border-color: #c7d2fe;
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 60%, #eef2ff 100%);
}

.tm-top-estimate-title {
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}

.tm-top-estimate-text {
  font-size: 0.9rem;
  color: #4b5563;
  margin: 0;
}

.tm-top-estimate-foot {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
  align-items: center;
  justify-content: space-between;
}

.tm-top-estimate-chip {
  font-size: 0.78rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
}

.tm-top-estimate-cta {
  font-size: 0.8rem;
  color: #1d4ed8;
}

.tm-top-estimate-card-sub {
  grid-column: 1 / -1;
}

/* ========================================
   このサイトでできること（4カード）
======================================== */

.tm-top-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem 1.3rem;
}

.tm-top-feature-card {
  border-radius: 1.2rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.tm-top-feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  border-color: #c7d2fe;
}

.tm-top-feature-title {
  font-size: 0.98rem;
  margin: 0 0 0.4rem;
}

.tm-top-feature-text {
  font-size: 0.9rem;
  color: #4b5563;
  margin: 0;
}

/* ========================================
   ご利用の流れ（4カード）
======================================== */

.tm-top-flow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem 1.3rem;
}

.tm-top-flow-card {
  border-radius: 1.2rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  padding: 1.1rem 1.2rem 1rem;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
}

.tm-top-flow-step {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 0.3rem;
}

.tm-top-flow-title {
  font-size: 1rem;
  margin: 0 0 0.4rem;
}

.tm-top-flow-text {
  font-size: 0.9rem;
  color: #4b5563;
  margin: 0;
}

/* ========================================
   記事カテゴリ（カード）
======================================== */

.tm-top-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem 1.3rem;
}

.tm-top-category-card {
  border-radius: 1.2rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.tm-top-category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
  border-color: #c7d2fe;
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 60%, #eef2ff 100%);
}

.tm-top-category-title {
  font-size: 1rem;
  margin: 0 0 0.4rem;
}

.tm-top-category-text {
  font-size: 0.9rem;
  color: #4b5563;
  margin: 0;
}

.tm-top-category-card-sub {
  grid-column: span 3;
}

/* ========================================
   最新記事（3×2カード＋サムネ）
======================================== */

.tm-latest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem 1.3rem;
}

.tm-latest-card {
  border-radius: 1.2rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.tm-latest-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.tm-latest-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1f2937);
}

.tm-latest-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tm-latest-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top left, #1d4ed8 0%, #0f172a 45%, #020617 100%);
}

.tm-latest-body {
  padding: 0.9rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tm-latest-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #6b7280;
}

.tm-latest-cat {
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
}

.tm-latest-title {
  font-size: 0.98rem;
  margin: 0;
}

.tm-latest-excerpt {
  font-size: 0.9rem;
  margin: 0.1rem 0 0;
  color: #4b5563;
}

/* ========================================
   記事件（シングル）
======================================== */

.tm-article {
  max-width: 840px;
  margin: 0 auto;
  padding: 2.4rem 0 3rem;
}

/* ========================================
   記事一覧（カテゴリ / アーカイブ）
======================================== */

.tm-archive-header {
  margin-bottom: 2rem;
}

.tm-archive-label {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
  color: #0f766e;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.tm-archive-title {
  font-size: 1.7rem;
  margin: 0 0 0.4rem;
}

.tm-archive-desc {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #4b5563;
}

.tm-archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem 1.6rem;
}

.tm-archive-card {
  margin: 0;
}

.tm-archive-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.tm-archive-card-inner {
  height: 100%;
  border-radius: 1.2rem;
  padding: 1.3rem 1.4rem 1.2rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.tm-archive-card-link:hover .tm-archive-card-inner {
  transform: translateY(-3px);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
  border-color: #c7d2fe;
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 60%, #eef2ff 100%);
}

.tm-archive-card-title {
  font-size: 1.05rem;
  margin: 0;
}

.tm-archive-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #6b7280;
}

.tm-archive-card-cat {
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
}

.tm-archive-card-excerpt {
  font-size: 0.9rem;
  line-height: 1.7;
  color: #4b5563;
  margin-top: 0.3rem;
}

/* ページネーション */

.tm-archive-pagination {
  margin-top: 2.2rem;
  text-align: center;
}

.tm-archive-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  height: 2.1rem;
  margin: 0 0.15rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  font-size: 0.85rem;
  text-decoration: none;
  color: #374151;
  padding: 0 0.6rem;
}

.tm-archive-pagination .page-numbers.current {
  background: #111827;
  color: #f9fafb;
  border-color: #111827;
}

.tm-archive-pagination .page-numbers:hover:not(.current) {
  background: #f3f4f6;
}

/* ========================================
   見積もりフォーム（/contact 用）
======================================== */

.tm-estimate-form-wrapper {
  margin-top: 1.5rem;
}

.tm-estimate-form {
  max-width: 840px;
  margin: 0 auto 2.5rem;
}

.tm-estimate-form p {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0.8rem;
}

.tm-estimate-form label {
  display: block;
}

.tm-estimate-form input[type="text"],
.tm-estimate-form input[type="email"],
.tm-estimate-form input[type="tel"],
.tm-estimate-form textarea,
.tm-estimate-form select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
  box-sizing: border-box;
  background: #ffffff;
}

.tm-estimate-form textarea {
  min-height: 140px;
}

.tm-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1rem;
}

.tm-estimate-form input[type="submit"] {
  border: none;
  background: linear-gradient(135deg, #22c1c3 0%, #0f766e 45%, #4f46e5 100%);
  color: #f9fafb;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.6rem 1.6rem;
  cursor: pointer;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.45);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.tm-estimate-form input[type="submit"]:hover {
  opacity: 0.96;
  transform: translateY(-1px);
}

/* ========================================
   フッター
======================================== */

.tm-footer {
  border-top: 1px solid #d1d5db;
  padding: 1.8rem 1.5rem;
  font-size: 0.8rem;
  color: #6b7280;
  text-align: center;
}

/* ========================================
   レスポンシブ
======================================== */

@media (max-width: 1024px) {
  .tm-hero-inner {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    padding: 2.4rem 2.2rem 1.6rem;
  }

  .tm-hero-badges-row {
    padding: 0 2.2rem 2.2rem;
  }
}

@media (max-width: 768px) {
  .tm-header-inner {
    padding: 0.5rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .tm-header-nav-list {
    gap: 0.9rem;
  }

  .tm-header-nav-link-primary {
    padding: 0.3rem 0.9rem;
    font-size: 0.85rem;
  }

  .tm-main > section {
    padding: 2rem 1rem 2.5rem;
  }

  .tm-hero-inner {
    grid-template-columns: 1fr;
    padding: 2rem 1.6rem 1.5rem;
  }

  .tm-hero-visual {
    justify-content: flex-start;
  }

  .tm-hero-visual-inner {
    max-width: 260px;
  }

  .tm-hero-badges-row {
    flex-direction: column;
    padding: 0 1.6rem 2.1rem;
  }

  .tm-top-estimate-grid {
    grid-template-columns: 1fr;
  }

  .tm-top-feature-grid {
    grid-template-columns: 1fr;
  }

  .tm-top-flow-grid {
    grid-template-columns: 1fr;
  }

  .tm-top-category-grid {
    grid-template-columns: 1fr;
  }

  .tm-top-category-card-sub {
    grid-column: span 1;
  }

  .tm-latest-grid {
    grid-template-columns: 1fr;
  }

  .tm-article {
    padding: 2rem 0 2.5rem;
  }

  .tm-form-grid {
    grid-template-columns: 1fr;
  }
}
