/* Reframit — one stylesheet, no framework.
   The app's palette (Moss), because a landing page that looks like a
   different product than the screenshot on it is doing the opposite of
   its job. */

:root {
  --bg: #12130f;
  --panel: #1b1d17;
  --ink: #f2f1e8;
  --ink-muted: #9ea396;
  --accent: #6c9c80;
  --track: #2a2d24;
  --measure: 34rem;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f6ef;
    --panel: #eceade;
    --ink: #1c1e18;
    --ink-muted: #5f645a;
    --accent: #3f6a50;
    --track: #dedbcc;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  word-break: keep-all;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
        "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

/* The column is main's own, not each child's. Constraining children
   meant `h1 { margin: 0 0 14px }` further down quietly cancelled their
   `margin-inline: auto`, and the headings slid to the left edge while
   the lists stayed centred. */
main {
  max-width: var(--measure);
  margin-inline: auto;
  padding: 0 20px 72px;
}

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

/* --- chrome --------------------------------------------------------------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 22px 20px 34px;
}

.brand {
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.top nav { display: flex; gap: 18px; }
.top nav a { color: var(--ink-muted); text-decoration: none; font-size: 15px; }
.top nav a.on, .top nav a:hover { color: var(--ink); }

.foot {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 32px 20px 56px;
  border-top: 1px solid var(--track);
  color: var(--ink-muted);
  font-size: 14px;
}
.foot p { margin: 6px 0; }
.foot .small a { color: var(--ink-muted); }

/* --- type ----------------------------------------------------------------- */

/* keep-all is not optional with Korean in the page: the default breaks a line
   inside a word, so 모자란 becomes 모 / 자란. It costs Latin text nothing. */
h1, h2, h3, .lede, .points b { word-break: keep-all; }

h1 {
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  text-wrap: balance;
}
h2 { font-size: 23px; line-height: 1.3; margin: 40px 0 10px; letter-spacing: -0.01em; }
h3 { font-size: 18px; margin: 28px 0 8px; }

p { margin: 0 0 16px; }
.lede { font-size: 19px; color: var(--ink-muted); }
.meta { color: var(--ink-muted); font-size: 14px; }

ul { padding-left: 20px; }
li { margin: 6px 0; }

blockquote {
  margin: 20px 0;
  padding: 2px 0 2px 16px;
  border-left: 3px solid var(--accent);
  color: var(--ink-muted);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--panel);
  padding: 1px 5px;
  border-radius: 4px;
}
pre {
  background: var(--panel);
  padding: 14px 16px;
  border-radius: 10px;
  overflow-x: auto;
}
pre code { background: none; padding: 0; }

table { border-collapse: collapse; width: 100%; margin: 18px 0; font-size: 15px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--track); }
th { color: var(--ink-muted); font-weight: 600; }
/* Left-aligned throughout. An earlier rule right-aligned the last column for
   figures, which is right for a number and wrong for the sentence that was
   actually in it. */
td { font-variant-numeric: tabular-nums; }

/* --- landing -------------------------------------------------------------- */

.hero h1 { font-size: 40px; }
.hero .lede { font-size: 20px; margin-bottom: 26px; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 26px 0 8px; }

.button {
  display: inline-block;
  background: var(--accent);
  color: #0f120e;
  font-weight: 650;
  text-decoration: none;
  padding: 13px 22px;
  border-radius: 12px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
}
.button.off {
  background: var(--panel);
  color: var(--ink-muted);
  box-shadow: none;
  cursor: default;
}

.shot {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 36px auto 8px;
  border-radius: 20px;
  border: 1px solid var(--track);
}
.shot-caption { text-align: center; color: var(--ink-muted); font-size: 14px; }

.points { list-style: none; padding: 0; margin: 8px 0 0; }
.points li { margin: 0 0 22px; }
.points b { display: block; font-size: 17px; margin-bottom: 2px; }
.points span { color: var(--ink-muted); }

/* --- blog index ----------------------------------------------------------- */

.posts { list-style: none; padding: 0; }
.posts li { margin: 0 0 26px; }
.posts a { font-size: 19px; text-decoration: none; color: var(--ink); display: block; }
.posts a:hover { color: var(--accent); }
.posts .d { display: block; color: var(--ink-muted); font-size: 13px; margin-bottom: 2px; }
.posts p { color: var(--ink-muted); margin: 4px 0 0; font-size: 15px; }

.post h1 { margin-bottom: 6px; }
.post .meta { margin-bottom: 30px; }
