/* The home page: hero kit and lane, the pinned session run, too easy / too hard,
   the drill strip, and the orange join field. Loaded after base.css and field.css. */

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: max(780px, 100svh);
  display: grid;
  grid-template-columns: minmax(0, 5.2fr) minmax(0, 6.8fr);
  grid-template-rows: auto 1fr auto;
  overflow-x: clip;
  grid-template-areas:
    'title title'
    'act   stage'
    'lane  lane';
  column-gap: var(--s7);
  padding: 104px var(--gut) var(--s5);
  isolation: isolate;
}
.hero-title { font-family: var(--d);
  grid-area: title;
  font-size: clamp(46px, min(6.4vw, 10.4svh), 96px);
  line-height: 0.93;
  font-weight: 800;
  font-stretch: var(--wide);
  letter-spacing: -0.035em;
  max-width: 15.5em;
}
.hero-title .line { display: block; }

.hero-act {
  grid-area: act;
  align-self: start;
  display: grid; gap: var(--s5); align-content: start;
  padding-top: var(--s6);
  max-width: 540px;
}
.hero-line { font-size: 19px; line-height: 1.4; font-weight: 480; max-width: 26ch; color: var(--ink-2); }

.kit { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s3); }

.field-wrap {
  grid-area: stage;
  position: relative; z-index: 1;
  margin: 0 calc(var(--gut) * -1) 0 0;
  min-height: 0; height: 100%;
  padding: var(--s5) 0 var(--s7);
}
.hero .field { height: 100%; aspect-ratio: auto; }
.field-cap {
  position: absolute; left: 0; bottom: 6px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px;
  font-size: 15px; font-weight: 640; font-stretch: 104%;
}
.field-cue { font-weight: 460; color: var(--ink-2); }

