/* =============================================
   KN Express — 共通スタイルシート (Mobile First Optimized)
   カラー: チャコール × ブルー/ライトブルー
   ============================================= */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&family=Zen+Kaku+Gothic+New:wght@400;700;900&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --color-bg: #ffffff;
  --color-surface: #f8fafc;
  --color-surface2: #f1f5f9;
  --color-border: #cbd5e1;
  --color-primary: #0052cc; /* 信頼のディープブルー */
  --color-secondary: #003d99;
  --color-orange: #ff6b00; /* 本物のオレンジを採用 */
  --color-amber: #f59e0b;
  --color-text: #0f172a; /* 深いネイビーで「しまり」を出す */
  --color-muted: #475569;
  --color-white: #ffffff;

  --font-en: 'Space Grotesk', sans-serif;
  --font-ja: 'Zen Kaku Gothic New', sans-serif;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 32px;

  --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --max-w: 1200px;
  --header-h: 72px;

  /* Typography Design Tokens */
  --fs-h1: 2.5rem;
  --fs-h2: 2rem;
  --fs-h3: 1.5rem;
  --fs-body: 1rem;
  --lh-body: 1.8;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-ja);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  word-break: normal;
  overflow-wrap: break-word;
  text-align: center; /* ユーザー要望：コンテンツは中央寄せで統一 */
}

/* Typography Helpers */
.keep-phrase {
  display: inline-block;
  white-space: normal;
  text-align: left; /* テキストの自然な流れを重視 */
}

h1, h2, h3, h4 {
  line-height: 1.35;
  font-weight: 900;
  letter-spacing: -0.02em;
}

p {
  margin-bottom: 1.5em;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
}

ul {
  list-style: none;
}

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px; /* 375px基準での標準的な余白 */
}

@media (min-width: 1280px) {
  .container {
    padding: 0 20px;
  }
}

.container-narrow {
  max-width: 860px;
}

.bg-white { background-color: var(--color-bg); }
.bg-surface { background-color: var(--color-surface); }
.bg-surface2 { background-color: var(--color-surface2); }

.section-py { padding: var(--sp-section) 0; }
.section-py-sm { padding: calc(var(--sp-section) / 1.5) 0; }

@media (min-width: 1024px) {
  :root {
    --fs-h1: 4rem;
    --fs-h2: 2.75rem;
    --fs-h3: 1.8rem;
    --fs-body: 1.1rem;
    --header-h: 80px;
  }
}

/* --- Section Headers --- */
.section-label {
  display: block;
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 16px;
}

.section-h2 {
  font-size: var(--fs-h2);
  margin-bottom: 32px;
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}

.section-h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--color-primary);
  border-radius: 2px;
}

.section-lead {
  font-size: 1.1rem;
  color: var(--color-muted);
  max-width: 800px;
  margin: 0 auto 48px;
  line-height: var(--lh-body);
}

/* ---------- Fade-in Animation ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(50px) scale(0.98);
  filter: blur(10px);
  transition: 
    opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
    filter 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/* --- Strong Heading Reveal --- */
@keyframes headingReveal {
  0% { 
    clip-path: inset(0 0 100% 0);
    transform: translateY(40px);
    opacity: 0;
  }
  100% { 
    clip-path: inset(0 0 0 0);
    transform: translateY(0);
    opacity: 1;
  }
}

.heading-reveal {
  display: block;
  opacity: 0;
}

.heading-reveal.visible {
  animation: headingReveal 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-h);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-family: var(--font-en);
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px; /* ロゴ画像との間隔を少し広げる */
}

.logo-img {
  height: 36px; /* 48pxから36pxに縮小 */
  width: auto;
  border-radius: 0;
  object-fit: contain;
}

@media (max-width: 767px) {
  .logo-img {
    height: 30px; /* 40pxから30pxに縮小 */
  }
}

.logo-mark {
  /* 旧ロゴのマークスタイルは不要になるが、互換性のために残すか、削除 */
  display: none;
}

/* Desktop Nav */
.nav-links {
  display: none; /* スマホでは非表示 */
}

@media (min-width: 1024px) {
  .nav-links {
    display: flex;
    gap: 32px;
    font-size: 0.9rem;
    font-weight: 600;
  }
}

.nav-links a:hover { color: var(--color-orange); }

.btn-header {
  display: none; /* スマホではハンバーガー横には置かないか、目立たせる場合は調整 */
}
@media (min-width: 1024px) {
  .btn-header {
    display: inline-block;
    background: var(--color-orange);
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
  }
}

/* Hamburger */
.hamburger {
  display: flex !important; /* スマホ・タブレットで強制表示 */
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 110;
}

