/* Earn first (home and /earn/): the earn hero with payments landing, the fields drifting past, what you could earn.
   Built by src/earnings.js, moved by assets/js/earnings.js. Light product cards on a colour field, like moments.css. */

/* ---------- the earn hero ---------- */
.eh { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 10fr); gap: 72px; align-items: center; padding: 48px 0 88px; }
.eh__text { display: flex; flex-direction: column; align-items: flex-start; gap: 26px; }
.eh h1 { font-size: clamp(48px, 5.2vw, 76px); font-weight: 500; letter-spacing: -0.022em; line-height: 0.98; max-width: 640px; }
.eh__lead { color: var(--text-2); font-size: 20px; line-height: 1.5; max-width: 520px; }
.eh .claim-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; width: 100%; margin-top: 4px; }
.eh .claim { width: min(540px, 100%); }
.eh__trust { display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--text-2); font-size: 14.5px; font-weight: 500; }
.eh__trust span { display: inline-flex; align-items: center; gap: 8px; }

/* the whole picture fits the first screen on laptops, with room under it */
.eh-art { --spring: cubic-bezier(.3, 1.35, .45, 1); width: 100%; max-width: 620px; justify-self: end; max-height: max(500px, calc(100svh - var(--header, 72px) - 76px)); }
.eh-stage { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 6% 8% calc(6% + 22px); }
.eh-feed, .eh-pagewrap { width: 100%; max-width: 344px; flex-shrink: 0; }

