/* Motion studies. Tokens, fonts and the top bar come from site.css. */

.studies main { padding-top: 70px; }
.intro { max-width: 860px; margin: 0 auto; padding: 90px var(--gutter) 40px; }
.intro h1 { font-size: clamp(44px, 6vw, 84px); line-height: 1; letter-spacing: -.025em; margin-bottom: 22px; }
.outro { text-align: center; padding: 60px var(--gutter) 140px; display: flex; flex-direction: column; align-items: center; gap: 24px; }

.study { height: 360vh; position: relative; border-top: 1px solid var(--line); }
.stick {
  position: sticky; top: 0; height: 100vh; padding-top: 64px;
  display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 24px;
  max-width: 1440px; margin: 0 auto; padding-inline: var(--gutter);
}
.copy { align-self: center; }
.copy h2 { font-size: clamp(30px, 2.8vw, 42px); line-height: 1.06; letter-spacing: -.02em; margin-bottom: 16px; }
.copy p { color: var(--muted); font-size: 16.5px; }
.copy .where { margin-top: 16px; color: var(--forest); font-weight: 600; font-size: 15px; }
.stage { position: relative; min-height: 0; overflow: hidden; }
.scene { position: absolute; left: 50%; top: 50%; width: 1000px; height: 560px; transform: translate(-50%, -50%) scale(var(--k, 1)); }
.scrub { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 22px; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.scrub i { display: block; height: 100%; background: var(--forest); transform-origin: left; transform: scaleX(0); }

.scene, .scene * { box-sizing: border-box; }
.scene .abs { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform, opacity; }
.scene svg.full { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.scene use[href^="#i-"] { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.scene .say { font-family: var(--serif); font-size: 30px; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; }
.scene .say-sm { font-size: 15px; color: var(--muted); font-family: var(--sans); letter-spacing: 0; }

/* Study: leaf becomes a season (SVG) */
.leafsvg text { font-family: var(--sans); }
.leafsvg .title { font-family: var(--serif); font-size: 40px; fill: var(--ink); letter-spacing: -.02em; }

/* Study: windows */
.win-row .nm { position: absolute; left: 60px; top: 0; height: 44px; display: flex; align-items: center; font-weight: 600; font-size: 16px; color: var(--ink); white-space: nowrap; }
.win-row .nm small { display: block; font-weight: 400; color: var(--muted); font-size: 13.5px; }
.win-row .seg { position: absolute; height: 14px; top: 15px; border-radius: 4px; }
.win-row .tile { position: absolute; left: 60px; top: -5px; width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; }
.win-row .tile img { width: 44px; height: 44px; }
.win-row .pill { position: absolute; display: grid; place-items: center; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; }
.win-row .add { position: absolute; left: 846px; top: 0; width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--border); display: grid; place-items: center; color: var(--ink); }
.win-row .add svg { width: 22px; height: 22px; }
.win-row .rule { position: absolute; left: 60px; right: 110px; top: 58px; height: 1px; background: var(--line); }
.win-month { font-size: 12.5px; color: var(--muted); }
.today-line { width: 2px; background: var(--ink); border-radius: 1px; }
.today-tag { font-weight: 600; font-size: 13px; }

/* Study: week strip */
.wkb { border-radius: 24px; background: var(--paper); }
.wkb-hi { border-radius: 24px; background: var(--ink); }
.wkb-txt { display: flex; flex-direction: column; align-items: center; padding-top: 11px; width: 84px; }
.wkb-txt small { height: 21px; display: flex; align-items: center; gap: 3px; font: 700 15px/1 var(--sans); letter-spacing: .9px; }
.wkb-txt small svg { width: 15px; height: 15px; }
.wkb-txt big { font: 400 30px/1.2 var(--serif); }
.wkb-txt span { font: 600 16.5px/1 var(--sans); }
.wkb-bar { border-radius: 6px; }
.frostband { background: var(--herb-bg); border-radius: 30px; }

/* Study: square */
.sq { border-radius: 10px; overflow: hidden; }
.sq .fill { position: absolute; left: 0; right: 0; bottom: 0; }
.sq .t { position: absolute; inset: 0; padding: 8px; display: flex; flex-direction: column; justify-content: space-between; }
.sq b { font-weight: 600; font-size: 15px; line-height: 1.15; color: var(--ink); }
.sq span { font-weight: 600; font-size: 13px; }
.sq-open { border-radius: 10px; box-shadow: inset 0 0 0 1.5px var(--border); display: grid; place-items: center; color: var(--muted); }
.sq-open svg { width: 26px; height: 26px; }
.bedcard { border-radius: 34px; background: var(--paper); box-shadow: 0 0 0 1px rgba(47,42,36,.05), 0 24px 50px -30px rgba(47,42,36,.3); }
.prow-big { display: flex; align-items: center; gap: 18px; width: 440px; }
.ring { border-radius: 50%; border: 2px solid var(--veg-ring); }

/* Study: drop */
.wcard { border-radius: 26px; background: var(--paper); box-shadow: 0 0 0 1px rgba(47,42,36,.05), 0 20px 40px -28px rgba(47,42,36,.3); }
.gauge-v { border-radius: 999px; background: var(--sand); overflow: hidden; }
.gauge-v i { position: absolute; left: 0; right: 0; bottom: 0; }
.gauge-v b { position: absolute; width: 5px; height: 5px; border-radius: 50%; border: 1.2px solid rgba(251,248,242,.75); animation: gb 3.2s linear infinite; }
@keyframes gb { from { transform: translateY(0); opacity: 0 } 20% { opacity: 1 } to { transform: translateY(-120px); opacity: 0 } }
.wlab { font-weight: 600; text-align: center; white-space: nowrap; }

/* Study: tasks */
.trow { display: flex; gap: 17px; align-items: flex-start; width: 520px; overflow: hidden; border-bottom: 1px solid var(--line); padding-top: 15px; }
.trow .c { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--cream); }
.trow .c svg { width: 24px; height: 24px; stroke-dasharray: 24; }
.trow b { position: relative; display: inline-block; font-weight: 600; font-size: 20px; line-height: 1.3; }
.trow b i { position: absolute; left: 0; top: 55%; height: 2px; background: var(--muted); }
.trow small { display: block; font-size: 16.5px; color: var(--muted); margin-top: 3px; }
.trow .tag { font-style: normal; font-size: 13px; font-weight: 700; color: var(--veg-fg); background: var(--veg-bg); padding: 2px 8px; border-radius: 9px; margin-left: 8px; vertical-align: 3px; }
.navpill { height: 88px; border-radius: 44px; background: var(--ink); box-shadow: 0 4px 8px -2px rgba(47,42,36,.18), 0 26px 40px -18px rgba(47,42,36,.55); }
.navslot { height: 72px; top: 8px; border-radius: 36px; display: flex; align-items: center; justify-content: center; gap: 11px; font-weight: 600; font-size: 20px; overflow: hidden; white-space: nowrap; }
.navslot svg { width: 30px; height: 30px; flex: none; }
.navbadge { width: 36px; height: 36px; border-radius: 18px; background: var(--badge); color: var(--badge-text); font: 700 17px/36px var(--sans); text-align: center; box-shadow: 0 0 0 4px var(--ink); }

@media (max-width: 960px) {
  .study { height: 320vh; }
  .stick { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); padding-top: 76px; gap: 6px; }
  .copy { align-self: start; }
  .copy h2 { font-size: 26px; margin-bottom: 6px; }
  .copy p { font-size: 14.5px; }
  .copy .where { display: none; }
  .top-links { display: flex; overflow-x: auto; }
  .top-links a { padding: 8px 10px; font-size: 14px; }
}
@media (max-width: 640px) { .top-links { display: none; } }
