/* Hey, Be Positive — site styles */
:root {
  --ink: #2c2a26;
  --muted: #5c574f;
  --paper: #f4f1ea;
  --wash: #e7eef5;
  --card: #fbfcfe;
  --line: #d4dde6;
  --accent: #a24d28;
  --accent-soft: #c46a3a;
  --accent-hover: #7a3518;
  --focus: #1f4d3a;
  --hero-top: #e8f1f8;
  --hero-mid: #e4eef6;
  --hero-glow: #d4ecf6;
  --section-tint: #e7eef5;
  --lift: #dee5eb;
  --footer-bg: #d9e6ef;
  --header-bg: #e8f1f8;
  --input-line: #b3c3d0;
  --sun-core: #e4f2fb;
  --sun-mid: #c8eaf4;
  --ray: #8aadc4;
  --arc: #7a9bb3;
  --btn-fg: #fffaf3;
  --max: 42rem;
  --wide: 68rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 0.85rem;
  z-index: 30;
}
.skip:focus { top: 0.75rem; }
.wrap {
  width: min(var(--wide), calc(100% - 2rem));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--header-bg) 88%, transparent);
  backdrop-filter: saturate(1.12) blur(14px);
  -webkit-backdrop-filter: saturate(1.12) blur(14px);
}
@supports not (background: color-mix(in srgb, white 50%, black)) {
  .site-header { background: var(--header-bg); }
}
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.7rem 0;
  flex-wrap: wrap;
}
.logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
  flex: 0 1 auto;
}
.logo img {
  display: block;
  height: 2.25rem;
  width: auto;
  max-width: min(16.5rem, 68vw);
}
.nav-toggle { display: none; }
.nav-toggle-label { display: none; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
}

main {
  padding-bottom: 0;
  background-color: var(--paper);
  background-image: radial-gradient(
    ellipse 90% 26rem at 50% 0%,
    color-mix(in srgb, var(--hero-glow) 52%, transparent) 0%,
    color-mix(in srgb, var(--hero-mid) 68%, transparent) 36%,
    transparent 72%
  );
  background-repeat: no-repeat;
}

/* Hero */
.hero-band {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse 70% 80% at 50% 6%, color-mix(in srgb, var(--hero-glow) 72%, transparent) 0%, transparent 58%),
    linear-gradient(180deg, var(--hero-top) 0%, var(--hero-mid) 42%, var(--paper) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-sky svg {
  display: block;
  width: 100%;
  height: 100%;
}
.hero-rays line {
  stroke: var(--ray);
  stroke-width: 16;
  stroke-linecap: round;
  opacity: 0.22;
}
.hero-sun-halo { fill: var(--sun-mid); opacity: 0.34; }
.hero-sun-core { fill: var(--sun-core); opacity: 0.55; }
.hero-arc {
  fill: none;
  stroke: var(--arc);
  stroke-width: 1.6;
  opacity: 0.2;
}
.hero-arc--soft {
  opacity: 0.1;
  stroke-width: 2.6;
}
.hero-band .wrap { position: relative; z-index: 1; }
.hero {
  padding: 2.25rem 0 2.5rem;
  text-align: center;
}
.hero-logo {
  display: block;
  width: min(22.5rem, 92%);
  height: auto;
  margin: 0 auto 1.35rem;
}
.kicker {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.85rem;
}
h1, h2, h3, h4 {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}
h1 { font-size: clamp(2.05rem, 7vw, 3.55rem); margin: 0 auto 0.9rem; max-width: 16ch; }
h1 em { font-style: italic; }
.rule { width: 3.25rem; height: 1px; background: var(--accent-soft); margin: 0 auto 1.25rem; border: 0; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 34rem; margin: 0 auto; }
.hero .lede { margin-bottom: 0; }
.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: stretch;
  margin: 1.5rem auto 0;
  max-width: 22rem;
}

/* Sections */
.section { padding: 2.4rem 0 0; }
.section-band { padding: 2.6rem 0 2.8rem; }
.section-band--tint {
  background: var(--section-tint);
  border-block: 1px solid var(--line);
}
.section h2 { font-size: clamp(1.7rem, 3.5vw, 2.1rem); margin: 0; }
.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  margin: 0 0 1.15rem;
}
.section-head .kicker { margin-bottom: 0.2rem; }
.section-link {
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  margin-top: 0.25rem;
}
.section-intro {
  color: var(--muted);
  margin: -0.4rem 0 1.1rem;
  max-width: 40rem;
}

/* Prose (articles and inner pages) */
.prose { max-width: var(--max); margin-inline: auto; }
.prose p { margin: 0 0 1rem; }
.prose h2 { font-size: 1.7rem; margin: 2rem 0 0.7rem; }
.prose h3 { font-size: 1.35rem; margin: 1.5rem 0 0.5rem; }
.prose ul, .prose ol { margin: 0 0 1.1rem; padding-left: 1.2rem; }
.prose li { margin: 0 0 0.4rem; }
.prose .meta { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.5rem; }

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.15rem 1.2rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  text-decoration: none;
  color: inherit;
  height: 100%;
  box-shadow: 0 1px 0 rgba(44, 42, 38, 0.04);
}
a.card:hover, a.featured-card:hover {
  border-color: var(--accent-soft);
  color: inherit;
}
.card h3, .featured-card h3 { font-size: 1.4rem; margin: 0; }
.card p, .featured-card p { margin: 0; color: var(--muted); font-size: 0.98rem; flex: 1; }
.card .more, .featured-card .more { font-weight: 600; color: var(--accent); font-size: 0.92rem; }
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.tag {
  display: inline-block;
  background: var(--wash);
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Featured */
.featured-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.35rem 1.3rem 1.45rem;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 10px 28px -22px rgba(44, 42, 38, 0.45);
}
.featured-card h3 { font-size: clamp(1.6rem, 3vw, 2rem); }

