@charset "UTF-8";
/*
 * type-markdown.app — LP stylesheet
 * トークンと方針は design/brand.md を参照。色はアプリの Colors.theme / backgroundLight / background / action に合わせる。
 */

:root {
  --ink: #333333;          /* Colors.theme（本文・見出し） */
  --sub: #666666;          /* Colors.action（補足） */
  --marker: #999999;       /* Colors.placeholder（Markdown の記号 #・-・---・^） */
  --paper: #ffffff;
  --mist: #eeeeee;         /* Colors.backgroundLight（スライド地・帯） */
  --stone: #cccccc;        /* Colors.background（罫線） */
  --bezel: #1d1d1f;        /* 端末フレーム */
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.06);

  --font-code: "Source Code Pro", "Source Han Code JP", "SourceHanCodeJP", ui-monospace, "SF Mono", Menlo, monospace;
  --font-text: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Segoe UI", system-ui, sans-serif;

  --measure: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --leading: 1.6;
}

:lang(ja) { --leading: 1.85; }

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eeeeee;
    --sub: #999999;
    --marker: #777777;
    --paper: #000000;
    --mist: #222222;
    --stone: #444444;
    --bezel: #3a3a3c;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: var(--leading);
  font-feature-settings: "palt" 0;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

code, .code { font-family: var(--font-code); }

.md { color: var(--marker); font-family: var(--font-code); font-weight: 500; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--paper); padding: 8px 12px; z-index: 10; }

/* ---------- header ---------- */
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.wordmark {
  font-family: var(--font-code);
  font-weight: 700;
  font-size: 20px;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.wordmark .md { font-weight: 700; }

.site-nav { display: flex; align-items: center; gap: 20px; font-size: 14px; }
.site-nav a { text-decoration: none; color: var(--sub); }
.site-nav a:hover { color: var(--ink); text-decoration: underline; }
.site-nav .lang { font-family: var(--font-code); border: 1px solid var(--stone); border-radius: 999px; padding: 4px 12px; color: var(--ink); }
.site-nav .lang:hover { border-color: var(--ink); text-decoration: none; }
@media (max-width: 640px) { .site-nav .anchor { display: none; } }

/* ---------- hero ---------- */
.hero { padding: clamp(32px, 7vw, 88px) 0 clamp(40px, 7vw, 96px); }

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 7.2vw, 76px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.hero h1 .md { font-size: 0.55em; vertical-align: 0.35em; margin-right: 0.35em; font-weight: 700; }
:lang(ja) .hero h1 { letter-spacing: 0.01em; }

.hero .tagline { margin: 16px 0 0; font-size: clamp(18px, 2.4vw, 24px); color: var(--sub); }

.hero .lead { margin: 24px 0 0; max-width: 36em; }

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 32px; }
.cta .badge img { width: 156px; height: auto; }
@media (prefers-color-scheme: dark) { .cta .badge img { outline: 1px solid #a6a6a6; border-radius: 9px; } }
.cta .meta { font-size: 14px; color: var(--sub); }

/* 1 つの Markdown → プレビュー と スライド・PDF */
.demo {
  margin-top: clamp(40px, 6vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1.1fr);
  align-items: center;
}
.outputs { display: grid; gap: 20px; }
.output { margin: 0; }
.out-label { margin: 0 0 8px; text-align: left; font-family: var(--font-code); font-size: 13px; font-weight: 600; color: var(--sub); }
.doc {
  background: var(--paper);
  border: 1px solid var(--stone);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: clamp(14px, 2vw, 22px) clamp(16px, 2.4vw, 26px);
  font-size: clamp(12px, 1.2vw, 14px);
  line-height: 1.6;
}
.doc .d-h1 { font-weight: 700; font-size: 1.6em; padding-bottom: 0.25em; border-bottom: 1px solid var(--stone); }
.doc .d-p { margin-top: 0.6em; }
.doc .d-h2 { font-weight: 700; font-size: 1.25em; margin-top: 0.8em; padding-bottom: 0.2em; border-bottom: 1px solid var(--stone); }
.doc ul { margin: 0.5em 0 0; padding-left: 1.4em; }
.demo .arrow { text-align: center; font-family: var(--font-code); color: var(--marker); font-size: 28px; }
.demo .arrow::before { content: "→"; }

.editor {
  background: var(--paper);
  border: 1px solid var(--stone);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 16px 22px 22px;
  font-family: var(--font-code);
  font-size: clamp(13px, 1.35vw, 15px);
  line-height: 1.9;
}
.editor .dots { display: flex; gap: 6px; margin-bottom: 10px; }
.editor .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--stone); }
.editor ol { list-style: none; margin: 0; padding: 0; }
.editor li { min-height: 1.9em; white-space: pre-wrap; overflow-wrap: anywhere; }
.editor .script { color: var(--sub); }

