/* ==========================================================================
   コトカジ（言舵）LP
   コンセプト: 昼の海図。親ブランド「方眼紙の機械図面」の血縁として
               "線で描かれた技術的な紙"を受け継ぎ、"進む向きを決める紙＝海図"に置く。
               配色は実際の海図に倣う: 紙は青緑がかった生成り、水域は浅葱、陸地は砂。
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, figure, ul, ol, dl, dd, table { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }

:root {
  --paper:     #EFF4F3;
  --shallow:   #DDEBE8;
  --card:      #FFFFFF;
  --ink:       #0F323D;
  --ink-dim:   #5C7883;
  --sea:       #0D7B8A;
  --sea-deep:  #07505D;
  --sand:      #B98A2E;
  --signal:    #BE5138;
  --rule:      rgba(15, 50, 61, .16);
  --rule-soft: rgba(15, 50, 61, .085);

  --font-sans:  "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic Medium", sans-serif;
  --font-mincho:"Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-mono:  "IBM Plex Mono", "SF Mono", Menlo, Consolas, monospace;

  --gap: clamp(68px, 8.5vw, 120px);
  --edge: clamp(20px, 5vw, 64px);
  --measure: 1160px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--rule-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule-soft) 1px, transparent 1px);
  background-size: 104px 104px, 104px 104px;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--sea); outline-offset: 3px; }

.wrap { width: min(100% - var(--edge) * 2, var(--measure)); margin-inline: auto; }

/* 固定ヘッダの下に見出しが潜らないように */
section[id], main[id] { scroll-margin-top: 84px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--sea);
}

.lede { color: var(--ink-dim); max-width: 40em; }

/* ---------- ヘッダ ---------- */
.masthead {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(239, 244, 243, .88);
  border-bottom: 1px solid var(--rule-soft);
}
.masthead__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 14px; }
.wordmark {
  display: flex; align-items: baseline; gap: 10px; text-decoration: none;
  font-family: var(--font-mincho); font-size: 21px; font-weight: 600;
  letter-spacing: .06em; color: var(--sea-deep);
}
.wordmark small { font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; color: var(--ink-dim); font-weight: 400; }
.masthead__nav { display: flex; gap: 24px; font-size: 13px; color: var(--ink-dim); }
.masthead__nav a { text-decoration: none; }
.masthead__nav a:hover { color: var(--sea); }
@media (max-width: 980px) { .masthead__nav { display: none; } }

/* 320px級の端末。ロゴが折れないよう詰める */
@media (max-width: 390px) {
  .masthead__inner { gap: 10px; }
  .wordmark { font-size: 18px; white-space: nowrap; }
  .wordmark small { display: none; }
  .btn--sm { padding: 8px 12px; font-size: 12px; white-space: nowrap; }
}

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px; font-size: 14px; font-weight: 500; text-decoration: none;
  border: 1px solid transparent;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn--primary { background: var(--sea); color: #fff; }
.btn--primary:hover { background: var(--sea-deep); }
.btn--ghost { border-color: var(--rule); color: var(--ink); background: var(--card); }
.btn--ghost:hover { border-color: var(--sea); color: var(--sea); }
.btn--sm { padding: 9px 17px; font-size: 13px; }

/* ---------- ヒーロー ---------- */
.hero { padding-block: clamp(52px, 7vw, 88px) var(--gap); }
.hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 5vw, 68px); align-items: center; }
@media (max-width: 940px) { .hero__grid { grid-template-columns: 1fr; } }

.hero__def {
  font-family: var(--font-mono); font-size: 12px; line-height: 1.85;
  color: var(--ink-dim); border-left: 2px solid var(--sea);
  padding-left: 14px; margin-bottom: 30px;
}
.hero h1 {
  font-family: var(--font-mincho); font-weight: 600;
  font-size: clamp(29px, 5.6vw, 58px); line-height: 1.32;
  letter-spacing: .01em; margin-bottom: 26px; color: var(--sea-deep);
}
.hero h1 em { font-style: normal; color: var(--sea); }
.hero__lede { font-size: 15.5px; color: var(--ink-dim); margin-bottom: 32px; max-width: 30em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero__note { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-dim); margin-top: 18px; }