/* the session lane: today's drills, gaps sized by minutes */
.lane {
  grid-area: lane;
  display: flex; align-items: center; gap: var(--s6);
  padding-top: var(--s4);
  border-top: 1px solid var(--joint);
}
.lane-time { display: flex; align-items: center; gap: 2px; flex: none; }
.lane-time button {
  width: 46px; height: 40px; border-radius: var(--r-ctl); border: 0; background: transparent;
  font-weight: 640; font-size: 15px; font-variant-numeric: tabular-nums; cursor: pointer;
  transition: background-color 0.2s var(--out), color 0.2s var(--out);
}
.lane-time button[aria-checked='true'] { background: var(--ink); color: var(--paper); }
@media (hover: hover) { .lane-time button[aria-checked='false']:hover { background: var(--ground-deep); } }
.lane-unit { font-size: 14px; color: var(--ink-2); margin-left: 6px; font-weight: 520; }
.lane-track { list-style: none; margin: 0 12px 0 0; padding: 0 0 0 12px; display: flex; flex: 1; min-width: 0; position: relative; }
.lane-track::after { /* closing cone */
  content: ''; position: absolute; right: -9px; top: 13px; width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle, var(--ground) 0 3px, var(--cone-top) 3.5px 6.5px, var(--cone) 7px);
}
.lane { position: relative; }
.lane-ball { position: absolute; left: 0; top: 0; width: 26px; height: 26px; pointer-events: none; opacity: 0; z-index: 2; }
.lane-seg { position: relative; min-width: 0; padding: 0 12px 0 22px; }
.lane-seg::before { /* cone at the start of each drill */
  content: ''; position: absolute; left: -9px; top: 13px; width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle, var(--ground) 0 3px, var(--cone-top) 3.5px 6.5px, var(--cone) 7px);
}
.lane-seg::after { /* painted line between cones */
  content: ''; position: absolute; left: 12px; right: 3px; top: 21px; height: 2px; background: var(--ink); opacity: 0.18;
}
.lane-seg.is-focus::after { opacity: 1; }
.lane-name { display: block; font-size: 14px; font-weight: 620; overflow: hidden; }
.lane-name .nm { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane-min { display: block; margin-top: 18px; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; font-weight: 520; }

/* ---------- run (pinned session) ---------- */
.run { position: relative; border-top: 1px solid var(--joint); }
.run-pin {
  min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s8);
  align-items: center;
  padding: var(--s8) var(--gut) var(--s8) 0;
}
.run h2, .adapt h2, .lib h2 { font-family: var(--d);
  font-size: clamp(34px, 4.3vw, 62px); line-height: 0.98; font-weight: 790; font-stretch: var(--wide); letter-spacing: -0.03em;
  max-width: 12em;
}
.run-steps { list-style: none; margin: var(--s6) 0 0; padding: 0; display: grid; gap: var(--s5); max-width: 30ch; counter-reset: s; }
.run-steps li { color: var(--ink-3); font-size: 17px; line-height: 1.45; transition: color 0.3s var(--out); }
.run-steps li b { display: block; color: inherit; font-weight: 680; font-size: 19px; }
.run-steps li.is-on { color: var(--ink); }
.run-stage { position: relative; height: min(76svh, 720px); }
.field-run { width: 100%; height: 100%; aspect-ratio: auto; }
.phone {
  position: absolute; right: 7%; top: 50%; translate: 0 -50%; rotate: -7deg;
  width: clamp(180px, 15vw, 224px); aspect-ratio: 9 / 18.5;
  background: var(--ink); border-radius: 34px; padding: 9px;
}
.phone-screen {
  height: 100%; border-radius: 26px; background: var(--paper);
  display: flex; flex-direction: column; justify-content: center; padding: 22px 16px; gap: 6px;
}
.ph-count { font-size: 12px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ph-name { font-family: var(--d); font-size: 19px; line-height: 1.3; font-weight: 760; font-stretch: 104%; }
.ph-time { font-family: var(--d); font-size: clamp(40px, 3.8vw, 56px); line-height: 1; font-weight: 800; font-stretch: 104%; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: 14px; }
.ph-cue { font-size: 14px; line-height: 1.32; font-weight: 540; min-height: 2.64em; }
.ph-bar { height: 4px; margin-top: 8px; }
.ph-bar i { display: block; height: 100%; width: 100%; background: var(--ink); border-radius: 2px; transform-origin: left center; }
.ph-next { font-size: 12px; color: var(--ink-2); margin-top: 8px; font-weight: 540; }

/* ---------- adapt ---------- */
.adapt { padding: var(--s9) var(--gut) var(--s8); border-top: 1px solid var(--joint); }
.adapt-line { margin-top: var(--s4); font-size: 19px; color: var(--ink-2); max-width: 34ch; }
.adapt-board {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, auto) minmax(0, 1fr); gap: var(--s6);
  align-items: start; margin-top: var(--s7);
}
.adapt-ask { align-self: center; }
.adapt-day { margin: 0; }
.adapt-day .field { border-radius: 0; }
.adapt-day figcaption { font-size: 15px; font-weight: 680; font-stretch: 104%; margin-bottom: var(--s3); }
.adapt-ask { display: grid; justify-items: center; gap: var(--s4); text-align: center; }
.adapt-q { font-family: var(--d); font-size: clamp(20px, 1.8vw, 26px); font-weight: 720; font-stretch: 106%; max-width: 15ch; line-height: 1.15; }
.adapt-btns { display: grid; gap: var(--s2); width: 100%; }
.adapt-btns .chip { width: 100%; }
.adapt-change { font-size: 17px; font-weight: 600; margin-top: var(--s3); min-height: 1.5em; }

