/* カン×ケイ 紹介ページ（製品ページ型レイアウト） */
.home {
  --p-bg: #ffffff;
  --p-bg-alt: #f5f5f7;
  --p-ink: #1d1d1f;
  --p-ink-2: #6e6e73;
  --p-ink-3: #86868b;
  --p-line: #d2d2d7;
  --p-tile: #ffffff;
  --p-dark: #000000;
  --p-dark-tile: #161617;
  --p-dark-ink: #f5f5f7;
  --p-dark-ink-2: #a1a1a6;
  --p-link: #1f6b56;
  --p-cta: #1f4a3d;
  --p-cta-ink: #ffffff;
  --p-grad: linear-gradient(90deg, #2c8a70 0%, #5fb59a 38%, #e08a5f 72%, #c2673f 100%);
  background: var(--p-bg);
  color: var(--p-ink);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .home {
    --p-bg: #000000; --p-bg-alt: #0b0b0c; --p-ink: #f5f5f7; --p-ink-2: #a1a1a6; --p-ink-3: #86868b;
    --p-line: #424245; --p-tile: #161617; --p-link: #7fd1b6; --p-cta: #8fd1bd; --p-cta-ink: #04130e;
  }
}
:root[data-theme="dark"] .home {
  --p-bg: #000000; --p-bg-alt: #0b0b0c; --p-ink: #f5f5f7; --p-ink-2: #a1a1a6; --p-ink-3: #86868b;
  --p-line: #424245; --p-tile: #161617; --p-link: #7fd1b6; --p-cta: #8fd1bd; --p-cta-ink: #04130e;
}
body.home { letter-spacing: .01em; line-height: 1.6; }

/* ローカルナビ（スクロールで固定） */
.local-nav {
  position: sticky; top: 0; z-index: 60; height: 52px;
  background: color-mix(in srgb, var(--p-bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid color-mix(in srgb, var(--p-line) 70%, transparent);
}
.local-nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 12px; }
.local-nav .title { font-size: 21px; font-weight: 700; letter-spacing: .02em; color: var(--p-ink); text-decoration: none; white-space: nowrap; }
.local-nav .menu { display: flex; align-items: center; gap: 22px; font-size: 12px; }
.local-nav .menu a { color: var(--p-ink-2); text-decoration: none; white-space: nowrap; }
.local-nav .menu a:hover { color: var(--p-ink); }
.local-nav .menu a.pill { background: var(--p-cta); color: var(--p-cta-ink); padding: 4px 12px; border-radius: 980px; font-weight: 600; }

/* 共通の型 */
:where(.home) section { padding-block: 0; }
.p-section { padding-block: clamp(80px, 12vw, 150px); }
.p-alt { background: var(--p-bg-alt); }
.p-dark { background: var(--p-dark); color: var(--p-dark-ink); }
.p-center { text-align: center; }
.p-eyebrow { font-size: clamp(17px, 2vw, 21px); font-weight: 600; color: var(--p-ink-2); margin: 0 0 8px; }
.p-dark .p-eyebrow { color: var(--p-dark-ink-2); }
.p-headline { font-size: clamp(36px, 6.6vw, 80px); font-weight: 700; line-height: 1.08; letter-spacing: -.005em; margin: 0; }
.p-headline.md { font-size: clamp(32px, 5vw, 56px); line-height: 1.12; }
.p-grad-text { background: var(--p-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.p-copy { font-size: clamp(17px, 2vw, 21px); font-weight: 600; line-height: 1.55; color: var(--p-ink-2); max-width: 34em; }
.p-copy strong { color: var(--p-ink); font-weight: 700; }
.p-dark .p-copy { color: var(--p-dark-ink-2); }
.p-dark .p-copy strong { color: var(--p-dark-ink); }
.p-center .p-copy { margin-inline: auto; }
.p-link { color: var(--p-link); font-size: 17px; text-decoration: none; }
.p-link:hover { text-decoration: underline; }
.p-link::after { content: " ›"; }
.p-dark .p-link { color: #7fd1b6; }

/* ヒーロー */
.p-hero { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(56px, 8vw, 100px); text-align: center; overflow: hidden; }
.p-hero .name { font-size: clamp(22px, 3vw, 32px); font-weight: 600; margin: 0 0 6px; color: var(--p-ink); display: inline-flex; align-items: center; gap: 12px; }
.p-hero .name img { width: 44px; height: 44px; border-radius: 11px; }
.p-hero h1 { font-size: clamp(52px, 11vw, 132px); font-weight: 800; line-height: 1.02; letter-spacing: -.01em; margin: 10px 0 14px; }
.p-hero .sub { font-size: clamp(19px, 2.6vw, 28px); font-weight: 600; color: var(--p-ink-2); margin: 0 0 26px; }
.p-cta-row { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 14px 22px; margin-bottom: clamp(36px, 6vw, 64px); }
.p-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 22px; border-radius: 980px;
  background: var(--p-cta); color: var(--p-cta-ink); font-size: 17px; font-weight: 500; text-decoration: none; border: 0;
}
.p-btn[aria-disabled="true"] { cursor: default; }
.p-price-note { font-size: 14px; color: var(--p-ink-3); margin: -40px 0 48px; }

.p-stage { position: relative; width: min(100% - 32px, 1100px); margin-inline: auto; }
.p-ipad {
  position: relative; border-radius: clamp(18px, 3vw, 40px); background: #0d0d0d; padding: clamp(8px, 1.3vw, 16px);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.p-ipad img { border-radius: clamp(10px, 1.8vw, 24px); width: 100%; height: auto; }
.p-iphone {
  position: relative; border-radius: clamp(22px, 4vw, 52px); background: #0d0d0d; padding: clamp(5px, .8vw, 10px);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.p-iphone img { border-radius: clamp(17px, 3.3vw, 43px); width: 100%; height: auto; }
.p-hero .p-iphone { position: absolute; width: 22%; right: -2%; bottom: -8%; }

/* スクロール表示（JSが有効なときだけ隠してから表示） */
.js .reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .08s; } .js .reveal.d2 { transition-delay: .16s; } .js .reveal.d3 { transition-delay: .24s; }
.js .zoom-in { transform: scale(.92); opacity: .4; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1), opacity 1.2s; }
.js .zoom-in.in { transform: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .js .reveal, .js .zoom-in { opacity: 1; transform: none; transition: none; } }

/* ハイライト（横スクロール） */
.p-highlights { padding-block: clamp(70px, 10vw, 120px); overflow: hidden; }
.p-highlights .head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.p-highlights h2 { font-size: clamp(32px, 4.6vw, 48px); font-weight: 700; margin: 0; }
.p-gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(82vw, 980px); gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: max(16px, calc((100vw - 1120px) / 2));
  padding-inline: max(16px, calc((100vw - 1120px) / 2)); padding-bottom: 8px; scrollbar-width: none;
}
.p-gallery::-webkit-scrollbar { display: none; }
.p-slide {
  scroll-snap-align: start; position: relative; border-radius: 28px; overflow: hidden; background: var(--p-dark-tile); color: #f5f5f7;
  aspect-ratio: 16 / 10; display: flex; flex-direction: column; justify-content: space-between;
}
.p-slide .cap { padding: clamp(22px, 3.4vw, 44px); font-size: clamp(19px, 2.4vw, 28px); font-weight: 700; line-height: 1.3; max-width: 22em; position: relative; z-index: 1; }
.p-slide .cap span { color: #a1a1a6; }
.p-slide .pic { position: absolute; inset: 0; z-index: 0; }
.p-slide .pic img { width: 100%; height: 100%; object-fit: cover; }
.p-slide .pic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .25) 34%, rgba(0, 0, 0, 0) 60%); }
.p-slide.light { background: #f5f5f7; color: #1d1d1f; }
.p-slide.light .cap span { color: #6e6e73; }
.p-slide.light .pic::after { background: linear-gradient(180deg, rgba(245, 245, 247, .95) 0%, rgba(245, 245, 247, .55) 30%, rgba(245, 245, 247, 0) 55%); }
.p-dots { display: flex; justify-content: center; gap: 10px; margin-top: 26px; }
.p-dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; background: var(--p-line); cursor: pointer; transition: width .3s, background .3s; }
.p-dots button[aria-current="true"] { width: 34px; border-radius: 6px; background: var(--p-ink-2); }
.p-dots-wrap { display: flex; justify-content: center; }
.p-dots-wrap .p-dots { background: var(--p-bg-alt); padding: 14px 20px; border-radius: 980px; }

/* 機能セクション */
.p-feature { display: grid; grid-template-columns: 1fr; gap: clamp(36px, 6vw, 64px); }
.p-feature .text { max-width: 760px; }
.p-feature.center .text { margin-inline: auto; text-align: center; }
.p-media { width: min(100%, 1040px); margin-inline: auto; }
.p-media.narrow { width: min(100%, 360px); }
.p-figcap { text-align: center; font-size: 14px; color: var(--p-ink-3); margin-top: 14px; }

.p-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.p-split.flip > :first-child { order: 2; }
.p-split .phone-col { display: flex; justify-content: center; }
.p-split .phone-col .p-iphone { width: min(320px, 78%); }

/* 大きな数字 */
.p-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 24px; margin-top: clamp(48px, 7vw, 80px); }
.p-stat .k { font-size: 15px; font-weight: 600; color: var(--p-ink-2); }
.p-dark .p-stat .k { color: var(--p-dark-ink-2); }
.p-stat .v { font-size: clamp(30px, 4vw, 52px); font-weight: 800; line-height: 1.05; margin: 6px 0; letter-spacing: -.01em; }
.p-stat .v small { font-size: .4em; font-weight: 700; margin-left: 4px; }
.p-stat .d { font-size: 15px; color: var(--p-ink-2); }
.p-dark .p-stat .d { color: var(--p-dark-ink-2); }

/* タイル */
.p-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; margin-top: clamp(40px, 6vw, 64px); }
.p-tile {
  grid-column: span 2; background: var(--p-tile); border-radius: 28px; padding: clamp(28px, 3.4vw, 40px);
  display: flex; flex-direction: column; gap: 10px; min-height: 280px; overflow: hidden; position: relative;
}
.p-tile.w3 { grid-column: span 3; }
.p-tile.w4 { grid-column: span 4; }
.p-tile .t-k { font-size: 15px; font-weight: 600; color: var(--p-ink-2); }
.p-tile h3 { font-size: clamp(24px, 2.8vw, 32px); font-weight: 700; line-height: 1.2; margin: 0; }
.p-tile p { margin: 0; color: var(--p-ink-2); font-size: 17px; }
.p-tile .big { font-size: clamp(56px, 7vw, 88px); font-weight: 800; line-height: 1; letter-spacing: -.02em; margin-top: auto; }
.p-tile .glyph { font-size: 56px; line-height: 1; margin-top: auto; }
.p-tile.dark { background: #1d1d1f; color: #f5f5f7; }
.p-tile.dark p, .p-tile.dark .t-k { color: #a1a1a6; }
.p-tile .swatches { display: grid; grid-template-columns: repeat(9, 1fr); gap: 8px; margin-top: auto; }
.p-tile .swatches i { aspect-ratio: 1; border-radius: 50%; display: block; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.p-tile .lines { margin-top: auto; display: grid; gap: 14px; }
.p-tile .lines i { display: block; height: var(--h); border-radius: 4px; background: var(--c); }
.p-tile .lines i.dash { background: repeating-linear-gradient(90deg, var(--c) 0 14px, transparent 14px 22px); }
.p-tile .lines i.flow { background: repeating-linear-gradient(90deg, var(--c) 0 10px, transparent 10px 20px); background-size: 40px 100%; animation: flow 1.2s linear infinite; }
@keyframes flow { to { background-position: 40px 0; } }
.p-tile .code {
  margin-top: auto; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 15px; line-height: 1.7;
  background: var(--p-bg-alt); border-radius: 16px; padding: 16px 18px; white-space: pre; overflow-x: auto; color: var(--p-ink);
}
.p-tile.dark .code { background: #000; color: #f5f5f7; }
.p-tile .code .k { color: #2c8a70; } .p-tile.dark .code .k { color: #7fd1b6; }
.p-tile .code .a { color: #c2673f; } .p-tile.dark .code .a { color: #f3b08e; }

/* サンプル一覧 */
.p-samples { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: clamp(40px, 6vw, 64px); }
.p-sample { background: var(--p-tile); border-radius: 24px; padding: 28px; }
.p-sample .n { font-size: 40px; font-weight: 800; line-height: 1.1; }
.p-sample .n small { font-size: 17px; font-weight: 700; margin-left: 4px; }
.p-sample h3 { font-size: 21px; margin: 6px 0 6px; }
.p-sample p { margin: 0; color: var(--p-ink-2); font-size: 15px; }

/* 料金の比較 */
.p-compare { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: clamp(40px, 6vw, 64px); border-top: 1px solid var(--p-line); }
.p-plan { padding: 36px 24px 8px; text-align: center; border-right: 1px solid var(--p-line); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.p-plan:last-child { border-right: 0; }
.p-plan .badge { font-size: 12px; font-weight: 700; color: #c2673f; letter-spacing: .06em; min-height: 18px; }
.p-plan h3 { font-size: 28px; margin: 0; }
.p-plan .price { font-size: 17px; color: var(--p-ink); font-weight: 600; margin: 4px 0 16px; }
.p-plan ul { list-style: none; margin: 0; padding: 0; width: 100%; }
.p-plan li { padding: 16px 0; border-top: 1px solid var(--p-line); color: var(--p-ink-2); font-size: 15px; }
.p-plan li b { display: block; color: var(--p-ink); font-size: 17px; }

/* プライバシー */
.p-privacy-mark { width: 72px; height: 72px; margin: 0 auto 22px; color: #7fd1b6; }
.p-checks { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.p-checks span { border: 1px solid #424245; border-radius: 980px; padding: 10px 18px; font-size: 15px; font-weight: 600; color: #f5f5f7; }

/* 技術仕様 */
.p-specs { margin-top: 40px; border-top: 1px solid var(--p-line); }
.p-specs > div { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--p-line); }
.p-specs dt { font-weight: 700; font-size: 17px; }
.p-specs dd { margin: 0; color: var(--p-ink-2); font-size: 17px; }

/* 最後のCTA */
.p-final { text-align: center; }
.p-final img { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 24px; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .3); }

/* 脚注 */
.p-footnotes { background: var(--p-bg-alt); color: var(--p-ink-3); font-size: 12px; line-height: 1.7; padding-block: 28px 8px; }
.p-footnotes ol { margin: 0; padding-left: 1.4em; }
.p-footnotes li { margin-bottom: 6px; }
.home .site-footer { background: var(--p-bg-alt); border-top: 1px solid var(--p-line); }

@media (max-width: 900px) {
  .p-split { grid-template-columns: 1fr; }
  .p-split.flip > :first-child { order: 0; }
  .p-stats { grid-template-columns: repeat(2, 1fr); }
  .p-tiles { grid-template-columns: repeat(2, 1fr); }
  .p-tile, .p-tile.w3, .p-tile.w4 { grid-column: span 2; min-height: 0; }
  .p-samples { grid-template-columns: 1fr 1fr; }
  .p-compare { grid-template-columns: 1fr; border-top: 0; }
  .p-plan { border-right: 0; border-top: 1px solid var(--p-line); padding-top: 32px; }
  .p-specs > div { grid-template-columns: 1fr; gap: 4px; }
  .local-nav .menu .opt { display: none; }
}
@media (max-width: 560px) {
  .p-samples { grid-template-columns: 1fr; }
  .p-hero .p-iphone { width: 30%; right: -1%; bottom: -10%; }
  .p-slide { aspect-ratio: 4 / 5; }
  .p-gallery { grid-auto-columns: 86vw; gap: 12px; }
  .p-highlights .head { display: block; }
  .local-nav .title { font-size: 19px; }
  .local-nav .menu { gap: 14px; }
}

/* 画面の一部を切り出した画像 */
.home .site-header { position: relative; }
.p-split .shot-col { display: flex; justify-content: center; }
.p-shot {
  width: min(100%, 520px); height: auto; border-radius: clamp(20px, 2.4vw, 30px); background: #fff;
  box-shadow: 0 40px 80px -36px rgba(0, 0, 0, .35), 0 0 0 1px rgba(0, 0, 0, .06);
}
.p-slide.light .pic img { object-position: center bottom; }

/* 0.78対応の追加 */
.p-tile .lines i.crayon {
  background: repeating-linear-gradient(100deg, var(--c) 0 3px, rgba(243, 201, 105, .55) 3px 5px, var(--c) 5px 9px, rgba(243, 201, 105, .25) 9px 10px);
  border-radius: 6px; transform: rotate(-.6deg); opacity: .92;
}
.p-samples { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .p-samples { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .p-samples { grid-template-columns: 1fr; } }
.p-sample.p-alt { background: var(--p-bg-alt); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .p-sample.p-alt { background: var(--p-tile); } }
:root[data-theme="dark"] .p-sample.p-alt { background: var(--p-tile); }
