/* Homepage (index.html): hero with the example result readout, and the
   "Choose where to start" time track. Motion is one load sequence on the
   readout (js/page-home-report.js adds .play); reduced motion shows it static. */

/* ---- Hero ---- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(3rem, 7vw, 6rem) 5% clamp(3.5rem, 7vw, 6rem);
  background: var(--navy-900);
  text-align: left;
}

.hero-copy { max-width: 620px; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(2.6rem, 5.6vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0.005em;
  color: var(--white);
  max-width: 16ch;
  text-wrap: balance;
  margin-bottom: 1.5rem;
}

.hero-lede {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--cream-200);
  max-width: 34em;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-bottom: 1.5rem;
}

.hero-start {
  font-size: 1.1rem;
  padding: 1.05rem 2rem;
  min-height: 56px;
}

.hero-try {
  color: var(--white);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--gold-500);
  text-underline-offset: 0.3em;
  text-decoration-thickness: 2px;
  padding: 0.5rem 0;
}
.hero-try:hover { color: var(--gold-400); }

.hero-fine {
  font-size: 0.92rem;
  color: var(--cream-200);
}
.hero-fine a { color: var(--gold-400); font-weight: 600; }

.hero a:focus-visible,
.start a:focus-visible {
  outline: 3px solid var(--gold-400);
  outline-offset: 3px;
}

/* ---- Example result readout ---- */
.report {
  margin: 0;
  background: var(--cream-100);
  border-radius: var(--r-lg);
  border-top: 5px solid var(--gold-500);
  padding: 1.6rem 1.75rem 1.4rem;
  box-shadow: var(--shadow-3);
  max-width: 420px;
  width: 100%;
  justify-self: center;
}

.report-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.1rem;
  font-size: 0.85rem;
}
.report-tag {
  background: var(--gold-300);
  color: var(--navy-900);
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: var(--r-pill);
}
.report-test { color: var(--text-secondary); }

.report-label { font-size: 0.9rem; color: var(--text-secondary); }
.report-score {
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 4.75rem;
  line-height: 1;
  color: var(--navy-900);
  font-variant-numeric: tabular-nums;
  margin: 0.2rem 0 0.35rem;
}
.report-range { font-size: 0.92rem; color: var(--text-secondary); }

.report-bars {
  list-style: none;
  margin: 1.25rem 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.report-bars li {
  display: grid;
  grid-template-columns: 2.2rem 1fr 1.8rem;
  align-items: center;
  gap: 0.75rem;
}
.bar-code, .bar-ss {
  font-family: var(--font-data);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--navy-900);
}
.bar-ss { text-align: right; color: var(--text-secondary); }
.bar {
  height: 8px;
  background: var(--cream-200);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.bar > span {
  display: block;
  height: 100%;
  width: var(--w);
  background: var(--navy-700);
  border-radius: var(--r-pill);
}

.report-jobs {
  background: var(--navy-900);
  border-radius: var(--r-md);
  padding: 1rem 1.15rem;
}
.report-jobs-main {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.55rem;
  line-height: 1.1;
  color: var(--white);
}
.report-jobs-main span { color: var(--gold-400); font-family: var(--font-data); }
.report-jobs-sub { font-size: 0.9rem; color: var(--cream-200); margin-top: 0.25rem; }

.report-next {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--cream-200);
  font-size: 0.9rem;
  color: var(--navy-900);
  font-weight: 600;
}
.report-next span { color: var(--text-secondary); font-weight: 400; }

