/* Daddy's BASE 会社サイトのスタイル。外部フォント・外部スクリプトは使わない（CSP で禁止している）。
   編集元は websites/daddys-base/tools/build_site.py の出力するページ。market-scan/ の下書きページは旧 style.css のまま。 */
:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --surface-2: #f3f1ed;
  --ink: #16181d;
  --ink-2: #3b4049;
  --muted: #6b7180;
  --line: #e7e4de;
  --accent: #e2531f;
  --accent-2: #f59a3d;
  --accent-ink: #ffffff;
  --accent-soft: #fdeee6;
  --hero-bg: #121418;
  --hero-ink: #f5f3ef;
  --hero-muted: #b5b8c0;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(22, 24, 29, .04), 0 8px 24px rgba(22, 24, 29, .06);
  --max: 1120px;
  color-scheme: light;
}

/* IBM Plex Sans JP（SIL OFL 1.1・assets/fonts/OFL.txt）。ページで使う文字だけに絞ってある（build_site.py の build_fonts） */
@font-face { font-family: "Plex JP"; src: url("/assets/fonts/plex-jp-400.woff2") format("woff2"); font-weight: 100 500; font-display: block; }
@font-face { font-family: "Plex JP"; src: url("/assets/fonts/plex-jp-700.woff2") format("woff2"); font-weight: 600 900; font-display: block; }

*, *::before, *::after { box-sizing: border-box; }
/* 短いページと長いページでスクロールバーの有無が変わり、横に揺れるのを防ぐ */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Plex JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: .03em;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.35; letter-spacing: .01em; margin: 0 0 .6em; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: var(--surface); padding: 8px 14px; border-radius: 8px; }

/* ヘッダー：左にメニュー、真ん中に社名、右にお問い合わせ */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; height: 64px; }
.header-left { display: flex; align-items: center; min-width: 0; }
.header-right { display: flex; justify-content: flex-end; }
.brand { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.05rem; letter-spacing: .16em; white-space: nowrap; }
.site-nav { display: flex; gap: 2px; }
/* 広い画面だけ、文字の左端を本文にそろえる（狭いと丸い背景が画面の端に付くため） */
@media (min-width: 1180px) { .site-nav { margin-left: -12px; } }
.site-nav a, .nav-cta {
  color: var(--ink-2); text-decoration: none; font-size: .9rem;
  padding: 8px 12px; border-radius: 999px; white-space: nowrap; line-height: 1.4;
}
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.nav-cta { background: var(--ink); color: var(--bg); font-weight: 700; padding: 8px 16px; }
.nav-cta:hover { opacity: .88; }

/* スマホのプルダウン（details を使うので JS は不要） */
.menu { display: none; position: static; }
.menu summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 12px 0 10px; margin-left: -10px; border-radius: 999px; font-size: .88rem; color: var(--ink-2);
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover { background: var(--surface-2); }
.burger, .burger::before, .burger::after { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
.burger { position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -6px; }
.burger::after { top: 6px; }
.menu[open] .burger { background: transparent; }
.menu[open] .burger::before { transform: translateY(6px) rotate(45deg); }
.menu[open] .burger::after { transform: translateY(-6px) rotate(-45deg); }
.menu-panel {
  position: absolute; left: 0; right: 0; top: 64px;
  background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0, 0, 0, .08);
  padding: 8px 16px 16px; display: grid;
}
.menu-panel a { color: var(--ink); text-decoration: none; padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 1rem; }
.menu-panel a:last-child { border-bottom: 0; }
.menu-panel a[aria-current="page"] { color: var(--accent); font-weight: 700; }
@media (max-width: 1039px) {
  .site-nav { display: none; }
  .menu { display: block; }
  .header-inner { gap: 8px; }
}
.nav-cta { display: inline-flex; align-items: center; gap: 6px; }
.cta-icon { display: none; flex: none; }
/* スマホの狭い幅では、お問い合わせを封筒のアイコンだけの丸いボタンにする（メニューの中にも文字で入っている） */
@media (max-width: 480px) {
  .menu-label { display: none; }
  .brand { font-size: .95rem; letter-spacing: .12em; }
  .nav-cta { width: 40px; height: 40px; padding: 0; justify-content: center; }
  .cta-icon { display: block; }
  .cta-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* ヒーロー */
.hero {
  position: relative; overflow: hidden;
  background: var(--hero-bg); color: var(--hero-ink);
  padding: clamp(72px, 12vw, 136px) 0 clamp(64px, 10vw, 112px);
  isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(48rem 28rem at 85% -10%, rgba(226, 83, 31, .45), transparent 60%),
    radial-gradient(36rem 24rem at 10% 110%, rgba(245, 154, 61, .22), transparent 60%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35;
  background-image:
    linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 70%);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.hero .eyebrow { color: var(--accent-2); }
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.hero .wrap { container-type: inline-size; }
.hero-title { font-size: min(3.2rem, 100cqi / 21.6); font-weight: 700; letter-spacing: 0; white-space: nowrap; margin-bottom: 20px; line-height: 1.3; }
.hero-title em { font-style: normal; color: var(--accent-2); }
.hero .lead { color: var(--hero-muted); font-size: clamp(1rem, 1.6vw, 1.12rem); max-width: 36em; margin-bottom: 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; font-weight: 700; font-size: .95rem;
  text-decoration: none; transition: transform .15s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost { color: inherit; border: 1px solid currentColor; opacity: .9; }
.btn-dark { background: var(--ink); color: var(--bg); }
.arrow::after { content: "→"; display: inline-block; margin-left: .4em; transition: transform .15s ease; }
.btn:hover .arrow::after, a:hover > .arrow::after { transform: translateX(3px); }

/* ページの見出し（下層ページ） */
.page-head { padding: clamp(48px, 8vw, 88px) 0 clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--surface-2), var(--bg)); }
.page-head h1 { font-size: clamp(1.8rem, 4.4vw, 2.7rem); font-weight: 700; margin-bottom: 12px; }
.page-head p { color: var(--muted); max-width: 44em; margin: 0; }
.breadcrumb { font-size: .82rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumb span[aria-hidden] { margin: 0 6px; opacity: .6; }

/* セクション */
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section + .section { padding-top: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 700; margin: 0; }
.section-head p { color: var(--muted); margin: 6px 0 0; max-width: 40em; }
.more { font-weight: 700; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }

/* カード */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-2 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 3vw, 30px); box-shadow: var(--shadow);
}
.card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card .num { font-size: .78rem; font-weight: 700; letter-spacing: .12em; color: var(--accent); margin-bottom: 14px; display: block; }
.muted { color: var(--muted); }

