/*
Theme Name:   Steady Learner
Theme URI:    https://thesteadylearner.com
Description:  Child theme for The Steady Learner. Executive-function tools for the people
              living it and the people teaching it. Signature element: the creature cast as
              symptom-first navigation.
Author:       The Steady Learner
Template:     generatepress
Version:      1.0.0
Text Domain:  steadylearner
*/

:root {
  --sage:      #3E7C79;
  --sage-deep: #2F5F5D;
  --cream:     #F4EDE4;
  --cream-lo:  #FBF7F1;
  --charcoal:  #2E3A3A;
  --coral:     #E8896B;
  --gold:      #E8B54A;

  --display: 'Poppins', 'Trebuchet MS', sans-serif;
  --body:    'Open Sans', 'Segoe UI', sans-serif;
  --hand:    'Caveat', cursive;

  --measure: 1120px;
  --radius:  18px;
}

/* ---------------------------------------------------------------- base */
body.home,
body.sl-page {
  background: var(--cream-lo);
  color: var(--charcoal);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

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

.sl-section { padding-block: clamp(56px, 8vw, 104px); }
.sl-section--cream { background: var(--cream); }
.sl-section--sage  { background: var(--sage); color: var(--cream); }

h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.022em; line-height: 1.1; }

.sl-eyebrow {
  font-family: var(--body);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--sage);
  margin: 0 0 14px;
}
.sl-section--sage .sl-eyebrow { color: var(--gold); }

.sl-lede { font-size: 1.15rem; max-width: 60ch; color: #4A5757; }
.sl-section--sage .sl-lede { color: #DCE9E6; }

.sl-note { font-family: var(--hand); font-size: 1.35rem; color: var(--sage); }

/* ---------------------------------------------------------------- hero */
.sl-hero { padding-block: clamp(52px, 7vw, 88px) clamp(40px, 5vw, 64px); background: var(--cream); }
.sl-hero h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); margin: 0 0 18px; max-width: 16ch; }
.sl-hero h1 em { font-style: normal; color: var(--sage); }