/* ---------- 署名要素: 操舵記録 ---------- */
.logbook { background: var(--card); border: 1px solid var(--rule); box-shadow: 0 18px 40px rgba(15, 50, 61, .08); }
.logbook__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 16px; border-bottom: 1px solid var(--rule-soft); background: var(--shallow);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; color: var(--sea-deep);
}
.logbook__lamp { width: 7px; height: 7px; border-radius: 50%; background: var(--sea); box-shadow: 0 0 0 3px rgba(13,123,138,.18); }
.logbook__body { padding: 20px 18px 22px; min-height: 348px; font-size: 14px; }

.entry { margin-bottom: 20px; }
.entry:last-child { margin-bottom: 0; }
.entry__said { display: flex; gap: 10px; align-items: flex-start; line-height: 1.7; font-weight: 500; }
.entry__said::before { content: "▸"; color: var(--sea); flex: none; line-height: 1.7; }
.entry__did {
  margin-top: 9px; margin-left: 20px; padding-left: 13px;
  border-left: 2px solid var(--shallow);
  font-family: var(--font-mono); font-size: 11.5px; line-height: 1.95; color: var(--ink-dim);
}
.entry__result { margin-top: 9px; margin-left: 20px; color: var(--ink-dim); line-height: 1.75; font-size: 13.5px; }
.entry__result b { color: var(--sea-deep); font-weight: 600; }
.caret { display: inline-block; width: 8px; height: 1.05em; background: var(--sea); vertical-align: -2px; animation: blink 1.1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- セクション ---------- */
.band { padding-block: var(--gap); border-top: 1px solid var(--rule-soft); }
.band--sink { background: var(--shallow); }
.band__head { margin-bottom: clamp(32px, 4.2vw, 54px); }
.band__head h2 {
  font-family: var(--font-mincho); font-weight: 600;
  font-size: clamp(25px, 3.3vw, 36px); line-height: 1.45;
  margin-block: 12px 14px; color: var(--sea-deep);
}

/* ---------- 現在地 ---------- */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
@media (max-width: 800px) { .facts { grid-template-columns: 1fr; } }
.fact { background: var(--card); padding: 30px 26px; }
.fact__num { font-family: var(--font-mincho); font-size: clamp(34px, 4.4vw, 44px); font-weight: 600; color: var(--sea); line-height: 1.15; }
.fact__num span { font-size: .44em; color: var(--ink); margin-left: 5px; font-weight: 400; }
.fact__label { margin-top: 12px; font-size: 14px; line-height: 1.75; }
.fact__src { margin-top: 12px; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-dim); line-height: 1.7; }

/* ---------- できること ---------- */
/* min() でビューポートより広い最小幅にならないようにする（320px端末対策） */
.tasks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.task { background: var(--card); padding: 26px 24px 28px; }
.task h3 { font-size: 16px; font-weight: 600; margin-bottom: 9px; color: var(--sea-deep); }
.task p { font-size: 13.5px; color: var(--ink-dim); line-height: 1.8; }
.task__say {
  margin-top: 15px; padding-top: 13px; border-top: 1px dashed var(--rule);
  font-size: 13px; color: var(--sea); line-height: 1.7; font-weight: 500;
}
.task__say::before { content: "▸ "; }

