/* ============================================================
   Ambiral LP v3 — 白 × ネイビー #1F3557 × 淡ブルー（2026-07-18 確定。eggshellは廃止）
   type scale / spacing / components を統一する共通スタイル
   ============================================================ */
:root {
  --paper: #FFFFFF;
  --wash: #F7F8FB;            /* 交互帯: 青みの淡いウォッシュ */
  --shell: #E7EDF7;           /* 淡ブルー: アクセント面（旧eggshellを置換） */
  --shell-soft: #EFF3FA;      /* 淡ブルーのさらに淡 */
  --ink: #0D1321;
  --sub: #3E5C76;
  --faint: #748CAB;
  --line: rgba(62, 92, 118, 0.18);
  --line-soft: rgba(62, 92, 118, 0.10);
  --navy: #1F3557;
  --navy-deep: #152540;
  --shadow: 0 14px 40px rgba(13, 19, 33, 0.08);
  --shadow-hover: 0 18px 44px rgba(13, 19, 33, 0.13);
  --r: 12px;                  /* 角丸は 12px に統一 */
  /* 互換エイリアス（HTML内インラインスタイルが旧トークン名を参照） */
  --accent: var(--navy);
  --accent-deep: var(--navy-deep);
  --accent-soft: var(--shell);
  --panel: var(--wash);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 76px; } /* sticky header ぶんアンカー位置を下げる */
body {
  margin: 0;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: var(--ink); background: var(--paper);
  line-height: 1.9; font-size: 15px;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt";
  min-height: 100vh; display: flex; flex-direction: column;
}
body > * { width: 100%; }
.site-footer { margin-top: auto; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px; }
::selection { background: var(--shell); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft); z-index: 50; }
.nav { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { font-weight: 800; font-size: 16px; letter-spacing: .01em; margin-right: auto; color: var(--ink); text-decoration: none; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav a { color: var(--ink); text-decoration: none; font-size: 13.5px; position: relative; white-space: nowrap; }
.nav a:not(.cta):not(.brand)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 2px; background: var(--navy); transition: right .25s ease; }
.nav a:not(.cta):not(.brand):hover::after, .nav a.now::after { right: 0; }
.nav a.now { font-weight: 700; }
.nav .cta { background: var(--navy); color: #fff; padding: 10px 20px; border-radius: 8px; font-weight: 700; white-space: nowrap; flex-shrink: 0; transition: background .2s, transform .15s; }
.nav .cta:hover { background: var(--navy-deep); }
.nav .cta:active { transform: scale(.97); }
/* ハンバーガーボタン: PCでは非表示、スマホで表示 */
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; padding: 0; background: none; border: 0; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 1040px) { .nav-links { gap: 18px; } }
@media (max-width: 800px) {
  .nav { height: 54px; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 54px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line-soft); box-shadow: 0 12px 24px rgba(13,19,33,.08);
    padding: 8px 0; max-height: 0; overflow: hidden; opacity: 0; pointer-events: none; transition: max-height .28s ease, opacity .2s;
  }
  .nav-links.open { max-height: 380px; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 13px 24px; font-size: 15px; }
  .nav-links a:not(.cta)::after { display: none; }
  .nav-links .cta { margin: 8px 24px 4px; text-align: center; }
  /* ヘッダー直下の空きを詰める（上部paddingを縮小） */
  #top { padding-top: 20px !important; }
}

/* ---------- sections ---------- */
section { padding: 88px 0; }
section.alt { background: var(--wash); }
h2.sec { font-size: 27px; line-height: 1.5; margin: 0 0 12px; letter-spacing: .01em; font-weight: 800; text-wrap: balance; text-align: center; }
h2.sec::after { content: ""; display: block; width: 44px; height: 3px; background: var(--navy); border-radius: 2px; margin: 16px auto 0; }
.sec-lead { color: var(--sub); margin: 0 auto 40px; max-width: 42em; font-size: 15px; text-align: center; }
main section + section, body > section + section { border-top: 1px solid var(--line-soft); }
.sec-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.more-link { display: inline-block; color: var(--navy); font-weight: 700; font-size: 13.5px; text-decoration: none; border-bottom: 1px solid transparent; }
.more-link:hover { border-bottom-color: var(--navy); }