/* Good-news teaser */
.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.news-list li { border-bottom: 1px solid var(--line); }
.news-list a {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.35rem 0.85rem;
  padding: 0.95rem 0.15rem;
  text-decoration: none;
  color: inherit;
}
.news-list a:hover h3 { color: var(--accent); }
.news-list .num {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  color: var(--accent);
  line-height: 1.2;
}
.news-list h3 {
  font-size: 1.2rem;
  margin: 0 0 0.15rem;
  grid-column: 2;
}
.news-list .source {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  grid-column: 2;
}
.news-more { margin: 1rem 0 0; font-weight: 600; }

/* How it works + signup */
.lift-band {
  margin-top: 0;
  padding: 2.6rem 0 3.1rem;
  background: var(--lift);
  border-top: 1px solid var(--line);
}
.lift-band .how-intro h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.15rem);
  margin: 0 0 0.45rem;
}
.lift-band .how-intro p {
  color: var(--muted);
  margin: 0 0 1.4rem;
  max-width: 36rem;
  font-size: 1.08rem;
}
.how-grid {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.how-grid li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.05rem 1.1rem;
}
.how-grid h3 {
  font-size: 1.3rem;
  margin: 0.35rem 0 0.3rem;
}
.how-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}
.how-icon {
  width: 1.7rem;
  height: 1.7rem;
  display: block;
}
.signup {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.4rem 1.3rem 1.5rem;
  margin: 0 auto;
  max-width: var(--max);
}
.signup h2 { margin: 0 0 0.4rem; font-size: 1.7rem; }
.signup p { color: var(--muted); margin: 0 0 1rem; }
.signup-form {
  width: 100%;
  min-height: 5.25rem;
}
.signup-form iframe {
  display: block;
  width: 100% !important;
  max-width: 100%;
  border: 0;
  background: transparent;
}
.signup-fallback { margin: 0; }
.signup-fallback a { font-weight: 600; }
form { display: grid; gap: 0.7rem; }
.form-row { display: grid; gap: 0.7rem; }
label { font-weight: 500; }
input[type="email"], input[type="text"] {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--input-line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  color: var(--ink);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn {
  appearance: none;
  display: inline-block;
  border: 1.5px solid var(--accent);
  background: var(--accent);
  color: var(--btn-fg);
  font: inherit;
  font-weight: 600;
  padding: 0.72rem 1.15rem;
  border-radius: 8px;
  cursor: pointer;
  width: fit-content;
  text-align: center;
  text-decoration: none;
}
a.btn { color: var(--btn-fg); }
a.btn:hover, .btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--btn-fg); }
.btn-secondary {
  background: transparent;
  color: var(--accent);
}
a.btn-secondary { color: var(--accent); }
a.btn-secondary:hover, .btn-secondary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--btn-fg);
}

/* Ad placeholders stay in the markup for later, but are not shown */
.ad-slot { display: none !important; }

.page-hero { padding: 2.4rem 0 1.2rem; }
.page-hero h1 { max-width: 22ch; margin-left: 0; text-align: left; }
.page-hero .rule { margin-left: 0; }
.page-hero .lede { margin-left: 0; text-align: left; }
.article-header { padding-top: 2.4rem; }
.article-header h1 { max-width: none; }
.sources { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 0.95rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.8rem 0 2.2rem;
  color: var(--muted);
  font-size: 0.95rem;
  background: var(--footer-bg);
}
.footer-brand { margin: 0 0 1rem; }
.footer-brand a {
  display: inline-flex;
  line-height: 0;
  text-decoration: none;
}
.footer-brand img {
  display: block;
  height: 2rem;
  width: auto;
  max-width: 14rem;
}
.footer-brand p { margin: 0.45rem 0 0; }
.site-footer nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.1rem;
  list-style: none;
  margin: 0 0 0.95rem;
  padding: 0;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent-hover); }
.site-footer .footer-note p { margin: 0.3rem 0; }

.note {
  background: var(--wash);
  border-left: 3px solid var(--accent-soft);
  padding: 0.85rem 1rem;
  margin: 1.2rem 0;
}

@media (min-width: 40rem) {
  .hero { padding: 3rem 0 3.25rem; }
  .hero-actions {
    flex-direction: row;
    justify-content: center;
    max-width: none;
    align-items: center;
  }
  .hero-actions .btn { width: auto; }
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .section-head {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 1rem;
    align-items: end;
  }
  .section-head .kicker { grid-column: 1; }
  .section-head h2 { grid-column: 1; }
  .section-link { grid-column: 2; grid-row: 1 / span 2; align-self: center; margin-top: 0; }
  .how-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .form-row {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
  .form-row .btn { height: 2.85rem; }
  .featured-card { padding: 1.7rem 1.8rem 1.8rem; }
  .footer-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem 2rem;
    align-items: start;
  }
  .footer-brand { margin: 0; }
  .site-footer nav ul { justify-content: flex-end; }
  .footer-note { grid-column: 1 / -1; }
}
@media (min-width: 64rem) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 39.99rem) {
  .nav-toggle-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    background: var(--card);
  }
  .site-nav { display: none; width: 100%; padding-bottom: 0.8rem; }
  .nav-toggle:checked ~ .site-nav { display: block; }
  .site-nav ul { flex-direction: column; gap: 0.55rem; }
  h1 { max-width: none; }
  .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