@media (min-width: 1024px) {
  .hamburger { display: none !important; }
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: 0.3s;
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Nav Overlay */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: var(--color-surface);
  box-shadow: -10px 0 30px rgba(0,0,0,0.1);
  padding: 100px 30px 40px;
  z-index: 105;
  transition: 0.4s ease-in-out;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mobile-nav.open { right: 0; }

.mobile-nav a {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 50vh;
  padding-top: var(--header-h);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  background: #f1f5f9;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('assets/img/hero_van.png');
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85); /* 視認性優先：オーバーレイを強めに */
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 40px 20px;
}

.hero-h1 {
  font-size: var(--fs-h1);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 16px;
}

.hero-desc {
  font-size: var(--fs-body);
  color: var(--color-text);
  margin-bottom: 24px;
  line-height: var(--lh-body);
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

@media (max-width: 767px) {
  .hero-h1 {
    font-size: 2.5rem;
    letter-spacing: -0.03em;
  }
  .hero-desc {
    font-size: 0.95rem;
  }
}

/* --- Hero Animation & Highlights --- */
@keyframes heroReveal {
  0% { 
    opacity: 0; 
    transform: translateY(60px) scale(0.95); 
    filter: blur(20px); 
  }
  100% { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
    filter: blur(0); 
  }
}

.hero-reveal {
  animation: heroReveal 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.highlight-orange {
  color: #ff6b00; /* 強調のためのアクセントオレンジ */
  font-weight: 900;
  position: relative;
  display: inline-block;
  padding: 0 8px;
  z-index: 1;
}

.highlight-orange::after {
  content: "";
  position: absolute;
  bottom: 0.05em;
  left: 0;
  width: 100%;
  height: 0.45em;
  background: rgba(255, 107, 0, 0.2);
  z-index: -1;
  border-radius: 4px;
  transform: rotate(-0.5deg);
}

.service-detail-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 32px;
}

.service-detail-header {
  padding: 30px 20px;
  background: var(--color-surface2);
  border-bottom: 1px solid var(--color-border);
}

.service-detail-body {
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  text-align: left; /* リスト等は左寄せが見やすい */
}

@media (min-width: 1024px) {
  .service-detail-header { padding: 40px 48px; }
  .service-detail-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 40px 48px;
    gap: 40px;
    text-align: left;
  }
}
.btn-primary, .btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px; /* ユーザー要望：タップしやすさ重視 */
  width: 90%; /* ユーザー要望：横幅広め */
  margin: 0 auto;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-align: center;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--color-orange);
  color: #fff;
}

.btn-outline {
  border: 1px solid var(--color-border);
  background: #fff;
}

.hero-stats {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--color-border);
  z-index: 5;
}

@media (max-width: 1023px) {
  .hero-stats { position: static; }
}

.stats-inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  padding-top: 30px;
  padding-bottom: 30px;
}

@media (min-width: 1024px) {
  .stats-inner {
    grid-template-columns: repeat(4, 1fr);
    padding-top: 40px;
    padding-bottom: 40px;
  }
}

.stat-item { text-align: center; }
.stat-num { font-size: 1.5rem; font-weight: 700; color: var(--color-text); line-height: 1.2; }
.stat-label { font-size: 0.75rem; color: var(--color-muted); margin-top: 4px; }

/* Features Grid (Mobile First: 1 Col) */
.features-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}

@media (min-width: 1024px) {
  .features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

.feature-card {
  background: #fff;
  padding: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

/* Service Rows (Mobile First: 1 Col) */
.service-row {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 40px 0;
  text-align: center;
}

.service-img {
    order: -1; /* 画像をテキストより前に配置 */
    width: 100%;
    margin-bottom: 12px;
}

@media (min-width: 1024px) {
  .service-row {
    flex-direction: row;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 80px 0;
    text-align: left;
  }
  .service-row.reverse .service-text { order: 2; }
  .service-row.reverse .service-img { order: 1; margin-bottom: 0; }
  .service-img { order: unset; }
}

/* Contact Grid Responsive */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
  }
}

@media (max-width: 767px) {
  .service-row {
    padding: 40px 0;
    gap: 24px;
  }
  .service-h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
  }
}

.service-img {
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* ---------- Page Hero (inner pages) ---------- */
.page-hero {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: calc(var(--header-h) + 60px) 0 60px;
}
.page-hero-label {
  font-family: var(--font-en);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-orange);
  margin-bottom: 12px;
}
.page-hero-h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.15;
}
.page-hero-sub {
  font-size: 1rem;
  color: var(--color-muted);
  margin-top: 16px;
}

/* ---------- Forms ---------- */
.form-wrap {
  background: #fff;
  padding: 30px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}
@media (min-width: 768px) {
  .form-wrap { padding: 40px; }
}

