/* =========================================================
   Sight — Blog Stylesheet  (light design system, matches homepage)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=DM+Serif+Display:ital@0;1&family=DM+Mono:wght@400;500&display=swap');

/* ── Design tokens ── */
:root {
  --bg:           #f8f9fc;
  --bg2:          #eef2ff;
  --surf:         #ffffff;
  --surf2:        #eef2ff;
  --surf3:        #e8edf8;
  --border:       #dde3f0;
  --border2:      #c7d0e8;
  --accent:       #4f46e5;
  --accentL:      #6366f1;
  --accentXL:     #818cf8;
  --cyan:         #0891b2;
  --green:        #059669;
  --yellow:       #d97706;
  --red:          #dc2626;
  --text:         #0f1729;
  --text2:        #4b5680;
  --text3:        #8892b8;
  --r:            14px;
  --r-sm:         8px;
  --r-lg:         20px;
  --transition:   .22s ease;
  --font-sans:    'Manrope', system-ui, -apple-system, sans-serif;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Layout ── */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--r-sm);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accentL));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(79,70,229,.28);
}
.btn-primary:hover {
  opacity: .9;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(79,70,229,.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text2);
  border-color: var(--border2);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surf2);
}

.btn-secondary {
  background: var(--surf2);
  color: var(--text2);
  border-color: var(--border2);
}
.btn-secondary:hover {
  background: #e0e6f8;
  color: var(--text);
}

/* =========================================================
   Navigation
   ========================================================= */
#nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 62px;
  background: rgba(248,249,252,.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(221,227,240,.7);
  transition: box-shadow var(--transition);
}

#nav.scrolled {
  box-shadow: 0 1px 24px rgba(79,70,229,.07);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: 40px;
  flex-shrink: 0;
}

.nav-brand-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--accent), #06b6d4);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surf2);
}

.nav-ctas {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

/* =========================================================
   Footer
   ========================================================= */
footer {
  background: #0f1729;
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 60px 0 0;
  color: rgba(255,255,255,.6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-col h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: rgba(255,255,255,.35);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,.5);
  text-decoration: none;
  margin-bottom: 10px;
  transition: color var(--transition);
}

.footer-col a:hover { color: #fff; }

.footer-brand-text {
  font-size: 14px;
  color: rgba(255,255,255,.4);
  line-height: 1.7;
  max-width: 280px;
  margin-bottom: 20px;
}

.nav-brand-name-footer {
  color: rgba(255,255,255,.9) !important;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.5);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: all var(--transition);
}

.footer-social a:hover {
  border-color: var(--accent);
  color: var(--accentXL);
  background: rgba(79,70,229,.12);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: 13px;
  color: rgba(255,255,255,.3);
}

.footer-legal {
  display: flex;
  gap: 20px;
}

.footer-legal a {
  font-size: 13px;
  color: rgba(255,255,255,.3);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-legal a:hover { color: rgba(255,255,255,.6); }

/* Fix nav-brand colors in the footer */
footer .nav-brand-name { color: rgba(255,255,255,.85); }

/* =========================================================
   Shared utilities
   ========================================================= */
.label {
  display: inline-block;
  background: rgba(79,70,229,.08);
  border: 1px solid rgba(79,70,229,.2);
  color: var(--accent);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.gradient-text-accent {
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =========================================================
   Animations
   ========================================================= */
@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Scroll-reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.16,1,0.3,1), transform 0.65s cubic-bezier(0.16,1,0.3,1);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal-fade {
  opacity: 0;
  transition: opacity 0.65s ease;
}
.reveal-fade.in-view { opacity: 1; }

/* Staggered children */
.reveal:nth-child(2) { transition-delay: .08s; }
.reveal:nth-child(3) { transition-delay: .16s; }
.reveal:nth-child(4) { transition-delay: .24s; }

/* =========================================================
   Blog listing page
   ========================================================= */
.blog-hero {
  padding: 120px 0 64px;
  text-align: center;
  background: linear-gradient(180deg, #eef2ff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

/* Subtle radial glow behind hero text */
.blog-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(79,70,229,.12) 0%, transparent 70%);
  pointer-events: none;
}

.blog-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px,4.5vw,56px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 18px;
  position: relative;
}

.blog-hero p {
  font-size: 17px;
  color: var(--text2);
  max-width: 600px;
  margin: 0 auto 0;
  line-height: 1.75;
  position: relative;
}

/* Blog grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

/* Blog card */
.blog-card {
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 28px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  color: var(--text);
}

.blog-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(79,70,229,.12), 0 2px 8px rgba(0,0,0,.04);
}

/* Animated accent underline */
.blog-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  border-radius: 0 0 var(--r) var(--r);
  transition: width .75s ease-in-out;
  pointer-events: none;
}
.blog-card:hover::after { width: 100%; }

