/* ============================================================
   EyeUp — mockups: the playable teaser, CSS-drawn diagrams,
   trial miniatures, calibration + leaderboard panels, and
   device frames for the real app captures.
   Everything here is dark-pinned app-world imagery.
   ============================================================ */

/* --- The playable teaser -------------------------------------- */
.teaser {
  max-width: 780px;
  margin: var(--s-8) auto 0;
  padding: 36px 40px 32px;
  box-shadow: var(--shadow-2), inset 0 1px 0 var(--hi);
}

.teaser__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-4);
  margin-bottom: 6px;
}
.teaser__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 22px;
  color: var(--ice);
}
.teaser__tag {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: .12em;
  color: var(--faint);
  white-space: nowrap;
}
.teaser__hint { font-size: 14.5px; color: var(--muted); margin-bottom: var(--s-2); }

/* The board: one line, one judgement. touch-action only here so a
   drag adjusts the mark instead of scrolling the page. */
.teaser__track {
  position: relative;
  height: 150px;
  touch-action: none;
}
.js .teaser__track { cursor: crosshair; }

.teaser__line, .teaser__tick {
  position: absolute;
  background: var(--ice);
}
.teaser__line { left: 0; right: 0; top: 74px; height: 2px; }
.teaser__tick { top: 64px; width: 2px; height: 22px; }
.teaser__tick--l { left: 0; }
.teaser__tick--r { right: 0; }

/* guess + truth markers: zero-width columns positioned by `left` */
.teaser__mark {
  position: absolute;
  top: 38px;
  bottom: 18px;
  width: 0;
  pointer-events: none;
}
.teaser__mark .hairline--guess,
.teaser__mark .hairline--true { top: 0; bottom: 0; left: -.5px; }
.teaser__ring {
  position: absolute;
  top: 30px;
  left: -7px;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  background: rgba(11, 12, 16, .8);
}
.teaser__cross {
  position: absolute;
  top: 30px;
  left: -9px;
  width: 18px;
  height: 18px;
}
.teaser__cross::before, .teaser__cross::after {
  content: "";
  position: absolute;
  background: var(--ice);
}
.teaser__cross::before { top: 8px; left: 0; right: 0; height: 1.5px; }
.teaser__cross::after { left: 8px; top: 0; bottom: 0; width: 1.5px; }

.teaser__mark-label {
  position: absolute;
  top: -20px;
  left: -24px;
  width: 48px;
  text-align: center;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--accent);
}
.teaser__mark--true .teaser__mark-label { top: -36px; left: -28px; width: 56px; color: var(--muted); }

.teaser__conn { top: 104px; }
.teaser__err {
  position: absolute;
  top: 122px;
  padding-top: 6px;
  pointer-events: none;
}

/* footer row */
.teaser__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding-top: 20px;
  min-height: 68px;
}
.teaser__note { font-size: 13.5px; color: var(--faint); }
.teaser__lock { white-space: nowrap; }
.teaser__lock[aria-disabled="true"] { opacity: .4; cursor: default; }
.teaser__lock[aria-disabled="true"]:hover { transform: none; box-shadow: var(--glow); }

