/* ==========================================================
   Halo Blog, typography + layout, on top of colors_and_type.css
   Light surface body. Same nav + footer as the deck.
   ========================================================== */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--halo-bg);
  color: var(--halo-dark);
  font: var(--type-body);
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; cursor: pointer; background: none; color: inherit; }

/* ----- Nav (mirrors deck nav, but always dark on dark) ----- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 76px;
  background: rgba(14,0,70,0.85);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: var(--halo-surface);
}
.nav-inner {
  max-width: 1320px; margin: 0 auto;
  padding: 0 80px;
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
@media (max-width: 920px) { .nav-inner { padding: 0 32px; } }
@media (max-width: 720px) { .nav-inner { padding: 0 24px; } }

.nav .brand { display: inline-flex; align-items: center; gap: 14px; }
.nav .brand img { height: 22px; width: auto; }
.nav .brand .tag {
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  padding-left: 14px;
  border-left: 1px solid rgba(255,255,255,0.18);
}
@media (max-width: 720px) { .nav .brand .tag { display: none; } }

.nav-links { display: flex; gap: 36px; align-items: center; }
.nav-links a {
  font: 500 14px/1 var(--font-brand);
  letter-spacing: -0.005em;
  color: rgba(255,255,255,0.72);
  transition: color 120ms var(--ease-out);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #fff; }
@media (max-width: 880px) { .nav-links .nav-link { display: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  height: 56px; padding: 0 28px;
  border-radius: var(--radius-lg);
  font: 600 16px/1 var(--font-brand);
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: filter 160ms var(--ease-out), transform 120ms var(--ease-out);
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--halo-accent); color: #FFFFFF; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-light { background: var(--halo-accent); color: #FFFFFF; }
.btn-light:hover { filter: brightness(1.06); }
.btn-ghost {
  background: transparent;
  color: var(--halo-dark);
  border: 1px solid rgba(22,0,124,0.25);
}
.btn-ghost:hover { background: rgba(22,0,124,0.06); }
.btn-sm { height: 44px; padding: 0 18px; font-size: 14px; gap: 8px; }
.btn .arrow { display: inline-block; transition: transform 200ms var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }

/* ----- Page wrapper ----- */
.wrap {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 80px;
}
@media (max-width: 920px) { .wrap { padding: 0 32px; } }
@media (max-width: 720px) { .wrap { padding: 0 24px; } }

/* Pad the first content under the fixed nav */
.page-top { padding-top: 140px; }

/* ----- Eyebrow (mono, matches deck) ----- */
.eyebrow {
  font: 500 13px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 14px;
  margin: 0 0 32px;
  color: rgba(22,0,124,0.55);
}
.eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: currentColor;
}

/* ============================================================
   BLOG INDEX
   ============================================================ */
.blog-hero {
  padding: 140px 0 64px;
}
.blog-hero h1 {
  font: 700 clamp(40px, 5.5vw, 64px)/1.05 var(--font-brand);
  letter-spacing: var(--track-tight);
  margin: 0 0 24px;
  max-width: 18ch;
}
.blog-hero p.lede {
  font: 400 clamp(18px, 1.6vw, 22px)/1.5 var(--font-brand);
  color: rgba(22,0,124,0.7);
  max-width: 62ch;
  margin: 0;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  padding: 32px 0 140px;
}
@media (max-width: 880px) { .blog-grid { grid-template-columns: 1fr; gap: 24px; } }

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--halo-surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 240ms var(--ease-out), box-shadow 240ms var(--ease-out);
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-lg);
}
.post-card .thumb {
  aspect-ratio: 16 / 9;
  background: var(--halo-muted);
  overflow: hidden;
}
.post-card .thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.post-card .body {
  padding: 28px 28px 32px;
  display: flex; flex-direction: column; gap: 14px;
  flex: 1;
}
.post-card .meta {
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(22,0,124,0.55);
}
.post-card h2 {
  font: 600 24px/1.25 var(--font-brand);
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--halo-dark);
}
.post-card p {
  font: 400 16px/1.5 var(--font-brand);
  color: rgba(22,0,124,0.7);
  margin: 0;
}
.post-card .read {
  margin-top: auto; padding-top: 8px;
  font: 500 14px/1 var(--font-brand);
  color: var(--halo-accent);
  display: inline-flex; align-items: center; gap: 6px;
}
.post-card:hover .read .arrow { transform: translateX(3px); }
.post-card .read .arrow { display: inline-block; transition: transform 200ms var(--ease-out); }

