/* ================================
   Reset & Base
   ================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Helvetica Neue', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

html, body {
  min-height: 100%;
  height: auto;
  background-color: #000;
}

body {
  font-size: 17px;            /* ← PC全体を“ひと回り”アップ */
  line-height: 1.7;
  color: #111;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* 見出しのバランス調整（改行の見え方を最適化） */
h1, h2, h3 {
  text-wrap: balance;         /* サポート外のブラウザでも無害 */
  word-break: keep-all;
}

/* 長い語・URLのはみ出し防止 */
p, li, .section-text, .form-note {
  overflow-wrap: anywhere;    /* どこでも折り返す */
  word-break: break-word;     /* 日本語はそのまま、英語/URLを折る */
  white-space: normal;        /* br依存を避ける */
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
}

.muted { color: #7a7a7a; }

/* Container */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container::after {
  content: "";
  display: block;
  clear: both;
}

/* ================================
   Header
   ================================ */
.header {
  background: #fff;
  border-bottom: 1px solid #ddd;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header .container {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}

.logo {
  font-size: 26px;            /* PC全体UPに合わせ微調整 */
  font-weight: 700;
  margin-right: auto;
}

.logo a {
  color: inherit;
  text-decoration: none;
  display: inline-block;
}

.header-right {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header a {
  color: #111;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color .2s ease;
}

.header a:hover { background-color: #f0f0f0; }

.lang-btn {
  display: inline-block;
  padding: 6px 12px;
  font-size: 14px;
  color: #333;
  border-radius: 4px;
  text-decoration: none;
  background-color: transparent;
  transition: background-color .2s ease;
}

.lang-btn:hover { background-color: #eee; }

.hamburger {
  display: block;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 300;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background-color .2s ease;
  line-height: 1;
}

.hamburger:hover { background-color: #e9e9e9; }

/* Nav (hidden by default; toggled with .open) */
.nav {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  padding: 10px;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  min-width: max-content;
  white-space: nowrap;
  border-radius: 8px;
  flex-direction: column;
  gap: 6px;
}

.nav.open { display: flex; }

/* ================================
   Hero
   ================================ */
.hero {
  background: linear-gradient(to right, #e0e0e0, #f5f5f5);
  text-align: left;
  padding: 80px 24px;
}

.hero-title {
  font-size: 30px;            /* ← 他セクション見出しと完全同サイズ */
  margin-bottom: 16px;
  width: 100%;
}

.hero-subtitle {
  font-size: 17px;
  margin-bottom: 28px;
}

/* Hero layout proportions */
.hero .section-box-left { flex: 0 1 65%; }
.hero .section-box-img-right { flex: 0 1 30%; }

/* ================================
   Sections
   ================================ */
.section {
  background: #fafafa;
  padding: 80px 0;
}

.section.dark {
  background: #000;
  color: #fff;
}

.section.dark .section-title,
.section.dark .section-text,
.section.dark p,
.section.dark ol,
.section.dark li {
  color: #fff;
}

.section-title {
  text-align: left;
  max-width: 700px;
  font-size: 30px;            /* ← PCは一段アップ */
  margin: 5px auto;
}

.section-text {
  text-align: left;
  max-width: 700px;
  margin: 0 auto;
}

.section-text p { margin-bottom: 1.2em; }

/* Example box */
.example-box {
  background-color: #f8f8f8;
  padding: 16px 20px;
  border-left: 4px solid #333;
  margin: 32px auto;
  border-radius: 6px;
  max-width: 700px;
}

/* Paragraphs & Lists */
p { line-height: 1.9; }

ol {
  max-width: 700px;
  margin: 0 auto 1em;
  padding-left: 1.5em;
  line-height: 1.8;
  list-style-position: outside;
}

ol li { margin-bottom: 1em; }

.section-content {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: flex-start;
}

.section-box-left,
.section-box-right { flex: 1 1 65%; min-width: 320px; }

.section-box-img-left,
.section-box-img-right { align-self: center; flex: 1 1 30%; min-width: 200px; }

/* ================================
   Services
   ================================ */
.services {
  display: flex;
  justify-content: space-around;
  margin-top: 40px;
  gap: 20px;
  flex-wrap: wrap;
}

.service {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  flex: 1 1 30%;
  min-width: 250px;
}

/* サービス内の副題だけはメイン見出しより小さめ */
#services h3.section-title {
  font-size: 20px !important;
  font-weight: bold;
  line-height: 1.35;
  letter-spacing: .01em;
  margin-top: 28px;
  margin-bottom: 8px;
  color: #333;
}

/* ================================
   CTA
   ================================ */
.cta {
  background: #fafafa;
  text-align: center;
  padding: 80px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cta h2 {
  font-size: 30px;
  margin-bottom: 20px;
}

.cta-button {
  background: #333;
  color: #fff;
  font-size: 18px;
  padding: 16px 36px;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 700;
  display: inline-block;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
  min-height: 44px;
  line-height: 1.2;
}

.cta-button:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
}

/* ================================
   Contact form
   ================================ */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 600px;
  margin: 0 auto 100px;
}

.contact-form input,
.contact-form textarea {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 100%;
  background: #fff;
}

.contact-form button {
  background: #333;
  color: #fff;
  padding: 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  min-height: 44px;
}

.form-title {
  text-align: center;
  font-size: 24px;
  margin: 40px 0;
}

.form-note {
  color: #fff;
  font-size: 14px;
  max-width: 600px;
  margin: 0 auto 20px;
  text-align: left;
}

.form-note a { color: #87cefa; text-decoration: underline; }

.agree-box {
  display: flex;
  justify-content: center;
  margin: 10px 0;
}

.agree-box label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  white-space: nowrap;
}

.agree-box a { color: inherit; text-decoration: underline; }

.submit-button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* ================================
   Footer
   ================================ */
.footer {
  background: #000;
  text-align: center;
  color: #fff;
  padding: 20px 0;
}

.footer-links {
  margin-top: 10px;
  font-size: 14px;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  margin: 0 5px;
  transition: color .2s ease;
}

.footer-links a:hover { color: #fff; }

.img-desktop-only { display: block; }

/* ================================
   Mobile (iPhone-first)
   ================================ */
@media (max-width: 768px) {
  :root {
    --sp-l: max(16px, env(safe-area-inset-left));
    --sp-r: max(16px, env(safe-area-inset-right));
  }

  body {
    font-size: 16px;         /* スマホは読みやすい基準値 */
    line-height: 1.8;
    padding: 0;
  }

  .container {
    width: 100%;
    padding-inline: var(--sp-l) var(--sp-r);
  }

  .hero {
    padding: 56px 0;
    background: linear-gradient(to bottom, #e0e0e0, #f5f5f5); /* 張り付き感の軽減 */
  }

  .hero .container {
    padding-inline: var(--sp-l) calc(var(--sp-r) + 6px);      /* 右側を少し厚めに */
  }

  .hero-title { font-size: 21px; margin-bottom: 12px; }       /* ← セクション見出しと同値に */
  .hero-subtitle { font-size: 16px; margin-bottom: 20px; }

  .section { padding: 56px 0; }
  .section-title { font-size: 21px; margin: 0 auto 12px; max-width: 640px; }

  #services h3.section-title {
    font-size: 18px !important;   /* モバイルではさらに1段だけ小さく */
    font-weight: bold;
    line-height: 1.4;
    letter-spacing: .01em;
    margin-top: 24px;
    margin-bottom: 6px;
  }

  .section-text { max-width: 640px; }
  .section-text p { margin-bottom: 1.05em; }

  ol { padding-left: 1.2em; }
  ol li { margin-bottom: .8em; }

  .section-content { flex-direction: column; align-items: stretch; gap: 16px; }

  .section-box-left, .section-box-right, .section-box-img-left, .section-box-img-right {
    flex: 1 1 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
  }

  .img-desktop-only { display: none !important; }

  .section-box-img-left img, .section-box-img-right img {
    margin: 0 auto;
    max-width: 92%;
  }

  .hero .section-box-img-right img {
    max-width: 84%;
    margin: 0 auto;
    display: block;
  }

  .header .container { padding: 6px 0; }
  .hamburger { font-size: 26px; padding: 8px; }
  .nav { top: 100%; right: 0; left: auto; gap: 6px; padding: 10px; }
  .nav a { padding: 10px 12px; }

  .cta { padding: 56px 16px; }
  .cta h2 { font-size: 21px; }
  .cta-button { font-size: 16px; padding: 14px 18px; width: 100%; max-width: 480px; }

  a, button { min-height: 44px; }
}

/* ================================
   Very Small Devices
   ================================ */
@media (max-width: 375px) {
  .hero-title { font-size: 20px; }
  .section-title { font-size: 20px; }
  .cta-button { font-size: 15px; }
}