/* ---------- buttons ---------- */
.btn { display: inline-block; text-decoration: none; font-weight: 700; font-size: 14px; border-radius: 8px; padding: 13px 26px; transition: background .2s, transform .15s, box-shadow .2s; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-deep); box-shadow: var(--shadow); }
.btn-primary:active { transform: scale(.97); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--navy); }

/* ---------- form card ---------- */
.form-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 26px 28px 28px; box-shadow: var(--shadow); overflow: hidden; }
.form-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--navy) 0%, #3E5C76 70%, var(--shell) 100%); }
.form-card h2 { font-size: 16.5px; margin: 4px 0 4px; }
.form-card .fnote { font-size: 12.5px; color: var(--faint); margin: 0 0 16px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.seg button { border: 0; background: #fff; padding: 10px 4px; cursor: pointer; font-family: inherit; font-size: 13px; color: var(--sub); transition: background .2s, color .2s; }
.seg button.on { background: var(--navy); color: #fff; font-weight: 700; }
.form-card label { display: block; font-size: 12.5px; font-weight: 700; margin: 12px 0 5px; color: var(--sub); }
.form-card input, .form-card select, .form-card textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; background: #fff; color: var(--ink); font-family: inherit; transition: border-color .2s; }
.form-card input:hover, .form-card select:hover { border-color: var(--faint); }
.form-card input:focus, .form-card select:focus, .form-card textarea:focus { outline: 2px solid var(--navy); outline-offset: 1px; border-color: transparent; }
.form-card .submit { width: 100%; margin-top: 18px; padding: 13px; background: var(--navy); color: #fff; border: 0; border-radius: 8px; font-size: 14.5px; font-weight: 700; cursor: pointer; font-family: inherit; transition: background .2s, transform .15s; }
.form-card .submit:hover { background: var(--navy-deep); }
.form-card .submit:active { transform: scale(.98); }
.form-ok { display: none; text-align: center; padding: 32px 8px; }
.form-ok h3 { font-size: 16px; margin: 0 0 6px; }
.form-ok p { font-size: 13px; color: var(--sub); margin: 0; }

/* ---------- generic grids & cards ---------- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { border: 1px solid var(--line); border-radius: var(--r); padding: 24px 26px; background: #fff; }
.card h3 { margin: 0 0 6px; font-size: 16.5px; line-height: 1.6; }
.card p { font-size: 13.5px; color: var(--sub); margin: 6px 0 0; }
a.cardlink { display: block; text-decoration: none; color: inherit; transition: box-shadow .25s ease, transform .25s ease, border-color .25s; }
a.cardlink:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); border-color: rgba(29,45,68,.35); }
.ind { font-size: 11.5px; color: var(--navy); font-weight: 700; letter-spacing: .04em; }
.cthumb { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; border: 1px solid var(--line-soft); margin-bottom: 14px; background: var(--wash); }
.case-hero { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; border: 1px solid var(--line-soft); margin: 4px 0 8px; }

/* 課題カード: 白カードでなく shell 面で変化をつける */
.pain { border: 0; border-radius: var(--r); padding: 28px 30px; background: var(--shell-soft); }
.pain h3 { margin: 0 0 8px; font-size: 17px; }
.pain p { font-size: 13.5px; color: var(--sub); margin: 0; }
.pain { text-align: center; }
.pain p { text-align: left; }
.picon { display: block; width: 40px; height: 40px; margin: 2px auto 14px; opacity: .9; }

/* 解決: 番号つき縦リスト（カード3並びとの重複を避ける） */
.solve { display: grid; grid-template-columns: 56px 1fr; gap: 0 22px; padding: 26px 0; border-bottom: 1px solid var(--line-soft); align-items: start; }
.solve:last-of-type { border-bottom: 0; }
.solve .snum { width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: var(--shell); font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.solve h3 { margin: 8px 0 6px; font-size: 17.5px; }
.solve p { margin: 0; font-size: 14px; color: var(--sub); max-width: 44em; }

/* ---------- rich features ---------- */
.richfeat { display: grid; grid-template-columns: 0.55fr 1.45fr; gap: 44px; align-items: center; margin-top: 76px; }
.richfeat:first-of-type { margin-top: 56px; }
.richfeat.rev { grid-template-columns: 1.45fr 0.55fr; } /* 反転行でも動画側を広いカラムにして4機能の動画幅を揃える */
.richfeat.rev > div:first-child { order: 2; }
.richfeat.full { grid-template-columns: 1fr; gap: 22px; }
.richfeat .no { font-size: 12.5px; color: var(--faint); font-weight: 800; letter-spacing: .12em; }
.richfeat h3 { margin: 8px 0 10px; font-size: 20px; line-height: 1.55; }
.richfeat p { margin: 0; font-size: 14px; color: var(--sub); max-width: 36em; }
.figure { border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--wash); padding: 26px 28px; }
.figure .cap { font-size: 12px; color: var(--faint); margin-bottom: 14px; }
.flowchip { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px 18px; font-size: 13.5px; font-weight: 700; text-align: center; box-shadow: 0 4px 14px rgba(13,19,33,.05); }
.flowchip span { display: block; font-size: 11.5px; color: var(--faint); font-weight: 400; margin-top: 2px; }
.flowchip.on { border-color: var(--navy); background: var(--navy); color: var(--shell); }
.flowchip.on span { color: var(--shell); opacity: .8; }
.flowarrow { text-align: center; color: var(--faint); font-size: 14px; margin: 8px 0; }
.hflow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 14px; align-items: center; border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--wash); padding: 26px 28px; }
.hflow .flowarrow { margin: 0; }
.bar { display: grid; grid-template-columns: 7em 1fr 3em; gap: 12px; align-items: center; font-size: 12.5px; margin: 10px 0; font-variant-numeric: tabular-nums; }
.bar i { display: block; height: 16px; border-radius: 4px; background: var(--navy); }
.bar i.dim { background: var(--faint); opacity: .45; }

/* ---------- 仕組みブロック（統計分布 → パネル生成） ---------- */
.mechanism { max-width: 760px; margin: 28px auto 0; }
.mech-text p { font-size: 15px; color: var(--sub); line-height: 2; margin: 0 0 14px; text-align: center; }
.mech-text p:last-child { margin-bottom: 0; }
.mech-vph { width: 100%; margin-top: 24px; }
@media (max-width: 640px) { .mech-text p br { display: none; } }

/* ---------- comparison table ---------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--r); background: #fff; }
table.compare { border-collapse: collapse; width: 100%; font-size: 13.5px; min-width: 660px; }
table.compare th, table.compare td { padding: 14px 18px; border-bottom: 1px solid var(--line-soft); text-align: left; }
table.compare tbody tr:last-child th, table.compare tbody tr:last-child td { border-bottom: 0; }
table.compare thead th { font-size: 12.5px; color: var(--sub); background: var(--wash); }
table.compare thead th.hl { background: var(--navy); color: #fff; }
table.compare td.hl { background: var(--shell-soft); font-weight: 700; }
table.compare td b { color: var(--navy); }

/* ---------- dl band ---------- */
.band { position: relative; overflow: hidden; background: linear-gradient(120deg, var(--navy-deep) 0%, var(--navy) 60%, #2C4159 100%); color: #fff; border-radius: 16px; padding: 40px 44px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.band::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(240,235,216,.08); }
.band h3 { margin: 0 0 6px; font-size: 20px; }
.band p { margin: 0; font-size: 13.5px; opacity: .8; }
.band a { position: relative; z-index: 1; background: var(--shell); color: var(--navy-deep); text-decoration: none; font-weight: 800; padding: 13px 26px; border-radius: 8px; font-size: 14px; white-space: nowrap; transition: transform .15s, box-shadow .2s; }
.band a:hover { box-shadow: 0 10px 26px rgba(0,0,0,.25); transform: translateY(-2px); }

/* ---------- faq ---------- */
.faq { border-top: 1px solid var(--line-soft); margin-top: 8px; }
.faq details { border-bottom: 1px solid var(--line-soft); }
.faq summary { cursor: pointer; list-style: none; display: flex; gap: 12px; align-items: baseline; font-weight: 700; font-size: 14.5px; padding: 18px 4px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q"; color: var(--navy); font-weight: 800; }
.faq summary::after { content: "＋"; margin-left: auto; color: var(--faint); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq .a { margin: 0; padding: 0 4px 18px 28px; font-size: 13.5px; color: var(--sub); }

/* ---------- article cards ---------- */
.art { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.art .thumb { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--shell) 0%, var(--shell-soft) 100%); display: flex; align-items: center; justify-content: center; color: var(--navy); font-size: 12px; font-weight: 800; letter-spacing: .18em; }
.art .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art .body { padding: 14px 18px 18px; }
.art .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.art .meta .date { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.art .meta .chip { font-size: 10.5px; font-weight: 700; color: var(--navy); background: var(--shell-soft); border: 1px solid var(--line-soft); border-radius: 4px; padding: 2px 8px; white-space: nowrap; }
.art .body .t { font-size: 13.5px; font-weight: 700; line-height: 1.65; margin: 8px 0 0; }

/* ---------- detail pages ---------- */
.crumb { font-size: 12.5px; color: var(--faint); padding: 28px 0 0; }
.crumb a { color: var(--faint); }
.detail { padding-bottom: 72px; }
.detail h1 { font-size: 27px; line-height: 1.6; margin: 10px 0 4px; letter-spacing: .01em; }
.detail h2 { font-size: 19px; margin: 40px 0 12px; padding-left: 14px; border-left: 4px solid var(--navy); }
.sumbox { background: var(--wash); border-radius: var(--r); padding: 20px 24px; margin: 24px 0 36px; }
.sumbox dl { display: grid; grid-template-columns: 7em 1fr; gap: 8px 18px; margin: 0; font-size: 13.5px; }
.sumbox dt { color: var(--sub); font-weight: 700; }
.sumbox dd { margin: 0; }
.cta-band { background: linear-gradient(120deg, var(--navy-deep), var(--navy)); color: #fff; border-radius: 14px; padding: 30px 34px; margin: 52px 0 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.cta-band p { margin: 0; font-weight: 700; }
.cta-band a { display: inline-flex; align-items: center; line-height: 1; background: var(--shell); color: var(--navy-deep); text-decoration: none; font-weight: 800; padding: 13px 22px; border-radius: 8px; font-size: 14px; white-space: nowrap; }

/* ---------- footer (Sales Retriever型: 明背景・リンク群) ---------- */
.site-footer { border-top: 1px solid var(--line-soft); padding: 52px 0 0; font-size: 13px; color: var(--sub); background: var(--wash); }
.fgrid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px; padding-bottom: 40px; }
.fbrand { font-weight: 800; color: var(--ink); font-size: 15.5px; margin-bottom: 10px; }
.fdesc { font-size: 12.5px; color: var(--faint); margin: 0; line-height: 1.9; }
.fhead { font-size: 12px; font-weight: 800; color: var(--ink); margin-bottom: 12px; letter-spacing: .04em; }
.fcol a { display: block; color: var(--sub); text-decoration: none; font-size: 12.5px; padding: 4px 0; }
.fcol a:hover { color: var(--navy); text-decoration: underline; }
.ftext { font-size: 12.5px; color: var(--faint); padding: 4px 0; line-height: 1.8; }
.fbottom { border-top: 1px solid var(--line-soft); padding: 18px 0 26px; font-size: 12px; color: var(--faint); }
@media (max-width: 800px) { .fgrid { grid-template-columns: 1fr 1fr; } .fbrand-col { grid-column: 1 / -1; } }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(22px); transition: opacity .75s cubic-bezier(.16,1,.3,1), transform .75s cubic-bezier(.16,1,.3,1); }
  .reveal.in { opacity: 1; transform: none; }
  .reveal.d1 { transition-delay: .08s; }
  .reveal.d2 { transition-delay: .16s; }
}

@media (max-width: 800px) {
  section { padding: 60px 0; }
  .grid2, .grid3, .richfeat, .hflow { grid-template-columns: 1fr; }
  .richfeat.rev { grid-template-columns: 1fr; }
  .richfeat.rev > div:first-child { order: 0; }
  .hflow .flowarrow { transform: rotate(90deg); }
  .band, .cta-band { flex-direction: column; text-align: center; }
  h2.sec { font-size: 22px; }
  .solve { grid-template-columns: 44px 1fr; }
}

/* ---------- 機能デモ動画プレースホルダー ---------- */
.vph { position: relative; aspect-ratio: 16/9; border-radius: var(--r); background: linear-gradient(135deg, var(--navy-deep), var(--navy)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; box-shadow: var(--shadow); }
.vph-play { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.92); position: relative; }
.vph-play::after { content: ""; position: absolute; left: 22px; top: 17px; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent var(--navy); }
.vph span { color: rgba(255,255,255,.65); font-size: 12px; }

/* ---------- フォーム補助 ---------- */
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.req { display: inline-block; font-size: 10px; font-weight: 800; color: #fff; background: var(--navy); border-radius: 4px; padding: 1px 7px; margin-left: 6px; vertical-align: 1px; }
.opt { display: inline-block; font-size: 10px; font-weight: 800; color: var(--sub); background: var(--shell-soft); border: 1px solid var(--line); border-radius: 4px; padding: 1px 7px; margin-left: 6px; vertical-align: 1px; }

/* ---------- FVチップ ---------- */
.fv-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.fv-chips span { font-size: 12.5px; font-weight: 700; color: var(--navy); background: var(--shell-soft); border: 1px solid var(--line-soft); border-radius: 99px; padding: 5px 14px; }

/* ---------- ヒーロー利用イメージ（イラスト表現） ---------- */
.hero-visual { position: relative; margin: 40px 0 0; padding-bottom: 34px; max-width: 460px; }
.hv-window { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 24px 60px rgba(13,19,33,.14); overflow: hidden; }
.hv-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); background: var(--wash); }
.hv-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.hv-bar span { font-size: 11px; color: var(--faint); margin-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hv-body { padding: 18px 22px 20px; }
.hv-q { font-size: 12.5px; font-weight: 700; margin-bottom: 12px; }
.hv-float { position: absolute; z-index: 2; right: -24px; bottom: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 40px rgba(13,19,33,.16); padding: 14px 16px; width: 210px; }
.hv-cap { font-size: 11px; font-weight: 800; color: var(--navy); letter-spacing: .04em; margin-bottom: 8px; }
.hv-stat { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; padding: 5px 0; border-bottom: 1px solid var(--line-soft); }
.hv-stat:last-child { border-bottom: 0; }
.hv-stat b { font-size: 12px; }
.hv-stat span { color: var(--navy); font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .hero-visual { max-width: none; margin-top: 32px; padding-bottom: 0; }
  .hv-float { position: static; width: auto; margin-top: 12px; }
}
