/* ============================================================
   Atlas Portland — Blog & Article Shared Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&display=swap');

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

:root {
  --navy:       #1C3A57;
  --navy-dark:  #122638;
  --navy-mid:   #2B5278;
  --navy-light: #4478A8;
  --navy-pale:  #EBF0F6;
  --navy-ghost: #F2F5F9;
  --bg:         #F5F2EE;
  --bg-alt:     #EDEBE6;
  --white:      #FFFFFF;
  --text:       #1A1916;
  --text-muted: #6B6760;
  --border:     #DDD9D2;
  --charcoal:   #242220;
  --gold:       #C8963E;
  --radius:     3px;
  --nav-h:      64px;
  --side:       clamp(20px, 5vw, 56px);
}

html  { scroll-behavior: smooth; font-size: 16px; }
body  { font-family: 'Inter', -apple-system, 'Helvetica Neue', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img   { display: block; max-width: 100%; }
a     { text-decoration: none; color: inherit; }
ul,ol { list-style: none; }

/* ── NAV ──────────────────────────────────────────────────── */
.blog-nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--side);
  background: rgba(245,242,238,.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.blog-nav-logo { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); }
.blog-nav-links { display: flex; align-items: center; gap: 28px; }
.blog-nav-links a { font-size: 13px; color: var(--text-muted); letter-spacing: .03em; transition: color .2s; }
.blog-nav-links a:hover { color: var(--text); }
.blog-nav-cta { font-size: 13px !important; font-weight: 500 !important; color: var(--white) !important; background: var(--navy) !important; padding: 9px 20px; border-radius: var(--radius); transition: background .2s !important; }
.blog-nav-cta:hover { background: var(--navy-mid) !important; color: var(--white) !important; }

/* ── BLOG INDEX — HEADER ──────────────────────────────────── */
.blog-header {
  background: var(--navy-dark);
  padding: clamp(56px, 7vw, 96px) var(--side);
  text-align: center;
}
.blog-header-eyebrow {
  font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.4); margin-bottom: 18px;
}
.blog-header h1 {
  font-size: clamp(30px, 5vw, 56px);
  font-weight: 300; letter-spacing: -.02em; line-height: 1.1; color: var(--white);
  margin-bottom: 18px;
}
.blog-header p {
  font-size: clamp(15px, 1.6vw, 17px);
  color: rgba(255,255,255,.55); max-width: 520px; margin: 0 auto; line-height: 1.65;
}

/* ── BLOG INDEX — GRID ────────────────────────────────────── */
.blog-body { max-width: 1180px; margin: 0 auto; padding: clamp(48px,6vw,80px) var(--side); }

.blog-featured {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 48px;
  background: var(--white);
}
.blog-featured-img { position: relative; overflow: hidden; }
.blog-featured-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .65s; }
.blog-featured:hover .blog-featured-img img { transform: scale(1.03); }
.blog-featured-body { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; justify-content: center; }
.blog-card-cat {
  font-size: 10px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 12px;
}
.blog-featured-body h2 {
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 400; letter-spacing: -.015em; line-height: 1.25;
  color: var(--charcoal); margin-bottom: 14px;
}
.blog-featured-body p { font-size: 15px; color: var(--text-muted); line-height: 1.72; margin-bottom: 24px; }
.blog-card-meta { display: flex; align-items: center; gap: 12px; }
.blog-card-meta span { font-size: 12px; color: var(--text-muted); }
.blog-card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border); }
.blog-read-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: var(--navy);
  border-bottom: 1px solid rgba(28,58,87,.25); padding-bottom: 1px;
  transition: border-color .2s; margin-top: auto;
}
.blog-read-link:hover { border-color: var(--navy); }

.blog-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 24px;
}
.blog-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 10px 32px rgba(0,0,0,.08); }
.blog-card-img { position: relative; overflow: hidden; aspect-ratio: 16/9; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.blog-card:hover .blog-card-img img { transform: scale(1.05); }
.blog-card-body { padding: 22px 22px 20px; flex: 1; display: flex; flex-direction: column; }
.blog-card-body h3 { font-size: 16px; font-weight: 500; letter-spacing: -.01em; line-height: 1.4; color: var(--charcoal); margin-bottom: 10px; flex: 1; }
.blog-card-body p { font-size: 13px; color: var(--text-muted); line-height: 1.65; margin-bottom: 16px; }
.blog-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--border); }
.blog-card-footer span { font-size: 11px; color: var(--text-muted); }
.blog-card-arrow { font-size: 13px; color: var(--navy); font-weight: 500; }

/* ── ARTICLE — HERO ───────────────────────────────────────── */
.art-hero { position: relative; height: clamp(300px, 42vh, 500px); overflow: hidden; }
.art-hero img { width: 100%; height: 100%; object-fit: cover; }
.art-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,18,30,.85) 0%, rgba(8,18,30,.32) 55%, rgba(8,18,30,.1) 100%);
}
.art-hero-text {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: clamp(24px,4vw,48px) var(--side);
}
.art-hero-text-inner { max-width: 820px; }
.art-cat-badge {
  display: inline-block;
  font-size: 10px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(200,150,62,.35);
  padding: 4px 12px; border-radius: 20px;
  margin-bottom: 14px;
}
.art-hero-title {
  font-size: clamp(22px, 3.8vw, 42px);
  font-weight: 400; letter-spacing: -.018em; line-height: 1.12; color: #fff;
}

