/* Shared CSS for the Virtual Host AI blog. Mirrors the tokens from
   index.html so the blog doesn't drift visually from the main site. */

:root {
  /* Palette mirrors frontend-web/src/index.css (agent app) so blog
     pages don't drift from the marketing site or the product. */
  --blue:      #2563EB;
  --blue-600:  #1D4ED8;
  --blue-50:   #EFF6FF;
  --blue-100:  #DBEAFE;
  --slate-900: #0F172A;
  --slate-800: #1E293B;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748B;
  --slate-400: #94A3B8;
  --slate-300: #CBD5E1;
  --slate-200: #E2E8F0;
  --slate-100: #F1F5F9;
  --slate-50:  #F8FAFC;
  --emerald-600: #059669;
  --white: #FFFFFF;
  --radius: 14px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --nav-h: 68px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: var(--slate-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-600); text-decoration: underline; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 0 20px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 8px;
  font-weight: 600; font-size: 15px; border: 1px solid transparent;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
  text-decoration: none;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-600); color: var(--white); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--slate-900); border-color: var(--slate-300); }
.btn-ghost:hover { background: var(--slate-50); border-color: var(--slate-400); text-decoration: none; }
.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover { background: var(--blue-600); color: var(--white); text-decoration: none; }

/* Nav styles intentionally removed — the main site stylesheet
 * (public/assets/style.css) provides the header/nav rules. Duplicate
 * rules here were overriding the new header on blog pages. */

/* Article hero */
.article-hero {
  padding: 48px 0 24px;
  border-bottom: 1px solid var(--slate-200);
}
.article-hero .eyebrow {
  display: inline-block; background: var(--blue-50); color: var(--blue);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 6px 10px; border-radius: 999px; margin-bottom: 16px;
}
.article-hero h1 {
  font-size: 34px; line-height: 1.15; letter-spacing: -0.02em;
  font-weight: 800; margin: 0 0 16px; color: var(--slate-900);
}
@media (min-width: 720px) { .article-hero h1 { font-size: 42px; } }
.article-hero .dek {
  font-size: 18px; color: var(--slate-600); margin: 0 0 20px; max-width: 720px;
}
.article-hero .meta {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--slate-500);
}
.article-hero .meta strong { color: var(--slate-700); font-weight: 600; }

/* Prose */
.prose {
  padding: 40px 0 64px;
  font-size: 17px; color: var(--slate-700); line-height: 1.7;
}
.prose h2 {
  font-size: 24px; color: var(--slate-900); font-weight: 700;
  margin: 40px 0 12px; letter-spacing: -0.01em;
}
.prose h3 {
  font-size: 19px; color: var(--slate-900); font-weight: 700;
  margin: 28px 0 8px;
}
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 16px; }
.prose li { margin: 6px 0; }
.prose blockquote {
  border-left: 3px solid var(--blue);
  padding: 2px 0 2px 16px; margin: 20px 0;
  color: var(--slate-700); font-style: italic;
}
.prose code {
  background: var(--slate-100); padding: 2px 6px; border-radius: 4px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px; color: var(--slate-900);
}
.prose hr {
  border: 0; border-top: 1px solid var(--slate-200);
  margin: 32px 0;
}
.prose a { color: var(--blue); }

