/*
 * MyDeed.ai blog styles, shared by /blog and every /blog/<slug> post.
 * Tokens, nav, footer and buttons mirror index.html; keep them in sync by hand.
 */

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
[hidden] { display: none !important; }

/* ── TOKENS (from index.html) ── */
:root {
  --navy:        #020C45;
  --navy-tint-1: #0A1958;
  --navy-tint-2: #16225E;
  --gold:        #D4AF37;
  --gold-deep:   #8A6A12;
  --gold-soft:   #F3EBD2;
  --gold-ink:    #6B520C;
  --cream:       #FAF8F3;
  --white:       #FFFFFF;
  --border:      #E3DCC9;
  --text-1:      #2E2A24;
  --text-2:      #5F584A;
  --text-3:      #9A9284;
  --active:      #2F4FA0;
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;
  --radius-pill: 100px;
}

/* ── BASE ── */
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  color: var(--text-1);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; letter-spacing: -0.012em; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--active); outline-offset: 2px; border-radius: 4px; }
.footer :focus-visible, .post-cta :focus-visible { outline-color: var(--gold); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--navy); color: var(--white); padding: 10px 16px; border-radius: var(--radius-sm); font-size: 14px; }
.skip:focus { top: 12px; }

/* ── LAYOUT ── */
.container { max-width: 1080px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .container { padding: 0 16px; } }

/* ── BUTTONS ── */
.btn-primary, .btn-ghost, .btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 14px; font-weight: 600; border-radius: var(--radius-pill);
  padding: 12px 22px; cursor: pointer; line-height: 1.2; text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn-primary { color: var(--navy); background: var(--gold); border: 1px solid var(--gold); }
.btn-primary:hover { background: #e0bf50; transform: translateY(-1px); }
.btn-ghost { color: rgba(255,255,255,0.92); background: none; border: 1px solid rgba(255,255,255,0.4); font-weight: 500; }
.btn-ghost:hover { border-color: rgba(255,255,255,0.8); color: var(--white); }
.btn-outline { color: var(--navy); background: var(--white); border: 1px solid var(--navy); font-weight: 500; }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ── NAV ── */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(250, 248, 243, 0.94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.nav-brand { display: flex; align-items: center; gap: 10px; flex: none; }
.nav-brand img { height: 34px; width: auto; display: block; }
.nav-wordmark { font-family: 'Fraunces', Georgia, serif; font-size: 19px; font-weight: 500; letter-spacing: -0.01em; color: var(--navy); white-space: nowrap; }
.nav-wordmark span { color: var(--gold-deep); }
.nav-links { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: center; }
.nav-links a { font-size: 13.5px; color: var(--text-2); padding: 6px 12px; border-radius: var(--radius-sm); white-space: nowrap; transition: color 0.15s ease, background 0.15s ease; }
.nav-links a:hover { color: var(--navy); background: rgba(2,12,69,0.05); }
.nav-links a[aria-current] { color: var(--navy); font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: 8px; flex: none; }
.nav-cta { padding: 9px 16px; font-size: 13px; }
.nav-hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 10px 6px; border: none; background: none; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--navy); border-radius: 2px; }
.nav-mobile { display: none; flex-direction: column; background: var(--cream); border-top: 1px solid var(--border); padding: 8px 16px 16px; }
.nav-mobile a { font-size: 15px; color: var(--text-1); padding: 12px 0; border-bottom: 1px solid var(--border); }
.nav-mobile a:last-child { border-bottom: none; }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-mobile.open { display: flex; }
}
@media (max-width: 400px) { .nav-wordmark { font-size: 17px; } .nav-brand img { height: 30px; } .nav-cta { padding: 8px 12px; font-size: 12.5px; } }

