/*
  ai50styles.css — AI for People Over 50 Series
  highvibes.click/ai50plus/

  Add to <head> of each page:
  <link rel="stylesheet" href="ai50styles.css">

  CSS variables and shared components are defined here.
  Page-specific styles go in per-page <style> blocks.

  Typography: Fraunces (display) + DM Sans (UI/body)
  Load in every page <head>:
  <link href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap" rel="stylesheet">
*/

/* ─── Design Tokens ──────────────────────────────────────────── */
:root {
  /* Neutrals — warm cream base matching book covers */
  --cream:   #FAF8F2;
  --surface: #F0EDE6;
  --soft:    #E8E3DA;
  --border:  #DDD8CE;
  --ink:     #1C1C1A;
  --body:    #4A4844;
  --muted:   #8A8680;
  --white:   #FFFFFF;

  /* Book 1 — Blue */
  --blue:         #2E7FC1;
  --blue-fill:    #E8F3FB;
  --blue-border:  #B8D6EE;
  --blue-dark:    #1A4F7A;

  /* Book 2 — Red */
  --red:          #B91C3B;
  --red-fill:     #F9E8EB;
  --red-border:   #EDB8C0;
  --red-dark:     #7A1227;

  /* Book 3 — Green */
  --green:        #4A6B47;
  --green-fill:   #EBF2E9;
  --green-border: #C8DCC6;
  --green-dark:   #2F4A2E;

  /* Companion guides — shared interior green */
  --comp:         #3E6B3A;
  --comp-fill:    #EBF2E9;
  --comp-border:  #C8DCC6;

  /* Primary ecosystem accent = Book 1 blue */
  --accent:       var(--blue);
  --accent-fill:  var(--blue-fill);
  --accent-border: var(--blue-border);
}

/* ─── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* ─── Base ───────────────────────────────────────────────────── */
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ─── Layout ─────────────────────────────────────────────────── */
.wrap   { width: min(1040px, calc(100% - 36px)); margin: 0 auto; }
.narrow { max-width: 720px; margin-left: auto; margin-right: auto; }

/* ─── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  color: var(--ink);
}
p { color: var(--body); margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }
a { color: inherit; }
.italic { font-style: italic; }

/* ─── Display type (Fraunces) ────────────────────────────────── */
.display {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
}

/* ─── Eyebrow ────────────────────────────────────────────────── */
.eyebrow {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
  display: block;
}
.eyebrow-muted { color: var(--muted); }

/* ─── Topbar ─────────────────────────────────────────────────── */
.topbar {
  background: var(--blue-fill);
  border-bottom: 1px solid var(--blue-border);
  color: var(--blue-dark);
  text-align: center;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 10px 16px;
  font-weight: 500;
}

/* ─── Header ─────────────────────────────────────────────────── */
header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  background: var(--cream);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.brand {
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  font-weight: 500;
  color: var(--body);
  text-decoration: none;
}
.header-links { display: flex; gap: 10px; flex-wrap: wrap; }
.header-link {
  font-size: .82rem;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 999px;
  transition: .2s;
  font-weight: 400;
}
.header-link:hover { color: var(--ink); border-color: #bbb6ac; }
.header-link.accent {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
.header-link.accent:hover { opacity: .88; }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  background: var(--blue);
  color: white;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: .95rem;
  transition: .2s;
  cursor: pointer;
  border: none;
  line-height: 1;
}
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn-sm { padding: 9px 20px; font-size: .86rem; }
.btn-outline {
  display: inline-block;
  border: 1.5px solid var(--border);
  color: var(--body);
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 999px;
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  transition: .2s;
  font-weight: 400;
  line-height: 1;
}
.btn-outline:hover { border-color: #bbb6ac; color: var(--ink); }
.btn-dark {
  background: var(--ink);
  color: white;
}
.btn-dark:hover { background: #333330; opacity: 1; }
.btn-block { display: block; text-align: center; }

/* ─── Book accent button modifiers ───────────────────────────── */
.btn-blue   { background: var(--blue); }
.btn-red    { background: var(--red); }
.btn-green  { background: var(--green); }
.btn-comp   { background: var(--comp); }

/* ─── Kartra embed wrapper ───────────────────────────────────── */
.kartra-wrap {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 18px;
  padding: 28px 24px;
  text-align: center;
}

/* ─── Download card ──────────────────────────────────────────── */
.dl-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.dl-card-top {
  padding: 18px 20px 14px;
}
.dl-bonus-label {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.dl-card-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}
.dl-card-body {
  padding: 14px 20px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.dl-card-body p {
  font-size: .88rem;
  margin-bottom: 14px;
  color: var(--body);
  flex: 1;
}
.dl-btn {
  display: block;
  text-align: center;
  color: white;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: .86rem;
  font-weight: 500;
  transition: .2s;
}
.dl-btn:hover { opacity: .88; }

/* ─── Divider ────────────────────────────────────────────────── */
.rule {
  height: 1px;
  background: var(--border);
  margin: 0;
  border: none;
}

/* ─── Footer ─────────────────────────────────────────────────── */
footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .86rem;
  text-align: center;
  background: var(--cream);
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--body); }

/* ─── Responsive utilities ───────────────────────────────────── */
@media (max-width: 560px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
}