/* ============================================================
   ARTICLE
   ============================================================ */
.article-head {
  padding: 140px 0 48px;
}
.article-head .wrap {
  max-width: 720px;
  padding: 0 24px;
  margin: 0 auto;
}
.article-head .crumbs {
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(22,0,124,0.55);
  margin-bottom: 28px;
}
.article-head .crumbs a:hover { color: var(--halo-accent); }
.article-head h1 {
  font: 700 clamp(36px, 4.8vw, 56px)/1.08 var(--font-brand);
  letter-spacing: var(--track-tight);
  margin: 0 0 24px;
  max-width: 22ch;
}
.article-head .lede {
  font: 400 clamp(18px, 1.5vw, 22px)/1.5 var(--font-brand);
  color: rgba(22,0,124,0.7);
  max-width: 62ch;
  margin: 0 0 24px;
}
.article-head .meta {
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(22,0,124,0.55);
}
.article-head .meta span + span::before {
  content: "·"; padding: 0 12px; opacity: 0.4;
}

.article-hero {
  max-width: 1040px;
  margin: 0 auto 64px;
  padding: 0 24px;
}
.article-hero img {
  width: 100%;
  height: auto;
  max-height: 480px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px 96px;
  font: 400 18px/1.7 var(--font-brand);
  color: var(--halo-dark);
}
.article-body p,
.article-body ul,
.article-body ol,
.article-body figure,
.article-body table {
  margin: 0 0 24px;
}
.article-body h2 {
  font: 700 32px/1.2 var(--font-brand);
  letter-spacing: var(--track-tight);
  margin: 64px 0 20px;
  color: var(--halo-dark);
}
.article-body h3 {
  font: 600 22px/1.3 var(--font-brand);
  letter-spacing: -0.01em;
  margin: 40px 0 16px;
  color: var(--halo-dark);
}
.article-body strong { font-weight: 600; color: var(--halo-dark); }
.article-body a {
  color: var(--halo-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.article-body a:hover { text-decoration-thickness: 2px; }
.article-body ul, .article-body ol {
  padding-left: 24px;
}
.article-body li { margin-bottom: 8px; }
.article-body li > p { margin: 0; }
.article-body li::marker { color: var(--halo-accent); }
.article-body img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-lg);
  margin: 32px 0;
  box-shadow: var(--shadow-card);
}
.article-body figure { margin: 32px 0; }
.article-body figure img { margin: 0; }
.article-body > img,
.article-body > figure {
  width: calc(100% + 80px);
  margin-left: -40px;
  margin-right: -40px;
  max-width: none;
}
.article-body figcaption {
  font: 500 13px/1.4 var(--font-mono);
  color: rgba(22,0,124,0.55);
  text-align: center;
  margin-top: 12px;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font: 400 15px/1.5 var(--font-brand);
  background: var(--halo-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.article-body th, .article-body td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(22,0,124,0.08);
  vertical-align: top;
}
.article-body th {
  background: rgba(22,0,124,0.04);
  font: 600 13px/1.3 var(--font-brand);
  letter-spacing: -0.005em;
  color: var(--halo-dark);
}
.article-body tr:last-child td { border-bottom: 0; }
.article-body em { font-style: italic; }

/* CTA panel inside article */
.article-cta {
  max-width: 760px;
  margin: 0 auto 96px;
  padding: 40px 32px;
  background: var(--grad-brand);
  color: var(--halo-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-float);
}
.article-cta h3 {
  font: 700 28px/1.2 var(--font-brand);
  letter-spacing: var(--track-tight);
  margin: 0 0 12px;
}
.article-cta p {
  font: 400 17px/1.5 var(--font-brand);
  color: rgba(255,255,255,0.8);
  margin: 0 0 24px;
  max-width: 50ch;
}
.article-cta .actions {
  display: flex; gap: 12px; flex-wrap: wrap;
}
.article-cta .btn-primary {
  background: #FFFFFF; color: var(--halo-accent);
}
.article-cta .btn-ghost {
  border-color: rgba(255,255,255,0.32);
  color: var(--halo-surface);
}
.article-cta .btn-ghost:hover { background: rgba(255,255,255,0.08); }

/* Related */
.related {
  max-width: 1160px;
  margin: 0 auto 96px;
  padding: 0 24px;
}
.related h3 {
  font: 600 14px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(22,0,124,0.55);
  margin: 0 0 24px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 880px) { .related-grid { grid-template-columns: 1fr; } }

/* ============================================================
   FOOTER (mirrors deck footer)
   ============================================================ */
.footer {
  background: var(--halo-dark);
  color: rgba(255,255,255,0.7);
  padding: 96px 0 56px;
  margin-top: 0;
}
.footer .wrap { max-width: 1320px; }
.footer .footer-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 720px) { .footer .footer-row { grid-template-columns: 1fr 1fr; gap: 32px; } }
.footer .brand img { height: 24px; margin-bottom: 16px; }
.footer .brand .tag {
  font: 400 14px/1.5 var(--font-brand);
  color: rgba(255,255,255,0.55);
  max-width: 32ch;
  margin: 0;
}
.footer h4 {
  font: 600 12px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin: 0 0 18px;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin: 0 0 10px; }
