/* ============================================
   1000 Business Ideas — Print Stylesheet
   Trade Paperback: 6in × 9in
   Target: WeasyPrint PDF Generation
   ============================================ */

/* === PAGE SETUP === */
@page {
  size: 6in 9in;
  margin: 0.75in 0.75in 0.85in 0.75in;

  @bottom-center {
    content: counter(page);
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-size: 8.5pt;
    color: #b0a99c;
  }
}

@page :first {
  @bottom-center {
    content: none;
  }
}

/* Category opener, quote, story pages — no page number */
@page feature {
  @bottom-center {
    content: none;
  }
}

/* === RESET === */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* === VARIABLES (for WeasyPrint compatibility, use raw values) === */
/* Colors: Navy #1a1a2e, Gold #c9a96e, WarmWhite #fdfcf9, Text #2d2d2d,
   LightWarm #f5f2eb, Border #d4cec4, Green #3d7a5c, Teal #4a7c8c, Rust #8b5e3c */

/* === BASE === */
html {
  font-size: 10pt; /* Base for 6×9" — comfortable reading at this trim */
}

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  color: #2d2d2d;
  background: #fdfcf9;
  line-height: 1.55;
  orphans: 3;
  widows: 3;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5 {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  color: #1a1a2e;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: 2em; margin-bottom: 0.3em; }
h2 { font-size: 1.5em; margin-bottom: 0.4em; }
h3 { font-size: 1.2em; margin-bottom: 0.3em; }

p { margin-bottom: 0.6em; }

/* === IDEA PAGE LAYOUT === */
.idea-page {
  page-break-before: always;
  page-break-after: always;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 7.15in; /* 9in - margins */
}

.idea-header {
  margin-bottom: 0.4in;
}

.idea-number {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.75em;
  font-weight: 700;
  color: #c9a96e;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.15in;
}

.idea-number .category-tag {
  display: inline-block;
  background: #1a1a2e;
  color: #fdfcf9;
  font-size: 0.7em;
  padding: 2px 10px;
  border-radius: 3px;
  margin-left: 0.5em;
  letter-spacing: 0.05em;
  vertical-align: middle;
}

.idea-title {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.7em;
  font-weight: 800;
  color: #1a1a2e;
  line-height: 1.15;
  margin-bottom: 0.2in;
}

/* === METADATA BOX === */
.meta-box {
  background: #f5f2eb;
  border-left: 3px solid #c9a96e;
  padding: 0.2in 0.25in;
  margin-bottom: 0.3in;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15in 0.4in;
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.8em;
}

.meta-item {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 0.7em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8a8070;
  margin-bottom: 2px;
}

.meta-value {
  font-weight: 700;
  color: #1a1a2e;
  font-size: 1.1em;
}

.meta-value.cost { color: #3d7a5c; }
.meta-value.revenue { color: #1a1a2e; }

.difficulty-stars {
  color: #c9a96e;
  letter-spacing: 2px;
}

/* === CONTENT SECTIONS === */
.idea-section {
  margin-bottom: 0.25in;
}

.section-label {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.7em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #c9a96e;
  margin-bottom: 0.08in;
}

.section-content {
  font-size: 0.95em;
  line-height: 1.5;
}

.key-points {
  list-style: none;
  padding: 0;
}

.key-points li {
  position: relative;
  padding-left: 0.2in;
  margin-bottom: 0.08in;
  font-size: 0.9em;
}

.key-points li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: #c9a96e;
  font-size: 0.8em;
}

/* AI Tools callout */
.ai-tools {
  margin-top: auto;
  padding-top: 0.15in;
  border-top: 1px solid #d4cec4;
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.75em;
  color: #6a6258;
}

.ai-tools strong {
  color: #4a7c8c;
  font-weight: 600;
}

/* === CATEGORY OPENER === */
.category-opener {
  page: feature;
  page-break-before: always;
  page-break-after: always;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 7.15in;
  position: relative;
}

.category-opener .cat-number {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 5em;
  font-weight: 900;
  color: #c9a96e;
  opacity: 0.15;
  position: absolute;
  top: 0.5in;
  right: 0.3in;
  line-height: 1;
}

.category-opener .cat-name {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 2.2em;
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: 0.2in;
  position: relative;
  z-index: 1;
}

.category-opener .cat-desc {
  font-size: 1.05em;
  color: #6a6258;
  max-width: 80%;
  position: relative;
  z-index: 1;
}

.category-opener .cat-count {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #b0a99c;
  margin-top: 0.4in;
  position: relative;
  z-index: 1;
}

/* Image placeholder */
.opener-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.06;
  object-fit: cover;
}

/* === QUOTE PAGE === */
.quote-page {
  page: feature;
  page-break-before: always;
  page-break-after: always;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 7.15in;
  padding: 0.5in;
}

.quote-mark {
  font-family: 'Georgia', serif;
  font-size: 5em;
  color: #c9a96e;
  opacity: 0.3;
  line-height: 0.5;
  margin-bottom: 0.2in;
}

.quote-text {
  font-family: 'Georgia', serif;
  font-size: 1.4em;
  font-style: italic;
  line-height: 1.45;
  color: #1a1a2e;
  max-width: 85%;
}

.quote-author {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.85em;
  color: #8a8070;
  margin-top: 0.3in;
  letter-spacing: 0.05em;
}

/* === SUCCESS STORY === */
.story-page {
  page-break-before: always;
  page-break-after: always;
  padding: 0.3in 0;
}

.story-label {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.7em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #c9a96e;
  margin-bottom: 0.25in;
}

.story-name {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.5em;
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: 0.05in;
}

.story-business {
  font-size: 0.9em;
  color: #6a6258;
  margin-bottom: 0.25in;
}

.story-body {
  font-size: 0.95em;
  line-height: 1.6;
}

.story-quote {
  margin: 0.3in 0;
  padding: 0.2in 0.3in;
  border-left: 3px solid #c9a96e;
  font-style: italic;
  color: #1a1a2e;
  background: #f5f2eb;
}

.story-takeaway {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.85em;
  font-weight: 700;
  color: #3d7a5c;
  margin-top: 0.2in;
}

/* === LESSON LEARNED === */
.lesson-page {
  page-break-before: always;
  page-break-after: always;
  padding: 0.3in 0;
}

.lesson-label {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.7em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8b5e3c;
  margin-bottom: 0.2in;
}

.lesson-title {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.4em;
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: 0.2in;
}

.lesson-failure {
  background: #fdf6f0;
  padding: 0.15in 0.2in;
  border-radius: 3px;
  margin-bottom: 0.2in;
  font-size: 0.9em;
}

.lesson-failure strong {
  color: #8b5e3c;
}

.lesson-pivot {
  margin-bottom: 0.2in;
  font-size: 0.95em;
}

.lesson-pivot strong {
  color: #3d7a5c;
}

.lesson-points {
  list-style: none;
  padding: 0;
}

.lesson-points li {
  position: relative;
  padding-left: 0.2in;
  margin-bottom: 0.08in;
  font-size: 0.9em;
}

.lesson-points li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: #c9a96e;
  font-size: 0.7em;
}

/* === TABLE OF CONTENTS === */
.toc-page {
  page-break-before: avoid;
}

.toc-title {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 2em;
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: 0.3in;
  text-align: center;
}

.toc-category {
  margin-bottom: 0.2in;
}

.toc-cat-name {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.1em;
  font-weight: 700;
  color: #1a1a2e;
  border-bottom: 1px solid #d4cec4;
  padding-bottom: 0.05in;
  margin-bottom: 0.1in;
}

.toc-items {
  list-style: none;
  padding: 0;
  columns: 2;
  column-gap: 0.3in;
}

.toc-items li {
  font-size: 0.8em;
  margin-bottom: 0.04in;
  color: #4a4a4a;
}

.toc-items li .toc-num {
  color: #c9a96e;
  font-weight: 700;
  margin-right: 0.3em;
}

/* === UTILITY === */
.page-break {
  page-break-before: always;
}

.text-center { text-align: center; }

/* === IMAGE PLACEHOLDER === */
.img-placeholder {
  background: #f5f2eb;
  border: 1px dashed #d4cec4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b0a99c;
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.8em;
}
