@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ============================================================================
   content.css — Focus-theme styles for all non-app (content / SEO / blog) pages.
   Loaded as: <link href="/css/default.css"> + <link href="/css/content.css">
   (the homepage uses focus.css instead; this file is the single source of truth
   for every reading page so nav + look stay consistent everywhere).
   Mirrors the homepage Focus tokens in public/css/focus.css.
   ========================================================================= */

:root {
  /* Focus palette (verbatim from focus.css) — overrides default.css neutrals */
  --color-bg: #f7f8fa;
  --color-surface: #ffffff;
  --color-border: #ebecf0;
  --color-text: #1a1d24;
  --color-text-muted: #8b8f9a;
  --color-primary: #4f46e5;
  --color-primary-hover: #4338ca;
  /* light-indigo accent used on the homepage (.pulse) for tinted panels */
  --tint-indigo-bg: #eef0fb;
  --tint-indigo-border: #dcdff7;
  --body-text: #3a3f4b;
  --hover-border: #c7c9d1;
}

/* ── Base ── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--body-text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Site header (canonical nav) ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.site-header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-logo {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}
.site-logo span { color: var(--color-primary); }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a {
  color: var(--body-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}
.site-nav a:hover { color: var(--color-primary); background: #f3f4f8; text-decoration: none; }

/* ── Main reading layout ── */
main { display: block; }
#secondary_content > .content {
  max-width: 840px;
  margin: 0 auto;
  padding: 40px 20px 56px;
}
/* two-column when a numbered-steps / stats sidebar is present */
#secondary_content > .content:has(.secondary_sidebar) {
  max-width: 1140px;
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

/* The article reads as a white "sheet" on the gray page.
   Three cases: an explicit .secondary_main, a .pillar-content article, or
   (blog posts) the content block itself with no inner article wrapper. */
.secondary_main,
.pillar-content,
#secondary_content > .content:not(:has(.secondary_main)) {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: clamp(22px, 4vw, 44px);
  box-shadow: var(--shadow-sm);
}
.secondary_main,
.pillar-content { flex: 1 1 auto; min-width: 0; }

.secondary_sidebar {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Empty placeholder ad asides on content pages — hide rather than reserve space */
#secondary_ads { display: none; }

/* ── Typography ── */
h1 {
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
  line-height: 1.15;
  margin: 0 0 18px;
}
h2 {
  font-size: clamp(21px, 3.5vw, 27px);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--color-text);
  line-height: 1.25;
  margin: 36px 0 12px;
}
h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin: 24px 0 8px;
}
h4 { font-size: 15px; font-weight: 700; color: var(--color-text); margin: 18px 0 8px; }
p { margin: 0 0 16px; }
strong { font-weight: 700; color: var(--color-text); }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { margin: 0 0 16px; padding-left: 1.4em; }
li { margin-bottom: 8px; }
blockquote {
  border-left: 3px solid var(--color-primary);
  padding-left: 16px;
  margin: 0 0 16px;
  color: var(--color-text-muted);
  font-style: italic;
}
hr { border: 0; border-top: 1px solid var(--color-border); margin: 28px 0; }
/* Hide the empty <p></p> and placeholder CTAs left in the legacy markup */
p:empty { display: none; }

/* ── Primary CTA button (indigo pill — mirrors .vpn-cta-btn) ── */
.cta-button {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: var(--radius-full, 999px);
  text-decoration: none;
  min-height: 44px;
  line-height: 1.35;
  transition: background 0.15s ease, transform 0.15s ease;
}
.cta-button:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  color: #fff;
  text-decoration: none;
}
/* legacy empty placeholder (e.g. about.html "How It Works" <a class=cta-button><span></span></a>) */
.cta-button:empty,
.cta-button:has(> span:only-child:empty) { display: none; }
.cta-inline, .cta-section { text-align: center; }
.cta-inline { margin: 22px 0; }
.cta-section {
  background: var(--tint-indigo-bg);
  border: 1px solid var(--tint-indigo-border);
  border-radius: 16px;
  padding: 28px 24px;
  margin-top: 36px;
}
.cta-section h2 { margin-top: 0; }