/* ---------- 変化（試算） ---------- */
.shift { border: 1px solid var(--rule); background: var(--card); }
.shift__row {
  display: grid; grid-template-columns: 1.7fr .85fr .85fr 1.4fr;
  gap: 18px; align-items: center; padding: 16px 24px;
  border-bottom: 1px solid var(--rule-soft);
}
.shift__row:last-child { border-bottom: none; }
.shift__row--head { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; color: var(--ink-dim); background: var(--shallow); padding-block: 10px; }
.shift__row--sum { background: var(--shallow); font-weight: 600; }
.shift__task { font-size: 14.5px; line-height: 1.6; display: flex; flex-direction: column; }
.shift__task small { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-dim); margin-top: 2px; }
.shift__before, .shift__after { font-family: var(--font-mincho); font-size: 18px; font-weight: 600; white-space: nowrap; }
.shift__before { color: var(--ink-dim); }
.shift__after { color: var(--sea); }
.shift__before i, .shift__after i { font-style: normal; font-family: var(--font-sans); font-size: 11.5px; font-weight: 400; margin-left: 2px; }
.shift__bar { display: flex; align-items: center; gap: 12px; position: relative; }
.shift__bar b { display: block; height: 8px; background: var(--sea); min-width: 6px; flex: none; position: relative; z-index: 1; }
.shift__row:not(.shift__row--head) .shift__bar::after {
  content: ""; position: absolute; left: 0; right: 62px; height: 8px; background: var(--shallow); z-index: 0;
}
.shift__bar em { font-style: normal; font-family: var(--font-mono); font-size: 12px; color: var(--sea-deep); white-space: nowrap; margin-left: auto; position: relative; z-index: 1; }
@media (max-width: 860px) {
  .shift__row { grid-template-columns: auto auto; justify-content: start; gap: 4px 12px; padding: 18px 20px; }
  .shift__row--head { display: none; }
  .shift__task { grid-column: 1 / -1; font-weight: 600; }
  .shift__bar { grid-column: 1 / -1; margin-top: 8px; width: 100%; }
  .shift__before::after { content: "→"; color: var(--ink-dim); margin-left: 8px; font-family: var(--font-sans); }
}
.shift__note { margin-top: 20px; font-size: 13px; color: var(--ink-dim); line-height: 1.9; max-width: 62em; }
.shift__note b { color: var(--ink); font-weight: 600; }

/* ---------- 中間CTA ---------- */
.midcta {
  border-top: 1px solid var(--rule-soft);
  background: var(--sea-deep);
  color: #fff;
  padding-block: clamp(38px, 5vw, 56px);
}
.midcta__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.midcta p { font-family: var(--font-mincho); font-size: clamp(18px, 2.3vw, 24px); font-weight: 600; line-height: 1.6; }
.midcta small { display: block; font-family: var(--font-sans); font-size: 13px; font-weight: 400; color: rgba(255,255,255,.72); margin-top: 6px; line-height: 1.7; }
.midcta .btn--primary { background: #fff; color: var(--sea-deep); }
.midcta .btn--primary:hover { background: var(--shallow); }

/* ---------- 比較 ---------- */
.compare-scroll { overflow-x: auto; }
/* 表が画面に収まらない幅のときだけ、スクロールできることを伝える */
.compare-hint { display: none; }
@media (max-width: 860px) {
  .compare-hint {
    display: block; margin-bottom: 10px;
    font-family: var(--font-mono); font-size: 11px; color: var(--ink-dim);
  }
  .compare-hint::before { content: "→ "; color: var(--sea); }
}
.compare {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--rule);
  font-size: 13.5px;
}
.compare th, .compare td { padding: 15px 18px; text-align: left; border-bottom: 1px solid var(--rule-soft); vertical-align: top; line-height: 1.75; }
.compare thead th { background: var(--shallow); font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; color: var(--sea-deep); font-weight: 500; }
.compare thead th.is-us { background: var(--sea); color: #fff; }
.compare tbody th { font-weight: 600; color: var(--ink); width: 150px; font-size: 13px; }
.compare td.is-us { background: rgba(13, 123, 138, .06); color: var(--ink); font-weight: 500; }
.compare td { color: var(--ink-dim); }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: none; }
.compare-note { margin-top: 16px; font-size: 12.5px; color: var(--ink-dim); line-height: 1.85; }

