/* Homepage landing parts (index.php without ?edit= or ?sample=), on top of site.css: the hero,
   the "what a week looks like" strip, how it works and the sample cards. Mobile first; colours
   are site.css tokens, so dark mode follows it. */

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* ---- hero */
.hero { display: grid; gap: 18px; margin: 4px 0 8px; }
.hero-text { min-width: 0; }
.families { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; }
.families span {
  font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 3px 10px;
}
.hero h1 { font-size: clamp(1.75rem, 6.4vw, 2.4rem); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 10px; text-wrap: balance; }
.hero .lede { font-size: 1.08rem; margin: 0 0 16px; max-width: 46ch; }
.proof { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 9px; }
.proof li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: .97rem; }
.proof svg { width: 22px; height: 22px; padding: 3px; border-radius: 6px; background: var(--accent-soft); fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0; }
.hero-cta .btn { padding: 12px 22px; font-size: 1.02rem; }
.hero-cta .quiet { color: var(--muted); font-weight: 600; }
.hero-cta .quiet:hover { color: var(--text); }
.form-title { font-size: 1.25rem; margin: 26px 0 0; scroll-margin-top: 12px; }
.form-title:focus { outline: none; }

/* ---- week strip */
.week-strip { margin: 0; padding: 14px 14px 12px; min-width: 0; }
.ws-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.week-strip h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0; }
.ws-controls { display: flex; align-items: center; gap: 2px; }
.ws-dot { width: 26px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.ws-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: background .2s; }
.ws-dot[aria-current="true"]::before { background: var(--accent); }
.ws-dot:hover::before { background: var(--muted); }
.ws-next { font: inherit; font-size: .85rem; font-weight: 600; color: var(--accent); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; margin-left: 4px; cursor: pointer; }
.ws-next:hover { border-color: var(--accent); }
.ws-dot:focus-visible, .ws-next:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ws-slide { margin: 0; }
.ws-cap { font-weight: 600; font-size: .98rem; line-height: 1.35; margin: 0 0 10px; min-height: 2.7em; }
.ws-days { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ws-day { display: grid; grid-template-columns: 2.4em minmax(0, 1fr) 4.2em; align-items: center; gap: 8px; font-size: .88rem; min-height: 28px; }
.ws-name { color: var(--muted); font-weight: 600; font-size: .8rem; }
.ws-track { position: relative; display: flex; align-items: center; min-height: 28px; min-width: 0; }
.ws-bar {
  position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); border-radius: 0 6px 6px 0;
  background: var(--t-easy); border-left: 4px solid var(--t-edge-easy); transform-origin: left center;
}
.ws-type { position: relative; padding-left: 10px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-also { font-weight: 400; color: var(--muted); font-size: .8rem; }
.ws-hard { color: var(--t-edge-hard); font-size: .7rem; margin-left: 4px; vertical-align: 1px; }
.ws-amt { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ws-amt small { font-weight: 500; color: var(--muted); font-size: .76rem; }
.ws-day.rest .ws-type { color: var(--muted); font-weight: 500; }
.ws-day.long .ws-bar { background: var(--t-long); border-left-color: var(--t-edge-long); }
.ws-day.hard .ws-bar { background: var(--t-hard); border-left-color: var(--t-edge-hard); }
.ws-day.cross .ws-bar { background: var(--t-cross); border-left-color: var(--t-edge-cross); }
.ws-day.race .ws-bar { background: var(--t-race); border-left-color: var(--t-race); }
.ws-day.swim .ws-bar { background: var(--t-swim); border-left-color: var(--t-edge-swim); }
.ws-day.bike .ws-bar { background: var(--t-bike); border-left-color: var(--t-edge-bike); }

/* The whole plan's weekly volume, the shown week in the accent colour. */
.ws-plan { display: flex; align-items: flex-end; gap: 2px; height: 30px; margin: 12px 0 6px; }
.ws-plan span { flex: 1 1 0; min-width: 2px; border-radius: 2px 2px 0 0; background: var(--line); }
.ws-plan span.taper { opacity: .7; }
.ws-plan span.now { background: var(--accent); opacity: 1; }
.ws-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 0; font-size: .84rem; color: var(--muted); }
.ws-meta strong { color: var(--text); }
.ws-meta a { font-weight: 600; }

@media (prefers-reduced-motion: no-preference) {
  .ws-slide:not([hidden]) .ws-bar { animation: ws-grow .55s cubic-bezier(.2, .7, .3, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }
  .ws-slide:not([hidden]) .ws-cap { animation: ws-fade .35s ease-out both; }
}
@keyframes ws-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ws-fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

@media (min-width: 820px) {
  .hero { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 28px; align-items: center; margin-top: 16px; }
  .hero.no-strip { grid-template-columns: 1fr; }
}

/* ---- how it works */
.how { margin: 36px 0 0; }
.how > h2, .like-you > h2 { font-size: 1.3rem; margin: 0 0 12px; }
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: how; }
.how-steps li { counter-increment: how; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 14px 58px; }
.how-steps li::before {
  content: counter(how); position: absolute; left: 16px; top: 14px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.how-steps h3 { font-size: 1.02rem; margin: 3px 0 4px; }
.how-steps p { margin: 0; color: var(--muted); font-size: .94rem; }
.how-note { font-size: .86rem; color: var(--muted); margin: 10px 0 0; }
@media (min-width: 820px) {
  .how-steps { grid-template-columns: repeat(3, 1fr); }
  .how-steps li { padding: 54px 16px 16px; }
  .how-steps li::before { top: 16px; }
}

/* ---- sample cards */
.like-you { margin: 36px 0 0; }
.like-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 560px) { .like-cards { grid-template-columns: 1fr 1fr; } }
.like-card { display: flex; flex-direction: column; gap: 4px; height: 100%; margin: 0; color: var(--text); text-decoration: none; padding: 14px 16px; transition: border-color .15s; }
.like-card:hover, .like-card:focus-visible { border-color: var(--accent); }
.like-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.like-card .kicker { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.like-card strong { font-size: 1.02rem; line-height: 1.3; color: var(--accent); }
.like-card .text { color: var(--muted); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.like-all { margin: 12px 0 0; font-weight: 600; }

/* ---- free tools strip (links to /tools, same card style) */
.free-tools { margin: 28px 0 0; }
.free-tools > h2 { font-size: 1.3rem; margin: 0 0 12px; }
