/* Naagu help page: the page reads like an episode with chapters. */

.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: var(--terra-deep);
  transform: scaleX(0);
  transform-origin: left;
}

.help-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3.5rem) var(--gutter) clamp(2.5rem, 6vw, 5rem);
}
.help-hero__title {
  margin: clamp(1rem, 2.4vw, 1.75rem) 0 1.5rem;
  font-size: clamp(2.6rem, 0.6rem + 10vw, 11rem);
  line-height: 0.88;
  letter-spacing: -0.04em;
  color: var(--night);
}
.help-hero__lead { font-size: var(--step-1); line-height: 1.45; max-width: 36ch; color: var(--night); }

.motion .help-hero [data-enter] { opacity: 0; }
.motion .help-hero .line[data-enter] { opacity: 1; }
.motion .help-hero .line > span { transform: translateY(105%); }
.motion .help-hero.is-entered [data-enter] { opacity: 1; transition: opacity 0.9s var(--ease-out) 0.35s; }
.motion .help-hero.is-entered .line > span { transform: none; transition: transform 1.1s var(--ease-out); }
.motion .help-hero.is-entered .line:nth-child(2) > span { transition-delay: 0.1s; }

.help-body {
  display: grid;
  grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(4rem, 8vw, 7rem);
}

/* Chapter rail */
.chapters { position: sticky; top: calc(var(--head-h) + 1.5rem); align-self: start; }
.chapters__title { margin-bottom: 1rem; font-weight: 700; font-size: var(--step--1); color: var(--terra-deep); }
.chapters__track { position: relative; padding-left: 2.6rem; }
.chapters__line { position: absolute; left: 0.9rem; top: 0.6rem; bottom: 0.6rem; width: 3px; border-radius: 2px; background: rgba(61, 53, 44, 0.18); }
.chapters__fill { position: absolute; inset: 0; border-radius: 2px; background: var(--night); transform: scaleY(0); transform-origin: top; }
.chapters__head { position: absolute; left: calc(0.9rem + 1.5px); top: 0.6rem; color: var(--night); transform: translate(-50%, -50%); will-change: transform; display: none; }
.chapters__head circle:nth-child(2) { stroke: var(--terra); }
.chapters__head path { fill: var(--cream); }
.js .chapters__head { display: block; }
.chapters ol { list-style: none; display: grid; gap: 0.35rem; }
.chapters a {
  display: block;
  padding: 0.45rem 0.25rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  color: var(--ink);
  transition: color 0.25s ease, transform 0.35s var(--ease-out);
}
.chapters a:hover { color: var(--terra-deep); transform: translateX(4px); }
.chapters a[aria-current="location"] { color: var(--night); }
.chapters a[aria-current="location"]::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: 0.5rem; border-radius: 50%; background: var(--terra-deep); vertical-align: 0.15em; }

/* Chapters */
.help-content { min-width: 0; max-width: 52rem; }
.chapter { padding: clamp(2.5rem, 5vw, 4rem) 0; border-top: 2px solid var(--night); }
.chapter:first-child { padding-top: 0; border-top: 0; }
.chapter__title { font-size: var(--step-3); color: var(--night); margin-bottom: 1.25rem; }
.chapter__lead { font-size: var(--step-1); line-height: 1.45; max-width: 38ch; color: var(--night); }
.chapter h3 { color: var(--night); }
.chapter a { color: var(--terra-deep); font-weight: 700; }
.chapter a:hover { color: var(--night); }

/* Setup track */
.track { list-style: none; counter-reset: s; margin: 2rem 0; }
.track__step {
  counter-increment: s;
  position: relative;
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  column-gap: 1rem;
  padding-bottom: 1.75rem;
}
.track__step::before {
  content: counter(s);
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--night);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  position: relative;
  z-index: 1;
}
.track__step::after {
  content: "";
  position: absolute;
  left: calc(1.625rem - 1.5px);
  top: 3.25rem;
  bottom: 0;
  width: 3px;
  background: var(--night);
  opacity: 0.25;
}
.track__step:last-child::after { display: none; }
.track__step h3 { align-self: end; margin: 0.3rem 0 0.35rem; }
.track__step p { grid-column: 2; max-width: 46ch; }

