/* WHY SHORT VIDEO: one adaptation, a video a day.
   A dark band: the library an adaptation leaves behind, a year of daily videos drawn as a calendar
   (one square a day, coloured by kind of video), and what each of the four feeds is for. No pictures. */

.why { background: var(--ink); color: var(--paper); --c-ep: #d95926; --c-mo: #3987e5; --c-pg: #c98500; --c-rc: #9085e9; --c-re: #199e70; }
.why .eyebrow { color: var(--sand); }
.why h2 { max-width: 16ch; }
.why .lead { color: #c9cfdd; }
.why h3 { font-size: clamp(24px, 2.6vw, 30px); }

.why__lib { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 72px); align-items: start; margin-top: 64px; padding-top: 48px; border-top: 1px solid rgba(247, 241, 230, .18); }
.why__lib-text p { margin-top: 14px; color: #c9cfdd; max-width: 48ch; }
.why__assets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; border-top: 2px solid var(--sand); }
.why__assets li { padding: 15px 0 16px; border-bottom: 1px solid rgba(247, 241, 230, .18); }
.why__assets b { display: block; font: 600 19px/1.2 var(--serif); letter-spacing: -.01em; }
.why__assets span { display: block; margin-top: 4px; font-size: 14.5px; line-height: 1.4; color: #aab2c6; }

/* ---- the year ---- */
.year { margin: 64px 0 0; padding: clamp(20px, 3vw, 36px); border-radius: 20px; background: #0f1830; border: 1px solid rgba(247, 241, 230, .12); }
.year__head { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 24px clamp(24px, 4vw, 56px); align-items: end; }
.year__big { font: 500 clamp(22px, 2.4vw, 30px)/1 var(--serif); color: var(--paper); }
.year__big b { display: block; font: 500 clamp(72px, 10vw, 136px)/.86 var(--serif); letter-spacing: -.04em; color: var(--sand); font-variant-numeric: tabular-nums; }
.year figcaption { margin-top: 14px; font-size: 14.5px; line-height: 1.45; color: #aab2c6; max-width: 46ch; }
.year__legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 20px; }
.year__legend button { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; align-items: start; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background .15s; }
.year__legend button:hover, .year__legend li.is-on button { background: rgba(247, 241, 230, .08); }
.year__legend i { width: 14px; height: 14px; margin-top: 3px; border-radius: 4px; background: var(--c); }
.year__legend b { display: block; font: 600 15px/1.25 var(--sans); }
.year__legend small { display: block; font-size: 13px; line-height: 1.35; color: #aab2c6; }
.year__legend em { font: 500 17px/1.2 var(--serif); font-style: normal; color: var(--paper); font-variant-numeric: tabular-nums; }
[data-t="ep"] { --c: var(--c-ep); }
[data-t="mo"] { --c: var(--c-mo); }
[data-t="pg"] { --c: var(--c-pg); }
[data-t="rc"] { --c: var(--c-rc); }
[data-t="re"] { --c: var(--c-re); }
.year__ring i { background: none; box-shadow: inset 0 0 0 2.5px #fff; }

.year__legend li { transition: opacity .25s; }
.year__legend li.is-zero { opacity: .38; }

.year__pace { margin-top: 30px; padding-top: 24px; border-top: 1px solid rgba(247, 241, 230, .12); }
.year__pace label { display: flex; justify-content: space-between; gap: 12px; font: 600 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #c9cfdd; }
.year__pace label span { color: #8b94aa; }
.year__pace input { --k: 0; -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 28px; margin: 12px 0 0; background: none; cursor: pointer; }
.year__pace input::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--sand) calc(14px + (100% - 28px) * var(--k)), rgba(247, 241, 230, .2) 0); }
.year__pace input::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--sand) calc(14px + (100% - 28px) * var(--k)), rgba(247, 241, 230, .2) 0); }
.year__pace input::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11px; border-radius: 50%; background: var(--sand); border: 4px solid #0f1830; box-shadow: 0 0 0 2px var(--sand); }
.year__pace input::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--sand); border: 4px solid #0f1830; box-shadow: 0 0 0 2px var(--sand); }
.year__pace input:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 8px; }
.year__ticks { display: flex; justify-content: space-between; margin-top: 6px; }
.year__ticks button { width: 28px; padding: 0; border: 0; background: none; color: #8b94aa; font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; white-space: nowrap; transition: color .15s; }
.year__ticks b { font: 500 18px/1.2 var(--serif); font-variant-numeric: tabular-nums; }
.year__ticks small { font: 600 11px/1.3 var(--sans); letter-spacing: .04em; }
.year__ticks button:hover, .year__ticks button.is-on { color: var(--paper); }
.year__ticks button:first-child { align-items: flex-start; }
.year__ticks button:last-child { align-items: flex-end; }

.year__grid { display: grid; grid-template-columns: 34px repeat(31, minmax(0, 1fr)); gap: 3px; margin-top: 26px; }
.year__m { font: 600 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #8b94aa; align-self: center; }
.day { position: relative; aspect-ratio: 1; border-radius: 22%; background: var(--c); opacity: 0; transform: scale(.3); transition: filter .2s, background-color .3s calc(var(--n) * 1.1ms); }
.day--off { background: rgba(247, 241, 230, .07); }
.day--off:hover::before { display: none; }
.year.is-in .day { animation: day-in .34s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--n) * 4.5ms); }
@keyframes day-in { to { opacity: 1; transform: none; } }
.day--date::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px #fff; }
.year[data-show] .day:not(.is-show) { filter: saturate(.15) brightness(.5); }
.day:hover::before, .day:focus-visible::before { content: attr(data-tip); position: absolute; z-index: 5; left: 50%; bottom: calc(100% + 8px); translate: -50% 0; padding: 7px 10px; border-radius: 8px; background: var(--paper); color: var(--ink); font: 600 12px/1.25 var(--sans); white-space: nowrap; pointer-events: none; box-shadow: 0 8px 20px -8px #000; }
.day:nth-child(32n + 2):hover::before, .day:nth-child(32n + 3):hover::before, .day:nth-child(32n + 4):hover::before, .day:nth-child(32n + 5):hover::before { left: 0; translate: 0 0; }
.day:nth-child(32n + 29):hover::before, .day:nth-child(32n + 30):hover::before, .day:nth-child(32n + 31):hover::before, .day:nth-child(32n):hover::before, .day:nth-child(32n + 1):hover::before { left: auto; right: 0; translate: 0 0; }

/* ---- the four feeds ---- */
.feeds { margin-top: 64px; }
.feeds__row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.feeds__row li { display: flex; align-items: center; gap: 14px; padding: 20px 22px; border-radius: 16px; background: rgba(247, 241, 230, .06); border: 1px solid rgba(247, 241, 230, .14); }
.feed__logo { flex: none; width: 44px; height: 44px; }
.feeds__row span { font: 600 clamp(17px, 1.6vw, 20px)/1.15 var(--sans); letter-spacing: -.01em; }
.why__close { font: italic 400 clamp(19px, 2vw, 23px)/1.45 var(--serif); margin-top: 40px; max-width: 36em; color: #e9e3d6; }

[data-why-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
[data-why-reveal].is-in { opacity: 1; transform: none; }

@media (max-width: 1000px) {
  .why__lib, .year__head { grid-template-columns: minmax(0, 1fr); }
  .feeds__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .why__assets, .year__legend { grid-template-columns: minmax(0, 1fr); }
  .feeds__row li { padding: 14px; gap: 10px; }
  .feed__logo { width: 34px; height: 34px; }
  .feeds__row span { font-size: 15px; }
  .year { padding: 18px 12px; border-radius: 16px; }
  .year__grid { grid-template-columns: 22px repeat(31, minmax(0, 1fr)); gap: 1.5px; }
  .year__m { font-size: 8px; letter-spacing: 0; }
  .year__ticks small, .year__pace label span { display: none; }
  .year__ticks b { font-size: 15px; }
  .day--date::after { box-shadow: inset 0 0 0 1.5px #fff; }
}
@media (prefers-reduced-motion: reduce) {
  .day, [data-why-reveal] { opacity: 1; transform: none; animation: none !important; transition: none; }
}