/* ── About: key-stats box ── */
.about-stats-box {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 20px;
  margin: 0 0 28px;
}
.stat-item { text-align: center; display: flex; flex-direction: column; gap: 4px; }
.stat-number { font-size: 20px; font-weight: 800; color: var(--color-primary); letter-spacing: -0.01em; }
.stat-label { font-size: 12px; color: var(--color-text-muted); font-weight: 600; }

/* ── Related content cards (mirror .mail-card hover-lift) ── */
.related-content { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--color-border); }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.related-card {
  display: block;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 18px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.related-card:hover {
  background: var(--color-surface);
  border-color: var(--hover-border);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.related-icon { font-size: 22px; display: block; margin-bottom: 8px; line-height: 1; }
.related-card h3 { color: var(--color-primary); margin: 0 0 6px; font-size: 16px; }
.related-card p { color: var(--color-text-muted); margin: 0; font-size: 13px; line-height: 1.5; }

/* ── SEO pillar page components ── */
.tldr-box {
  background: var(--tint-indigo-bg);
  border: 1px solid var(--tint-indigo-border);
  border-radius: 14px;
  padding: 20px 22px;
  margin: 0 0 24px;
}
.tldr-title { margin-top: 0; font-size: 19px; }
.last-updated-inline { font-size: 13px; color: var(--color-text-muted); margin-bottom: 20px; }
.lead-paragraph { font-size: 17px; line-height: 1.6; color: var(--color-text); }

.toc {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 18px 22px;
  margin: 0 0 28px;
}
.toc h2 { margin: 0 0 10px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted); }
.toc ul { margin: 0; padding-left: 1.1em; columns: 2; column-gap: 28px; }
.toc li { margin-bottom: 6px; break-inside: avoid; }

.steps-list { padding-left: 1.4em; }
.steps-list > li { margin-bottom: 16px; }
.steps-list > li > strong { display: block; margin-bottom: 4px; }
.steps-list p { margin: 0; }

.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.use-case { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 12px; padding: 16px; }
.use-case h3 { margin: 0 0 6px; font-size: 15px; }
.use-case p { margin: 0; font-size: 13px; color: var(--color-text-muted); }

.comparison-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.comparison-table th, .comparison-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--color-border); }
.comparison-table thead th { background: var(--color-bg); font-weight: 700; color: var(--color-text); }
.comparison-table tbody tr:hover { background: #fafbfc; }

.faq-item { padding: 16px 0; border-bottom: 1px solid var(--color-border); }
.faq-item:last-child { border-bottom: 0; }
.faq-item h3 { margin: 0 0 6px; }
.faq-item p { margin: 0; }

/* ── Sidebar (numbered steps / stats / try-it) ── */
.sidebar_stats {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.sidebar_stats h3 { margin: 0 0 10px; font-size: 16px; }
.sidebar_stats .stat { font-size: 13px; margin-bottom: 6px; color: var(--body-text); }
.sidebar_circle { display: flex; align-items: flex-start; gap: 12px; padding: 2px 0; }
.circle_number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
}
.circle_text { font-size: 13px; color: var(--body-text); line-height: 1.45; padding-top: 5px; }
.sidebar_circle_separator { width: 2px; height: 14px; background: var(--color-border); margin-left: 15px; }
.sidebar_try_it { margin: 6px 0; }
.sidebar_try_it a {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 11px 18px;
  border-radius: var(--radius-full, 999px);
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}
.sidebar_try_it a:hover { background: var(--color-primary-hover); transform: translateY(-1px); text-decoration: none; }

/* ── Blog index ── */
.blog-header { margin-bottom: 24px; }
.blog-header h1 { margin-bottom: 6px; }
.blog-tagline { color: var(--color-text-muted); font-size: 16px; margin: 0; }
.blog-grid { display: flex; flex-direction: column; gap: 14px; }
.blog-section-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin: 22px 0 2px;
}
.blog-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 20px 22px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.blog-card:hover {
  background: var(--color-surface);
  border-color: var(--hover-border);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.blog-card.featured { border-left: 3px solid var(--color-primary); }
.blog-card-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.blog-card-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: var(--radius-full, 999px);
  background: var(--tint-indigo-bg);
  color: var(--color-primary);
}
.blog-card-date { font-size: 12px; color: var(--color-text-muted); }
.blog-card h2 { margin: 0 0 8px; font-size: 19px; }
.blog-card h2 a { color: var(--color-text); text-decoration: none; }
.blog-card h2 a:hover { color: var(--color-primary); text-decoration: none; }
.blog-card p { margin: 0 0 12px; color: var(--color-text-muted); font-size: 14px; }
.blog-card-link { font-weight: 700; font-size: 14px; color: var(--color-primary); }

