/* Markda landing — minimal, typora.io-inspired */
:root {
  --ink: #141414;
  --text: #4a4a4a;
  --muted: #8a8a8a;
  --faint: #b8b8b8;
  --line: #ebebea;
  --paper: #f7f7f5;
  --white: #fff;
  --gray: #f3f3f1;
  --accent: #2f6fdd;
  --dark: #3f4148;
  --darker: #26272a;
  --sans: "Jost", "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --jp: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--white); color: var(--text);
  font-family: var(--jp); font-size: 16px; line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
code { font-family: var(--mono); font-size: .86em; background: #f0f0ee; padding: .1em .4em; border-radius: 3px; color: var(--ink); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 40px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-100%); transition: transform .35s ease;
}
.nav.show { transform: none; }
.nav .brand { display: flex; align-items: center; gap: 10px; font-family: var(--sans); font-size: 18px; color: var(--ink); }
.nav .brand img { width: 26px; height: 26px; }
.nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.nav li a { display: block; padding: 6px 12px; font-size: 13px; color: var(--text); border-radius: 4px; transition: background .2s, color .2s; }
.nav li a:hover { background: var(--gray); color: var(--ink); }
.nav li a.cta { color: var(--accent); }

/* ---------- hero ---------- */
.hero {
  min-height: 100vh; min-height: 100svh; background: var(--paper);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; position: relative; padding: 80px 24px;
}
.hero img.mark { width: 76px; height: 76px; margin-bottom: 30px; }
.hero h1 {
  margin: 0; font-family: var(--sans); font-weight: 300; font-size: clamp(60px, 9vw, 100px);
  line-height: 1; color: var(--ink); letter-spacing: -.01em;
}
.hero .typed {
  margin: 30px 0 0; min-height: 24px;
  font-family: var(--sans); font-size: 13px; letter-spacing: .42em;
  color: var(--muted);
}
.hero .typed b { color: var(--ink); font-weight: 500; }
.hero .caret { display: inline-block; width: 1px; height: 15px; background: var(--ink); margin-left: 4px; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero .scroll { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); color: var(--faint); animation: bob 2.4s ease-in-out infinite; }
.hero .scroll:hover { color: var(--ink); }
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* ---------- common ---------- */
section.block { padding: 128px 0; }
.title {
  font-family: var(--jp); font-weight: 300; font-size: clamp(28px, 3.6vw, 38px);
  color: var(--ink); line-height: 1.45; margin: 0 0 22px; letter-spacing: .02em;
}
.title.en { font-family: var(--sans); font-weight: 300; letter-spacing: .005em; }
.kicker {
  font-family: var(--sans); font-size: 11.5px; letter-spacing: .4em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 18px;
}
.lead { color: var(--muted); font-size: 15px; line-height: 2.05; margin: 0 0 26px; }
.center { text-align: center; }

/* ---------- video frame ---------- */
.shot {
  position: relative; background: #fff; border-radius: 10px; overflow: hidden;
  border: 1px solid #e2e2e0;
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 22px 60px -18px rgba(0,0,0,.22);
}
.shot .bar {
  height: 32px; display: flex; align-items: center; justify-content: center; position: relative;
  background: #f4f4f3; border-bottom: 1px solid #e8e8e6; font-size: 12px; color: #8d8d8d; font-family: var(--sans); letter-spacing: .02em;
}
.shot .bar::before {
  content: ""; position: absolute; left: 12px; top: 11px; width: 10px; height: 10px; border-radius: 50%;
  background: #e1e1df; box-shadow: 16px 0 #e1e1df, 32px 0 #e1e1df;
}
.shot video, .shot img.poster { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #fff; }
.shot.night video { background: #1f1f1f; }
.shot.night { background: #1f1f1f; border-color: #2c2c2c; }
.shot.night .bar { background: #252526; border-color: #333; color: #8a8a8a; }
.shot.night .bar::before { background: #3a3a3a; box-shadow: 16px 0 #3a3a3a, 32px 0 #3a3a3a; }
.caption { margin: 14px 0 0; font-size: 12.5px; color: var(--faint); text-align: center; }

/* ---------- watch ---------- */
.watch { background: var(--paper); padding: 24px 0 120px; }
.watch .film { max-width: 1040px; margin: 0 auto; }
.watch .shot video { aspect-ratio: 16 / 9; object-fit: contain; background: var(--paper); }

/* ---------- feature rows ---------- */
.row { display: grid; grid-template-columns: 1fr 1.35fr; gap: 72px; align-items: center; }
.row.flip { grid-template-columns: 1.35fr 1fr; }
.row.flip .text { order: 2; }
.type-table { width: 100%; border-collapse: collapse; margin: 6px 0 0; font-size: 14px; }
.type-table td { padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.type-table td:first-child { width: 46%; }
.type-table td:first-child code { font-size: 13px; }
.type-table .arrow { color: var(--faint); padding: 0 10px; width: 24px; }
.type-table .out { color: var(--ink); }
.type-table .out b { font-weight: 700; }
.type-table .out .h2 { font-size: 17px; font-weight: 600; }
.type-table .out .box { display: inline-block; width: 12px; height: 12px; border: 1.5px solid #9a9a9a; border-radius: 3px; vertical-align: -1px; margin-right: 6px; }
.type-table .out .q { border-left: 3px solid #d8d8d6; padding-left: 9px; color: var(--muted); }
.type-table .out .math { font-family: "Times New Roman", serif; font-style: italic; font-size: 16px; }
.points { list-style: none; margin: 0; padding: 0; }
.points li { position: relative; padding: 9px 0 9px 22px; font-size: 14.5px; color: var(--text); border-bottom: 1px solid var(--line); }
.points li:last-child { border-bottom: 0; }
.points li::before { content: ""; position: absolute; left: 2px; top: 19px; width: 8px; height: 1.5px; background: var(--ink); }
.points li b { color: var(--ink); font-weight: 500; }
.note { font-size: 12.5px; color: var(--muted); margin-top: 18px; }

/* ---------- organize trio ---------- */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 52px; margin-top: 96px; text-align: left; }
.trio .ico { width: 44px; height: 44px; border: 1px solid #e0e0de; border-radius: 50%; display: grid; place-items: center; color: var(--ink); margin-bottom: 20px; }
.trio h3 { font-family: var(--jp); font-weight: 500; font-size: 16.5px; color: var(--ink); margin: 0 0 10px; }
.trio p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.95; }
.keys { margin-top: 64px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 34px; font-size: 13px; color: var(--muted); }
kbd {
  display: inline-block; font-family: var(--mono); font-size: 11.5px; color: var(--ink);
  border: 1px solid #d9d9d7; border-bottom-width: 2px; border-radius: 4px; padding: 1px 7px; margin-right: 6px; background: #fff;
}
.keys .hint { width: 100%; text-align: center; font-size: 12px; color: var(--faint); }

/* ---------- paper band ---------- */
.paper { background: var(--paper); }

/* ---------- privacy band ---------- */
.band { background: var(--dark); color: #d6d6d6; padding: 104px 0; }
.band .kicker { color: #9c9ea5; }
.band h2 { font-family: var(--jp); font-weight: 300; font-size: clamp(22px, 3vw, 30px); color: #fff; margin: 0 0 60px; line-height: 1.6; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px; text-align: left; }
.facts b { display: block; font-family: var(--sans); font-weight: 300; font-size: 30px; color: #fff; line-height: 1.2; margin-bottom: 10px; }
.facts p { margin: 0; font-size: 13.5px; color: #a8aab0; line-height: 1.95; }

/* ---------- install ---------- */
.install { background: var(--gray); text-align: center; padding: 136px 0 124px; }
.install img.logo { width: 112px; height: 112px; margin: 0 auto 30px; filter: drop-shadow(0 14px 26px rgba(0,0,0,.22)); }
.install h2 { font-family: var(--sans); font-weight: 300; font-size: clamp(38px, 5vw, 50px); color: #4b4b4b; margin: 0 0 12px; line-height: 1.2; }
.install .sub { color: var(--muted); font-size: 14px; margin: 0 0 40px; }
.btn {
  display: inline-block; padding: 13px 34px; border-radius: 3px; font-size: 15px; letter-spacing: .04em;
  background: var(--ink); color: #fff; transition: background .2s, transform .2s;
}
.btn:hover { background: #333; transform: translateY(-1px); }
.cmd { margin: 28px auto 0; display: inline-flex; align-items: center; gap: 14px; padding: 9px 16px; border: 1px solid #dededc; border-radius: 4px; background: #fff; font-family: var(--mono); font-size: 13px; color: #444; }
.cmd button { border: 0; background: none; cursor: pointer; color: var(--muted); font: 12px var(--jp); padding: 0; }
.cmd button:hover { color: var(--ink); }
.install .links { margin-top: 36px; font-size: 13px; color: var(--muted); }
.install .links a { margin: 0 12px; border-bottom: 1px solid transparent; }
.install .links a:hover { color: var(--ink); border-color: var(--ink); }
.install .req { margin-top: 14px; font-size: 12px; color: var(--faint); }

/* ---------- footer ---------- */
footer { background: var(--darker); color: #8d8d8f; font-size: 13px; padding: 56px 0 40px; }
footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
footer h4 { margin: 0 0 12px; color: #e6e6e6; font-weight: 500; font-size: 13px; letter-spacing: .06em; }
footer a { display: block; color: #a5a5a7; padding: 2px 0; }
footer a:hover { color: #fff; }
footer .brand { display: flex; align-items: center; gap: 10px; color: #eee; font-family: var(--sans); font-size: 18px; margin-bottom: 12px; }
footer .brand img { width: 24px; height: 24px; }
footer .fine { margin-top: 44px; padding-top: 20px; border-top: 1px solid #38383a; font-size: 11.5px; color: #6f6f71; line-height: 1.8; }

/* ---------- reveal on scroll ---------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .hero .scroll, .hero .caret { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .row, .row.flip { grid-template-columns: 1fr; gap: 40px; }
  .row.flip .text { order: 0; }
  .trio, .facts { grid-template-columns: 1fr; gap: 40px; }
  footer .cols { grid-template-columns: 1fr 1fr; }
  .nav ul li.opt { display: none; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  section.block { padding: 88px 0; }
  .watch { padding-bottom: 84px; }
  .nav { padding: 0 12px; }
  .nav li a { padding: 6px 8px; }
  .hero .typed { letter-spacing: .26em; }
  .shot .bar { height: 26px; font-size: 11px; }
  .shot .bar::before { top: 8px; width: 8px; height: 8px; box-shadow: 13px 0 #e1e1df, 26px 0 #e1e1df; }
  .type-table { font-size: 13px; }
  .keys { gap: 10px 18px; }
  .cmd { font-size: 12px; }
  .trio { margin-top: 72px; }
}

/* ---------- privacy page ---------- */
.page { max-width: 760px; margin: 0 auto; padding: 120px 24px 96px; }
.page h1 { font-family: var(--jp); font-weight: 300; font-size: 34px; color: var(--ink); margin: 0 0 8px; }
.page h2 { font-family: var(--jp); font-weight: 500; font-size: 18px; color: var(--ink); margin: 44px 0 10px; }
.page p { font-size: 15px; margin: 0 0 14px; }
.page a { color: var(--accent); }
.page .date { color: var(--muted); font-size: 13px; margin-bottom: 36px; }

/* ---------- English page ---------- */
html[lang="en"] { --jp: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif; }
html[lang="en"] body { line-height: 1.75; }
html[lang="en"] .title { letter-spacing: -.01em; line-height: 1.25; }
html[lang="en"] .lead { line-height: 1.8; }
html[lang="en"] .hero .typed { letter-spacing: .3em; text-transform: uppercase; font-size: 12px; }
