/* The site's style: the colors and type of the mockup's site pages, with
   the fonts served from here (no third-party requests). */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/IBMPlexSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/IBMPlexSans-SemiBold.ttf") format("truetype");
  font-weight: 600 700;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #111318;
  --surface: #181b22;
  --code-bg: #0c0e14;
  --border: #2b303b;
  --border-strong: #3a4150;
  --text: #e7e9ee;
  --text-soft: #c8ccd6;
  --text-muted: #8a91a0;
  --accent: #8fa8ff;
  --link: #a9bcff;
  --link-hover: #d3dcff;
  --warm: #f2b55e;
  --done: #6fd3a8;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

a { color: var(--link); }
a:hover { color: var(--link-hover); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

code, pre { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.92em; }
pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: 10px; padding: 14px; overflow-x: auto; }

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

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.grow { flex-grow: 1; }
/* At least 32 x 32 px to touch, on a phone too (rule 18 of D322). */
.target { display: inline-flex; align-items: center; min-height: 32px; min-width: 32px; }
.muted { color: var(--text-muted); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip { position: absolute; left: -9999px; top: 8px; }
.skip:focus { left: 8px; background: var(--surface); padding: 6px 10px; border-radius: 6px; z-index: 10; }

/* Header */
.top { border-bottom: 1px solid var(--border); background: var(--surface); }
.top-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-top: 12px; padding-bottom: 12px; }
.brand { color: var(--text); text-decoration: none; font-weight: 700; font-size: 17px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }
.nav a { color: var(--text-soft); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); text-decoration: underline; text-underline-offset: 6px; }
.lang {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px;
  border-radius: 8px; border: 1px solid var(--border); color: var(--text-soft);
  text-decoration: none; font-size: 13px;
}

/* Home */
.hero { padding-top: 56px; padding-bottom: 40px; max-width: 900px; margin-left: max(0px, calc((100% - 1240px) / 2)); }
.kicker { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--accent); }
h1 { margin: 10px 0 0; font-size: 48px; line-height: 1.1; font-weight: 700; text-wrap: balance; }
.lead { margin-top: 18px; font-size: 18px; color: var(--text-soft); max-width: 34em; }
.lead p { margin: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 26px; }
.status {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  border-radius: 20px; border: 1px solid rgba(242, 181, 94, 0.5);
  background: rgba(242, 181, 94, 0.08); color: var(--warm); font-weight: 600; font-size: 14px;
}
.button {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px;
  border-radius: 10px; background: var(--accent); color: var(--bg);
  text-decoration: none; font-weight: 700;
}
.button:hover { color: var(--bg); background: var(--link-hover); }
.button.secondary { min-height: 38px; background: none; border: 1px solid var(--border-strong); color: var(--text); font-size: 14px; }
.button.secondary:hover { border-color: var(--accent); }

.latest { padding-bottom: 56px; }
h2 { font-size: 22px; line-height: 1.25; margin: 0 0 14px; }

/* Posts */
.posts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.card {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 16px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--border);
  color: inherit; text-decoration: none;
}
.card:hover { border-color: var(--border-strong); color: inherit; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--text-muted); margin: 0; }
.label { color: var(--link); font-weight: 600; }
.card-title { font-weight: 600; font-size: 18px; }
.card-text { font-size: 14px; color: var(--text-soft); }

/* Devlog */
.page-head { padding-top: 36px; }
.page-head h1 { font-size: 40px; line-height: 1.15; margin: 0; }
.page-head .lead { margin-top: 8px; font-size: 17px; }
.columns { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; padding-top: 24px; padding-bottom: 56px; }
.main-column { flex: 3 1 560px; min-width: 0; }
.side-column { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.box { padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.box h2 { font-size: 16px; margin: 0; }
.box p { margin: 6px 0 12px; font-size: 14px; }
.box-title { font-size: 12px !important; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: #a3aab8; }
.roadmap { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 14px; }
.stage { display: flex; align-items: center; gap: 8px; color: var(--text-soft); }
.dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; border: 2px solid var(--border-strong); }
.stage.done .dot { border-color: var(--done); background: var(--done); }
.stage.now { color: var(--text); font-weight: 600; }
.stage.now .dot { border-color: var(--accent); }
.stage.next { color: var(--text-muted); }

/* Articles */
.article { padding-top: 36px; padding-bottom: 56px; max-width: 780px; margin-left: max(0px, calc((100% - 1240px) / 2)); }
.article h1 { font-size: 40px; line-height: 1.15; }
.article .meta { margin-top: 10px; }
.prose { margin-top: 24px; font-size: 17px; color: var(--text); }
.prose h2 { margin: 36px 0 10px; }
.prose h3 { margin: 24px 0 8px; font-size: 18px; }
.prose li { margin: 4px 0; }
.prose img { border-radius: 10px; border: 1px solid var(--border); display: block; margin: 16px 0; }
.prose .figure { margin: 16px 0; }
.prose .figure a { display: block; cursor: zoom-in; }
.prose .caption { margin: -8px 0 16px; font-size: 14px; font-style: italic; color: var(--text-muted); }

/* Footer */
.bottom { border-top: 1px solid var(--border); }
.bottom-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; padding-top: 14px; padding-bottom: 20px; font-size: 13px; }
.bottom-row a { color: var(--text-soft); }
.tagline { color: var(--text-muted); }

@media (max-width: 640px) {
  h1 { font-size: 34px; }
  .page-head h1, .article h1 { font-size: 30px; }
  .hero { padding-top: 36px; }
}