.slide {
  background: var(--mist);
  border-radius: 10px;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  padding: clamp(16px, 2.6vw, 30px);
  position: relative;
  font-family: var(--font-code);
  overflow: hidden;
}
.slide .title { font-weight: 700; font-size: clamp(17px, 2.3vw, 28px); line-height: 1.3; }
.slide .body { margin-top: 0.6em; font-size: clamp(10px, 1.05vw, 13px); color: var(--sub); }
.slide .credit { position: absolute; right: clamp(12px, 1.8vw, 20px); bottom: clamp(8px, 1.4vw, 14px); font-size: clamp(9px, 0.95vw, 12px); color: var(--marker); font-weight: 600; }

@media (max-width: 760px) {
  .demo { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .demo .arrow { padding: 8px 0; }
  .demo .arrow::before { content: "↓"; }
}

@media (prefers-reduced-motion: no-preference) {
  .editor li { animation: type-in 0.01s both; animation-delay: calc(var(--i, 0) * 140ms + 300ms); }
  .output { animation: render-in 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: 1.8s; }
  .output + .output { animation-delay: 2.05s; }
}
@keyframes type-in { from { visibility: hidden; } to { visibility: visible; } }
@keyframes render-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------- slide break between sections ---------- */
.rule {
  font-family: var(--font-code);
  color: var(--marker);
  font-size: 18px;
  letter-spacing: 0.1em;
  margin: 0;
  padding: 0;
  border: 0;
  height: auto;
  text-align: left;
}
.rule::before { content: "---"; }

/* ---------- feature sections ---------- */
.section { padding: clamp(48px, 8vw, 104px) 0; }

.section h2 {
  margin: 0;
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1.25;
  font-weight: 800;
}
.section h2 .md { font-size: 0.6em; vertical-align: 0.18em; margin-right: 0.45em; }
.section .kicker { margin: 12px 0 0; font-size: clamp(17px, 2vw, 20px); color: var(--sub); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
  margin-top: clamp(28px, 4vw, 48px);
}
.split.flip > :first-child { order: 2; }
@media (max-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split.flip > :first-child { order: 0; }
}

.points { list-style: none; margin: 0; padding: 0; }
.points li { position: relative; padding-left: 1.6em; margin: 0 0 18px; }
.points li::before { content: "-"; position: absolute; left: 0; color: var(--marker); font-family: var(--font-code); }
.points strong { display: block; font-weight: 700; }
.points span { color: var(--sub); font-size: 15.5px; }

pre.sample {
  margin: 28px 0 0;
  padding: 18px 20px;
  background: var(--mist);
  border-radius: 10px;
  font-family: var(--font-code);
  font-size: 14px;
  line-height: 1.8;
  overflow-x: auto;
  white-space: pre;
}
pre.sample .c { color: var(--marker); }

/* ---------- device frames ---------- */
.shots { display: flex; gap: clamp(12px, 2.4vw, 28px); justify-content: center; align-items: flex-start; }
/*
 * 端末枠は端末の幅に対する割合（cqi）で描く。固定 px だと小さい画面で角丸が大きすぎる。
 * 枠は img の border。内側（画面）の角丸は「外側の角丸 − 枠の太さ」になる。
 *   iPhone: 枠 3.2cqi、画面の角丸 = 画面幅の 13%（12.2cqi）→ 外側 15.4cqi
 */
.phone { width: min(280px, 46%); flex: none; container-type: inline-size; }
.phone img {
  width: 100%;
  border: 3.2cqi solid var(--bezel);
  border-radius: 15.4cqi;
  background: var(--bezel);
  box-shadow: var(--shadow);
}
.shots .phone:nth-child(2) { margin-top: 48px; }

/*   iPad: 枠 2.4cqi、画面の角丸 = 画面幅の 3.2%（3.05cqi）→ 外側 5.45cqi */
.tablet { container-type: inline-size; }
.tablet img {
  width: 100%;
  border: 2.4cqi solid var(--bezel);
  border-radius: 5.45cqi;
  background: var(--bezel);
  box-shadow: var(--shadow);
}

.window { border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--stone); }

