/* ==========================================================================
   Keynest — base.css
   デザイントークン（SPEC §2）＋ 共通クラス契約（SPEC §3）＋ リセット
   ＋ レスポンシブ ＋ アクセシビリティ
   このファイルは担当 A が所有。B は同名クラスを再利用し、追加分のみ
   pages.css に `sec-` 接頭辞で書く。
   外部リソース（CDN / Web フォント / トラッカー）は読み込まない。
   アイコンは絵文字を使わず、24×24 の単色インライン SVG で統一（REVISION-1 ①）。
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. デザイントークン（:root）— SPEC §2 と完全一致
   -------------------------------------------------------------------------- */
:root{
  --bg:#0B0C16; --bg-elev:#15172A; --surface:#1E2138;
  --border:rgba(255,255,255,.08); --border-strong:rgba(255,255,255,.16);
  --indigo:#3A46C8; --violet:#963CD2; --gold:#FFCD6E; --green:#4ADE80;
  --grad:linear-gradient(135deg,#3A46C8 0%,#963CD2 100%);
  --grad-soft:linear-gradient(135deg,rgba(58,70,200,.18),rgba(150,60,210,.18));
  --text:#ECECF6; --muted:#9A9AB5;
  --radius:16px; --radius-lg:22px; --radius-pill:999px;
  --maxw:1120px; --pad:24px;
  --shadow:0 20px 60px -20px rgba(0,0,0,.65);
  --shadow-card:0 8px 30px -12px rgba(0,0,0,.5);
  --font:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Helvetica Neue",Arial,"Noto Sans JP",sans-serif;
}

/* --------------------------------------------------------------------------
   2. リセット & ベース要素
   -------------------------------------------------------------------------- */
*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font);
  font-size:17px;
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  overflow-x:hidden;
}
img,svg{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; cursor:pointer; }
h1,h2,h3,h4{ margin:0; line-height:1.2; font-weight:700; letter-spacing:-.01em; }
p{ margin:0; }
ul,ol{ margin:0; padding:0; list-style:none; }
code{ font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:.92em; }
:target{ scroll-margin-top:84px; }

/* キーボードフォーカスリング（アクセシビリティ） */
:focus-visible{
  outline:2px solid var(--gold);
  outline-offset:3px;
  border-radius:6px;
}

/* 共通インライン SVG アイコン（24×24・単色・currentColor 継承） */
.ic{ width:24px; height:24px; flex:0 0 auto; }

/* スキップリンク */
.skip-link{
  position:absolute; left:12px; top:-60px;
  z-index:1000;
  padding:10px 16px;
  background:var(--surface); color:var(--text);
  border:1px solid var(--border-strong);
  border-radius:var(--radius-pill);
  transition:top .2s ease;
}
.skip-link:focus{ top:12px; }

/* --------------------------------------------------------------------------
   3. ユーティリティ
   -------------------------------------------------------------------------- */
.container{
  width:100%;
  max-width:var(--maxw);
  margin-inline:auto;
  padding-inline:var(--pad);
}