/* ── BLOG INDEX ── */
.blog-head { padding: 64px 0 36px; }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 12px; }
.blog-head h1 { font-size: clamp(34px, 4.6vw, 50px); font-weight: 500; line-height: 1.08; letter-spacing: -0.025em; color: var(--navy); margin-bottom: 14px; }
.blog-head p { font-size: 17px; color: var(--text-2); max-width: 620px; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-bottom: 56px; }
@media (max-width: 960px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .post-grid { grid-template-columns: minmax(0, 1fr); } .blog-head { padding: 40px 0 24px; } }
.post-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; }
.post-card:hover { border-color: var(--navy); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(2,12,69,0.08); }
.post-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--gold-soft); }
.post-card-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.post-card .tag { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-deep); }
.post-card h2, .post-card h3 { font-size: 20px; font-weight: 500; line-height: 1.25; color: var(--navy); }
.post-card p { font-size: 14.5px; color: var(--text-2); line-height: 1.55; }
.post-card .meta { margin-top: auto; padding-top: 6px; font-size: 12.5px; color: var(--text-3); }

/* ── POST ── */
.post { padding: 40px 0 72px; }
.post-wrap { max-width: 740px; margin: 0 auto; }
.crumbs { font-size: 13px; color: var(--text-3); margin-bottom: 22px; }
.crumbs a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border); }
.crumbs a:hover { color: var(--navy); text-decoration-color: var(--navy); }
.post-header h1 { font-size: clamp(32px, 4.4vw, 46px); font-weight: 500; line-height: 1.1; letter-spacing: -0.022em; color: var(--navy); margin-bottom: 16px; }
.post-dek { font-size: 19px; line-height: 1.55; color: var(--text-2); margin-bottom: 20px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--text-2); padding-bottom: 28px; }
.post-meta strong { color: var(--text-1); font-weight: 600; }
.post-hero { margin: 0 0 36px; }
.post-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-lg); background: var(--gold-soft); }
.post-hero figcaption { font-size: 12.5px; color: var(--text-3); margin-top: 8px; }
.post-hero figcaption a { text-decoration: underline; text-underline-offset: 2px; }

/* Article body */
.prose { font-size: 17.5px; line-height: 1.72; color: var(--text-1); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 28px; font-weight: 500; line-height: 1.2; color: var(--navy); margin-top: 1.8em; }
.prose h3 { font-size: 21px; font-weight: 600; line-height: 1.3; color: var(--navy); margin-top: 1.5em; }
.prose h2 + *, .prose h3 + * { margin-top: 0.6em; }
.prose a { color: var(--active); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--navy); }
.prose strong { font-weight: 600; color: var(--text-1); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.45em; }
.prose li::marker { color: var(--gold-deep); }
.prose blockquote { border-left: 3px solid var(--gold); padding: 4px 0 4px 20px; font-family: 'Fraunces', Georgia, serif; font-size: 21px; line-height: 1.5; color: var(--navy); }
.prose .callout { background: var(--white); border: 1px solid var(--border); border-left: 4px solid var(--gold); border-radius: var(--radius-md); padding: 18px 22px; font-size: 16px; }
.prose .callout p + p { margin-top: 0.7em; }
.prose .table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--white); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; min-width: 560px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.prose th { font-weight: 600; color: var(--navy); background: var(--gold-soft); }
.prose tr:last-child td { border-bottom: none; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2.2em 0; }
@media (max-width: 600px) { .prose { font-size: 16.5px; } .prose h2 { font-size: 24px; } .post-dek { font-size: 17px; } }

.post-meta a { color: var(--text-1); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border); }
.post-meta a:hover { text-decoration-color: var(--navy); }
.post-reviewer { font-size: 13.5px; color: var(--text-2); margin-top: -18px; padding-bottom: 28px; }

/* Download callout */
.prose .callout.download { border-left-color: var(--navy); }
.prose .callout.download a { font-weight: 600; }

/* FAQ */
.faq { margin-top: 56px; padding-top: 8px; }
.faq h2 { font-size: 28px; font-weight: 500; line-height: 1.2; color: var(--navy); margin-bottom: 8px; }
.faq-item { border-bottom: 1px solid var(--border); padding: 20px 0; }
.faq-item h3 { font-family: 'Inter', system-ui, sans-serif; font-size: 17px; font-weight: 600; line-height: 1.4; color: var(--navy); letter-spacing: 0; margin-bottom: 8px; }
.faq-item p { font-size: 16.5px; line-height: 1.65; color: var(--text-1); }
.faq-item p + p { margin-top: 0.6em; }
.faq-item a { color: var(--active); text-decoration: underline; text-underline-offset: 3px; }