/* ---------- 安全設計 ---------- */
.guards { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.guard { background: var(--card); display: grid; grid-template-columns: 148px 1fr; gap: 26px; padding: 24px 26px; align-items: baseline; }
@media (max-width: 720px) { .guard { grid-template-columns: 1fr; gap: 8px; } }
.guard__key { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .1em; color: var(--signal); }
.guard__val { font-size: 14.5px; line-height: 1.8; color: var(--ink-dim); }
.guard__val b { color: var(--ink); font-weight: 600; }

/* ---------- つくっている人 ---------- */
.maker { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
@media (max-width: 820px) { .maker { grid-template-columns: 1fr; } }
.maker__cell { background: var(--card); padding: 28px 26px; }
.maker__cell h3 { font-family: var(--font-mincho); font-size: 17px; font-weight: 600; color: var(--sea-deep); margin-bottom: 10px; }
.maker__cell p { font-size: 13.5px; color: var(--ink-dim); line-height: 1.85; }
.maker__facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 14px; }
.maker__fact { display: flex; flex-direction: column; }
.maker__fact b { font-family: var(--font-mincho); font-size: 24px; font-weight: 600; color: var(--sea); line-height: 1.3; }
.maker__fact span { font-size: 11.5px; color: var(--ink-dim); }

/* ---------- 料金 ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--card); padding: 30px 26px 32px; display: flex; flex-direction: column; }
.plan--pick { background: var(--shallow); position: relative; }
.plan__tag { position: absolute; top: 0; right: 0; background: var(--sea); color: #fff; font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; padding: 5px 11px; }
.plan__name { font-family: var(--font-mincho); font-size: 19px; font-weight: 600; margin-bottom: 4px; color: var(--sea-deep); }
.plan__for { font-size: 12.5px; color: var(--ink-dim); line-height: 1.7; min-height: 3.4em; }
.plan__price { font-family: var(--font-mincho); font-size: 34px; font-weight: 600; color: var(--sea); margin-block: 16px 2px; }
.plan__price span { font-size: 14px; color: var(--ink-dim); margin-left: 3px; font-weight: 400; }
.plan__meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-dim); padding-bottom: 18px; border-bottom: 1px solid var(--rule); margin-bottom: 18px; }
.plan__list { font-size: 13.5px; line-height: 1.85; color: var(--ink-dim); }
.plan__list li { padding-left: 17px; position: relative; margin-bottom: 6px; }
.plan__list li::before { content: ""; position: absolute; left: 0; top: .82em; width: 7px; height: 1px; background: var(--sand); }
.plan-note { margin-top: 24px; font-size: 13px; color: var(--ink-dim); line-height: 1.85; }
.plan-note b { color: var(--ink); font-weight: 600; }
/* ---------- 継続サポート（2段階） ---------- */
.after { margin-top: clamp(48px, 6vw, 76px); }
.after__head { margin-bottom: 26px; }
.after__head h3 {
  font-family: var(--font-mincho); font-size: clamp(20px, 2.6vw, 27px);
  font-weight: 600; color: var(--sea-deep); line-height: 1.5; margin-bottom: 10px;
}
.after__head p { font-size: 14px; color: var(--ink-dim); line-height: 1.85; max-width: 44em; }

.keeps { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
@media (max-width: 860px) { .keeps { grid-template-columns: 1fr; } }

.keep { background: var(--card); padding: 28px 26px 30px; display: flex; flex-direction: column; }
.keep--up { background: var(--shallow); }
.keep__name { font-family: var(--font-mincho); font-size: 19px; font-weight: 600; color: var(--sea-deep); }
.keep__catch { font-size: 13px; color: var(--sea); margin-top: 3px; }
.keep__price {
  font-family: var(--font-mincho); font-size: 27px; font-weight: 600; color: var(--sea);
  margin-block: 14px 2px; line-height: 1.35;
}
.keep__price span { font-size: 13px; color: var(--ink-dim); font-weight: 400; margin-left: 2px; }
.keep__price small { display: block; font-family: var(--font-sans); font-size: 12px; color: var(--ink-dim); font-weight: 400; margin-top: 4px; }
.keep__body {
  font-size: 13.5px; color: var(--ink-dim); line-height: 1.85;
  padding-top: 16px; margin-top: 14px; border-top: 1px solid var(--rule);
}
.keep__list { font-size: 13.5px; line-height: 1.8; color: var(--ink-dim); margin-top: 12px; }
.keep__list li { padding-left: 17px; position: relative; margin-bottom: 5px; }
.keep__list li::before { content: ""; position: absolute; left: 0; top: .8em; width: 7px; height: 1px; background: var(--sand); }
.keep__cap {
  margin-top: 16px; padding: 12px 14px; background: var(--paper);
  font-size: 12.5px; color: var(--ink-dim); line-height: 1.8;
}
.keep--up .keep__cap { background: var(--card); }
.keep__cap b { color: var(--ink); font-weight: 600; }

.after__pick {
  margin-top: 1px; border: 1px solid var(--rule); border-top: none;
  background: var(--card); padding: 22px 26px;
}
.after__pick dl { display: grid; grid-template-columns: 1fr auto; gap: 10px 20px; font-size: 13.5px; }
@media (max-width: 620px) { .after__pick dl { grid-template-columns: 1fr; gap: 2px; } .after__pick dd { margin-bottom: 12px; } }
.after__pick dt { color: var(--ink-dim); }
.after__pick dd { color: var(--sea-deep); font-weight: 600; white-space: nowrap; }
.after__terms { margin-top: 16px; font-size: 12.5px; color: var(--ink-dim); line-height: 1.9; }

/* ---------- 導入の流れ ---------- */
.steps { border-top: 1px solid var(--rule); }
.step { display: grid; grid-template-columns: 58px 200px 1fr; gap: 22px; padding: 22px 4px; border-bottom: 1px solid var(--rule); align-items: baseline; }
@media (max-width: 780px) { .step { grid-template-columns: 44px 1fr; gap: 6px 16px; } .step__body { grid-column: 2; } }
.step__no { font-family: var(--font-mono); font-size: 12px; color: var(--sand); letter-spacing: .08em; }
.step__name { font-size: 15.5px; font-weight: 600; color: var(--sea-deep); }
.step__body { font-size: 13.5px; color: var(--ink-dim); line-height: 1.8; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: 20px 34px 20px 0; font-size: 15px; font-weight: 500; list-style: none; position: relative; color: var(--sea-deep); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "＋"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: var(--sea); font-size: 15px; }
.faq details[open] summary::after { content: "−"; }
.faq__a { padding-bottom: 22px; font-size: 13.5px; color: var(--ink-dim); line-height: 1.9; max-width: 56em; }

/* ---------- 締め ---------- */
.close { padding-block: var(--gap); text-align: center; border-top: 1px solid var(--rule-soft); background: var(--shallow); }
.close h2 { font-family: var(--font-mincho); font-size: clamp(26px, 3.6vw, 38px); font-weight: 600; line-height: 1.45; margin-bottom: 18px; color: var(--sea-deep); }
.close p { color: var(--ink-dim); font-size: 14.5px; margin-bottom: 26px; max-width: 34em; margin-inline: auto; }
.close__limit {
  display: inline-block; margin-bottom: 26px; padding: 8px 16px;
  border: 1px solid var(--sand); color: var(--sand);
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em;
}

/* ---------- フッタ ---------- */
.foot {
  border-top: 1px solid var(--rule-soft); padding-block: 26px 44px;
  font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-dim);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}

/* ---------- 立ち上がり（JSがある時だけ） ---------- */
.js .rise { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .rise.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rise { opacity: 1; transform: none; transition: none; }
  .caret { animation: none; }
}