.blog-card-cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}

.blog-card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
  color: var(--text);
  flex: 1;
}

.blog-card-excerpt {
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.65;
  margin-bottom: 18px;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--text3);
  margin-top: auto;
}

.blog-card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Newsletter banner */
.newsletter-banner {
  background: linear-gradient(135deg, rgba(79,70,229,.07), rgba(8,145,178,.04));
  border: 1px solid rgba(79,70,229,.18);
  border-radius: var(--r-lg);
  padding: 28px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.newsletter-banner-text h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.newsletter-banner-text p {
  font-size: 13.5px;
  color: var(--text2);
}

.newsletter-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.newsletter-form input {
  background: var(--surf);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  padding: 10px 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text);
  outline: none;
  width: 240px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.newsletter-form input::placeholder { color: var(--text3); }
.newsletter-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}

/* =========================================================
   Article page
   ========================================================= */
.article-hero {
  padding: 110px 0 48px;
  background: linear-gradient(180deg, #eef2ff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text3);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text3);
  text-decoration: none;
  transition: color var(--transition);
}

.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { opacity: .5; }

.article-cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  display: block;
}

.article-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(26px,3.5vw,46px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.12;
  max-width: 780px;
  margin-bottom: 20px;
  color: var(--text);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--text3);
  flex-wrap: wrap;
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.article-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.article-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

/* Article body */
.article-body, .article-layout .article-body {
  max-width: 740px;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: clamp(20px,2.4vw,28px);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 48px 0 16px;
  color: var(--text);
}

.article-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--text);
}

.article-body p {
  font-size: 16px;
  color: var(--text2);
  line-height: 1.85;
  margin-bottom: 22px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 22px 24px;
}

.article-body li {
  font-size: 16px;
  color: var(--text2);
  line-height: 1.8;
  margin-bottom: 8px;
}

.article-body strong { color: var(--text); font-weight: 700; }

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

.article-body a:hover { color: var(--accentL); }

.article-body code {
  background: var(--surf2);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: .875em;
}

.article-body pre {
  background: #0f1729;
  color: #dde1f0;
  border-radius: var(--r);
  padding: 22px;
  overflow-x: auto;
  font-family: var(--font-mono);
  margin-bottom: 22px;
}

/* Callout block */
.article-callout {
  background: var(--surf2);
  border: 1px solid var(--border2);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 18px 22px;
  margin: 28px 0;
}

.article-callout p {
  margin: 0;
  font-size: 15px;
  color: var(--text2);
  font-style: italic;
}

/* Article layout + sidebar */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 52px;
  align-items: start;
  padding-bottom: 80px;
}

.article-sidebar {
  position: sticky;
  top: 88px;
}

/* Table of Contents */
.toc {
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px 24px;
  margin-bottom: 24px;
}

.toc-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text3);
  margin-bottom: 14px;
}

.toc a {
  display: block;
  font-size: 13.5px;
  color: var(--text2);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}

.toc a:last-child { border-bottom: none; }
.toc a:hover { color: var(--accent); }

/* Sidebar CTA */
.article-cta {
  background: linear-gradient(135deg, rgba(79,70,229,.08), rgba(8,145,178,.05));
  border: 1px solid rgba(79,70,229,.2);
  border-radius: var(--r);
  padding: 24px;
  text-align: center;
}

.article-cta h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.article-cta p {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 16px;
}

/* Related articles */
.related-section {
  border-top: 1px solid var(--border);
  padding: 52px 0 80px;
}

.related-section h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .blog-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .newsletter-banner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .nav-ctas .btn-ghost { display: none; }
}
