/* NextStep homepage (2026-11 redesign).
   The one bold element is the staircase under the hero: the four steps of
   the logo become the four ways to use NextStep. Everything else is plain
   type on a grid, separated by thick navy rules above each heading. */

.community-home {
  --step-navy: var(--navy);
  --step-green: var(--green);
  --step-lime: var(--lime);
  --rise: clamp(2.25rem, 4vw, 3.5rem);
  --tread: 10px;
  color: var(--ink-soft);
  font-family: var(--font-sans);
}
.community-home > section {
  padding-inline: max(var(--gutter), calc((100% - var(--shell)) / 2));
  padding-block: clamp(4rem, 8vw, 6.5rem);
}
.community-home :is(h1, h2, h3) { margin: 0; color: var(--ink); }
.community-home p { margin: 0; }
/* Beats the legacy body[data-page="home"] h2 width cap in redesign.css. */
body[data-page="home"] .community-home h2 {
  max-width: none;
  font-size: clamp(2.1rem, 3.6vw, 3rem);
  font-weight: 760;
  font-stretch: 80%;
  line-height: 1.02;
  letter-spacing: -.012em;
}
html:root body.zh[data-page="home"] .community-home h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1.25; font-stretch: 100%; }

/* Actions */
.community-home .m-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: .75rem 1.35rem;
  border: 2px solid var(--brand);
  background: var(--brand);
  color: var(--on-brand);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.community-home .m-btn:hover { border-color: var(--brand-strong); background: var(--brand-strong); color: var(--on-brand); }
.community-home .m-btn--ghost { background: transparent; color: var(--brand); }
.community-home .m-btn--ghost:hover { background: var(--brand); color: var(--on-brand); }
.community-home .m-link {
  display: inline-block;
  color: var(--brand);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .24em;
}
.community-home .m-link:hover { text-decoration-thickness: 2px; }
.community-home a:focus-visible,
.community-home summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* ─── Hero ───────────────────────────────────────────────────────────── */
#hero { padding-block: clamp(3rem, 6vw, 5.5rem) 0; }
.hero__body { display: grid; }
.hero__lede {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: end;
}
#hero h1 {
  max-width: 17ch;
  font-size: clamp(2.7rem, 5.6vw, 5.4rem);
  font-weight: 780;
  font-stretch: 76%;
  line-height: .98;
  letter-spacing: -.018em;
  text-wrap: balance;
}
html:root body.zh #hero h1 { max-width: none; font-size: clamp(2.4rem, 5vw, 4.6rem); font-stretch: 100%; line-height: 1.2; letter-spacing: .01em; }
.hero__aside p { max-width: 34ch; font-size: 1.1rem; line-height: 1.6; color: var(--ink-soft); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* The staircase. Each step is an L: a thick tread on top and a riser down
   its left side, rising left to right like the logo. */
.stairs { margin-top: clamp(3rem, 6vw, 5rem); }
.stairs__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
}
.stairs__step { --c: var(--step-navy); display: flex; }
.stairs__step--1 { margin-top: calc(var(--rise) * 3); }
.stairs__step--2 { --c: var(--step-green); margin-top: calc(var(--rise) * 2); }
.stairs__step--3 { --c: var(--step-lime); margin-top: var(--rise); }
.stairs__step--4 { margin-top: 0; }
.stairs__step a {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  width: 100%;
  min-height: 12rem;
  padding: 1.25rem 1.5rem 2rem calc(var(--tread) + 1.1rem);
  border-top: var(--tread) solid var(--c);
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(var(--c), var(--c)) left top / var(--tread) 100% no-repeat;
  transition: background-color .15s ease;
}
.stairs__step a:hover { background-color: var(--mist); }
.stairs__step a:hover .stairs__title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .18em; }
.stairs__num { color: var(--muted); font-size: .9rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stairs__title { font-size: clamp(1.35rem, 2vw, 1.75rem); font-weight: 760; font-stretch: 80%; line-height: 1.05; }
html:root body.zh .stairs__title { font-stretch: 100%; font-weight: 700; }
.stairs__text { max-width: 28ch; color: var(--ink-soft); font-size: .98rem; line-height: 1.5; }
.stairs__arrow {
  position: absolute;
  top: calc(var(--tread) * -1.5 - .6rem);
  right: -.25rem;
  width: 3.4rem;
  height: auto;
  fill: var(--c);
}
.stairs__step--4 a { padding-right: 3rem; }

/* ─── Shared two-column section ──────────────────────────────────────── */
.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.split__head {
  position: sticky;
  top: calc(var(--nav-height) + 2rem);
  display: grid;
  gap: 1rem;
  justify-items: start;
  padding-top: 1.25rem;
  border-top: 6px solid var(--navy);
}
.split__head p { max-width: 36ch; color: var(--ink-soft); font-size: 1.05rem; line-height: 1.6; }
.split__head .m-btn { margin-top: .5rem; }

/* Guides: a plain list. Questions are the titles because that is how
   students search for them. */
.guide-list { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line); }
.guide-list li { display: grid; gap: .5rem; padding-block: 1.5rem; border-top: 1px solid var(--line); }
.guide-list li:first-child { padding-top: 0; border-top: 0; }
.guide-list h3 { font-size: clamp(1.35rem, 2vw, 1.6rem); font-weight: 720; font-stretch: 85%; line-height: 1.15; }
.guide-list .journal__feature h3 { font-size: clamp(1.8rem, 3vw, 2.4rem); font-stretch: 80%; line-height: 1.05; }
html:root body.zh .guide-list h3 { font-stretch: 100%; line-height: 1.35; }
.guide-list h3 a { color: var(--ink); text-decoration: none; }
.guide-list h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .16em; }
.guide-list p { max-width: 60ch; color: var(--ink-soft); line-height: 1.6; }
.guide-list .journal__feature p { font-size: 1.1rem; }

