/*
  shoki の LP の見た目。決まりは docs/design/20261017-landing-page.md「デザインが決めたこと」:
  システムフォント、ウェイトは Regular と Bold だけ、セマンティックカラーだけ、ライトとダークの両方。
  面は区切り線と余白で分け、カード・影・グラデーションは使わない（ポップオーバーの見本はアプリの再現なので例外）。
*/

:root {
  --label: #1d1d1f;
  --secondary-label: rgba(60, 60, 67, 0.75);
  --tertiary-label: rgba(60, 60, 67, 0.55);
  --separator: rgba(60, 60, 67, 0.16);
  --background: #ffffff;
  --page-margin: #e5e5ea;
  --accent: #007aff;
  /* アプリの recordingActive（docs/DESIGN.md §6）。赤は失敗が使うのでピンク */
  --recording: #ff2d55;
  --mine: #ff9500;
  --theirs: #af52de;
  --icon-fill: rgb(240, 235, 219);
  --popover: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --label: #f5f5f7;
    --secondary-label: rgba(235, 235, 245, 0.7);
    --tertiary-label: rgba(235, 235, 245, 0.5);
    --separator: rgba(84, 84, 88, 0.6);
    --background: #1c1c1e;
    --page-margin: #000000;
    --accent: #0a84ff;
    --recording: #ff375f;
    --mine: #ff9f0a;
    --theirs: #bf5af2;
    --icon-fill: #2c2c2e;
    --popover: #2c2c2e;
  }
}

@media (prefers-contrast: more) {
  :root { --recording: #d30f45; }
}

@media (prefers-color-scheme: dark) and (prefers-contrast: more) {
  :root { --recording: #ff6482; }
}

* { box-sizing: border-box; }

html { background: var(--page-margin); }

body {
  margin: 0 auto;
  max-width: 800px;
  background: var(--background);
  color: var(--label);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, strong { font-weight: 700; }
h1, h2, h3, p, ol { margin: 0; }

a { color: var(--accent); text-decoration: none; }

.container { padding: 0 36px; }

.mono, .mono-inline { font-family: ui-monospace, "SF Mono", Menlo, monospace; }

/* ヘッダとフッタ */

.site-header { border-bottom: 1px solid var(--separator); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--label); font-weight: 700; font-size: 16px; }
.site-header nav a { font-size: 13px; }

.app-icon {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--icon-fill);
  overflow: hidden;
  flex: none;
}
.app-icon img { position: absolute; inset: 0; width: 100%; height: 100%; }
.app-icon.small { width: 14px; height: 14px; border-radius: 3.5px; vertical-align: -2px; margin-right: 4px; }

.site-footer { border-top: 1px solid var(--separator); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 18px;
  color: var(--tertiary-label);
  font-size: 11px;
}

/* ヒーロー */

.hero { border-bottom: 1px solid var(--separator); }
.hero-inner { display: grid; grid-template-columns: 1fr 300px; gap: 36px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
h1 { font-size: 32px; line-height: 1.35; letter-spacing: 0.01em; }
.lead { margin-top: 20px; color: var(--secondary-label); font-size: 13px; line-height: 1.85; }
.hero-text .mac-only, .hero-text .not-mac { margin-top: 20px; }
.meta { margin-top: 8px; color: var(--tertiary-label); font-size: 11px; }

.button {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
}

/* ヒーローの見本: メニューバーとポップオーバー */

.hero-sample { margin: 0; font-size: 11px; }
.menubar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  height: 20px;
  padding: 0 8px;
  border: 1px solid var(--separator);
  border-radius: 5px;
}
.menubar-clock { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11px; }

/* 墨の一画と右上の形（docs/DESIGN.md §6「メニューバーのアイコン」）。18pt の枠、形は 6pt・内側 1pt */
.menubar-mark { position: relative; width: 14px; height: 14px; }
.menubar-mark .ink,
.menubar-mark .shape { position: absolute; background: var(--recording); }
.menubar-mark .ink {
  inset: 0;
  -webkit-mask: url(assets/menubar-mark.svg) center / contain no-repeat;
  mask: url(assets/menubar-mark.svg) center / contain no-repeat;
}
.menubar-mark .shape { top: 0.8px; right: 0.8px; width: 4.7px; height: 4.7px; }
.menubar-mark { animation: breathe 2s ease-in-out infinite; }

/* 録音中は明るさを 1 → 0.7 → 1 と 2 秒周期で上下させる。Reduce Motion で止める */
@keyframes breathe {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(0.7); }
}
@media (prefers-reduced-motion: reduce) {
  .menubar-mark { animation: none; }
}

