/* GitReady SEO page styling.
   Mirrors the React app's design tokens so server-rendered blog pages
   look like they belong to the same product. If you change tokens here,
   also change them in web/src/index.css — they intentionally duplicate
   because the React app bundles via Vite/Tailwind and can't import from
   public/ at build time. Keep them in sync. */

:root,
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg-base: #08090A;
  --bg-surface-1: #101113;
  --bg-surface-2: #18191B;
  --bg-inset: #0B0C0E;

  --border-subtle: #1F2125;
  --border-default: #2A2D33;
  --border-strong: #3A3E46;

  --fg-default: #F2F3F5;
  --fg-muted: #9BA0A8;
  --fg-subtle: #6A6F78;

  --accent: #C6FF3D;
  --accent-muted: rgba(198, 255, 61, 0.16);
  --accent-fg: #0A0B0C;

  --success: #3FB950;
  --warning: #D29922;
  --danger: #F85149;
  --info: #58A6FF;

  --font-sans: "Inter Variable", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono Variable", "JetBrains Mono", "SF Mono", Consolas, ui-monospace, monospace;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;

    --bg-base: #FFFFFF;
    --bg-surface-1: #F7F8F9;
    --bg-surface-2: #FFFFFF;
    --bg-inset: #F1F3F5;

    --border-subtle: #E6E8EC;
    --border-default: #D0D4DB;
    --border-strong: #A8AEB8;

    --fg-default: #0E1013;
    --fg-muted: #5C6370;
    --fg-subtle: #8A8F98;

    --accent: #5BAA10;
    --accent-muted: rgba(91, 170, 16, 0.14);
    --accent-fg: #FFFFFF;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-base);
  color: var(--fg-default);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

::selection {
  background: var(--accent);
  color: var(--accent-fg);
}

/* ── Nav ────────────────────────────────────────────────────────────── */

.gr-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 56px;
  background: color-mix(in oklab, var(--bg-base) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.gr-nav__inner {
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.gr-nav__left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.gr-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--fg-default);
}
.gr-logo:hover { text-decoration: none; }
.gr-logo__mark { flex-shrink: 0; }
.gr-logo__ready { color: var(--accent); }

.gr-nav__links {
  display: none;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.gr-nav__links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
  transition: color 150ms ease;
}
.gr-nav__links a:hover {
  color: var(--fg-default);
  text-decoration: none;
}

@media (min-width: 768px) {
  .gr-nav__links { display: flex; }
}

.gr-nav__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gr-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.gr-btn:hover { text-decoration: none; }

.gr-btn--ghost {
  color: var(--fg-default);
  background: transparent;
}
.gr-btn--ghost:hover {
  background: var(--bg-surface-2);
}

.gr-btn--primary {
  color: var(--accent-fg);
  background: var(--accent);
}
.gr-btn--primary:hover {
  filter: brightness(1.08);
}

/* CTA swap is driven by the hint cookie — default shows signed-out, and
   a tiny inline script flips [data-authed] on <html> if gitready_authed
   is set. */
.gr-cta-authed { display: none; }
html[data-authed="1"] .gr-cta-signin { display: none; }
html[data-authed="1"] .gr-cta-authed { display: inline-flex; }

/* ── Article ────────────────────────────────────────────────────────── */

.seo-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

.seo-breadcrumb {
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--fg-muted);
}
.seo-breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.seo-breadcrumb a { color: var(--fg-muted); }
.seo-breadcrumb a:hover { color: var(--fg-default); text-decoration: none; }
.seo-breadcrumb li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--fg-subtle);
}

.seo-article__eyebrow {
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin: 0 0 12px;
}

.seo-article h1 {
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: var(--fg-default);
}

.seo-article__lede {
  font-size: 19px;
  line-height: 1.5;
  color: var(--fg-muted);
  margin: 0 0 16px;
}

.seo-article__meta {
  font-size: 13px;
  color: var(--fg-subtle);
  font-family: var(--font-mono);
  margin: 0 0 32px;
}

/* ── CTA bar ────────────────────────────────────────────────────────── */

.seo-cta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin: 28px 0 40px;
}

.seo-cta-bar__primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--accent);
  color: var(--accent-fg) !important;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
}
.seo-cta-bar__primary:hover {
  filter: brightness(1.08);
  text-decoration: none;
}

.seo-cta-bar__secondary {
  color: var(--fg-muted) !important;
  font-size: 14px;
  margin-left: auto;
}
.seo-cta-bar__secondary:hover { color: var(--fg-default) !important; }

/* ── Prose ──────────────────────────────────────────────────────────── */

