/* ==========================================================================
   Casatern Energy Report — shared stylesheet
   Used by every report at /reports/[slug]/index.html
   Inherits brand tokens from the landing page.
   ========================================================================== */

:root {
  --cream:   #FAF7F2;
  --warm:    #F3EDE3;
  --green:   #2D5016;
  --green-m: #3D6B20;
  --green-l: #EBF2E3;
  --amber:   #C8873A;
  --amber-l: #FDF3E7;
  --text:    #1E1E1E;
  --mid:     #4A4A4A;
  --light:   #7A7A7A;
  --border:  #DDD6CA;
  --white:   #FFFFFF;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.65;
}

a { color: var(--green); }

/* ── Top action bar (web only) ── */
.report-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.report-wordmark {
  font-family: 'Lora', serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--green);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.report-wordmark span { color: var(--amber); }
.btn-download {
  background: var(--green);
  color: var(--white);
  padding: 0.55rem 1.35rem;
  border: none;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-download:hover { background: var(--green-m); }

/* ── Cover ── */
.cover {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.cover-photo-wrap {
  width: 100%;
  height: 50vh;
  max-height: 460px;
  overflow: hidden;
  background: var(--green-l);
}
.cover-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.cover-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 2rem 3.5rem;
  text-align: center;
}
.cover-eyebrow {
  display: inline-block;
  background: var(--green-l);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}
.cover-title {
  font-family: 'Lora', serif;
  font-size: clamp(2.2rem, 5vw, 3rem);
  line-height: 1.2;
  color: var(--green);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.cover-meta {
  font-size: 1rem;
  color: var(--mid);
}

/* ── Section base ── */
.report-section {
  padding: 4.5rem 2rem;
}
.report-section.alt {
  background: var(--warm);
}
.section-inner {
  max-width: 760px;
  margin: 0 auto;
}
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.75rem;
}
h2 {
  font-family: 'Lora', serif;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  color: var(--green);
  line-height: 1.3;
  margin-bottom: 1.25rem;
  letter-spacing: -0.015em;
}
.divider {
  width: 48px;
  height: 3px;
  background: var(--amber);
  border-radius: 2px;
  margin-bottom: 2rem;
}
.body-text {
  font-size: 1.05rem;
  color: var(--mid);
}
.body-text + .body-text { margin-top: 1rem; }

/* ── Executive Summary callout ── */
.summary-callout {
  background: var(--green-l);
  border: 1px solid #C5DAA8;
  border-radius: 12px;
  padding: 1.75rem 2rem;
  margin-top: 2rem;
}
.summary-callout-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.85rem;
}
.summary-callout ol {
  list-style: decimal;
  padding-left: 1.5rem;
  color: var(--text);
  font-size: 1rem;
}
.summary-callout li { margin-bottom: 0.5rem; }
.summary-callout li:last-child { margin-bottom: 0; }
.summary-total {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #C5DAA8;
  font-size: 0.95rem;
  color: var(--green);
  font-weight: 600;
}

/* ── About Your Home stats ── */
.home-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin-top: 2rem;
}
.home-stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 0.2rem;
}
.home-stat-value {
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 500;
}

