/* =========================================================
  Happyクローバー LP - style.css (clean rewrite)
  - 方針：センター基調 / SPで見切れゼロ / 余計な !important なし
  - Heroの右切れ対策：Hero本体は overflowを切らない + SPは左右padding確保
========================================================= */

:root {
  --green: #00c300;
  --blue: #007aff;
  --text: #1f2937;
  --bg: #ffffff;
  --muted: #f3f4f6;
  --accent: #f59e0b;
  --border: #e5e7eb;
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  --radius: 18px;
}

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

html,
body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background: var(--bg);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  line-height: 1.7;
}

/* 横はみ出しの事故保険（“隠す”ではなく、はみ出し発生を最小化） */
html {
  overflow-x: clip;
}

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

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

/* デフォルトでリストは消す（必要箇所だけ .list を使用） */
ul,
ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* =========================================================
  Layout
========================================================= */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* LP全体はセンター基調 */
body {
  text-align: center;
}

/* =========================================================
  Header
========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
}

.brand__logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain; /* 見切れ防止 */
}

.brand__name {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.top-nav {
  margin-left: auto;
  display: none;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.top-nav a {
  font-weight: 700;
  font-size: 0.95rem;
  color: #111827;
  opacity: 0.9;
}

.top-nav a:hover {
  opacity: 1;
}

.header-cta {
  margin-left: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* =========================================================
  Buttons
========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.2rem;
  border-radius: 14px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.08s ease,
    opacity 0.2s ease;
  white-space: nowrap; /* ボタンは基本1行 */
  line-height: 1.2;
}

.btn:active {
  transform: translateY(1px);
}

.btn--line {
  background: var(--green);
  color: #fff;
}

.btn--tel {
  background: var(--blue);
  color: #fff;
}

.btn--ghost {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}

/* 長文ボタン対策：極端に狭い時だけ折り返し許可 */
@media (max-width: 360px) {
  .btn {
    white-space: normal;
  }
}

/* =========================================================
  Hero
========================================================= */
.hero {
  position: relative;
  isolation: isolate;
  /* 背景拡大分だけを切り、スマホ横スクロールを防ぐ */
  overflow: clip;
  border-bottom: 1px solid var(--border);
  background: #111;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("images/bg1.jpg");
  background-size: cover;
  background-position: center 35%;
  filter: saturate(1.05);
  transform: none;
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.35) 45%,
    rgba(0, 0, 0, 0.65) 100%
  );
  z-index: -1;
}

/* Hero内は「文字が端で切れない」左右余白を常に確保 */
.hero .container {
  padding-left: 16px;
  padding-right: 16px;
}

.hero__inner {
  padding: 44px 0 34px;
}

.badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.98);
  color: #111;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.hero__title {
  margin: 14px auto 8px;
  font-size: clamp(1.7rem, 3.2vw, 2.55rem);
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
  max-width: 22em; /* 1行が長くなりすぎない */
  padding: 0; /* container側で余白確保 */
  overflow-wrap: anywhere; /* 端切れ防止 */
}

.hero__sub {
  margin: 0 auto 18px;
  max-width: 860px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
  overflow-wrap: anywhere; /* 端切れ防止 */
}

.hero-points {
  margin: 0 auto 18px;
  max-width: 840px;
  display: grid;
  gap: 10px;
  text-align: left; /* 文の読みやすさ優先（センター基調でも崩れない） */
}

.hero-points li {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(229, 231, 235, 0.7);
  border-radius: 14px;
  padding: 0.75rem 0.95rem;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.08);
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere; /* 端切れ防止 */
}

.hero-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}

.hero__note {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

/* =========================================================
  Sections
========================================================= */
.section {
  padding: 42px 0;
}

.section__title {
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  margin: 0 0 10px;
}

.section__lead {
  margin: 0 auto 20px;
  max-width: 920px;
  color: #374151;
}

.section__mt {
  margin-top: 14px;
}

.section__mt-sm {
  margin-top: 8px;
}

.mini {
  color: #6b7280;
  font-size: 0.92rem;
}

/* =========================================================
  Grid + Panels
========================================================= */
.grid {
  display: grid;
  gap: 14px;
}

.grid--3 {
  grid-template-columns: 1fr;
}

.grid--2 {
  grid-template-columns: 1fr;
}

.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: none;
}