.footer ul a { color: rgba(255,255,255,0.78); transition: color 120ms var(--ease-out); }
.footer ul a:hover { color: #fff; }
.footer .footer-foot {
  display: flex; justify-content: space-between;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  padding-top: 32px;
}
@media (max-width: 720px) {
  .footer .footer-foot { flex-direction: column; gap: 12px; }
}

/* ----- Social icon row (under brand tagline) ----- */
.footer-socials {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-top: 24px;
}
.footer-socials a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.78);
  transition: background 160ms var(--ease-out), color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.footer-socials a:hover {
  background: rgba(255,255,255,0.14);
  color: #fff;
  transform: translateY(-2px);
}
.footer-socials svg { width: 16px; height: 16px; fill: currentColor; }

/* ============================================================
   Responsive design pass (2026-05-04)
   Tablet (768px) and mobile (390px) section-by-section review.
   ============================================================ */

/* Vertical rhythm tightening on tablet & mobile */
@media (max-width: 1024px) {
  .blog-hero { padding: 104px 0 48px; }
  .article-head { padding: 104px 0 40px; }
  .blog-grid { padding: 32px 0 96px; }
  .article-body { padding-bottom: 72px; }
  .article-cta { margin-bottom: 72px; padding: 32px 28px; }
  .related { margin-bottom: 72px; }
  .footer { padding: 64px 0 48px; }
}
@media (max-width: 720px) {
  .blog-hero { padding: 88px 0 40px; }
  .article-head { padding: 88px 0 32px; }
  .blog-grid { padding: 24px 0 72px; }
  .article-body { padding-bottom: 56px; font-size: 17px; line-height: 1.65; }
  .article-body > img,
  .article-body > figure { width: 100%; margin-left: 0; margin-right: 0; }
  .article-cta { margin-bottom: 56px; padding: 28px 24px; }
  .article-cta h3 { font-size: 24px; }
  .related { margin-bottom: 56px; }
  .footer { padding: 56px 0 40px; }
}

/* Nav: keep links visible on tablet (free-trial CTA stays right) */
@media (min-width: 641px) and (max-width: 880px) {
  .nav-links { gap: 22px; }
  .nav-links .nav-link { display: inline-block !important; font-size: 13px; }
  .nav .brand .tag { display: none; }
}

/* Tap-target compliance for tablet & mobile */
@media (max-width: 1024px) {
  .footer-socials a { width: 44px; height: 44px; }
  .footer-socials svg { width: 18px; height: 18px; }
  .footer ul li { margin: 0; }
  .footer ul a { display: inline-block; padding: 11px 0; line-height: 1.25; min-height: 44px; box-sizing: border-box; }
  .nav .brand { padding: 16px 0; }
  .nav-links a { padding: 16px 0; line-height: 1; }
  .article-head .crumbs a { display: inline-block; padding: 8px 0; line-height: 1.4; }
}

/* Caption font-size floor at narrow widths */
@media (max-width: 720px) {
  .footer h4 { font-size: 12px; }
  .article-head .meta,
  .article-head .crumbs { font-size: 11px; }
}
