/* ==========================================================
   Oregon Cash Flow Pro — design system
   Palette: sampled from OCFP logo (James's call, July 1 2026)
   green #45A729 / blue #215FA4. Book-cover orange appears only
   when quoting the book's own title treatment.
   ========================================================== */

:root {
  /* Palette */
  --primary: #215FA4;        /* logo blue — headings, links */
  --primary-dark: #173E6B;   /* hero/footer depth */
  --primary-deep: #102C4D;   /* footer base */
  --accent: #45A729;         /* logo green — CTAs, highlights */
  --accent-dark: #38891F;    /* hover state */
  --bg: #F5F8FA;             /* page background, cool neutral */
  --gray: #555B63;           /* body text */
  --bluegray: #9FB3C8;       /* lines, footer text */
  --white: #FFFFFF;
  --line: #E3E9EF;           /* hairlines */
  --book-orange: #E8833A;    /* book title treatment only */

  /* Type */
  --serif: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Scale */
  --max-width: 1080px;
  --radius: 10px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--gray);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.65;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--primary);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p + p { margin-top: 1em; }

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

img { max-width: 100%; height: auto; display: block; }

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

section { padding: 72px 0; }

.kicker {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 1rem;
  transition: background 0.15s ease;
}

.btn-accent { background: var(--accent); color: var(--white); }
.btn-accent:hover { background: var(--accent-dark); }

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--white); }

.btn-outline-light {
  border: 2px solid var(--white);
  color: var(--white);
}
.btn-outline-light:hover { background: var(--white); color: var(--primary); }

/* ---------- Header ---------- */

header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--primary);
  text-decoration: none;
  line-height: 1.15;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo img { height: 46px; width: 46px; }
.logo span { color: var(--accent); font-style: italic; font-size: 0.8rem; display: block; font-weight: 400; }

.nav ul {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
}

.nav ul a {
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
}
.nav ul a:hover { color: var(--accent); }

.nav .btn { padding: 10px 18px; font-size: 0.9rem; }

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 96px 0;
}

.hero h1 { color: var(--white); max-width: 17ch; }
.hero h1 em { color: #7ED957; font-style: italic; }  /* brightened logo green for dark bg */

.hero p {
  max-width: 56ch;
  margin: 22px 0 34px;
  font-size: 1.15rem;
  color: #D3E1F0;
}

.hero .btn + .btn { margin-left: 14px; }

/* ---------- Video hero (homepage) ---------- */

.hero--video {
  position: relative;
  padding: 0;
  min-height: 82vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--primary-deep);
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.hero__video--loop  { z-index: 0; }   /* underneath, preloaded */
.hero__video--intro { z-index: 1; }   /* on top, plays first */
.hero__video.is-hidden { display: none; }  /* reveal loop, no fade/flash */

/* Light navy grade: darker on the left for the headline, gentle on the right so
   the fireplace and study still read through. */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      rgba(16,44,77,.70) 0%, rgba(16,44,77,.30) 30%,
      rgba(16,44,77,.06) 56%, rgba(16,44,77,.30) 100%),
    linear-gradient(180deg, rgba(16,44,77,.26) 0%, rgba(16,44,77,0) 34%);
}

.hero__grid {
  position: relative;
  z-index: 3;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5vw;
}