.seo-prose {
  color: var(--fg-default);
  font-size: 16px;
  line-height: 1.7;
}
.seo-prose h2 {
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 48px 0 16px;
}
.seo-prose h3 {
  font-size: 20px;
  line-height: 1.3;
  margin: 32px 0 12px;
}
.seo-prose p { margin: 0 0 16px; }
.seo-prose ul, .seo-prose ol {
  padding-left: 22px;
  margin: 0 0 16px;
}
.seo-prose li { margin-bottom: 8px; }
.seo-prose strong { color: var(--fg-default); font-weight: 600; }
.seo-prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in oklab, var(--accent) 40%, transparent);
  text-underline-offset: 3px;
}
.seo-prose a:hover {
  text-decoration-color: var(--accent);
}
.seo-prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-inset);
  color: var(--fg-default);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}
.seo-prose pre {
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  overflow-x: auto;
}
.seo-prose pre code {
  background: transparent;
  border: 0;
  padding: 0;
}
.seo-prose blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  margin: 0 0 16px;
  color: var(--fg-muted);
  font-style: italic;
}
.seo-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 16px;
  font-size: 14px;
}
.seo-prose th, .seo-prose td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}
.seo-prose th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  font-weight: 500;
}

/* ── FAQ ────────────────────────────────────────────────────────────── */

.seo-faq {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
}
.seo-faq h2 {
  font-size: 22px;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}
.seo-faq dt {
  font-weight: 600;
  color: var(--fg-default);
  margin-top: 20px;
  font-size: 15px;
}
.seo-faq dd {
  margin: 6px 0 0;
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.6;
}

/* ── Related ───────────────────────────────────────────────────────── */

.seo-related {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
}
.seo-related h2 {
  font-size: 14px;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin: 0 0 16px;
  font-weight: 500;
}
.seo-related ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.seo-related li a {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface-1);
  color: var(--fg-default);
  transition: border-color 150ms ease, background 150ms ease;
}
.seo-related li a:hover {
  border-color: var(--border-default);
  background: var(--bg-surface-2);
  text-decoration: none;
}
.seo-related li strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}
.seo-related li span {
  color: var(--fg-muted);
  font-size: 14px;
}

/* ── Pillar index (hub) — used by pillar-index.html.tmpl ───────────── */

.seo-pillar-list {
  margin-top: 48px;
}
.seo-pillar-list h2 {
  font-size: 14px;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  font-weight: 500;
  margin: 0 0 20px;
}
.seo-pillar-list ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  counter-reset: pillar;
}
.seo-pillar-list li {
  counter-increment: pillar;
}
.seo-pillar-list li a {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface-1);
  color: var(--fg-default);
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}
.seo-pillar-list li a::before {
  content: counter(pillar, decimal-leading-zero);
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-subtle);
  margin-right: 12px;
  letter-spacing: 0.08em;
}
.seo-pillar-list li a:hover {
  border-color: var(--border-default);
  background: var(--bg-surface-2);
  transform: translateY(-1px);
  text-decoration: none;
}
.seo-pillar-list li strong {
  display: inline;
  font-weight: 600;
  font-size: 16px;
}
.seo-pillar-list li span {
  display: block;
  margin-top: 6px;
  margin-left: 32px;
  color: var(--fg-muted);
  font-size: 14px;
  line-height: 1.5;
}

/* ── Footer ────────────────────────────────────────────────────────── */

.gr-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-base);
  margin-top: 64px;
}
.gr-footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px 32px;
}
.gr-footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
}
@media (max-width: 640px) {
  .gr-footer__top { grid-template-columns: 1fr 1fr; }
  .gr-footer__brand { grid-column: span 2; }
}
.gr-footer__tagline {
  margin-top: 12px;
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.5;
  max-width: 320px;
}
.gr-footer__col h4 {
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  font-weight: 500;
  margin: 0 0 12px;
}
.gr-footer__col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.gr-footer__col li { margin-bottom: 8px; }
.gr-footer__col a {
  font-size: 13px;
  color: var(--fg-muted);
  transition: color 150ms ease;
}
.gr-footer__col a:hover {
  color: var(--fg-default);
  text-decoration: none;
}
.gr-footer__bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 12px;
  color: var(--fg-subtle);
  font-family: var(--font-mono);
}
@media (min-width: 640px) {
  .gr-footer__bottom { flex-direction: row; align-items: center; }
}
.gr-footer__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.gr-footer__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

/* ── Focus ─────────────────────────────────────────────────────────── */

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Landing page (homepage SSR) ─────────────────────────────────────
   The landing template reuses gr-nav + gr-footer + seo-prose but ships
   its own hero / pricing / faq layout because an article shape would
   look wrong for a marketing page. Keep these styles scoped to
   .landing-* so they don't leak into other SEO pages.              */

.landing-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0 0 12px;
}

