/* /animate/: the guide page. Builds on site.css (tokens, Overpass, .bar, .plate, .statement, .mask, .sign). Rules in DESIGN.md. */
body.animate { display: grid; grid-template-rows: auto 1fr auto; min-height: 100svh; }
.animate > .bar { padding: var(--edge); }

/* Desktop: the statement, the line, what's inside and the form on the left; the guide's first page beside them. */
.guide {
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(340px, 31vw, 470px); grid-template-rows: auto auto auto 1fr;
  grid-template-areas: "title cover" "sub cover" "inside cover" "ask cover";
  column-gap: clamp(40px, 6vw, 104px); align-items: start;
  padding: clamp(8px, 2vw, 32px) var(--edge) clamp(56px, 8vw, 112px);
}
.guide .statement { grid-area: title; }
.guide .sub { grid-area: sub; width: auto; margin-top: clamp(22px, 2.4vw, 34px); max-width: 44ch; font-size: 22px; line-height: 1.4; text-wrap: balance; }
.cover { grid-area: cover; margin: 0; }
.cover img { width: 100%; height: auto; border: 2px solid var(--granite); border-radius: 4px; background: var(--snow); }
.inside { grid-area: inside; list-style: none; margin: clamp(24px, 2.6vw, 36px) 0 0; padding: 0; max-width: 40rem; border-bottom: 2px solid var(--granite); }
.inside li { padding: 10px 0 8px; border-top: 2px solid var(--granite); font-weight: 700; line-height: 1.35; }
.ask { grid-area: ask; max-width: 40rem; margin-top: clamp(28px, 2.6vw, 36px); }

/* The form: two fields, one trailhead sign. */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field-row { display: grid; gap: 8px; align-content: start; }
.field-row label { font: 600 16px/1.3 'Overpass', sans-serif; }
.field-row input {
  width: 100%; min-height: 56px; padding: 14px 16px 12px; border: 2px solid var(--granite); border-radius: 7px;
  background: transparent; color: var(--granite); font: 400 18px/1.2 'Overpass', sans-serif; scroll-margin-block: 120px;
}
.field-row input:focus-visible { outline: 3px solid var(--sign); outline-offset: 2px; }
.field-row input[aria-invalid="true"] { border: 3px solid var(--sign); padding: 13px 15px 11px; }
.field-error, .form-error { color: var(--sign); font-weight: 700; font-size: 16px; line-height: 1.35; }
.form-error { margin-top: 14px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form .sign { margin-top: 22px; cursor: pointer; }
.form .sign[aria-disabled="true"] { cursor: progress; }
.privacy { margin-top: 14px; color: var(--rock); font-size: 16px; }

/* After sending: the result heading takes focus; the download and the call are the two next steps. */
.result-head { font: 850 clamp(36px, 4.2vw, 56px)/0.9 'Overpass', sans-serif; letter-spacing: -0.035em; text-transform: uppercase; }
.result-head:focus { outline: none; }
.result-head:focus-visible { outline: 3px solid var(--sign); outline-offset: 6px; }
.result p { margin-top: 14px; font-size: 22px; line-height: 1.4; }
.result p:first-of-type { margin-top: 20px; }
.result .note { color: var(--rock); font-size: 16px; }

/* One text link style. Block padding gives a 44px target without opening up the line spacing. */
.result a, .form-error a, .about a { padding-block: 11px; text-underline-offset: 5px; text-decoration-thickness: 2px; text-decoration-color: var(--sign); }

.about { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 32px; margin: 0 var(--edge); padding: 22px 0 calc(28px + env(safe-area-inset-bottom)); border-top: 2px solid var(--granite); }
.about p { max-width: 62ch; }
.about .copy { color: var(--rock); font-size: 16px; }

/* Tablet and phone: statement, then the guide beside what's inside, then the form. */
@media (max-width: 999px) {
  .guide {
    grid-template-columns: clamp(124px, 34vw, 240px) minmax(0, 1fr); grid-template-rows: none;
    grid-template-areas: "title title" "sub sub" "cover inside" "ask ask"; column-gap: clamp(18px, 4vw, 40px);
  }
  .guide .statement { font-size: clamp(44px, 11.6vw, 96px); line-height: 0.88; }
  .cover { margin-top: clamp(28px, 4vw, 44px); }
  .inside { align-self: center; }
  .ask { max-width: none; }
}
@media (max-width: 700px) {
  .guide .sub { font-size: 20px; }
  .inside li { font-size: 17px; padding: 11px 0 9px; }
  .fields { grid-template-columns: 1fr; }
  .form .sign { width: 100%; justify-content: center; }
  .about { flex-direction: column; }
}
/* Phones: the form follows the sub line so the sign is in the first screen; the guide and what's inside follow it. */
@media (max-width: 479px) {
  .guide { grid-template-areas: "title title" "sub sub" "ask ask" "cover inside"; }
  .guide .sub { margin-top: 12px; font-size: 19px; line-height: 1.38; }
  .ask { margin-top: 22px; }
  .fields { gap: 12px; }
  .field-row { gap: 6px; }
  .form .sign { margin-top: 16px; }
  .cover { margin-top: 40px; }
  .inside { margin-top: 40px; }
}

/* The page's one moment: the two statement lines rise from their masks on load, as on the homepage. */
@media (prefers-reduced-motion: no-preference) {
  .guide .statement .mask > span { animation: rise var(--t-reveal) var(--ease-expo) both; }
  .guide .statement .mask:nth-child(2) > span { animation-delay: 110ms; }
}
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
