/* ─── BLOG STYLES — RankLoft ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #080812;
  --bg-elevated: #0f0f1e;
  --bg-card: #141428;
  --mint: #6EE7B7;
  --mint-dim: rgba(110, 231, 183, 0.15);
  --mint-glow: rgba(110, 231, 183, 0.3);
  --white: #ffffff;
  --gray-100: #f0f0f5;
  --gray-300: #a0a0b8;
  --gray-500: #6b6b80;
  --gray-700: #2a2a40;
  --radius: 16px;
  --radius-sm: 10px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Space Grotesk', sans-serif; line-height: 1.2; }
a { color: inherit; text-decoration: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ─── READING PROGRESS ─── */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--mint), rgba(110, 231, 183, 0.5));
  z-index: 999;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: background 0.3s, padding 0.3s, backdrop-filter 0.3s;
}

nav.scrolled {
  background: rgba(8, 8, 18, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 14px 0;
  border-bottom: 1px solid rgba(110, 231, 183, 0.08);
}

nav .container { display: flex; align-items: center; justify-content: space-between; }

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.5px;
}
.logo span { color: var(--mint); }

.nav-links { display: flex; align-items: center; gap: 36px; list-style: none; }

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-300);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }
.nav-links a.active { color: var(--mint); }

.nav-cta {
  background: var(--mint);
  color: var(--bg) !important;
  padding: 10px 22px;
  border-radius: 100px;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 20px var(--mint-glow); }

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ─── BLOG INDEX HERO ─── */
.blog-hero {
  padding: 160px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  background: radial-gradient(circle, var(--mint-dim) 0%, transparent 60%);
  pointer-events: none;
}

.blog-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid rgba(110, 231, 183, 0.2);
  background: rgba(110, 231, 183, 0.06);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--mint);
  margin-bottom: 28px;
}

.blog-hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}

.blog-hero p {
  font-size: 1.1rem;
  color: var(--gray-300);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ─── FEATURED POST ─── */
.featured-post {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--gray-700);
  background: var(--bg-card);
  margin-bottom: 64px;
  transition: border-color 0.2s;
  text-decoration: none;
  color: inherit;
}
.featured-post:hover { border-color: rgba(110, 231, 183, 0.3); }
.featured-post:hover .featured-img img { transform: scale(1.03); }

.featured-img {
  position: relative;
  overflow: hidden;
  min-height: 380px;
}
.featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.featured-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 60%, var(--bg-card) 100%);
  pointer-events: none;
}

.featured-content {
  padding: 48px 48px 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-label {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 100px;
  background: var(--mint-dim);
  color: var(--mint);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.featured-content h2 {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  line-height: 1.25;
  color: var(--white);
}

.featured-content p {
  font-size: 0.95rem;
  color: var(--gray-300);
  line-height: 1.7;
  margin-bottom: 28px;
}

.featured-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--gray-500);
}

.featured-meta .read-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--mint);
  font-weight: 600;
  font-size: 0.85rem;
  transition: gap 0.2s;
}
.featured-post:hover .read-link { gap: 10px; }

/* ─── POSTS GRID ─── */
.posts-section { padding-bottom: 100px; }

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 28px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.post-card:hover {
  border-color: rgba(110, 231, 183, 0.25);
  transform: translateY(-3px);
}
.post-card:hover .card-img img { transform: scale(1.05); }

.card-img {
  height: 200px;
  overflow: hidden;
  position: relative;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }

.card-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--mint-dim);
  color: var(--mint);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.card-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.35;
  margin-bottom: 10px;
  color: var(--white);
}

.card-body p {
  font-size: 0.875rem;
  color: var(--gray-300);
  line-height: 1.6;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-700);
  font-size: 0.75rem;
  color: var(--gray-500);
}

.card-meta .arrow {
  color: var(--mint);
  font-size: 1rem;
  transition: transform 0.2s;
}
.post-card:hover .arrow { transform: translateX(4px); }

/* ─── POST HERO ─── */
.post-hero {
  position: relative;
  height: 520px;
  overflow: hidden;
  margin-top: 0;
}

.post-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(8, 8, 18, 0.3) 0%,
    rgba(8, 8, 18, 0.5) 50%,
    rgba(8, 8, 18, 0.92) 100%
  );
}

.post-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 0 0 52px;
}

.post-hero-content .container { max-width: 860px; }

.post-category {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 100px;
  background: var(--mint-dim);
  color: var(--mint);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.post-hero-content h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 20px;
  max-width: 780px;
}

.post-meta-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.82rem;
  color: var(--gray-300);
  flex-wrap: wrap;
}
.post-meta-bar .dot { color: var(--gray-500); }

/* ─── POST BODY ─── */
.post-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.post-article p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--gray-100);
  margin-bottom: 22px;
}

.post-article h2 {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--white);
  margin: 52px 0 18px;
  padding-top: 8px;
}

.post-article h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--white);
  margin: 36px 0 14px;
}

.post-article ul, .post-article ol {
  margin: 0 0 22px 0;
  padding-left: 22px;
}

.post-article li {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--gray-100);
  margin-bottom: 8px;
  padding-left: 4px;
}