/* Question bank band */
#study { background: var(--mist); }
.study__inventory { font-variant-numeric: tabular-nums; }
.study__inventory [data-site-stat] { color: var(--ink); font-weight: 700; }
.subject-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--navy);
}
.subject-links li { border-bottom: 1px solid var(--line-strong); }
.subject-links li:nth-child(odd) { border-right: 1px solid var(--line-strong); }
.subject-links li:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
.subject-links a {
  display: block;
  padding: 1.05rem 1.1rem;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 620;
  text-decoration: none;
}
.subject-links a:hover { background: var(--paper); text-decoration: underline; text-underline-offset: .2em; }
.study__recordings { margin-top: 2rem; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.study__recordings summary,
.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.1rem;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}
.study__recordings summary::-webkit-details-marker,
.faq__q::-webkit-details-marker { display: none; }
.study__toggle,
.faq__icon {
  position: relative;
  flex: none;
  width: 1rem;
  height: 1rem;
}
.study__toggle::before, .study__toggle::after,
.faq__icon::before, .faq__icon::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 2px;
  margin-top: -1px;
  background: var(--ink);
  transition: transform .2s ease;
}
.study__toggle::after, .faq__icon::after { transform: rotate(90deg); }
details[open] > summary .study__toggle::after,
details[open] > summary .faq__icon::after { transform: rotate(0deg); }
.study__recordings-body { display: grid; gap: .6rem; justify-items: start; padding-bottom: 1.4rem; }
.study__recordings-body h3 { font-size: 1.1rem; font-weight: 700; font-stretch: 100%; }

/* Who we are: a dated sequence, so it may carry its dates. */
.timeline-steps { margin: 0; padding: 0; list-style: none; }
.timeline-steps li {
  display: grid;
  grid-template-columns: minmax(9rem, 12rem) minmax(0, 1fr);
  gap: 1.5rem;
  padding-block: 1.4rem;
  border-top: 1px solid var(--line);
}
.timeline-steps li:first-child { padding-top: 0; border-top: 0; }
.timeline-steps li:last-child { border-bottom: 1px solid var(--line); }
.timeline-steps__date { color: var(--green); font-weight: 700; font-variant-numeric: tabular-nums; }
.timeline-steps li p:not(.timeline-steps__date) { color: var(--ink); font-size: 1.15rem; line-height: 1.5; }