/* The one load sequence: bars fill, the numbers count (JS), then the jobs land. */
@media (prefers-reduced-motion: no-preference) {
  .report.play .bar > span { animation: barFill 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .report.play li:nth-child(2) .bar > span { animation-delay: 0.08s; }
  .report.play li:nth-child(3) .bar > span { animation-delay: 0.16s; }
  .report.play li:nth-child(4) .bar > span { animation-delay: 0.24s; }
  .report.play .report-jobs { animation: jobsLand 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 1.1s both; }
  .report.play .report-next { animation: fadeIn 0.4s ease-out 1.5s both; }
}
@keyframes barFill { from { width: 0; } }
@keyframes jobsLand { from { opacity: 0; transform: translateY(10px); } }
@keyframes fadeIn { from { opacity: 0; } }

/* ---- Choose where to start ---- */
.start {
  padding: clamp(3.5rem, 7vw, 5.5rem) 5%;
  background: var(--cream-100);
}
.start-head { max-width: 1100px; margin: 0 auto 2.75rem; }
.start-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(2.1rem, 4vw, 2.8rem);
  line-height: 1.05;
  color: var(--navy-900);
  margin-bottom: 0.6rem;
}
.start-head p { font-size: 1.1rem; color: var(--text-secondary); max-width: 38em; }

/* A time axis: each stop is a point on one line, ordered by how long it takes. */
.track {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1100px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  position: relative;
}
.track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 2.9rem;
  height: 2px;
  background: var(--navy-700);
  opacity: 0.25;
}
.stop {
  position: relative;
  padding: 0 1.75rem 0 0;
  display: flex;
  flex-direction: column;
}
.stop::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(2.9rem - 6px);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cream-100);
  border: 2px solid var(--navy-700);
}
.stop-time {
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--navy-900);
  line-height: 1;
  margin-bottom: 2.6rem;
  font-variant-numeric: tabular-nums;
}
.stop h3 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.45rem;
  line-height: 1.1;
  color: var(--navy-900);
  margin-bottom: 0.5rem;
}
.stop p:not(.stop-time) {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.55;
  margin-bottom: 1.1rem;
}
.stop-link {
  margin-top: auto;
  align-self: flex-start;
  color: var(--navy-900);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--gold-500);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
  padding: 0.5rem 0;
}
.stop-link:hover { color: var(--navy-700); }

.stop-full::before {
  background: var(--gold-500);
  border-color: var(--gold-500);
  width: 20px;
  height: 20px;
  top: calc(2.9rem - 9px);
}
.stop-full .stop-link {
  background: var(--navy-900);
  color: var(--white);
  text-decoration: none;
  padding: 0.8rem 1.3rem;
  border-radius: var(--r-md);
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}
.stop-full .stop-link:hover { background: var(--navy-700); color: var(--white); }

/* ---- Responsive ---- */
@media (max-width: 968px) {
  .hero { grid-template-columns: 1fr; }
  .report { justify-self: start; }
  .track { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.5rem; }
  .track::before { display: none; }
  .stop::before { display: none; }
  .stop { padding: 0 1.5rem 0 0; }
  .stop-time { margin-bottom: 0.75rem; }
}

@media (max-width: 600px) {
  .hero { padding: 2.5rem 1rem 3rem; }
  .hero h1 { font-size: clamp(2.3rem, 11vw, 2.9rem); }
  .hero-lede { font-size: 1.05rem; margin-bottom: 1.75rem; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 0.5rem; }
  .hero-start { justify-content: center; width: 100%; }
  .hero-try { text-align: center; }
  .report { padding: 1.35rem 1.25rem 1.2rem; }
  .report-score { font-size: 4rem; }
  .start { padding: 3rem 1rem; }
  /* Vertical time axis on phones. */
  .track { grid-template-columns: 1fr; row-gap: 2rem; padding-left: 1.75rem; }
  .track::before { display: block; left: 6px; right: auto; top: 0.5rem; bottom: 0.5rem; width: 2px; height: auto; }
  .stop { padding: 0; }
  .stop::before { display: block; left: -1.75rem; top: 0.35rem; }
  .stop-full::before { left: calc(-1.75rem - 3px); top: 0.2rem; }
  .stop-time { margin-bottom: 0.5rem; font-size: 1.3rem; }
}
