c1-ios-prototype-en.html 34 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>huashu-design V2 · c1-ios-prototype · EN</title>
  6. <link rel="preconnect" href="https://fonts.googleapis.com">
  7. <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  8. <link href="https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,300..700;1,8..60,300..700&family=Noto+Serif+SC:wght@300;400;500;600&family=Inter:wght@100;200;300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
  9. <style>
  10. :root {
  11. --bg: #000000;
  12. --ink: #FFFFFF;
  13. --ink-80: rgba(255,255,255,0.82);
  14. --ink-60: rgba(255,255,255,0.58);
  15. --muted: rgba(255,255,255,0.40);
  16. --dim: rgba(255,255,255,0.18);
  17. --hairline: rgba(255,255,255,0.12);
  18. --accent: #D97757;
  19. --accent-deep: #B85D3D;
  20. --cd-bg: #F5F4F0;
  21. --cd-ink: #1A1918;
  22. --cd-dim: #8B867E;
  23. --cd-green: #2D4A3A;
  24. --serif-en: "Source Serif 4", Georgia, serif;
  25. --serif-cn: "Noto Serif SC", "Songti SC", serif;
  26. --sans: "Inter", -apple-system, "PingFang SC", sans-serif;
  27. --mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
  28. }
  29. html, body {
  30. margin: 0; padding: 0;
  31. background: #000;
  32. overflow: hidden;
  33. font-family: var(--sans);
  34. color: var(--ink);
  35. -webkit-font-smoothing: antialiased;
  36. }
  37. * { box-sizing: border-box; }
  38. .stage {
  39. position: fixed;
  40. top: 50%; left: 50%;
  41. width: 1920px; height: 1080px;
  42. transform-origin: center center;
  43. background: var(--bg);
  44. overflow: hidden;
  45. }
  46. /* Film grain */
  47. .stage::after {
  48. content: '';
  49. position: absolute; inset: 0;
  50. background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.4'/></svg>");
  51. opacity: 0.02;
  52. pointer-events: none;
  53. mix-blend-mode: overlay;
  54. z-index: 200;
  55. }
  56. /* Watermark — always on top, adapts in brand reveal (handled by JS) */
  57. .watermark {
  58. position: absolute;
  59. top: 36px; left: 48px;
  60. font-family: var(--mono);
  61. font-size: 13px;
  62. letter-spacing: 0.2em;
  63. color: rgba(255,255,255,0.16);
  64. text-transform: uppercase;
  65. z-index: 400;
  66. pointer-events: none;
  67. transition: color 0.4s;
  68. }
  69. .watermark.on-light { color: rgba(26,25,24,0.22); }
  70. /* ============ Terminal (left) ============ */
  71. .terminal {
  72. position: absolute;
  73. top: 50%;
  74. left: 120px;
  75. transform: translateY(-50%);
  76. width: 620px;
  77. background: rgba(18, 18, 18, 1);
  78. border: 1px solid var(--hairline);
  79. border-radius: 14px;
  80. overflow: hidden;
  81. opacity: 0;
  82. will-change: opacity, transform;
  83. box-shadow:
  84. 0 0 0 1px rgba(255,255,255,0.02),
  85. 0 40px 80px -20px rgba(217,119,87,0.12);
  86. }
  87. .tty-head {
  88. display: flex; align-items: center; gap: 8px;
  89. padding: 14px 18px;
  90. border-bottom: 1px solid var(--hairline);
  91. background: rgba(255,255,255,0.02);
  92. }
  93. .tty-head .d { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,0.1); }
  94. .tty-head .d.r { background: #5a2a2a; }
  95. .tty-head .d.y { background: #5a4a2a; }
  96. .tty-head .d.g { background: #2a5a35; }
  97. .tty-head .title {
  98. margin-left: 14px;
  99. font-family: var(--mono);
  100. font-size: 12px;
  101. color: var(--muted);
  102. letter-spacing: 0.04em;
  103. }
  104. .tty-body {
  105. padding: 32px 28px;
  106. font-family: var(--mono);
  107. font-size: 20px;
  108. line-height: 1.7;
  109. color: rgba(255,255,255,0.88);
  110. min-height: 220px;
  111. }
  112. .prompt { color: var(--accent); margin-right: 10px; }
  113. .comment { color: var(--ink-60); font-size: 16px; margin-bottom: 10px; }
  114. .typed { white-space: pre; }
  115. .cursor {
  116. display: inline-block;
  117. width: 10px; height: 24px;
  118. background: var(--accent);
  119. vertical-align: -4px;
  120. margin-left: 2px;
  121. animation: blink 1s steps(2) infinite;
  122. }
  123. @keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
  124. /* Arrow connector terminal → iPhone */
  125. .connector {
  126. position: absolute;
  127. top: 50%;
  128. left: 740px;
  129. width: 160px;
  130. height: 2px;
  131. transform: translateY(-50%);
  132. opacity: 0;
  133. background: linear-gradient(90deg, var(--accent) 0%, rgba(217,119,87,0) 100%);
  134. transform-origin: left center;
  135. will-change: opacity, transform;
  136. }
  137. /* ============ iPhone ============ */
  138. .phone-wrap {
  139. position: absolute;
  140. top: 50%;
  141. left: 1020px;
  142. transform: translateY(-50%);
  143. opacity: 0;
  144. will-change: opacity, transform;
  145. }
  146. .phone {
  147. width: 440px;
  148. height: 900px;
  149. background: #0e0e10;
  150. border-radius: 58px;
  151. padding: 12px;
  152. position: relative;
  153. box-shadow:
  154. 0 0 0 1.5px rgba(255,255,255,0.14),
  155. 0 0 0 8px rgba(30,30,32,1),
  156. 0 80px 160px -20px rgba(0,0,0,0.85),
  157. 0 30px 70px -20px rgba(217,119,87,0.1);
  158. }
  159. .phone::before {
  160. /* subtle metallic ring */
  161. content: '';
  162. position: absolute;
  163. inset: -4px;
  164. border-radius: 62px;
  165. background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0) 40%, rgba(217,119,87,0.05) 80%, rgba(255,255,255,0.08));
  166. z-index: -1;
  167. }
  168. .screen {
  169. width: 416px;
  170. height: 876px;
  171. border-radius: 46px;
  172. overflow: hidden;
  173. position: relative;
  174. background: #F5F4F0; /* default: claude mist */
  175. }
  176. .screen.dark { background: #0a0a0a; }
  177. /* Dynamic island */
  178. .island {
  179. position: absolute;
  180. top: 14px;
  181. left: 50%;
  182. transform: translateX(-50%);
  183. width: 120px;
  184. height: 34px;
  185. background: #000;
  186. border-radius: 999px;
  187. z-index: 30;
  188. }
  189. /* Status bar */
  190. .status-bar {
  191. position: absolute;
  192. top: 0; left: 0; right: 0;
  193. height: 54px;
  194. display: flex;
  195. align-items: center;
  196. justify-content: space-between;
  197. padding: 18px 34px 0 34px;
  198. font-family: -apple-system, "SF Pro Text", sans-serif;
  199. font-size: 15px;
  200. font-weight: 600;
  201. z-index: 20;
  202. pointer-events: none;
  203. color: inherit;
  204. }
  205. .status-bar .icons {
  206. display: flex; align-items: center; gap: 6px;
  207. }
  208. .status-bar .icons .bars {
  209. display: flex; align-items: flex-end; gap: 2px; height: 11px;
  210. }
  211. .status-bar .icons .bars div {
  212. width: 3px; background: currentColor; border-radius: 1px;
  213. }
  214. .status-bar .icons .bat {
  215. width: 26px; height: 12px;
  216. border: 1.2px solid currentColor; border-radius: 3px; padding: 1px;
  217. position: relative;
  218. opacity: 0.9;
  219. }
  220. .status-bar .icons .bat::after {
  221. content: ''; position: absolute; top: 3px; right: -3px; width: 2px; height: 6px;
  222. background: currentColor; border-radius: 0 1px 1px 0;
  223. }
  224. .status-bar .icons .bat .fill {
  225. width: 84%; height: 100%; background: currentColor; border-radius: 1px;
  226. }
  227. .home-indicator {
  228. position: absolute;
  229. bottom: 10px;
  230. left: 50%;
  231. transform: translateX(-50%);
  232. width: 140px;
  233. height: 5px;
  234. background: rgba(0,0,0,0.3);
  235. border-radius: 999px;
  236. z-index: 10;
  237. }
  238. .screen.dark .home-indicator { background: rgba(255,255,255,0.5); }
  239. /* Content area (below status bar) */
  240. .content {
  241. position: absolute;
  242. top: 64px; left: 0; right: 0; bottom: 30px;
  243. overflow: hidden;
  244. z-index: 5;
  245. }
  246. /* Screen views */
  247. .screen-view {
  248. position: absolute;
  249. inset: 0;
  250. opacity: 0;
  251. will-change: opacity, transform;
  252. }
  253. /* 1. Wireframe (ghost) */
  254. .wire {
  255. padding: 40px 28px;
  256. }
  257. .wire .ghost {
  258. background: rgba(26, 25, 24, 0.08);
  259. border-radius: 10px;
  260. margin-bottom: 14px;
  261. }
  262. .wire .g1 { height: 36px; width: 60%; }
  263. .wire .g2 { height: 180px; }
  264. .wire .g3 { height: 20px; width: 80%; }
  265. .wire .g4 { height: 20px; width: 50%; }
  266. .wire .g5 { height: 52px; margin-top: 24px; }
  267. /* 2. Home screen — 主屏 · pomodoro */
  268. .home-screen { padding: 40px 28px; color: var(--cd-ink); }
  269. .home-screen .kicker {
  270. font-family: var(--mono);
  271. font-size: 12px;
  272. letter-spacing: 0.22em;
  273. color: var(--cd-dim);
  274. text-transform: uppercase;
  275. }
  276. .home-screen .title {
  277. font-family: var(--serif-en);
  278. font-size: 48px;
  279. font-weight: 300;
  280. line-height: 1.02;
  281. margin-top: 14px;
  282. letter-spacing: -0.035em;
  283. font-style: italic;
  284. }
  285. .home-screen .time-big {
  286. margin-top: 50px;
  287. font-family: var(--serif-en);
  288. font-size: 168px;
  289. font-weight: 200;
  290. line-height: 0.95;
  291. letter-spacing: -0.04em;
  292. color: var(--cd-ink);
  293. }
  294. .home-screen .time-big .sep { color: var(--accent); }
  295. .home-screen .sub {
  296. font-family: var(--sans);
  297. font-size: 15px;
  298. color: var(--cd-dim);
  299. margin-top: 18px;
  300. letter-spacing: 0.02em;
  301. }
  302. .home-screen .cta {
  303. margin-top: 64px;
  304. height: 62px;
  305. background: var(--cd-ink);
  306. color: #fff;
  307. border-radius: 999px;
  308. display: flex; align-items: center; justify-content: center;
  309. font-family: var(--sans);
  310. font-size: 17px;
  311. font-weight: 500;
  312. letter-spacing: 0.04em;
  313. position: relative;
  314. }
  315. .home-screen .cta::before {
  316. content: '';
  317. width: 0; height: 0;
  318. border-left: 10px solid #fff;
  319. border-top: 7px solid transparent;
  320. border-bottom: 7px solid transparent;
  321. margin-right: 10px;
  322. }
  323. /* 3. Timer · 计时 · ring */
  324. .timer-screen {
  325. padding: 40px 28px;
  326. color: var(--cd-ink);
  327. text-align: center;
  328. }
  329. .timer-screen .phase {
  330. font-family: var(--mono);
  331. font-size: 12px;
  332. letter-spacing: 0.24em;
  333. color: var(--accent);
  334. text-transform: uppercase;
  335. text-align: left;
  336. }
  337. .ring-wrap {
  338. margin: 80px auto 0;
  339. width: 320px; height: 320px;
  340. position: relative;
  341. }
  342. .ring-wrap svg {
  343. width: 100%; height: 100%;
  344. transform: rotate(-90deg);
  345. }
  346. .ring-wrap .bg-ring {
  347. fill: none; stroke: rgba(26,25,24,0.08); stroke-width: 14;
  348. }
  349. .ring-wrap .fg-ring {
  350. fill: none; stroke: #D97757; stroke-width: 14; stroke-linecap: round;
  351. stroke-dasharray: 880;
  352. stroke-dashoffset: 880;
  353. }
  354. .ring-wrap .ring-label {
  355. position: absolute;
  356. top: 50%; left: 50%;
  357. transform: translate(-50%, -50%);
  358. text-align: center;
  359. }
  360. .ring-wrap .rl-time {
  361. font-family: var(--serif-en);
  362. font-size: 86px;
  363. font-weight: 200;
  364. line-height: 1;
  365. letter-spacing: -0.03em;
  366. color: var(--cd-ink);
  367. }
  368. .ring-wrap .rl-tag {
  369. margin-top: 10px;
  370. font-family: var(--mono);
  371. font-size: 12px;
  372. letter-spacing: 0.2em;
  373. color: var(--cd-dim);
  374. text-transform: uppercase;
  375. }
  376. .timer-screen .actions {
  377. margin-top: 60px;
  378. display: flex; gap: 14px; justify-content: center;
  379. }
  380. .timer-screen .act-btn {
  381. padding: 14px 32px;
  382. border-radius: 999px;
  383. background: rgba(26,25,24,0.05);
  384. font-family: var(--sans);
  385. font-size: 14px;
  386. font-weight: 500;
  387. color: var(--cd-ink);
  388. letter-spacing: 0.04em;
  389. border: 1px solid rgba(26,25,24,0.08);
  390. }
  391. .timer-screen .act-btn.primary {
  392. background: var(--cd-ink);
  393. color: #fff;
  394. border-color: transparent;
  395. }
  396. /* 4. Stats · 统计 · bar chart */
  397. .stats-screen { padding: 40px 28px; color: var(--cd-ink); }
  398. .stats-screen .stats-label {
  399. font-family: var(--mono);
  400. font-size: 12px;
  401. letter-spacing: 0.24em;
  402. color: var(--cd-dim);
  403. text-transform: uppercase;
  404. }
  405. .stats-screen .stats-hero {
  406. font-family: var(--serif-en);
  407. font-size: 120px;
  408. font-weight: 200;
  409. line-height: 1;
  410. letter-spacing: -0.04em;
  411. margin-top: 10px;
  412. }
  413. .stats-screen .stats-hero .unit {
  414. font-size: 28px;
  415. color: var(--cd-dim);
  416. margin-left: 8px;
  417. font-weight: 300;
  418. }
  419. .stats-screen .stats-sub {
  420. font-family: var(--sans);
  421. font-size: 14px;
  422. color: var(--cd-dim);
  423. margin-top: 6px;
  424. letter-spacing: 0.02em;
  425. }
  426. .chart {
  427. margin-top: 52px;
  428. display: flex;
  429. gap: 10px;
  430. align-items: flex-end;
  431. height: 200px;
  432. padding: 0 4px;
  433. }
  434. .chart .bar {
  435. flex: 1;
  436. background: var(--accent);
  437. border-radius: 6px 6px 0 0;
  438. opacity: 0.85;
  439. transform-origin: bottom;
  440. will-change: transform;
  441. }
  442. .chart .bar.dim { background: rgba(26,25,24,0.15); }
  443. .chart-x {
  444. display: flex;
  445. justify-content: space-between;
  446. margin-top: 12px;
  447. font-family: var(--mono);
  448. font-size: 10px;
  449. color: var(--cd-dim);
  450. letter-spacing: 0.08em;
  451. padding: 0 4px;
  452. }
  453. /* 5. Settings · 设置 · list */
  454. .settings-screen { padding: 40px 28px; color: var(--cd-ink); }
  455. .settings-screen .title-row {
  456. font-family: var(--serif-en);
  457. font-size: 48px;
  458. font-weight: 300;
  459. letter-spacing: -0.035em;
  460. font-style: italic;
  461. }
  462. .settings-screen .list {
  463. margin-top: 40px;
  464. background: #FFFFFF;
  465. border-radius: 14px;
  466. overflow: hidden;
  467. border: 1px solid rgba(26,25,24,0.06);
  468. }
  469. .settings-screen .row {
  470. padding: 22px 24px;
  471. display: flex;
  472. align-items: center;
  473. justify-content: space-between;
  474. border-bottom: 1px solid rgba(26,25,24,0.06);
  475. }
  476. .settings-screen .row:last-child { border-bottom: none; }
  477. .settings-screen .row .k {
  478. font-family: var(--sans);
  479. font-size: 16px;
  480. color: var(--cd-ink);
  481. }
  482. .settings-screen .row .v {
  483. font-family: var(--mono);
  484. font-size: 13px;
  485. color: var(--cd-dim);
  486. letter-spacing: 0.04em;
  487. }
  488. .toggle {
  489. width: 48px; height: 28px;
  490. border-radius: 999px;
  491. background: var(--cd-green);
  492. position: relative;
  493. }
  494. .toggle::after {
  495. content: ''; position: absolute;
  496. top: 3px; right: 3px;
  497. width: 22px; height: 22px;
  498. background: #fff;
  499. border-radius: 50%;
  500. box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  501. }
  502. .toggle.off { background: rgba(26,25,24,0.15); }
  503. .toggle.off::after { left: 3px; right: auto; }
  504. /* Tab bar (bottom of home-like screens) */
  505. .tab-bar {
  506. position: absolute;
  507. bottom: 30px; left: 28px; right: 28px;
  508. height: 58px;
  509. background: #FFFFFF;
  510. border-radius: 999px;
  511. border: 1px solid rgba(26,25,24,0.08);
  512. display: flex;
  513. justify-content: space-around;
  514. align-items: center;
  515. padding: 0 14px;
  516. box-shadow: 0 10px 28px -10px rgba(0,0,0,0.15);
  517. }
  518. .tab-bar .tab {
  519. display: flex;
  520. flex-direction: column;
  521. align-items: center;
  522. gap: 2px;
  523. font-family: var(--mono);
  524. font-size: 10px;
  525. color: var(--cd-dim);
  526. letter-spacing: 0.1em;
  527. text-transform: uppercase;
  528. padding: 8px 14px;
  529. border-radius: 999px;
  530. }
  531. .tab-bar .tab.active {
  532. background: var(--cd-ink);
  533. color: #fff;
  534. }
  535. .tab-bar .tab .ico {
  536. width: 18px; height: 18px;
  537. border-radius: 4px;
  538. background: currentColor;
  539. opacity: 0.9;
  540. margin-bottom: 3px;
  541. }
  542. /* Finger / tap */
  543. .tap {
  544. position: absolute;
  545. z-index: 40;
  546. width: 64px; height: 64px;
  547. pointer-events: none;
  548. opacity: 0;
  549. will-change: opacity, transform;
  550. }
  551. .tap .core {
  552. position: absolute;
  553. inset: 18px;
  554. background: rgba(217, 119, 87, 0.85);
  555. border-radius: 50%;
  556. box-shadow: 0 0 0 2px rgba(255,255,255,0.5), 0 0 24px rgba(217,119,87,0.5);
  557. }
  558. .tap .ring {
  559. position: absolute;
  560. inset: 0;
  561. border: 2px solid rgba(217,119,87,0.6);
  562. border-radius: 50%;
  563. animation: tapring 0.6s ease-out;
  564. }
  565. @keyframes tapring {
  566. 0% { transform: scale(0.4); opacity: 1; }
  567. 100% { transform: scale(1.3); opacity: 0; }
  568. }
  569. /* ============ Brand Reveal ============ */
  570. .brand-wall {
  571. position: absolute;
  572. inset: 0;
  573. background: var(--cd-bg);
  574. z-index: 300;
  575. opacity: 0;
  576. transform: translateY(100%);
  577. will-change: transform, opacity;
  578. display: flex;
  579. flex-direction: column;
  580. align-items: center;
  581. justify-content: center;
  582. }
  583. .brand-wordmark {
  584. font-family: var(--serif-en);
  585. font-size: 132px;
  586. font-weight: 200;
  587. color: var(--cd-ink);
  588. letter-spacing: -0.04em;
  589. line-height: 1;
  590. opacity: 0;
  591. transform: scale(0.92);
  592. will-change: opacity, transform;
  593. }
  594. .brand-wordmark .dot { color: var(--accent); padding: 0 10px; font-weight: 300; }
  595. .brand-underline {
  596. margin-top: 28px;
  597. height: 2px;
  598. width: 0;
  599. background: var(--accent);
  600. will-change: width;
  601. }
  602. .brand-cn {
  603. margin-top: 30px;
  604. font-family: var(--serif-en);
  605. font-style: italic;
  606. font-size: 22px;
  607. font-weight: 300;
  608. color: var(--cd-dim);
  609. letter-spacing: 0.12em;
  610. opacity: 0;
  611. will-change: opacity;
  612. }
  613. </style>
  614. </head>
  615. <body>
  616. <div class="stage" id="stage">
  617. <div class="watermark">HUASHU · DESIGN</div>
  618. <!-- Terminal -->
  619. <div class="terminal" id="terminal">
  620. <div class="tty-head">
  621. <div class="d r"></div>
  622. <div class="d y"></div>
  623. <div class="d g"></div>
  624. <div class="title">~/projects</div>
  625. </div>
  626. <div class="tty-body">
  627. <div class="comment" id="comment" style="opacity:0">&gt; Type a sentence, get a clickable app.</div>
  628. <div style="margin-top:6px">
  629. <span class="prompt">$</span><span class="typed" id="typed"></span><span class="cursor" id="ttyCursor"></span>
  630. </div>
  631. </div>
  632. </div>
  633. <div class="connector" id="connector"></div>
  634. <!-- Phone -->
  635. <div class="phone-wrap" id="phoneWrap">
  636. <div class="phone">
  637. <div class="screen" id="screen">
  638. <!-- Status bar -->
  639. <div class="status-bar" id="statusBar" style="color:#1A1918">
  640. <span>9:41</span>
  641. <div class="icons">
  642. <div class="bars">
  643. <div style="height:4px"></div>
  644. <div style="height:6px"></div>
  645. <div style="height:8px"></div>
  646. <div style="height:10px"></div>
  647. </div>
  648. <div class="bat"><div class="fill"></div></div>
  649. </div>
  650. </div>
  651. <div class="island"></div>
  652. <div class="content">
  653. <!-- 1. Wireframe -->
  654. <div class="screen-view" id="view-wire">
  655. <div class="wire">
  656. <div class="ghost g1"></div>
  657. <div class="ghost g2"></div>
  658. <div class="ghost g3"></div>
  659. <div class="ghost g4"></div>
  660. <div class="ghost g5"></div>
  661. </div>
  662. </div>
  663. <!-- 2. Home -->
  664. <div class="screen-view" id="view-home">
  665. <div class="home-screen">
  666. <div class="kicker">POMODORO</div>
  667. <div class="title">Next up.</div>
  668. <div class="time-big">25<span class="sep">:</span>00</div>
  669. <div class="sub">Write one section. Rest five minutes.</div>
  670. <div class="cta">Focus now</div>
  671. </div>
  672. </div>
  673. <!-- 3. Timer -->
  674. <div class="screen-view" id="view-timer">
  675. <div class="timer-screen">
  676. <div class="phase">FOCUS · ROUND 1</div>
  677. <div class="ring-wrap">
  678. <svg viewBox="0 0 320 320">
  679. <circle class="bg-ring" cx="160" cy="160" r="140"/>
  680. <circle class="fg-ring" id="fgRing" cx="160" cy="160" r="140"/>
  681. </svg>
  682. <div class="ring-label">
  683. <div class="rl-time" id="ringTime">24:12</div>
  684. <div class="rl-tag">REMAINING</div>
  685. </div>
  686. </div>
  687. <div class="actions">
  688. <div class="act-btn">Pause</div>
  689. <div class="act-btn primary">Skip</div>
  690. </div>
  691. </div>
  692. </div>
  693. <!-- 4. Stats -->
  694. <div class="screen-view" id="view-stats">
  695. <div class="stats-screen">
  696. <div class="stats-label">THIS WEEK</div>
  697. <div class="stats-hero">23<span class="unit">rounds</span></div>
  698. <div class="stats-sub">+5 from last week</div>
  699. <div class="chart" id="chart">
  700. <div class="bar dim" style="height:30%"></div>
  701. <div class="bar" style="height:52%"></div>
  702. <div class="bar" style="height:70%"></div>
  703. <div class="bar" style="height:42%"></div>
  704. <div class="bar" style="height:86%"></div>
  705. <div class="bar" style="height:95%"></div>
  706. <div class="bar" style="height:64%"></div>
  707. </div>
  708. <div class="chart-x">
  709. <span>M</span><span>T</span><span>W</span><span>T</span><span>F</span><span>S</span><span>S</span>
  710. </div>
  711. </div>
  712. </div>
  713. <!-- 5. Settings -->
  714. <div class="screen-view" id="view-settings">
  715. <div class="settings-screen">
  716. <div class="title-row">Settings</div>
  717. <div class="list">
  718. <div class="row">
  719. <span class="k">Focus length</span>
  720. <span class="v">25 MIN</span>
  721. </div>
  722. <div class="row">
  723. <span class="k">White noise</span>
  724. <div class="toggle"></div>
  725. </div>
  726. <div class="row">
  727. <span class="k">Ring alert</span>
  728. <div class="toggle off"></div>
  729. </div>
  730. <div class="row">
  731. <span class="k">Theme</span>
  732. <span class="v">CLAUDE MIST</span>
  733. </div>
  734. </div>
  735. </div>
  736. </div>
  737. <!-- Tab bar (shared, appears on home/stats/settings) -->
  738. <div class="tab-bar" id="tabBar" style="display:none">
  739. <div class="tab active" data-tab="home">
  740. <div class="ico"></div>
  741. <span>HOME</span>
  742. </div>
  743. <div class="tab" data-tab="timer">
  744. <div class="ico"></div>
  745. <span>TIMER</span>
  746. </div>
  747. <div class="tab" data-tab="stats">
  748. <div class="ico"></div>
  749. <span>STATS</span>
  750. </div>
  751. <div class="tab" data-tab="settings">
  752. <div class="ico"></div>
  753. <span>SET</span>
  754. </div>
  755. </div>
  756. </div>
  757. <div class="home-indicator"></div>
  758. <!-- Tap overlay (inside screen so z-index > content) -->
  759. <div class="tap" id="tap">
  760. <div class="ring"></div>
  761. <div class="core"></div>
  762. </div>
  763. </div>
  764. </div>
  765. </div>
  766. <!-- Brand reveal -->
  767. <div class="brand-wall" id="brandWall">
  768. <div class="brand-wordmark" id="brandWord">huashu<span class="dot">·</span>design</div>
  769. <div class="brand-underline" id="brandLine"></div>
  770. <div class="brand-cn" id="brandCn">Say it. Get an app.</div>
  771. </div>
  772. </div>
  773. <script>
  774. (() => {
  775. // ── Scale to viewport (1920×1080 canvas) ─────────────────────────
  776. function fit() {
  777. const stage = document.getElementById('stage');
  778. const s = Math.min(window.innerWidth / 1920, window.innerHeight / 1080);
  779. stage.style.transform = `translate(-50%, -50%) scale(${s})`;
  780. }
  781. fit();
  782. window.addEventListener('resize', fit);
  783. // ── Easing ───────────────────────────────────────────────────────
  784. const expoOut = t => (t <= 0 ? 0 : t >= 1 ? 1 : 1 - Math.pow(2, -10 * t));
  785. const expoIn = t => (t <= 0 ? 0 : t >= 1 ? 1 : Math.pow(2, 10 * (t - 1)));
  786. const cubicInOut = t => t < 0.5 ? 4*t*t*t : 1 - Math.pow(-2*t+2, 3)/2;
  787. const cubicOut = t => 1 - Math.pow(1 - t, 3);
  788. const clamp = (v, a, b) => Math.max(a, Math.min(b, v));
  789. const lerp = (a, b, t) => a + (b - a) * t;
  790. // Animate a value by requestAnimationFrame between timeline markers
  791. function seg(t, start, end) {
  792. return clamp((t - start) / (end - start), 0, 1);
  793. }
  794. // ── Elements ─────────────────────────────────────────────────────
  795. const el = (id) => document.getElementById(id);
  796. const terminal = el('terminal');
  797. const comment = el('comment');
  798. const typed = el('typed');
  799. const ttyCursor = el('ttyCursor');
  800. const connector = el('connector');
  801. const phoneWrap = el('phoneWrap');
  802. const views = {
  803. wire: el('view-wire'),
  804. home: el('view-home'),
  805. timer: el('view-timer'),
  806. stats: el('view-stats'),
  807. settings: el('view-settings'),
  808. };
  809. const tap = el('tap');
  810. const tabBar = el('tabBar');
  811. const fgRing = el('fgRing');
  812. const ringTime = el('ringTime');
  813. const brandWall = el('brandWall');
  814. const brandWord = el('brandWord');
  815. const brandLine = el('brandLine');
  816. const brandCn = el('brandCn');
  817. // Typing text
  818. const typeStr = 'make pomodoro app';
  819. function setTyping(progress) {
  820. const n = Math.floor(typeStr.length * progress);
  821. typed.textContent = typeStr.slice(0, n);
  822. }
  823. // Show/hide views — hard swap (no cross-fade overlap)
  824. function showView(name) {
  825. Object.keys(views).forEach(k => {
  826. const isActive = (k === name);
  827. views[k].style.opacity = isActive ? '1' : '0';
  828. views[k].style.visibility = isActive ? 'visible' : 'hidden';
  829. views[k].style.transform = isActive ? 'translateY(0)' : 'translateY(0)';
  830. views[k].style.transition = isActive ? 'opacity 0.22s ease-out' : 'none';
  831. });
  832. }
  833. // Active tab
  834. function setActiveTab(name) {
  835. document.querySelectorAll('.tab-bar .tab').forEach(t => {
  836. t.classList.toggle('active', t.dataset.tab === name);
  837. });
  838. }
  839. // Play tap at screen coords (relative to .screen: 416×876)
  840. function playTap(x, y) {
  841. tap.style.left = (x - 32) + 'px';
  842. tap.style.top = (y - 32) + 'px';
  843. tap.style.opacity = '1';
  844. // restart keyframe animation
  845. const ring = tap.querySelector('.ring');
  846. ring.style.animation = 'none';
  847. ring.offsetHeight; // reflow
  848. ring.style.animation = '';
  849. // fade out
  850. setTimeout(() => { tap.style.opacity = '0'; }, 550);
  851. }
  852. // ── SFX via WebAudio ─────────────────────────────────────────────
  853. let audioCtx = null;
  854. function ac() {
  855. if (!audioCtx) {
  856. try { audioCtx = new (window.AudioContext || window.webkitAudioContext)(); } catch(e){}
  857. }
  858. return audioCtx;
  859. }
  860. function sfxClick(vol = 0.16) {
  861. const c = ac(); if (!c) return;
  862. const o = c.createOscillator();
  863. const g = c.createGain();
  864. o.type = 'square';
  865. o.frequency.setValueAtTime(1200, c.currentTime);
  866. o.frequency.exponentialRampToValueAtTime(500, c.currentTime + 0.04);
  867. g.gain.setValueAtTime(vol, c.currentTime);
  868. g.gain.exponentialRampToValueAtTime(0.001, c.currentTime + 0.05);
  869. o.connect(g); g.connect(c.destination);
  870. o.start(); o.stop(c.currentTime + 0.06);
  871. }
  872. function sfxEnter() {
  873. const c = ac(); if (!c) return;
  874. const o = c.createOscillator();
  875. const g = c.createGain();
  876. o.type = 'sine';
  877. o.frequency.setValueAtTime(180, c.currentTime);
  878. o.frequency.exponentialRampToValueAtTime(440, c.currentTime + 0.25);
  879. g.gain.setValueAtTime(0.22, c.currentTime);
  880. g.gain.exponentialRampToValueAtTime(0.001, c.currentTime + 0.3);
  881. o.connect(g); g.connect(c.destination);
  882. o.start(); o.stop(c.currentTime + 0.32);
  883. }
  884. function sfxChime() {
  885. const c = ac(); if (!c) return;
  886. [523.25, 783.99].forEach((f, i) => {
  887. const o = c.createOscillator();
  888. const g = c.createGain();
  889. o.type = 'sine';
  890. o.frequency.value = f;
  891. g.gain.setValueAtTime(0, c.currentTime + i * 0.08);
  892. g.gain.linearRampToValueAtTime(0.18, c.currentTime + i * 0.08 + 0.04);
  893. g.gain.exponentialRampToValueAtTime(0.001, c.currentTime + i * 0.08 + 1.2);
  894. o.connect(g); g.connect(c.destination);
  895. o.start(c.currentTime + i * 0.08);
  896. o.stop(c.currentTime + i * 0.08 + 1.25);
  897. });
  898. }
  899. // ── Timeline ─────────────────────────────────────────────────────
  900. const DURATION = 10.0;
  901. const sfxFired = new Set();
  902. function fireOnce(id, fn) {
  903. if (sfxFired.has(id)) return;
  904. sfxFired.add(id);
  905. fn();
  906. }
  907. // Screen switch schedule (within Beat 2, 2.0s → 8.0s)
  908. // Tap coords are relative to the 416×876 .screen
  909. const schedule = [
  910. { t: 2.0, view: 'wire', tabIco: null, tap: null },
  911. { t: 3.1, view: 'home', tabIco: 'home', tap: null }, // home materializes (no tap — it's the fill moment)
  912. { t: 4.4, view: 'timer', tabIco: 'timer', tap: {x: 208, y: 624} }, // tap "开始专注" CTA
  913. { t: 6.3, view: 'stats', tabIco: 'stats', tap: {x: 300, y: 810} }, // tap stats tab
  914. { t: 7.5, view: 'settings', tabIco: 'settings', tap: {x: 370, y: 810} }, // tap settings tab
  915. ];
  916. let scheduleIdx = 0;
  917. let startTime = null;
  918. let raf = null;
  919. function tick(now) {
  920. if (!startTime) startTime = now;
  921. const t = (now - startTime) / 1000;
  922. // ── Beat 1: 0-2s ─────────────────────────────────────────
  923. // Terminal fade in (0 → 0.4s)
  924. {
  925. const k = expoOut(seg(t, 0.0, 0.4));
  926. terminal.style.opacity = k;
  927. terminal.style.transform = `translateY(-50%) translateX(${lerp(-30, 0, k)}px)`;
  928. }
  929. // iPhone fade in (0.2 → 0.9s)
  930. {
  931. const k = expoOut(seg(t, 0.2, 0.9));
  932. phoneWrap.style.opacity = k;
  933. phoneWrap.style.transform = `translateY(-50%) translateX(${lerp(60, 0, k)}px) scale(${lerp(0.96, 1, k)})`;
  934. if (t > 0.25) fireOnce('enter', sfxEnter);
  935. }
  936. // Connector fade
  937. {
  938. const k = expoOut(seg(t, 0.7, 1.2));
  939. connector.style.opacity = k;
  940. connector.style.transform = `translateY(-50%) scaleX(${k})`;
  941. }
  942. // Comment
  943. {
  944. const k = expoOut(seg(t, 0.8, 1.2));
  945. comment.style.opacity = k * 0.82;
  946. }
  947. // Typing (0.6 → 1.9s)
  948. {
  949. const k = cubicInOut(seg(t, 0.6, 1.9));
  950. setTyping(k);
  951. // key click SFX at certain progress points
  952. if (t > 0.8 && t < 1.85) {
  953. const charsShown = Math.floor(typeStr.length * k);
  954. const key = 'typ' + charsShown;
  955. if (!sfxFired.has(key) && charsShown > 0 && charsShown % 3 === 0) {
  956. fireOnce(key, () => sfxClick(0.08));
  957. }
  958. }
  959. }
  960. // Hide cursor when typing done
  961. ttyCursor.style.opacity = t > 1.85 ? '0' : '1';
  962. // ── Beat 2: 2-8s ─────────────────────────────────────────
  963. // Execute scheduled screen transitions
  964. while (scheduleIdx < schedule.length && t >= schedule[scheduleIdx].t) {
  965. const s = schedule[scheduleIdx];
  966. showView(s.view);
  967. // status bar color: dark-text on light screens, but wire also light, keep dark
  968. if (s.view === 'wire') {
  969. tabBar.style.display = 'none';
  970. } else {
  971. tabBar.style.display = 'flex';
  972. setActiveTab(s.tabIco);
  973. }
  974. if (s.tap) {
  975. // small delay so tap appears at moment of switch
  976. setTimeout(() => playTap(s.tap.x, s.tap.y), 120);
  977. if (s.view !== 'wire') fireOnce('click_' + s.view, () => sfxClick(0.18));
  978. }
  979. scheduleIdx++;
  980. }
  981. // Timer ring animation: once timer appears (4.4s), animate ring from empty → 42% filled
  982. if (t >= 4.4 && t < 6.3) {
  983. const ringT = clamp((t - 4.5) / 1.2, 0, 1);
  984. const fillPct = expoOut(ringT) * 0.42;
  985. const offset = 880 * (1 - fillPct);
  986. // Set as both style AND attr so neither overrides the other
  987. fgRing.style.strokeDashoffset = offset;
  988. fgRing.setAttribute('stroke-dashoffset', offset);
  989. // Count down visually: 24:12 → 14:03
  990. const mins = Math.floor(lerp(24, 14, expoOut(ringT)));
  991. const secs = Math.floor(lerp(12, 3, expoOut(ringT)));
  992. ringTime.textContent = String(mins).padStart(2,'0') + ':' + String(secs).padStart(2,'0');
  993. }
  994. // ── Beat 3: 8-10s ────────────────────────────────────────
  995. // Phone + terminal fade out fast (7.5 → 7.9) so wall doesn't guillotine
  996. if (t >= 7.5) {
  997. const k = cubicOut(seg(t, 7.5, 7.9));
  998. phoneWrap.style.opacity = String(1 - k);
  999. phoneWrap.style.transform = `translateY(-50%) scale(${lerp(1, 0.94, k)})`;
  1000. terminal.style.opacity = String(1 - k);
  1001. terminal.style.transform = `translateY(-50%) scale(${lerp(1, 0.96, k)})`;
  1002. connector.style.opacity = String(1 - k);
  1003. }
  1004. // Brand wall slides up (7.9 → 8.6) — starts AFTER phone is gone
  1005. {
  1006. const k = expoOut(seg(t, 7.9, 8.6));
  1007. brandWall.style.transform = `translateY(${lerp(100, 0, k)}%)`;
  1008. brandWall.style.opacity = k > 0 ? '1' : '0';
  1009. const watermark = document.querySelector('.watermark');
  1010. if (k > 0.6) watermark.classList.add('on-light');
  1011. else watermark.classList.remove('on-light');
  1012. }
  1013. // Wordmark appears
  1014. {
  1015. const k = expoOut(seg(t, 8.5, 9.2));
  1016. brandWord.style.opacity = k;
  1017. brandWord.style.transform = `scale(${lerp(0.92, 1, k)})`;
  1018. if (t > 8.55) fireOnce('chime', sfxChime);
  1019. }
  1020. // Underline
  1021. {
  1022. const k = expoOut(seg(t, 9.0, 9.6));
  1023. brandLine.style.width = (280 * k) + 'px';
  1024. }
  1025. // CN label
  1026. {
  1027. const k = cubicOut(seg(t, 9.3, 9.9));
  1028. brandCn.style.opacity = k * 0.9;
  1029. }
  1030. if (t < DURATION) {
  1031. raf = requestAnimationFrame(tick);
  1032. } else {
  1033. // Hold final frame
  1034. if (!window.__recording) {
  1035. // loop for preview
  1036. setTimeout(() => {
  1037. startTime = null;
  1038. scheduleIdx = 0;
  1039. sfxFired.clear();
  1040. // Reset views
  1041. showView('wire');
  1042. tabBar.style.display = 'none';
  1043. fgRing.style.strokeDashoffset = 880;
  1044. fgRing.setAttribute('stroke-dashoffset', 880);
  1045. ringTime.textContent = '24:12';
  1046. // Reset brand
  1047. brandWall.style.transform = 'translateY(100%)';
  1048. brandWall.style.opacity = '0';
  1049. brandWord.style.opacity = '0';
  1050. brandWord.style.transform = 'scale(0.92)';
  1051. brandLine.style.width = '0';
  1052. brandCn.style.opacity = '0';
  1053. // Reset terminal typing
  1054. typed.textContent = '';
  1055. ttyCursor.style.opacity = '1';
  1056. comment.style.opacity = '0';
  1057. terminal.style.opacity = '0';
  1058. phoneWrap.style.opacity = '0';
  1059. connector.style.opacity = '0';
  1060. document.querySelector('.watermark').classList.remove('on-light');
  1061. raf = requestAnimationFrame(tick);
  1062. }, 600);
  1063. }
  1064. }
  1065. }
  1066. // seek(0) helper for render-video.js
  1067. window.__seek = function(s) {
  1068. startTime = performance.now() - s * 1000;
  1069. };
  1070. // Initial state
  1071. showView('wire');
  1072. tabBar.style.display = 'none';
  1073. // Wait for fonts, then start animation
  1074. (document.fonts ? document.fonts.ready : Promise.resolve()).then(() => {
  1075. requestAnimationFrame((now) => {
  1076. startTime = now;
  1077. window.__ready = true;
  1078. raf = requestAnimationFrame(tick);
  1079. });
  1080. });
  1081. })();
  1082. </script>
  1083. </body>
  1084. </html>