/* ── Blog post body media (banners + responsive YouTube embeds) ── */
#secondary_content .content img { max-width: 100%; height: auto; border-radius: 12px; display: block; }
#secondary_content .content p:has(> a > img),
#secondary_content .content p:has(> img) { text-align: center; }
#secondary_content .content iframe {
  width: 100%;
  max-width: 560px;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  border-radius: 12px;
  display: block;
  margin: 8px auto;
}

/* ── How-to-avoid-spam: numbered method blocks ── */
.method-item {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 20px 22px;
  margin: 0 0 16px;
}
.method-item h3 { margin-top: 0; }
.method-item p:last-child { margin-bottom: 0; }

/* ── Error page ── */
.error-container { text-align: center; }
/* Each rotating block ships 5 variant spans; with no variant-selector wired,
   show only the first (404) so they don't all render concatenated. */
.error-icon > span > span:not(:first-child),
.error-title > span > span:not(:first-child),
.error-message > span > span:not(:first-child) { display: none; }
.error-icon { font-size: 44px; line-height: 1; margin-bottom: 12px; }
.error-code { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: 8px; }
.error-title { font-size: clamp(24px, 5vw, 34px); margin-bottom: 12px; }
.error-message { color: var(--color-text-muted); margin: 0 auto 24px; max-width: 460px; }
.error-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.error-btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius-full, 999px);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.error-btn-primary { background: var(--color-primary); color: #fff; }
.error-btn-primary:hover { background: var(--color-primary-hover); transform: translateY(-1px); text-decoration: none; }
.error-btn-secondary { background: var(--color-bg); color: var(--color-text); border: 1px solid var(--color-border); }
.error-btn-secondary:hover { border-color: var(--hover-border); text-decoration: none; }
.error-details { margin-top: 24px; text-align: left; font-size: 13px; color: var(--color-text-muted); }
.error-details summary { cursor: pointer; font-weight: 600; }
.error-details pre { white-space: pre-wrap; word-break: break-word; margin: 6px 0 0; }

/* ── Site footer (canonical grouped sitemap) ── */
.site-footer { background: var(--color-surface); border-top: 1px solid var(--color-border); margin-top: 56px; }
.site-footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 44px 20px 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin: 0 0 14px;
}
.footer-col a { display: block; color: var(--body-text); text-decoration: none; font-size: 14px; padding: 5px 0; }
.footer-col a:hover { color: var(--color-primary); text-decoration: none; }
.footer-copy {
  max-width: 1140px;
  margin: 0 auto;
  padding: 18px 20px 28px;
  border-top: 1px solid var(--color-border);
  font-size: 13px;
  color: var(--color-text-muted);
  text-align: center;
}
.footer-copy a { color: var(--color-text-muted); text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 900px) {
  #secondary_content > .content:has(.secondary_sidebar) { flex-direction: column; }
  .secondary_sidebar { width: 100%; }
}
@media (max-width: 600px) {
  body { font-size: 15px; }
  .about-stats-box { grid-template-columns: repeat(2, 1fr); }
  .toc ul { columns: 1; }
}
@media (max-width: 480px) {
  .site-footer-inner { grid-template-columns: 1fr; gap: 24px; }
}

/* ── Accessibility: honour reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .related-card:hover,
  .blog-card:hover,
  .cta-button:hover,
  .sidebar_try_it a:hover { transform: none; }
}
