/*
  The Afralog theme (Views/Themes/Afralog). Plain CSS, no build step. Loaded
  after app.css: app.css still styles the shared partials (contact form,
  search, Identity pages), and the --color-* overrides below make those
  partials use this palette too.
*/
:root {
  --ink: #0f172a; --muted: #475569; --faint: #94a3b8; --line: #e2e8f0;
  --soft: #f4f6fb; --bg: #ffffff; --accent: #2563eb; --accent-soft: #e8efff; --navy: #0b1530;
  --on-accent: #ffffff;
  --shot-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 12px 32px -12px rgba(15, 23, 42, .22);
}
/* Dark follows the system unless the header's toggle chose (html[data-mode]). */
@media (prefers-color-scheme: dark) {
  :root:not([data-mode="light"]) {
    --ink: #e7ebf3; --muted: #a3adc2; --faint: #6b7590; --line: #232b3d;
    --soft: #131a2a; --bg: #0b1020; --accent: #7aa2ff; --accent-soft: #17213d;
    --on-accent: #0b1020;
    --shot-shadow: 0 12px 32px -12px rgba(0, 0, 0, .7);
  }
}
:root[data-mode="dark"] {
  --ink: #e7ebf3; --muted: #a3adc2; --faint: #6b7590; --line: #232b3d;
  --soft: #131a2a; --bg: #0b1020; --accent: #7aa2ff; --accent-soft: #17213d;
  --on-accent: #0b1020;
  --shot-shadow: 0 12px 32px -12px rgba(0, 0, 0, .7);
}
:root {
  --color-background: var(--bg);
  --color-foreground: var(--ink);
  --color-card: var(--soft);
  --color-card-foreground: var(--ink);
  --color-muted: var(--soft);
  --color-muted-foreground: var(--muted);
  --color-border: var(--line);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--on-accent);
  --color-accent-2: var(--accent);
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 "Ubuntu Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.01em; }
p { margin: 0; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }
.page { padding-top: 64px; padding-bottom: 96px; }

.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; }
.site-header nav { display: flex; gap: 22px; flex: 1; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--ink); }
@media (max-width: 720px) {
  .site-header nav { gap: 16px; }
  .site-header nav .wide { display: none; }
}