.hero__lede { max-width: 34ch; }
.hero__lede h1 { max-width: 18ch; text-shadow: 0 2px 26px rgba(0,0,0,.45); }
.hero__lede p { margin: 20px 0 0; color: #E4EEF7; }

/* Right-side selections */
.hero__menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(360px, 40vw);
}
.hero__menu-label {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
  padding-left: 2px;
  margin-bottom: 2px;
}
.hero__menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 20px;
  border: 1px solid rgba(255,255,255,.30);
  border-radius: var(--radius);
  background: rgba(11,30,53,.62);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  box-shadow: 0 6px 22px rgba(0,0,0,.28);
  color: var(--white);
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.hero__menu a .arw { color: #7ED957; transition: transform .2s ease; }
.hero__menu a:hover {
  background: rgba(69,167,41,.20);
  border-color: var(--accent);
  transform: translateX(-4px);
}
.hero__menu a:hover .arw { transform: translateX(4px); }
.hero__menu a.is-cta {
  background: var(--accent);
  border-color: var(--accent);
}
.hero__menu a.is-cta .arw { color: var(--white); }
.hero__menu a.is-cta:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

@media (max-width: 820px) {
  .hero--video { min-height: 88vh; align-items: flex-end; }
  .hero__video { object-position: 50% center; }
  .hero__scrim {
    background: linear-gradient(180deg,
      rgba(16,44,77,.32) 0%, rgba(16,44,77,.18) 38%, rgba(16,44,77,.88) 100%);
  }
  .hero__grid {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    padding-top: 22vh;
    padding-bottom: 8vh;
    gap: 26px;
  }
  .hero__lede { max-width: none; }
  .hero__lede p { display: none; }
  .hero__menu { width: 100%; }
}

/* Desktop video hero: headline right (clear of James's face, where he gestures),
   money-problem menu in a horizontal band across the bottom. Mobile rules above win below 821px. */
@media (min-width: 821px) {
  .hero__grid {
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    min-height: 82vh;
    padding-top: 14vh;
    padding-bottom: 5vh;
  }
  .hero__lede {
    margin-top: auto;
    margin-bottom: auto;
  }
  .hero__scrim {
    background:
      linear-gradient(90deg,
        rgba(16,44,77,.32) 0%, rgba(16,44,77,.10) 30%,
        rgba(16,44,77,.48) 60%, rgba(16,44,77,.84) 100%),
      linear-gradient(180deg,
        rgba(16,44,77,.28) 0%, rgba(16,44,77,0) 28%,
        rgba(16,44,77,0) 58%, rgba(16,44,77,.86) 100%);
  }
  .hero__menu {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 12px;
  }
  .hero__menu-label { width: 100%; }
  .hero__menu a {
    flex: 1 1 0;
    font-size: 0.92rem;
    padding: 13px 16px;
  }
  .hero__menu a:hover { transform: translateY(-3px); }
}

/* ---------- Sections ---------- */

.section-white { background: var(--white); }
.section-primary { background: var(--primary-dark); color: var(--white); }
.section-primary h2 { color: var(--white); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

/* ---------- Learn / parts list ---------- */

.parts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 36px;
}

.part-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  display: block;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.part-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.part-card .num {
  font-family: var(--serif);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.part-card h3 { margin: 6px 0 8px; }

.part-card p {
  font-size: 0.92rem;
  color: var(--gray);
  font-style: italic;
}

/* ---------- Figures ---------- */

.figure-frame {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

/* ---------- Consult band ---------- */

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

.consult-band p {
  max-width: 52ch;
  margin: 18px auto 30px;
  color: #D3E1F0;
  font-size: 1.1rem;
}

/* ---------- Footer ---------- */

footer {
  background: var(--primary-deep);
  color: var(--bluegray);
  padding: 56px 0 40px;
  font-size: 0.85rem;
}

footer h4 { color: var(--white); font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 14px; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 36px;
  margin-bottom: 40px;
}

footer a { color: var(--bluegray); text-decoration: none; }
footer a:hover { color: var(--white); }

footer ul { list-style: none; }
footer li { margin-bottom: 8px; }

.compliance {
  border-top: 1px solid rgba(159, 179, 200, 0.25);
  padding-top: 28px;
  font-size: 0.72rem;
  line-height: 1.6;
  color: #7E93AB;
}

.compliance p + p { margin-top: 0.8em; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; gap: 32px; }
  .nav ul { gap: 16px; }
  .nav ul li.hide-mobile { display: none; }
  section { padding: 52px 0; }
  .hero { padding: 64px 0; }
  .hero .btn + .btn { margin-left: 0; margin-top: 12px; }
}

/* ==========================================================
   Dark theme — follows the visitor's OS/browser setting.
   Tokens flip first; component surfaces that hardcode
   var(--white) as a background get explicit overrides below
   (body-prefixed to outrank per-page <style> blocks).
   ========================================================== */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E151D;             /* page background */
    --gray: #C2CEDA;           /* body text */
    --line: #2A3947;           /* hairlines */
    --primary: #7FB3E8;        /* headings/links need more light on dark */
    --bluegray: #8FA3B8;
  }

  /* surfaces */
  body header { background: #121C26; }
  body .section-white { background: #141E29; }
  body .product-card, body .path-card, body .topic-card, body .fact-card,
  body .agent-card, body .compare .col, body .quote-form, body .figure-frame {
    background: #17232F;
  }
  body .product-card:hover, body .path-card:hover, body .topic-card:hover { border-color: var(--accent); }

  /* forms */
  body .quote-form input[type="text"], body .quote-form input[type="email"],
  body .quote-form input[type="tel"], body .quote-form input[type="date"],
  body .quote-form select, body .quote-form textarea {
    background: #0E151D; color: var(--gray); border-color: var(--line);
  }

  /* buttons: green CTA unchanged; outline uses the lightened primary */
  body .btn-outline:hover { color: #0E151D; background: var(--primary); }

  /* the dark bands were already dark; keep their text readable */
  body .section-primary { background: #0B1E35; }

  /* media frames cast lighter shadows on dark */
  body .media-frame, body .video-embed { box-shadow: 0 10px 30px rgba(0,0,0,.5); }
}
