/* Redline 3D — blog stylesheet.
 *
 * Shared by /blog and every post under /blog/. This is deliberately a separate
 * file rather than the inline <style> block the marketing pages use: posts are
 * numerous and readers hit several in a session, so one cached file beats N
 * copies of the same 400 lines. Design tokens below are copied from the
 * marketing pages — keep them in step if the brand palette changes.
 */

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

:root {
  --red-primary: #F20B0F;
  --red-deep: #AC0307;
  --black-pure: #06010C;
  --black-soft: #0a0a0f;
  --gray-metal-light: #D8D8D8;
  --gray-metal-dark: #949392;
  --gray-steel: #2a2a2f;
  --white: #ffffff;
  --green: #22c55e;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Barlow', sans-serif;
  background: var(--black-pure);
  color: var(--gray-metal-light);
  line-height: 1.6;
  overflow-x: hidden;
}

.grid-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .07;
  background-image:
    linear-gradient(var(--red-primary) 1px, transparent 1px),
    linear-gradient(90deg, var(--red-primary) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* ---------- nav (matches marketing pages) ---------- */

nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 10px 48px; display: flex; justify-content: space-between; align-items: center;
  background: rgba(6, 1, 12, .96); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-brand-text {
  font-family: 'Bebas Neue', sans-serif; font-size: 24px; letter-spacing: 3px; color: var(--white);
}
.nav-brand-3d { color: var(--red-primary); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--gray-metal-light); text-decoration: none; font-weight: 600; font-size: 13px;
  text-transform: uppercase; letter-spacing: .5px; transition: color .2s; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--red-primary); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Barlow', sans-serif; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; border: none; border-radius: 4px; cursor: pointer;
  text-decoration: none; transition: transform .12s ease, box-shadow .12s ease;
  user-select: none; -webkit-appearance: none;
}
.btn-primary {
  background: linear-gradient(180deg, #ff3034 0%, var(--red-primary) 50%, var(--red-deep) 100%);
  color: var(--white); padding: 16px 36px; font-size: 14px;
  box-shadow: 0 4px 0 var(--red-deep), 0 8px 28px rgba(242, 11, 15, .35), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--red-deep), 0 14px 36px rgba(242, 11, 15, .45), inset 0 1px 0 rgba(255, 255, 255, .15);
}
.btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--red-deep); }
.btn-outline {
  background: transparent; color: var(--white); padding: 14px 28px; font-size: 13px;
  border: 2px solid var(--gray-steel); box-shadow: 0 3px 0 #141418;
}
.btn-outline:hover { border-color: var(--red-primary); color: var(--red-primary); transform: translateY(-1px); }

/* ---------- article layout ---------- */

.article-wrap {
  position: relative; z-index: 1;
  max-width: 760px; margin: 0 auto; padding: 130px 24px 60px;
}

.breadcrumb-back {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px; color: var(--gray-metal-dark);
  text-decoration: none; margin-bottom: 20px; transition: color .2s;
}
.breadcrumb-back:hover { color: var(--red-primary); }

.article-kicker {
  display: inline-block; font-family: 'Barlow Condensed', sans-serif; font-size: 12px;
  color: var(--red-primary); text-transform: uppercase; letter-spacing: 4px;
  padding: 8px 16px; border: 1px solid rgba(242, 11, 15, .4);
  background: rgba(242, 11, 15, .08); margin-bottom: 20px; border-radius: 2px;
}

.article-wrap h1 {
  font-family: 'Bebas Neue', sans-serif; font-size: clamp(36px, 6vw, 60px);
  letter-spacing: 2px; color: var(--white); line-height: 1.05; margin-bottom: 16px;
}

.article-meta {
  font-size: 13px; color: var(--gray-metal-dark); margin-bottom: 32px;
  padding-bottom: 24px; border-bottom: 1px solid var(--gray-steel);
}

/* The opening paragraph answers the query directly — sized up so it reads as
   the answer, which is also what gets pulled into AI summaries. */
.article-lead {
  font-size: 20px; line-height: 1.7; color: var(--white); margin-bottom: 32px;
}

.article-body h2 {
  font-family: 'Bebas Neue', sans-serif; font-size: clamp(26px, 3.6vw, 36px);
  letter-spacing: 1.5px; color: var(--white); margin: 44px 0 14px;
}
.article-body h3 {
  font-family: 'Barlow', sans-serif; font-size: 19px; font-weight: 700;
  color: var(--white); margin: 28px 0 10px;
}
.article-body p { font-size: 17px; margin-bottom: 18px; }
.article-body ul, .article-body ol { margin: 0 0 20px 22px; }
.article-body li { font-size: 17px; margin-bottom: 9px; }
.article-body a { color: var(--red-primary); text-decoration: none; border-bottom: 1px solid rgba(242, 11, 15, .35); }
.article-body a:hover { border-bottom-color: var(--red-primary); }
.article-body strong { color: var(--white); font-weight: 700; }

.article-body table {
  width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px;
}
.article-body th, .article-body td {
  padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--gray-steel);
}
.article-body th {
  font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase;
  letter-spacing: 1px; color: var(--red-primary); font-size: 13px;
}

.callout {
  border-left: 3px solid var(--red-primary); background: rgba(242, 11, 15, .06);
  padding: 18px 22px; margin: 26px 0; border-radius: 0 4px 4px 0;
}
.callout p:last-child { margin-bottom: 0; }