.gradient-text{
  background:var(--grad);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.text-gold{ color:var(--gold); }
.text-muted{ color:var(--muted); }

.glass{
  background:rgba(30,33,56,.55);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border:1px solid var(--border);
}

.grid{ display:grid; gap:24px; }
.grid--2{ grid-template-columns:repeat(2,1fr); }
.grid--3{ grid-template-columns:repeat(3,1fr); }

.sr-only{
  position:absolute; width:1px; height:1px;
  padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0;
}
.is-hidden{ display:none !important; }

/* --------------------------------------------------------------------------
   4. レイアウト（セクション）
   余白は詰めめに（コンテンツ量に対して空きすぎない＝空白帯を作らない / REVISION-1 ②）
   -------------------------------------------------------------------------- */
.section{ padding-block:72px; position:relative; }
.section--alt{ background:var(--bg-elev); }
.section--tight{ padding-block:48px; }

.eyebrow{
  display:inline-block;
  font-size:13px; font-weight:700;
  letter-spacing:.08em; text-transform:uppercase;
  padding:6px 14px;
  border-radius:var(--radius-pill);
  background:var(--grad-soft);
  border:1px solid var(--border);
}
.eyebrow.gradient-text{ -webkit-text-fill-color:transparent; }

.section-title{
  font-size:clamp(27px,3.6vw,38px);
  letter-spacing:-.02em;
}
.section-lead{
  margin-top:14px;
  max-width:640px;
  color:var(--muted);
  font-size:17.5px;
}
.section-head{ margin-bottom:40px; }

/* 見出し＋本文を左、コンテンツを右に置く 2 カラム（グリッドの単調さを崩す） */
.split{
  display:grid;
  grid-template-columns:0.9fr 1.1fr;
  gap:56px;
  align-items:start;
}
.split__aside .section-lead{ margin-bottom:24px; }

/* --------------------------------------------------------------------------
   5. ナビ（SPEC §6）
   -------------------------------------------------------------------------- */
.nav{
  position:sticky; top:0; z-index:100;
  background:rgba(11,12,22,.72);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid var(--border);
}
.nav__inner{
  display:flex; align-items:center; flex-wrap:wrap; gap:20px;
  min-height:64px;
}
.nav__brand{
  display:flex; align-items:center; gap:10px;
  font-weight:700; font-size:19px; letter-spacing:-.01em;
  margin-right:auto;
}
.nav__brand img{ width:30px; height:30px; border-radius:8px; }
.nav__links{
  display:flex; align-items:center; gap:26px;
}
.nav__links a{
  color:var(--muted); font-size:15px; font-weight:600;
  transition:color .15s ease;
}
.nav__links a:hover{ color:var(--text); }

.lang-toggle{
  display:inline-flex; align-items:center;
  gap:2px;
  padding:4px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-pill);
}
.lang-toggle button{
  border:0; background:transparent;
  color:var(--muted);
  font-size:12px; font-weight:700;
  padding:4px 10px;
  border-radius:var(--radius-pill);
  transition:all .15s ease;
}
.lang-toggle button.is-active{
  background:var(--grad); color:#fff;
}

.nav__cta{ flex:0 0 auto; }

.nav__burger{
  display:none;
  width:42px; height:42px;
  align-items:center; justify-content:center;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:12px;
}
.nav__burger span{
  display:block; position:relative;
  width:18px; height:2px; background:var(--text);
  border-radius:2px;
}
.nav__burger span::before,
.nav__burger span::after{
  content:""; position:absolute; left:0;
  width:18px; height:2px; background:var(--text); border-radius:2px;
}
.nav__burger span::before{ top:-6px; }
.nav__burger span::after{ top:6px; }

/* --------------------------------------------------------------------------
   6. ボタン
   -------------------------------------------------------------------------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:8px;
  padding:11px 22px;
  font-size:15px; font-weight:700;
  border:1px solid transparent;
  border-radius:var(--radius-pill);
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  white-space:nowrap;
}
.btn:hover{ transform:translateY(-1px); }
.btn:active{ transform:translateY(0); }

.btn--primary{
  background:var(--grad);
  color:#fff;
}
.btn--ghost{
  background:transparent;
  color:var(--text);
  border-color:var(--border-strong);
}
.btn--ghost:hover{ border-color:var(--gold); color:var(--gold); }

.btn--gold{
  background:var(--gold);
  color:#2A1E00;
}
.btn--lg{
  padding:14px 28px;
  font-size:16px;
}

/* --------------------------------------------------------------------------
   7. カード ＋ アイコンタイル
   -------------------------------------------------------------------------- */
.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:26px;
  transition:border-color .2s ease;
}
.card:hover{ border-color:var(--border-strong); }

/* アイコンタイル（カード・特長・価値リストで共通） */
.icon-tile,
.card__icon{
  display:inline-flex; align-items:center; justify-content:center;
  width:44px; height:44px;
  border-radius:12px;
  background:var(--grad-soft);
  border:1px solid var(--border);
  color:var(--text);
  margin-bottom:16px;
}
.icon-tile--plain{ background:var(--surface); color:var(--muted); }

.card__title{ font-size:18px; margin-bottom:8px; }
.card__body{ color:var(--muted); font-size:15.5px; }

/* 契約クラス（SPEC §3）。index は .feature-list を使うが定義は維持 */
.feature-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:24px;
  margin-top:40px;
}

/* 軽量な特長リスト（カード枠を使わず、アイコン＋テキストの行で密度を上げる） */
.feature-list{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:30px 48px;
}
.feature{ display:flex; gap:16px; }
.feature__icon{
  display:inline-flex; align-items:center; justify-content:center;
  width:42px; height:42px; flex:0 0 auto;
  border-radius:11px;
  background:var(--grad-soft);
  border:1px solid var(--border);
  color:var(--text);
}
.feature__title{ font-size:17px; margin-bottom:5px; }
.feature__body{ color:var(--muted); font-size:15px; line-height:1.6; }

