/*
Theme Name: SEO Autopilot
Theme URI: https://seoautopilot.me
Author: SEO Autopilot
Description: Blog theme matching the SEO Autopilot marketing site.
Version: 1.0.0
Text Domain: seoautopilot
*/

:root {
  --blue: #2563eb;
  --blue-d: #1d4ed8;
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --ink: #0f172a;
  --text: #334155;
  --mute: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --soft: #f1f5f9;
  --bg: #f8fafc;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px -12px rgba(15, 23, 42, 0.12);
  --font: "Switzer", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--blue-100); }

.skip {
  position: absolute;
  left: 16px;
  top: -40px;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 80;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid var(--line);
}
body.admin-bar .site-header { top: 32px; }
.nav-in { display: flex; align-items: center; gap: 28px; height: 68px; }
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  flex-shrink: 0;
}
.logo img { height: 42px; width: auto; }
.logo-auto { color: var(--blue); }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 12px; }
.nav-links a {
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--mute);
  white-space: nowrap;
}
.nav-links a:hover { color: var(--ink); background: var(--soft); }
.nav-end { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.signin {
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.signin:hover { color: var(--ink); background: var(--soft); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 11px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 8px 20px -8px rgba(37, 99, 235, 0.65);
}
.btn:hover { background: var(--blue-d); }
.nav-toggle {
  display: none;
  margin-left: auto;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.page { padding: 56px 0 96px; }
.intro { max-width: 680px; margin-bottom: 40px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.55;
}
.intro h1, .article h1, .empty h1, .not-found h1 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: var(--ink);
  text-wrap: balance;
}
.lead { margin-top: 16px; font-size: 18px; line-height: 1.6; color: var(--mute); }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s var(--ease), border-color 0.2s;
}
.card:hover { transform: translateY(-2px); border-color: #cbd5e1; }
.card-media { aspect-ratio: 16 / 9; background: var(--bg); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 24px; flex: 1; }
.card time, .meta { font-size: 13px; font-weight: 600; color: var(--faint); }
.card h2 { font-size: 22px; line-height: 1.2; letter-spacing: -0.03em; font-weight: 700; color: var(--ink); text-wrap: balance; }
.card h2 a:hover { color: var(--blue); }
.card p { font-size: 15.5px; line-height: 1.6; color: var(--text); }
.card .more { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 700; color: var(--blue); }

.paging { display: flex; justify-content: space-between; gap: 16px; margin-top: 36px; }
.paging a, .paging span {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.paging a:hover { color: var(--blue); }

.empty, .not-found { max-width: 640px; padding: 24px 0 12px; }
.empty p, .not-found p { margin-top: 14px; font-size: 17px; color: var(--mute); }

.article { width: min(720px, 100%); margin: 0 auto; }
.article-cover { border-radius: 16px; margin-bottom: 28px; background: var(--bg); }
.article .meta { margin-top: 16px; }
.prose { margin-top: 28px; font-size: 17.5px; line-height: 1.7; color: var(--text); }
.prose > * + * { margin-top: 1.05em; }
.prose h2, .prose h3 { color: var(--ink); letter-spacing: -0.03em; line-height: 1.2; font-weight: 700; margin-top: 1.5em; }
.prose h2 { font-size: 1.45em; }
.prose h3 { font-size: 1.2em; }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: 0.35em; }
.prose blockquote {
  margin-left: 0;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--blue);
  color: var(--ink);
}
.prose img, .prose figure { border-radius: 12px; }
.prose figcaption { margin-top: 8px; font-size: 13px; color: var(--faint); }
.prose pre {
  overflow: auto;
  padding: 16px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.55;
}
.prose code { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.92em; }

.comments { width: min(720px, 100%); margin: 48px auto 0; padding-top: 28px; border-top: 1px solid var(--line); }
.comments h2 { font-size: 22px; color: var(--ink); letter-spacing: -0.03em; }
.comment-list { list-style: none; margin-top: 20px; display: flex; flex-direction: column; gap: 18px; }
.comment-body { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; }
.comment-meta { font-size: 13px; color: var(--faint); margin-bottom: 8px; }
.comment-form { margin-top: 22px; display: grid; gap: 12px; }
.comment-form input, .comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.comment-form textarea { min-height: 140px; resize: vertical; }
.comment-form .submit {
  width: fit-content;
  border: 0;
  cursor: pointer;
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-weight: 700;
}

.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 48px 0 36px; }
.foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px 48px;
}
.foot-brand p { margin-top: 12px; max-width: 36ch; font-size: 14.5px; line-height: 1.55; color: var(--mute); }
.foot-brand .logo img { height: 36px; }
.legal { margin: 18px 0 0; max-width: 62ch; font-size: 13px; line-height: 1.6; color: var(--faint); }
.foot-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 18px; }
.foot-links a { font-size: 14px; font-weight: 600; color: var(--mute); }
.foot-links a:hover { color: var(--blue); }
.copy { margin-top: 12px; text-align: right; font-size: 13px; color: var(--faint); }

@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav-end { display: none; }
  body.nav-open .nav-links,
  body.nav-open .nav-end {
    display: flex;
  }
  body.nav-open .nav-in {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 0 16px;
  }
  body.nav-open .nav-links,
  body.nav-open .nav-end {
    width: 100%;
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
  }
  body.nav-open .nav-end { justify-content: flex-start; }
  .cards { grid-template-columns: 1fr; }
  .foot { flex-direction: column; align-items: flex-start; }
  .foot-links { justify-content: flex-start; }
  .copy { text-align: left; }
}
@media (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}
