/* ===== CJAX Digital — Blog styles (shares tokens with the main site) ===== */
:root {
  --ink: #201d19;
  --ink-soft: #302c27;
  --cream: #f4f1e8;
  --cream-deep: #ece7d8;
  --paper: #ffffff;
  --text: #2c2823;
  --text-dim: #5e574e;
  --text-on-dark: #eae5dc;
  --text-on-dark-dim: #ada393;
  --accent: #d4763f;
  --accent-deep: #b85f2d;
  --accent-soft: rgba(212, 118, 63, 0.13);
  --line: #d9d2c7;
  --line-dark: #423d37;
  --r: 18px;
  --maxw: 1140px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.62;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, .display {
  font-family: "Space Grotesk", "Helvetica Neue", sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}
.eyebrow {
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1.5px;
  background: var(--accent);
  display: inline-block;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 16px;
  padding: 15px 26px;
  border-radius: 100px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.4s var(--ease), background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.4s var(--ease);
  white-space: nowrap;
}
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 8px 22px -10px var(--accent-deep); }
.btn-accent:hover { background: var(--accent-deep); transform: translateY(-2px); box-shadow: 0 14px 30px -12px var(--accent-deep); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-soft); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn .arrow { transition: transform 0.4s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 241, 232, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
header.scrolled { border-bottom-color: var(--line); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); display: inline-block; margin-bottom: 2px; }
.brand img.logo { height: 52px; width: auto; display: block; }
footer .brand img.logo { height: 58px; }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a.link {
  font-size: 15.5px;
  font-weight: 500;
  color: var(--text);
  position: relative;
  padding: 4px 0;
}
.nav-links a.link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav-links a.link:hover { color: var(--ink); }
.nav-links a.link:hover::after { transform: scaleX(1); }
.nav-links a.link.active { color: var(--ink); }
.nav-links a.link.active::after { transform: scaleX(1); }

.menu-btn { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.menu-btn span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.3s; }
body.menu-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
body.menu-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 76px 0 auto 0;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  padding: 18px 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s var(--ease), opacity 0.3s;
  z-index: 49;
}
body.menu-open .mobile-menu { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-menu a.link { font-family: "Space Grotesk", sans-serif; font-size: 22px; font-weight: 500; padding: 12px 0; border-bottom: 1px solid var(--line); }
.mobile-menu .btn { margin-top: 18px; justify-content: center; }

/* ---------- Blog hero ---------- */
.blog-hero {
  background: var(--ink);
  color: var(--text-on-dark);
  position: relative;
  overflow: hidden;
  padding: 84px 0 76px;
}
.blog-hero::before {
  content: "";
  position: absolute;
  top: -40%; right: -8%;
  width: 560px; height: 560px;
  background: radial-gradient(circle, var(--accent-soft), transparent 62%);
  pointer-events: none;
}
.blog-hero .grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line-dark) 1px, transparent 1px), linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.16;
  -webkit-mask-image: radial-gradient(circle at 75% 10%, #000, transparent 70%);
  mask-image: radial-gradient(circle at 75% 10%, #000, transparent 70%);
}
.blog-hero .wrap { position: relative; }
.blog-hero h1 { font-size: clamp(36px, 5.4vw, 62px); max-width: 18ch; }
.blog-hero p.lede { color: var(--text-on-dark-dim); font-size: clamp(18px, 2vw, 21px); max-width: 60ch; margin-top: 22px; }

/* ---------- Breadcrumb ---------- */
.crumb { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--text-on-dark-dim); margin-bottom: 26px; font-family: "Space Grotesk", sans-serif; }
.crumb a { transition: color 0.3s; }
.crumb a:hover { color: var(--accent); }
.crumb .sep { opacity: 0.5; }