figure { margin: 0; }
figcaption { margin-top: 12px; font-size: 13px; color: var(--sub); text-align: center; }

.devices { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; margin-top: clamp(28px, 4vw, 48px); }
.devices .tablet { max-width: 520px; width: 100%; justify-self: center; }
@media (max-width: 760px) { .devices { grid-template-columns: minmax(0, 1fr); } }

.platforms { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 28px 0 0; padding: 0; list-style: none; font-family: var(--font-code); font-weight: 600; }
.platforms li::before { content: "- "; color: var(--marker); }

/* ---------- premium ---------- */
.band { background: var(--mist); }

.plans { width: 100%; border-collapse: collapse; margin-top: clamp(28px, 4vw, 44px); font-size: 16px; }
.plans th, .plans td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--stone); vertical-align: top; }
.plans thead th { font-family: var(--font-code); font-size: 15px; border-bottom: 2px solid var(--ink); }
.plans tbody th { font-weight: 600; width: 46%; }
.plans td { color: var(--sub); }
.plans .yes { color: var(--ink); font-weight: 600; }
@media (max-width: 560px) {
  .plans { font-size: 14.5px; }
  .plans th, .plans td { padding: 12px 6px; }
}

.prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 32px; }
.price { background: var(--paper); border-radius: 12px; padding: 20px 22px; border: 1px solid var(--stone); }
.price.recommended { border: 2px solid var(--ink); }
.price .name { font-weight: 700; }
.price .amount { font-family: var(--font-code); font-size: 28px; font-weight: 700; margin-top: 4px; }
.price .amount small { font-size: 15px; color: var(--sub); font-weight: 500; }
.price .note { font-size: 14px; color: var(--sub); margin-top: 4px; }

.fineprint { margin-top: 24px; font-size: 13.5px; color: var(--sub); max-width: 52em; }
.fineprint p { margin: 0 0 6px; }

/* ---------- faq ---------- */
.faq { margin: clamp(24px, 4vw, 40px) 0 0; max-width: 46em; }
.faq dt { font-weight: 700; margin-top: 28px; }
.faq dt::before { content: "Q. "; font-family: var(--font-code); color: var(--marker); }
.faq dd { margin: 8px 0 0 0; color: var(--sub); }

/* ---------- closing / footer ---------- */
.closing { text-align: left; }
.closing p.big { font-size: clamp(24px, 3.6vw, 36px); font-weight: 800; margin: 0; line-height: 1.3; }

.site-footer { border-top: 1px solid var(--stone); padding: 32px 0 48px; font-size: 14px; color: var(--sub); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; }
.site-footer a { color: var(--sub); }
.site-footer a:hover { color: var(--ink); }

/* ---------- language chooser (/) ---------- */
.chooser { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; text-align: center; }
.chooser .wordmark { font-size: 40px; display: inline-block; }
.chooser p { margin: 12px 0 0; color: var(--sub); }
.chooser .choices { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 32px; }
.chooser .choices a { font-family: var(--font-code); font-weight: 600; text-decoration: none; border: 1px solid var(--ink); border-radius: 999px; padding: 10px 24px; min-width: 140px; }
.chooser .choices a:hover { background: var(--ink); color: var(--paper); }
