/* ============================================================
   BOLTRAMP BLOG — style.css
   ============================================================ */

/* ============================================================
   DESIGN TOKENS (mirrors root site)
   ============================================================ */

:root {
  --bg:           #FAFAFA;
  --ink:          #0F172A;
  --accent:       #0EA5E9;
  --accent-hover: #0284C7;
  --muted:        #64748B;
  --border:       #E2E8F0;
  --surface:      #F1F5F9;
  --white:        #FFFFFF;

  --font:         'Inter', sans-serif;

  --text-xs:      0.75rem;
  --text-sm:      0.875rem;
  --text-base:    1rem;
  --text-lg:      1.125rem;
  --text-xl:      1.25rem;
  --text-2xl:     1.5rem;
  --text-3xl:     1.875rem;
  --text-4xl:     2.25rem;
  --text-5xl:     3rem;

  --weight-regular: 400;
  --weight-medium:  500;
  --weight-bold:    700;

  --leading-tight:   1.2;
  --leading-snug:    1.375;
  --leading-normal:  1.5;
  --leading-relaxed: 1.625;
  --leading-loose:   1.8;

  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  --max-width:       1200px;
  --max-width-prose: 1200px;
  --radius:          6px;
  --radius-lg:       12px;
  --transition:      200ms ease;
}

/* ============================================================
   RESET
   ============================================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-relaxed);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol { list-style: none; }

/* ============================================================
   NAVIGATION (matches root site)
   ============================================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.nav__logo {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--ink);
  letter-spacing: -0.02em;
}

.nav__logo span { color: var(--accent); }

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--muted);
  transition: color var(--transition);
}

.nav__link:hover { color: var(--ink); }

.nav__cta {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--white);
  background-color: var(--ink);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius);
  transition: background-color var(--transition);
}

.nav__cta:hover { background-color: var(--accent); }

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  cursor: pointer;
  background: none;
  border: none;
}

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--ink);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container--narrow {
  max-width: var(--max-width-prose);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ============================================================
   BLOG INDEX — HERO
   ============================================================ */

.blog-hero {
  padding-top: calc(64px + var(--space-16));
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--border);
  background: var(--white);
}

.blog-hero__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-3);
}

.blog-hero__heading {
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  letter-spacing: -0.03em;
  line-height: var(--leading-tight);
  margin-bottom: var(--space-4);
}

.blog-hero__description {
  font-size: var(--text-lg);
  color: var(--muted);
  max-width: 560px;
  line-height: var(--leading-relaxed);
}

/* ============================================================
   BLOG INDEX — FILTERS
   ============================================================ */

.blog-filters {
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}

.blog-filters__inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.filter-btn {
  font-family: var(--font);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: var(--space-2) var(--space-4);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
}

/* ============================================================
   BLOG INDEX — POST GRID
   ============================================================ */

.blog-grid {
  padding: var(--space-16) 0;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
}

.post-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 24px rgba(14, 165, 233, 0.08);
}

.post-card__image {
  aspect-ratio: 3/2;
  overflow: hidden;
  background: var(--surface);
}

.post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.post-card:hover .post-card__image img {
  transform: scale(1.03);
}