/* Disclaimer */
.disclaimer { margin-top: 32px; font-size: 14px; font-style: italic; color: var(--text-2); }

/* Author box */
.author-box { display: flex; gap: 18px; align-items: flex-start; margin-top: 40px; padding: 22px 24px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.author-avatar { flex: none; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--gold-soft); color: var(--gold-ink); display: flex; align-items: center; justify-content: center; font-family: 'Fraunces', Georgia, serif; font-size: 22px; font-weight: 600; }
.author-box .author-label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 4px; }
.author-box .author-name { font-family: 'Fraunces', Georgia, serif; font-size: 20px; font-weight: 500; color: var(--navy); }
.author-box .author-name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.author-box p { font-size: 15px; line-height: 1.6; color: var(--text-1); margin-top: 6px; }
.author-box .author-links { font-size: 14px; color: var(--text-2); }
.author-box .author-links a { color: var(--active); text-decoration: underline; text-underline-offset: 3px; }
.author-box .disclosure { font-size: 13.5px; color: var(--text-2); }
@media (max-width: 520px) { .author-box { flex-direction: column; padding: 20px; } }

/* Placeholder text awaiting real author details: highlighted so it can't be missed in review */
.ph { background: #FFF1B8; color: #5C4600; border-radius: 3px; padding: 0 3px; }

/* Author and category pages */
.profile-crumbs { padding-top: 40px; margin-bottom: 0; }
.profile-head { display: flex; gap: 24px; align-items: center; padding: 24px 0 28px; }
.profile-head .author-avatar { width: 96px; height: 96px; font-size: 32px; }
.profile-head h1 { font-size: clamp(32px, 4.4vw, 44px); font-weight: 500; line-height: 1.1; letter-spacing: -0.022em; color: var(--navy); }
.profile-head .profile-role { font-size: 16px; color: var(--text-2); margin-top: 6px; }
.profile-bio { max-width: 680px; font-size: 17px; line-height: 1.7; padding-bottom: 12px; }
.profile-bio p + p { margin-top: 0.8em; }
.profile-bio a { color: var(--active); text-decoration: underline; text-underline-offset: 3px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 28px 0 18px; }
.section-head h2 { font-size: 26px; font-weight: 500; color: var(--navy); }
.section-head a { font-size: 14px; font-weight: 600; color: var(--active); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 600px) { .profile-head { flex-direction: column; align-items: flex-start; padding: 36px 0 20px; } }

/* End-of-post CTA */
.post-cta { margin-top: 56px; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-tint-2) 100%); color: var(--white); border-radius: var(--radius-lg); padding: 32px; }
.post-cta h2 { font-size: 26px; font-weight: 500; line-height: 1.2; margin-bottom: 10px; }
.post-cta p { color: rgba(255,255,255,0.85); margin-bottom: 20px; max-width: 560px; }
@media (max-width: 600px) { .post-cta { padding: 24px 20px; } }

/* Related posts */
.related { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--border); }
.related h2 { font-size: 22px; font-weight: 500; color: var(--navy); margin-bottom: 16px; }
.related ul { list-style: none; display: grid; gap: 10px; }
.related a { display: block; padding: 14px 18px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); font-weight: 500; color: var(--navy); transition: border-color 0.15s ease; }
.related a:hover { border-color: var(--navy); }

/* ── FOOTER (from index.html) ── */
.footer { background: var(--navy-tint-1); padding: 48px 0 0; color: rgba(255,255,255,0.9); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.14); }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 8px; font-family: 'Fraunces', Georgia, serif; font-size: 16px; font-weight: 500; color: var(--white); margin-bottom: 10px; }
.footer-brand img { height: 26px; width: auto; }
.footer-brand span { color: var(--gold); }
.footer-tagline { font-size: 13.5px; color: rgba(255,255,255,0.75); line-height: 1.55; }
.footer-col-head { font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.7); margin-bottom: 14px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 9px; }
.footer-links a { font-size: 13.5px; color: rgba(255,255,255,0.85); transition: color 0.15s ease; }
.footer-links a:hover { color: var(--gold); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding: 18px 0 26px; flex-wrap: wrap; gap: 8px; }
.footer-copy, .footer-attribution { font-size: 12.5px; color: rgba(255,255,255,0.7); }