/* アプリのカード */
.app-card {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); color: inherit; text-decoration: none;
  transition: transform .18s ease, border-color .18s ease;
}
a.app-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.app-card .top { display: flex; align-items: center; gap: 14px; }
.app-icon { width: 60px; height: 60px; border-radius: 15px; flex: none; box-shadow: 0 0 0 1px var(--line); }
.app-icon.lg { width: 96px; height: 96px; border-radius: 23px; }
.app-card h3 { font-size: 1.12rem; margin: 0; }
.app-card .cat { font-size: .78rem; color: var(--muted); font-weight: 600; }
.app-card p { color: var(--ink-2); font-size: .95rem; margin: 0; }
.app-card .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 6px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .76rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag { font-size: .76rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); }

/* 表（会社概要） */
.facts { width: 100%; border-collapse: collapse; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: 18px 4px; border-bottom: 1px solid var(--line); }
.facts tr:first-child th, .facts tr:first-child td { border-top: 1px solid var(--line); }
.facts th { width: 11em; color: var(--muted); font-weight: 600; font-size: .92rem; padding-right: 16px; }
@media (max-width: 560px) {
  .facts th, .facts td { display: block; width: auto; padding: 0; border: 0; }
  .facts th { padding-top: 16px; font-size: .82rem; }
  .facts td { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
  .facts tr:first-child th { border-top: 1px solid var(--line); }
  .facts tr:first-child td { border-top: 0; }
}

/* 2カラム（下層ページ） */
.split { display: grid; gap: clamp(24px, 5vw, 64px); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .split { grid-template-columns: 240px minmax(0, 1fr); } }
.toc { position: sticky; top: 88px; align-self: start; font-size: .9rem; }
.toc p { font-weight: 700; color: var(--muted); font-size: .78rem; letter-spacing: .1em; margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc li a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; }
.toc li a:hover { color: var(--accent); border-left-color: var(--accent); }
@media (max-width: 899px) { .toc { position: static; } }

/* 本文（規程など） */
.prose { max-width: 46em; }
.prose h2 { font-size: 1.3rem; margin-top: 2.4em; padding-top: .4em; scroll-margin-top: 88px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.05rem; margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
.prose .meta { color: var(--muted); font-size: .9rem; }

/* 機能の一覧（アプリのページ） */
.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.features li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 20px 18px 50px; position: relative; }
.features li::before {
  content: ""; position: absolute; left: 18px; top: 22px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 5px var(--accent-soft), inset 0 0 0 9px var(--accent);
}
.features strong { display: block; margin-bottom: 2px; }
.features span { color: var(--muted); font-size: .92rem; }
.app-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.app-hero .meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.note {
  border-left: 3px solid var(--accent-2); background: var(--surface-2);
  padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: .92rem; color: var(--ink-2);
}

/* 区分の見出し（アプリ一覧） */
.group-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 18px; }
.group-head h2 { font-size: 1.35rem; margin: 0; }
.group-head span { color: var(--muted); font-size: .9rem; }
.group + .group { margin-top: 56px; }

