/*-- -------------------------- -->
<---   Blog + legal pages (v2)     -->
<--- -------------------------- -*/

/* Replaces blog.css and legal.css on the v2 site. Loaded after home-v2.css
   and therapist-v2.css, which supply the tokens, light header, pills,
   cutout shapes and footer. */

.tp-page { background: var(--paper-light); }

.tp-page .cs-topper {
  display: block;
  font-family: var(--bodyFont);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 1.25rem;
}

/* Blog index hero: the inset cream panel from the landing pages ---------- */

#blog-hero { padding: 0 clamp(1rem, 2vw, 1.75rem); }
#blog-hero .cs-container {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 10px;
  background: var(--cream);
  text-align: center;
  padding: 7rem 1.5rem 8rem;
}
#blog-hero .cs-topper,
#blog-hero .cs-title,
#blog-hero .cs-text { position: relative; z-index: 2; }
#blog-hero .cs-title {
  font-family: var(--tp-serif);
  font-weight: 300;
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  max-width: 44rem;
  margin: 0 auto;
}
#blog-hero .cs-text { font-size: 1.15rem; line-height: 1.6; max-width: 34rem; margin: 1.75rem auto 0; }

#blog-hero .v2-shape { z-index: 1; }
#blog-hero .p1 { left: -2rem; top: 3rem; width: 12rem; height: 3.5rem; background-color: var(--brick); border-radius: 0 3rem 0 0; }
#blog-hero .p2 { left: -3rem; top: 10rem; width: 10rem; height: 12rem; background-color: var(--blush); border-radius: 50% 60% 45% 40%; }
#blog-hero .p3 { left: 6rem; bottom: -1.5rem; width: 5.5rem; height: 9rem; background-color: var(--olive); border-radius: 0 999px 999px 0; }
#blog-hero .p4 { right: -2rem; top: 3rem; width: 12rem; height: 3.5rem; background-color: var(--mustard); border-radius: 0 0 0 4rem; }
#blog-hero .p5 { right: -3rem; top: 10rem; width: 10rem; height: 12rem; background-color: var(--sky); border-radius: 55% 45% 40% 60%; }
#blog-hero .p6 { right: 5rem; bottom: -2rem; width: 8rem; height: 8rem; background-color: var(--blue); border-radius: 50% 50% 0 0; }

/* Blog list --------------------------------------------------------------- */

#blog-list { padding: 5rem 0 7rem; }
#blog-list .cs-container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
#blog-list .cs-post-group { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
#blog-list .cs-post-item:nth-child(3n + 1) .cs-post-link { --card: var(--forest-deep); --card-ink: var(--paper); }
#blog-list .cs-post-item:nth-child(3n + 2) .cs-post-link { --card: var(--cream); --card-ink: var(--ink); }
#blog-list .cs-post-item:nth-child(3n + 3) .cs-post-link { --card: var(--ink); --card-ink: var(--paper); }
#blog-list .cs-post-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 24rem;
  padding: 2.25rem 2rem 2rem;
  border-radius: 14px;
  background: var(--card);
  color: var(--card-ink);
  text-decoration: none;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
#blog-list .cs-post-link:hover { transform: translateY(-4px); box-shadow: 0 1.25rem 2.5rem rgba(28, 26, 22, 0.16); }
#blog-list .cs-post-link:focus-visible { outline: 3px solid var(--mustard); outline-offset: 3px; }
#blog-list .cs-post-meta { font-size: 0.8rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.8; }
#blog-list .cs-post-title { font-family: var(--tp-serif); font-weight: 300; font-size: 1.75rem; line-height: 1.2; letter-spacing: -0.015em; margin: 1.25rem 0 1rem; }
#blog-list .cs-post-excerpt { margin: 0; font-size: 1rem; line-height: 1.6; opacity: 0.9; flex: 1; }
#blog-list .cs-post-cta {
  margin-top: 2rem;
  align-self: flex-start;
  padding: 0.75rem 1.25rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Articles and legal pages ----------------------------------------------- */

#post,
#legal { padding: 4.5rem 0 7rem; }
#post .cs-container,
#legal .cs-container { width: 100%; max-width: 44rem; margin: 0 auto; padding: 0 var(--gutter); }

#post .cs-back-link {
  display: inline-block;
  margin-bottom: 2.5rem;
  font-family: var(--tp-serif);
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
}
#post .cs-back-link:hover { text-decoration: underline; text-underline-offset: 4px; }

#post .cs-title,
#legal .cs-title {
  font-family: var(--tp-serif);
  font-weight: 300;
  font-size: clamp(2.3rem, 4.4vw, 3.3rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 1.25rem;
}
#post .cs-updated,
#legal .cs-updated {
  font-size: 0.9rem;
  opacity: 0.7;
  margin: 0 0 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(28, 26, 22, 0.2);
}

#post h2,
#legal h2 {
  font-family: var(--tp-serif);
  font-weight: 400;
  font-size: clamp(1.45rem, 2.2vw, 1.75rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 3rem 0 1rem;
}
#post p,
#legal p,
#post li,
#legal li { font-size: 1.0625rem; line-height: 1.75; }
#post p,
#legal p { margin: 0 0 1.15rem; }
#post ul,
#post ol,
#legal ul,
#legal ol { margin: 0 0 1.25rem; padding-left: 1.25rem; }
#post li,
#legal li { margin-bottom: 0.6rem; }
#post li::marker,
#legal li::marker { color: var(--rust); }
#post strong,
#legal strong { font-weight: 500; }
#post a:not(.v2-pill),
#legal a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--olive);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}
#post a:not(.v2-pill):hover,
#legal a:hover { text-decoration-color: var(--rust); }

/* End-of-article call to action: a small version of the green offer band */
#post .cs-post-cta {
  position: relative;
  overflow: hidden;
  margin-top: 4rem;
  padding: 2.75rem 2.25rem;
  border-radius: 14px;
  background: var(--forest-deep);
  color: var(--paper);
  text-align: center;
}
#post .cs-post-cta .cs-text { color: var(--paper); font-family: var(--tp-serif); font-size: 1.35rem; line-height: 1.45; max-width: 28rem; margin: 0 auto 1.75rem; }
#post .cs-post-cta .v2-pill { display: inline-flex; background: transparent; border-color: var(--paper); color: var(--paper); min-width: 14rem; }
#post .cs-post-cta .v2-pill:hover { background: var(--paper); color: var(--ink); }

@media (max-width: 960px) {
  #blog-hero .cs-container { padding: 6rem 1.25rem 8rem; }
  #blog-hero .p1, #blog-hero .p4 { width: 7rem; height: 2.25rem; top: 1.5rem; }
  #blog-hero .p2 { width: 5rem; height: 7rem; top: auto; bottom: 3rem; left: -2rem; }
  #blog-hero .p5 { width: 5rem; height: 7rem; top: auto; bottom: 4rem; right: -2rem; }
  #blog-hero .p3 { left: 4.5rem; width: 3.5rem; height: 6rem; }
  #blog-hero .p6 { right: 4rem; width: 5.5rem; height: 5.5rem; }

  #blog-list .cs-post-group { grid-template-columns: 1fr; max-width: 34rem; margin: 0 auto; }
  #blog-list .cs-post-link { min-height: 0; }

  #post, #legal { padding: 3rem 0 5rem; }
  #post .cs-post-cta { padding: 2.25rem 1.5rem; }
}
