/* Shared styles for the MRDown landing pages (index.ja.html / index.en.html).
   Kept in one file so the two translations cannot drift apart visually. */

:root {
  --bg: #1e1e1e;
  --bg-deep: #0f1117;
  --surface: #2d2d2d;
  --border: #333;
  --text: #d4d4d4;
  --text-dim: #888;
  --accent: #6d5efc;
  --accent-hover: #5a49e8;
  --link: #58a6ff;
  --code: #ce9178;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* ===== Nav ===== */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: 960px;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: #fff; }
.brand svg { width: 30px; height: 30px; border-radius: 7px; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.nav-links a { color: var(--text-dim); }
.nav-links a:hover { color: #fff; text-decoration: none; }

/* The other translation. Visible at every width — an automatic redirect is a
   guess, so the reader always needs a way to overrule it. */
.lang-switch {
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 4px 11px;
  color: var(--text-dim);
}
.lang-switch:hover { border-color: #4a4a4a; color: #fff; text-decoration: none; }

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 80px 0 70px;
  background: radial-gradient(circle at 50% 0%, rgba(109,94,252,0.16), transparent 60%);
}
.hero .logo { width: 96px; height: 96px; border-radius: 22px; margin-bottom: 28px; box-shadow: 0 12px 40px rgba(0,0,0,0.5); }
.hero h1 { font-size: 52px; line-height: 1.15; color: #fff; letter-spacing: -1px; margin-bottom: 18px; }
.hero h1 .accent { color: var(--accent); }
.hero .lead { font-size: 19px; color: var(--text-dim); max-width: 620px; margin: 0 auto 36px; }

/* Origin: the honest "how it started → what it became" note under the hero. */
.origin { padding: 44px 0 8px; }
.origin .wrap { max-width: 720px; }
.origin .identity { font-size: 22px; line-height: 1.5; color: #fff; font-weight: 700; letter-spacing: -0.3px; margin-bottom: 16px; }
.origin .story { font-size: 16px; line-height: 1.85; color: var(--text-dim); }
.origin .story strong { color: var(--text); font-weight: 600; }
.origin .story code { color: var(--code); font-size: 0.92em; }

.btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 9px; font-size: 15px; font-weight: 600;
  border: 1px solid var(--border); transition: all 0.15s;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; }
.btn-ghost { background: var(--surface); color: var(--text); }
.btn-ghost:hover { background: #3a3a3a; color: #fff; text-decoration: none; }

/* Attributes of the product, not things it does — so they get a thin strip
   under the hero rather than a feature card of their own. */
.attrs { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.attrs span {
  font-size: 12.5px; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 999px; padding: 5px 14px;
}

/* ===== Demo ===== */
.demo { padding: 0 0 20px; }
.demo-frame {
  max-width: 1000px; margin: 0 auto;
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,0.55);
  background: var(--bg-deep);
}
.demo-frame video { display: block; width: 100%; height: auto; }
.demo-caption { text-align: center; color: #5f5f5f; font-size: 12.5px; margin-top: 14px; }

/* ===== Sections ===== */
section { padding: 60px 0; }
.section-title { text-align: center; margin-bottom: 8px; }
.section-title h2 { font-size: 32px; color: #fff; letter-spacing: -0.5px; }
.section-title p { color: var(--text-dim); margin-top: 8px; }

/* ===== Features ===== */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 28px; transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: #4a4a4a; transform: translateY(-3px); }
.card .ico {
  width: 44px; height: 44px; border-radius: 11px;
  background: rgba(109,94,252,0.16); color: #a79fff;
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.card .ico svg { width: 22px; height: 22px; }
.card h3 { color: #fff; font-size: 17px; margin-bottom: 8px; }
.card p { color: var(--text-dim); font-size: 14px; }

/* The four reasons to pick MRDown over another editor. Two columns, bigger —
   they carry the argument, so they must not read as peers of the other ten. */
.features.primary { grid-template-columns: repeat(2, 1fr); gap: 22px; }
.features.primary .card { padding: 32px; }
.features.primary .card h3 { font-size: 19px; }

/* ===== Secondary features — table stakes, listed not sold ===== */
.section-title h2.sub { font-size: 22px; }
.secondary {
  list-style: none;
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 18px 32px; margin-top: 36px;
}
.sec-item { display: flex; gap: 14px; align-items: flex-start; }
.sec-item .ico {
  flex: 0 0 32px; width: 32px; height: 32px; border-radius: 8px;
  background: rgba(109,94,252,0.12); color: #a79fff;
  display: flex; align-items: center; justify-content: center;
}
.sec-item .ico svg { width: 16px; height: 16px; }
.sec-item h4 { color: #fff; font-size: 14.5px; font-weight: 600; margin-bottom: 3px; }
.sec-item p { color: var(--text-dim); font-size: 13px; line-height: 1.6; }

/* Marks a feature that is in `main` but not in the latest release, so the page
   never advertises something a download can't do. Add `.soon` plus a
   `<span class="badge">近日|Soon</span>` to BOTH translations, and strip them
   from both the moment that release ships. Currently unused. */
.soon { opacity: 0.45; }
.badge {
  font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent);
  border-radius: 4px; padding: 1px 5px; margin-left: 7px; vertical-align: 1px;
}

/* ===== Shortcuts ===== */
.shortcuts { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 36px; }
.sc { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 20px; }
.sc .keys { display: flex; gap: 5px; }
kbd {
  background: var(--bg-deep); border: 1px solid #444; border-bottom-width: 2px;
  border-radius: 6px; padding: 4px 9px; font-size: 13px; color: #ccc;
  font-family: 'SF Mono', Menlo, monospace;
}
.sc span { color: var(--text-dim); font-size: 14px; }

/* ===== Code/Install ===== */
.install { max-width: 640px; margin: 36px auto 0; }
pre {
  background: var(--bg-deep); border: 1px solid var(--border);
  border-radius: 12px; padding: 22px; overflow-x: auto;
  font-family: 'SF Mono', Menlo, monospace; font-size: 13.5px; line-height: 1.9; color: var(--text);
}
pre .c { color: #6a9955; }
pre .p { color: var(--text-dim); }
pre .cmd { color: var(--code); }

/* ===== Footer ===== */
footer { border-top: 1px solid var(--border); padding: 36px 0; text-align: center; color: #5f5f5f; font-size: 13px; }
footer .brand { justify-content: center; margin-bottom: 12px; }
footer a { color: var(--text-dim); }

@media (max-width: 760px) {
  .hero h1 { font-size: 38px; }
  .features, .features.primary, .secondary { grid-template-columns: 1fr; }
  .nav-links a:not(.lang-switch) { display: none; }
}