.post-article a {
  color: var(--mint);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(110, 231, 183, 0.4);
  transition: text-decoration-color 0.2s;
}
.post-article a:hover { text-decoration-color: var(--mint); }

/* ─── CALLOUT COMPONENTS ─── */
.callout-stat {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin: 36px 0;
  flex-wrap: wrap;
}

.stat-block {
  flex: 1;
  min-width: 140px;
  background: var(--bg-elevated);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius-sm);
  padding: 24px 20px;
  text-align: center;
}

.stat-block .stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--mint);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-block .stat-label {
  font-size: 0.8rem;
  color: var(--gray-300);
  line-height: 1.4;
}

.callout-box {
  background: var(--bg-elevated);
  border-left: 3px solid var(--mint);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 24px 28px;
  margin: 32px 0;
}

.callout-box .callout-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 8px;
}

.callout-box p {
  font-size: 0.975rem !important;
  margin-bottom: 0 !important;
  color: var(--gray-100) !important;
}

.callout-warning {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.06);
}
.callout-warning .callout-label { color: #f59e0b; }

.pull-quote {
  margin: 40px 0;
  padding: 0 0 0 28px;
  border-left: 3px solid var(--mint-glow);
}

.pull-quote p {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem !important;
  font-weight: 600;
  line-height: 1.5 !important;
  color: var(--white) !important;
  font-style: italic;
  margin-bottom: 0 !important;
}

/* ─── INLINE GRAPHIC ─── */
.inline-graphic {
  background: var(--bg-elevated);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius);
  padding: 32px;
  margin: 40px 0;
  overflow: hidden;
}

.inline-graphic .graphic-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 24px;
}

/* Bar chart */
.bar-chart { display: flex; flex-direction: column; gap: 14px; }

.bar-row { display: flex; align-items: center; gap: 14px; }
.bar-label { width: 130px; font-size: 0.82rem; color: var(--gray-300); text-align: right; flex-shrink: 0; }
.bar-track { flex: 1; height: 28px; background: var(--bg-card); border-radius: 6px; overflow: hidden; }
.bar-fill {
  height: 100%;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding-left: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--bg);
  font-family: 'Space Grotesk', sans-serif;
  transition: width 1s ease;
}
.bar-fill.mint { background: var(--mint); }
.bar-fill.dim { background: rgba(110, 231, 183, 0.4); color: var(--gray-300); }
.bar-fill.faint { background: rgba(110, 231, 183, 0.15); color: var(--gray-500); }

/* Cost table */
.cost-table { width: 100%; border-collapse: collapse; }
.cost-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-700);
}
.cost-table td {
  padding: 14px 16px;
  font-size: 0.9rem;
  color: var(--gray-100);
  border-bottom: 1px solid rgba(42, 42, 64, 0.5);
}
.cost-table tr:last-child td { border-bottom: none; }
.cost-table .val { font-family: 'Space Grotesk', sans-serif; font-weight: 600; color: var(--white); }
.cost-table .val.highlight { color: var(--mint); }

/* ─── MID-POST CTA ─── */
.post-cta-box {
  background: var(--bg-elevated);
  border: 1px solid rgba(110, 231, 183, 0.2);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  margin: 56px 0;
}

.post-cta-box h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  margin-top: 0;
}

.post-cta-box p {
  font-size: 0.95rem !important;
  color: var(--gray-300) !important;
  margin-bottom: 24px !important;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.btn-mint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--mint);
  color: var(--bg);
  padding: 14px 28px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-mint:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--mint-glow);
}

/* ─── RELATED POSTS ─── */
.related-posts {
  background: var(--bg-elevated);
  border-top: 1px solid var(--gray-700);
  padding: 72px 0;
}

.related-posts .section-header {
  margin-bottom: 40px;
}

.related-posts .section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
}

.related-posts .section-header p {
  font-size: 0.9rem;
  color: var(--gray-300);
  margin-top: 6px;
}

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

/* ─── FOOTER ─── */
footer {
  background: var(--bg);
  border-top: 1px solid var(--gray-700);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy { font-size: 0.85rem; color: var(--gray-500); }

.footer-links { display: flex; align-items: center; gap: 24px; list-style: none; }
.footer-links a { font-size: 0.85rem; color: var(--gray-500); transition: color 0.2s; }
.footer-links a:hover { color: var(--gray-300); }

/* ─── RESPONSIVE ─── */
@media (max-width: 960px) {
  .featured-post { grid-template-columns: 1fr; }
  .featured-img { min-height: 260px; }
  .featured-img::after { background: linear-gradient(to bottom, transparent 60%, var(--bg-card) 100%); }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid .post-card:last-child { display: none; }
}

@media (max-width: 700px) {
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px;
    left: 0; right: 0;
    background: rgba(8, 8, 18, 0.97);
    backdrop-filter: blur(20px);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--gray-700);
  }

  .posts-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .related-grid .post-card:last-child { display: block; }
  .related-grid .post-card:nth-child(2) ~ .post-card { display: none; }

  .post-hero { height: 400px; }
  .post-article { padding: 40px 20px 60px; }
  .callout-stat { flex-direction: column; }
  .stat-block { min-width: auto; }
  .featured-content { padding: 28px 24px; }
  .pull-quote p { font-size: 1.1rem !important; }
  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
}