/* Summarize-with-ChatGPT bar, near top of every post */
.summarize-bar {
  background: linear-gradient(135deg, #EFF6FF 0%, #EEF2FF 100%);
  border: 1px solid #DBEAFE;
  border-radius: 14px;
  padding: 20px 24px;
  margin: 24px 0 32px;
  display: flex; gap: 16px; align-items: center; justify-content: space-between;
  flex-wrap: wrap;
}
.summarize-bar .text { flex: 1; min-width: 240px; }
.summarize-bar h4 { font-size: 15px; color: var(--slate-900); margin: 0 0 4px; font-weight: 700; }
.summarize-bar p { font-size: 13.5px; color: var(--slate-600); margin: 0; }
.summarize-bar .btn { background: var(--slate-900); color: var(--white); padding: 10px 16px; font-size: 13.5px; }
.summarize-bar .btn:hover { background: #000; color: var(--white); text-decoration: none; }

/* Inline Virtual Host AI ad, mid-article */
.inline-ad {
  background: var(--slate-900); color: var(--white);
  border-radius: var(--radius); padding: 24px 28px;
  margin: 36px 0;
  display: flex; gap: 16px; align-items: center; justify-content: space-between;
  flex-wrap: wrap;
}
.inline-ad h4 { color: var(--white); font-size: 16px; margin: 0 0 4px; }
.inline-ad p  { color: var(--slate-300); font-size: 13.5px; margin: 0; }
.inline-ad .btn { background: var(--white); color: var(--slate-900); }
.inline-ad .btn:hover { background: #F1F5F9; color: var(--slate-900); text-decoration: none; }

.cta-card {
  background: var(--slate-900); color: var(--white);
  border-radius: var(--radius); padding: 28px;
  margin: 40px 0 0;
  display: flex; gap: 16px; align-items: center; justify-content: space-between;
  flex-wrap: wrap;
}
.cta-card h3 { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: var(--white); }
.cta-card p  { margin: 0; color: var(--slate-300); font-size: 14px; }
.cta-card .btn { background: var(--white); color: var(--slate-900); }
.cta-card .btn:hover { background: var(--slate-100); color: var(--slate-900); }

/* Back link */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--slate-500); font-size: 13px; font-weight: 500;
  padding: 24px 0 0;
}

/* Footer styles intentionally removed — main site stylesheet owns
 * the footer (sticky-reveal pattern). Local overrides here would
 * break that on blog pages. */

/* Blog index-only */
.blog-hero { padding: 64px 0 24px; text-align: center; }
.blog-hero h1 {
  font-size: 40px; letter-spacing: -0.02em; margin: 16px 0 12px; font-weight: 800;
}
.blog-hero p { color: var(--slate-600); font-size: 17px; max-width: 620px; margin: 0 auto; }

.post-list {
  display: grid; gap: 20px;
  grid-template-columns: 1fr;
  padding: 40px 0 64px;
}
@media (min-width: 820px) { .post-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .post-list { grid-template-columns: repeat(3, 1fr); } }

.post-card {
  display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--slate-200);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color .15s;
}
.post-card:hover { border-color: var(--slate-300); }
.post-card .cover {
  height: 140px;
  background: linear-gradient(135deg, var(--blue) 0%, #7C3AED 100%);
  position: relative;
}
.post-card .cover.alt-1 { background: linear-gradient(135deg, #0EA5E9 0%, #2563EB 100%); }
.post-card .cover.alt-2 { background: linear-gradient(135deg, #10B981 0%, #0EA5E9 100%); }
.post-card .cover.alt-3 { background: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%); }
.post-card .cover.alt-4 { background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%); }
.post-card .cover.alt-5 { background: linear-gradient(135deg, #2563EB 0%, #0F172A 100%); }
.post-card .cover.alt-6 { background: linear-gradient(135deg, #EC4899 0%, #8B5CF6 100%); }
.post-card .cover.alt-7 { background: linear-gradient(135deg, #14B8A6 0%, #3B82F6 100%); }
.post-card .cover.alt-8 { background: linear-gradient(135deg, #F97316 0%, #DC2626 100%); }
.post-card .cover.alt-9 { background: linear-gradient(135deg, #6366F1 0%, #A855F7 100%); }
.post-card .cover-tag {
  position: absolute; top: 14px; left: 14px;
  background: rgba(255,255,255,0.95); color: var(--slate-900);
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
}
.post-card .body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.post-card a { color: inherit; text-decoration: none; }
.post-card a:hover h3 { color: var(--blue); }
.post-card h3 { font-size: 17px; line-height: 1.3; margin: 0 0 8px; font-weight: 700; }
.post-card p  { color: var(--slate-600); font-size: 13px; line-height: 1.55; margin: 0 0 16px; flex: 1; }
.post-card .meta { font-size: 12px; color: var(--slate-500); display: flex; gap: 10px; }

/* ============ Shared overlays (keep in sync with /assets/style.css) ============ */

/* FAB styles removed — main site stylesheet defines a single black pill
 * with a white icon (no WhatsApp green, no book-tour variant). */

/* When the cookie banner is visible, lift the FABs so they don't collide. */
body.has-cookie-banner .fab-stack { bottom: 96px; }
@media (max-width: 520px) {
  body.has-cookie-banner .fab-stack { bottom: 120px; }
}

/* Cookie consent banner — bottom-centred strip; lower z-index than the drawer. */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40;
  background: var(--slate-900); color: var(--white);
  border-radius: 8px; padding: 18px 22px;
  box-shadow: rgba(50,50,93,0.25) 0 10px 24px -8px, rgba(0,0,0,0.15) 0 4px 12px -3px;
  display: none; gap: 18px; align-items: center; flex-wrap: wrap;
  max-width: 880px; margin-left: auto; margin-right: auto;
}
.cookie-banner.show { display: flex; }
.cookie-banner p { flex: 1; min-width: 240px; font-size: 13.5px; line-height: 1.55; color: var(--slate-300); margin: 0; }
.cookie-banner p a { color: var(--white); text-decoration: underline; }
.cookie-banner .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie-banner .btn { padding: 9px 16px; font-size: 13.5px; }
.cookie-banner .btn-accept { background: var(--blue); color: var(--white); }
.cookie-banner .btn-accept:hover { background: var(--blue-600); }
.cookie-banner .btn-reject { background: transparent; color: var(--slate-200); border: 1px solid #273951; }
.cookie-banner .btn-reject:hover { background: rgba(255,255,255,0.06); color: var(--white); }

/* Mobile nav styles intentionally removed — the main site stylesheet
 * owns the full-screen fade-in mobile menu with the morphing hamburger. */

/* .lang-toggle styles removed — main stylesheet owns the pill. */

/* Update summarize-bar + inline-ad + cta-card to use the new palette */
.summarize-bar {
  background: linear-gradient(135deg, rgba(83,58,253,0.04) 0%, rgba(124,58,237,0.04) 100%);
  border-color: var(--blue-100);
}
.summarize-bar .btn { background: var(--blue); }
.summarize-bar .btn:hover { background: var(--blue-600); }
.inline-ad { border-radius: 8px; }
.cta-card { border-radius: 8px; }

/* ============ Page-transition loading skeleton (shared with /assets/style.css) ============ */
.page-skel { position: fixed; inset: 0; background: var(--white); z-index: 200; display: none; padding: 48px 20px; overflow: hidden; }
.page-skel.show { display: flex; align-items: flex-start; justify-content: center; animation: skel-fade-in .2s ease-out; }
@keyframes skel-fade-in { from { opacity: 0; } to { opacity: 1; } }
.page-skel-frame { width: 100%; max-width: 960px; background: var(--white); border-radius: 16px; box-shadow: 0 20px 50px -10px rgba(15,23,42,0.12), 0 10px 20px -10px rgba(15,23,42,0.06); padding: 20px; animation: skel-frame-in .4s var(--ease) backwards; }
@keyframes skel-frame-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
.page-skel-stage { position: relative; background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%); border-radius: 12px; padding: 32px; overflow: hidden; min-height: 540px; }
.page-skel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1023px) { .page-skel-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 639px)  { .page-skel-grid { grid-template-columns: 1fr; } }
.page-skel-card { background: var(--white); border-radius: 8px; padding: 16px; box-shadow: 0 1px 3px rgba(15,23,42,0.05); animation: skel-card-in .5s var(--ease) backwards; }
.page-skel-card:nth-child(1) { animation-delay: .05s; } .page-skel-card:nth-child(2) { animation-delay: .15s; } .page-skel-card:nth-child(3) { animation-delay: .25s; } .page-skel-card:nth-child(4) { animation-delay: .35s; } .page-skel-card:nth-child(5) { animation-delay: .45s; } .page-skel-card:nth-child(6) { animation-delay: .55s; }
@keyframes skel-card-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.page-skel-img, .page-skel-line { background: linear-gradient(90deg, #F1F5F9 0%, #E2E8F0 50%, #F1F5F9 100%); background-size: 200% 100%; animation: skel-shimmer 1.5s infinite linear; border-radius: 6px; }
.page-skel-img { height: 128px; margin-bottom: 12px; }
.page-skel-line { height: 12px; border-radius: 4px; margin-bottom: 8px; }
.page-skel-line.w75 { width: 75%; } .page-skel-line.w50 { width: 50%; }
@keyframes skel-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.page-skel-search { position: absolute; z-index: 10; width: 48px; height: 48px; border-radius: 50%; background: rgba(37,99,235,0.18); backdrop-filter: blur(4px); color: var(--blue); display: grid; place-items: center; animation: skel-search-path 8s infinite cubic-bezier(0.4, 0, 0.2, 1), skel-search-glow 1.6s infinite ease-in-out; pointer-events: none; }
.page-skel-search svg { width: 22px; height: 22px; }
@keyframes skel-search-path { 0% { top: 32px; left: 32px; } 20% { top: 32px; left: 58%; } 40% { top: 50%; left: 74%; } 60% { top: 70%; left: 30%; } 80% { top: 50%; left: 48%; } 100% { top: 32px; left: 32px; } }
@keyframes skel-search-glow { 0%, 100% { box-shadow: 0 0 20px rgba(37,99,235,0.25); transform: scale(1); } 50% { box-shadow: 0 0 35px rgba(37,99,235,0.5); transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .page-skel-search, .page-skel-card, .page-skel-img, .page-skel-line, .page-skel-frame { animation: none !important; } }