.panel--muted {
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

/* リストを使う箇所だけ復活 */
.list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  text-align: left;
}

/* =========================================================
  CTA Box
========================================================= */
.cta-box {
  margin-top: 14px;
  background: linear-gradient(90deg, #fff 0%, #e9fce9 40%, #eef5ff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.cta-box__buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* =========================================================
  Plans (Pricing)
========================================================= */
.plans {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
}

.plan {
  position: relative;
  border: 2px solid #b9d7f5;
  border-radius: 18px;
  padding: 18px 16px 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.plan__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 0.35rem 0.75rem;
  font-weight: 900;
  font-size: 0.9rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  white-space: nowrap;
}

.plan__tag--hot {
  background: #ff8a2a;
  color: #fff;
  border-color: transparent;
}

.plan__title {
  margin: 10px 0 6px;
  font-size: 1.1rem;
  font-weight: 900;
}

.plan__price {
  font-size: 1.9rem;
  font-weight: 1000;
  margin: 2px 0 8px;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap; /* 税込66,000円〜 を崩さない */
}

.plan__price small {
  font-size: 1rem;
  font-weight: 900;
  opacity: 0.75;
  white-space: nowrap;
}

.plan__sub {
  margin: 0 0 14px;
  color: #6b7280;
  font-weight: 700;
}

/* チェックは左寄せの方が読みやすい */
.checks {
  display: grid;
  gap: 10px;
  margin: 14px auto 16px;
  text-align: left;
  max-width: 560px;
}

.checks li {
  position: relative;
  padding-left: 28px;
  font-weight: 800;
  color: #111827;
}

.checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #16a34a;
  font-weight: 1000;
}

.plan__warn {
  margin: 10px auto 0;
  max-width: 560px;
  background: #fff1c8;
  border: 2px solid #f7c948;
  color: #7a4b00;
  border-radius: 12px;
  padding: 10px 10px;
  font-weight: 900;
  font-size: 0.9rem;
  white-space: normal;
}

.btn--plan {
  width: min(260px, 100%);
  margin: 0 auto;
  border-radius: 12px;
  background: #00b400;
  color: #fff;
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.12);
}

.price-foot {
  margin-top: 12px;
  color: #6b7280;
  font-size: 0.9rem;
}

/* =========================================================
  Contact CTA Block + Form
========================================================= */
.cta-block-wrap {
  max-width: 860px;
  margin: 0 auto;
}

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

.cta-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 12px;
}

.form-wrap {
  max-width: 760px;
  margin: 18px auto 0;
}

/* =========================================================
  Footer
========================================================= */
.footer {
  padding: 24px 0 28px;
  color: #6b7280;
  text-align: center;
  border-top: 1px solid var(--border);
}

/* =========================================================
  Floating CTA + To Top
========================================================= */
.floating-cta {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  display: grid;
  gap: 8px;
  z-index: 2147483000;
  justify-items: end;
  max-width: calc(100vw - 28px);
}

.floating-cta .btn {
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
  max-width: calc(100vw - 28px);
}

