/*
 * custom.css
 * Tailwind CSS（ユーティリティクラス）でカバーしにくい部分のスタイル。
 *   1. 円形スコアゲージ（JSで値を書き換える conic-gradient）
 *   2. デザイン部品
 *      形（角丸・影・ボタン・ヘッダー・フッターの寸法）は兄弟サイト「となりのまもるくん」（mamoru.otonari-works.jp）に準拠。
 *      色は、さとるくん独自の「安心感のあるティール〜グリーン」（まもるくんは青系）。
 * 色の名前（brand / accent / teal / navy / page）は templates/partials/header.php の tailwind.config と対応する。
 */

:root {
  --c-text: #333;
  --c-page: #F3FAF8;     /* ごく薄いミント */
  --c-accent: #0D9488;   /* ティール（強調・フォーカス） */
  --c-teal: #0F766E;     /* 深いティール（文字リンク・帯） */
  --c-green: #10B981;    /* エメラルド */
  --c-navy: #12312E;     /* フッター（深い緑紺） */
  --header-h: 108px;      /* ヘッダーの高さ（スクロール位置の調整に使う） */
  /* 見出しの文字に使うメインのグラデーション（ティール→エメラルド） */
  --g-text: linear-gradient(30deg, #0F766E 10%, #0D9488 55%, #10B981 110%);
  /* 主ボタン（ティール。白文字が読めるよう左側を濃くしている） / 副ボタン（赤〜橙。注意を引く用途） */
  --g-btn: linear-gradient(96deg, #0F766E 0%, #0D9488 50%, #2DD4BF 100%);
  --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.05);
}

html { scroll-behavior: smooth; }
body {
  color: var(--c-text);
  background: var(--c-page);
  line-height: 1.8;
}
/* ページ内リンクで移動したとき、固定ヘッダーに隠れないようにする */
[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

/* ===========================
   1. スコアゲージ
   =========================== */
.score-ring {
  --score-pct: 0;
  --ring-color: #0D9488;
  background: conic-gradient(var(--ring-color) calc(var(--score-pct) * 1%), #e2e8f0 0);
}
.score-ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  background: #ffffff;
  border-radius: 9999px;
}
.score-ring.grade-A { --ring-color: #1fa96b; }
.score-ring.grade-B { --ring-color: #4a90e2; }
.score-ring.grade-C { --ring-color: #e2a72a; }
.score-ring.grade-D { --ring-color: #e2762a; }
.score-ring.grade-E { --ring-color: #e24a4a; }

/* ===========================
   2. デザイン部品
   =========================== */

/* グラデーション文字 */
.gradient-text {
  background: var(--g-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* セクション見出し（中央・グラデーション文字） */
.section-ttl {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.5;
  margin: 0 auto 40px;
  width: fit-content;
  background: var(--g-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-sub { text-align: center; color: #666; margin: -24px auto 40px; max-width: 42rem; }
@media (max-width: 768px) {
  .section-ttl { font-size: 1.5rem; }
}

/* ヘッダー（まもるくんと同じ寸法：上下8px・キャプション0.7rem・ロゴ高さ50px・幅90%/最大1200px） */
.site-header {
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}
/* まもるくんはロゴを h1（2em・行間1.8）の中にインライン画像で置いているため、同じ行の高さになるよう font-size をそろえる */
.site-logo { display: block; font-size: 2rem; line-height: 1.8; font-weight: 700; }
.site-logo__caption { display: block; font-size: 0.7rem; letter-spacing: 0.02rem; margin-bottom: 0.3rem; color: #333; line-height: 1.8; }
.site-logo__img { display: inline; height: 50px; width: auto; vertical-align: baseline; }
.site-nav a { color: #555; font-weight: 600; font-size: 0.9rem; transition: color 0.3s; }
.site-nav a:hover { color: var(--c-accent); }
.site-nav a.btn-pill { color: #fff; }

/* スマホ用メニュー（ハンバーガー） */
.menu-toggle { display: none; width: 40px; height: 40px; position: relative; background: none; border: 0; cursor: pointer; }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  position: absolute; left: 8px; width: 24px; height: 2px; background: #333; content: ""; transition: all 0.3s ease;
}
.menu-toggle span { top: 19px; }
.menu-toggle span::before { left: 0; top: -8px; }
.menu-toggle span::after { left: 0; top: 8px; }
.menu-toggle.is-open span { background: transparent; }
.menu-toggle.is-open span::before { top: 0; transform: rotate(45deg); }
.menu-toggle.is-open span::after { top: 0; transform: rotate(-45deg); }
@media (max-width: 767px) {
  .menu-toggle { display: block; }
  /* ヘッダー（sticky）の直下に開く */
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: rgba(255, 255, 255, 0.97); padding: 1.5rem; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
  .site-nav.is-open { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }
}

/* ピル型ボタン（右に矢印・ホバーで浮く） */
.btn-pill {
  display: inline-block;
  position: relative;
  border: 0;
  border-radius: 64px;
  padding: 0 48px 0 32px;
  line-height: 56px;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  color: #fff;
  background: var(--g-btn);
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.28);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  white-space: nowrap;
}
.btn-pill::after {
  /* 矢印（CSSで描く） */
  content: "";
  position: absolute;
  right: 24px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-top: 2.5px solid currentColor;
  border-right: 2.5px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
  transition: right 0.3s ease-in-out;
}
.btn-pill:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(13, 148, 136, 0.38); }
.btn-pill:hover::after { right: 18px; }
.btn-pill:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-pill--outline { background: #fff; color: var(--c-teal); box-shadow: inset 0 0 0 2px var(--c-accent), 0 2px 10px rgba(13, 148, 136, 0.12); }
.btn-pill--outline:hover { background: var(--c-page); box-shadow: inset 0 0 0 2px var(--c-accent), 0 6px 18px rgba(13, 148, 136, 0.2); }
.btn-pill--white { background: #fff; color: var(--c-teal); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12); }
.btn-pill--sm { line-height: 42px; font-size: 0.88rem; padding: 0 40px 0 24px; }
.btn-pill--sm::after { right: 18px; width: 7px; height: 7px; }
.btn-pill--lg { line-height: 68px; font-size: 1.2rem; padding: 0 56px 0 36px; }

/* ヒーロー（背景画像はまもるくんの #hero と同じ指定：中央・cover、下端を背景色へフェード） */
.hero {
  position: relative;
  background: #d9f2ec url(../img/bg_satoru.jpg) no-repeat center / cover;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 120px;
  background: linear-gradient(to bottom, transparent, var(--c-page));
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero-char { flex: 1; max-width: 480px; text-align: right; }
.hero-char img { max-width: 100%; height: auto; display: inline-block; }
@media (max-width: 1023px) {
  .hero-char { margin: 0 auto; text-align: center; max-width: 400px; }
}
.hero-badge {
  display: inline-block;
  border-radius: 100px;
  padding: 4px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.25);
  color: var(--c-teal);
}
.hero-badge--sub { background: rgba(16, 185, 129, 0.08); border-color: rgba(16, 185, 129, 0.3); color: #047857; }
@media (max-width: 480px) {
  /* スマホでもバッジを1行に収める */
  .hero-badge { font-size: 0.78rem; padding: 4px 12px; }
}
.hero-title {
  font-weight: 900;
  line-height: 1.35;
}
.hero-title .em {
  background: var(--g-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* URL入力セクション（MVの直下・横幅いっぱい・中央寄せ） */
.check-band {
  background:
    radial-gradient(ellipse at 15% 0%, rgba(45, 212, 191, 0.25), transparent 60%),
    linear-gradient(135deg, #d9f3ec 0%, #c8ede4 100%);
  border-top: 1px solid rgba(13, 148, 136, 0.15);
  border-bottom: 1px solid rgba(13, 148, 136, 0.15);
}

/* 入力欄（角丸・フォーカスでティール） */
.input-soft {
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  transition: border-color 0.3s;
}
.input-soft:focus { outline: none; border-color: var(--c-accent); }

/* カード */
.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}
.card-hover { transition: transform 0.3s, box-shadow 0.3s; }
.card-hover:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(13, 148, 136, 0.12); }

/* お悩みのチェックマーク */
.worry-check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  background: var(--g-btn);
  position: relative;
  margin-top: 2px;
}
.worry-check::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 6px;
  width: 7px;
  height: 12px;
  border-right: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(45deg);
}

/* STEP番号（丸ゴシックのグラデーション数字） */
.step-num {
  font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
  background: var(--g-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* FAQ（<details>：グラデーションの Q と ＋／－） */
.faq-item { background: #fff; border: 1px solid #e8e8e8; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.04); transition: border-color 0.3s, box-shadow 0.3s; }
.faq-item:hover { border-color: rgba(13, 148, 136, 0.25); box-shadow: 0 4px 20px rgba(13, 148, 136, 0.07); }
.faq-item > summary { list-style: none; position: relative; cursor: pointer; padding: 18px 56px 18px 48px; font-weight: 600; }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary .faq-q {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  font-size: 1.2rem; font-weight: 900;
  background: var(--g-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.faq-item > summary::before, .faq-item > summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 16px; height: 3px; background: var(--g-text); transition: transform 0.3s;
}
.faq-item > summary::before { transform: rotate(90deg); }
.faq-item[open] > summary::before { transform: rotate(0deg); }
.faq-item .faq-a { padding: 0 20px 18px 48px; color: #555; font-size: 0.95rem; }

/* お問い合わせ帯・中盤のCTA帯（深いティールの上に白い文字・カード） */
.band-contact { background: linear-gradient(135deg, #0F766E 0%, #0D9488 100%); }

/* 日本語の改行を読みやすく：文節で折り返し（Chrome・Edge）、行末の1〜2文字残りを防ぐ、見出しは行の長さをそろえる。
   iPhoneのSafariは auto-phrase 非対応のため、切れてほしくない語句は .nowrap でまとめる */
/* 文節での改行は見出し・中央寄せの短い文だけ（長い本文に使うと行の長さが不ぞろいになる） */
h1, h2, h3, summary, .section-sub, .text-center, .hero p, .lp-sec--worries li, .evidence-card strong, #grade-text, #projected-text, #impact-panel .font-semibold, #urgent-panel .font-bold { word-break: auto-phrase; }
.text-left, .text-left p { word-break: normal; }
p, li, dd, dt, summary, td { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }
.nowrap { display: inline-block; }

/* コンテンツ幅（まもるくんの .container と同じ。Tailwind の .container と衝突しないよう別名） */
.l-container { width: 90%; max-width: 1200px; margin-left: auto; margin-right: auto; }

/* 情報セクション（まもるくんと同じく、横幅いっぱいの背景を切り替えてメリハリをつける） */
.lp-sec { padding: 80px 0; position: relative; }
.lp-band { padding: 56px 0; }
.lp-sec--white { background: #fff; }
.lp-sec--evidence { background: #fff; padding-top: 120px; }
.lp-sec--features { background: linear-gradient(180deg, var(--c-page) 0%, #e3f5f0 100%); }
#worries[hidden] + .lp-sec--evidence { padding-top: 80px; } /* 結果表示中はお悩み（三角）を隠すので通常の余白に戻す */
.lp-sec--faq { background: var(--c-page); }
.lp-sec--final { background: linear-gradient(180deg, var(--c-page) 0%, #e3f5f0 100%); }
/* お悩み：白→淡いティール、下端に下向きの三角（まもるくんの #issues::after と同じ作り） */
.lp-sec--worries { background: linear-gradient(to bottom, #fff 0%, #c9efe6 100%); padding-bottom: 56px; z-index: 2; }
.lp-sec--worries::after {
  content: '';
  position: absolute;
  bottom: -4.9rem;
  left: 30%;
  width: 40%;
  height: 5rem;
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  background-color: #c9efe6;
}
@media (max-width: 768px) {
  .lp-sec { padding: 60px 0; }
  .lp-band { padding: 44px 0; }
  .lp-sec--evidence { padding-top: 90px; }
  .lp-sec--worries { padding-bottom: 40px; }
  .lp-sec--worries::after { bottom: -2.9rem; height: 3rem; }
}

/* データで見る、AI検索の今（第三者の調査結果のカード） */
.evidence-card { display: flex; flex-direction: column; }
.evidence-step { font-size: 0.75rem; font-weight: 700; color: var(--c-teal); }
.evidence-figure { font-size: 2.4rem; font-weight: 900; line-height: 1.3; background: var(--g-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.evidence-src { margin-top: auto; padding-top: 10px; font-size: 0.75rem; color: #8a94a3; }
.evidence-src a { color: inherit; text-decoration: underline; }

/* 診断結果：今すぐ確認が必要なこと・手間の目安・PDFでわかること・無料相談 */
.urgent-box { background: #fff5f5; border: 2px solid #f5b5b5; border-radius: 16px; padding: 16px 20px; }
.effort { display: inline-block; font-size: 0.7rem; font-weight: 600; padding: 1px 8px; border-radius: 100px; margin-left: 4px; white-space: nowrap; vertical-align: middle; }
.effort--easy { background: #e6f6f2; color: #0F766E; }
.effort--mid { background: #eef2f7; color: #475569; }
.effort--hard { background: #fdf3e3; color: #9a5b0f; }
.lead-points li { position: relative; padding-left: 1.6em; margin-bottom: 4px; }
.lead-points li::before { content: '✓'; position: absolute; left: 0.2em; font-weight: 700; color: #5EEAD4; }
.consult-box { border-radius: 10px; }
.consult-box--strong { background: #e6f6f2; border: 1px solid #a7e3d6; padding: 10px 12px; }

/* 最後のCTA */
.final-cta { background: #fff; border-radius: 28px; box-shadow: 0 8px 48px rgba(13, 148, 136, 0.1); border: 2px solid rgba(13, 148, 136, 0.1); }

/* フッター（まもるくんの footer と同じ寸法。色はさとるくんの深い緑紺） */
.site-footer {
  background: var(--c-navy);
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 24px 16px;
  font-size: 0.85rem;
  line-height: 1.8;
}
.footer-company { margin-top: 6px; }
.footer-company a { color: rgba(255, 255, 255, 0.85); text-decoration: underline; text-underline-offset: 3px; }
.footer-company a:hover { color: #5EEAD4; }
@media (max-width: 768px) {
  .footer-company-sub { display: block; }
}
