/* Van Life Build Guide — Professional PDF Template */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@400;600;700;800&display=swap');

:root {
  --color-primary: #0f172a;
  --color-accent: #8D79E4;
  --color-accent-light: #f5f3ff;
  --color-text: #0f172a;
  --color-text-light: #475569;
  --color-bg: #FFFFFF;
  --color-bg-warm: #f5f3ff;
  --color-bg-dark: #020B53;
  --color-border: rgba(6,46,199,0.18);
  --color-tip-bg: #f0fdf4;
  --color-tip-border: #16a34a;
  --color-mistake-bg: #fff7ed;
  --color-mistake-border: #c2410c;
  --color-info-bg: #eff3ff;
  --color-info-border: #062EC7;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
}

@page {
  size: A4;
  margin: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 11pt;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
}

/* ── COVER PAGE ── */
.cover {
  page-break-after: always;
  height: 100vh;
  background: linear-gradient(145deg, #9B6FE8 0%, #6A3FD4 30%, #2D1B8E 65%, #020B53 100%);
  color: #F5F1FA;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 60px;
  position: relative;
  overflow: hidden;
}

.cover::before { display: none; }

.cover-content {
  position: relative;
  z-index: 2;
}

.cover h1 {
  font-family: var(--font-heading);
  font-size: 42pt;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  color: #F5F1FA;
  text-shadow: 0 2px 30px rgba(155,111,232,0.5);
}

.cover .subtitle {
  font-size: 14pt;
  font-weight: 300;
  color: #D6C9F7;
  margin-bottom: 40px;
  letter-spacing: 1px;
}

.cover .author {
  font-size: 11pt;
  font-weight: 400;
  color: rgba(245,241,250,0.65);
  margin-bottom: 50px;
}

.cover-stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  margin-top: 20px;
}

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

.cover-stat .number {
  font-family: var(--font-heading);
  font-size: 28pt;
  font-weight: 700;
  color: #D6C9F7;
  display: block;
}

.cover-stat .label {
  font-size: 8pt;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(245,241,250,0.55);
}

.cover-divider {
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, #D6C9F7, #99D5FC);
  margin: 30px auto;
}

/* ── PAGE CONTENT ── */
.page {
  page-break-after: always;
  padding: 55px 60px;
  min-height: 100vh;
  position: relative;
}

.page::after {
  content: '';
  position: absolute;
  bottom: 30px;
  left: 60px;
  right: 60px;
  height: 1px;
  background: var(--color-border);
}

/* ── CHAPTER OPENER ── */
.chapter-opener {
  page-break-after: always;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 60px;
  background: linear-gradient(145deg, #9B6FE8 0%, #6A3FD4 30%, #2D1B8E 65%, #020B53 100%);
  position: relative;
}

.chapter-number {
  font-family: var(--font-heading);
  font-size: 72pt;
  font-weight: 800;
  color: rgba(214,201,247,0.25);
  line-height: 1;
  margin-bottom: 10px;
}

.chapter-title {
  font-family: var(--font-heading);
  font-size: 32pt;
  font-weight: 700;
  color: #F5F1FA;
  line-height: 1.2;
  margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(155,111,232,0.4);
}

.chapter-subtitle {
  font-size: 13pt;
  font-weight: 300;
  color: #D6C9F7;
  max-width: 500px;
}

.chapter-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #D6C9F7, #99D5FC);
  margin: 24px 0;
}

/* ── HEADINGS ── */
h1 {
  font-family: var(--font-heading);
  font-size: 26pt;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 20px;
  line-height: 1.2;
}

h2 {
  font-family: var(--font-heading);
  font-size: 18pt;
  font-weight: 600;
  background: linear-gradient(135deg, #062EC7 0%, #8D79E4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: 35px;
  margin-bottom: 14px;
  line-height: 1.3;
}

h3 {
  font-family: var(--font-body);
  font-size: 13pt;
  font-weight: 700;
  background: linear-gradient(135deg, #8D79E4 0%, #D6C9F7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 28px;
  margin-bottom: 10px;
}

/* ── BODY TEXT ── */
p {
  margin-bottom: 14px;
  text-align: left;
}

.lead {
  font-size: 13pt;
  font-weight: 300;
  color: var(--color-text-light);
  line-height: 1.8;
  margin-bottom: 24px;
}

/* ── CALLOUT BOXES ── */
.tip {
  background: var(--color-tip-bg);
  border-left: 4px solid var(--color-tip-border);
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 6px 6px 0;
}

.tip-label {
  font-weight: 700;
  font-size: 9pt;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-tip-border);
  margin-bottom: 6px;
}

.mistake {
  background: var(--color-mistake-bg);
  border-left: 4px solid var(--color-mistake-border);
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 6px 6px 0;
}

.mistake-label {
  font-weight: 700;
  font-size: 9pt;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-mistake-border);
  margin-bottom: 6px;
}

.guide-ref {
  background: var(--color-info-bg);
  border-left: 4px solid var(--color-info-border);
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 6px 6px 0;
}

.guide-ref-label {
  font-weight: 700;
  font-size: 9pt;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-info-border);
  margin-bottom: 6px;
}

/* ── CHECKLIST ── */
.checklist {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.checklist li {
  padding: 8px 0 8px 32px;
  position: relative;
  border-bottom: 1px solid var(--color-border);
}

.checklist li::before {
  content: '☐';
  position: absolute;
  left: 4px;
  top: 8px;
  font-size: 14pt;
  color: #8D79E4;
}

/* ── PHOTO PLACEMENT ── */
.photo-full {
  width: 100%;
  margin: 24px 0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.photo-full img {
  width: 100%;
  height: auto;
  display: block;
}

.photo-caption {
  font-size: 9pt;
  color: var(--color-text-light);
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}

.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}

.photo-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ── PULL QUOTE ── */
.pull-quote {
  font-family: var(--font-heading);
  font-size: 18pt;
  font-weight: 400;
  font-style: italic;
  color: #3730a3;
  border-left: 4px solid #8D79E4;
  background: #f5f3ff;
  padding: 16px 24px;
  margin: 30px 0;
  line-height: 1.5;
  border-radius: 0 6px 6px 0;
}

/* ── TABLE ── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 10pt;
}

th {
  background: linear-gradient(135deg, #020B53 0%, #8D79E4 100%);
  color: #F5F1FA;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 9pt;
  text-transform: uppercase;
  letter-spacing: 1px;
}

td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
}

tr:nth-child(even) td {
  background: var(--color-bg-warm);
}

/* ── FOOTER / UPSELL ── */
.upsell-section {
  background: var(--color-bg-warm);
  padding: 40px;
  border-radius: 8px;
  margin-top: 40px;
}

.upsell-section h2 {
  margin-top: 0;
}

.guide-card {
  background: white;
  border: 2px solid #062EC7;
  border-radius: 8px;
  padding: 20px;
  margin: 12px 0;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.guide-card-icon {
  font-size: 24pt;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #062EC7, #8D79E4);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-card h3 {
  margin: 0 0 6px 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12pt;
}

.guide-card p {
  margin: 0;
  font-size: 10pt;
  color: var(--color-text-light);
}

/* ── UTILITY ── */
.page-break { page-break-after: always; }
.no-break { page-break-inside: avoid; }
.spacer { height: 30px; }
.spacer-lg { height: 50px; }