/* --------------------------------------------------------------------------
   8. バッジ
   -------------------------------------------------------------------------- */
.badge{
  display:inline-flex; align-items:center; gap:8px;
  padding:7px 14px;
  font-size:13.5px; font-weight:600;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-pill);
  color:var(--text);
}
.badge--local::before{
  content:"";
  width:8px; height:8px; border-radius:50%;
  background:var(--green);
}
.badge-row{
  display:flex; flex-wrap:wrap; gap:12px;
}

/* --------------------------------------------------------------------------
   9. ヒーロー（装飾は引き算。グローは控えめ / REVISION-1 ①②）
   -------------------------------------------------------------------------- */
.hero{
  position:relative;
  padding-block:56px 76px;
  overflow:hidden;
}
.hero__glow{
  position:absolute;
  top:-200px; left:60%;
  width:560px; height:560px;
  margin-left:-280px;
  background:radial-gradient(circle at 50% 50%,rgba(150,60,210,.22),rgba(58,70,200,.10) 45%,transparent 70%);
  pointer-events:none;
  z-index:0;
}
.hero .container{
  position:relative; z-index:1;
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:56px; align-items:center;
}
.hero__title{
  font-size:clamp(30px,4.6vw,48px);
  line-height:1.15;
  letter-spacing:-.03em;
  text-wrap:balance;
}
.hero__sub{
  margin-top:20px;
  font-size:18px;
  color:var(--muted);
  max-width:540px;
}
.hero__actions{
  display:flex; flex-wrap:wrap; gap:14px;
  margin-top:30px;
}

/* ヒーロー右：実アプリのスクリーンショット（Mac 版）を重ねて配置 */
.hero__visual{ position:relative; }
.hero__shots{ position:relative; }
.hero__shot{
  display:block; height:auto;
  border-radius:12px;
  border:1px solid var(--border-strong);
  box-shadow:var(--shadow);
}
.hero__shot--front{
  position:relative; z-index:2;
  width:90%;
  margin:14% 0 0 10%;
}
.hero__shot--back{
  position:absolute; z-index:1;
  top:0; left:0;
  width:74%;
  opacity:.9;
}

/* --------------------------------------------------------------------------
   10. 仕組み（縦フロー：番号＋接続線で 3 列グリッドの単調さを崩す）
   契約クラス .steps / .step / .step__num を維持
   -------------------------------------------------------------------------- */
.steps{ display:flex; flex-direction:column; gap:8px; }
.step{
  position:relative;
  display:grid;
  grid-template-columns:auto 1fr;
  gap:18px;
  padding:0 0 26px 0;
}
.step:last-child{ padding-bottom:0; }
/* 番号間の接続線 */
.step:not(:last-child)::before{
  content:"";
  position:absolute; left:19px; top:42px; bottom:0;
  width:2px; background:var(--border-strong);
}
.step__num{
  position:relative; z-index:1;
  display:inline-flex; align-items:center; justify-content:center;
  width:40px; height:40px;
  font-weight:800; font-size:17px;
  border-radius:12px;
  background:var(--grad);
  color:#fff;
}
.step h3{ font-size:18px; margin:7px 0 6px; }
.step p{ color:var(--muted); font-size:15.5px; }

/* --------------------------------------------------------------------------
   11. プラットフォーム（軽量な 1 行ストリップ。重いカードにしない）
   -------------------------------------------------------------------------- */
.platforms{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
  margin-top:36px;
}
.platform{
  display:flex; align-items:center; gap:14px;
  padding:18px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--surface);
}
.platform__icon{
  display:inline-flex; align-items:center; justify-content:center;
  width:40px; height:40px; flex:0 0 auto;
  border-radius:10px;
  background:var(--grad-soft); border:1px solid var(--border);
  color:var(--text);
}
.platform h3{ font-size:15.5px; }
.platform p{ color:var(--muted); font-size:13px; margin-top:2px; }

/* --------------------------------------------------------------------------
   12. 料金（サブスク 3 階層。月額／年額を併記 / REVISION-1 ④）
   -------------------------------------------------------------------------- */
