/* candlemark.dev. Plain CSS, system fonts only, light and dark from the system setting. */

:root {
  --bg: #f7f3ea;
  --bg-alt: #efe8da;
  --surface: #fffdf8;
  --text: #22201c;
  --muted: #615b51;
  --border: #ddd3c1;
  --accent: #116a6c;
  --accent-hover: #0b5254;
  --accent-text: #ffffff;
  --flame: #c97a12;
  --code-bg: #ece4d4;
  --notice-bg: #fbecc9;
  --notice-border: #ecc977;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1b1d;
    --bg-alt: #13262a;
    --surface: #182e32;
    --text: #ece6da;
    --muted: #a9b3ae;
    --border: #2a4549;
    --accent: #e8a640;
    --accent-hover: #f3b95c;
    --accent-text: #1a1408;
    --flame: #f0b04f;
    --code-bg: #0a1416;
    --notice-bg: #2b2414;
    --notice-border: #6a5527;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  overflow-wrap: break-word;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

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

h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; margin: 1.6em 0 0.5em; }
h1 { font-size: 3.2rem; margin: 0.3em 0 0.1em; letter-spacing: -0.01em; }
h2 { font-size: 2.1rem; margin-top: 0; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; margin-top: 0; }

p, ul, ol { margin: 0 0 1em; }
li { margin-bottom: 0.4em; }

code { font-family: var(--mono); font-size: 0.88em; background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; }
pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 0 0 1.2em;
}
pre code { background: none; padding: 0; font-size: inherit; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 760px; }

/* Top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font: 600 1.2rem var(--serif); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand img { border-radius: 7px; }
.topbar nav { display: flex; gap: 20px; flex-wrap: wrap; font-size: 0.95rem; }
.topbar nav a { color: var(--muted); text-decoration: none; }
.topbar nav a:hover { color: var(--text); }

/* Hero */

.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.app-icon { display: block; width: 168px; margin-left: -14px; filter: drop-shadow(0 10px 24px rgba(201, 122, 18, 0.25)); }
.tagline { font: 1.5rem/1.35 var(--serif); color: var(--muted); margin-bottom: 0.8em; }

.download { margin-top: 28px; }
.button {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.3;
  padding: 14px 26px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(17, 106, 108, 0.25);
}
.button:hover { background: var(--accent-hover); color: var(--accent-text); }
.button-version { font-weight: 400; font-size: 0.9rem; opacity: 0.9; }
.download-meta { color: var(--muted); font-size: 0.92rem; margin: 12px 0 4px; }
.checksum { color: var(--muted); font-size: 0.78rem; margin: 0 0 4px; }
.checksum code { word-break: break-all; font-size: 0.95em; }
.older { color: var(--muted); font-size: 0.85rem; margin: 0; }

.shot { margin: 0; }
.shot a { display: block; }
.shot img { display: block; margin: 0 auto; border-radius: 14px; box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16); }
.hero-shot img { width: 100%; max-width: 440px; }

.notice {
  background: var(--notice-bg);
  border: 1px solid var(--notice-border);
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 0.95rem;
  max-width: 1032px;
  margin: 0 24px;
}
@media (min-width: 1081px) { .notice { margin: 0 auto; } }
.notice p { margin: 0; }

/* Sections */

.section { padding: 72px 0; }
.section.alt { background: var(--bg-alt); }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 720px; }

.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  margin: 56px 0;
}
.feature-row.flip { grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); }
.feature-row.flip > :first-child { order: 2; }
.feature-row h3:first-child { margin-top: 0; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
}
.card h3 { margin-top: 0; font-size: 1.15rem; }
.card p:last-child, .card ol:last-child { margin-bottom: 0; }
.cards .card p { font-size: 0.95rem; }

.steps li::marker { color: var(--flame); font-weight: 700; }
.os-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 1.2em; }
.os-steps ol { padding-left: 1.2em; font-size: 0.95rem; }

details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 18px; margin: 0 0 1em; }
summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: 0.6em; }
details p:last-child { margin-bottom: 0; }

/* Footer */

.footer { border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--muted); font-size: 0.95rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.footer p { margin: 0; }

/* Narrow screens */

@media (max-width: 860px) {
  .hero-grid, .feature-row, .feature-row.flip { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .feature-row.flip > :first-child { order: 0; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .hero { padding-top: 32px; }
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.7rem; }
  .tagline { font-size: 1.25rem; }
  .app-icon { width: 128px; margin-left: -10px; }
  .section { padding: 52px 0; }
  .feature-row { margin: 40px 0; }
  .cards, .os-steps { grid-template-columns: minmax(0, 1fr); }
  .topbar nav { gap: 14px; font-size: 0.9rem; }
  .topbar-inner { padding-top: 8px; padding-bottom: 8px; }
  .button { width: 100%; }
  .notice { margin: 0 16px; padding: 12px 16px; }
  html { scroll-padding-top: 96px; }
}