/* ---------- library strip ---------- */
.lib { padding: var(--s9) 0 var(--s9); border-top: 1px solid var(--joint); overflow: hidden; }
.lib h2 { padding: 0 var(--gut); }
.lib-viewport { margin-top: var(--s6); cursor: grab; touch-action: pan-y; }
.lib-viewport:active { cursor: grabbing; }
.lib-track {
  list-style: none; margin: 0 var(--gut); padding: 0; display: flex; align-items: stretch; width: max-content;
  background-color: var(--slab);
  /* the driveway's expansion joints, every 360px, as hard-edged lines */
  background-image: linear-gradient(var(--slab-joint) 0 3px, transparent 3px), linear-gradient(90deg, var(--slab-joint) 0 3px, transparent 3px);
  background-size: 360px 360px; background-position: 95px 190px;
}
.lib-card { flex: none; position: relative; display: flex; flex-direction: column; justify-content: flex-start; padding: 92px var(--s4) var(--s5); user-select: none; }
.lib-card .field { pointer-events: none; aspect-ratio: auto; margin: 0 auto; }
.lib-link { position: absolute; inset: 0; border-radius: 2px; -webkit-user-drag: none; }
.lib-link:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }
.lib-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s3) var(--s5); padding: 0 var(--gut); }
.lib-head h2 { padding: 0; }
.lib-all { flex: none; font-weight: 640; font-size: 16px; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.lib-all .ic { width: 15px; height: 15px; transition: transform 0.25s var(--out); }
@media (hover: hover) { .lib-all:hover .ic { transform: translateX(3px); } .lib-all:hover { text-decoration: underline; text-underline-offset: 0.25em; } }
.lib-card .f-cone-hole { fill: var(--slab); }
.lib-tag { position: absolute; left: var(--s4); top: var(--s5); display: flex; flex-direction: column; gap: 1px; white-space: nowrap; }
.lib-name { font-family: var(--d); font-size: 17px; font-weight: 740; font-stretch: 104%; line-height: 1.3; }
.lib-meta { font-size: 13px; color: var(--ink-2); font-weight: 560; }


/* ---------- responsive ---------- */
@media (max-width: 1320px) and (min-width: 1024px) {
  .kit-item { height: 42px; padding: 0 12px 0 4px; font-size: 14px; gap: 6px; }
  .kit-item .kit-glyph { width: 28px; height: 28px; }
}
@media (max-width: 1023px) {
  .hero {
    display: flex; flex-direction: column; gap: var(--s4);
    padding-top: 92px; height: auto;
  }
  .hero-act { display: contents; }
  .hero-title { order: 0; }
  .hero-line { order: 1; }
  .run-pin { grid-template-columns: 1fr; padding: var(--s8) var(--gut); gap: var(--s5); }
  .run-stage { order: 2; height: auto; margin: 0 calc(var(--gut) * -1); }
  .field-run { height: auto; aspect-ratio: 1000 / 760; }
  .field-wrap { order: 2; margin: 0 calc(var(--gut) * -1); height: auto; padding: 0 0 var(--s2); }
  .kit { order: 3; margin-top: 0; }
  .lane { order: 4; }
  .hero .signup { order: 1; max-width: none; margin-bottom: var(--s3); }
  .hero .field { height: auto; aspect-ratio: 1000 / 640; }
}
@media (max-width: 699px) {
  .hero .field, .field-run { overflow: hidden; }
  .hero .field-wrap { margin: 0; }
  .hero .field-cap { padding: 0; }
}
@media (max-width: 1023px) {
  .kit-item { height: 44px; padding: 0 14px 0 4px; font-size: 14px; }
  .kit-item .kit-glyph { width: 30px; height: 30px; }
  .field-cap { position: static; padding: 0 var(--gut); margin-top: var(--s2); }
  .lane { flex-direction: column; align-items: stretch; gap: var(--s4); }
  .lane-track { flex-direction: column; padding: 0 0 0 9px; }
  .lane-track::after { display: none; }
  .lane-seg { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0 10px 26px; flex: none !important; }
  .lane-seg::before { top: 50%; transform: translateY(-50%); }
  .lane-seg::after { left: -1px; right: auto; top: 50%; width: 2px; height: 100%; }
  .lane-min { margin-top: 0; }
  .adapt-board { grid-template-columns: 1fr; margin-top: var(--s7); gap: var(--s5); }
  .adapt-ask { order: 3; justify-items: start; text-align: left; }
  .adapt-btns { display: flex; flex-wrap: wrap; width: auto; }
  .adapt-btns .chip { width: auto; }
  .adapt-day:last-child { order: 4; }
  .phone { right: 5%; width: clamp(128px, 30vw, 190px); border-radius: 26px; padding: 7px; }
  .phone-screen { border-radius: 20px; padding: 14px 11px; }
  .ph-name { font-size: 15px; }
  .ph-time { font-size: 34px; margin-top: 8px; }
  .ph-cue { font-size: 12px; }
}
@media (max-width: 560px) {
  .hero-title { font-size: clamp(38px, 11.4vw, 54px); font-stretch: 108%; }
  .hero-line { font-size: 17px; }
  .adapt, .lib { padding-top: var(--s9); padding-bottom: var(--s9); }
}