.button {
  display: inline-block; padding: 11px 20px; border-radius: 8px; font-weight: 600; font-size: 15px;
  text-decoration: none; border: 1px solid var(--line); color: var(--ink); background: var(--bg); cursor: pointer;
}
.mode-toggle {
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg);
  color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer;
}
.mode-toggle:hover { color: var(--ink); border-color: var(--accent); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button:hover { border-color: var(--accent); }

.kicker { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.lead { font-size: 19px; color: var(--muted); max-width: 560px; margin-top: 20px; }
.shot { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: var(--shot-shadow); background: var(--soft); }

/* ---- Landing page (Home/Index) ---- */
.landing section { padding: 96px 0; }
.landing section + section { border-top: 1px solid var(--line); }
@media (max-width: 720px) { .landing section { padding: 64px 0; } }

.hero { padding: 88px 0 72px; }
.hero h1 { font-size: clamp(36px, 5vw, 56px); max-width: 16ch; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hero .small { font-size: 14px; color: var(--faint); margin-top: 16px; }
.hero .shot { margin-top: 56px; }
.hero picture img { width: 100%; }

.feature { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; }
.feature + .feature { margin-top: 88px; }
.feature.flip { grid-template-columns: 7fr 5fr; }
.feature.flip .text { order: 2; }
.feature h2 { font-size: 30px; }
.feature p { color: var(--muted); margin-top: 14px; }
.feature ul { margin: 18px 0 0; padding-left: 18px; color: var(--muted); list-style: disc; }
.feature li + li { margin-top: 6px; }
@media (max-width: 860px) {
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 28px; }
  .feature.flip .text { order: 0; }
}

.head { max-width: 640px; margin-bottom: 40px; }
.head h2, .page h1 { font-size: 34px; }
.head p { color: var(--muted); margin-top: 14px; }
.points { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 48px; }
@media (max-width: 720px) { .points { grid-template-columns: 1fr; } }
.point { display: flex; gap: 14px; }
.tick {
  flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 700; font-size: 14px; margin-top: 2px;
}
.point h3 { font-size: 17px; }
.point p { color: var(--muted); font-size: 16px; margin-top: 4px; }

.selfhost { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.selfhost h2 { font-size: 34px; }
.selfhost p { color: var(--muted); margin-top: 14px; }
@media (max-width: 860px) { .selfhost { grid-template-columns: 1fr; } }
pre.terminal {
  margin: 0; padding: 22px 24px; border-radius: 10px; background: var(--navy); color: #dbe4ff; overflow-x: auto;
  font: 14px/1.7 "Ubuntu Sans Mono", ui-monospace, Menlo, Consolas, monospace;
}
pre.terminal .c { color: #7d89b8; }

.cta-band { text-align: center; }
.cta-band h2 { font-size: 34px; }
.cta-band p { color: var(--muted); margin: 14px auto 0; max-width: 520px; }
.cta-band .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

.subscribe { display: flex; gap: 8px; max-width: 440px; margin: 24px auto 0; }
.subscribe input {
  flex: 1; min-width: 0; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font: inherit; font-size: 15px;
}
.subscribe input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.notice { margin: 16px auto 0; color: var(--accent); font-size: 15px; }

/* ---- Blog list ---- */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; margin-top: 40px; }
.post-card {
  display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  color: var(--ink); text-decoration: none; background: var(--bg);
}
.post-card:hover { border-color: var(--accent); }
.post-card img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: var(--soft); }
.post-card .body { display: flex; flex-direction: column; gap: 8px; padding: 20px; flex: 1; }
.post-card h3 { font-size: 19px; }
.post-card p { color: var(--muted); font-size: 15px; }
.meta { color: var(--faint); font-size: 14px; }
.post-card .meta { margin-top: auto; padding-top: 8px; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 48px; }
.pager a { padding: 6px 12px; border-radius: 6px; color: var(--muted); text-decoration: none; }
.pager a[aria-current] { background: var(--accent); color: var(--on-accent); }

/* ---- Single post ---- */
.article { max-width: 720px; margin: 0 auto; }
.article .back { font-size: 15px; color: var(--muted); text-decoration: none; }
.article h1 { font-size: clamp(32px, 4.5vw, 44px); margin-top: 20px; }
.article .meta { margin-top: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tags span { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 13px; color: var(--muted); }
.article .cover { margin-top: 32px; border-radius: 10px; border: 1px solid var(--line); }

.article-body { margin-top: 36px; font-size: 18px; line-height: 1.75; }
.article-body > * + * { margin-top: 1.1em; }
.article-body h2 { font-size: 28px; margin-top: 1.8em; }
.article-body h3 { font-size: 22px; margin-top: 1.6em; }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li + li { margin-top: .35em; }
.article-body blockquote { border-left: 3px solid var(--accent); padding-left: 1em; color: var(--muted); }
.article-body img { border-radius: 10px; border: 1px solid var(--line); }
.article-body hr { border: 0; border-top: 1px solid var(--line); }
.article-body code { font: .9em "Ubuntu Sans Mono", ui-monospace, Menlo, Consolas, monospace; background: var(--soft); padding: .1em .35em; border-radius: 4px; }
.article-body pre { background: var(--navy); color: #dbe4ff; padding: 18px 20px; border-radius: 10px; overflow-x: auto; }
.article-body pre code { background: none; padding: 0; color: inherit; }
.article-body table { width: 100%; border-collapse: collapse; font-size: 16px; }
.article-body th, .article-body td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.article-body iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; }
/* [Download](https://…){.cta} in a post */
.article-body a.cta {
  display: inline-block; padding: 11px 20px; border-radius: 8px; font-weight: 600; font-size: 15px;
  background: var(--accent); color: var(--on-accent); text-decoration: none;
}
.article-body a.cta:hover { opacity: .9; }

.try-box { margin-top: 56px; padding: 28px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); }
.try-box h2 { font-size: 22px; }
.try-box p { color: var(--muted); margin-top: 8px; }
.try-box .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

.site-footer { border-top: 1px solid var(--line); padding: 32px 0; font-size: 14px; color: var(--faint); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--faint); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
