/* ── pages.css — shared styles for content pages ── */

/* Reset & base (mirrors index.html inline styles) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #FAFAF7;
  --bg-alt: #FFFFFF;
  --bg-warm: #FFF5EE;
  --text: #1F2024;
  --text-secondary: #555;
  --accent: #D97B2B;
  --accent-hover: #C06A1F;
  --border: #E8E8E4;
  --radius: 12px;
  --max-width: 1100px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ── NAV ── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 247, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-brand {
  font-weight: 700; font-size: 1.05rem; color: var(--text);
}
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  color: var(--text-secondary); font-size: 0.9rem; font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: 0.3s; }

/* ── BREADCRUMB ── */
.breadcrumb {
  padding: 16px 0 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 6px; }

/* ── PAGE HERO ── */
.page-hero {
  background: var(--bg-alt);
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border);
}
.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.page-hero .subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.6;
}
.page-hero .step-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ── ARTICLE CONTENT ── */
.article {
  padding: 48px 0 64px;
}
.article-body {
  max-width: 720px;
}
.article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 40px 0 16px;
  letter-spacing: -0.01em;
}
.article-body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 32px 0 12px;
}
.article-body p {
  margin-bottom: 16px;
  color: var(--text);
}
.article-body ul, .article-body ol {
  margin: 0 0 16px 24px;
}
.article-body li {
  margin-bottom: 8px;
}
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  margin: 24px 0;
  background: var(--bg-warm);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-secondary);
}
.article-body strong {
  font-weight: 600;
}

/* Key concept box */
.concept-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
}
.concept-box h3 {
  margin-top: 0;
  font-size: 1.05rem;
}

/* ── TOOLS / RESOURCES INLINE ── */
.tools-list {
  list-style: none;
  margin: 16px 0 24px 0;
  padding: 0;
}
.tools-list li {
  padding: 12px 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tools-list li::before {
  content: "📄";
  font-size: 1.2rem;
}

/* ── CHAPTER NAVIGATION ── */
.chapter-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 48px 0 0;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.chapter-nav a {
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex: 1;
  transition: border-color 0.2s;
}
.chapter-nav a:hover {
  border-color: var(--accent);
}
.chapter-nav .label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.chapter-nav .title {
  font-weight: 600;
  color: var(--text);
}
.chapter-nav .next { text-align: right; }

/* ── CTA SECTION ── */
.page-cta {
  background: var(--bg-warm);
  padding: 48px 0;
  text-align: center;
}
.page-cta h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.page-cta p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.page-cta .cta-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s;
  text-align: center;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}
.btn-secondary {
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── EMAIL FORM (inline on pages) ── */
.inline-email {
  display: flex;
  gap: 8px;
  max-width: 420px;
  margin: 20px auto 0;
}
.inline-email input[type="email"] {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--bg-alt);
}
.inline-email input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
}
.inline-email button {
  padding: 12px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
}
.inline-email button:hover {
  background: var(--accent-hover);
}

/* ── STICKY CTA ── */
.sticky-cta {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--text);
  color: #fff;
  padding: 12px 0;
  transform: translateY(100%);
  transition: transform 0.3s;
  z-index: 40;
}
.sticky-cta.visible { transform: translateY(0); }
.sticky-cta .container {
  display: flex; align-items: center; justify-content: space-between;
}
.sticky-cta .sticky-cta-text {
  font-weight: 600; font-size: 0.95rem;
}
.sticky-cta .btn-primary {
  padding: 10px 20px; font-size: 0.85rem;
}

/* ── FOOTER ── */
.footer {
  background: var(--text);
  color: #aaa;
  padding: 32px 0;
  font-size: 0.85rem;
}
.footer .container {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
.footer a { color: #ccc; }
.footer a:hover { color: #fff; }
.footer-links { display: flex; gap: 20px; }

/* ── GRID LAYOUTS ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 32px 0;
}
.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--accent); }
.card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.card p { color: var(--text-secondary); font-size: 0.95rem; }

/* Chapter card specific */
.chapter-card .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

/* ── AUTHOR PAGE ── */
.author-header {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 32px;
}
.author-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.author-credentials {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}
.author-credentials li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.author-credentials li:last-child { border-bottom: none; }

/* ── CANVAS PAGE ── */
.canvas-hero {
  background: var(--accent);
  color: #fff;
  padding: 64px 0;
  text-align: center;
}
.canvas-hero h1 { color: #fff; }
.canvas-hero .subtitle { color: rgba(255,255,255,0.85); }
.canvas-hero .btn-primary {
  background: #fff;
  color: var(--accent);
}
.canvas-hero .btn-primary:hover {
  background: #f0f0f0;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links li { padding: 10px 0; }
  .nav-toggle { display: block; }

  .chapter-nav { flex-direction: column; }
  .chapter-nav .next { text-align: left; }

  .author-header { flex-direction: column; align-items: center; text-align: center; }

  .inline-email { flex-direction: column; }

  .sticky-cta .sticky-cta-text { display: none; }
  .sticky-cta .container { justify-content: center; }
}