/* お問い合わせの帯 */
.cta-band {
  border-radius: calc(var(--radius) + 8px); padding: clamp(32px, 6vw, 56px);
  background: var(--hero-bg); color: var(--hero-ink); position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(30rem 18rem at 100% 0%, rgba(226, 83, 31, .5), transparent 65%);
}
.cta-band h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 6px; }
.cta-band p { color: var(--hero-muted); margin: 0; }

/* メールの表示 */
.mail {
  display: inline-flex; align-items: center; gap: 10px; font-size: clamp(1.05rem, 2.4vw, 1.3rem); font-weight: 700;
  padding: 14px 20px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; word-break: break-all;
}
.mail:hover { border-color: var(--accent); }

/* フッター */
.site-footer { margin-top: clamp(56px, 9vw, 104px); border-top: 1px solid var(--line); padding: 48px 0 32px; font-size: .9rem; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.footer-grid h2 { font-size: .82rem; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-grid a { color: var(--ink-2); text-decoration: none; }
.footer-grid a:hover { color: var(--accent); text-decoration: underline; }
.footer-about p { color: var(--muted); margin: 10px 0 0; }
.copyright { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; display: flex; justify-content: flex-end; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* 小さな調整（CSP で style 属性が使えないためクラスで指定） */
.mt { margin-top: 20px; }
.mt-lg { margin-top: 3em; }
.h-sm { font-size: 1.2rem; }
.list { padding-left: 1.2em; margin: 0; }

/* ヒーローは中央ぞろえ（2026-10-07 の指示）。見出しの上のラベルは左右に線を付けて釣り合わせる */
.hero .wrap { text-align: center; }
.hero .eyebrow::after { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.hero .lead { margin-inline: auto; text-wrap: balance; word-break: auto-phrase; }
.hero .actions { justify-content: center; }

/* よくあるご質問のカードは、中身を上下左右の中央にそろえる（2026-10-07 の指示） */
.faq .card, .center-card { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.faq .card p, .center-card p { text-wrap: balance; word-break: auto-phrase; }
.center-card a[href^="mailto:"] { white-space: nowrap; }

/* 本文の h2 はすべて左右中央（2026-10-07 の指示）。見出しの周り（上のラベル・説明・「〜へ」のリンク）も合わせて中央に寄せる。
   フッターの列の見出しは、下のリンクが左ぞろえなので対象外 */
main h2 { text-align: center; }
.section-head { flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.section-head p { margin-inline: auto; }
.section-head .eyebrow::after { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.group-head { justify-content: center; }
.cta-band { flex-direction: column; justify-content: center; text-align: center; }
/* カードが1枚だけのときは、中央の見出しに合わせて真ん中に置く */
@media (min-width: 760px) { .grid-2:has(> :only-child) { grid-template-columns: minmax(0, 560px); justify-content: center; } }
/* 住所などが「577- / 1」のように切れないよう、言葉の切れ目で折り返す */
.facts td, .footer-about p { word-break: auto-phrase; }
.cta-band p, .section-head p, .page-head p { text-wrap: balance; word-break: auto-phrase; }
.nw { white-space: nowrap; }

/* お問い合わせの帯は、黒地をやめてページの背景に溶け込ませる（2026-10-07 の指示） */
.cta-band { background: var(--bg); color: var(--ink); }
.cta-band::before { content: none; }
.cta-band p { color: var(--muted); }

/* 一番上のキャッチコピーの背景も、黒地をやめてページの背景より少しだけ濃い色にする（2026-10-07 の指示） */
.hero { background: var(--surface-2); color: var(--ink); border-bottom: 1px solid var(--line); }
.hero::before, .hero::after { content: none; }
.hero .lead { color: #565b68; } /* 少し濃い背景でも読みやすい濃さ（コントラスト比 4.5 以上）*/
.hero-title em { color: var(--accent); }
/* 説明文を消したので、見出しとボタンの間を少し空け、上下の余白をそろえる */
.hero { padding: clamp(64px, 10vw, 120px) 0; }
.hero-title { margin-bottom: clamp(24px, 3vw, 36px); }

/* 下層ページの見出し（パンくず・ページ名・説明）も中央ぞろえ（2026-10-07 の指示） */
.page-head .wrap { text-align: center; }
.page-head p { margin-inline: auto; }
.app-hero { flex-direction: column; justify-content: center; }
.app-hero .meta-row { justify-content: center; }