.teaser__result { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.teaser__score {
  font-family: var(--display);
  font-weight: 700;
  font-size: 30px;
  color: var(--mint);
  font-variant-numeric: tabular-nums;
}
.teaser__verdict { font-size: 15px; color: var(--muted); }
.teaser__actions { display: flex; align-items: center; gap: 18px; }
.teaser__again {
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  font-family: var(--sans);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.teaser__again:hover { color: var(--text); }

/* State machine.
   Default markup (no JS) = the static pre-solved illustration: guess,
   truth, connector and score all visible, interactive controls hidden.
   With .js, app.js drives data-state = idle | aimed | locked. */
.teaser__aiming { display: none; align-items: center; justify-content: space-between; gap: var(--s-4); width: 100%; }
.teaser__done { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); width: 100%; flex-wrap: wrap; }
.teaser--static .teaser__guess { left: 53.1%; }
.teaser--static .teaser__conn { left: 50%; width: 3.1%; }
.teaser--static .teaser__err { left: 50%; }
.teaser--static .teaser__again { display: none; }

.js .teaser[data-state="idle"] .teaser__guess,
.js .teaser[data-state="idle"] .teaser__truth,
.js .teaser[data-state="idle"] .teaser__conn,
.js .teaser[data-state="idle"] .teaser__err,
.js .teaser[data-state="aimed"] .teaser__truth,
.js .teaser[data-state="aimed"] .teaser__conn,
.js .teaser[data-state="aimed"] .teaser__err { display: none; }
.js .teaser[data-state="idle"] .teaser__done,
.js .teaser[data-state="aimed"] .teaser__done { display: none; }
.js .teaser[data-state="idle"] .teaser__aiming,
.js .teaser[data-state="aimed"] .teaser__aiming { display: flex; }
.js .teaser[data-state="locked"] .teaser__aiming { display: none; }
.js .teaser .teaser__again { display: inline; }

/* --- How-it-works diagrams (height 64, aria-hidden) ------------ */
.diagram { position: relative; height: 64px; margin-bottom: 18px; }
.diagram i { position: absolute; display: block; }

.diagram__line { left: 8px; right: 8px; top: 31px; height: 2px; background: var(--ice); }
.diagram__tick { top: 23px; width: 2px; height: 18px; background: var(--ice); }
.diagram__tick--l { left: 8px; }
.diagram__tick--r { right: 8px; }

.diagram--lock .diagram__guess {
  left: 44%; top: 10px; bottom: 10px; width: 1px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(232, 79, 176, .7);
}
.diagram--lock .diagram__ring {
  left: 44%; top: 25px; margin-left: -6px;
  width: 12px; height: 12px;
  border: 1.5px solid var(--accent); border-radius: 50%;
  background: var(--bg);
}

.diagram--reveal .diagram__guess { left: 44%; top: 10px; bottom: 10px; width: 1px; background: var(--accent); }
.diagram--reveal .diagram__true { left: 52%; top: 10px; bottom: 10px; width: 1px; background: var(--ice); }
.diagram--reveal .diagram__conn { left: 44%; top: 48px; width: 8%; border-top: 1.5px dashed var(--accent); }
.diagram--reveal .diagram__err {
  left: 56%; top: 41px;
  font-family: var(--display); font-weight: 600;
  font-size: 11.5px; color: var(--accent);
  font-style: normal;
}

/* --- Trial miniatures (height 90, aria-hidden) ----------------- */
.mini { position: relative; height: 90px; margin-bottom: var(--s-4); }
.mini i { position: absolute; display: block; }

.mini--midpoint .mini__line { left: 6px; right: 6px; top: 44px; height: 2px; background: var(--ice); }
.mini--midpoint .mini__guess { left: 50%; top: 28px; height: 34px; width: 1px; background: var(--accent); }

.mini--centre .mini__circle {
  left: 50%; top: 45px; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border: 2px solid var(--ice); border-radius: 50%;
}
.mini--centre .mini__dot {
  left: 50%; top: 45px; width: 6px; height: 6px; margin: -3px 0 0 -3px;
  background: var(--accent); border-radius: 50%;
  box-shadow: 0 0 8px rgba(232, 79, 176, .8);
}

.mini--bisect .mini__ray { left: 22px; top: 66px; width: 64px; height: 2px; background: var(--ice); transform-origin: 0 50%; }
.mini--bisect .mini__ray--up { transform: rotate(-64deg); }
.mini--bisect .mini__split { left: 22px; top: 66px; width: 60px; height: 0; border-top: 1.5px dashed var(--accent); transform-origin: 0 50%; transform: rotate(-32deg); }

.mini--right .mini__base { left: 24px; top: 70px; width: 60px; height: 2px; background: var(--ice); }
.mini--right .mini__arm {
  left: 24px; top: 70px; width: 56px; height: 2px;
  background: var(--accent); transform-origin: 0 50%; transform: rotate(-87deg);
  box-shadow: 0 0 8px rgba(232, 79, 176, .5);
}
.mini--right .mini__square { left: 30px; top: 56px; width: 10px; height: 10px; border-left: 1.5px solid var(--faint); border-bottom: 1.5px solid var(--faint); }

.mini--length .mini__given { left: 14px; right: 14px; top: 34px; height: 2px; background: var(--ice); }
.mini--length .mini__drawn { left: 14px; top: 58px; width: 58%; height: 2px; background: var(--accent); box-shadow: 0 0 8px rgba(232, 79, 176, .5); }

/* --- Calibration panel ----------------------------------------- */
.calib {
  padding: 30px 32px;
  box-shadow: var(--shadow-2), inset 0 1px 0 var(--hi);
}
.calib__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-4);
  margin-bottom: 22px;
}
.calib__title { font-family: var(--display); font-weight: 600; font-size: 16px; color: var(--ice); }
.calib__total {
  font-family: var(--display); font-weight: 700; font-size: 26px;
  color: var(--mint); font-variant-numeric: tabular-nums;
}
.calib__total small { font-size: 15px; color: var(--faint); font-weight: 600; }