/* ------------------------------------------------- signature: the cast */
.sl-cast {
  display: grid; gap: 14px; margin-top: clamp(32px, 4vw, 48px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 900px) { .sl-cast { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) { .sl-cast { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

.sl-card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: var(--cream-lo);
  border: 1.5px solid #E4DAcc; border-radius: var(--radius);
  padding: 12px 12px 16px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.sl-card:hover, .sl-card:focus-visible {
  transform: translateY(-5px);
  border-color: var(--sage);
  box-shadow: 0 12px 26px rgba(46, 58, 58, .11);
}
.sl-card:focus-visible { outline: 3px solid var(--sage); outline-offset: 3px; }
.sl-card img { width: 100%; height: auto; border-radius: 12px; display: block; }

.sl-card__name {
  font-family: var(--display); font-weight: 700; font-size: 1.02rem;
  margin: 12px 0 3px;
}
.sl-card__mech {
  font-size: 0.83rem; line-height: 1.45; color: #5C6A6A; margin: 0;
}
.sl-card__go {
  margin-top: auto; padding-top: 10px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--sage);
}

/* ---------------------------------------------------------------- paths */
.sl-paths { display: grid; gap: 22px; grid-template-columns: 1fr 1fr; }
@media (max-width: 780px) { .sl-paths { grid-template-columns: 1fr; } }

.sl-path {
  background: var(--cream-lo); border-radius: var(--radius);
  border: 1.5px solid #E4DAcc; padding: 30px 28px 28px;
  display: flex; flex-direction: column;
}
.sl-path h3 { font-size: 1.45rem; margin: 0 0 10px; }
.sl-path p  { margin: 0 0 18px; color: #4A5757; }
.sl-path ul { margin: 0 0 22px; padding-left: 18px; color: #4A5757; }
.sl-path li { margin-bottom: 6px; }

/* Book list: title is the link, blurb sits under it so the tap target is unambiguous. */
.sl-booklist { list-style: none; padding-left: 0 !important; margin-bottom: 24px !important; }
.sl-booklist li { margin-bottom: 14px; }
.sl-booklist a {
  display: block; font-family: var(--display); font-weight: 600; font-size: 1rem;
  color: var(--charcoal); text-decoration: none;
  border-bottom: 2px solid transparent; width: fit-content;
}
.sl-booklist a:hover, .sl-booklist a:focus-visible { color: var(--sage); border-bottom-color: var(--coral); }
.sl-booklist span { display: block; font-size: .88rem; color: #5C6A6A; margin-top: 2px; }
.sl-path .sl-btn { margin-top: auto; align-self: flex-start; }

/* ---------------------------------------------------------------- buttons */
.sl-btn {
  display: inline-block; font-family: var(--display); font-weight: 600;
  font-size: 0.97rem; text-decoration: none; cursor: pointer;
  padding: 13px 26px; border-radius: 999px; border: 2px solid transparent;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.sl-btn:hover { transform: translateY(-2px); }
.sl-btn--coral { background: var(--coral); color: #fff; }
.sl-btn--coral:hover { background: #DE7658; color: #fff; }
.sl-btn--ghost { border-color: var(--sage); color: var(--sage); }
.sl-btn--ghost:hover { background: var(--sage); color: var(--cream); }
.sl-btn--cream { background: var(--cream); color: var(--charcoal); }

/* ---------------------------------------------------------------- signup */
.sl-signup { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .sl-signup { grid-template-columns: 1fr; } }
.sl-signup h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin: 0 0 14px; }

.sl-form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.sl-form input[type="email"] {
  flex: 1 1 240px; padding: 13px 18px; border-radius: 999px;
  border: 2px solid rgba(244,237,228,.45); background: rgba(255,255,255,.1);
  color: var(--cream); font-family: var(--body); font-size: 1rem;
}
.sl-form input::placeholder { color: rgba(244,237,228,.62); }
.sl-form input:focus { outline: 3px solid var(--gold); outline-offset: 2px; }
.sl-formnote { font-size: .84rem; margin-top: 12px; color: #C6DAD6; }

/* ---------------------------------------------------------------- posts */
.sl-posts { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .sl-posts { grid-template-columns: 1fr; } }
.sl-post {
  background: var(--cream-lo); border: 1.5px solid #E4DAcc;
  border-radius: var(--radius); padding: 24px;
}
.sl-post h3 { font-size: 1.12rem; margin: 0 0 8px; }
.sl-post h3 a { color: inherit; text-decoration: none; }
.sl-post h3 a:hover { color: var(--sage); }
.sl-post time { font-size: .78rem; color: #7A8787; }

.sl-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.sl-head h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); margin: 0; }

/* ---------------------------------------------------------------- header/footer */
.site-logo img, .sl-logo img { max-height: 52px; width: auto; }

.sl-foot { background: var(--charcoal); color: #C3CDCD; padding-block: 44px; }
.sl-foot a { color: var(--cream); }
.sl-foot__row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------------- motion */
@media (prefers-reduced-motion: no-preference) {
  .sl-card { opacity: 0; animation: sl-rise .5s ease forwards; }
  .sl-card:nth-child(1) { animation-delay: .04s } .sl-card:nth-child(2) { animation-delay: .09s }
  .sl-card:nth-child(3) { animation-delay: .14s } .sl-card:nth-child(4) { animation-delay: .19s }
  .sl-card:nth-child(5) { animation-delay: .24s } .sl-card:nth-child(6) { animation-delay: .29s }
  .sl-card:nth-child(7) { animation-delay: .34s } .sl-card:nth-child(8) { animation-delay: .39s }
  @keyframes sl-rise { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }
}
@media (prefers-reduced-motion: reduce) {
  .sl-card, .sl-btn { transition: none !important; animation: none !important; opacity: 1 !important; }
}

.sl-price {
  display: inline-block; margin-left: 8px; vertical-align: 1px;
  font-family: var(--body); font-size: .7rem; font-weight: 700; letter-spacing: .04em;
  padding: 2px 9px; border-radius: 999px;
  background: var(--gold); color: var(--charcoal);
}

/* ================================================================
   LAYOUT REPAIR + SITE-WIDE CHROME
   GeneratePress wraps everything in #page.grid-container, which caps the width.
   The homepage needs full-bleed sections; every other page needs a readable
   measure. So: unwrap the home page, and give inner pages their own container.
   ================================================================ */

body.home #page.grid-container,
body.home #content.site-content {
  max-width: 100%; padding: 0; margin: 0;
}
body.home #content.site-content > .sl-hero:first-child { margin-top: 0; }

/* ---------------------------------------------------------------- header */
.site-header { background: var(--cream); border-bottom: 1.5px solid #E4DAcc; }
.site-header .inside-header { padding-block: 14px; }
.site-logo img, .sl-logo img { max-height: 46px; width: auto; }

.main-navigation { background: transparent; }
.main-navigation .main-nav ul li a {
  font-family: var(--display); font-weight: 600; font-size: .95rem;
  color: var(--charcoal); padding-inline: 16px;
}
.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li.current-menu-item a {
  color: var(--sage); background: transparent;
}
.main-navigation .main-nav ul li a:focus-visible { outline: 3px solid var(--sage); outline-offset: -3px; }

/* ---------------------------------------------------------------- footer */
.site-info, .site-footer .inside-site-info { display: none !important; }  /* GP default */

.sl-foot { background: var(--charcoal); color: #B9C6C6; padding-block: 56px 30px; }
.sl-foot__grid {
  display: grid; gap: 36px;
  grid-template-columns: 1.6fr 1fr 1fr .8fr;
}
@media (max-width: 900px) { .sl-foot__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .sl-foot__grid { grid-template-columns: 1fr; gap: 26px; } }

.sl-foot__brand img { max-width: 230px; height: auto; filter: brightness(0) invert(1); opacity: .92; }
.sl-foot__brand p { margin: 14px 0 0; font-size: .92rem; max-width: 34ch; color: #9DACAC; }

.sl-foot h4 {
  font-family: var(--body); font-size: .74rem; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase; color: var(--gold);
  margin: 0 0 14px;
}
.sl-foot ul { list-style: none; margin: 0; padding: 0; }
.sl-foot li { margin-bottom: 9px; line-height: 1.4; }
.sl-foot a { color: #D6E0E0; text-decoration: none; font-size: .92rem; }
.sl-foot a:hover, .sl-foot a:focus-visible { color: #fff; text-decoration: underline; }

.sl-foot__legal {
  margin: 40px 0 0; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12);
  font-size: .84rem; color: #8B9A9A;
}

/* ================================================================
   INNER PAGES + ARTICLES
   ================================================================ */
body:not(.home) #page.grid-container { max-width: 780px; padding-inline: 24px; }
body:not(.home) #content.site-content { padding-block: clamp(36px, 5vw, 64px); }

.entry-header, .page-header { margin-bottom: 26px; }
.entry-title, body:not(.home) h1.entry-title {
  font-family: var(--display); font-size: clamp(1.9rem, 4.2vw, 2.75rem);
  line-height: 1.12; letter-spacing: -.022em; margin: 0 0 10px;
}
.entry-meta { font-size: .84rem; color: #7A8787; }
.entry-meta a { color: #7A8787; }

.entry-content { font-size: 1.08rem; line-height: 1.75; }
.entry-content > * + * { margin-top: 1.15em; }
.entry-content h2 {
  font-family: var(--display); font-size: 1.55rem; margin-top: 2em; margin-bottom: .5em;
  padding-top: .6em; border-top: 2px solid #E4DAcc;
}
.entry-content h3 { font-family: var(--display); font-size: 1.2rem; margin-top: 1.6em; }
.entry-content a { color: var(--sage); text-underline-offset: 3px; }
.entry-content a:hover { color: var(--coral); }
.entry-content ul, .entry-content ol { padding-left: 22px; }
.entry-content li + li { margin-top: .45em; }
.entry-content blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 22px;
  border-left: 4px solid var(--gold); font-style: normal; color: #4A5757;
}
.entry-content strong { color: var(--charcoal); }

/* The one in-article CTA — quiet, but unmistakably a next step. */
.sl-cta {
  margin: 2.2em 0; padding: 26px 28px;
  background: var(--cream); border: 1.5px solid #E4DAcc; border-radius: var(--radius);
}
.sl-cta p { margin: 0 0 14px; }
.sl-cta p:last-child { margin: 0; }

/* Blog index */
body.blog .entry-title, body.archive .entry-title { font-size: 1.5rem; }
body.blog article, body.archive article {
  padding-bottom: 26px; margin-bottom: 26px; border-bottom: 1.5px solid #E4DAcc;
}
body.blog article:last-child, body.archive article:last-child { border-bottom: 0; }