.article-cta {
  margin: 52px 0 0; padding: 34px; text-align: center;
  border: 1px solid var(--gray-steel); border-radius: 4px;
  background: linear-gradient(145deg, rgba(42, 42, 47, .5) 0%, rgba(10, 10, 15, .75) 100%);
}
.article-cta h2 {
  font-family: 'Bebas Neue', sans-serif; font-size: 30px; letter-spacing: 2px;
  color: var(--white); margin-bottom: 10px;
}
.article-cta p { font-size: 16px; color: var(--gray-metal-dark); margin-bottom: 22px; }

.related-posts { margin-top: 52px; padding-top: 28px; border-top: 1px solid var(--gray-steel); }
.related-posts h2 {
  font-family: 'Bebas Neue', sans-serif; font-size: 24px; letter-spacing: 2px;
  color: var(--white); margin-bottom: 16px;
}
.related-posts ul { list-style: none; margin: 0; }
.related-posts li { margin-bottom: 11px; }
.related-posts a { color: var(--gray-metal-light); text-decoration: none; font-size: 16px; }
.related-posts a:hover { color: var(--red-primary); }

/* ---------- index ---------- */

.index-hero { padding: 130px 24px 20px; max-width: 900px; margin: 0 auto; position: relative; z-index: 1; }
.index-hero h1 {
  font-family: 'Bebas Neue', sans-serif; font-size: clamp(42px, 7vw, 72px);
  letter-spacing: 3px; color: var(--white); line-height: 1; margin-bottom: 14px;
}
.index-hero h1 span { color: var(--red-primary); }
.index-hero p { font-size: 18px; color: var(--gray-metal-dark); max-width: 620px; }

.post-list { max-width: 900px; margin: 0 auto; padding: 30px 24px 70px; position: relative; z-index: 1; }
.post-card {
  display: block; text-decoration: none; padding: 26px;
  border: 1px solid var(--gray-steel); border-radius: 4px; margin-bottom: 16px;
  background: linear-gradient(145deg, rgba(42, 42, 47, .4) 0%, rgba(10, 10, 15, .7) 100%);
  transition: border-color .25s, transform .25s;
}
.post-card:hover { border-color: rgba(242, 11, 15, .5); transform: translateY(-3px); }
.post-card h2 {
  font-family: 'Bebas Neue', sans-serif; font-size: 25px; letter-spacing: 1px;
  color: var(--white); margin-bottom: 8px;
}
.post-card:hover h2 { color: var(--red-primary); }
.post-card p { font-size: 15px; color: var(--gray-metal-dark); }

/* ---------- footer ---------- */

footer {
  padding: 32px 48px; border-top: 1px solid var(--gray-steel);
  position: relative; z-index: 1; text-align: center;
}
footer p { font-size: 12px; color: var(--gray-metal-dark); }
.footer-links { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.footer-links a { color: var(--gray-metal-dark); text-decoration: none; font-size: 13px; }
.footer-links a:hover { color: var(--red-primary); }

/* ---------- mobile ---------- */

.mobile-toggle { display: none; z-index: 1001; }
.mobile-toggle span { width: 24px; height: 2px; background: var(--white); transition: transform .3s, opacity .3s; }
.mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
  display: none; position: fixed; inset: 0; background: rgba(6, 1, 12, .98); z-index: 999;
  flex-direction: column; justify-content: center; align-items: center; gap: 26px;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
  padding-left: 20px; padding-right: 20px;
}
.mobile-menu.active { opacity: 1; visibility: visible; }
.mobile-menu a {
  color: var(--white); text-decoration: none; font-family: 'Bebas Neue', 'Barlow', sans-serif;
  font-size: 30px; letter-spacing: 2px; transition: color .2s;
  min-height: 48px; display: flex; align-items: center; justify-content: center; text-align: center;
}
.mobile-menu a:hover { color: var(--red-primary); }
.mobile-menu .mm-login {
  font-family: 'Barlow', sans-serif; font-size: 15px; font-weight: 700;
  border: 1px solid var(--gray-steel); padding: 14px 40px;
  text-transform: uppercase; letter-spacing: 1px;
}
.mobile-menu .mm-cta {
  font-family: 'Barlow', sans-serif; font-size: 15px; font-weight: 700;
  background: var(--red-primary); color: #fff; padding: 15px 40px;
  border-radius: 4px; text-transform: uppercase; letter-spacing: 1px;
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .mobile-toggle {
    display: flex; flex-direction: column; gap: 5px; cursor: pointer; padding: 10px;
    min-width: 44px; min-height: 44px; align-items: center; justify-content: center;
  }
  .mobile-menu { display: flex; }
  nav { padding: 10px 20px; }
  .article-wrap { padding: 110px 20px 50px; }
  .index-hero { padding: 110px 20px 16px; }
  .post-list { padding: 20px 20px 60px; }
  .article-body p, .article-body li { font-size: 16px; }
  .article-lead { font-size: 18px; }
}

@media (hover: none) and (pointer: coarse) {
  .footer-links a {
    min-height: 44px; min-width: 44px; display: inline-flex;
    align-items: center; justify-content: center; padding: 0 6px;
  }
  .breadcrumb-back { min-height: 44px; }
}

/* Brand watermark, matching the marketing pages. */
body { position: relative; }
.brand-watermark {
  position: absolute; inset: 0; z-index: 4; pointer-events: none; user-select: none;
  background-image: url('/assets/logo.png'); background-repeat: repeat-y;
  background-position: center top; background-size: 560px auto;
  opacity: .075; mix-blend-mode: screen;
}
@media (max-width: 768px) { .brand-watermark { background-size: 340px auto; opacity: .065; } }
@media (prefers-reduced-motion: reduce) { .brand-watermark { opacity: .06; } }