.calib__rows { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.calib__row { display: flex; align-items: center; gap: 14px; }
.calib__skill { width: 118px; flex-shrink: 0; font-size: 13px; color: var(--muted); }
.calib__bar { display: block; flex: 1; height: 6px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .08); overflow: hidden; }
.calib__fill { display: block; height: 100%; border-radius: var(--r-pill); background: var(--accent-grad); }
.calib__fill--97 { width: 97%; }
.calib__fill--95 { width: 95%; }
.calib__fill--98 { width: 98%; }
.calib__fill--93 { width: 93%; }
.calib__val {
  width: 44px; flex-shrink: 0; text-align: right;
  font-family: var(--display); font-size: 13px;
  color: var(--text); font-variant-numeric: tabular-nums;
}

.calib__stats {
  display: flex;
  gap: 22px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding-top: 18px;
}
.stat__num {
  font-family: var(--display); font-weight: 700; font-size: 22px;
  color: var(--ice); font-variant-numeric: tabular-nums;
}
.stat__num--pop { color: var(--mint); }
.stat__label { font-size: 12px; color: var(--faint); }

/* --- Leaderboard panel ------------------------------------------ */
.board {
  padding: 30px 32px;
  box-shadow: var(--shadow-2), inset 0 1px 0 var(--hi);
}
.board__title {
  font-family: var(--display); font-weight: 600; font-size: 16px;
  color: var(--ice); margin-bottom: 18px;
}
.board__rows { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.board__row { display: flex; align-items: center; gap: 14px; }
.board__rank {
  width: 22px; flex-shrink: 0;
  font-family: var(--display); font-weight: 700; font-size: 14px;
  color: var(--muted);
}
.board__row--top .board__rank { color: var(--accent); }
.board__name { flex: 1; font-size: 14.5px; color: var(--text); }
.board__score {
  font-family: var(--display); font-weight: 600; font-size: 14.5px;
  color: var(--ice); font-variant-numeric: tabular-nums;
}
.board__score--you { color: var(--mint); }
.board .chips { justify-content: flex-start; gap: 8px; }
.board .chip { font-size: 12.5px; color: var(--muted); }
.board .chip--ghost { color: var(--faint); }

/* --- Real app captures ------------------------------------------ */
/* Mac captures carry their own window chrome — present them flat. */
.shot {
  border-radius: var(--r-btn);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  background: var(--panel);
}

/* iPhone and iPad captures are bare, so they get a frame. */
.device { background: var(--panel); border: 1px solid rgba(255, 255, 255, .16); box-shadow: var(--shadow-2); }
.device img { display: block; width: 100%; }
.device--pad { border-radius: 18px; padding: 10px; }
.device--pad img { border-radius: 10px; }
.device--phone { border-radius: 22px; padding: 8px; }
.device--phone img { border-radius: 16px; }

.device-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: var(--s-5);
  margin-top: var(--s-7);
  flex-wrap: wrap;
}
.device-col { display: flex; flex-direction: column; }
.device-col--mac { width: min(560px, 92vw); }
.device-col--pad { width: min(280px, 44vw); }
.device-col--phone { width: min(170px, 32vw); }

.device-col__caption {
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  margin-top: var(--s-3);
  text-wrap: balance;
}

@media (max-width: 700px) {
  .device-row { gap: var(--s-4); }
  .device-col--pad { width: min(230px, 48vw); }
  .device-col--phone { width: min(140px, 32vw); }
}

/* --- Teaser on small screens ------------------------------------ */
@media (max-width: 640px) {
  .teaser { padding: 26px 22px 24px; }
  .teaser__title { font-size: 19px; }
  .teaser__foot { flex-wrap: wrap; }
}