/* ---------- Blog listing ---------- */
.post-list { padding: 76px 0 100px; }
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 32px 30px 30px;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.4s;
}
.post-card:hover { transform: translateY(-6px); box-shadow: 0 26px 48px -28px rgba(64,57,48,0.5); border-color: var(--accent); }
.post-card .tagrow { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; }
.pill { font-family: "Space Grotesk", sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-deep); background: var(--accent-soft); padding: 6px 12px; border-radius: 100px; }
.post-card .date { font-size: 14px; color: var(--text-dim); }
.post-card h2 { font-size: 25px; line-height: 1.14; margin-bottom: 12px; }
.post-card p { color: var(--text-dim); font-size: 16.5px; }
.post-card .read { margin-top: auto; padding-top: 22px; display: inline-flex; align-items: center; gap: 9px; font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 15px; color: var(--ink); }
.post-card .read .arrow { transition: transform 0.4s var(--ease); }
.post-card:hover .read { color: var(--accent-deep); }
.post-card:hover .read .arrow { transform: translateX(4px); }

.empty-soon {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: var(--r);
  padding: 40px;
  text-align: center;
  color: var(--text-dim);
  font-size: 16px;
}

/* ---------- Article ---------- */
.article { padding: 60px 0 90px; }
.article-wrap { max-width: 740px; margin: 0 auto; }
.article .meta-top { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 30px; color: var(--text-dim); font-size: 14.5px; }
.article-body { font-size: 19px; line-height: 1.72; color: var(--text); }
.article-body > p { margin-bottom: 24px; }
.article-body h2 { font-size: 30px; margin: 48px 0 18px; }
.article-body h3 { font-size: 23px; margin: 36px 0 14px; }
.article-body ul { margin: 0 0 24px; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.article-body ul li { position: relative; padding-left: 30px; }
.article-body ul li::before {
  content: "";
  position: absolute; left: 4px; top: 11px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
}
.article-body ol { margin: 0 0 24px; padding-left: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 16px; }
.article-body ol li { position: relative; padding-left: 50px; counter-increment: step; }
.article-body ol li::before {
  content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 15px;
  display: grid; place-items: center;
}
.article-body strong { font-weight: 600; color: var(--ink); }
.article-body a.inline { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.article-body a.inline:hover { color: var(--accent); }

.callout {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 30px 32px;
  margin: 40px 0;
}
.callout .price { font-family: "Space Grotesk", sans-serif; font-size: 38px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }
.callout .price span { color: var(--accent); }
.callout p { color: var(--text-dim); font-size: 16.5px; margin-top: 6px; }

/* End CTA */
.post-cta {
  background: var(--ink);
  color: var(--text-on-dark);
  border-radius: 22px;
  padding: 48px 44px;
  margin-top: 56px;
  text-align: center;
}
.post-cta h3 { font-size: clamp(26px, 3.4vw, 34px); color: #fff; }
.post-cta p { color: var(--text-on-dark-dim); font-size: 18px; margin: 16px auto 28px; max-width: 46ch; }

.back-link { display: inline-flex; align-items: center; gap: 9px; margin-top: 50px; font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 15.5px; color: var(--text-dim); transition: color 0.3s; }
.back-link:hover { color: var(--accent-deep); }

/* ---------- Footer ---------- */
footer {
  background: var(--ink);
  color: var(--text-on-dark-dim);
  border-top: 1px solid var(--line-dark);
  padding: 40px 0;
}
.foot { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.foot .brand { color: #fff; font-size: 18px; }
.foot .links { display: flex; gap: 26px; }
.foot .links a { font-size: 14.5px; transition: color 0.3s; }
.foot .links a:hover { color: var(--accent); }
.foot .copy { font-size: 14px; width: 100%; padding-top: 22px; margin-top: 6px; border-top: 1px solid var(--line-dark); }

/* ---------- Reveal ---------- */
.reveal { transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal { opacity: 0; transform: translateY(22px); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.07s; }
.reveal.d2 { transition-delay: 0.14s; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav-links { display: none; }
  .menu-btn { display: flex; }
  .post-grid { grid-template-columns: 1fr; }
  .blog-hero { padding: 60px 0 56px; }
  .wrap { padding: 0 22px; }
  .article-body { font-size: 18px; }
  .post-cta { padding: 38px 26px; }
}