/* ── Top Priorities cards ── */
.priorities {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin-top: 2.25rem;
}
.priority {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 2rem 1.75rem;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.priority-num {
  position: absolute;
  top: -1rem;
  left: 1.5rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-family: 'Lora', serif;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.priority-title {
  font-family: 'Lora', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 0.65rem;
  margin-top: 0.5rem;
  letter-spacing: -0.01em;
}
.priority-why {
  font-size: 1rem;
  color: var(--mid);
  margin-bottom: 1.5rem;
}
.priority-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.priority-meta-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.3rem;
}
.priority-meta-value {
  font-family: 'Lora', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}
.priority-difficulty {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.1rem;
}
.priority-difficulty.diy {
  background: var(--green-l);
  color: var(--green);
}
.priority-difficulty.pro {
  background: var(--amber-l);
  color: var(--amber);
}
.priority-difficulty.mixed {
  background: var(--warm);
  color: var(--mid);
}

/* ── Findings by System ── */
.finding {
  margin-top: 2rem;
}
.finding:first-of-type { margin-top: 1.5rem; }
.finding h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.finding p {
  font-size: 1rem;
  color: var(--mid);
}

/* ── Suggested Sequence ── */
.sequence {
  list-style: none;
  counter-reset: seq;
  margin-top: 2rem;
}
.sequence li {
  counter-increment: seq;
  position: relative;
  padding: 1rem 1rem 1rem 3.25rem;
  margin-bottom: 0.85rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--mid);
}
.sequence li::before {
  content: counter(seq);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: var(--amber);
  color: var(--white);
  font-family: 'Lora', serif;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sequence li strong {
  color: var(--text);
  font-weight: 600;
}

/* ── Resources ── */
.resources {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin-top: 2rem;
}
.resource-group h3 {
  font-family: 'Lora', serif;
  font-size: 1.2rem;
  color: var(--green);
  margin-bottom: 0.6rem;
}
.resource-group ul {
  padding-left: 1.25rem;
  color: var(--mid);
}
.resource-group li {
  font-size: 0.98rem;
  margin-bottom: 0.4rem;
}

/* ── Next Steps ── */
.next-cta {
  display: inline-block;
  background: var(--amber);
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.9rem 2.4rem;
  border-radius: 8px;
  text-decoration: none;
  margin-top: 1.25rem;
  box-shadow: 0 4px 14px rgba(200,135,58,0.3);
  transition: background 0.2s, transform 0.15s;
}
.next-cta:hover { background: #B87730; transform: translateY(-1px); color: var(--white); }

/* ── Disclaimer ── */
.disclaimer {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem 2rem;
  margin-top: 1.25rem;
  font-size: 0.92rem;
  color: var(--mid);
  line-height: 1.65;
}
.disclaimer p { margin-bottom: 0.85rem; }
.disclaimer p:last-child { margin-bottom: 0; }
.disclaimer a { color: var(--green); }

/* ── Report Footer ── */
.report-footer {
  background: var(--text);
  color: rgba(255,255,255,0.55);
  text-align: center;
  padding: 2.25rem 2rem;
  font-size: 0.88rem;
}
.report-footer .wordmark {
  font-family: 'Lora', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.report-footer .wordmark span { color: var(--amber); }
.report-footer a { color: rgba(255,255,255,0.75); text-decoration: underline; }

/* ──────────────────────────────────────────────────────────
   Mobile
   ────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .report-bar { padding: 1rem 1.25rem; }
  .cover-photo-wrap { height: 38vh; }
  .cover-content { padding: 2.25rem 1.25rem 2.5rem; }
  .report-section { padding: 3rem 1.25rem; }
  .priority { padding: 1.75rem 1.25rem 1.5rem; }
  .priority-meta { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .home-stats { grid-template-columns: 1fr; padding: 1.25rem 1.5rem; }
}

/* ──────────────────────────────────────────────────────────
   Print (and Download PDF via window.print())
   ────────────────────────────────────────────────────────── */
@page {
  size: letter;
  margin: 0.5in;
}

@media print {
  body {
    background: var(--white);
    font-size: 11pt;
    line-height: 1.55;
  }
  .report-bar { display: none; }

  .cover {
    border-bottom: none;
    page-break-after: avoid;
  }
  .cover-photo-wrap {
    height: auto;
    max-height: 3.5in;
  }
  .cover-photo { max-height: 3.5in; }
  .cover-content { padding: 1.25rem 0 1.5rem; }
  .cover-title { font-size: 22pt; }

  .report-section {
    padding: 1.5rem 0;
    page-break-inside: auto;
  }
  .report-section.alt { background: var(--white); }

  h2 { font-size: 16pt; page-break-after: avoid; }
  .section-label { font-size: 8pt; }
  .body-text { font-size: 11pt; }

  .summary-callout {
    background: var(--white);
    border: 1px solid var(--border);
    page-break-inside: avoid;
  }

  .home-stats {
    border: 1px solid var(--border);
    page-break-inside: avoid;
    padding: 1rem 1.25rem;
  }

  .priority {
    box-shadow: none;
    page-break-inside: avoid;
    margin-bottom: 1.25rem;
    padding: 1.25rem 1.25rem 1rem;
  }
  .priority-num {
    position: static;
    display: inline-flex;
    margin-bottom: 0.5rem;
    width: 1.9rem;
    height: 1.9rem;
    font-size: 0.95rem;
  }
  .priority-title { font-size: 13pt; margin-top: 0.25rem; }
  .priority-meta { gap: 0.5rem; }
  .priority-meta-value { font-size: 10pt; }
  .priority-difficulty { padding: 0.2rem 0.55rem; font-size: 9pt; }

  .finding { page-break-inside: avoid; margin-top: 1rem; }
  .sequence li { page-break-inside: avoid; }

  .next-cta {
    box-shadow: none;
    border: 1.5px solid var(--amber);
  }

  .disclaimer { page-break-inside: avoid; }

  .report-footer {
    background: var(--white);
    color: var(--mid);
    border-top: 1px solid var(--border);
    padding: 1.25rem 0;
  }
  .report-footer .wordmark { color: var(--green); }
  .report-footer a { color: var(--green); }
}