.service-list {
  text-align: left;
  margin: 0;
  padding-left: 1.2em;
}
.service-list li {
  list-style: disc;
  margin-bottom: 8px;
}
.form-label { display: block; font-weight: 700; margin-bottom: 8px; font-size: 0.9rem; }
.form-control {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 16px; /* iOS自動ズーム防止 */
}
textarea.form-control { min-height: 150px; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 20px 0;
  text-align: left;
  background: none;
  border: none;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

/* ---------- Table ---------- */
.company-table {
  width: 100%;
  border-top: 1px solid var(--color-border);
  font-size: var(--fs-body);
}

.company-table tr {
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex-direction: column; /* スマホでは縦並び */
  padding: 24px 0;
}

.company-table th {
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
  font-size: 0.9rem;
  text-align: left;
}

.company-table td {
  color: var(--color-muted);
}

@media (min-width: 768px) {
  .company-table tr {
    flex-direction: row;
    padding: 32px 0;
    align-items: flex-start;
  }
  .company-table th {
    width: 240px;
    margin-bottom: 0;
    padding-right: 40px;
    font-size: 1rem;
  }
  .company-table td {
    flex: 1;
  }
}

/* ==========================================================================
   FINAL MOBILE OVERRIDES (FORCE STACKING & MENU)
   ========================================================================== */
@media screen and (max-width: 1023px) {
  /* Header Fixes */
  .site-header .nav-links, 
  .site-header .btn-header { 
    display: none !important; 
  }
  .site-header .hamburger { 
    display: flex !important; 
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    width: 44px !important;
    height: 44px !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer !important;
  }
  .site-header .hamburger span {
    display: block !important;
    width: 24px !important;
    height: 2px !important;
    background: var(--color-text) !important;
    margin: 3px 0 !important;
    transition: 0.3s !important;
  }

  /* Mobile Nav Overlay */
  .mobile-nav.open {
    right: 0 !important;
  }
  
  /* Stacking Fixes */
  .service-row, 
  .footer-grid, 
  .contact-grid, 
  .detail-row,
  .features-grid,
  .company-table tr,
  .benefit-card,
  .step-item {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  /* Table Fixes */
  .company-table, 
  .company-table tbody, 
  .company-table th, 
  .company-table td {
    display: block !important;
    width: 100% !important;
  }
  
  .company-table th {
    margin-bottom: 8px !important;
    padding-top: 20px !important;
  }
  
  .company-table td {
    padding-bottom: 20px !important;
    border-bottom: 1px solid var(--color-border) !important;
  }
}

/* ---------- Footer ---------- */
.site-footer { padding: 60px 0 30px; border-top: 1px solid var(--color-border); }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  font-size: 0.8rem;
}

/* ==========================================================================
   Responsiveness
   ========================================================================== */

@media (max-width: 1023px) {
  /* Header */
  .nav-links, .btn-header { display: none !important; }
  .hamburger { display: flex !important; }
  
  /* Layout Stacking */
  .service-row, 
  .footer-grid, 
  .contact-grid, 
  .detail-row,
  .features-grid,
  .service-detail-body {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }
  
  .service-text, .service-img, .detail-label, .detail-value {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Company Table Stacking */
  .company-table, .company-table tbody, .company-table tr, .company-table th, .company-table td {
    display: block !important;
    width: 100% !important;
  }
  .company-table tr {
    padding: 20px 0 !important;
    border-bottom: 1px solid var(--color-border) !important;
  }
  .company-table th {
    margin-bottom: 8px !important;
    color: var(--color-text) !important;
    font-size: 0.9rem !important;
  }
  
  /* Section Spacing */
  .section-py { padding: 60px 0 !important; }
  .section-h2 { font-size: 1.8rem !important; }
}

/* Staggered Animation Delays */
.fade-in-delay-1 { transition-delay: 0.15s; }
.fade-in-delay-2 { transition-delay: 0.3s; }
.fade-in-delay-3 { transition-delay: 0.45s; }
.fade-in-delay-4 { transition-delay: 0.6s; }
.fade-in-delay-5 { transition-delay: 0.75s; }

/* Desktop Only (1024px and up) */
@media (min-width: 1024px) {
  .nav-links { display: flex; gap: 32px; font-size: 0.9rem; font-weight: 600; }
  .btn-header { display: inline-block; background: var(--color-orange); color: #fff; padding: 10px 20px; border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 700; }
  .hamburger { display: none !important; }
  
  .service-row { grid-template-columns: 1fr 1fr; gap: 60px; }
  .service-row.reverse .service-text { order: 2; }
  .service-row.reverse .service-img { order: 1; }
  
  .contact-grid { grid-template-columns: 1fr 1.2fr; gap: 60px; }
  
  .company-table tr { flex-direction: row; padding: 32px 0; align-items: flex-start; }
  .company-table th { width: 240px; margin-bottom: 0; padding-right: 40px; font-size: 1rem; }
  .company-table td { flex: 1; }
  
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .footer-bottom { display: flex; justify-content: space-between; text-align: left; }
  
  .detail-row { flex-direction: row; }
  .detail-label { width: 140px; }
}