.to-top {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 1000;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.to-top.is-show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* =========================================================
  Anchor offset
========================================================= */
.anchor {
  scroll-margin-top: 78px;
}

/* =========================================================
  Responsive
========================================================= */
@media (min-width: 960px) {
  .top-nav {
    display: flex;
  }

  .header-cta {
    margin-left: 14px;
  }

  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .plans {
    grid-template-columns: repeat(3, 1fr);
  }

  .plan--recommended {
    transform: translateY(-6px);
  }
}

@media (max-width: 959px) {
  .header {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .brand {
    width: 100%;
    justify-content: center;
    min-width: 0;
    flex-direction: column;
    gap: 6px;
  }

  .header-cta {
    width: 100%;
    margin-left: 0;
    justify-content: center;
    display: grid;
    gap: 10px;
  }

  .header-cta .btn {
    width: min(520px, 100%);
  }
}

@media (max-width: 600px) {
  .hero__inner {
    padding: 26px 0 22px;
  }

  .hero__title {
    margin: 10px auto 6px;
    font-size: clamp(1.45rem, 7vw, 1.85rem);
  }

  .hero__sub {
    font-size: 0.98rem;
  }

  .hero-points {
    gap: 10px;
  }

  .hero-points li {
    padding: 0.7rem 0.9rem;
  }

  /* Hero CTAはSPは縦積み */
  .hero-cta {
    display: grid;
    gap: 12px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta .btn {
    width: 100%;
  }

  /* 価格：極端に狭い端末用 */
  .plan__price {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 34px 0;
  }
}

/* =========================
   Floating CTA: scroll表示制御
========================= */
.floating-cta {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.floating-cta.is-show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
/* =========================================================
   Hero 画像出し分け（PC / SP）
========================================================= */

/* PC用（デフォルト） */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../images/hero-pc.png");
  background-size: cover;
  background-position: center 35%;
  filter: saturate(1.05);
  transform: none;
  z-index: -2;
}

/* SP用 */
@media (max-width: 600px) {
  .hero::before {
    background-image: url("../images/hero-sp.png");
    background-position: center 20%;
    transform: scale(1.05);
  }
}
/* ▼ 条件ありカードの注意囲みを控えめに */
.plan__warn {
  background: #fff8e6; /* 薄い黄色 */
  border: 1px solid #f3c45c; /* 枠を細く */
  color: #7a4b00;

  font-size: 0.78rem; /* 文字を小さく */
  font-weight: 700; /* 少し軽く */

  padding: 8px 10px; /* ボックスもコンパクトに */
  border-radius: 10px; /* 少しシャープに */
  max-width: 520px; /* 横幅少し抑える */
}

@media (max-width: 600px) {
  .plan__warn {
    font-size: 0.74rem;
    padding: 7px 8px;
  }
}
/* ▼ 条件カード：囲みとボタンの間に余白を追加 */
.plan__warn {
  margin-bottom: 16px; /* ← ここが重要 */
}

/* ボタンにも少し余裕 */
.btn--plan {
  margin-top: 6px;
}

/* Site contact guidance */
.mail-contact-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 24px;
  align-items: center;
  max-width: 920px;
  margin: 24px auto 0;
  padding: 28px;
  border: 1px solid rgba(31, 107, 69, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 30px rgba(61, 45, 26, 0.09);
  overflow: hidden;
}

.mail-contact-card h3 {
  margin: 0 0 12px;
  color: #145034;
  font-size: clamp(1.18rem, 2vw, 1.45rem);
  line-height: 1.45;
}

.mail-contact-card p {
  margin: 0;
  color: #5f574f;
  line-height: 1.8;
}

.mail-contact-card ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.mail-contact-card li {
  position: relative;
  padding: 0.35em 0 0.35em 1.45em;
  color: #4a433b;
  font-weight: 700;
  line-height: 1.7;
}

.mail-contact-card li::before {
  content: "";
  position: absolute;
  top: 0.95em;
  left: 0;
  width: 0.65em;
  height: 0.65em;
  border-radius: 50%;
  background: #ef8a23;
}

.mail-contact-card__action {
  min-width: 0;
  text-align: center;
}

.mail-contact-btn,
a.mail-contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 320px);
  min-height: 56px;
  padding: 14px 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, #3f8b5d 0%, #1f6b45 100%);
  color: #fff !important;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(31, 107, 69, 0.24);
}

.mail-contact-card__action p {
  margin-top: 12px;
  font-size: 0.92rem;
}

.btn--mail,
.cta-btn--mail,
a.btn--mail,
a.cta-btn--mail {
  background: linear-gradient(180deg, #3f8b5d 0%, #1f6b45 100%);
  color: #fff !important;
}

@media (max-width: 768px) {
  .mail-contact-card {
    padding: 22px 18px;
  }
}