.pricing{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:22px;
  margin-top:40px;
  align-items:start;
}
.price-card{
  position:relative;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:30px 26px;
  display:flex; flex-direction:column;
  text-align:left;
}
.price-card--featured{
  border-color:transparent;
  background:
    linear-gradient(var(--surface),var(--surface)) padding-box,
    var(--grad) border-box;
  border:1.5px solid transparent;
}
.price-card__tag{
  position:absolute; top:-12px; left:26px;
  padding:5px 12px;
  font-size:12px; font-weight:800; letter-spacing:.04em;
  background:var(--gold); color:#2A1E00;
  border-radius:var(--radius-pill);
  white-space:nowrap;
}
.price__name{ font-size:17px; font-weight:700; }
.price__amount{
  font-size:34px; font-weight:800; letter-spacing:-.02em;
  margin-top:8px;
}
.price__period{ font-size:15px; font-weight:600; color:var(--muted); }
.price__year{
  margin-top:6px;
  font-size:13.5px; font-weight:600; color:var(--gold);
}
.price__note{ color:var(--muted); font-size:14px; margin-top:8px; }
.price__features{
  margin-top:20px;
  display:flex; flex-direction:column; gap:10px;
  flex:1 1 auto;
}
.price__features li{
  position:relative;
  padding-left:26px;
  font-size:14.5px; color:var(--text);
}
.price__features li::before{
  content:"";
  position:absolute; left:2px; top:8px;
  width:11px; height:6px;
  border-left:2px solid var(--green);
  border-bottom:2px solid var(--green);
  transform:rotate(-45deg);
}
.price-card .btn{ margin-top:24px; width:100%; }
.pricing-foot{
  margin-top:18px;
  font-size:13.5px; color:var(--muted);
}

/* --------------------------------------------------------------------------
   13. 価値リスト（security teaser 等。ユーザ目線の要点を並べる / REVISION-1 ③）
   -------------------------------------------------------------------------- */
.value-list{ display:flex; flex-direction:column; gap:18px; }
.value{ display:flex; gap:16px; }
.value__icon{
  display:inline-flex; align-items:center; justify-content:center;
  width:42px; height:42px; flex:0 0 auto;
  border-radius:11px;
  background:var(--grad-soft); border:1px solid var(--border);
  color:var(--text);
}
.value h3{ font-size:16.5px; margin-bottom:4px; }
.value p{ color:var(--muted); font-size:15px; line-height:1.6; }
.note-fine{ color:var(--muted); font-size:13px; margin-top:8px; }

/* --------------------------------------------------------------------------
   14. FAQ（開閉は B の main.js が .is-open を付与）
   -------------------------------------------------------------------------- */
.faq{
  margin-top:8px;
  max-width:780px;
}
.faq__item{
  border-bottom:1px solid var(--border);
}
.faq__q{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  width:100%;
  padding:20px 4px;
  background:transparent; border:0;
  color:var(--text);
  font-size:16.5px; font-weight:600;
  text-align:left;
}
.faq__q::after{
  content:"";
  flex:0 0 auto;
  width:11px; height:11px;
  border-right:2px solid var(--muted);
  border-bottom:2px solid var(--muted);
  transform:rotate(45deg);
  transition:transform .2s ease;
  margin-top:-4px;
}
.faq__item.is-open .faq__q::after{
  transform:rotate(-135deg);
  margin-top:2px;
  border-color:var(--gold);
}
/* 既定は閉じた状態。.is-open で開く */
.faq__a{
  max-height:0;
  overflow:hidden;
  padding:0 4px;
  color:var(--muted);
  font-size:15.5px;
  transition:max-height .25s ease, padding .25s ease;
}
.faq__item.is-open .faq__a{
  max-height:320px;
  padding:0 4px 22px;
}

/* --------------------------------------------------------------------------
   15. CTA バンド（金グラデ）
   -------------------------------------------------------------------------- */