.landing-section {
  border-top: 1px solid var(--border-subtle);
  padding: 96px 24px;
}
.landing-section--surface { background: var(--bg-surface-1); }
.landing-section__inner {
  max-width: 1100px;
  margin: 0 auto;
}
.landing-section__inner--narrow { max-width: 760px; }
.landing-section__title {
  margin: 0 0 14px;
  font-size: 36px;
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 600;
}
.landing-section__lede {
  margin: 0 0 40px;
  color: var(--fg-muted);
  font-size: 16px;
  max-width: 620px;
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.landing-hero {
  position: relative;
  padding: 120px 24px 96px;
  text-align: center;
  overflow: hidden;
}
.landing-hero__inner {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  z-index: 1;
}
.landing-hero__glow {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 520px;
  background: radial-gradient(ellipse at top, color-mix(in oklab, var(--accent) 14%, transparent), transparent 60%);
  pointer-events: none;
}
.landing-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, var(--border-subtle) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.4;
  mask-image: radial-gradient(ellipse at top, black 30%, transparent 75%);
  pointer-events: none;
}
.landing-hero__title {
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 0;
}
.landing-hero__accent { color: var(--accent); }
.landing-hero__lede {
  margin: 24px auto 0;
  max-width: 620px;
  color: var(--fg-muted);
  font-size: 18px;
  line-height: 1.55;
}
.landing-hero__ctas {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.landing-hero__primary,
.landing-hero__secondary {
  padding: 12px 22px !important;
  font-size: 14px !important;
}
.landing-hero__microcopy {
  margin-top: 20px;
  color: var(--fg-subtle);
  font-size: 12px;
}

/* ── Features ─────────────────────────────────────────────────────── */
.landing-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.landing-feature {
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-2);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.landing-feature__step {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-subtle);
  letter-spacing: 0.08em;
}
.landing-feature h3 {
  margin: 14px 0 8px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.landing-feature p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 14px;
  line-height: 1.55;
}

/* ── Prose (authored body inside landing) ─────────────────────────── */
.landing-prose {
  max-width: 820px;
  margin: 0 auto;
}
.landing-prose h1 {
  font-size: 32px;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  font-weight: 600;
}

/* ── Pricing ──────────────────────────────────────────────────────── */
.landing-pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.landing-price {
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-2);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.landing-price--pro {
  border-color: color-mix(in oklab, var(--accent) 40%, var(--border-default));
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent) 20%, transparent);
}
.landing-price__tag {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 0.1em;
}
.landing-price__amount {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.landing-price__amount span {
  font-size: 14px;
  font-weight: 400;
  color: var(--fg-muted);
  margin-left: 6px;
}
.landing-price ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--fg-muted);
  font-size: 14px;
}
.landing-price li::before {
  content: "✓";
  color: var(--accent);
  margin-right: 8px;
  font-weight: 600;
}
.landing-price .gr-btn { align-self: flex-start; }

/* ── FAQ ──────────────────────────────────────────────────────────── */
.landing-faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.landing-faq__item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface-2);
}
.landing-faq__item[open] { border-color: var(--border-strong); }
.landing-faq__item summary {
  cursor: pointer;
  padding: 18px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-default);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.landing-faq__item summary::-webkit-details-marker { display: none; }
.landing-faq__item summary::after {
  content: "+";
  color: var(--fg-muted);
  font-size: 18px;
  font-weight: 400;
}
.landing-faq__item[open] summary::after { content: "−"; }
.landing-faq__answer {
  padding: 0 20px 20px;
  color: var(--fg-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* ── Related pillar cards ─────────────────────────────────────────── */
.landing-pillars {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.landing-pillars li a {
  display: block;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-2);
  border-radius: var(--radius-md);
  padding: 20px;
  color: var(--fg-default);
  transition: border-color 120ms ease;
}
.landing-pillars li a:hover {
  border-color: var(--border-strong);
  text-decoration: none;
}
.landing-pillars li strong {
  display: block;
  font-size: 15px;
  margin-bottom: 6px;
}
.landing-pillars li span {
  color: var(--fg-muted);
  font-size: 13px;
  line-height: 1.5;
}

/* ── Final CTA ────────────────────────────────────────────────────── */
.landing-final {
  position: relative;
  border-top: 1px solid var(--border-subtle);
  padding: 120px 24px;
  text-align: center;
  overflow: hidden;
}
.landing-final__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, color-mix(in oklab, var(--accent) 10%, transparent), transparent 70%);
  pointer-events: none;
}
.landing-final__inner {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
}
.landing-final h2 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.landing-final p {
  margin: 0 auto 28px;
  max-width: 500px;
  color: var(--fg-muted);
  font-size: 15px;
}

@media (max-width: 640px) {
  .landing-section { padding: 64px 20px; }
  .landing-hero { padding: 80px 20px 64px; }
  .landing-final { padding: 80px 20px; }
  .landing-section__title { font-size: 28px; }
}