.note { padding: clamp(1.25rem, 3vw, 1.75rem); border-radius: 22px; }
.note h3 { margin-bottom: 0.6rem; }
.note--green { background: var(--green); color: var(--night); }

/* First listen */
.before {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 2rem;
  padding: 1rem 1.25rem;
  border: 2px dashed var(--night);
  border-radius: 18px;
}
.before p { margin: 0; }
.before__label { font-weight: 700; color: var(--terra-deep); }
.flow { list-style: none; display: grid; gap: 1rem; counter-reset: f; }
.flow li {
  counter-increment: f;
  position: relative;
  padding: 1.4rem 1.4rem 1.4rem 4.4rem;
  border-radius: 22px;
  background: var(--paper);
}
.flow li::before {
  content: counter(f);
  position: absolute;
  left: 1.4rem;
  top: 1.35rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  line-height: 1;
  color: var(--terra-deep);
}
.flow li:nth-child(2) { margin-left: clamp(0rem, 4vw, 3rem); }
.flow li:nth-child(3) { margin-left: clamp(0rem, 8vw, 6rem); background: var(--blue); color: var(--night); }
.flow h3 { margin-bottom: 0.5rem; }

/* Fixes */
.fixes { margin: 0; }
.fix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 0.5rem 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}
.fix:last-child { border-bottom: 0; }
.fix dt { font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); line-height: 1.15; color: var(--night); }
.fix dd { margin: 0; }
@media (max-width: 39.99em) { .fix { grid-template-columns: 1fr; } }

/* Why */
.chapter--why {
  margin: 1rem 0;
  padding: clamp(2rem, 5vw, 3.5rem);
  border-top: 0;
  border-radius: 28px;
  background: var(--terra);
  color: var(--night);
}
.chapter--why + .chapter { border-top: 0; }
.chapter--why a { color: var(--night); }
.why__big { font-family: var(--font-display); font-weight: 800; font-size: var(--step-2); line-height: 1.1; max-width: 22ch; }

/* Support */
.pack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 2rem 0; }
.pack__list { padding: 1.4rem; border-radius: 22px; }
.pack__list h3 { margin-bottom: 0.9rem; }
.pack__list ul { list-style: none; display: grid; gap: 0.6rem; }
.pack__list li { display: flex; align-items: flex-start; gap: 0.7rem; }
.pack__list li::before { content: ""; flex: none; width: 1.3rem; height: 1.3rem; margin-top: 0.2rem; background: currentColor; }
.pack__list--in { background: var(--paper); border: 2px solid var(--night); }
.pack__list--in li::before { color: var(--green-deep); clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 8%, 38% 72%); }
.pack__list--out { background: var(--night); color: var(--cream); }
.pack__list--out h3 { color: var(--cream); }
.pack__list--out li::before { color: var(--terra); clip-path: polygon(20% 0, 50% 30%, 80% 0, 100% 20%, 70% 50%, 100% 80%, 80% 100%, 50% 70%, 20% 100%, 0 80%, 30% 50%, 0 20%); }
@media (max-width: 34.99em) { .pack { grid-template-columns: 1fr; } }
.legal { font-size: var(--step--1); }

.help-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 1rem;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border-radius: 28px;
  background: var(--night);
  color: var(--cream);
}
.help-cta h2 { font-size: var(--step-2); }
.help-cta :focus-visible { outline-color: var(--cream); }

@media (max-width: 63.99em) {
  .help-body { grid-template-columns: 1fr; }
  .chapters { position: static; padding: 1.25rem; border-radius: 22px; background: var(--paper); }
  .js .chapters__head { display: none; }
  .chapters__fill { display: none; }
}
@media (min-width: 64em) {
  .read-progress { display: none; }
}