.popover {
  width: 236px;
  margin: 8px 0 0 auto;
  border: 1px solid var(--separator);
  border-radius: 10px;
  background: var(--popover);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}
.popover-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 10px 4px; }
.popover-title { font-weight: 700; }
.popover-tools { display: flex; gap: 8px; }
.popover svg { width: 12px; height: 12px; fill: none; stroke: var(--label); stroke-width: 1.2; stroke-linecap: round; }
.popover-status { display: flex; align-items: center; gap: 6px; padding: 6px 10px 0; font-size: 12px; }
.popover-status svg.record { width: 14px; height: 14px; stroke: var(--recording); }
.popover-status svg .dot { fill: var(--recording); stroke: none; }
.popover-tracks { display: flex; gap: 10px; padding: 0 10px 0 30px; color: var(--secondary-label); font-size: 9px; }
.track-dot { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; }
.track-dot.mine { background: var(--mine); }
.track-dot.theirs { background: var(--theirs); }
.popover-stop { margin: 8px 10px 10px; padding: 2px 0; border-radius: 5px; background: var(--accent); color: #fff; text-align: center; }
.popover-foot {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  border-top: 1px solid var(--separator);
  color: var(--secondary-label);
  font-size: 9px;
}
.popover-foot .mono { color: var(--label); }
.popover-foot .link { color: var(--accent); }
.hero-sample figcaption { margin-top: 8px; color: var(--tertiary-label); font-size: 9.5px; text-align: right; }

/* 節 */

.section + .section { border-top: 1px solid var(--separator); }
.section-inner { display: grid; grid-template-columns: 152px 1fr; gap: 0; padding-top: 52px; padding-bottom: 56px; }
h2 { font-size: 16px; line-height: 1.4; }
h3 { font-size: 12px; line-height: 1.5; }
.item p, .text, .note { color: var(--secondary-label); font-size: 11px; line-height: 1.75; }
.item p { margin-top: 6px; }

.features { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
.features .item, .list .item { padding: 14px 0 16px; border-top: 1px solid var(--separator); }
.list .item:first-child { padding-top: 0; border-top: none; }

.price { font-size: 20px; font-weight: 700; line-height: 1.3; }
.price + .text { margin-top: 10px; max-width: 430px; }

.download-row { display: flex; align-items: flex-start; gap: 24px; }
.release-meta { color: var(--secondary-label); font-size: 10.5px; line-height: 1.75; }
.release-meta strong { color: var(--label); }
.download-row + .text { margin-top: 20px; max-width: 390px; }

.steps-title { margin-top: 22px; }
.steps { margin-top: 10px; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding: 10px 0 10px 26px; border-top: 1px solid var(--separator); counter-increment: step; font-size: 12px; }
.steps li::before { content: counter(step); position: absolute; left: 0; color: var(--secondary-label); font-size: 11px; }
.steps .note { margin-top: 4px; }

/* スマートフォン・タブレットで開いたとき: ダウンロードを出さず、Mac で開くよう案内する。
   幅では決めない（Mac でウィンドウを狭くしても dmg を落とせるように）。タッチの端末だけを見る */

.not-mac { display: none; color: var(--secondary-label); font-size: 12px; }

@media (pointer: coarse) {
  .mac-only { display: none !important; }
  .not-mac { display: block; }
}

/* 画面幅が狭いとき */

@media (max-width: 720px) {
  body { font-size: 14px; }
  .container { padding: 0 20px; }
  .hero-inner { grid-template-columns: 1fr; padding-top: 44px; padding-bottom: 44px; }
  h1 { font-size: 26px; }
  .hero-sample { max-width: 300px; }
  .section-inner { grid-template-columns: 1fr; gap: 16px; padding-top: 36px; padding-bottom: 40px; }
  .features { grid-template-columns: 1fr; }
  .download-row { flex-direction: column; gap: 10px; }
  .footer-inner { flex-direction: column; gap: 4px; }
}
