/* Styles for blog post (article) pages only. */

/* ---------- Tokens ---------- */
:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --text: #1a1a1d;
  --muted: #62636b;
  --accent: #4157d8;
  --accent-ink: #ffffff;
  --accent-soft: #eef1ff;
  --border: #e7e4dd;
  --shadow: 0 1px 2px rgba(20, 20, 30, .04), 0 8px 24px rgba(20, 20, 30, .06);
  --radius: 14px;
  --max: 720px;
  --wide: 1040px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121215;
    --surface: #1a1a1f;
    --surface-2: #202027;
    --text: #ececf0;
    --muted: #a3a3ad;
    --accent: #8ea0ff;
    --accent-ink: #10121f;
    --accent-soft: #1d2242;
    --border: #2a2a32;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.75 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.1rem); margin: 0 0 16px; }
h2 { font-size: 1.65rem; margin: 56px 0 12px; }
h3 { font-size: 1.2rem; margin: 32px 0 8px; }

strong { font-weight: 600; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
}
.logo-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
}
.site-header nav a {
  margin-left: 20px;
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
.site-header nav a:hover,
.site-header nav a[aria-current="page"] { color: var(--text); }

/* Reading progress */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: var(--accent);
  z-index: 20;
}

/* ---------- Layout ---------- */
main { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* ---------- Article ---------- */
.post-header { padding: 56px 0 8px; }
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.lead {
  font-size: 1.2rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 8px;
}
.post-header + * { margin-top: 40px; }

article h2 {
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

article ul { padding-left: 0; list-style: none; }
article ul li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
}
article ul li::before {
  content: "";
  position: absolute;
  left: 4px; top: .7em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* Numbered steps as a card */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 8px 20px;
  margin: 16px 0 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 14px 0 14px 46px;
  border-bottom: 1px solid var(--border);
}
.steps li:last-child { border-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 13px;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
}

.callout {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 28px 0;
}

code, kbd {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: .9em;
}

table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 16px; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 600; background: var(--surface-2); }

.back-link {
  display: inline-block;
  margin-top: 48px;
  font-weight: 500;
  text-decoration: none;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 96px;
  border-top: 1px solid var(--border);
}
.site-footer .inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 28px 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 15px;
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ---------- Small screens ---------- */
@media (max-width: 600px) {
  body { font-size: 17px; }
  h2 { font-size: 1.45rem; }
  .post-header { padding-top: 36px; }
  .steps { padding: 4px 14px; }
  table { display: block; overflow-x: auto; }
}

.logo-img { width: 30px; height: 30px; border-radius: 8px; display: block; }

/* Screenshots */
.screenshot { margin: 28px auto 32px; text-align: center; }
.screenshot img {
  width: 100%;
  max-width: 220px;
  height: auto;
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.screenshot figcaption { margin-top: 12px; font-size: 15px; color: var(--muted); }

/* Download section */
.download-cta {
  margin: 56px 0 8px;
  padding: 48px 24px;
  text-align: center;
  color: #ffffff;
  border-radius: 24px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(110, 150, 255, .35), transparent 60%),
    linear-gradient(180deg, #0f1f5c 0%, #0a1440 100%);
  box-shadow: 0 20px 50px rgba(10, 20, 64, .25);
}
.download-cta-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
article .download-cta-title {
  margin: 20px 0 8px;
  padding: 0;
  border: 0;
  font-size: clamp(1.6rem, 4vw, 2rem);
  color: #ffffff;
}
.download-cta-text {
  max-width: 34ch;
  margin: 0 auto 28px;
  color: rgba(255, 255, 255, .75);
  font-size: 17px;
  line-height: 1.6;
}
.download-cta-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.cta-button {
  display: inline-block;
  min-width: 200px;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s ease, background-color .15s ease;
}
.cta-button:hover { transform: translateY(-1px); text-decoration: none; }
.cta-primary { background: #ffffff; color: #0a1440; }
.cta-primary:hover { background: #e8eeff; }
.cta-secondary { color: #ffffff; border: 1px solid rgba(255, 255, 255, .35); }
.cta-secondary:hover { background: rgba(255, 255, 255, .08); }

@media (max-width: 600px) {
  .download-cta { padding: 40px 20px; }
  .cta-button { width: 100%; }
}