/* ── ARTICLE — META BAR ───────────────────────────────────── */
.art-meta {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px var(--side);
}
.art-meta-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.art-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
  flex-shrink: 0;
}
.art-byline { font-size: 13px; color: var(--text-muted); }
.art-byline strong { color: var(--text); font-weight: 500; }
.art-sep { color: var(--border); }
.art-read-time { font-size: 13px; color: var(--text-muted); }
.art-tag-pill {
  font-size: 10px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: var(--navy); background: var(--navy-pale);
  padding: 4px 10px; border-radius: 20px; margin-left: auto;
}

/* ── ARTICLE — LAYOUT ─────────────────────────────────────── */
.art-layout {
  max-width: 1120px; margin: 0 auto;
  padding: clamp(36px,5vw,64px) var(--side);
  display: grid; grid-template-columns: 1fr 268px;
  gap: 56px; align-items: start;
}

/* ── ARTICLE — TOC SIDEBAR ────────────────────────────────── */
.art-toc {
  position: sticky; top: calc(var(--nav-h) + 20px);
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.art-toc-label {
  font-size: 10px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 14px;
}
.art-toc ol { counter-reset: toc-ct; display: flex; flex-direction: column; gap: 9px; }
.art-toc li { display: flex; gap: 10px; counter-increment: toc-ct; }
.art-toc li::before {
  content: counter(toc-ct);
  font-size: 10px; font-weight: 600; color: var(--gold);
  flex-shrink: 0; min-width: 14px; margin-top: 3px;
}
.art-toc a { font-size: 13px; color: var(--text-muted); line-height: 1.45; transition: color .2s; }
.art-toc a:hover { color: var(--navy); }
.toc-cta-box {
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border);
}
.toc-cta-box p { font-size: 12px; color: var(--text-muted); line-height: 1.55; margin-bottom: 12px; }
.toc-cta-box a {
  display: block; text-align: center;
  font-size: 13px; font-weight: 500; color: #fff;
  background: var(--navy); padding: 10px; border-radius: var(--radius);
  transition: background .2s;
}
.toc-cta-box a:hover { background: var(--navy-mid); }

/* ── ARTICLE — BODY ───────────────────────────────────────── */
.art-body { min-width: 0; }
.art-lede {
  font-size: 18px; color: var(--text); line-height: 1.78;
  border-left: 3px solid var(--gold); padding-left: 20px;
  margin-bottom: 36px; font-weight: 400;
}
.art-body h2 {
  font-size: clamp(17px, 2vw, 21px); font-weight: 500; color: var(--charcoal);
  letter-spacing: -.01em; line-height: 1.28;
  margin: 44px 0 14px;
  scroll-margin-top: calc(var(--nav-h) + 12px);
}
.art-body h3 { font-size: 16px; font-weight: 500; color: var(--charcoal); margin: 28px 0 10px; }
.art-body p { font-size: 16px; color: var(--text); line-height: 1.82; margin-bottom: 20px; }
.art-body p:last-child { margin-bottom: 0; }
.art-body a { color: var(--navy); border-bottom: 1px solid rgba(28,58,87,.28); transition: border-color .2s; }
.art-body a:hover { border-color: var(--navy); }
.art-body strong { font-weight: 500; }

/* Bullet lists */
.art-body .prose-list { margin: 4px 0 20px; display: flex; flex-direction: column; gap: 9px; }
.art-body .prose-list li {
  font-size: 16px; color: var(--text); line-height: 1.72;
  padding-left: 20px; position: relative;
}
.art-body .prose-list li::before { content: '—'; position: absolute; left: 0; color: var(--gold); }

/* Checklist (article 10) */
.checklist-block { margin-bottom: 28px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.checklist-head { background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: 12px 16px; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--charcoal); }
.checklist-item { display: flex; align-items: flex-start; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: 15px; color: var(--text); line-height: 1.55; }
.checklist-item:last-child { border-bottom: none; }
.chk-box { width: 17px; height: 17px; border: 1.5px solid var(--border); border-radius: 2px; flex-shrink: 0; margin-top: 2px; }