/* payments land in front and the older ones tuck in behind, like notifications on a phone */
.eh-feed { --h: 64px; --peek: 9px; position: relative; height: calc(var(--h) + var(--peek) * 2); }
.eh-toast { --k: 0; position: absolute; inset: 0 0 auto; height: var(--h); display: flex; align-items: center; gap: 11px; padding: 0 16px 0 13px; border-radius: var(--r-pop); background: #fff; color: #111; font-size: 13px; line-height: 1.35; box-shadow: 0 1px 2px rgba(80, 40, 0, .06), 0 14px 32px rgba(80, 40, 0, .16); transform-origin: 50% 100%; transform: translateY(calc(var(--k) * var(--peek))) scale(calc(1 - var(--k) * .055)); z-index: calc(10 - var(--k)); transition: transform .9s var(--spring), opacity .25s ease; }
/* the ones behind show only their edge, a shade deeper, so the stack reads as paper, never as faded text */
.eh-toast::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: #5A2E00; opacity: calc(var(--k) * .05); pointer-events: none; transition: opacity .5s ease; }
.eh-toast > * { transition: opacity .18s ease; }
.eh-toast.is-back > * { opacity: 0; }
/* the old words clear first, then the new payment drops in, so two lines never sit on top of each other */
.eh-toast:first-child { transition-delay: .16s; }
.eh-toast.is-new { opacity: 0; transform: translateY(-22px) scale(.96); transition: none; }
.eh-toast.is-out { opacity: 0; }
.eh-toast__w { min-width: 0; }
.eh-toast__w > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eh-toast .mini__t { font-size: 13.5px; }
.eh-toast__n { margin-left: auto; padding-left: 10px; color: #0F8A4B; font-weight: 500; font-size: 14.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* the creator's page: the name follows what is typed in the link box */
.eh-av { position: relative; }
.eh-av b { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 18px; font-weight: 500; opacity: 0; transition: opacity .3s ease; }
.eh-av img { transition: opacity .3s ease; }
.eh-av.has-name img { opacity: 0; }
.eh-av.has-name b { opacity: 1; }
.eh-page.mini__card--lg { max-width: none; padding-bottom: 36px; }
/* prices sit in one even column, and the one that just sold lights up */
.eh-page .mini__btn { min-width: 76px; text-align: center; font-variant-numeric: tabular-nums; transition: transform .6s var(--spring), box-shadow .6s ease; }
.eh-page .is-hit .mini__btn { transform: scale(1.07); box-shadow: 0 0 0 5px rgba(43, 89, 255, .16); transition-duration: .35s; }

/* this month's total rests on the page's bottom edge */
.eh-pagewrap { position: relative; }
.eh-total { position: absolute; left: 0; right: 0; bottom: 0; width: max-content; margin: 0 auto; translate: 0 50%; display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: var(--r-pill); background: #111; color: #fff; font-size: 13.5px; font-weight: 500; box-shadow: 0 10px 28px rgba(60, 30, 0, .22); transition: transform .5s var(--spring); }
.eh-total span { color: #BDBDBD; }
.eh-total__n { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.eh-total.is-bump { transform: scale(1.06); }

/* the pieces arrive after the picture opens */
.js .eh-art .eh-feed, .js .eh-art .eh-total { opacity: 0; transform: translateY(12px); transition: opacity .7s var(--ease), transform .9s var(--ease); }
.js .eh-art.is-in .eh-feed { opacity: 1; transform: none; transition-delay: .55s; }
.js .eh-art.is-in .eh-total { opacity: 1; transform: none; transition-delay: .85s; }
.js .eh-art.is-in .eh-total.is-bump { transform: scale(1.06); transition-delay: 0s; }

/* ---------- every field, drifting past ---------- */
.eh-fields__t { text-align: center; color: var(--text-3); font-size: 15px; font-weight: 500; margin-bottom: 22px; padding: 0 var(--gutter); text-wrap: balance; }
.eh-fields__t .link { color: var(--text); }
.eh-fields { overflow: hidden; padding: 6px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.eh-fields__track { display: flex; width: max-content; animation: eh-drift 90s linear infinite; }
.eh-fields:hover .eh-fields__track, .eh-fields:focus-within .eh-fields__track { animation-play-state: paused; }
.eh-fields__set { display: flex; gap: 10px; padding-right: 10px; }
.eh-field { display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 20px 0 16px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); font-size: 15px; font-weight: 500; white-space: nowrap; transition: background-color var(--t-fast) ease, color var(--t-fast) ease, box-shadow var(--t-fast) ease; }
.eh-field svg { color: var(--text-3); transition: color var(--t-fast) ease; }
.eh-field:hover, .eh-field:focus-visible { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px #4A4A4A; }
.eh-field:hover svg, .eh-field:focus-visible svg { color: var(--text); }
@keyframes eh-drift { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .eh-fields { overflow-x: auto; scrollbar-width: none; }
  .eh-fields__track { animation: none; }
  .eh-fields__set[aria-hidden] { display: none; }
}

/* ---------- what could you earn ---------- */
.calc { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; }
.calc__controls { background: var(--surface); border-radius: var(--r-image); padding: 40px 36px; display: flex; flex-direction: column; justify-content: center; gap: 38px; }
.calc__label { color: var(--text-2); font-size: 15px; font-weight: 500; }
.calc__group { display: flex; flex-direction: column; container-type: inline-size; }
.calc__kinds { display: flex; flex-wrap: wrap; gap: 8px 6px; margin-top: 14px; }
.calc__kinds .chip { height: 38px; padding: 0 13px; }
/* one row when all five fit, otherwise an even three and two, never one left on its own */
.calc__br { display: none; flex-basis: 100%; height: 0; }
@container (max-width: 444px) { .calc__br { display: block; } }
.calc__row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.calc__out { font-size: 24px; font-weight: 500; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; }
.calc__ends { display: flex; justify-content: space-between; margin-top: 4px; color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; }

/* the sliders: a thin line, white up to the value, one white knob */
.calc__range { --p: 50%; -webkit-appearance: none; appearance: none; width: 100%; height: 30px; margin: 10px 0 0; background: transparent; cursor: pointer; touch-action: pan-y; }
.calc__range:focus { outline: none; }
.calc__range::-webkit-slider-runnable-track { height: 4px; border-radius: var(--r-pill); background: linear-gradient(90deg, #fff var(--p), #3A3A3A var(--p)); }
.calc__range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 6px rgba(255, 255, 255, .08); transition: box-shadow var(--t-fast) ease, transform var(--t-fast) var(--ease); }
.calc__range:active::-webkit-slider-thumb { box-shadow: 0 0 0 10px rgba(255, 255, 255, .12); transform: scale(1.05); }
.calc__range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px #fff; }
.calc__range::-moz-range-track { height: 4px; border-radius: var(--r-pill); background: #3A3A3A; }
.calc__range::-moz-range-progress { height: 4px; border-radius: var(--r-pill); background: #fff; }
.calc__range::-moz-range-thumb { width: 24px; height: 24px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 6px rgba(255, 255, 255, .08); }
.calc__range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px #fff; }

/* owner 2026-11-05 ("the text is not visible at all"): the painting no longer sits behind the words. It is a strip
   on top of the card, and the sum is written in white on the card's own dark, like the controls beside it. */
.calc__result { display: flex; flex-direction: column; border-radius: var(--r-image); overflow: hidden; background: var(--surface); }
.calc__pic { position: relative; flex: none; height: clamp(150px, 16.5vw, 236px); overflow: hidden; background: #D3E3FD; }
.calc__pic img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 62% 50%; }
.calc__res { flex: 1; padding: 30px 44px 34px; display: flex; flex-direction: column; color: var(--text); }
.calc__res .calc__label { color: var(--text-2); }
.calc__big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 10px; }
.calc__num { font-size: clamp(56px, 6.2vw, 92px); font-weight: 500; letter-spacing: -0.022em; line-height: 0.95; font-variant-numeric: tabular-nums; }
.calc__per { font-size: 21px; font-weight: 500; color: var(--text-2); }
.calc__dream { margin-top: 14px; font-size: 21px; font-weight: 500; letter-spacing: -0.012em; line-height: 1.3; color: var(--text); transition: opacity .3s ease, transform .5s var(--ease); }
.calc__dream.is-swap { opacity: 0; transform: translateY(6px); }
.calc__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: auto; padding-top: 26px; }
.calc__facts > div { display: flex; flex-direction: column; gap: 4px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .12); }
.calc__facts span { color: var(--text-3); font-size: 14px; font-weight: 500; }
.calc__facts b { color: var(--text); font-size: 18px; font-weight: 500; letter-spacing: -0.005em; font-variant-numeric: tabular-nums; }
.calc__end { display: flex; align-items: center; gap: 22px; margin-top: 26px; }
.calc__go { flex: none; }
.calc__go:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.calc__note { max-width: 400px; color: var(--text-3); font-size: 13.5px; line-height: 1.5; }

/* on tall laptop screens the picture is big, so the page in it grows with it */
@media (min-width: 1181px) and (min-height: 820px) { .eh-feed, .eh-pagewrap { zoom: 1.14; } }
@media (max-width: 1180px) { .eh { gap: 48px; } .calc__res { padding: 28px 34px 30px; } }
@media (max-width: 900px) {
  .eh { grid-template-columns: minmax(0, 1fr); gap: 40px; padding: 28px 0 56px; }
  .eh h1 { font-size: 50px; letter-spacing: -0.022em; }
  .eh__lead { font-size: 18px; }
  .eh__trust { gap: 8px 18px; font-size: 14px; }
  .eh-art { max-width: none; justify-self: stretch; aspect-ratio: 7 / 9; max-height: none; }
  .eh-stage { padding: 7% 7% calc(7% + 22px); gap: 14px; }
  .eh-feed { --h: 60px; --peek: 8px; }
  .eh-field { height: 42px; font-size: 14px; padding: 0 16px 0 13px; }
  .calc { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .calc__controls { padding: 28px 22px 30px; gap: 32px; }
  .calc__res { padding: 26px 24px 28px; }
  .calc__pic { height: clamp(150px, 30vw, 220px); }
  .calc__num { font-size: 58px; }
  .calc__per { font-size: 18px; }
  .calc__dream { font-size: 19px; }
  .calc__facts { padding-top: 26px; gap: 14px; }
  .calc__facts b { font-size: 16px; }
}
@media (min-width: 600px) and (max-width: 900px) { .eh-art { aspect-ratio: 4 / 3; } .eh-feed { --h: 64px; --peek: 9px; } }
/* phones: the headline sized to the screen, and the page in the picture given room so nothing wraps */
@media (max-width: 640px) {
  .eh { gap: 36px; }
  .eh__text { gap: 22px; }
  .eh h1 { font-size: clamp(40px, 12.4vw, 50px); letter-spacing: -0.022em; line-height: 1.02; }
  .eh__lead { font-size: 17px; }
  .eh-stage { padding: 6% 5% calc(6% + 22px); }
  .eh-page.mini__card--lg { padding: 18px 16px 34px; gap: 11px; }
  .eh-page .mini__btn { min-width: 66px; padding: 7px 12px; }
  .eh-toast { padding: 0 14px 0 12px; gap: 10px; }
  .calc__controls { padding: 26px 18px 28px; gap: 30px; }
  .calc__kinds .chip { height: 36px; padding: 0 12px; font-size: 13.5px; }
  .calc__res { padding: 24px 20px 26px; }
  .calc__pic { height: 150px; }
  .calc__num { font-size: clamp(44px, 14vw, 58px); }
  /* the two sums as two clear lines: what it is on the left, the amount on the right */
  .calc__facts { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 28px; }
  .calc__facts > div { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; }
  .calc__facts > div:last-child { border-bottom: 1px solid rgba(255, 255, 255, .12); }
  .calc__facts b { text-align: right; }
  .calc__end { flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 24px; }
}
@media (max-width: 340px) { .eh-toast .mini__ic, .eh-page .mini__row .mini__ic { display: none; } }