.post-card__body {
  padding: var(--space-6);
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.post-card__pillar {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.post-card__date {
  font-size: var(--text-xs);
  color: var(--muted);
}

.post-card__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
  color: var(--ink);
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

.post-card__excerpt {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__link {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--accent);
  transition: color var(--transition);
}

.post-card__link:hover { color: var(--accent-hover); }

/* Loading and empty states */
.blog-loading {
  text-align: center;
  padding: var(--space-16);
  color: var(--muted);
  font-size: var(--text-sm);
}

.blog-empty {
  text-align: center;
  padding: var(--space-16);
  color: var(--muted);
}

/* ============================================================
   BLOG POST — LAYOUT
   ============================================================ */

.post-hero {
  padding-top: calc(64px + var(--space-12));
  padding-bottom: var(--space-12);
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.post-hero__back {
  font-size: var(--text-sm);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  transition: color var(--transition);
}

.post-hero__back:hover { color: var(--ink); }

.post-hero__meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.post-hero__pillar {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.post-hero__date {
  font-size: var(--text-xs);
  color: var(--muted);
}

.post-hero__title {
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  letter-spacing: -0.03em;
  line-height: var(--leading-tight);
  margin-bottom: var(--space-6);
  max-width: 800px;
}

.post-hero__image {
  width: 100%;
  aspect-ratio: 21/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: var(--space-8);
}

.post-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   BLOG POST — PROSE CONTENT
   ============================================================ */

.post-content {
  padding: var(--space-16) 0;
}

.post-prose {
  max-width: var(--max-width-prose);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.post-prose h2 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
  line-height: var(--leading-snug);
  color: var(--ink);
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
}

.post-prose h3 {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
  color: var(--ink);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.post-prose p {
  font-size: var(--text-base);
  color: var(--muted);
  line-height: var(--leading-loose);
  margin-bottom: var(--space-5);
}

.post-prose p:first-child {
  font-size: var(--text-lg);
  color: var(--ink);
  line-height: var(--leading-relaxed);
}

.post-prose a { color: var(--accent); transition: color var(--transition); }
.post-prose a:hover { color: var(--accent-hover); }
.post-prose .btn { color: var(--white); }
.post-prose .btn:hover { color: var(--white); }
.post-prose .post-cta__heading { color: var(--white); }
.post-prose .post-cta__text { color: rgba(255,255,255,0.65); }

.post-prose strong { color: var(--ink); font-weight: var(--weight-bold); }

.post-prose ul,
.post-prose ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-5);
  color: var(--muted);
  line-height: var(--leading-loose);
}

.post-prose ul { list-style: disc; }
.post-prose ol { list-style: decimal; }

.post-prose li { margin-bottom: var(--space-2); }

.post-prose blockquote {
  border-left: 3px solid var(--accent);
  padding: var(--space-4) var(--space-6);
  margin: var(--space-8) 0;
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.post-prose blockquote p {
  font-size: var(--text-lg);
  color: var(--ink);
  font-weight: var(--weight-medium);
  margin: 0;
}

.post-prose img {
  width: 100%;
  border-radius: var(--radius-lg);
  margin: var(--space-8) 0;
}

.post-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-8) 0;
  font-size: var(--text-sm);
}

.post-prose th {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 2px solid var(--ink);
  font-weight: var(--weight-bold);
  color: var(--ink);
}

.post-prose td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

.post-prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-10) 0;
}

/* ============================================================
   BLOG POST — FAQ SECTION
   ============================================================ */

.post-faq {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  margin: var(--space-10) 0;
}

.post-faq h2 {
  margin-top: 0 !important;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: var(--space-4) 0;
}

.faq-item:last-child { border-bottom: none; }

.faq-question {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--ink);
  margin-bottom: var(--space-2);
}

.faq-answer {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: var(--leading-relaxed);
  margin: 0;
}

/* ============================================================
   BLOG POST — CTA BLOCK
   ============================================================ */

.post-cta {
  background: var(--ink);
  border-radius: var(--radius-lg);
  padding: var(--space-10) var(--space-8);
  margin: var(--space-10) 0;
  text-align: center;
}

.post-cta__heading {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-3);
}

.post-cta__text {
  font-size: var(--text-base);
  color: rgba(255,255,255,0.65);
  margin-bottom: var(--space-6);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.post-cta__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  line-height: 1;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius);
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
  cursor: pointer;
  white-space: nowrap;
  border: 2px solid transparent;
}

.btn--primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn--dark {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.btn--dark:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.btn--outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.3);
}

.btn--outline:hover { border-color: var(--white); }

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-12) 0;
  background: var(--bg);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-6);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.footer__logo {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--ink);
  letter-spacing: -0.02em;
}

.footer__logo span { color: var(--accent); }

.footer__links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.footer__link {
  font-size: var(--text-sm);
  color: var(--muted);
  transition: color var(--transition);
}

.footer__link:hover { color: var(--ink); }

.footer__legal {
  width: 100%;
  font-size: var(--text-xs);
  color: var(--muted);
  margin-top: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border);
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

/* ============================================================
   MEDIA QUERIES
   ============================================================ */

@media (max-width: 1024px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-hero__heading { font-size: var(--text-3xl); }
  .post-hero__title { font-size: var(--text-3xl); }
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }
  .nav__links--open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: var(--space-6);
    gap: var(--space-4);
  }

  .post-grid { grid-template-columns: 1fr; }
  .blog-hero__heading { font-size: var(--text-2xl); }
  .post-hero__title { font-size: var(--text-2xl); }
  .post-hero__image { aspect-ratio: 16/9; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .post-cta__actions { flex-direction: column; }
}

@media (max-width: 480px) {
  .container,
  .container--narrow { padding: 0 var(--space-4); }
  .post-prose { padding: 0 var(--space-4); }
}