.cta-band{
  position:relative;
  border-radius:var(--radius-lg);
  padding:48px 40px;
  text-align:center;
  overflow:hidden;
  background:linear-gradient(135deg,#FFCD6E 0%,#F2A93B 100%);
  color:#2A1E00;
}
.cta-band h2{ font-size:clamp(24px,3.2vw,33px); }
.cta-band p{ margin-top:12px; font-size:17px; color:#5A4410; max-width:540px; margin-inline:auto; }
.cta-band .btn{ margin-top:24px; }
.cta-band .btn--dark{
  background:#13101A; color:#fff;
}

/* --------------------------------------------------------------------------
   16. フッター（SPEC §6）
   -------------------------------------------------------------------------- */
.footer{
  background:var(--bg-elev);
  border-top:1px solid var(--border);
  padding-block:48px 26px;
}
.footer__inner{
  display:grid;
  grid-template-columns:1.4fr 2fr;
  gap:48px;
}
.footer__brand{
  display:flex; flex-direction:column; gap:14px;
  max-width:320px;
}
.footer__brand-top{
  display:flex; align-items:center; gap:10px;
  font-weight:700; font-size:18px;
}
.footer__brand-top img{ width:28px; height:28px; border-radius:8px; }
.footer__brand p{ color:var(--muted); font-size:15px; }
.footer__cols{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:24px;
}
.footer__col h4{
  font-size:13px; text-transform:uppercase; letter-spacing:.06em;
  color:var(--muted); margin-bottom:14px;
}
.footer__col a{
  display:block;
  color:var(--text); font-size:15px;
  padding:5px 0;
  transition:color .15s ease;
}
.footer__col a:hover{ color:var(--gold); }
.footer__col .lang-toggle{ margin-top:4px; }
.footer__bottom{
  display:flex; flex-wrap:wrap; gap:8px 18px; align-items:center;
  margin-top:40px; padding-top:22px;
  border-top:1px solid var(--border);
  color:var(--muted); font-size:14px;
}

/* --------------------------------------------------------------------------
   17. レスポンシブ（ブレイクポイント 960 / 640）
   -------------------------------------------------------------------------- */
@media (max-width:960px){
  .section{ padding-block:60px; }
  .section-head{ margin-bottom:32px; }
  .split{ grid-template-columns:1fr; gap:32px; }
  .hero{ padding-block:40px 60px; }
  .hero .container{ grid-template-columns:1fr; gap:40px; }
  .hero__visual{ order:2; max-width:440px; }
  .hero__sub{ max-width:none; }
  .feature-grid{ grid-template-columns:repeat(2,1fr); }
  .feature-list{ grid-template-columns:1fr; gap:24px; }
  .pricing{ grid-template-columns:1fr; max-width:460px; }
  .price-card--featured{ order:-1; }
  .platforms{ grid-template-columns:repeat(2,1fr); }
  .footer__inner{ grid-template-columns:1fr; gap:36px; }

  /* モバイルナビ：バーガーをバー右に出し、リンク群は下へ折りたたみ
     （.nav.is-open で開く。重なりを避けるため flex-wrap で縦積み） */
  .nav__burger{ display:inline-flex; order:1; }
  .nav__links{
    order:2; flex-basis:100%;
    flex-direction:column; align-items:flex-start;
    gap:0;
    max-height:0; overflow:hidden;
    transition:max-height .25s ease, padding .25s ease;
  }
  .nav .lang-toggle{
    order:3;
    max-height:0; overflow:hidden; opacity:0;
    transition:max-height .25s ease, opacity .2s ease, margin .25s ease;
  }
  .nav__cta{
    order:4; flex-basis:100%;
    max-height:0; overflow:hidden; opacity:0;
    transition:max-height .25s ease, opacity .2s ease, margin .25s ease;
  }
  .nav.is-open .nav__links{ max-height:320px; padding:6px 0 10px; }
  .nav.is-open .nav__links a{ font-size:17px; padding:10px 0; }
  .nav.is-open .lang-toggle{ max-height:60px; opacity:1; margin:4px 0 10px; }
  .nav.is-open .nav__cta{ max-height:90px; opacity:1; margin-bottom:18px; }
  .nav.is-open .nav__cta .btn{ width:100%; }
}

@media (max-width:640px){
  body{ font-size:16px; }
  :root{ --pad:18px; }
  .section{ padding-block:52px; }
  .grid--2,.grid--3{ grid-template-columns:1fr; }   /* why 比較 / 2 カラムを 1 列化 */
  .feature-grid{ grid-template-columns:1fr; }
  .platforms{ grid-template-columns:1fr; }
  .hero__actions .btn{ flex:1 1 auto; }
  .cta-band{ padding:40px 22px; }
  .footer__cols{ grid-template-columns:1fr; }
}

/* --------------------------------------------------------------------------
   18. モーション抑制（アクセシビリティ）
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
    scroll-behavior:auto !important;
  }
}

/* ── 日本語の改行最適化 ───────────────────────────────
   見出しは均等割りで単一文字の孤立改行を防ぎ、本文は孤立行を抑制する。 */
.section-title { text-wrap: balance; }
.section-lead,
.hero__sub,
.card__body,
.feature__body,
.step p,
.faq__a { text-wrap: pretty; }
/* 段落・表セル・箇条書き・キャプションも孤立行を抑制（構成図キャプション等） */
p,
td,
li,
figcaption { text-wrap: pretty; }
/* 文・句単位で折返しを禁止し、日本語の不自然な改行（孤立文字）を防ぐ */
.nobr { white-space: nowrap; }