/* Events and discussions */
#community { padding-top: 0; }
#community h2 { padding-top: 1.25rem; border-top: 6px solid var(--navy); }
.community__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-top: 2rem; }
.community__card {
  display: grid;
  gap: .6rem;
  align-content: start;
  min-height: 11rem;
  padding: 1.6rem 1.75rem;
  border: 2px solid var(--navy);
  color: var(--ink);
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.community__title { font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 760; font-stretch: 80%; line-height: 1; }
html:root body.zh .community__title { font-stretch: 100%; }
.community__text { max-width: 40ch; color: var(--ink-soft); line-height: 1.55; }
.community__card:hover { background: var(--navy); color: #fff; }
.community__card:hover .community__title, .community__card:hover .community__text { color: #fff; }

/* FAQ */
#faq { border-top: 1px solid var(--line); }
.faq__list { border-bottom: 1px solid var(--line); }
.faq__item { border-top: 1px solid var(--line); }
.faq__item:first-child { border-top: 2px solid var(--navy); }
.faq__q { padding-block: 1.25rem; font-size: 1.15rem; }
.faq__a { padding: 0 2.5rem 1.5rem 0; }
.faq__a p { max-width: 62ch; color: var(--ink-soft); line-height: 1.65; }

/* Volunteer invitation: the lime block closes the page above the footer. */
#contact { background: var(--lime); }
.contact__inner {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
}
#contact h2 { color: #061a3d; font-size: clamp(2.4rem, 4.6vw, 4rem); }
.contact__body { display: grid; gap: 1.25rem; justify-items: start; }
.contact__body p { max-width: 42ch; color: #061a3d; font-size: 1.1rem; line-height: 1.6; }
.community-home .m-btn--navy { border-color: #0b2a5b; background: #0b2a5b; color: #fff; }
.community-home .m-btn--navy:hover { border-color: #061a3d; background: #061a3d; color: #fff; }
#contact a:focus-visible { outline-color: #061a3d; }

/* ─── Dark appearance ────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .community-home { --step-navy: #7d9bd6; --step-green: #5fa33a; }
  :root:not([data-theme="light"]) .community-home :is(.split__head, #community h2) { border-top-color: var(--lime); }
  :root:not([data-theme="light"]) .community-home :is(.subject-links, .faq__item:first-child) { border-top-color: var(--lime); }
  :root:not([data-theme="light"]) .community__card { border-color: var(--line-strong); }
  :root:not([data-theme="light"]) .community__card:hover { background: var(--lime); }
  :root:not([data-theme="light"]) .community__card:hover :is(.community__title, .community__text) { color: #061a3d; }
}
:root[data-theme="dark"] .community-home { --step-navy: #7d9bd6; --step-green: #5fa33a; }
:root[data-theme="dark"] .community-home :is(.split__head, #community h2) { border-top-color: var(--lime); }
:root[data-theme="dark"] .community-home :is(.subject-links, .faq__item:first-child) { border-top-color: var(--lime); }
:root[data-theme="dark"] .community__card { border-color: var(--line-strong); }
:root[data-theme="dark"] .community__card:hover { background: var(--lime); }
:root[data-theme="dark"] .community__card:hover :is(.community__title, .community__text) { color: #061a3d; }

/* ─── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 60rem) {
  .hero__lede { grid-template-columns: 1fr; align-items: start; }
  #hero h1 { max-width: 20ch; }
  .stairs__list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 0; }
  .stairs__step--1 { margin-top: var(--rise); }
  .stairs__step--2 { margin-top: 0; }
  .stairs__step--3 { margin-top: var(--rise); }
  .stairs__step--4 { margin-top: 0; }
  .stairs__arrow { display: none; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 48rem) {
  .hero__body { grid-template-columns: 1fr; }
  .journal__feature, .split__head, .faq__intro { position: static; }
  .community-home > section { padding-block: 3.5rem; }
  #hero { padding-top: 2.5rem; }
  .stairs__list { grid-template-columns: 1fr; border-bottom: 0; }
  .stairs__step { margin-top: 0 !important; }
  .stairs__step--2 { margin-left: 1rem; }
  .stairs__step--3 { margin-left: 2rem; }
  .stairs__step--4 { margin-left: 3rem; }
  .stairs__step a { min-height: 0; padding-bottom: 1.4rem; }
  .subject-links { grid-template-columns: 1fr; }
  .subject-links li:nth-child(odd) { border-right: 0; }
  .timeline-steps li { grid-template-columns: 1fr; gap: .35rem; }
  .community__links { grid-template-columns: 1fr; }
  .contact__inner { grid-template-columns: 1fr; align-items: start; }
  .faq__a { padding-right: 0; }
}
@media (max-width: 25rem) {
  .stairs__step--2 { margin-left: .6rem; }
  .stairs__step--3 { margin-left: 1.2rem; }
  .stairs__step--4 { margin-left: 1.8rem; }
  .hero__actions .m-btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .community-home *, .community-home *::before, .community-home *::after { animation: none !important; transition: none !important; }
}