/* Pull quote */
.pull-quote {
  margin: 36px 0; padding: 24px 28px;
  border-left: 3px solid var(--navy);
  background: var(--navy-ghost);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.pull-quote p { font-size: 18px; font-style: italic; color: var(--navy-dark); line-height: 1.65; margin: 0; }

/* ── RECOMMENDED READS ────────────────────────────────────── */
.art-rec { background: var(--bg-alt); border-top: 1px solid var(--border); padding: clamp(48px,6vw,72px) var(--side); }
.art-rec-inner { max-width: 1120px; margin: 0 auto; }
.art-rec-eyebrow { font-size: 10px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.art-rec-title { font-size: clamp(20px,2.5vw,28px); font-weight: 300; color: var(--charcoal); margin-bottom: 36px; letter-spacing: -.01em; }
.art-rec-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.rec-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.rec-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.07); }
.rec-card-img { aspect-ratio: 16/9; overflow: hidden; }
.rec-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s; }
.rec-card:hover .rec-card-img img { transform: scale(1.05); }
.rec-card-body { padding: 18px 18px 16px; }
.rec-card-cat { font-size: 10px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 7px; }
.rec-card-title { font-size: 14px; font-weight: 500; color: var(--charcoal); line-height: 1.42; margin-bottom: 8px; letter-spacing: -.008em; }
.rec-card-meta { font-size: 11px; color: var(--text-muted); }

/* ── ARTICLE CTA ──────────────────────────────────────────── */
.art-cta { background: var(--navy); padding: clamp(48px,6vw,72px) var(--side); text-align: center; }
.art-cta h2 { font-size: clamp(22px,3vw,36px); font-weight: 300; color: #fff; margin-bottom: 12px; letter-spacing: -.015em; }
.art-cta p { font-size: 15px; color: rgba(255,255,255,.6); margin: 0 auto 28px; max-width: 460px; line-height: 1.65; }
.art-cta-btn {
  display: inline-block; font-size: 14px; font-weight: 500;
  color: var(--navy); background: #fff; padding: 13px 32px;
  border-radius: var(--radius); transition: background .2s;
}
.art-cta-btn:hover { background: var(--bg); color: var(--navy); }

/* ── FOOTER ───────────────────────────────────────────────── */
.blog-footer { background: var(--charcoal); padding: 40px var(--side); }
.blog-footer-inner { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.blog-footer-logo { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.4); }
.blog-footer-copy { font-size: 12px; color: rgba(255,255,255,.2); }

/* ── MOBILE NAV HAMBURGER ─────────────────────────────────── */
.blog-burger {
  display: none;
  flex-direction: column; justify-content: space-between;
  width: 22px; height: 14px;
  background: none; border: none; cursor: pointer; padding: 0;
  flex-shrink: 0;
}
.blog-burger span {
  display: block; height: 1.5px;
  background: var(--text); border-radius: 2px;
  transition: transform .28s ease, opacity .28s ease, width .28s ease;
  transform-origin: left center;
}
.blog-burger.open span:nth-child(1) { transform: rotate(38deg) translateY(-1px); }
.blog-burger.open span:nth-child(2) { opacity: 0; width: 0; }
.blog-burger.open span:nth-child(3) { transform: rotate(-38deg) translateY(1px); }

.blog-mobile-menu {
  display: none;
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 90;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 20px var(--side) 28px;
  flex-direction: column; gap: 2px;
  opacity: 0; transform: translateY(-6px);
  transition: opacity .22s ease, transform .22s ease;
}
.blog-mobile-menu.open { opacity: 1; transform: translateY(0); }
.blog-mobile-menu a {
  font-size: 17px; color: var(--text);
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  display: block;
}
.blog-mobile-menu a:last-child {
  border-bottom: none; margin-top: 10px;
  font-weight: 500; color: var(--navy);
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .art-layout { grid-template-columns: 1fr; gap: 0; }
  .art-toc {
    position: static;
    margin-bottom: 32px;
    /* Collapse to accordion-style on tablet */
  }
  .art-rec-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .blog-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured-img { height: 260px; aspect-ratio: unset; }
  .blog-body { padding: clamp(32px, 5vw, 56px) var(--side); }
}

@media (max-width: 640px) {
  /* Show hamburger, hide desktop links */
  .blog-burger { display: flex; }
  .blog-nav-links { display: none; }
  .blog-mobile-menu { display: flex; }

  /* Blog grid single column */
  .blog-grid { grid-template-columns: 1fr; gap: 14px; }
  .blog-featured-img { height: 220px; }
  .blog-body { padding: 28px var(--side); }

  /* Article fixes */
  .art-layout { padding: 28px var(--side); }
  .art-toc { margin-bottom: 28px; }
  .art-rec-grid { grid-template-columns: 1fr; }
  .art-tag-pill { display: none; }

  /* Bigger touch targets */
  .blog-card-footer { padding-top: 12px; }
  .blog-read-link { padding: 10px 0; }

  /* Article hero text smaller screens */
  .art-hero { height: clamp(260px, 40vw, 340px); }
  .art-lede { font-size: 16px; }

  /* Featured article read link */
  .blog-featured-body { padding: 24px 20px; }
  .blog-featured-body h2 { font-size: 20px; }
  .blog-featured-body p { display: none; } /* Hide excerpt on small screens to save space */
}

@media (max-width: 380px) {
  .blog-header h1 { font-size: 26px; }
  .art-hero-title { font-size: 20px; }
}
