/*
 * Styles specific to the per-book study guide landing pages.
 * Loaded after base.css, which is the shared theme lifted from the home page.
 */

.brand {
  text-decoration: none;
}

/* ------------------------------------------------------------ breadcrumb */

.breadcrumb {
  padding: 18px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.breadcrumb .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.breadcrumb a:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ------------------------------------------------------------------ hero */

.sg-hero {
  padding-top: 28px;
}

/* These pages lead with a long book title and a benefit list rather than a
   short slogan, so the copy column needs more room than the home page gives
   it, and the artwork sits at the top instead of floating mid-column. */
.sg-hero .hero-grid {
  grid-template-columns: 1.4fr 1fr;
  align-items: start;
}

.sg-hero h1 {
  /* base.css caps h1 at 12ch for the home page's short slogan; a book title
     plus edition needs the full column. */
  max-width: none;
  font-size: clamp(1.7rem, 2.6vw, 2.45rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  text-wrap: balance;
}

.sg-hero .subtext {
  max-width: 62ch;
}

/* Long book titles need to keep their share of the section header row. */
.section-head h2 {
  flex: 1 1 58%;
  text-wrap: balance;
}

.section-head p {
  flex: 0 1 36%;
}

.hub-hero {
  text-align: center;
  padding-bottom: 0;
}

.hub-hero h1 {
  margin-bottom: 14px;
}

.hub-hero .subtext {
  margin-left: auto;
  margin-right: auto;
}

/* A newer edition exists -- steer the reader to it. */
.notice {
  margin: 0 0 22px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 209, 102, 0.35);
  background: rgba(255, 209, 102, 0.1);
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.55;
}

.notice a {
  color: var(--accent-2);
  border-bottom: 1px solid currentColor;
}

/* --------------------------------------------------------------- content */

.prose {
  max-width: 74ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.72;
}

.prose p {
  margin: 0 0 16px;
}

.prose strong {
  color: var(--text);
}

.disclaimer {
  font-size: 0.9rem;
  padding: 14px 16px;
  border-left: 3px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 12px 12px 0;
}

.benefit-list,
.audience-list,
.related-list {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  display: grid;
  gap: 10px;
}

.audience-list,
.related-list {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-bottom: 28px;
}

.benefit-list li,
.audience-list li,
.related-list li {
  position: relative;
  padding: 10px 14px 10px 38px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.55;
}

.benefit-list li::before,
.audience-list li::before,
.related-list li::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 1.05em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.benefit-list strong,
.audience-list strong {
  color: var(--text);
}

.related-list a {
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

.related-list a:hover {
  border-bottom-color: var(--accent);
}

/* --------------------------------------------------------- chapter list */

.chapter-head {
  margin: 36px 0 16px;
  font-size: 1.15rem;
  color: var(--text);
}

.chapter-list {
  margin: 0;
  padding: 0 0 0 0;
  list-style: none;
  counter-reset: ch;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
}

.chapter-list li {
  counter-increment: ch;
  position: relative;
  padding: 12px 16px 12px 52px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.chapter-list li::before {
  content: counter(ch);
  position: absolute;
  left: 14px;
  top: 12px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 107, 44, 0.16);
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 700;
}

/* --------------------------------------------------------------- steps */

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0 0 28px;
  display: grid;
  gap: 14px;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 18px 20px 18px 68px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 20px;
  top: 18px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #ff8f5c);
  color: #1a0d05;
  font-weight: 800;
}

.steps h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
  color: var(--text);
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ---------------------------------------------------------- screenshots */

/* Six screenshots, so lay them out 3 x 2 rather than letting auto-fit
   strand a single phone on its own row. */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 22px;
}

@media (max-width: 900px) {
  .shot-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .shot-grid {
    grid-template-columns: 1fr;
  }
}

.shot {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shot img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  /* Phone screens are tall; keep them from dominating the section. */
  max-width: 300px;
  margin: 0 auto;
}

.shot figcaption {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  text-align: center;
  max-width: 34ch;
  margin: 0 auto;
}

.shot-note {
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
  opacity: 0.85;
}

/* ------------------------------------------------------------------ FAQ */

#faq .faq {
  max-width: 860px;
}

#faq .faq-item h3 {
  font-size: 1.03rem;
  margin: 0 0 8px;
  color: var(--text);
}

#faq .faq-item p {
  margin: 0;
  line-height: 1.68;
}

/* ------------------------------------------------------------- hub grid */

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.hub-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.hub-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 107, 44, 0.5);
}

.hub-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hub-body {
  padding: 16px 18px 20px;
}

.hub-body h2 {
  font-size: 1.02rem;
  line-height: 1.35;
  margin: 10px 0 12px;
  color: var(--text);
}

/* --------------------------------------------------------------- mobile */

@media (max-width: 900px) {
  .sg-hero .hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .chapter-list,
  .audience-list,
  .related-list {
    grid-template-columns: 1fr;
  }

  .steps li {
    padding: 16px 16px 16px 60px;
  }
}
