/* Surge Tactic blog post styles */

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

:root {
  --bg:       #080c0d;
  --bg2:      #0d1315;
  --surface:  #111a1c;
  --surface2: #162022;
  --border:   #1e2e31;
  --border2:  #243537;
  --text:     #dde8ea;
  --text-dim: #8aa4a8;
  --muted:    #4d6b6f;
  --accent:   #0e8c9a;
  --accent-hi:#12a8b8;
  --accent-lo: rgba(14,140,154,0.10);
  --accent-glow: rgba(14,140,154,0.18);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* NAV */
nav {
  position: sticky; top: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 52px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.nav-logo { display: inline-flex; align-items: center; }
.nav-logo img { height: 40px; width: auto; display: block; }
.nav-links { display: flex; gap: 44px; list-style: none; }
.nav-links a {
  color: var(--muted);
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active { color: var(--accent); }
.nav-cta a {
  border: 1px solid var(--accent); color: var(--accent);
  padding: 10px 24px;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  transition: all .2s;
}
.nav-cta a:hover { background: var(--accent); color: var(--bg); }

/* POST HEADER */
.post-header {
  padding: 100px 52px 60px;
  max-width: 900px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}
.post-back {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 48px;
  transition: color .2s;
}
.post-back:hover { color: var(--accent); }
.post-back::before { content: '←'; font-size: 12px; }

.post-category {
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}

.post-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(44px, 6vw, 92px);
  line-height: 0.94;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 36px;
}

.post-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.post-meta span { display: inline-flex; align-items: center; gap: 8px; }
.post-meta span::before {
  content: '';
  display: inline-block;
  width: 6px; height: 1px;
  background: var(--accent);
}

/* POST BODY */
.post-body {
  max-width: 780px;
  margin: 0 auto;
  padding: 72px 52px 80px;
}

.post-body .lead {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 48px;
}

.post-body p,
.post-body ul,
.post-body ol {
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-dim);
  margin-bottom: 22px;
}

.post-body strong, .post-body b {
  color: var(--text);
  font-weight: 400;
}

.post-body a {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.post-body a:hover { border-bottom-color: var(--accent); }

.post-body h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: 0.03em;
  color: var(--text);
  margin: 64px 0 20px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  line-height: 1.1;
}
.post-body h2:first-child {
  padding-top: 0;
  border-top: none;
  margin-top: 0;
}

.post-body h3 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 400;
  color: var(--text);
  margin: 40px 0 16px;
  line-height: 1.3;
}

.post-body h4 {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 32px 0 14px;
}

.post-body ul, .post-body ol {
  padding-left: 24px;
}
.post-body ul li,
.post-body ol li {
  margin-bottom: 8px;
  list-style: none;
  position: relative;
}
.post-body ul li::before {
  content: '';
  position: absolute;
  left: -18px;
  top: 14px;
  width: 8px;
  height: 1px;
  background: var(--accent);
}
.post-body ol {
  counter-reset: olcount;
}
.post-body ol li {
  counter-increment: olcount;
  padding-left: 8px;
}
.post-body ol li::before {
  content: counter(olcount, decimal-leading-zero);
  position: absolute;
  left: -28px;
  top: 0;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.post-body blockquote {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(18px, 1.9vw, 24px);
  line-height: 1.5;
  color: var(--text);
  padding: 24px 32px;
  margin: 32px 0;
  border-left: 3px solid var(--accent);
  background: var(--surface);
}

.post-body .callout {
  padding: 24px 28px;
  margin: 32px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
}
.post-body .callout-label {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.post-disclaimer {
  margin-top: 64px;
  padding: 24px 28px;
  background: var(--bg2);
  border: 1px solid var(--border);
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
}

/* POST CTA */
.post-cta {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 52px 80px;
  border-top: 1px solid var(--border);
}
.post-cta-card {
  background: var(--surface);
  padding: 44px 48px;
  border-left: 3px solid var(--accent);
}
.post-cta-label {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.post-cta-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: 0.03em;
  line-height: 0.95;
  color: var(--text);
  margin-bottom: 16px;
}
.post-cta-body {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 24px;
}
.post-cta-btn {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  padding: 16px 36px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: background .2s;
}
.post-cta-btn:hover { background: var(--accent-hi); }

/* FOOTER */
footer {
  background: var(--surface);
  padding: 64px 52px 40px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 60px; align-items: start;
  border-top: 1px solid var(--border);
}
.f-brand { margin-bottom: 14px; }
.f-brand img { height: 56px; width: auto; display: block; }
.f-sub { color: var(--muted); font-size: 12px; line-height: 1.8; max-width: 280px; }
.f-head {
  font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 22px;
}
.f-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.f-list a { color: var(--muted); font-size: 12px; transition: color .2s; }
.f-list a:hover { color: var(--text); }
.f-bottom {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 18px 52px;
  display: flex; justify-content: space-between;
}
.f-bottom span { font-size: 10px; letter-spacing: 0.1em; color: var(--muted); }

@media (max-width: 900px) {
  nav { padding: 20px 32px; }
  .nav-links { display: none; }
  .post-header { padding: 72px 32px 48px; }
  .post-body { padding: 48px 32px 64px; }
  .post-cta { padding: 32px 32px 64px; }
  .post-cta-card { padding: 32px 28px; }
  footer {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 48px 32px 32px;
  }
}

/* ─── LONG-POST LAYOUT WITH SIDE TOC ─── */
/* Opt in by wrapping .post-body in a .post-main grid container with a .post-toc aside */
.post-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 52px 80px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 72px;
  align-items: start;
}
.post-main .post-body {
  max-width: 780px;
  margin: 0;
  padding: 0;
}
.post-toc {
  position: sticky;
  top: 120px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  padding-right: 8px;
}
.post-toc-label {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.post-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.post-toc li {
  margin: 0;
  padding: 0;
}
.post-toc li::before { display: none; }
.post-toc a {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  padding: 10px 0 10px 14px;
  border-left: 2px solid var(--border);
  color: var(--muted);
  transition: all .2s;
  text-decoration: none;
}
.post-toc a:hover {
  color: var(--text);
  border-left-color: var(--text-dim);
}
.post-toc a.active {
  color: var(--accent);
  border-left-color: var(--accent);
}
.post-toc::-webkit-scrollbar { width: 4px; }
.post-toc::-webkit-scrollbar-track { background: transparent; }
.post-toc::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

@media (max-width: 1100px) {
  .post-main {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 48px 32px 64px;
  }
  .post-toc {
    position: static;
    max-height: none;
    order: -1;
    padding: 24px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
  }
  .post-toc-label { margin-bottom: 14px; padding-bottom: 8px; }
  .post-toc a { padding: 6px 0 6px 12px; font-size: 11px; }
  .post-main .post-body { padding: 0; }
}
